text
stringlengths
2.85k
2.55M
label
class label
11 classes
A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES arXiv:1708.06960v2 [math.MG] 9 Feb 2018 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Abstract. Coarse median spaces simultaneously generalise the classes of hyperbolic spaces and median algebras, and arise naturally in the study of the mapping class groups and many other contexts. Their definition as originally conceived by Bowditch requires median approximations for all finite subsets of the space. Here we provide a simplification of the definition in the form of a 4-point condition analogous to Gromov’s 4-point condition defining hyperbolicity. We give an intrinsic characterisation of rank in terms of the coarse median operator and use this to give a direct proof that rank 1 geodesic coarse median spaces are δhyperbolic, bypassing Bowditch’s use of asymptotic cones. A key ingredient of the proof is a new definition of intervals in coarse median spaces and an analysis of their interaction with geodesics. 1. Introduction Coarse median spaces and groups were introduced by Bowditch in 2013 [5] as a coarse variant of classical median algebras. The notion of a coarse median group leads to a unified viewpoint on several interesting classes, including Gromov’s hyperbolic groups, mapping class groups, and CAT(0) cubical groups. Bowditch showed that geodesic hyperbolic spaces are exactly geodesic coarse median spaces of rank 1, and mapping class groups are examples of coarse median spaces of finite rank [5]. In 2014 [3, 4], Behrstoke, Hagen and Sisto introduced the notion of hierarchically hyperbolic spaces, and showed that these are coarse median. 2010 Mathematics Subject Classification. 20F65, 20F67, 20F69. Key words and phrases. Coarse median space, canonical metric, hyperbolicity, rank. Partially supported by the Sino-British Fellowship Trust by Royal Society. 1 2 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Intuitively, a coarse median space (X, d, µ) is a metric space (X, d) equipped with a ternary operator µ (called the coarse median), in which every finite subset can be approximated by a finite CAT(0) cube complex, with distortion controlled by the metric. This can be viewed as a wide-ranging extension of Gromov’s observation that in a δ-hyperbolic space finite subsets can be approximated by trees. See also Zeidler’s Master’s thesis [23]. In this paper we simplify the definition of a coarse median space, replacing the requirement to approximate arbitrary finite subsets with a simplified 4-point condition which may be viewed as a high dimensional analogue of Gromov’s 4-point condition for hyperbolicity. Our condition asserts that given any four points a, b, c, d the two iterated coarse medians µ(µ(a, b, c), b, d) and µ(a, b, µ(c, b, d)) are uniformly close. As illustrated below this corresponds to an approximation by a CAT(0) cube complex of dimension 3, where the corresponding iterated medians coincide. Figure 1. The CAT(0) cube complex associated to the free median algebra on {a, b, c, d} We recall that Gromov gave a 4-point condition characterising hyperbolicity for geodesic spaces which, in essence, asserts that A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 3 any four points can be approximated by one of the trees shown in Figure 2. We can visualise each of these trees as degenerate Figure 2. Gromov’s 4-point condition cases of Figure 1 in which two of the dimensions of the cube are collapsed, making clear the relationship between Gromov’s 4-point condition and ours, and the sense in which coarse median spaces are a higher dimensional analogue of δ-hyperbolic spaces. The presence of the central 3-cube, which may be arbitrarily large, allows for flat geometry. The coarse 4-point condition is also a coarse analogue of the 4point characterisation for median algebras, as introduced and studied by Kolibiar and Marcisová in [13]. To establish the equivalence with Bowditch’s original definition we introduce a model for the free median algebra generated by n points, which may be of independent interest. Any median algebra generated by 4 points can be modelled by the 3-dimensional CAT(0) cube complex illustrated in Figure 1, so it is a priori difficult to see how to characterise rank using our new definition. We overcome this by offering several intrinsic characterisations of rank in terms of the coarse median operator itself and which are equivalent to Bowditch’s definition. 4 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG The rank 1 geodesic case is of independent interest, since, as remarked above, it coincides with the class of geodesic hyperbolic spaces, [5]. Bowditch’s proof that rank 1 geodesic coarse median spaces are hyperbolic uses an ingenious asymptotic cones argument which conceals in part the strong interaction between quasigeodesics and coarse median intervals in this case. Introducing a new definition of interval in a coarse median space, we give an alternative proof, bypassing the asymptotic cones argument, and instead exploiting a result of Papasoglu [17] and Pomroy [18], see also [9]. We also consider the behaviour of quasi-geodesics in higher rank coarse median spaces, giving an example in rank 2 to show that even geodesics can wander far from the intervals defined by the coarse median operator. In a subsequent paper, [15] we further develop the concept of the coarse interval structure associated to a coarse median space and, as an application, we show there that the metric data is determined by the coarse median operator itself. The paper is organised as follows. In Section 2, we recall Bowditch’s definition of coarse median spaces and introduce our notion of (coarse) intervals (which differ in one small but crucial respect from the intervals studied by Bowditch). In Section 3, we establish our 4-point condition characterising coarse median spaces. In Section 4, we give several characterisations for rank in terms of the coarse median operator and give a new proof of Bowditch’s result concerning the hyperbolicity of rank 1 geodesic coarse median spaces. Finally in Section 5, we construct an example to show that geodesics do not have to remain close to intervals in a coarse median space of rank greater than 1. 2. Preliminaries 2.1. Metrics and geodesics. Definition 2.1. Let (X, d) and (Y, d0 ) be metric spaces. (1) (X, d) is said to be quasi-geodesic, if there exist constants L, C > 0 such that for any two points x, y ∈ X, there exists a map γ : [0, d(x, y)] → X with γ(0) = x, γ(d(x, y)) = y, satisfying: for A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 5 any s, t ∈ [0, d(x, y)], L−1 |s − t| − C 6 d(γ(s), γ(t)) 6 L|s − t| + C. If we care about the constants we say that (X, d) is (L, C)-quasigeodesic, and if we do not care about the constant C we say that (X, d) is L-quasi-geodesic. If (X, d) is (1, 0)-quasi-geodesic then we say that X is geodesic. When considering integervalued metrics we make the same definitions restricting the intervals to intervals in Z. (2) A map f : (X, d) → (Y, d0 ) is bornologous if there exists an increasing map ρ+ : R+ → R+ such that for all x, y ∈ X, d0 ( f (x), f (y)) 6 ρ+ (d(x, y)). (3) (X, d) is said to be uniformly discrete if there exists a constant C > 0 such that for any x , y ∈ X, d(x, y) > C. (4) Two points x, y ∈ X are said to be s-close (with respect to the metric d) if d(x, y) 6 s. If x is s-close to y we write x ∼s y. 2.2. CAT(0) Cube Complexes. Before considering coarse median spaces, we first recall basic notions and results about CAT(0) cube complexes. We will survey the properties we need here, but guide the interested reader to [7, 10, 11, 14, 20] for more information. A cube complex is a polyhedral complex in which each cell is isometric to a unit Euclidean cube and the gluing maps are isometries. The dimension of the complex is the maximum of the dimensions of the cubes. For a cube complex X, we can associate it with the intrinsic pseudo-metric dint , which is the maximal pseudo-metric on X such that each cube embeds isometrically. When X is connected and has finite dimension, dint is a complete geodesic metric on X. See [7] for a general discussion on polyhedral complex and the associated intrinsic metric. A geodesic metric space is CAT(0) if all its geodesic triangles are slimmer than the comparative triangle in the Euclidean space. For a cube complex (X, dint ), Gromov gave a combinatorial characterisation of the CAT(0) condition [11]: X is CAT(0) if and only if it is simply connected and the link of each vertex is a flag complex (see also [7]). 6 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG We also consider the edge path metric d on the vertex set V of a CAT(0) cube complex. For x, y ∈ V, the interval is defined to be [x, y] = {z ∈ V : d(x, y) = d(x, z) + d(x, y)}, which consists of points on any edge path geodesic between x and y. A CAT(0) cubical complex X can be equipped with a set of hyperplanes [8, 14, 16, 20] such that each edge is crossed by exactly one hyperplane. Each hyperplane divides the space into two halfspaces, and the metric d counts the number of hyperplanes separating a pair of points. The dimension of X, if it is finite, is the maximal number of pairwise intersecting hyperplanes. We say that a subset is convex if it is an intersection of half spaces, and we can equivalently define the interval [x, y] to be the intersection of all the halfspaces containing both x and y. Another characterisation of the CAT(0) condition was obtained by Chepoi [10] (see also [19]): a flag cube complex X is CAT(0) if and only if for any x, y, z ∈ V, the intersection [x, y] ∩ [y, z] ∩ [z, x] consists of a single point µ(x, y, z), which is called the median of x, y, z. Obviously, m(x, y, z) ∈ [x, y], and [x, y] = {m(x, y, z) : z ∈ V} = {w ∈ V : m(x, y, w) = w} A graph such as X(1) satisfying this condition is called a median graph. Given a CAT(0) cube complex, we always take the canonical median structure (V, m) defined by intersection of intervals as above. The pair (V, m) is a median algebra [12], as defined in the following section. 2.3. Median Algebras. As discussed in [1], there are a number of equivalent formulations of the axioms for median algebras. We will use the following formulation from [13], see also [2]: Definition 2.2. Let X be a set and m a ternary operation on X. Then m is a median operator and the pair (X, m) is a median algebra if: (M1) Localisation: m(a, a, b) = a; (M2) Symmetry: m(a1 , a2 , a3 ) = m(aσ(1) , aσ(2) , aσ(3) ), where σ is any permutation of {1, 2, 3}; (M3) The 4-point condition: m(m(a, b, c), b, d) = m(a, b, m(c, b, d)). A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 7 Condition (M3) is illustrated by Figure 1, which shows the free median algebra generated by the 4 points a, b, c, d. As shown in the figure, the iterated medians on both sides of the equality in (M3) evaluate to the vertex adjacent to b. Example 2.3. An important example is furnished by the “median ncube”, denoted by In , which is the n-dimensional vector space over Z2 with the median operator µn given by majority vote on each coordinate. Definition 2.4. The rank of a median algebra (X, m) is the supremum of those n for which there is a subalgebra of (X, m) isomorphic to the median algebra (In , µn ). For the median algebra defined by the vertex set of a CAT(0) cube complex, the rank coincides with the dimension of the cube complex. For any points a, b ∈ X we define the interval between a, b to be [a, b] := {m(a, x, b) : x ∈ X}. Axioms (M1) ∼ (M3) ensure that [a, b] is also equal to the set {c ∈ X : m(a, c, b) = c}, since if c = m(a, b, x) then: m(c, a, b) = m(m(x, a, b), a, b) = m(x, m(a, b, a), b) = m(x, a, b) = c. We think of m(a, x, b) as the projection of x onto the interval [a, b], and axiom (M3) can be viewed as an associativity axiom: For each b ∈ X the binary operator (a, c) 7→ a ∗b c := m(a, b, c) is associative. It is also commutative by (M2) and iterated projection gives rise to the iterated median introduced in [21]. Definition 2.5 ([21]). Let (X, m) be a median algebra. For x1 ∈ X, define m(x1 ; b) := x1 , and for k > 1 and x1 , . . . , xk+1 ∈ X, define m(x1 , . . . , xk+1 ; b) := m(m(x1 , . . . , xk ; b), xk+1 , b). 8 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Note that this definition “agrees” with the original median operator m, since m(x1 , x2 ; b) = m(x1 , x2 , b). In the notation above, the definition reduces to: m(x1 , . . . , xk ; b) = x1 ∗b x2 ∗b . . . ∗b xk . A subset Y of A is said to be convex if m(x, b, y) ∈ Y for all x, y ∈ Y and b ∈ X, or equivalently, if it is closed under the binary operation ∗b for all b ∈ X. The set { m(x1 , . . . , xn ; b) | b ∈ X } is the convex hull of the points xi and we think of the iterated median m(x1 , . . . , xn ; b) as the projection of b onto the convex hull. We recall several properties of the iterated median operator proved in the original paper [21]. Lemma 2.6 ([21]). Let (X, m) be a median algebra, and x1 , . . . , xn , a, b ∈ X. Then: (1) The iterated median operator defined above is symmetric in x1 , . . . , xn ; n T (2) [xk , b] = [m(x1 , . . . , xn ; b), b]; k=1 (3) If, in addition, X has rank at most d, then there exists a subset {y1 , . . . , yk } ⊆ {x1 , . . . , xn } with k 6 d, such that m(y1 , . . . , yk ; b) = m(x1 , . . . , xn ; b); (4) Assume that x1 , . . . , xn ∈ [a, b], then {x1 , . . . , xn } ⊆ [a, m(x1 , . . . , xn ; b)]. We remark that condition (1) here follows immediately from the commutativity and associativity of the binary operator ∗b . We will also make use of the following “(n+2)-point condition”. Lemma 2.7. Let (X, m) be a median algebra and a, b, e1 , . . . , en+1 ∈ X, then m(a, en+1 , m(e1 , . . . , en ; b)) = m(m(a, en+1 , e1 ), . . . , m(a, en+1 , en ); b). Proof. We prove this by induction on n. A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 9 n = 1: the equation holds trivially. Assume it holds for all k 6 n. Then   m(a, en+1 , m(e1 , . . . , en ; b)) = m a, en+1 , m(m(e1 , . . . , en−1 ; b), en , b)   = m m(a, en+1 , m(e1 , . . . , en−1 ; b)), m(a, en+1 , en ), b   = m m(m(a, en+1 , e1 ), . . . , m(a, en+1 , en−1 ); b), m(a, en+1 , en ), b = m(m(a, en+1 , e1 ), . . . , m(a, en+1 , en ); b), where we use the inductive assumption in the third equation.  We now mention two alternative definitions for median algebras. According to Isbell [12], a ternary operator m defines a median if and only if it satisfies (M1), (M2) and Isbell’s condition: m(a, m(a, b, c), m(b, c, d)) = m(a, b, c). This says that m(a, b, c) is in the interval from a to m(b, c, d), or in geometrical terms that the projection of a onto [b, c] provided by the median lies between a and every other point (m(b, c, d)) of the interval [b, c]. An alternative and algebraically powerful formulation, is that (X, m) is a median algebra if it satisfies (M1), (M2) and the five point condition: m(m(a, b, c), d, e) = m(a, m(b, d, e), m(c, d, e)), which is the n = 3 case of Lemma 2.7. Setting e = b one recovers (M3), while m(a, m(d, b, c), (a, b, c)) = m(m(a, d, a), b, c) = m(a, b, c) recovering Isbell’s condition. 2.4. Coarse median spaces. In [5], Bowditch introduced coarse median operators as follows: Definition 2.8 (Bowditch, [5]). Given a metric space (X, d), a coarse median (operator) on X is a ternary operator µ : X3 → X satisfying the following conditions: 10 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG (C1). There is an affine function ρ(t) = Kt + H0 such that for any a, b, c, a0 , b0 , c0 ∈ X, d(µ(a, b, c), µ(a0 , b0 , c0 )) 6 ρ(d(a, a0 ) + d(b, b0 ) + d(c, c0 )). (C2). There is a function H : N → [0, +∞), such that for any finite subset A ⊆ X with 1 6 |A| 6 p, there exists a finite median algebra (Π, µΠ ) and maps π : A → Π, λ : Π → X such that for any x, y, z ∈ Π, a ∈ A, λµΠ (x, y, z) ∼H(p) µ(λx, λy, λz), and λπa ∼H(p) a. We may assume that Π is generated by π(A). We say that two coarse median operators µ1 , µ2 on a metric space (X, d) are uniformly close if there is a uniform bound on the set of distances {d(µ1 (a, b, c), µ2 (a, b, c)) | a, b, c ∈ X}. Remark 2.9. The control function ρ in (C1) is required by Bowditch to be affine, however it seems more natural in the context of coarse geometry to allow ρ to be an arbitrary function and indeed much of what we show in this paper works with that variation. This may allow wider applications in the future (in [15] we introduce and study such a generalisation in the context of coarse interval structures), though we note that when X is a quasi-geodesic space the existence of any control function ρ guarantees that ρ may be replaced by an affine control function as in (C1). In this paper we will assume that ρ is affine throughout, but note that many of the statements and arguments can be suitably adapted to the more general context. We refer to the functions ρ, H appearing in conditions (C1), (C2) as parameters of the coarse median, or since ρ has the form ρ(t) = Kt + H0 we will sometimes refer to K, H0 , H as parameters of the coarse median. The parameters are not unique, and neither are they A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 11 part of the data of the coarse median; it is merely their existence which is required. Remark 2.10. As noted by Bowditch there is a constant κ0 > 0 such that: • µ(a, a, b) ∼κ0 a; • µ(a1 , a2 , a3 ) ∼κ0 µ(aσ(1) , aσ(2) , aσ(3) ) for any permutation σ ∈ S3 . It follows that any coarse median operator on (X, d) may be replaced by another to which it is uniformly close and which satisfies the first two median axioms (M1) and (M2), i.e. we may always assume that κ0 = 0. We note here that this is true even if we replace the affine control function by an arbitrary ρ as discussed above, taking κ0 = 2ρ(3H(3)) + 2H(3). With this in mind we take the following as our definition of a coarse median space. Definition 2.11. A coarse median space is a triple (X, d, µ) where d is a metric on X and µ is a ternary operator on X satisfying conditions (M1), (M2), (C1) and (C2). A map f between coarse median spaces (X, dX , µX ), (Y, dY , µY ) is said to be an L-quasi-morphism if for any a, b, c ∈ X, µY ( f (a), f (b), f (c)) ∼L f (µX (a, b, c)). We note that given a median algebra any metric on this will satisfy axiom (C2), however the metric must be chosen carefully if we wish it to also satisfy axiom (C1). Of course in the case that the median algebra has finite intervals, and hence arises as the vertex set of a CAT(0) cube complex, then both the intrinsic and edge path metrics satisfy this axiom. 2.5. The rank of a coarse median space. Rank is a proxy for dimension in the context of coarse median spaces, directly analogous to the notion of dimension for a CAT(0) cube complex. Definition 2.12. Let n be a natural number. We say X has rank at most n if there exist parameters ρ, H for which we can always choose 12 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG the approximating median algebra Π in condition (C2) to have rank at most n. We remark that for a median algebra equipped with a suitable metric making it a coarse median space, the rank as a median algebra gives an upper bound for the rank as a coarse median space, however these need not agree. For example any finite median algebra has rank 0 as a coarse median space. Zeidler [23] showed that, at the cost of increasing the rank of the approximating median algebra, one can always assume that the map λπ from condition (C2) is the inclusion map ιA : A ,→ X. We will now show that this can be achieved without increasing the rank: Lemma 2.13. Assume (X, d, µ) is a coarse median space. Then, at the cost of changing the parameter function H, one can always change the triples Π, λ, π provided by axiom (C2), so that λπ = ιA : A ,→ X (the inclusion map), without changing the rank of Π. Proof. Given a finite subset A ⊆ X with 1 6 |A| 6 p, let the finite median algebra (Π, µΠ ) and maps π : A → Π, λ : Π → X be as in the definition above. We now construct another finite median algebra (Π0 , µ0Π ). As a set, Π0 = Π t A. Define a map τ : Π0 → Π by τx = x if x ∈ Π, and τa = πa if a ∈ A. Now define a median µ0Π on Π0 by: • µ0Π (a, a, x) = µ0Π (a, x, a) = µ0Π (x, a, a) = a, if a ∈ A and x ∈ Π0 ; • µ0Π (x, y, z) = µΠ (τx, τy, τz), otherwise. It is a direct calculation to check that µ0Π satisfies the axioms of a median operator. Now define π0 : A → Π0 by π0 a = a; and λ0 : Π0 = Π t A → X by λ0 = λ t ιA . For any x, y, z ∈ Π0 : if two of them are equal and sit in A, say x = y ∈ A, then λ0 µ0Π (x, y, z) = λ0 x = x = µ(λ0 x, λ0 y, λ0 z); otherwise, we have: λ0 µ0Π (x, y, z) = λ0 µΠ (τx, τy, τz) = λµΠ (τx, τy, τz) ∼H(p) µ(λ τx, λ τy, λ τz) ∼ρ(3H(p)) µ(λ0 x, λ0 y, λ0 z), 0 0 0 A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 13 where in the last estimate we use (C1) and the fact that for any x ∈ A, λ0 τx = λ0 πx = λπx ∼H(p) x = λ0 x. Now for any a ∈ A, λ0 π0 a = λ0 a = a, and by the construction, it is obvious that rank Π0 = rank Π. In conclusion we have constructed Π0 , λ0 , π0 such that λ0 π0 is the inclusion, Π0 has the same dimension as Π and λ0 µ0Π (x, y, z) ∼H0 (p) µ(λ0 x, λ0 y, λ0 z), where H0 : p 7→ ρ(3H(p)) + H(p).  According to the above lemma there is no loss of generality in assuming that the triples Π, λ, π provided by axiom (C2) satisfy the additional condition that λπ is the inclusion map. Hereafter we will assume that parameters ρ, H (or K, H0 , H) for a coarse median are chosen such that this holds. In the finite rank case we introduce the following terminology. Definition 2.14. For a coarse median space (X, d, µ), we say that rank X 6 n can be achieved under parameters H, ρ (or K, H0 , H) if one can always choose Π in condition (C2) with rank at most n and λπ = ιA : A ,→ X. By Lemma 2.13 there is no change to the definition of rank. 2.6. Iterated coarse medians. By analogy with the iterated medians defined in Section 2.3, we can define the iterated coarse median operator in a coarse median space. Definition 2.15. Let (X, d, µ) be a coarse median space and b ∈ X. For x1 ∈ X define µ(x1 ; b) := x1 , and for k > 1 and x1 , . . . , xk+1 ∈ X, define µ(x1 , . . . , xk+1 ; b) := µ(µ(x1 , . . . , xk ; b), xk+1 , b). Note that this definition “agrees” with the original coarse median operator µ in the sense that for any a, b, c in X, µ(a, b, c) = µ(a, b; c). 14 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG We extend the estimates provided by axioms (C1) and (C2) for a coarse median operator to hold more generally for the iterated coarse median operators as follows: Lemma 2.16. Let (X, d) be a metric space with ternary operator µ satisfying (C1) with parameter ρ. Then for any n there exists an increasing (affine) function ρn depending on ρ, such that for any a0 , a1 , . . . , an , b0 , b1 , . . . , bn ∈ X: n X  d(µ(a1 , . . . , an ; a0 ), µ(b1 , . . . , bn ; b0 )) 6 ρn d(ak , bk ) . k=0 Proof. We carry out induction on n. This is trivial for n = 1 with ρ1 (t) = t. Now consider the case n > 1 and assume that the result holds for n − 1: d(µ(a1 , . . . , an ; a0 ), µ(b1 , . . . , bn ; b0 ))   = d µ(µ(a1 , . . . , an−1 ; a), an , a0 ), µ(µ(b1 , . . . , bn−1 ; b), bn , b0 )   6 ρ d(µ(a1 , . . . , an−1 ; a0 ), µ(b1 , . . . , bn−1 ; b0 )) + d(an , bn ) + d(a0 , b0 ) n−1  X   6 ρ ρn−1 d(ak , bk ) + d(an , bn ) + d(a0 , b0 ) k=0 n n  X  X  6 ρ ρn−1 d(ak , bk ) + d(ak , bk ) k=0 = ρn n X k=0  d(ak , bk ) , k=0 where ρn (t) := ρ(ρn−1 (t) + t). We use (C1) in the third line, and the inductive assumption in the fourth. Note that as ρn−1 is increasing ρn is also increasing.  Recall that in Bowditch’s definition of a coarse median space axiom (C2) says that for any finite A ⊆ X with |A| 6 p, the approximation map σ : (Π, µΠ ) → (X, µ) is an H(p)-quasi-morphism, i.e. for any x, y, z ∈ Π, σµΠ (x, y, z) ∼H(p) µ(σx, σy, σz). A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 15 Lemma 2.17. Let (X, d) be a metric space with ternary operator µ satisfying (C1) with parameter ρ, (Π, µΠ ) a median algebra, and σ : Π → X an Lquasi-morphism. Then there exists a constant Hn (L) (depending on ρ) such that for any x1 , . . . , xn , b ∈ Π, σ(µΠ (x1 , . . . , xn ; b)) ∼Hn (L) µ(σ(x1 ), . . . , σ(xn ); σ(b)). Proof. We carry out induction on n. For the case n = 1, set H1 (L) = 0; and for the case n = 2, set H2 (L) = L. Now assume n > 2, for any x1 , . . . , xn , b ∈ Π, we have: σ(µΠ (x1 , . . . , xn−1 ; b)) ∼Hn−1 (L) µ(σ(x1 ), . . . , σ(xn−1 ); σ(b)). Then σ(µΠ (x1 , . . . , xn ; b)) = σ(µΠ (µΠ (x1 , . . . , xn−1 ; b), xn , b)) ∼L µ(σ(µΠ (x1 , . . . , xn−1 ; b)), σ(xn ), σ(b)) ∼ρ(Hn−1 (L)) µ(µ(σ(x1 ), . . . , σ(xn−1 ); σ(b)), σ(xn ), σ(b)) = µ(σ(x1 ), . . . , σ(xn ); σ(b)), where we use the definition of quasi-morphism in the second line, and (C1) as well as the inductive assumption in the third line. Finally, take Hn (L) = ρ(Hn−1 (L)) + L for n > 2.  Now we prove a coarse version of Lemma 2.7. Note that the case n = 1 is precisely the coarse analogue of the five point condition for a median algebra. Lemma 2.18. Let (X, d, µ) be a coarse median space with parameters ρ, H, then there exists a constant Cn depending on ρ, H such that for any a, b, e1 , . . . , en+1 ∈ X, µ(a, en+1 , µ(e1 , . . . , en ; b)) ∼Cn µ(µ(a, en+1 , e1 ), . . . , µ(a, en+1 , en ); b). Proof. We prove this by induction on n. The case n = 1 reduces to establishing a coarse analogue of the median algebra five point condition which was established in [5], specifically there is a constant κ5 = ρ(H(5)) + ρ(2H(5)) + 2H(5) 16 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG such that: ∀x, y, z, v, w ∈ X, µ(x, y, µ(z, v, w)) ∼κ5 µ(µ(x, y, z), µ(x, y, v), w). (1) So we can take C1 = κ5 . Now assume that n > 1 and the result holds for n − 1. Then   µ(a, en+1 , µ(e1 , . . . , en ; b)) = µ a, en+1 , µ(µ(e1 , . . . , en−1 ; b), en , b)   ∼κ5 µ µ(a, en+1 , µ(e1 , . . . , en−1 ; b)), µ(a, en+1 , en ), b   ∼ρ(Cn−1 ) µ µ(µ(a, en+1 , e1 ), . . . , µ(a, en+1 , en−1 ); b), µ(a, en+1 , en ), b = µ(µ(a, en+1 , e1 ), . . . , µ(a, en+1 , en ); b), where we use the inductive assumption in the third line. Set Cn = ρ(Cn−1 ) + κ5 and we are done.  We note that this result still holds if we replace the affine control function ρ by an arbitrary increasing control function. We conclude our consideration of iterated coarse medians with the following lemma. Lemma 2.19. Let (X, d, µ) be a coarse median space with parameters ρ, H, then there exists a constant Dn depending on ρ, H such that for any a, b, c, e1 , . . . , en ∈ X, µ(a, b, µ(e1 , . . . , en ; c)) ∼Dn µ(µ(a, b, e1 ), . . . , µ(a, b, en ); µ(a, b, c)). Proof. The proof is by induction; the case n = 1 is elementary setting D1 = 0. Now assume n > 1 and the lemma holds for n − 1. Then   µ(a, b, µ(e1 , . . . , en ; c)) = µ a, b, µ(µ(e1 , . . . , en−1 ; c), en , c)    ∼κ5 µ a, b, µ a, b, µ(µ(e1 , . . . , en−1 ; c), en , c)    ∼ρ(κ5 ) µ a, b, µ µ(a, b, µ(e1 , . . . , en−1 ; c), µ(a, b, en ), c)   ∼κ5 µ µ(a, b, µ(e1 , . . . , en−1 ; c), µ(a, b, µ(a, b, en )), µ(a, b, c)   ∼ρ(κ5 ) µ µ(a, b, µ(e1 , . . . , en−1 ; c), µ(a, b, en ), µ(a, b, c)   ∼ρ(Dn−1 ) µ µ(µ(a, b, e1 ), . . . , µ(a, b, en−1 ); µ(a, b, c)), µ(a, b, en ), µ(a, b, c) = µ(µ(a, b, e1 ), . . . , µ(a, b, en ); µ(a, b, c)) A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 17 where we use the inductive assumption in the sixth inequality. Set Dn = ρ(Dn−1 ) + 2ρ(κ5 ) + 2κ5 and we are done.  Again this result holds in the context of arbitrary control functions. 2.7. (Coarse) intervals. In CAT(0) cube complexes intervals play an important role, indeed the natural median is determined by the interval structure and vice versa. Similarly, in coarse median spaces, one needs to consider coarse analogues of intervals. Some of these were introduced by Bowditch [6]. Definition 2.20. Given (X, µ) a set equipped with a ternary operator µ, we define the interval between points x and z to be: [x, z] = {µ(x, y, z) : y ∈ X}. This should be contrasted with Bowditch’s definition, [6], of the λ-coarse interval between points x and z in a coarse median space (X, d, µ) as: [x, z]λ = {y ∈ X : µ(x, y, z) ∼λ y}. Clearly [x, z]0 ⊆ [x, z] and, as noted in Section 2.3, if (X, µ) is a median algebra then [x, z]0 = [x, z], however these two notions of interval do not always coincide in a coarse median space. An example is provided in Section 5. In a CAT(0) cube complex the median of three points is always the unique point in the intersection of the three intervals they define. Bowditch [6] showed the same result holds coarsely in a coarse median space. We adapt this to our notion of interval as follows (as usual the result works whether or not the control function is affine). Lemma 2.21. Let (X, d, µ) be a coarse median space with parameters ρ, H. Then for any x, y, z ∈ X, µ(x, y, z) ∈ [x, y]κ5 , i.e. [x, y] ⊆ [x, y]κ5 , where κ5 is the constant ρ(H(5)) + ρ(2H(5)) + 2H(5) defined above. In particular, µ(x, y, z) ∈ [x, y]κ5 ∩ [y, z]κ5 ∩ [x, z]κ5 . Note that generally, the coarse interval [a, b]κ5 is not closed under the coarse median µ. However, we can endow it with another coarse median µa,b such that [a, b]κ5 is closed under µa,b , and µa,b is uniformly closed to µ as follows: 18 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Lemma 2.22. Let (X, d, µ) be a coarse median space, and κ5 be as defined above. Then there exists a constant C > 0 depending on the chosen parameters ρ, H (and not on (X, d, µ) itself), such that for any a, b ∈ X and x, y, z ∈ [a, b]κ5 , µa,b (x, y, z) := µ(a, b, µ(x, y, z)) is C-close to µ(x, y, z). In conclusion, µa,b is indeed a coarse median on the coarse interval [a, b]κ5 , and µa,b is uniformly close to µ. The same result holds if we use [a, b] instead of [a, b]κ5 . Proof. In the above setting, we have µa,b (x, y, z) = µ(a, b, µ(x, y, z)) ∼κ5 µ(µ(a, b, x), µ(a, b, y), z) ∼ρ(2κ5 ) µ(x, y, z), where in the last estimate we use that fact that x, y ∈ [a, b]κ5 . Finally, µa,b (x, y, z) = µ(a, b, µ(x, y, z)) sits in [a, b] ⊆ [a, b]κ5 .  3. The 4-point condition defines a coarse median space A fundamental difficulty with verifying that a space satisfies Bowditch’s axioms is that one needs to establish approximations for subsets of arbitrary cardinality. Here we will provide an alternative characterisation of coarse median spaces, for which one need only consider subsets of cardinality up to 4. Applying the axioms (C1), (C2), it is not hard to show that there is a constant κ4 = 2ρ(H(4)) + 2H(4) such that in any coarse median space (X, d, µ) with parameters ρ, H, for any points a, b, c, d we have: µ(µ(a, b, c), b, d) ∼κ4 µ(a, b, µ(c, b, d)). This provides a coarse analogue of Kolibiar’s 4-point axiom (M3). We will provide the following converse: Theorem 3.1. Let (X, d) be a metric space, and µ : X3 → X a ternary operation. Then µ is a coarse median on (X, d) (i.e., it satisfies conditions (C1) and (C2)) if and only if the following three conditions hold: (C0)’ Coarse localisation and coarse symmetry: There is a constant κ0 such that for all points a1 , a2 , a3 in X, µ(a1 , a1 , a2 ) ∼κ0 a1 , and µ(aσ(1) , aσ(2) , aσ(3) ) ∼κ0 µ(a1 , a2 , a3 ) for any permutation σ of {1, 2, 3}; A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 19 (C1)’ Affine control: There exists an affine function ρ : [0, +∞) → [0, +∞) such that for all a, a0 , b, c ∈ X, d(µ(a, b, c), µ(a0 , b, c)) 6 ρ(d(a, a0 )); (C2)’ Coarse 4-point condition: There exists a constant κ4 > 0 such that for any a, b, c, d ∈ X, we have: µ(µ(a, b, c), b, d) ∼κ4 µ(a, b, µ(c, b, d)). We note that if we are interested in generalising coarse median spaces to allow arbitrary control functions then the affine control axiom (C1)’ should be replaced by the requirement that the map a 7→ µ(a, b, c) is bornologous uniformly in b, c. Free median algebras will play a crucial role in the proof and next we will give a concrete construction of the free median algebra on p points as a quotient of the space of formal ternary expressions on p variables. Under the name of formal median expressions these were originally introduced by Zeidler in [23]. Throughout this section, we fix an integer p > 0 and variables α1 , . . . , αp . 3.1. Formal ternary expressions and formal median identities. We introduce a model to define formal ternary expressions on the alphabet Ωp = {α1 , . . . , αp }. We introduce two additional symbols: ”h” e p = Ωp ∪ { h , i }. Let Ω e ? be the set of all finite and ”i”, and set Ω p e words in Ωp . Definition 3.2. Define Mp to be the unique smallest subset A in e ? containing Ωp and satisfying: for any ϕ1 , ϕ2 , ϕ3 ∈ A, we have Ω p hϕ1 ϕ2 ϕ3 i ∈ A. Elements in Mp are called formal ternary expressions in variables α1 , . . . , αp , or formal ternary expressions with p variables. Note that Mp carries a natural ternary operation: (ϕ1 , ϕ2 , ϕ3 ) 7→ hϕ1 ϕ2 ϕ3 i. Lemma 3.3. For any ϕ ∈ Mp \ Ωp , there exist unique ϕ1 , ϕ2 , ϕ3 ∈ Mp such that ϕ = hϕ1 ϕ2 ϕ3 i. 20 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Proof. Each word in Mp \ Ωp has the form hϕ1 ϕ2 ϕ3 i since otherwise we can delete the words not satisfying this condition to get a smaller set, which is a contradiction to the minimality of Mp . Now we claim: for any ϕ, ψ ∈ Mp , if ψ is a prefix of ϕ (i.e. there e ? such that ϕ = ψw), then they are equal. If exists a word w ∈ Ω p the claim holds then it follows that each ϕ ∈ Mp \ Ωp can be written uniquely in the form hϕ1 ϕ2 ϕ3 i. Indeed, assume ϕ = hϕ1 ϕ2 ϕ3 i = hψ1 ψ2 ψ3 i for ϕi , ψi ∈ Mp . Since ψ1 is a prefix of ϕ1 or vice versa, so by the claim, we have ψ1 = ϕ1 ; similarly, we have ψ2 = ϕ2 and ψ3 = ϕ3 . Now we prove the claim by induction on the word length of ϕ. The claim holds trivially for any ϕ of word length 1, i.e. ϕ ∈ Ωp . Assume that ϕ has word length n and that for any word of length less than n the claim holds. Suppose that ψ is a prefix of ϕ, and assume ψ = hψ1 ψ2 ψ3 i and ϕ = hϕ1 ϕ2 ϕ3 i for ϕi , ψi ∈ Mp . As ψ is a prefix of ϕ, we know ψ1 is a prefix of ϕ1 or vice versa. Inductively we have ψ1 = ϕ1 . Similarly, we have ψ2 = ϕ2 and ψ3 = ϕ3 , so ψ = ϕ, as required.  Definition 3.4. For each formal ternary expression ϕ ∈ Mp , we can associate a natural number ξ(ϕ) to it inductively as follows, which is called the complexity of ϕ: • If ϕ ∈ Ωp , i.e. ϕ = αi for some i, we define ξ(αi ) = 0; • Assume we have defined complexities for all the formal e ? ) less than ternary expressions with length (as a word in Ω p n > 1, then for ϕ with length n, by Lemma 3.3, there exists unique ϕ1 , ϕ2 , ϕ3 ∈ Mp such that ϕ = hϕ1 ϕ2 ϕ3 i. Since each ϕi has length less than n, ξ(ϕi ) has already been defined. Now we define the complexity ξ(ϕ) := max{ξ(ϕ1 ), ξ(ϕ2 ), ξ(ϕ3 )} + 1. Let Mp (n) ⊆ Mp be the set of all formal ternary expressions having complexity less than or equal to n, and Sp (n) = Mp (n) \ Mp (n − 1) be the set of all formal ternary expressions having complexity equal to n (set Sp (0) = Mp (0)). A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 21 Remark 3.5. It’s obvious by definition that ∞ ∞ G [ Sp (n), Mp (n) = Mp = n=0 n=0 and, by an easy inductive argument, Mp (n) is finite for each n. Lemma 3.3 says that for any formal ternary expression ϕ < Mp (0), there exist unique formal ternary expressions ϕ1 , ϕ2 , ϕ3 ∈ Mp with ξ(ϕi ) < ξ(ϕ) and ϕ = hϕ1 ϕ2 ϕ3 i. Lemma 3.6. Let Y be a set with ternary operation µ and Mp be the set of formal ternary expressions on the alphabet Ωp . Then any map Ωp → Y extends uniquely to a map of ternary algebras Mp → Y. Thus Mp is the free ternary algbera on p variables. Proof. Let y1 , . . . , yp ∈ Y be the images of the variables {α1 , . . . , αp } in Ωp . Given ϕ ∈ Mp we define an element ϕY (y1 , . . . , yp ) inductively as follows: (1) For ϕ = αi ∈ Mp (0), define ϕY (y1 , . . . , yp ) = yi ; (2) If ϕ = hϕ1 ϕ2 ϕ3 i ∈ Mp (n), n > 0, ϕ1 , ϕ2 , ϕ3 all lie in Mp (n − 1) and we define:   ϕY (y1 , . . . , yp ) = µ (ϕ1 )Y (y1 , . . . , yp ), (ϕ2 )Y (y1 , . . . , yp ), (ϕ3 )Y (y1 , . . . , yp ) . By construction the map ϕ 7→ ϕY (y1 , . . . , yp ) is a map of ternary algebras extending the map from Ωp to Y as required. Conversely, the condition that we have a map of ternary algebras extending the original map implies that ϕY must satisfy conditions 1 and 2 above yielding uniqueness.  Let Y be a set with ternary operation µ, and y1 , . . . , yp ∈ Y. Given a formal ternary expression ϕ on p variables, we define its evaluation at (y1 , . . . , yp ) to be the image ϕY (y1 , . . . , yp ) of ϕ provided by Lemma 3.6. We call the corresponding map ϕY : Yp → Y the realisation of ϕ. Given two formal ternary expressions ϕ, ψ ∈ Mp , we say that the equation ϕ = ψ is a formal median identity, if it holds in any median algebra. To be more precise, for any median algebra (Y, µ) and y1 , . . . , yp ∈ Y, we have: ϕY (y1 , . . . , yp ) = ψY (y1 , . . . , yp ). 22 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG It is easy to see that the axioms for a median operator immediately lead to the following formal median identities: ϕ = hϕϕψi, hϕ1 ϕ2 ϕ3 i = hϕσ(1) ϕσ(2) ϕσ(3) i, hhϕ1 ϕ2 ϕ3 iϕ2 ϕ4 i = hϕ1 ϕ2 hϕ3 ϕ2 ϕ4 ii, ∀ϕ, ψ ∈ Mp ; ∀ϕ1 , ϕ2 , ϕ3 ∈ Mp and σ ∈ S3 ; ∀ϕ1 , . . . , ϕ4 ∈ Mp . Two formal ternary expressions are said to be equivalent, written ϕ ∼med ψ, if ϕ = ψ is a formal median identity. Clearly this is an equivalence relation on Mp . Now suppose that ϕ1 = ψ1 , ϕ2 = ψ2 , ϕ3 = ψ3 are formal median identities. Then hϕ1 ϕ2 ϕ3 i = hψ1 ψ2 ψ3 i is also a formal median identity, so the ternary operator on Mp descends to a ternary operator on the quotient of Mp by the equivalence relation ∼med . Moreover this operator makes the quotient itself a median algebra as it now satisfies the median axioms. Given any other median algebra (Y, µ) and points y1 , . . . , yp ∈ Y the universal map of ternary algebras from Mp to Y factors through the quotient by definition of the formal median identities, so we have shown that: Lemma 3.7. The quotient Mp / ∼med is the free median algebra on p points. In the case of coarse median spaces the median identities will only hold up to bounded error. To quantify the errors we need to express the equivalence relation ∼med explicitly, which we do by describing it in terms of elementary transformations which admit metric control. 3.2. Elementary transformations. We define elementary transformations inductively as follows: • For ϕ ∈ Sp (0), the only allowed elementary transformations are of the form ϕ 7→ hϕϕψi for some ψ ∈ Mp ; • Suppose for elements in Mp (n − 1), we have defined all the allowed elementary transformations. For ϕ ∈ Sp (n) we define the allowed elementary transformations of ϕ as follows: Type I). ϕ 7→ hϕϕψi for any ψ in Mp ; if ϕ = hψψϕ0 i, then ϕ 7→ ψ; Type II). If ϕ = hϕ1 ϕ2 ϕ3 i, then ϕ 7→ hϕσ(1) ϕσ(2) ϕσ(3) i for some σ ∈ S3 ; A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 23 Type III). If ϕ = hhϕ1 ϕ2 ϕ3 iϕ2 ϕ4 i, then ϕ 7→ hϕ1 ϕ2 hϕ3 ϕ2 ϕ4 ii; or if ϕ = hϕ1 ϕ2 hϕ3 ϕ2 ϕ4 ii, then ϕ 7→ hhϕ1 ϕ2 ϕ3 iϕ2 ϕ4 i; Type IV). If ϕ = hϕ1 ϕ2 ϕ3 i, and ϕ01 is obtained from ϕ1 via an elementary transformation, then ϕ 7→ hϕ01 ϕ2 ϕ3 i (note that ϕ1 ∈ Mp (n − 1), so the elementary transformations of ϕ1 have already been defined). If ψ is obtained from ϕ by a single elementary transformation we write ϕ ∼ET ψ. It is easy to see that the relation ∼ET is symmetric, i.e. ϕ ∼ET ψ if and only if ψ ∼ET ϕ. 3.3. A construction for the free median algebra. Let ∼ be the transitive closure of ∼ET on the set Mp of formal ternary expressions. The closure of ∼ET is an equivalence relation; we denote the quotient set by Mp = Mp / ∼, and use [ϕ] to denote the equivalence class of ϕ in Mp . Furthermore, we define an induced ternary operator m on Mp as follows: m([ϕ1 ], [ϕ2 ], [ϕ3 ]) := [hϕ1 ϕ2 ϕ3 i] for ϕi ∈ Mp . We will show that (Mp , m) is the free median algebra generated by [α1 ], . . . , [αp ]. Lemma 3.8. m is a well-defined median operator on Mp . Proof. We need to check if ϕ1 ∼ ϕ01 , ϕ2 ∼ ϕ02 and ϕ3 ∼ ϕ03 , then hϕ1 ϕ2 ϕ3 i ∼ hϕ01 ϕ02 ϕ03 i. First suppose that ϕ1 ∼ET ϕ01 . Then hϕ1 ϕ2 ϕ3 i 7→ hϕ01 ϕ2 ϕ3 i is a type IV elementary transformation. More generally if ϕ ∼ ϕ01 then a sequence of type IV transformations will ensure that hϕ1 ϕ2 ϕ3 i ∼ hϕ01 ϕ2 ϕ3 i. Now in the same way, in addition using type II elementary transformations, we can show that hϕ01 ϕ2 ϕ3 i ∼ hϕ01 ϕ02 ϕ3 i ∼ hϕ01 ϕ02 ϕ03 i. Hence m is a well defined ternary operator on Mp . The fact that it is a median follows immediately by applying the elementary transformations to its definition.  Proposition 3.9. The median algebra (Mp , m) is the free median algebra generated by {[α1 ], . . . , [αp ]}. 24 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Proof. One only needs to check the universal property: for any median algebra (Y, ν) and any map f : Ωp → Y, there exists a unique median homomorphism f¯ : (Mp , m) → (Y, ν) extending f . Since Mp is the free ternary algebra on p points the map f extends uniquely to a map f˜ : Mp → Y. Explicitly f˜(ϕ) = ϕY ( f (α1 ), . . . , f (αp )). Now we define f¯([ϕ]) := f˜(ϕ), for any [ϕ] ∈ Mp . We need to check that this is a well-defined median homomorphism. Well-definedness: It suffices to show if ϕ1 ∼ET ϕ2 for two given formal median expressions, then f˜(ϕ1 ) = f˜(ϕ2 ). We do it via induction on ξ(ϕ1 ). If ξ(ϕ1 ) = 0, we know ϕ2 = hϕ1 ϕ1 ψi for some ψ ∈ Mp , which implies       f˜(ϕ1 ) = f (ϕ1 ) = ν f (ϕ1 ), f (ϕ1 ), f˜(ψ) = ν f˜(ϕ1 ), f˜(ϕ1 ), f˜(ψ) = f˜ hϕ1 ϕ1 ψi = f˜(ϕ2 ). If ϕ1 = hψ1 ψ2 ψ3 i with ξ(ψi ) < ξ(ϕ1 ), by the definition of elementary transformations, the proof is divided into four cases: • Type I) to III). One just needs to observe that these elementary transformations do not change elements in a median algebra. For example in the case of a Type III) elementary transformation, ψ1 will have the form ψ1 = hψ4 ψ2 ψ5 i for some ψ4 , ψ5 , so that ϕ1 = hhψ4 ψ2 ψ5 iψ2 ψ3 i, and ϕ2 will have the form ϕ2 = hψ4 ψ2 hψ5 ψ2 ψ3 ii. Then we have:   f˜(ϕ1 ) = ν f˜(hψ4 ψ2 ψ5 i), f˜(ψ2 ), f˜(ψ3 )   = ν ν( f˜(ψ4 ), f˜(ψ2 ), f˜(ψ5 )), f˜(ψ2 ), f˜(ψ3 )   = ν f˜(ψ4 ), f˜(ψ2 ), ν( f˜(ψ5 ), f˜(ψ2 ), f˜(ψ3 ))   = ν f˜(ψ4 ), f˜(ψ2 ), f˜(hψ5 ψ2 ψ3 i)   = f˜ hψ4 ψ2 hψ5 ψ2 ψ3 ii = f˜(ϕ2 ). Here the third equality follows axiom (M3) for a median algebra, while the other equalities all follow from the fact that f˜ is a map of ternary algebras. The elementary transformations of Type I) and Type II) can be checked similarly. A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 25 • Type IV). ψ01 is obtained from ψ1 via an elementary transformation and ϕ2 = hψ01 ψ2 ψ3 i: by induction one has f˜(ψ01 ) = f˜(ψ1 ), which implies     f˜(ϕ1 ) = ν f˜(ψ1 ), f˜(ψ2 ), f˜(ψ3 ) = ν f˜(ψ01 ), f˜(ψ2 ), f˜(ψ3 ) = f˜(ϕ2 ). Median homomorphism:   f¯ m([ϕ1 ], [ϕ2 ], [ϕ3 ]) = By construction, we have:     f¯ [hϕ1 ϕ2 ϕ3 i] = f˜ hϕ1 ϕ2 ϕ3 i     = ν f˜(ϕ1 ), f˜(ϕ2 ), f˜(ϕ3 ) = ν f¯([ϕ1 ]), f¯([ϕ2 ]), f¯([ϕ3 ]) . Uniqueness: This follows from the definition of Mp by an easy inductive argument.  As a direct corollary of the above construction, we have the following description for formal median identities. Corollary 3.10. Given ϕ, ψ ∈ Mp , then ϕ = ψ is a formal median identity if and only if ϕ ∼ ψ. Proof. Since Mp is a median algebra the equivalence relation ∼ must contain ∼med and the universal map from Mp / ∼med to the quotient Mp maps the class of ϕ to the class [ϕ]. Since Mp is also universal this map must be an isomorphism and the equivalence relations agree. Thus ϕ = ψ is a formal median identity if and only if ϕ ∼med ψ if and only if ϕ ∼ ψ.  In [23] Zeidler established that, while a given formal median identity does not have to hold for a coarse median operator, it does hold up to bounded error: for µ a coarse median on a metric space (X, d) with parameters ρ, H and ϕ = ψ a formal median identity, there exists a constant R = R(ρ, H, ϕ, ψ) such that for all x1 , . . . , xp ∈ X, ϕX (x1 , . . . , xp ) ∼R ψX (x1 , . . . , xp ). In order to prove Theorem 3.1 we need to establish this under our, a priori weaker, axioms (C0)0 ∼ (C2)0 . Proposition 3.11. Let (X, d) be a metric space with a ternary operator µ satisfying (C0)’ ∼ (C2)’ with parameters ρ, κ0 and κ4 . Let ϕ = ψ be 26 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG a formal median identity with p variables. Then there exists a constant R = R(ρ, κ0 , κ4 , ϕ, ψ), such that for any x1 , . . . , xp ∈ X, ϕX (x1 , . . . , xp ) ∼R ψX (x1 , . . . , xp ). We remark that if µ is a coarse median on a space (X, d) with parameters ρ, H, then (C0)’ ∼ (C2)’ hold with parameters ρ, κ0 , κ4 where κ0 , κ4 depend only on ρ and H(4), thereby recovering Zeidler’s result, but with the constant depending only on the parameters ρ, H(4). We also note that if we weaken the affine control in (C1)’ to a uniform bornology then the result remains true. Proof of 3.11. Since ρ, κ0 , κ4 are fixed throughout the proof, we will omit these parameters from the notation and write R(ϕ, ψ) in place of R(ρ, κ0 , κ4 , ϕ, ψ). By Corollary 3.10, we may choose a finite sequence of elementary transformations: ϕ = ψ0 ∼ET ψ1 ∼ET . . . ∼ET ψn = ψ. We will prove the result in the case that ϕ ∼ET ψ, the general case following from this by adding the constants. By definition, there are four cases: • Type I) and Type II): By (C0)’, we have ϕX ∼κ0 ψX so we choose R(ϕ, ψ) = κ0 ; • Type III). Assume ϕ = hhϕ1 ϕ2 ϕ3 iϕ2 ϕ4 i and ψ = hϕ1 ϕ2 hϕ3 ϕ2 ϕ4 ii. By (C2)’, we have:   ϕX = µ µ((ϕ1 )X , (ϕ2 )X , (ϕ3 )X ), (ϕ2 )X , (ϕ4 )X   ∼κ4 µ (ϕ1 )X , (ϕ2 )X , µ((ϕ3 )X , (ϕ2 )X , (ϕ4 )X ) = ψX , so we choose R(ϕ, ψ) = κ4 . • Type IV). Let ϕ, ψ ∈ Mp (n) and suppose that ϕ is equivalent to ψ by an elementary transformation of Type IV). Thus ϕ = hϕ1 ϕ2 ϕ3 i, ψ = hϕ01 ϕ2 ϕ3 i with ϕ1 , ϕ01 ∈ Mp (n−1) and ϕ1 ∼ET ϕ01 . If the latter is an elementary transformation of type I), II) or III) then we know that there is a constant R(ϕ1 , ϕ01 ) such that A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 27 (ϕ1 )X ∼R(ϕ1 ,ϕ01 ) (ϕ01 )X . Otherwise we have a further type IV) elementary transformation, and by induction on n we may again assume that (ϕ1 )X ∼R(ϕ1 ,ϕ01 ) (ϕ01 )X , the base case n = 0 being vacuous. By (C1)’, we have: ϕX = µ((ϕ1 )X , (ϕ2 )X , (ϕ3 )X ) ∼ρ(R(ϕ1 ,ϕ01 )) µ((ϕ01 )X , (ϕ2 )X , (ϕ3 )X ) = ψX and we set R(ϕ, ψ) = ρ(R(ϕ1 , ϕ01 )).  3.4. Proof of Theorem 3.1. We know that (C0)’ ∼ (C2)’ hold in a metric space (X, d) with a coarse median µ. Conversely we must prove that if (C0)’ ∼ (C2)’ hold then (C2) also holds, since (C1) follows easily from (C0)’ and (C1)’. For each p, we choose a splitting Mp → Mp of the quotient map Mp → Mp , such that [αi ] is lifted to αi . In other words, for each p and each element of Mp we choose a representative in Mp . In a median algebra, the median stabilisation of finitely many points is itself finite, [22, Lemma 6.20], so Mp is finite and thus the splittings provide finite subsets Θp of Mp . Now let A be a finite subset of X, with cardinality p, and enumerate the set A as A = {x1 , . . . , xp }. Define π : A → Mp by xi 7→ [αi ]. We consider the set of formal median identities of the form hϕ1 ϕ2 ϕ3 i = ψ where ϕ1 , ϕ2 , ϕ3 , ψ ∈ Θp . Since Θp is finite there are only finitely many of these. By Proposition 3.11 for each of these formal median identities there is a constant R, which does not depend on A, such that µ((ϕ1 )X , (ϕ2 )X , (ϕ3 )X ) ∼R ψX . Let Hp be an upper bound for the (finitely many) constants R arising from these identities. (Note moreover that the constant Hp does depend on the parameters ρ, κ0 , κ4 but not on the space X itself.) Now we define a map λ : Mp → X by [ϕ] 7→ (ϕ)X for ϕ ∈ Θp . By the above estimate for ϕ1 , ϕ2 , ϕ3 ∈ Θp , we have:       λ m([ϕ1 ], [ϕ2 ], [ϕ3 ]) = λ [hϕ1 ϕ2 ϕ3 i] ∼Hp µ (ϕ1 )X , (ϕ2 )X , (ϕ3 )X   = µ λ([ϕ1 ]), λ([ϕ2 ]), λ([ϕ3 ]) . Clearly, λπ is the inclusion A ,→ X, so we are done.  28 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG 4. Characterising rank in a coarse median space For a coarse median space the rank is determined by the dimensions of the approximating median algebras for its finite subsets. However, replacing Bowditch’s approximation axiom (C2) by our axiom (C2)’ controlling four point approximations, it is no longer sufficient to consider the dimensions of these: the free median algebra on four points has dimension 3 (see Figure 1) which clearly does not provide a universal bound on the rank. We begin by analysing the case of rank 1 coarse median spaces where we reprove Bowditch’s result that for geodesic spaces this implies hyperbolicity. We will do this directly, without recourse to the asymptotic cones that are an essential ingredient in Bowditch’s proof. We will then consider the general case, showing how to define “coarse cubes” in terms of the coarse median, showing that a coarse median space has rank at most n if and only if it cannot contain arbitrarily large (n + 1)− coarse cubes. 4.1. Rank 1 coarse median spaces. According to Bowditch [5], the class of geodesic coarse median spaces with rank 1 coincides with the class of geodesic δ-hyperbolic spaces. Given a geodesic hyperbolic space it is possible to construct a coarse median using the thinness of geodesic triangles; for the opposite direction Bowditch used the method of asymptotic cones. Here we give another more direct way to prove this. We will use the following characterisation of Gromov’s hyperbolicity for geodesic spaces, developed by Papasoglu and Pomroy, which asserts that for a geodesic metric space stability of quasigeodesics implies hyperbolicity. Theorem 4.1 ([17, 18, 9]). Let (X, d) be a geodesic metric space. Suppose there exists ε > 0, R > 0, such that for any a, b ∈ X, all (1, ε)quasi-geodesics from a to b remain in an R-neighbourhood of any geodesic connecting a, b. Then X is hyperbolic. We will prove that in a rank 1 geodesic coarse median space quasigeodesics are stable in the above sense. The key idea is to use coarse A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 29 intervals in place of the geodesics connecting a and b. We will prove the following: Theorem 4.2. Let (X, d, µ) be a geodesic coarse median space with rank e = D(ζ, e ε), such that for any 1. For any ζ, ε > 0, there exists a constant D a, b ∈ X and any (ζ, ε)-quasi-geodesic γ : [s, t] → X connecting a and b, e the Hausdorff distance between [a, b] and Im(γ) is less than D. Applying Theorem 4.1 we obtain the following corollary. Corollary 4.3. Let (X, d, µ) be a geodesic coarse median space with rank 1. Then (X, d) is hyperbolic. Proof. According to Theorem 4.2, any (1, ε) quasi-geodesic is within e of the interval [a, b]. In particular any geodesic Hausdorff distance D e of the interval. We now from a to b is within Hausdorff distance D e apply Theorem 4.1 with R = 2D.  We will also give a characterisation of rank 1 coarse median spaces in terms of the geometry of intervals. Note that here we do not require the space to be (quasi)-geodesic. Theorem 4.4. Let (X, d, µ) be a coarse median space. Then X has rank at most 1 if and only if there exists a constant λ such that for any a, b, x ∈ X with x ∈ [a, b], we have: (2) [a, b] ⊆ Nλ ([a, x]) ∪ Nλ ([x, b]). We regard the inclusion (2) as an analog of Gromov’s thin triangles condition for coarse intervals, and begin by proving that, moreover, in a rank 1 space an analogous condition holds for neighbourhoods of intervals. Lemma 4.5. Let (X, d, µ) be a coarse median space with rank 1 achieved under parameters ρ, H. Then for any ζ > 0, there exists a constant ζ0 = 2H(4) + ζ such that for any a, b, c ∈ X, we have: Nζ ([a, b]) ⊆ Nζ0 ([a, c]) ∪ Nζ0 ([c, b]). Proof. For any y ∈ Nζ ([a, b]), there exists some x ∈ X, such that µ(a, b, x) ∼ζ y, and we set A = {a, b, c, x}. By Definition 2.11 and 30 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Definition 2.14 there exists a finite rank 1 median algebra (Π, µΠ ) (i.e., a tree) and maps π : A → Π, λ : Π → X satisfying the conditions in (C2); furthermore λ ◦ π is the inclusion A ,→ X. Denote π(a), π(b), π(c), π(x) by a, b, c, x respectively. Set m = µΠ (a, b, x), then µΠ (a, b, m) = m. Since Π is a tree, we have: µΠ (a, c, m) = m or µΠ (b, c, m) = m. Without loss of generality, assume the former, so λ(m) = λ(µΠ (a, c, m)) ∼H(4) µ(a, c, λ(m)). On the other hand, by the definition of m, we have: λ(m) = λ(µΠ (a, b, x)) ∼H(4) µ(a, b, x) ∼ζ y. Combine the above two estimates: y ∼2H(4)+ζ µ(a, c, λ(m)), which implies y ∈ N2H(4)+ζ ([a, c]). Finally, take ζ0 = 2H(4) + ζ, then the lemma holds.  Recall that in a hyperbolic space, any point on a geodesic from a to b sits logarithmically far, with respect to path-length, from any path connecting a and b. The analogous statement holds for rank 1 spaces, if one replaces geodesics with intervals: Proposition 4.6. Let (X, d, µ) be a geodesic coarse median space with rank 1, γ a rectifiable path in X connecting a, b ∈ X and `(γ) the length of γ, then there exist constants C1 , C2 such that [a, b] ⊆ NC1 log2 `(γ)+C2 (Im γ). Proof. Let K, H0 , H be parameters of (X, d, µ) under which rank X 6 1 can be achieved. Without loss of generality we will assume that γ has been reparameterised to have unit speed. At the cost of varying the constants C1 , C2 we can simplify the argument, again without loss of generality, and assume `(γ) = 2N for some integer N. We will argue by induction on N. A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 31 N = 0: `(γ) = 1, which implies d(a, b) 6 1. For any c ∈ [a, b], there exists some x ∈ X such that c = µ(a, b, x). Now by axiom (C1), we have: c = µ(a, b, x) ∼K+H0 µ(a, a, x) = a, which implies c ∈ B(a, K + H0 ). So [a, b] ⊆ NK+H0 (γ) for `(γ) = 1. We set s1 = K + H0 . Induction step: Assume that we have established that for all pairs a, b ∈ X and rectifiable paths γ0 connecting them of length 2N−1 , there is a constant sN−1 such that [a, b] ⊆ NsN−1 (Im γ0 ). Now consider a path γ of `(γ) = 2N joining a to b. We will denote the midpoint of γ by c = γ(2N−1 ). By Lemma 4.5, we have: [a, b] ⊆ N2H(4) ([a, c]) ∪ N2H(4) ([c, b]). By our inductive hypothesis, we have: [a, c] ⊆ NsN−1 (γ([0, 2N−1 ])) and [c, b] ⊆ NsN−1 (γ([2N−1 , 2N ])), which implies [a, b] ⊆ N2H(4) ([a, c]) ∪ N2H(4) ([c, b]) ⊆ NsN−1 +2H(4) (Im γ), i.e. we can take sN = sN−1 + 2H(4), in other words, sN = K + H0 + (N − 1) · 2H(4). In conclusion, take C1 = 2H(4) and C2 = K + H0 − 2H(4), we have [a, b] ⊆ NC1 log2 `(γ)+C2 (Im γ).  As in the hyperbolic case, we need the following lemma to tame quasi-geodesics, replacing an arbitrary quasi-geodesic by a rectifiable quasi-geodesic close to the original. Lemma 4.7 ([7]). Let (X, d) be a geodesic metric space. Given any (ζ, ε)quasi-geodesic γ : [s, t] → X, one can find a continuous (ζ, ε0 )-quasigeodesic γ0 : [s, t] → X such that 1) γ(s) = γ0 (s), γ(t) = γ0 (t); 2) ε0 = 2(ζ + ε); 3) `(γ0 |[s0 ,t0 ] ) 6 k1 d(γ0 (s0 ), γ0 (t0 ))+k2 for all s0 , t0 ∈ [s, t], where k1 = ζ(ζ+ε) and k2 = (ζε0 + 3)(ζ + ε); 4) the Hausdorff distance between Imγ and Imγ0 is less than ζ + ε. We also need the following two lemmas which hold trivially in the median case. Recall in a coarse median space with given parameters ρ, H, we defined the constant κ5 = ρ(H(5)) + ρ(2H(5)) + 2H(5). 32 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Lemma 4.8. Let (X, d, µ) be a coarse median space with parameters ρ, H. Then there exists a constant C = ρ(κ5 ) + κ5 such that for all a, b ∈ X, x ∈ [a, b], y ∈ [a, x] and z ∈ [x, b], we have x ∈ NC ([y, z]). Proof. By definition there exist w, v, v0 ∈ X such that x = µ(a, w, b), y = µ(a, v, x) and z = µ(x, v0 , b). Now µ(y, w, b) = µ(µ(a, v, x), w, b) ∼κ5 µ(µ(a, w, b), µ(v, w, b), x) = µ(x, µ(v, w, b), x) = x, which implies µ(y, w, z) = µ(y, w, µ(x, v0 , b)) ∼ρ(κ5 ) µ(x, µ(y, w, v0 ), x) ∼κ5 = µ(x, µ(y, w, v0 ), µ(y, w, b)) x. In other words, x ∈ Nρ(κ5 )+κ5 ({µ(y, w, z)}) ⊂ Nρ(κ5 )+κ5 ([y, z]). Take C = ρ(κ5 ) + κ5 and the result holds.  The next lemma generalises Lemma 2.22 to the context of coarse neighbourhoods of intervals Nλ ([a, b]). Lemma 4.9. Let (X, d, µ) be a coarse median space with parameters ρ, H, let λ be a positive constant and a, b be points in X. Then x ∈ Nλ ([a, b]) implies that µ(a, b, x) ∼ρ(λ)+λ+κ5 x. Proof. By definition, x ∼λ x0 ∈ [a, b], which implies there exists z ∈ X such that x0 = µ(a, b, z). So µ(a, b, x) ∼ρ(λ) µ(a, b, µ(a, b, z)) ∼κ5 µ(a, b, z) = x0 ∼λ x.  Proof of Theorem 4.2. Take a (ζ, ε)-quasi-geodesic connecting points a and b. By Lemma 4.7, we may, at the cost of moving the quasigeodesic at most ζ + ε, obtain a (ζ, ε)-quasi-geodesic γ which is continuous and such that there exist constants k1 and k2 depending only on ζ, ε, such that for any s0 , t0 ∈ [s, t], `(γ|[s0 ,t0 ] ) 6 k1 d(γ(s0 ), γ(t0 )) + k2 . Let K, H0 , H be parameters of (X, d, µ) under which rank X 6 1 can be achieved. We will first show that the interval [a, b] sits within a uniformly bounded neighbourhood of γ. A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 33 Let D = sup{d(x, Imγ) : x ∈ [a, b]}, which is finite since it is bounded by sup{d(x, a) | x ∈ [a, b]} ≤ Kd(a, b) + H0 . Indeed for x = µ(a, b, c) ∈ [a, b], we have x = µ(a, b, c) ∼Kd(a,b)+H0 µ(a, a, c) = a. Let x0 be a point in [a, b] such that d(x0 , Im γ) > D − 1. We have µ(a, b, x0 ) ∼κ5 x0 by Lemma 2.21. Now if y ∈ [a, x0 ] then y = µ(x0 , a, z) for some z ∈ X, so µ(b, a, y) = µ(b, a, µ(x0 , a, z)) ∼κ4 µ(µ(b, a, x0 ), a, z) ∼Kκ5 +H0 µ(x0 , a, z) = y. Hence y ∈ Nλ ([a, b]) where λ = Kκ5 + κ4 + H0 . Claim: If d(x0 , a) > 2D + λ, then there exists some y ∈ [x0 , a] such that 2D + λ 6 d(x0 , y) 6 2D + λ + K + H0 . Proof of Claim: First take a geodesic γ0 : [0, d(x0 , a)] → X from x0 to a. We will approximate γ0 by a discrete geodesic as follows. Let xi = γ0 (i) for i = 0, . . . , k = bd(a, x0 )c and let yi denote the projection of xi into the interval [x0 , a], i.e., yi = µ(a, xi , x0 ). Then for each i, d(yi , yi+1 ) 6 K + H0 . If d(y j , x0 ) > 2D + λ, for some j then let i be the first j for which this occurs and set y = yi . Since d(yi−1 , x0 ) < 2D + λ and d(xi−1 , xi ) = 1 we have d(x0 , y) = d(x0 , yi ) < 2D + λ + K + H0 . Otherwise set y = a and note that d(yk , x0 ) 6 2D+λ so again d(x0 , y) = d(x0 , a) 6 2D + λ + K + H0 . This completes the proof of the claim. As shown above y ∈ Nλ ([a, b]), so we can find a point y0 ∈ [a, b] such that d(y0 , y) 6 λ. Hence by the claim, we have 2D 6 d(y0 , x0 ) 6 2D + 2λ + K + H0 . If on the other hand d(x0 , a) < 2D + λ, then we take y = y0 = a and we have D − 1 < d(y0 , x0 ) 6 2D + λ. Repeating the argument with b in place of a, we can find points z ∈ [x0 , b], z0 ∈ [a, b] with: 2D + λ 6 d(x0 , z) 6 2D + λ + K + H0 and d(z, z0 ) 6 λ if d(x0 , b) > 2D+λ; z = z0 = b with D−1 < d(z0 , x0 ) 6 2D+λ otherwise. If y0 = a then we set y00 = a, otherwise by the definition of D, there exists a point y00 ∈ Imγ such that d(y00 , y0 ) 6 D, and we can choose a geodesic segment α from y0 to y00 . Similarly if z0 = b then we set 34 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG z00 = b, otherwise there exists a point z00 ∈ Imγ such that d(z00 , z0 ) 6 D, and we choose a geodesic segment β from z00 to z0 . Now consider the path ϑ from y0 to z0 that transverses α then follows γ from y00 to z00 , then transverses β from z00 to z0 , see Figure 3. We have: d(y00 , z00 ) 6 d(y00 , y0 ) + d(y0 , x0 ) + d(x0 , z0 ) + d(z0 , z00 ) 6 2D + 2 · (2D + 2λ + K + H0 ) = 6D + 4λ + 2(K + H0 ), which implies, by Lemma 4.7, that `(ϑ) 6 2D + k1 · (6D + 4λ + 2(K + H0 )) + k2 = (6k1 + 2)D + 2k1 (2λ + K + H0 ) + k2 . Figure 3. Construction of ϑ Independent of our choice of the points y00 , z00 , the distance from x0 to any point on γ is at least D − 1. If y0 = a then we have set y00 = y0 , so the distance from x0 to the (only) geodesic arc from y0 to y00 = y0 is d(x0 , a) > D − 1. If on the other hand y0 , a, then by hypothesis d(x0 , y0 ) > 2D, while d(y0 , y00 ) 6 D so the distance from x0 to the chosen geodesic arc from y0 to y00 must be at least D. A similar argument shows that the distance from x0 to the chosen geodesic arc from z00 to z0 must be at least D as well, so that d(x0 , Imϑ) > D − 1. We would like to use Proposition 4.6 to obtain an upper bound for D, but x0 might not sit inside [y0 , z0 ]. However, by Lemma A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 35 4.8, we know there exists a constant C such that x0 ∈ NC ([y, z]), which implies there is a point µ(y, z, w) ∈ [y, z] which is C-close to x0 . Now µ(y, z, w) ∼2Kλ+H0 µ(y0 , z0 , w) ∈ [y0 , z0 ] by axiom (C1). Set x0 = µ(y0 , z0 , w) and C0 = C + 2Kλ + H0 so that x0 ∼C0 x0 ∈ [y0 , z0 ]. Hence by Proposition 4.6, D − 1 < d(x0 , Imϑ) 6 d(x0 , Imϑ) + C0 6 C1 log2 `(ϑ) + C2 + C0 6 C1 log2 ((6k1 + 2)D + 2k1 (2λ + K + H0 ) + k2 ) + C2 + C0 . The right hand side of the inequalities grows logarithmically fast with respect to D, hence there exists some constant D0 = D0 (ζ, ε) such that D 6 D0 . In other words, [a, b] ⊆ ND0 (Imγ). Now we will show that the quasi-geodesic γ sits within a uniformly bounded neighbourhood of the interval [a, b]. Assume there exists some point x0 ∈ Imγ such that d(x0 , [a, b]) > D0 . Take a maximal non-empty subinterval (s1 , t1 ) ⊆ [s, t] such that γ|(s1 ,t1 ) sits outside ND0 ([a, b]). As in the first part of the proof, pick a discrete geodesic a = x0 , x1 , . . . , xn = b from a to b and set yi = µ(a, b, xi ). For each i, yi ∈ [a, b] and the distance d(yi , Im γ) 6 D0 . So either d(yi , Imγ|[s,s1 ] ) 6 D0 or d(yi , Imγ|[t1 ,t] ) 6 D0 . Note that d(y0 , Imγ|[s,s1 ] ) 6 D0 and d(yn , Imγ|[t1 ,t] ) 6 D0 . Take the first i satisfying d(yi , Imγ|[s,s1 ] ) 6 D0 and d(yi+1 , Imγ|[t1 ,t] ) 6 D0 , and set w = yi . Then it follows that there exists s01 ∈ [s, s1 ] and t01 ∈ [t1 , t] such that d(w, γ(s01 )) 6 D0 , d(w, γ(t01 )) 6 D0 + H0 + K, which implies d(γ(s01 ), γ(t01 )) 6 2D0 + H0 + K. Since γ is assumed to be tame we have `(γ|[s01 ,t01 ] ) 6 2k1 (D0 +H0 +K)+k2 , which implies `(γ|[s1 ,t1 ] ) 6 k1 (2D0 + H0 + K) + k2 . So we have Imγ ⊆ e = k1 (2D0 + H0 + K) + k2 + D0 + Nk1 (2D0 +H0 +K)+k2 +D0 ([a, b]). Finally, take D ζ + ε, then the Hausdorff distance between [a, b] and the original e (ζ, ε)-quasi-geodesic is controlled by D.  In our proof of Theorem 4.4 we will make use of the following generalisation of Zeidler’s parallel edge lemma, [23, Lemma 2.4.5]. The proof in this more general context is more or less identical, and is therefore omitted. Lemma 4.10. Let (X, d) be a metric space with a ternary operator µ satisfying the weak form of axiom (C1) with (arbitrary) control parameter ρ. 36 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Let C be a CAT(0) cube complex, and f : (C(0) , µC ) → (X, µ) an L-quasimorphism, then for any parallel edges (x, y), (x0 , y0 ) in C, we have d( f (x0 ), f (y0 )) 6 ρ(d( f (x), f (y))) + 2L.  Proof of Theorem 4.4. Necessity is a special case of Lemma 4.5, so we just need to show sufficiency. Let ρ, H be parameters of (X, d, µ). By definition and Lemma 2.13 for any p ∈ N and A ⊆ X with |A| = p, there exists a finite median algebra (Π, µΠ ), and maps π : A → Π, σ : Π → X satisfying axioms (C1), (C2), hπ(A)i = Π and σπ = iA . Denote the associated finite CAT(0) cube complex also by Π. Now we want to modify Π, π, σ so that Π has dimension 1. If dim Π = 1, nothing needs to be modified. Assume dim Π > 2, i.e. there exists a 2-square ā, b̄, c̄, d¯ in Π. To be more explicit, assume ¯ by a, b, c, d. ā is connected to b̄ and c̄ in Π. Denote σ(ā), σ(b̄), σ(c̄), σ(d) By axiom (C2), we have: ¯ ∼H(p) σ(µ(ā, b̄, d)) ¯ = σ(b̄) = b. b0 := µ(a, b, d) = µ(σ(ā), σ(b̄), σ(d)) Similarly, c0 := µ(a, c, d) ∼H(p) c. Since b0 = µ(a, b, d) ∈ [a, d], by assumption, there exists a constant λ such that [a, d] ⊆ Nλ ([a, b0 ]) ∪ Nλ ([b0 , d]). Now since c0 ∈ [a, d], without loss of generality, we can assume that c0 ∈ Nλ ([a, b0 ]), which implies c0 ∼ρ(λ)+λ+κ5 µ(a, b0 , c0 ) by Lemma 4.9. So c ∼H(p) µ(a, c, d) ∼ρ(λ)+λ+κ5 µ(a, µ(a, b, d), µ(a, c, d)) ∼κ5 µ(a, d, µ(a, b, c)). On the other hand, µ(a, b, c) = µ(σ(ā), σ(b̄), σ(c̄)) ∼H(p) σ(µ(ā, b̄, c̄)) = a, so µ(a, d, µ(a, b, c)) ∼ρ(H(p)) µ(a, d, a) = a. To sum up, we showed c is [ρ(H(p)) + ρ(λ) + H(p) + λ + 2κ5 )]-close to a. For brevity, if we take α0 (t) = ρ(t) + t + ρ(λ) + λ + 2κ5 , then c is α0 (H(p))-close to a. By Lemma 4.10, we obtain another function α(t) = ρ(α0 (t))+2t such that for any edge (x̄, ȳ) in Π parallel to (ā, c̄), σ(x̄) is α(H(p))-close to σ( ȳ). Note that the function α(t) = ρ(α0 (t)) + 2t = ρ(ρ(t) + t + ρ(λ) + λ + 2κ5 ) + 2t A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 37 depends only on ρ, κ5 , λ. In particular it does not depend on the set A. Now consider the quotient CAT(0) cube complex Π0 of Π determined by all the hyperplanes except the hyperplane h crossing (ā, c̄) (see [8, 16]). Let pr : Π → Π0 be the natural projection, and choose a section s : Π0 → Π, i.e. pr ◦ s = idΠ0 . For any vertex v̄ not adjacent to h we have s◦pr(v̄) = v̄, while if v̄ is adjacent to h then either s◦pr(v̄) = v̄ or there is an edge crossing h joining s ◦ pr(v̄), v̄. The map s is not uniquely determined, but for s, s0 two different sections, according to the analysis above the compositions σ ◦ s, σ ◦ s0 are α(H(p))-close. Now consider the diagram ; XO σ Π j s 0 pr * Πc π i A and take π0 = pr ◦ π, σ0 = σ ◦ s. We have σ0 ◦ π0 ∼α(H(p)) iA , and for any x0 , y0 , z0 ∈ Π0 , we want to estimate the distance between σ0 (µΠ0 (x0 , y0 , z0 )) and µ(σ0 (x0 ), σ0 (y0 ), σ0 (z0 )). Claim. µΠ0 (x0 , y0 , z0 ) = pr(s(µΠ0 (x0 , y0 , z0 ))) = pr(µΠ (s(x0 ), s(y0 ), s(z0 ))). Indeed, by the construction of Π0 , for any hyperplane h0 , h of Π and ū, v̄ ∈ Π, h0 separates ū, v̄ if and only if h0 , as a hyperplane of Π0 , separates pr(ū), pr(v̄). Now assume that (3) pr(s(µΠ0 (x0 , y0 , z0 ))) , pr(µΠ (s(x0 ), s(y0 ), s(z0 ))), then there exists a hyperplane h0 of Π0 such that h0 separates pr(s(µΠ0 (x0 , y0 , z0 ))) and pr(µΠ (s(x0 ), s(y0 ), s(z0 ))), which implies h0 , as a hyperplane of Π rather than h, separates s(µΠ0 (x0 , y0 , z0 )) and µΠ (s(x0 ), s(y0 ), s(z0 )). We select a vertex v̄0 ∈ Π such that s ◦ pr(v̄0 ) = v̄0 and let h0+ denote the half space corresponding to the hyperplane h0 containing v̄0 and h0− the complementary halfspace. In Π0 we will abuse notation and also denote by h0+ the halfspace containing pr(v̄0 ). This ambiguity is tolerated since the points will tell us which space we are focusing on. It follows that s(h0+ ) ⊆ h0+ and s(h0− ) ⊆ h0− . At least two of 38 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG any three points must lie in the same half space corresponding to a given hyperplane h0 , so without loss of generality we can assume s(x0 ), s(y0 ) ∈ h0+ , which implies µΠ (s(x0 ), s(y0 ), s(z0 )) ∈ h0+ ; on the other hand, according to the choice of orientation, we have x0 , y0 ∈ h0+ , which implies µΠ0 (x0 , y0 , z0 ) ∈ h0+ , so s(µΠ0 (x0 , y0 , z0 )) ∈ h0+ . This is a contradiction to our assumption (3), hence the claim is proved. Returning to the proof we have pr(s(µΠ0 (x0 , y0 , z0 ))) = pr(µΠ (s(x0 ), s(y0 ), s(z0 ))), so either the two points s(µΠ0 (x0 , y0 , z0 )), µΠ (s(x0 ), s(y0 ), s(z0 )) are equal, or, by the analysis above, they are joined by an edge crossing h in Π. It follows that σ(s(µΠ0 (x0 , y0 , z0 ))) ∼α(H(p)) σ(µΠ (s(x0 ), s(y0 ), s(z0 ))). Now for any x0 , y0 , z0 , we have: σ0 (µΠ0 (x0 , y0 , z0 )) = σ(s(µΠ0 (x0 , y0 , z0 ))) ∼α(H(p)) ∼H(p) µ(σ(s(x0 )), σ(s(y0 )), σ(s(z0 ))) σ(µΠ (s(x0 ), s(y0 ), s(z0 ))) = µ(σ0 (x0 ), σ0 (y0 ), σ0 (z0 )), which means if we take H0 (p) = β(H(p)) where β(t) = α(t) + t, then σ0 (µΠ0 (x0 , y0 , z0 )) ∼H0 (p) µ(σ0 (x0 ), σ0 (y0 ), σ0 (z0 )). To sum up, if we have a 2-square in the original approximation (Π, π, σ), then we can replace it by another approximation (Π0 , π0 , σ0 ). The controlling parameter H0 (p) = β(H(p)) for the new approximation depends only on the original parameters H(p), ρ, κ5 and the constant λ. Since a CAT(0) cube complex generated by p vertices has at most 2p hyperplanes we can iterate this process at most 2p times to remove all squares, ending with a new approximating tree Π0 with controlling parameter p H0 (p) = β2 (H(p)) where the function β defined above only depends on ρ, κ5 and the constant λ. This process defines a parameter H0 for which the approximating median algebras required by axiom (C2) can always be taken to be trees. Hence our space has rank 1 with parameters ρ, H0 .  A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 39 4.2. Higher rank spaces. In the proof above we deduced that the space X satisfying the thin interval triangles condition (2) cannot possess arbitrary large “coarse squares”. More explicitly, for a “coarse square” a, b, c, d as in the proof, we showed that at least one of its parallel edge pairs must have bounded length. This intermediate result is crucial in our analysis of higher rank spaces, and it is exactly the rank 1 case of our general characterisation of rank. Intuitively, our characterisation states that a coarse median space has rank at most n if and only if it does not contain arbitrarily large (n + 1)-dimensional “coarse cubes”. Theorem 4.11. Let (X, d, µ) be a coarse median space and n ∈ N. Then the following conditions are equivalent. (1) rank X 6 n; (2) For any λ > 0, there exists a constant C = C(λ) such that for any a, b ∈ X, any e1 , . . . , en+1 ∈ [a, b] with µ(ei , a, e j ) ∼λ a for all i , j, there exists i such that ei ∼C a; (3) For any L > 0, there exists a constant C = C(L) such that for any L-quasi-morphism σ from the median n-cube In+1 to X, there exist adjacent points x, y ∈ In+1 such that σ(x) ∼C σ(y). In condition (2) of the above theorem, one should imagine a as a corner of an (n + 1)-“coarse cube”, and e1 , . . . , en+1 as endpoints of edges adjacent to a. Proof of Theorem 4.11. (1) ⇒ (2): Let ρ, H be parameters of (X, d, µ) under which rank X 6 n can be achieved. Given λ > 0, a, b ∈ X and e1 , . . . , en+1 ∈ [a, b] with µ(ei , a, e j ) ∼λ a (i , j), we set A = {a, b, e1 , . . . , en+1 }. By axiom C2, there exists a finite rank n median algebra Π, and maps π : A → Π and σ : Π → X satisfying the conditions in C2 and σ ◦ π = iA . Denote π(a), π(b), π(ei ) by ā, b̄, ēi . According to Lemma 2.22, without loss of generality, we can always take Π = [ā, b̄] after changing the parameters within some controlled 40 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG bounds if necessary. To make it clear, consider the following diagram: ; XO σ inclusion [ā, b̄] l µΠ (ā,b̄,·) * Πc π i A. Define π : A → [ā, b̄] by x 7→ µΠ (ā, b̄, πx), and σ0 : [ā, b̄] → X by c̄ 7→ σ(c̄). Note that σ0 ◦ π0 (ei ) = σ(µΠ (ā, b̄, ēi )) ∼H(n+3) µ(a, b, ei ) ∼κ5 ei , since ei ∈ [a, b]. For convenience, we still write π, σ instead of π0 , σ0 . To sum up, after modifying ρ, H if necessary, we can always find a finite rank n median algebra Π and maps π : A → Π and σ : Π → X such that Π = [ā, b̄], and conditions in (C2) hold (here we cannot require σ ◦ π = iA again, but just close to iA ). Since [ā, b̄] has rank at most n, without loss of generality, we can assume, by Lemma 2.6, that 0 µΠ (ē1 , . . . , ēn+1 ; b̄) = µΠ (ē1 , . . . , ēn ; b̄), which implies that n+1 n \ \ [ēi , b̄] = [ēi , b̄]. i=1 So n \ i=1 [ēi , b̄] ⊆ [ēn+1 , b̄], i.e. µ(ē1 , . . . , ēn ; b̄) ∈ [ēn+1 , b̄]. i=1 Equivalently, ēn+1 ∈ [ā, µ(ē1 , . . . , ēn ; b̄)] since ēi ∈ [ā, b̄]. By Lemma 2.7, we have: ēn+1 = µΠ (ā, ēn+1 , µ(ē1 , . . . , ēn ; b̄)) = µΠ (µΠ (ā, ēn+1 , ē1 ), . . . , µΠ (ā, ēn+1 , ēn ); b̄). Now translate the above equation into X, recall that σ(ēi ) ∼H(n+3) ei . By Lemma 2.17, there exists a constant α(n, ρ, H): en+1 ∼H(n+3) σ(ēn+1 ) = σ(µΠ (µΠ (ā, ēn+1 , ē1 ), . . . , µΠ (ā, ēn+1 , ēn ); b̄)) ∼α(n,ρ,H) µ(σ(µΠ (ā, ēn+1 , ē1 )), . . . , σ(µΠ (ā, ēn+1 , ēn )); σ(b̄)). By (C1) and (C2), we know σ(µΠ (ā, ēn+1 , ēi )) ∼H(n+3) µ(σ(ā), σ(ēn+1 ), σ(ēi )) ∼ρ(3H(n+3)) µ(a, en+1 , ei ) ∼λ a. A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 41 Now by Lemma 2.16, there exists a constant β(λ, n, ρ, H) such that µ(σ(µΠ (ā, ēn+1 , ē1 )), . . . , σ(µΠ (ā, ēn+1 , ēn )); σ(b̄)) ∼β(λ,n,ρ,H) µ(a, . . . , a; b) = a, which implies there exists some constant C = C(λ) such that en+1 is C-close to a. (2) ⇒ (3): Let ρ, H be parameters of (X, d, µ). Let 0̄ denote the zero vector in the median cube (In+1 , µn+1 ), let 1̄ denote the vector with 1 in all coordinates, and ēi denote the basis vector with a single 1 in the ith coordinate. Given an L-quasi-morphism σ : In+1 → X, let a = σ(0̄), b = σ(1̄) and ei = σ(ēi ). Since ēi ∈ [0̄, 1̄], µn+1 (0̄, ēi , 1̄) = ēi , which implies e0i := µ(a, b, ei ) = µ(σ(0̄), σ(1̄), σ(ēi )) ∼L σ(µn+1 (0̄, ēi , 1̄)) = ei and e0i ∈ [a, b]. Now µ(e0i , a, e0j ) = µ(µ(a, b, ei ), a, µ(a, b, e j )) ∼κ5 µ(a, b, µ(ei , e j , a)), and µ(ei , e j , a) = µ(σ(ēi ), σ(ē j ), σ(0̄)) ∼L σ(µn+1 (ēi , ē j , 0̄)) = a. So µ(e0i , a, e0j ) ∼ρ(L)+κ5 µ(a, b, a) = a. Now take λ = ρ(L) + κ5 , and by the assumption, there exists a constant C0 depending on λ and hence implictly on L, such that one of e01 , . . . , e0n+1 is C0 -close to a. This implies that one of the points σ(ēi ) = ei is C-close to σ(0̄) = a for C = C0 + L. (3) ⇒ (1): Let ρ, H be parameters of (X, d, µ). By definition, for any p ∈ N and A ⊆ X with |A| = p, there exists a finite median algebra (Π, µΠ ), and maps π : A → Π, σ : Π → X satisfying axioms (C1), (C2), the conditions in Remark 2.10 and σπ = iA . Denote the associated finite CAT(0) cube complex also by Π. Now we need to modify Π, π, σ to ensure that Π has rank n. If rank Π = n, nothing need to be modified. Assume rank Π > n + 1, so that, as a CAT(0) cube complex it has dimension at least n + 1 and thus contains an (n + 1)-cube. As a median subalgebra this is isomorphic to the median cube (In+1 , µn+1 ). By condition (3) with L = H(p), we know there exists a constant C depending on L and hence on p such that, without loss of generality, σ(ēn+1 ) is C-close to σ(0̄). Now construct the quotient CAT(0) cube complex Π0 from Π 42 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG by deleting the hyperplane h crossing the edge (0̄, ēn+1 ). Then the rest of the proof follows exactly that of Theorem 4.4.  As mentioned in previous sections, the above theorem offers a way to define the rank of a coarse median space in the simplified setting. More explicitly, Theorem 3.1 and Theorem 4.11 combine to show : Theorem 4.12. Let (X, d) be a metric space, and µ : X3 → X a ternary operation. Then (X, d, µ) is a coarse median space of rank at most n if and only if the following conditions hold: (M1). µ(a, a, b) = a for any a, b ∈ X (M2). µ(aσ(1) , aσ(2) , aσ(3) ) = µ(a1 , a2 , a3 ), for any a1 , a2 , a3 ∈ X and σ a permutation; (C1)’. There exists an affine control function ρ : [0, +∞) → [0, +∞) such that for all a, a0 , b, c ∈ X, d(µ(a, b, c), µ(a0 , b, c)) 6 ρ(d(a, a0 )); (C2)’. There exists a constant κ4 > 0 such that for any a, b, c, d ∈ X, we have µ(µ(a, b, c), b, d) ∼κ4 µ(a, b, µ(c, b, d)); (C3)’. ∀λ > 0, ∃C = C(λ) such that for any a, b ∈ X, any e1 , . . . , en+1 ∈ [a, b] with µ(ei , a, e j ) ∼λ a for all i , j, there exists i such that ei ∼C a. 5. A counterexample Recall that in a discrete median algebra, or equivalently, a CAT(0) cube complex, the interval between two points is the set of points which lie on geodesics connecting them. This makes a bridge between the algebraic aspect and the geometry of the object. It is natural to ask to what extent this holds in a coarse median space? As we have already seen in Theorem 4.2, it is “almost” true in rank 1: intervals are “about the same” as the union of quasi-geodesics. As we shall see, the interaction of geodesics and intervals in higher rank is considerably less well behaved. We will show: A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 43 Theorem 5.1. There is a rank 2 geodesic coarse median space (X, d, µ) such that for any C > 0 there exist a, b ∈ X, with the property that no geodesic γ connecting a, b lies within Hausdorff distance C of the interval [a, b]. Proof. Let X = Z2 , and µ the canonical median operator on X, i.e. µ((x1 , y1 ), (x2 , y2 ), (x3 , y3 )) = (m(x1 , x2 , x3 ), m(y1 , y2 , y3 )), where (x1 , y1 ), (x2 , y2 ), (x3 , y3 ) ∈ Z2 and m(·, ·, ·) is the classical median of three real numbers. Equip (X, µ) with a metric d as follows. We will view X as a graph in the canonical way, and define d to be a weighted edge-path metric on X, induced by assigning a positive number to each edge as its length. We define all horizontal edges to have length 1, i.e. d((x, y), (x + 1, y)) = 1 for all (x, y) ∈ Z2 ; lengths of vertical edges are listed as follows. See Figure 4. • If x 6 0: d((x, y), (x, y + 1)) = 1; • If x = 1: d((x, y), (x, y + 1)) = 3; • If x > 2: d((x, y), (x, y + 1)) = 5. Now consider a sequence {γn } of edge paths in (X, d): for each n ∈ N, define a path starting from an = (n + 1, n + 1), which travels horizontally leftwards to (0, n + 1), then vertically down to (0, 0) and finally horizontally rightwards to bn = (n + 1, 0). Again, see Figure 4. It is easy to check that the paths γn are geodesic for all n. We claim that (X, d, µ) is a coarse median space. In fact, consider the identity map id : (X, d1 , µ) → (X, d, µ), where d1 is the edge-path metric defined by each edge having length 1. It is obvious that this is a biLipschitz map and a median morphism, so (X, d, µ) is indeed a coarse median space of rank 2. Now notice that [an , bn ] = {n + 1} × [0, n + 1]. So dH (Imγn , [an , bn ]) = n+1, which implies there is no uniform bound on the Hausdorff distance between geodesics and intervals. Unfortunately the space we have constructed is not geodesic, for instance the points (3, 0), (3, 1) are distance 5 apart, but there is no (integer) path of length less than 7 connecting them. We can modify the space easily to rectify this problem by subdividing the edges of 44 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG Figure 4. Lengths of vertical edges in the metric d on Z2 length n > 1 by inserting n − 1 points declared to be unit distance apart as appropriate. The natural extension of the metric d to include these points is now geodesic and we continue to denote it by d. We are left with the issue of how to define coarse medians involving the inserted points. This is dealt with by projecting each point p = (x, y) to its “floor” p = (x, byc), the nearest original point to the vertex at or below it on a vertical line. We then define the ternary operator µ0 by µ0 (p, q, r) = µ(p, q, r) when p, q, r are distinct and if two are equal then we define µ0 (p, q, r) to be that point. Since the floor map moves points at most a distance of 4 in the d metric, µ0 is still a A FOUR POINT CHARACTERISATION FOR COARSE MEDIAN SPACES 45 coarse median operator with respect to the extended metric d, and intervals between an and bn remain the same.  References [1] Hans-J Bandelt and Jarmila Hedlı́ková. Median algebras. Discrete mathematics, 45(1):1–30, 1983. [2] Hans-Jurgen Bandelt and Victor Chepoi. Metric graph theory and geometry: a survey. Contemporary Mathematics, 453:49–86, 2008. [3] Jason Behrstock, Mark Hagen, Alessandro Sisto, et al. Hierarchically hyperbolic spaces, I: Curve complexes for cubical groups. Geometry & Topology, 21(3):1731–1804, 2017. [4] Jason Behrstock, Mark F Hagen, and Alessandro Sisto. Hierarchically hyperbolic spaces II: combination theorems and the distance formula. arXiv preprint arXiv:1509.00632, 2015. [5] B. H. Bowditch. Coarse median spaces and groups. Pacific Journal of Mathematics, 261(1):53–93, 2013. [6] B. H. Bowditch. Embedding median algebras in products of trees. Geometriae Dedicata, 170(1):157–176, 2014. [7] M. R. Bridson and A. Häfliger. Metric spaces of non-positive curvature, volume 319 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, 1999. [8] I. Chatterji and G. A. Niblo. From wall spaces to CAT(0) cube complexes. International Journal of Algebra and Computation, 15(05n06):875–885, 2005. [9] Indira Chatterji and Graham A Niblo. A characterization of hyperbolic spaces. Groups Geometry and Dynamics, 1(3):281, 2006. [10] V. Chepoi. Graphs of some CAT(0) complexes. Advances in Applied Mathematics, 24(2):125–179, 2000. [11] M. Gromov. Hyperbolic groups. In Essays in group theory, pages 75–263. Springer, 1987. [12] J. R. Isbell. Median algebra. Transactions of the American Mathematical Society, 260(2):319–362, 1980. [13] Milan Kolibiar and Tamara Marcisová. On a question of J. Hashimoto. Matematickỳ časopis, 24(2):179–185, 1974. [14] G. A. Niblo and L. D. Reeves. The geometry of cube complexes and the complexity of their fundamental groups. Topology, 37(3):621–633, 1998. [15] G.A. Niblo, N.J. Wright, and J. Zhang. The intrinsic geometry of coarse median spaces and their intervals. arXiv:1802.02499, 2018. [16] B. Nica. Cubulating spaces with walls. Algebr. Geom. Topol, 4:297–309, 2004. [17] Panos Papasoglu. Strongly geodesically automatic groups are hyperbolic. Inventiones mathematicae, 121(1):323–334, 1995. [18] J. Pomroy. A characterisation of hyperbolic spaces. Master’s thesis, University of Warwick, 1994. [19] M. Roller. Poc sets, median algebras and group actions. an extended study of Dunwoody’s construction and Sageev’s theorem. Southampton Preprint Archive, 1998. 46 GRAHAM A. NIBLO, NICK WRIGHT, AND JIAWEN ZHANG [20] M. Sageev. Ends of group pairs and non-positively curved cube complexes. Proceedings of the London Mathematical Society, 3(3):585–617, 1995. [21] Ján Špakula and Nick Wright. Coarse medians and property A. Algebraic & Geometric Topology, 17(4):2481–2498, 2017. [22] Marcel L.J. van De Vel. Theory of convex structures, volume 50. Elsevier, 1993. [23] R. Zeidler. Coarse median structures on groups. Master’s thesis, University of Vienna, Vienna, Austria, 2013. School of Mathematics, University of Southampton, Highfield, SO17 1BJ, United Kingdom. E-mail address: {g.a.niblo,n.j.wright,jiawen.zhang}@soton.ac.uk
4math.GR
1 Optimal Sleeping Mechanism for Multiple Servers with MMPP-Based Bursty Traffic Arrival arXiv:1711.07912v1 [cs.IT] 21 Nov 2017 Zhiyuan Jiang, Bhaskar Krishnamachari, Sheng Zhou, Zhisheng Niu, Fellow, IEEE Abstract An important fundamental problem in green communications and networking is the operation of servers (routers or base stations) with sleeping mechanism to optimize energy-delay tradeoffs. This problem is very challenging when considering realistic bursty, non-Poisson traffic. We prove for the first time the optimal structure of such a sleep mechanism for multiple servers when the arrival of jobs is modeled by a bursty Markov-modulated Poisson process (MMPP). It is shown that the optimal operation, which determines the number of active (or sleeping) servers dynamically, is hysteretic and monotone, and hence it is a queue-threshold-based policy. This work settles a conjecture in the literature that the optimal sleeping mechanism for a single server with interrupted Poisson arrival process, which can be treated as a special case of MMPP, is queue-threshold-based. The exact thresholds are given by numerically solving the Markov decision process. Index Terms Green wireless communications, Markov-modulated-Poisson-process, Markov decision process, thresholdbased policy I. I NTRODUCTION The reduction of energy consumption has attracted more and more attention in several engineering fields, e.g., wireless communication systems and data centers. One of the most effective Z. Jiang, S. Zhou and Z. Niu are with Tsinghua National Laboratory for Information Science and Technology, Tsinghua University, Beijing 100084, China. Emails: {zhiyuan, sheng.zhou, niuzhs}@tsinghua.edu.cn. B. Krishnamachari is with the Ming Hsieh Department of Electrical Engineering, University of Southern California, Los Angeles, CA 90089, USA. Email: [email protected]. This work is sponsored in part by the Nature Science Foundation of China (No. 61701275, No. 91638204, No. 61571265, No. 61621091), the China Postdoctoral Science Foundation, and Hitachi R&D Headquarter. 2 approaches is to put idle servers into sleeping mode due to the fact that a significant amount of energy is wasted by keeping the idle servers active. Concretely, a base station (BS) consumes 90% of its peak power even when the traffic load is low [1], and a typical idle server consumes 50%-60% of its peak power. On the other hand, the utilization of BSs and servers is usually low, especially with more and more densely deployed infrastructures [2]. Meanwhile, the energy consumption reduction thanks to sleeping operations comes with an undesired user delay increase, due to the extra job queuing time with possibly sleeping servers. Therefore, the design of sleeping mechanism should consider the tradeoff between energy consumption and queuing delay, and in the meantime avoid frequent server mode switching which costs extra energy. In practice, the arrival traffic at servers often exhibits a high level of burstness [3], whereas existing works usually focus on Poisson-based, non-bursty traffic arrivals. It is important to understand the impact of traffic burstness since, intuitively, it may create more sleeping opportunities. However, the optimization of the energy-delay tradeoff with bursty, non-Poisson traffic becomes very challenging and hence few results are available. A. Related Work and Main Contributions The BS and server sleeping mechanisms have attracted wide attention in the literature. It is proved by Kamitsos et al. [4] that the optimal structure of the sleeping operations for Poisson arrival and a single server is queue-threshold-based. The proof is built upon the previous work by Lu, Serfozo [5] and Hipp, Holzbaur [6]. In the work by Wu et al. [7] and Leng et al. [8], the arrival traffic pattern is generalized to interrupted Poisson process (IPP) to capture the traffic burstness. In an IPP process, jobs only arrive during the ON phase and the ON and OFF phases transit to each other based on a Markov process. Specifically, Wu et al. [7] calculate the optimum queue threshold with IPP arrival and a single server by fixing the sleeping policy to be N -based, i.e., turning on the server when there are N jobs and turning it off when the queue is empty. However, it is shown in the work by Leng et al. [8] that the optimal sleeping policy with IPP arrival has two sets of thresholds, meaning that in each phase of the IPP the thresholds to turn on and off the server are different. Therefore, the N -based policy [7] is in general not optimal with IPP arrival. Towards finding the optimal sleeping policy, Leng et al. [8] adopt a partially observable Markov decision process (POMDP) formulation and analyze the optimal sleeping policy with IPP arrivals and a single server numerically. It is proved that the optimal policy is 3 hysteretic but the monotonicity property, which together with the hysteretic property proves the optimal policy structure to be queue-threshold-based, is left as a conjecture. In this letter, we generalize the existing work by considering the Markov-modulated-Poissonprocess (MMPP) traffic arrival and multiple servers. The optimal sleeping policy structure is proved to be queue-threshold-based, and hence the conjecture by Leng et al. [8, Conjecture 1] is settled since IPP and a single server can be considered as a special case. Numerical results are also given to shed light upon the optimum queue thresholds. II. S YSTEM M ODEL AND P ROBLEM F ORMULATION We consider M servers, each has two operation modes, active and sleeping. The M servers serve jobs in a single queue with a buffer size of B. Denote the number of active servers as W , and W ∈ {0, ..., M }. We assume that jobs arrive at the queue according to an MMPP to capture the burstiness of the traffic. Jobs arrive during the S-th phase of MMPP based on the Poisson process with rate λS , where the MMPP arrival phase is denoted as kS and S ∈ {1, ..., N }. The MMPP is parameterized by the N -state continuous time Markov chain with phase transition   −σ1 · · · σ1N    .  . . . .. .. , where σS1 S2 denotes the transition rate from phase kS1 matrix as R =   .    σN 1 · · · −σN PN to kS2 of MMPP, and σi = j=1, j6=i σij . The service time is assumed to be independently and identically distributed according to an exponential distribution over jobs with mean service time of µ−1 for each active server. Based on the queuing theory, the service rate for W active servers is W µ. The memory-less property of the arrival1 and departure processes enables us to formulate the problem as a continuous-time MDP. The system state is denoted as (S, Q, W ), where S ∈ {1, ..., N }, W ∈ {0, ..., M } and Q ∈ {0, · · · , B}. The state (S, Q, W ) denotes that there are Q jobs in the queue, the number of active servers is W and the arrival MMPP is in the S-th phase. The control action space is {0, ..., M }, wherein an action ua turns a servers to the active mode.2 In the case of a is smaller than the number of current active servers (W ), the action means to turn W − a servers to the sleeping mode. 1 Although the arrival MMPP is not a renewal process, the arrival phase transition is still memory-less based on the MMPP definition. 2 Obviously, considering the switching cost, it is better to turn an additional a − W servers to active mode when there are W (W ≤ a) active servers, rather than to close some servers and turn on more. 4 We adopt the discrete-time approximation of the continuous-time MDP, whereby the time is divided into time slots and time duration of each time slot, i.e., denoted by ∆, is sufficiently small such that there is at most one event (job arrival, departure, or arrival phase shift) occurrence in one time slot [9, Chapter 5.5]. The decision is made at each time slot, and the time index is conveyed in the brackets. The system states evolve as follows W (t + 1)= a(t),   S̄, if arrival phase transits to kS̄ phase; S(t + 1) =  S(t), no phase transition happens,   Q(t) + 1, if Q(t) < B and a job arrives;     Q(t + 1) = Q(t) − 1, if Q(t) > 0 and a job is served;      Q(t), otherwise. (1) (2) (3) The state transition probability given action ua is (the time index is omitted for simplicity) Pr{(S, Q, W ) → (S, Q + 1, a)} = λS ∆1(Q < B). (4) Pr{(S, Q, W ) → (S, Q − 1, a)} = aµ∆1(Q > 0). (5) Pr{(S, Q, W ) → (S̄, Q, a)} = σS S̄ ∆, S̄ ∈ NS . (6) Pr{(S, Q, W ) → (S, Q, a)} = 1 − aµ∆1(Q > 0) − λS ∆1(Q < B) − X σS S̄ ∆, (7) S̄∈NS where NS = {1, ..., N }\{S}. All other transition probabilities are zeros. We consider the active energy consumption cost, switching energy cost, and delay cost of the system. The objective is to minimize the total discounted cost [5], [7], [8], i.e., " min a(t)∈{0,...,M } E ∞ X t=1   rt−1 (max(a(t) − W (t), 0)Esw + ωQ(t) + a(t)Eon , (8) where r ∈ [0, 1) is the discount factor which reflects how important is immediate cost, the tradeoff between delay and energy cost is represented by ω, the switching energy consumption is denoted as Esw , and Eon denotes the energy consumption of the server being active for one time slot. Although only the server start-up energy consumption is considered for switching energy cost based on real systems, the inclusion of shut-down cost would not affect the results since a start-up is always followed by a shut-down to complete a busy cycle. 5 III. O PTIMAL P OLICY S TRUCTURE In Theorem 1 of the work by Leng et al. [8], it is proved that the optimal policy with IPP arrival is a hysteretic policy, i.e., if the policy chooses to switch to a better mode, then it would stay in that mode if it is already in the mode. The extension of the hysteretic property to the MMPP case is actually straightforward given the work by Hipp and Holzbaur [6, Theorem 1] and examining the switching cost function which is defined as s(W (t), a(t)) = max(a(t) − W (t), 0)Esw . (9) It is conjectured by Leng et al. [8, Conjecture 1] that the optimal policy for IPP arrival is also a monotone policy, i.e., given S(t) the optimal action a∗ (t) , f (S(t), Q(t), W (t)) is nondecreasing with Q(t). Consequently, assuming the conjecture is upheld, it is shown that the optimal policy for IPP arrival is a threshold-based policy, which is described by the active and sleeping thresholds at ON and OFF phases of IPP, respectively. In what follows, we not only settle the monotone conjecture, but also extend to MMPP arrival case, and thus prove the optimal policy with MMPP arrival and multiple servers is queue-threshold-based. Theorem 1: The optimal policy to the formulated MDP is a monotone policy, i.e., ∀ S, W , and Q1 ≥ Q2 , f (S, Q1 , W ) ≥ f (S, Q2 , W ). (10) Proof: The main technique to prove the theorem is inspired by the proof of Theorem 1 in the work by Lu and Serfozo [5]. However, the arrival process is Poisson-based and the cost-to-go function is required to be submodular [5]. In fact, it can be shown through numerical simulations that the cost-to-go function with MMPP arrival is, in general, not a submodular function. To address this issue, we present a stronger result in Lemma 1 (Appendix) which indicates that only a partial submodular condition is sufficient, i.e., it suffices that the cost-to-go function is submodular with respect to Q and a. Define the cost-to-go function as {s(W, a) + wt−1 (S, Q, a)},  X wt (S, Q, a) = ωQ + aEon + r  σS S̄ ∆Vt (S̄, Q, a) Vt (S, Q, W ) = min (11) a∈{0,...,M } S̄∈NS +λS ∆1(Q < B)Vt (S, Q + 1, a) + aµ∆1(Q > 0)Vt (S, Q − 1, a)    X  +1 − aµ∆1(Q > 0) − λS ∆1(Q < B) − σS S̄ ∆ Vt (S, Q, a) , (12) S̄∈NS 6 and define ut (S, Q, W, a) , s(W, a) + wt (S, Q, a). (13) To prove Theorem 1, we will first show that Theorem 1 is true in a finite horizon of length T by induction. The generalization to infinite horizon follows standard methods as shown by Lu and Serfozo [5, Theorem 2]. In particular, we will show that the following statements are valid. (i) The optimal policy is non-decreasing in Q. (ii) ∀S, t, and Q1 ≤ Q2 , W1 ≤ W2 , Vt (S, Q2 , W1 )−Vt (S, Q1 , W1 ) ≥ Vt (S, Q2 , W2 )−Vt (S, Q1 , W2 ). (iii) Define Vt0 (S, Q, W ) = Vt (S, Q+1, W )−Vt (S, Q, W ).3 Then ∀t, S and Q, 0 ≤ Vt0 (S, Q, 0) ≤ Vt0 (S, Q + 1, M ). Induction basis: For t = 1, the one-step cost-to-go function is V1 (S, Q, W ) = min [max(a1 − W, 0)Esw + ωQ + a1 Eon ]. a1 ∈{0,...,M } (14) It is obvious that the optimal control action a∗1 to minimize V1 does not depend on Q. Therefore, (i)-(iii) are satisfied with equality. Induction steps: Suppose (i)-(iii) are valid for k ≤ t. Then, for ∀a ≤ b, and S, wt0 (S, Q, b) − wt0 (S, Q, a)  X = r σS S̄ ∆(Vt0 (S̄, Q, b) − Vt0 (S̄, Q, a)) + λS ∆(Vt0 (S, Q + 1, b) − Vt0 (S, Q + 1, a)) S̄∈NS +aµ∆(Vt0 (S, Q − 1, b) − Vt0 (S, Q − 1, a)) + µ(b − a)∆(Vt0 (S, Q − 1, b) − Vt0 (S, Q, b))    X  σS S̄ ∆ (Vt0 (S, Q, b) − Vt0 (S, Q, a)) + 1 − aµ∆ − λS ∆ − S̄∈NS ≤ −rµ(b − a)∆(Vt0 (S, Q, b) − Vt0 (S, Q − 1, b)), (15) where the inequality is based on the induction hypothesis (ii). Combining the induction hypotheses (ii) and (iii), it follows that Vt0 (S, Q − 1, b) ≤ Vt0 (S, Q − 1, 0) ≤ Vt0 (S, Q, M ) ≤ Vt0 (S, Q, b). (16) Therefore, we obtain wt0 (S, Q, b) − wt0 (S, Q, a) ≤ 0, and it follows that ut (S, Q, W, a) satisfies the conditions in Lemma 1. Hence, (i) and (ii) are proved by noticing that the minimization operation preserves partial submodularity. 3 Increment of other functions over Q is denoted identically. 7 To prove (iii), we obtain wt0 (S, Q, 0) − wt0 (S, Q + 1, M )  X = r σS S̄ ∆(Vt0 (S, Q, 0) − Vt0 (S, Q + 1, M )) S̄∈NS +λS ∆(Vt0 (S, Q + 1, 0) − Vt0 (S, Q + 2, M )) + µM ∆(Vt0 (S, Q + 1, M ) − Vt0 (S, Q, M ))    X  + 1 − aµ∆ − λS ∆ − σS S̄ ∆ (Vt0 (S, Q, 0) − Vt0 (S, Q + 1, M )) S̄∈NS ≤ −rµM ∆(Vt0 (S, Q, M ) − Vt0 (S, Q − 1, M )) ≤ 0, (17) where the inequality stems from combining the induction hypothesis (ii) and (iii). It follows that 0 Vt+1 is non-negative since Vt0 is. Denote x , f (S, Q, W ), y , f (S, Q + 2, W ), (18) we obtain 0 Vt+1 (S, Q, 0) = min ut+1 (S, Q + 1, W, a) − min ut+1 (S, Q, W, a) a a ≤ ut+1 (S, Q + 1, W, x) − ut+1 (S, Q + 1, W, x) = wt0 (S, Q, x) ≤ wt0 (S, Q, 0) ≤ wt0 (S, Q + 1, M ) ≤ wt0 (S, Q + 1, y) = u0t+1 (S, Q + 1, M, y) 0 ≤ Vt+1 (S, Q + 1, M ). (19) Therefore, the hypothesis (iii) is proved. Note that the corner cases wherein Q = 0 or Q = B can be dealt with appropriately, and for brevity the details are not shown. With this, the induction proof is completed. IV. N UMERICAL R ESULTS In this section, the MDP is solved numerically to obtain the optimum queue thresholds. Each time slot is 10 milliseconds. Two arrival phases are considered in the MMPP, where the arrival rates are 5 (ON phase) and 0 (OFF phase) jobs per second, respectively. The definition of ON and OFF phases is identical with that in the IPP; jobs only arrive during the ON phase based on the Poisson model; the holding time in both phases obeys i.i.d. exponential distributions. The phase transition rates are 0.5 s−1 and 0.25 s−1 in ON phase and OFF phase, respectively. The 8 15 Optimum turn-on threshold in OFF phase Optimum turn-on threshold in ON phase Number of active servers 13 10 7 2 4 1 0 3 6 9 12 15 18 21 24 27 30 1 0 50 100 150 200 Queue length Fig. 1. Optimum queue thresholds for turning on servers. 18 Optimum turn-off threshold in OFF phase Optimum turn-off threshold in ON phase Number of active servers 15 12 9 6 3 0 0 1 2 3 4 5 6 7 8 9 Queue length Fig. 2. Optimum queue thresholds for turning off servers. mean service time for a single server is 0.12 s. The number of available servers is 15. The buffer size is 250. The turn-on energy consumption of a server is 200 joules. The energy consumption of an active server in a time slot is 2.5 joules. The tradeoff parameter ω = 0.2. These parameters are obtained from realistic cellular systems [8], [10]. The discount factor r = 0.999. The solution to the MDP is obtained by standard policy iterations over infinite horizon. In Fig. 1, it is shown that the optimum turn-on queue thresholds, both in ON phase and OFF phase, are almost linear with the number of active servers. The threshold to turn on one server in OFF phase is smaller 9 than that in ON phase, indicating that the optimal action in OFF phase with no active server is to turn on service sooner to reduce the delay cost. The gap between other thresholds in ON phase and OFF phase, which correspond to turning on more than one servers, is constant. Moreover, servers are turned on more aggressively in ON phase with at least one active servers. The turnoff thresholds are shown in Fig. 2. It is observed that the optimal action is not to turn off all the servers until the queue is emptied in OFF phase. Compared with the turn-on thresholds, the optimal action is to turn off servers only when the queue length is relatively quite small, and the servers are turned off very quickly when the queue length decreases beyond a certain point (about 10 jobs in Fig. 2). V. C ONCLUSIONS In this letter, we prove that the optimal sleeping mechanism with MMPP arrival and multiple servers is queue-threshold-based. This result settles a conjecture in the literature and extends to MMPP and multiple-server scenario. Through numerical results, it is shown that the optimal sleeping mechanism with multiple servers exhibits a slow activation, rapid and late (only when the queue length is quite small) shutdown feature. A PPENDIX Lemma 1 (Partial submodular condition): If ∀ S, W , t, and Q1 ≤ Q2 , a1 ≥ a2 , ut (S, Q2 , W, a1 ) − ut (S, Q1 , W, a1 ) ≤ ut (S, Q2 , W, a2 ) − ut (S, Q1 , W, a2 ), (20) the optimal policy is a monotone policy. Proof: Given ∀ S, W , and t, define g(Q) , arg min ut (S, Q, W, a). (21) a∈{0,...,M } Then ∀ Q1 ≤ Q2 , ut (S, Q1 , W, min[g(Q1 ), g(Q2 )]) − ut (S, Q1 , W, g(Q1 )) = ut (S, Q1 , W, g(Q2 )) − ut (S, Q1 , W, max[g(Q1 ), g(Q2 )]) ≤ ut (S, Q2 , W, g(Q2 )) − ut (S, Q2 , W, max[g(Q1 ), g(Q2 )]) ≤ 0. This implies that min[g(Q1 ), g(Q2 )] = g(Q1 ), and thus g(Q1 ) ≤ g(Q2 ). (22) 10 R EFERENCES [1] E. Oh, B. Krishnamachari, X. Liu, and Z. Niu, “Toward dynamic energy-efficient operation of cellular network infrastructure,” IEEE Commun. Mag., vol. 49, pp. 56–61, Jun 2011. [2] H. Kim and G. de Veciana, “Leveraging dynamic spare capacity in wireless systems to conserve mobile terminals’ energy,” IEEE/ACM Trans. Netw., vol. 18, pp. 802–815, Jun 2010. [3] Z. Niu, “TANGO: traffic-aware network planning and green operation,” IEEE Wireless Commun., vol. 18, pp. 25–29, Oct 2011. [4] I. Kamitsos, L. Andrew, H. Kim, and M. Chiang, “Optimal sleep patterns for serving delay-tolerant jobs,” in International Conf. Energy-Efficient Comput. Netw., (New York, NY, USA), pp. 31–40, 2010. [5] F. V. Lu and R. F. Serfozo, “M/M/1 queueing decision processes with monotone hysteretic optimal policies,” Oper. Res., vol. 32, no. 5, pp. 1116–1132, 1984. [6] S. K. Hipp and U. D. Holzbaur, “Decision processes with monotone hysteretic policies,” Oper. Res., vol. 36, no. 4, pp. 585–588, 1988. [7] J. Wu, Y. Bao, G. Miao, S. Zhou, and Z. Niu, “Base-station sleeping control and power matching for energy-delay tradeoffs with bursty traffic,” IEEE Trans. Veh. Tech., vol. 65, pp. 3657–3675, May 2016. [8] B. Leng, X. Guo, X. Zheng, B. Krishnamachari, and Z. Niu, “A wait-and-see two-threshold optimal sleeping policy for a single server with bursty traffic,” IEEE Trans. Green Commun. Netw., vol. 1, pp. 528–540, Dec 2017. [9] R. G. Gallager, Discrete stochastic processes, vol. 321. Springer Science & Business Media, 2012. [10] Z. Niu, X. Guo, S. Zhou, and P. R. Kumar, “Characterizing energy-delay tradeoff in hyper-cellular networks with base station sleeping control,” IEEE J. Select. Areas Commun., vol. 33, pp. 641–650, Apr 2015.
7cs.IT
JMLR: Workshop and Conference Proceedings 80:1–16, 2017 ACML 2017 Computer Assisted Composition with Recurrent Neural Networks Christian Walder [email protected] Data61 at CSIRO, Australia. arXiv:1612.00092v2 [cs.AI] 29 Sep 2017 Dongwoo Kim [email protected] Australian National University. Editors: Yung-Kyun Noh and Min-Ling Zhang Abstract Sequence modeling with neural networks has lead to powerful models of symbolic music data. We address the problem of exploiting these models to reach creative musical goals, by combining with human input. To this end we generalise previous work, which sampled Markovian sequence models under the constraint that the sequence belong to the language of a given finite state machine provided by the human. We consider more expressive non-Markov models, thereby requiring approximate sampling which we provide in the form of an efficient sequential Monte Carlo method. In addition we provide and compare with a beam search strategy for conditional probability maximisation. Our algorithms are capable of convincingly re-harmonising famous musical works. To demonstrate this we provide visualisations, quantitative experiments, a human listening test and audio examples. We find both the sampling and optimisation procedures to be effective, yet complementary in character. For the case of highly permissive constraint sets, we find that sampling is to be preferred due to the overly regular nature of the optimisation based results. The generality of our algorithms permits countless other creative applications. Keywords: Music, sequence models, composition, neural networks. 1. Introduction Algorithmic music composition has intrigued a wide range of thinkers, from times as distant as the earliest days of modern computing, and beyond. As early as 1843, Ada Lovelace famously speculated that a computer “might compose elaborate and scientific pieces of music of any degree of complexity or extent” (Menabrea and Lovelace, 1843). Still earlier, around 1757, there famously existed a number of musical games which used dice along with precise instructions, to generate musical compositions (Nierhaus, 2008). Much work has focused on machine learning methods, which combine musical examples with generic inductive principles, to generate new examples. For a survey of more recent advancements we recommend e.g. Fernandez and Vico (2013); Nierhaus (2008). By restricting to a highly structured and regular musical form, and providing a large number of training examples, we may obtain convincing musical results even with rather music-agnostic models (Sturm et al., 2015). Alternatively, with smaller datasets, more structured models are required, such as the hidden Markov model investigated by Allan and Williams (2005). Both of these methods lead to relatively convincing musical results. However, the plausibility of c 2017 C. Walder & D. Kim. Walder Kim the results comes at the cost of variety. It is unreasonable to expect such approaches to give rise to interesting new musical forms. Unmanned machine learning algorithms capable of divining interesting new musical forms may arise, but this is far from a reality at the time of writing. In any case, hybrid man-machine systems are a promising avenue for exploration. The high level goal is a system for the partial specification of music, which relinquishes precise control for other gains.1 In this work, we investigate the combination of machine learning music models with human input. Our approach is most closely related to the work of Papadopoulos et al. (2015), who impose the constraint that the resulting sequence be a member of a language defined by a finite state machine. This is a rather general constraint which provides a rich language for human creativity via the partial specifications of music. In that work, the close relationship between Markov models and finite state machines was used to derive a simple but exact belief propagation algorithm. Here, we relax the constraint that our underlying sequence model be Markovian, and instead make use of approximate sampling techniques, namely that of sequential Monte Carlo (SMC) (Gordon et al., 1993; Doucet and Johansen, 2009). In addition to sampling, we compare and contrast with a maximum conditional probability approach based on a beam search. (given the finite state machine constraint). By allowing models which are not low-order Markovian, we obtain algorithms which are applicable to a broad range of more expressive probabilistic models of music. Concretely, here we adopt the Long Short-Term Memory (LSTM) based neural network sequence model (Hochreiter and Schmidhuber, 1997). By exploiting advances in massively parallel computing architectures, this class of models has proven remarkably effective in a range of domains, most notably natural language modeling (see e.g. Chelba et al. (2013)). Given the similarities between music and natural language (Patel, 2010), it is unsurprising that the LSTM is a natural model for music data. This was noted by Hochreiter and Schmidhuber (1997) in the original LSTM paper, and subsequently investigated by Eck and Schmidhuber (2002). This line of work has been taken up by a number of researchers, with recent examples including e.g. Boulanger-Lewandowski et al. (2012); Walder (2016), the latter approach being the one we adopt here. In section 2 we set the problem up and motivate our solution. We provide technical details of the approximate sampling method in section 3. Section 4 provides results including a visual illustration, quantitative investigation, human listening test, and audio examples. We conclude in section 5. 2. Set-up and Motivation 2.1. Required Background We take the model of Walder (2016) as our starting point, and while this work is a necessary accompaniment to the present work for those wishing to replicate our results, the present paper stands alone in the sense that it may be applied to any model which factorises in the causal manner subsection 2.2 described below. Furthermore, the finite state machine 1. I will argue that today’s composers are more frequently gardeners than architects and, further, that the composer as architect metaphor was a transitory historical blip — Eno (2011). 2 Computer Assisted Composition description symbolic music data with five events a) b) x 1 x 2 x 3 x t 1 t 2 t 3 t d 1 d 2 d 3 d 4 4 x 5 t 5 d 5 x x x x x t t t t t 5 d 5 1 c) 4 1 d 1 2 d 2 2 3 d 3 3 4 d 4 4 conditional x4 |x1:3 , t1:5 , d1:5 available in (2) 5 all but x2 and x3 are observed Figure 1: An overview of our system: please refer to section 2 for more details on the background. Symbolic music consisting of five events (row a — note that the rests or silences are not counted) is represented by a sequence of five note names (roughly speaking, indices into a piano keyboard) x1:5 , along with start times t1:5 and durations d1:5 . Following Walder (2016) we model the conditional x1:5 |t1:5 , d1:5 , with a causal factorisation over x1:5 as indicated by the diagram (row b), and the equation (2). Row c depicts the simplest setting we consider, wherein the human input amounts to the partial observation of the sequence x1:5 (see subsection 3.1). In the case depicted in row c, we infer some fixed subset of the notes (here, x2 and x3 ), given the values for all the other variables. The resulting conditional x2 , x3 |x1 , x4 , x5 , t1:5 , d1:5 is non-trivial due to observed future values, which are not directly handled by the conditionals which we explicitly model via the causal factorisation (2). In rows b–c the box around t1:5 and d1:5 is meant to denote that the out-going arrow(s) emanate from all the variables in the box. constraint formalism we adopt is closely related to Papadopoulos et al. (2015), which we also recommend as background material. 3 Walder Kim 2.2. Assumed Music Model We represent a musical composition by a set of n triples, {(xi , ti , di )}ni=1 ⊂ X × T × T . Here, X represents the set of possible pitches (from the 12-tet western musical system, including both the note name and octave). The set T represents time, with ti and di denoting the start time and duration of the i-th note event, respectively. Following Walder (2016), we assume throughout that the timing information is given, so that we have a model p({xi }ni=1 | n, {(ti , di )}ni=1 ). This model p is based on a reduction to a non-Markov sequence model. This means that (for some particular ordering of the indices, see Walder (2016)) neglecting the conditioning on {(ti , di )}m i=1 , we have p(x1:n ) = n Y i=1 fi (xi |x1:i−1 ), (1) where the conditionals fi are represented explicitly. 2.3. Assumption of Fixed Rhythmic Information Ideally we would model the rhythmic structure, but this turns out to be rather challenging. Indeed, modeling pitches given the rhythmic structure is already rather non-trivial, so it is reasonable to subdivide the problem. Note that some authors have modeled timing information, by assuming e.g. 1. A simple note on/off representation on a uniform temporal grid as in e.g. BoulangerLewandowski et al. (2012), which assumed a temporal resolution of an eighth note. This has the drawback of not distinguishing, say, two eighth notes from a single quarter note (which has length two eighth notes). 2. Rather than explicitly processing each time step on a fixed temporal grid, one may model time increments as in Colombo et al. (2016); Simon and Oore (2017). In this case sampling conditionally given constraints as is our present focus becomes more technical. Indeed, point process machinery (Daley and Vere-Jones, 2003) is required, due to the variable dimension of the parameter space (that is, the number of notes). The sampling problems analogous to the present work become highly non-trivial in that case. This is the subject of ongoing work, and beyond the present scope. Short of developing the second approach, assuming fixed timing has the advantage of allowing arbitrarily complex rhythmic structures. In this way, rather than fully modeling an overly simplistic music representation, we partially model a more realistic music representation. Once we have satisfactorily modeled timing, our methods and findings may be generalised to the full joint distribution, as we can always employ the chain rule of probability to decompose p (n, {xi , tt , di }ni=1 ) = p({xi }ni=1 | n, {(ti , di )}ni=1 ) × p(n, {(ti , di )}ni=1 ), where the first factor on the r.h.s. is our present concern. 4 (2) Computer Assisted Composition 2.4. Finite State Machine Constraint Formulation 3. Sequential Monte Carlo Details We describe detailed sequential sampling methods. In subsection 3.1 we consider partially observed sequences, and then in subsection 3.2 we extend this to more general constraints represented by an arbitrary finite state machine. Throughout this section we neglect conditioning on the start times ti and durations di , as they are fixed throughout. 3.1. Partially Observed Sequences Let x1:n be a sequence drawn from the non-Markov process with discrete state-space X . p(x1:n ) ∝ γn (x1:n ) = n Y i=1 fi (xi |x1:i−1 ), where γn is an un-normalised probability distribution which can be factorised into the conditionals fi , each of which depends on all of the previous states x1:i−1 . Our goal is to compute the posterior of x1:n with partial observations x̃. Let zi be 1 if xi is observed and 0 otherwise. The posterior distribution of the unobserved part is: p(x1:n ) p({xj }j:zj =1 ) Qn (xi |x1:i−1 ) i=1 fiQ , ∝P n xi ∈X , ∀i:zi =0 i=1 fi (xi |x1:i−1 ) p({xi }i:zi =0 |{x̃j }j:zj =1 , z1:n ) = where we let x1:n be the full sequence with the partial observations. Even though our state space X is finite, naı̈vely P evaluating the probability of a partially observed sequence would involve computing |X | i (1−zi ) terms, so that the computational cost is exponential with respect to the number of unobserved notes. To resolve this computational problem, we develop employ a standard particle filter approach (Doucet and Johansen, 2009, section 3.2). One can approximate the posterior of x1:n Qn by importance sampling with fully factorised proposal distribution q(x1:n ) = i=1 qi (xi |x<i ), so that (s) γn (x1:n ) = wn (x1:n )q(x1:n ) wn (x1:n )q(x1:n ) p(x1:n ) = P . xi ∈X , ∀i=1,2,...,n wn (x1:n )q(x1:n ) With S samples x1:n from q(x1:n ), the posterior can be approximated by an empirical measure of the samples: p(x1:n |z1:n ) = S X s=1 (s) wn (x1:n ) PS δ (s) (s0 ) x1:n s0 =1 wn (x1:n ) 5 (x1:n ). Walder Kim (s) The weight of each sample x1:n ∼ q(x1:n ) is: (s) (s) wn (x1:n ) = = γn (x1:n ) (s) q(x1:n ) Qn (s) (s) i=1 fi (xi |x1:i−1 ) (s) q(x1:n ) (s) (s) = γ̃n−1 (x1:n−1 ) (s) q(x1:n−1 ) | {z } (s) , wn−1 (x1:n−1 ) × (s) fn (xn |x1:n−1 ) (s) (s) qn (xn |x<n ) | {z } . (3) (s) , wn (xn ) The above recursion defines the particle filter scheme (Doucet and Johansen, 2009). For our particular case of partial observations x̃, we define the proposal  zi  1−zi (s) qi (xi |x<i , z1:i ) = δx̃i (xi ) fi (xi |x1:i−1 ) , (4) so that our proposal always proposes x̃j whenever the sampler encounters the partial (s) observation. Then from (3) we have that the weight of sample xi ∼ qi (xi ) is ( 1 zi = 0 (s) wi (xi ) ∝ (5) (s) (s) fi (xi |x1:i−1 ) zi = 1 This expression is intuitive: we sample in temporal order using our original (unconstrained) model, and re-weight our particles only when encountering an observed symbol (or constraint), giving more weight to those particles whose history better agrees with the observed symbol, as measured by the conditional fi . This algorithm is a special case of that of the following subsection, for which pseudo-code is provided as algorithm 1. 3.2. General Constraints Here we extend the set-up of the previous section to the more general case of sampling with the hard constraint that the sampled sequence lie within a given regular language. In particular, we wish to sample from p(A) (x1:n ) , p(x1:n | x1:n ∈ L(A)) ( p(x1:n ) x1:n ∈ Ln (A), ∝ 0 otherwise. (6) Here, Ln (A) is the set of sequences of length n generated by finite state machine A = hQ, Σ, δ, q0 , F i, where Q is a set of states, Σ an alphabet of actions, δ the transition function linking a state q ∈ Q and a label a ∈ Σ to the successor state q 0 = δ(q, a), q0 ∈ Q the initial state, and F ⊆ Q the set of terminal states. We have X = Σ in our case. Similarly to Papadopoulos et al. (2015) we rewrite p(A) (x1:n ) ∝ n Y i=1 fi (xi |x1:i−1 )hi (x1:i ), 6 Computer Assisted Composition where hi (x1:i ) = ( 1 x1:i ∈ Li (A), 0 otherwise, Papadopoulos et al. (2015) transformed their similar problem into one involving the Cartesian product of the domain of the xi and the state space of A to obtain a tree structured factor graph for which belief propagation is efficient. We are interested in non-Markov p and hence have nothing to gain from such a transformation. Instead, we simply encode the language membership constraint via the general functions hi and proceed with SMC as usual.2 Now, we generalise (4) of by choosing q (A) (xi |x1:i−1 ) = 1 fi (xi |x1:i−1 )hi (x1:i ), Zq (x1:i−1 ) (7) P where Zq (x1:i−1 ) = xi ∈X fi (xi |x1:i−1 )hi (x1:i ). The re-sampling weights are derived similarly to (3), yielding (up to an irrelevant constant to which SystematicResample (Carpenter et al., 1999) of algorithm 1 is invariant): (A) wi (s) (xi ) = Zq (x1:i−1 ) X (s) (s) = fi (x̃i |x1:i−1 )hi (x̃1:i ), (8) x̃i ∈X (s) (s) (s) where x̃1:i is the concatenation of x1:i−1 and x̃i . Hence (8) reduces to (5) for unary (s) constraints. The above expression is intuitive — if all the hi (x̃1:i ) are one, the weights are one so we sample from p without modification. In other cases, we give greater weight to those particles for which the total probability mass of admissible continuations is greater. The overall procedure is summarised by algorithm 1. For concreteness, we provide two examples of finite state machine formulation. It is not crucial to understand these examples in detail however, as we may also formulate our user constraints by specifying the hi of Equation 3.2 directly. Example 1 (Sequence with unary constraints) We impose unary constraints at each time i of length-n sequence. Take A = hQ, Σ, δ, q0 , F i, where each time i has one-to-one corresponding state qi . Let Xi be a set of acceptable notes at time i. With transition function δ(qi , xi+1 ) = qi+1 if xi+1 ∈ Xi+1 , we only allow notes in Xn+1 and rejects notes not in Xi+1 . Furthermore choose the terminal states F to be {qn }. Hence, machine A only accepts lengthn sequences which satisfy predefined unary constraints Xi . For example, in the partially observed sequence case, Xi = {x̃i } if zi = 1 and Xi = X if zi = 0. Note that this partially observed constraint is a special case of general unary constraints where Xi consists of single observation x̃i . Example 2 (Prohibit repeated notes) One can disallow consecutive positions from having the same note as follows. Let the number of states be equal to the number of possible notes |X |, and each state qx be indexed by x. Choose the transition function δ(qxi , xj ) = qxj if xi 6= xj . A only accepts sequences which does not have the same two consecutive notes. 2. However, since we only ever append an xi to a given particle, we may leverage the finite state machine formulation of A in order to evaluate the hi , typically in O(1). 7 Walder Kim 1.0 75 50 part 1 75 50 0.8 part 2 0.6 75 50 part 3 0.4 75 50 part 4 0.2 0 final path distribution midi Particle Filter 10 20 30 time (quarter notes) 40 50 80 60 80 60 80 60 0 1.0 part 1 0.8 part 2 0.6 part 3 0.4 part 4 0.2 final path distribution midi Beam Search 80 60 10 20 30 time (quarter notes) 40 50 Figure 2: Visualisation of the final state of the particle filter (upper) and beam search (lower), with S = 2048 paths. In both cases the fourth part (lowest sub figure) is fixed to the original from Corelli’s Trio Op 1 No 1 (which actually contains four midi tracks) provided by Boulanger-Lewandowski et al. (2012); hence the fourth part appears above as a deterministic distribution, with probability mass one on a single note at each time step. The pitches (vertical axis) of Parts 1–3 were unconstrained, to be determined by our algorithms. For the particle filter, the plotted distribution is a sequential Monte Carlo approximation of the filtering distribution (which, given that we consider the final time step, is also the smoothing distribution). For the beam search, the plotted distribution is simply the set of the candidate paths maintained by the deterministic search algorithm at its final step. Note that the part numbers, which corresponding to the axes above, and which come from the original composition, are used only for plotting and not by our algorithms. Following Papadopoulos et al. (2015) we formulate human input as the constraint that the sequence x1:n belong to the language of an arbitrary finite state machine, A. This has the advantage of being extremely general, yet amenable to belief propagation (for Markov 8 Computer Assisted Composition p as in Papadopoulos et al. (2015)), and particle filtering/beam search (as in the present work). The experiments in section 4 utilise a fraction of the generality of this approach. We envisage a rich set of constraints which users may experiment with to discover interesting new music, and our algorithms facilitate this. One might enforce the repetition of patterns, transform relationships between sub-sequences (such as inversion / retrograde), and so on, with arbitrarily complex implications such as odd poly-metrical patterns, etc. Concrete examples are given by Roy and Pachet (2013), which imposes metrical structure, and Papadopoulos et al. (2016), which avoids the exact repetition of training sub-sequences. 3.3. Harmonisation by Sampling / Optimisation We consider two alternative means of incorporating the constraint of the previous subsection. The first is conditional sampling, from p(x1:n | x1:n ∈ L(A)), where L(A) is the set of sequences A can generate. The second is maximisation of the same conditional probability with respect to x1:n . The nature of (1) is such that given a partial sequence x1:i−1 we may keep track of a latent variable (the LSTM state vector) in order to compute fi (xi |x1:i−1 ) in time independent of i. The state vector may also be updated in time independent of i, when a new element xi is appended. This structure makes SMC the natural choice for sampling, since it only ever requires extending a given sequence by a single element. Section 3 provides the details. This approach is in contrast to e.g. Hadjeres and Pachet (2017), wherein a simpler conditional independence structure is assumed (a local dependency network), making sampling simpler but precluding the modelling of longer range dependencies as captured by the LSTM. Similarly, beam search methods are natural for maximising the conditional probability. In this case we maintain S candidate paths, and extend each path by one new element each time step, for all feasible continuations, retaining the S most probable resulting sequences. 4. Results Throughout the experiments, we employ finite state machines which merely fix certain notes xi to given values, and prevent unison intervals from occurring within a single part (which would be impossible to play on the piano, for example). 4.1. Visualisation A well known difficulty in particle filtering is the collapsing of the particles to a small number of unique paths. We observe little evidence of this in our setting however, which features a reasonable degree of uncertainty in the final particle distribution (Figure 2, upper plot). As expected, the beam search (Figure 2, lower plot) behaves very differently, with the majority of the solutions being identical other than at a few isolated temporal intervals. 4.2. Quantitative Investigation Both the beam search and particle filter algorithms have a single key free parameter S, the number of paths to store, which trades accuracy for computation time. In this subsection, we investigate this trade-off. For computational reasons, we restricted our analysis to the 9 Walder Kim Ground truth filtering log probability 0.6 mean per-note log probability mean per-note log probability 1.0 1.5 2.0 2.5 3.0 0 10 101 102 number of paths 1 / 4 fixed parts (particle filter) 1 / 4 fixed parts (beam search) 0.8 1.0 1.2 1.4 1.6 0 10 103 Best log probability 2 / 4 fixed parts (particle filter) 2 / 4 fixed parts (beam search) 101 102 number of paths 3 / 4 fixed parts (particle filter) 3 / 4 fixed parts (beam search) 103 4 / 4 fixed parts Figure 3: The effect of increasing the number of paths. Left: the filtering probability of the fixed (ground truth) parts, and right: the best (maximum) probability sequence found by the algorithm. The vertical axis is the mean log probability per musical note under our sequence model. The mean +/- one standard error of this quantity 4 choices of is depicted, taken over the 16 pieces we consider, multiplied by the Cm fixed parts, where the number m of fixed parts ranges from 1 to 4 and is denoted by the color. The beam search is plotted in solid lines and the particle filter in broken lines. See subsection 4.2 for the details. sixteen shortest pieces (by number of notes) from those pieces in the MuseData test set from Boulanger-Lewandowski et al. (2012) which consist of exactly four voices (all of which turned out to be Bach chorales). For each piece, and for m ∈ {1, 2, 3, 4}, we fixed m of the voices to that of the original piece, and applied our algorithms to choose the remaining (4 − m) parts. 4 possible ways, plotting in Figure 3 the mean and standard error over We did this in all Cm 4 all 16 × Cm possibilities of two different quantities, as a function of the number of paths S. The two quantities depicted are: 1. Figure 3 l.h.s.: the filtering probability of the fixed parts — in the notation of subsection 3.2 the mean of the log of S X s=1 (s) w(x<i ) (s) f (x |x ), (s0 ) i i <i s0 =1 w(x<i ) PS for all i corresponding to the fixed voices. For the particle filter, this is an SMC approximation of the probability of the ground truth for the fixed voices conditional on (s) previous observed values for the fixed voices. For the beam search we let w(x<i ) = 1, and the quantity heuristically measures how well the set of candidate paths agree with the fixed voices on average. 2. Figure 3 r.h.s.: the probability of the best complete harmonisation found by the algorithm. For the beam search, this is the log probability of the final path obtained 10 Binomial Prob["ours better than original"] Computer Assisted Composition 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 90% Confidence Intervals beamsearch particlefilter 0 1 2 number of fixed parts (out of four) 3 Figure 4: Results from the listening test described in subsection 4.3. We plot 90% confidence intervals for the probability that our results are preferred to the original compositions from which they were derived. The horizontal axis is the number of parts which were fixed to the values in the original composition. We see that with the provision of just one part from the original piece, we score approximately as well as the original composer (i.e. p = 0.5), namely Bach. by the search algorithm. For the particle filter, we take the most likely solution from the final set of particles. Qualitatively, the results are as expected, with each algorithm dominating in the setting it is intended for: the particle filter is superior in terms of the filtering probability, while the beam search produces more probable solutions. Interestingly, given sufficiently large S, the best log probability exceeds the ground truth (4/4 fixed parts, red line). This indicates that either we are doing better than the original composer, or the probability under p does not fully reflect perceived quality. The listening test in subsection 4.3 indicates that the latter is of course most likely, although this does not necessarily imply that p is inadequate — see subsubsection 4.3.2 and footnote 4. Quantitatively, we see that around S = 500 paths are necessary in order to obtain good solutions (that the particle filter continues to improve for greater S in terms of the Figure 3 right hand side plot is to be expected since the algorithm does not explicitly search for the most likely sequence). The required number of paths is significantly more than reported by Sutskever et al. (2014), who observed marginal gains for S > 2. Broadly speaking, this difference is to be expected: locally, the best musical harmonisation may be highly ambiguous, requiring many paths to be maintained in order for the future fixed (or observed) notes to have a reasonable chance of resolving well in the musical sense. The machine translation problem considered by Sutskever et al. (2014) is less ambiguous, and furthermore future symbols (words) are not conditioned on as in our setting. 11 Walder Kim (a) (b) (c) (d) Hyper-link Description melody original beam search particle filter original melody line in isolation complete original composition melody line + beam search melody line + particle filter Table 1: Sample output based on the first movement of the Quartet No. 7 in E flat major by Mozart. In (a) the original melody line is rendered by itself with a piano timbre. In (b)—(d), three additional parts are rendered with a distinct classical guitar like timbre. 4.3. Human Listening Test We also investigated the effectiveness of our algorithms as judged by human evaluators, via an on-line survey using the Amazon Mechanical Turk 3 . 4.3.1. Methodology As the basis for the survey, we generated harmonisations as in the previous subsection 4.2, with the number of candidate paths S set to 4096. We excluded two of the sixteen pieces previously considered, due to the extended use of pure pedal point (repeating of a single note) in three out of four voices of the original compositions, leading to uninteresting constraints in the majority of cases. For each of the remaining fourteen pieces and for m ∈ {0, 1, 2, 3}, 4 we harmonised the pieces with m out of four voices fixed. As before, we did this all Cm possible ways, for both the particle filter and beam search methods. Each such output was compared with the original piece from which it was derived. This comparison was performed by ten unique human subjects per piece (not the same P ten for each piece; there were 67 unique respondents). This gave a grand total of 14 × 3n=0 Cn4 × 2 × 10 = 4200 comparisons, or — figuring conservatively at one minute per test — approximately 72 hours of listening. Each experiment presented the original and derived piece in random order, and asked the participant to decide which sounds better overall? To improve data quality we included two participant filters. First, we presented pieces with random notes drawn from uniform distribution over a four octave range, and excluded subjects who failed to do better than random at selecting the original piece over the random piece. Second, we tried to filter insincere subjects who responded in a very short time. 4.3.2. Findings A summary of the results is presented in Figure 4, which presents frequentist confidence intervals on the unknown binomial probability (Brown et al., 2002) of choosing our pieces as preferable to the original. Note that a probability (vertical axis) of greater than one half would imply that our results are on average preferable to the original piece. 3. http://www.mturk.com 12 Computer Assisted Composition Retained Part 4 (melody) 3 2 1 (bass) Particle Filter hyperlink (∼ d) hyperlink hyperlink hyperlink Beam Search hyperlink (c) hyperlink hyperlink hyperlink Table 2: Sample output based on the first movement of the Quartet No. 7 in E flat major by Mozart. Similarly to Table 1 (please see the corresponding caption), we retained a single part as composed by Mozart, and replaced the pitches in the remaining 3 voices. Retained Part: the part which we left unchanged from the original, from 4 (highest pitch) to 1 (lowest); Particle Filter: the sampling result; Beam Search: the beam search result. (c) is identical to that of Table 1, while (∼ d) is similar to (d) from Table 1, but used a different random seed. The most clear result is that with no fixed parts, the beam search algorithm tends to produce inferior results. This is in line with the experience of our informal experimentation with the beam search approach which, in the absence of fixed notes to condition on, tended to produce overly regular patterns featuring long sequences of repeated notes, etc. This is not an erroneous result, but rather a natural consequence of maximising the sequence probability, rather than sampling from the distribution.4 It is worth noting that this overly regular behaviour of the beam search may be observed not only in that case of unconditional sampling, but also in pieces where the parts being conditioned on feature sufficiently protracted periods of inactivity, during which the beam search is relatively unconstrained (see the illustrative examples in subsection 4.4). The particle filter does only slightly worse than parity with no fixed parts, but this effect is not significant based on these tests. Our own informal experimentation indicated that the fully unconstrained (no fixed parts) particle filter tends to occasionally finish pieces with poorly resolved harmonic movements — an observation partially corroborated by Figure 4. Interestingly, both algorithms perform well given even a single fixed part to condition on (with the particle filter performing slightly but consistently better overall). This is a broadly satisfactory result, which indicates the possibility of constructing convincing musical results by specifying a single voice (out of four), along with the rhythmic structure of the piece. 4.3.3. Discussion One goal of our work is to create tools which facilitate the advancement of the musical art form. We believe that this may be be possible, through creative manipulation of the constraint set by skilled humans. Ideally, we would leverage the super human ability of the computer to sift through large numbers of possible solutions. In this way, constraint sets 4. Informal thought experiment: consider the stochastic relationship yi = xi + N (0, 1). We imagine the analogy that the xi represent the timing and the yi the pitch of a set of notes making up a piece. The most likely yi given an xi is exactly yi = xi , and yet for a set {xi }n i=1 such a perfect straight line is in n some sense highly atypical of a sample from the conditional {yi }n i=1 |{xi }i=1 . 13 Walder Kim Algorithm 1: Sequential Monte Carlo for constrained non-Markov sequences, with systematic re-sampling (Carpenter et al., 1999). function ConstrainedSMC(S, {(fi , hi )}ni=1 ): for s ← 1, 2, . . . , S do x(s) ← () end for i ← 1, 2, . . . , n do for s ← 1, 2, . . . , S do (s) (s) sample xi ∼ q (A) (· | x1:i−1 ) initialise with empty sequence proposal (7) (s) x(s) ← (x(s) , xi ) P (s) (s) ws ← x̃i ∈X fi (x̃i |x1:i−1 )hi (x̃1:i ) end k1:S = SystematicResample(w1:S ) (x(s) )Ss=1 ← (x(ks ) )Ss=1 end return x(1:S) function SystematicResample(w1:S ): PS ω1:S ← w1:S / s=1 ws sample u ∼ Uniform([0, 1]) ū ← u/S; j ← 1; Sω ← ω1 for l ← 1, 2, . . . , S do while Sω < ū do j ←j+1 Sω ← Sω + ωj end kl ← j ū ← ū + 1/S end return k1:S append (8) duplicate/delete particles approximate samples x(1:S) from p(A) of (6) which are too complex and tightly coupled for human investigation may yield new musical forms. Evaluating such a scheme is beyond the present scope, likely requiring an entirely different approach than the simple listening test undertaken here (see Loughran and O’Neill (2016) for a discussion of the challenges). These experiments are intended merely to verify that our system can produce feasible solutions given a simplistic constraint set. 4.4. Illustrative Example Finally, in Table 1 we provide sample audio output from both the particle filter and beam search algorithms. To demonstrate the nature of the algorithms, we took a string quartet by Mozart, fixed the melody line, and re-harmonised the three remaining parts given their original rhythmic structure (note onset and offset times). The results are typical of the behaviour of the algorithms. In particular, the beam search produces more repetitive results than the particle filter. To demonstrate robustness, Table 2 provides further re-harmonisations. The methodology is identical to that of the previous paragraph; in this case however we vary which voice was fixed to the original composition of Mozart, while re-harmonising the remaining three. 14 Computer Assisted Composition 5. Conclusions We presented algorithms for combining sophisticated probabilistic models of polyphonic music with human input. We represent human input as a finite state machine which accepts allowed compositions. Such a constraint is rather general, and yet amenable both to sequential Monte Carlo (for sampling from implied conditional distribution) and beam search optimisation (for maximising the same conditional distribution). We demonstrated the efficacy of the methods both quantitatively and through a listening experiment with human subjects. When the constraints are highly permissive, it seems that conditional sampling should be preferred to probability maximisation, as the latter tends to produce overly regular results in this case. Furthermore, the two approaches lead to a different style of musical result, as exemplified by the included audio example. References Moray Allan and Christopher K. I. Williams. Harmonising chorales by probabilistic inference. Advances in Neural Information Processing Systems 17, 2005. Nicolas Boulanger-Lewandowski, Yoshua Bengio, and Pascal Vincent. Modeling temporal dependencies in high-dimensional sequences: Application to polyphonic music generation and transcription. In International Conference on Machine Learning, 2012. Lawrence D. Brown, T. Tony Cai, and Anirban DasGupta. Confidence intervals for a binomial proportion and asymptotic expansions. Annals of Statistics, 30(1):160–201, 2 2002. doi: 10.1214/aos/1015362189. J. Carpenter, P. Clifford, and P. Fearnhead. Improved particle filter for nonlinear problems. IEE Proc., Radar Sonar Navig., 146(1):2, 1999. Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, and Phillipp Koehn. One billion word benchmark for measuring progress in statistical language modeling. CoRR, abs/1312.3005, 2013. Florian Colombo, Samuel P. Muscinelli, Alex Seeholzer, Johanni Brea, and Wulfram Gerstner. Algorithmic composition of melodies with deep recurrent neural networks. In Computer Simulation of Musical Creativity, 2016. D. J. Daley and D. Vere-Jones. An Introduction to the Theory of Point Processes Volume I: Elementary Theory and Methods. Springer, second edition, 2003. ISBN 0-387-95541-0. Arnaud Doucet and Adam M Johansen. A tutorial on particle filtering and smoothing: Fifteen years later. Handbook of nonlinear filtering, 12(656-704):3, 2009. Douglas Eck and Juergen Schmidhuber. A first look at music composition using LSTM recurrent neural networks. Istituto Dalle Molle Di Studi Sull Intelligenza Artificiale, 2002. Brian Eno. Composers as gardeners. https://vimeo.com/55969912, 2011. Accessed: July 2015 (transcripts can be found online). 15 Walder Kim Jose D. Fernandez and Francisco J. Vico. Ai methods in algorithmic composition: A comprehensive survey. J. Artif. Intell. Res. (JAIR), 48:513–582, 2013. N.J. Gordon, D.J. Salmond, and A.F.M. Smith. Novel approach to nonlinear/non-Gaussian Bayesian state estimation. IEEE Proc. Radar and Signal Processing, 140(2):107–113, 1993. Gatan Hadjeres and Francois Pachet. Deepbach: a steerable model for bach chorales generation. In International Conference on Machine Learning, 2017. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, November 1997. ISSN 0899-7667. doi: 10.1162/neco.1997.9.8.1735. Roisin Loughran and Michael O’Neill. Generative music evaluation: Why do we limit to “human”? In Computer Simulation of Musical Creativity, 2016. Luigi Federico Menabrea and Ada Lovelace. Sketch of the analytical engine invented by charles babbage. Scientific Memoirs, pages 666–731, 1843. Lawrence M. Murray, Anthony Lee, and Pierre E. Jacob. Parallel resampling in the particle filter. Journal of Computational and Graphical Statistics, 2015. Gerhard Nierhaus. Algorithmic Composition: Paradigms of Automated Music Generation. Springer Publishing Company, Incorporated, 1st edition, 2008. Alexandre Papadopoulos, Francois Pachet, Pierre Roy, and Jason Sakellariou. Exact sampling for regular and markov constraints with belief propagation. In Principles and Practice of Constraint Programming, pages 341–350, 2015. Alexandre Papadopoulos, Francois Pachet, and Pierre Roy. Generating non-plagiaristic markov sequences with max order sampling. In Creativity and Univers. in Language, 2016. A.D. Patel. Music, Language, and the Brain. Oxford University Press, 2010. ISBN 9780198028772. Pierre Roy and Francois Pachet. Enforcing meter in finite-length markov sequences. In AAAI Conference on Artificial Intelligence, 2013. Ian Simon and Sageev Oore. Performance rnn: Generating music with expressive timing and dynamics. https://magenta.tensorflow.org/performance-rnn, 2017. Bob Sturm, João Felipe Santos, and Iryna Korshunova. Folk music style modelling by recurrent neural networks with long short term memory units. In ISMIR demo, 2015. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Neural Information Processing Systems 27, pages 3104–3112, 2014. Christian Walder. Modelling symbolic music: Beyond the piano roll. In The 8th Asian Conference on Machine Learning (ACML), pages 174–189, 2016. 16
2cs.AI
1 Neural Network Detection of Data Sequences in Communication Systems arXiv:1802.02046v2 [eess.SP] 19 Feb 2018 Nariman Farsad, Member, IEEE, and Andrea Goldsmith, Fellow, IEEE Abstract—We consider detection based on deep learning, and show it is possible to train detectors that perform well, without any knowledge of the underlying channel models. Moreover, when the channel model is known, we demonstrate that it is possible to train detectors that do not require channel state information (CSI). In particular, a technique we call sliding bidirectional recurrent neural network (SBRNN) is proposed for detection where, after training, the detector estimates the data in realtime as the signal stream arrives at the receiver. We evaluate this algorithm, as well as other neural network (NN) architectures, using the Poisson channel model, which is applicable to both optical and chemical communication systems. In addition, we also evaluate the performance of this detection method applied to data sent over a chemical communication platform, where the channel model is difficult to model analytically. We show that SBRNN is computationally efficient, and can perform detection under various channel conditions without knowing the underlying channel model. We also demonstrate that the bit error rate (BER) performance of the proposed SBRNN detector is better than that of a Viterbi detector with imperfect CSI as well as that of other NN detectors that have been previously proposed. Index Terms—Machine learning, deep learning, supervised learning, communication systems, detection, molecular communication. I. I NTRODUCTION NE of the important modules in reliable recovery of data sent over a communication channel is the detection algorithm, where the transmitted signal is estimated from a noisy and corrupted version observed at the receiver. The design and analysis of this module has traditionally relied on mathematical models that describe the transmission process, signal propagation, receiver noise, and many other components of the system that affect the end-to-end signal transmission and reception. Most communication systems today convey data by embedding it into electromagnetic (EM) signals, which lend themselves to tractable channel models based on a simplification of Maxwell’s equations. However, there are cases where tractable mathematical descriptions of the channel are elusive, either because the EM signal propagation is very complicated or when it is poorly understood. In addition, there are communication systems that do not use EM wave signalling and the corresponding communication channel models may be unknown or mathematically intractable. Some examples of the latter includes underwater communication using acoustic signals [1] as well as molecular communication, which relies on chemical signals to interconnect tiny devices with sub-millimeter dimensions in environments such as inside the human body [2]–[5]. O Nariman Farsad and Andrea Goldsmith are with the Department of Electrical Engineering, Stanford University, Stanford, CA, 94305. Emails: [email protected], [email protected] Even when the underlying channel models are known, since the channel conditions may change with time, many model-based detection algorithms rely on the estimation of the instantaneous channel state information (CSI) (i.e., channel model parameters) for detection. Typically, this is achieved by transmitting and receiving a predesigned pilot sequence, which is known by the receiver, for estimating the CSI. However, this estimation process entails overhead that decreases the data transmission rate. Moreover, the accuracy of the estimation may also affect the performance of the detection algorithm. In this paper, we investigate how different techniques from artificial intelligence and deep learning [6]–[8] can be used to design detection algorithms for communication systems that learn directly from data. We show that these algorithms are robust enough to perform detection under changing channel conditions, without knowing the underlying channel models or the CSI. This approach is particularly effective in emerging communication technologies, such as molecular communication, where accurate models may not exist or are difficult to derive analytically. For example, tractable analytical channel models for signal propagation in chemical communication channels with multiple reactive chemicals have been elusive [9]–[11]. Some examples of machine learning tools applied to design problems in communication systems include multiuser detection in code-division multiple-access (CDMA) systems [12]–[15], decoding of linear codes [16], design of new modulation and demodulation schemes [17], [18], detection and channel decoding [19]–[24], and estimating channel model parameters [25], [26]. A recent survey of machine learning techniques applied to communication systems can be found in [27]. The approach taken in most of these previous works was to use machine learning to improve one component of the communication system based on the knowledge of the underlying channel models. Our approach is different from prior works since we assume that the mathematical models for the communication channel are completely unknown. This is motivated by the recent success in using deep neural networks (NNs) for end-to-end system design in applications such as image classification [28], [29], speech recognition [30]–[32], machine translation [33], [34], and bioinformatics [35]. For example, Figure 1 highlights some of the similarities between speech recognition, where deep NNs have been very successful at improving the detector’s performance, and wireless as well as molecular communication systems. As indicated in the figure, for speech processing, the transmitter is the speaker, the transmission symbols are words, and the carrier signal is acoustic waves. At the receiver the goal of the detection algorithm is to 2 '" '$ !" , !$ , ⋯ , !& words )" ,)$ , ⋯ , )& data bits ⋯ Detection Algorithm estimated words Signal Propagation Detection Algorithm estimated bits Detection Algorithm estimated bits Signal Propagation data bits chemical emitter ! (" , ! ($ , ⋯ , ! (& Signal Propagation '" '$ ⋯ )" ,)$ , ⋯ , )& '& )*" , )*$ , ⋯ , )*& '& )*" , )*$ , ⋯ , )*& chemical receiver Fig. 1: Similarities between speech recognition and digital communication systems. recover the sequence of transmitted words from the acoustic signals that are received by the microphone. Similarly, in communication systems, such as wireless or chemical communications, the transmitted symbols are bits and the carrier signals are EM waves or chemical signals. At the receiver the goal of the detection algorithm is to detect the transmitted bits from the received signal. One important differences between communication systems and a speech recognition is the size of transmission symbol set, which is significantly larger for speech. Motivated by this similarity, in this work we investigate how techniques from deep learning can be used to train a detection algorithm from samples of transmitted and received signals. We demonstrate that, using known NN architectures such as a recurrent neural network (RNN), it is possible to train a detector without any knowledge of the underlying system model. In this approach, the receiver goes through a training phase where a NN detector is trained using known transmission signals. We also propose a real-time NN sequence detector, which we call the sliding bidirectional RNN (SBRNN) detector, that detects the symbols corresponding to a data stream as they arrive at the destination. We demonstrate that if the SBRNN detector or the other NN detectors considered in this work are trained using a diverse dataset that contains transmission sequences in different channel conditions, the detectors will be robust to changing channel conditions, eliminating the need for instantaneous CSI estimation. At first glance, the training phase in this approach may seem like an extra overhead. However, if the underlying channel models are known, then the models could be used offline to generate training data under a diverse set of channel conditions. We demonstrate that using this approach, it is possible to train our SBRNN algorithm such that it would not require any instantaneous CSI. Another important benefit of using NN detectors in general is that they return likelihoods for each symbol. These likelihoods can be fed directly from the detector into a soft decoding algorithm such as the belief propagation algorithm without requiring a dedicated module to convert the detected symbols into likelihoods. To evaluate the performance of NN detectors, we first use the Poisson channel model, a common model for optical channels and molecular communication channels [36]–[41]. We use this model to compare the performance of the NN detection to the Viterbi detector (VD). We show that for channels with long memories the SBRNN detection algorithm is computationally more efficient than the VD. Moreover, the VD requires CSI estimation, and its performance can degrade if this estimate is not accurate, while the SBRNN detector can perform detection without the CSI, even in a channel with changing conditions. We show that the bit error rate (BER) performance of the proposed SBRNN is better than the VD with CSI estimation error and it outperforms other wellknown NN detector such as the RNN detector. As another performance measure, we use the experimental data collected by the molecular communication platform presented in [42]. The mathematical models underlying this experimental platform are currently unknown. We demonstrate that the proposed SBRNN algorithm can be used to train a sequence detector directly from limited measurement data. We also demonstrate that this approach perform significantly better than the detector used in previous experimental demonstrations [43], [44], as well as other NN detectors. The rest of the paper is organized as follows. In Section II we present the problem statement. Then, in Section III, detection algorithms based on NN are introduced including the newly proposed SBRNN algorithm. The Poisson channel model and the VD are introduced in Section IV. The performance of the NN detection algorithms are evaluated using this channel model and are compared against the VD in Section V. In Section VI, the performance of NN detection algorithms are evaluated using a small data set that is collected via an experimental platform. Concluding remarks are provided in Section VII. II. P ROBLEM S TATEMENT In a digital communication system data is converted into a sequence of symbols for transmission over the channel. This 3 Channel data Source' Encoder Channel' Encoder !1 , !2 , …& Signal' Transmission Signal' Propagation Signal' Reception '1 , '2 , …& Detection' Algorithm !(1 , !(2 , …& Channel' Decoder Source' Decoder Recovered. Data Fig. 2: Block diagram for digital communication systems. process is typically carried out in two steps: in the first step, source coding is used to compress or represent the data using symbols or bits; in the second step, channel coding is used to introduce extra redundant symbols to mitigate the errors that may be introduced as part of the transmission and reception of the data [45]. Let S = {s1 , s2 , · · · , sm } be the finite set of symbols that could be sent by the transmitter, and xk ∈ S be the k th symbol that is transmitted. The channel coding can be designed such that the individual symbols in a long sequence are drawn according to the probability mass function (PMF) PX (x). The signal that is observed at the destination is noisy and corrupted due to the perturbations introduced as part of transmission, propagation, and reception processes. We refer to these three processes collectively as the communication channel or simply the channel. Let the random vector yk of length ` be the observed signal at the destination during the k th transmission. Note that the observed signal yk is typically a vector while the transmitted symbol xk is typically a scalar. A detection algorithm is then used to estimate the transmitted symbols from the observed signal at the receiver. Let x̂k be the symbol that is estimated for the k th transmitted symbol xk . After detection, the estimated symbols are passed to a channel decoder to correct some of the errors in detection, and then to a source decoder to recover the data. All the components of a communication system, shown in Figure 2, are designed to ensure reliable data transfer. Typically, to design these modules, mathematical channel models are required, which describe the relationship between the transmitted symbols and the observed signal through Pmodel (y1 , y2 , · · · | x1 , x2 , · · · ; Θ), (1) where Θ are the model parameters. Some of these parameters can be static (constants that do not change with channel conditions) and some of them can dynamically change with channel conditions over time. In this work, model parameters are considered to be the parameters that change with time. Hence, we use the terms model parameter and instantaneous CSI interchangeably. Using this model, the detection can be performed through symbol-by-symbol detection, where x̂k is estimated from yk , or using sequence detection where the sequence x̂k , x̂k−1 , · · · , x̂1 is estimated from the sequence yk , yk−1 , · · · , y1 1 . As an example, for a simple channel with no intersymbol interference (ISI), given by the channel model Pmodel (yk | xk ; Θ), and a known PMF for the transmission symbols PX (x), a maximum a posteriori estimation (MAP) 1 Note that the sequence of symbols x̂ , x̂ k k−1 , · · · , x̂1 can also be estimated from yk+` , yk+`−1 , · · · , y1 for some integer `. However, to keep the notation simpler, without loss of generality we assume ` = 0. algorithm can be devised as x̂k = arg max Pmodel (yk | x; Θ)PX (x). (2) x∈S Therefore for detection, both the model and the parameters of the model Θ, which may change with time, are required. For this reason, many detection algorithms periodically estimate the model parameters (i.e., the CSI) by transmitting known symbols and then using the observed signals at the receiver for CSI estimation [46]. This extra overhead leads to a decrease in the data rate. One way to avoid CSI estimation is by using blind detectors. These detectors typically assume a particular probability distribution over Θ, and perform the detection without estimating the instantaneous CSI at the cost of higher probability of error. However, estimating the joint distribution over all model parameters Θ can also be difficult, requiring a large amount of measurement data under various channel conditions. One of the problems we consider in this work is whether NN detectors can learn this distribution during training, or learn to simultaneously estimate the CSI and detect the symbols. This approach results in a robust detection algorithm that performs well under different and changing channel conditions without any knowledge of the channel models or their parameters. When the underlying channel models do not lend themselves to computationally efficient detection algorithms, or are partly or completely unknown, the best approach to designing detection algorithms is unclear. For example, in communication channels with memory, the complexity of the optimal VD increases exponentially with memory length, and quickly becomes infeasible for systems with long memory. Note that the VD also relies on the knowledge of the channel model in terms of its input-output transition probability. As another example, tractable channel models for chemical communication channels with multiple reactive chemicals are unknown [9]–[11]. We propose that in these scenarios, a data driven approach using deep learning is an effective way to train detectors to determine the transmitted symbols directly using known transmission sequences. III. D ETECTION U SING D EEP L EARNING Estimating the transmitted symbol from the received signals can be performed using NN architectures through supervised learning. This is achieved in two phases. First, a training dataset is used to train the NN offline. Once the network is trained, it can be deployed and used for detection. Note that the training phase is performed once offline, and therefore, it is not part of the detection process after deployment. We start this section by describing the training process. 4 (" ' Dense Layer (softmax) Dense Layer (softmax) ⋮ ⋮ Dense Layer 2 Pooling Layer #& (")$ ' (" ' (&) *")$ ⋯ #$ Dense Layer 1 Conv Layer(s) !" !" (" ' Dense softmax ($) *")$ ⋮ RNN Layer 2 RNN Layer 1 !")$ (a) (b) Symbol-by-Symbol Detec. (&) *" ($) *" ⋮ RNN Layer 2 Dense softmax (&) *".$ ⋮ RNN Layer 2 ($) RNN Layer 1 ($ ' (".$ ' Dense softmax *".$ !" ($) RNN Layer 1 !".$ *".& ⋮ ⋮ RNN-B Layer 1 ⋯ ⃗*($) 0 ⃗ ($) RNN-F * $ Layer 1 !$ (3 ' Dense softmax Merge (&) *".& (& ' Dense softmax ⋯ ⋮ ⋯ Merge ⃖*($) RNN-B ⃖*($) 2)$ 2)& Layer 1 RNN-F Layer 1 Dense softmax ⃗*($) & ⋯ !& Merge ⋯ ⃗*($) 2)$ ⃖*($) $ RNN-B Layer 1 ⃖*($) 0 RNN-F Layer 1 !3 (c) (d) Sequence Detection Fig. 3: Different neural network architectures for detection. A. Training the Detector Let m = |S| be the cardinality of the symbol set, and let pk be the one-of-m representation of the symbol transmitted during the k th transmission, given by  | pk = 1(xk = s1 ), 1(xk = s2 ), · · · , 1(xk = sm ) , (3) where 1(.) is the indicator function. Therefore, the element corresponding to the symbol that is transmitted is 1, and all other elements of pk are 0. Note that this is also the PMF of the transmitted symbol during the k th transmission where, at the transmitter, with probability 1, one of the m symbols is transmitted. Also note that the length of the vector pk is m, which may be different from the length of the vector of the observation signal yk at the destination. The detection algorithm goes through two phases. In the first phase, known sequences of symbols form S are transmitted repeatedly and received by the system to create a set of training data. The training data can be generated by selecting the transmitted symbols randomly according to a PMF, and generating the corresponding received signal using mathematical models, simulations, experimental measurements, or field measurements. Let PK = [p1 , p2 , · · · , pK ] be a sequence of K consecutively transmitted symbols (in the one-of-m encoded representation), and YK = [y1 , y2 , · · · , yK ] the corresponding sequence of observed signals at the destination. Then, the training dataset is represented by (1) (1) (2) (2) {(PK1 , YK1 ), (PK2 , YK2 ), · · · (n) (n) , (PKn , YKn )}, (4) which consists of n training samples, where the ith sample has Ki consecutive transmissions. This dataset is then used to train a deep NN classifier that maps the received signal yk to one of the transmission symbols in S. The input to the NN can be the raw observed signals yk , or a set of features rk extracted from the received signals. The NN output are the vectors p̂k = NN(yk ; W), where W are the parameters of the NN. Using the above interpretation of pk as a probability vector, p̂k are the estimations of the probability of xk given the observations and the parameters of the NN. Note that this output is also useful for soft decision channel decoders (i.e., decoders where the decoder inputs are PMFs), which are typically the next module after detection as shown in Figure 2. If channel coding is not used, the symbol is estimated using x̂k = arg maxxk ∈S p̂k . During the training, known transmission sequences of symbols are used to find the optimal set of parameters for the NN W ∗ such that W ∗ = arg min L (pk , p̂k ), (5) W where L is the loss function. This optimization algorithm is typically solved using the training data, variants of stochastic gradient decent, and back propagation [7]. Since the output of the NN is a PMF, the cross-entropy loss function can be used for this optimization [7]: Lcross = H(pk , p̂k ) = H(pk ) + DKL (pk k p̂k ) , (6) where H(pk , p̂k ) is the cross entropy between the correct PMF and the estimated PMF, and DKL (. k .) is the KullbackLeibler divergence [47]. Note that minimizing the loss is equivalent to minimizing the cross-entropy or the KullbackLeibler divergence distance between the true PMF and the one estimated based on the NN. It is also equivalent to maximizing the log-likelihoods. Therefore, during the training, known transmission data are used to train a detector that maximizes log-likelihoods. Using Bayes’ theorem, it is easy to show that minimizing the loss is equivalent to maximizing (2). We now discuss how several well-known NN architectures can be used for symbol-by-symbol detection and for sequence detection. B. Symbol-by-Symbol Detectors The most basic NN architecture that can be employed for detection uses several fully connected NN layers followed by a final softmax layer [6], [7]. The input to the first layer is the observed signal yk or the feature vector rk , which is selectively extracted from the observed signal through preprocessing. The output of the final layer is of length m (i.e., the cardinality the symbol set), and the activation function for the final layer is the softmax activation. This ensures that the output of the layer p̂k is a PMF. Figure 3(a) shows the structure of this NN. A more sophisticated class of NNs that is used in processing complex signals such as images is a convolution neural network (CNN) [6], [48], [49]. Essentially, the CNN is a set of filters that are trained to extract the most relevant features for detection from the received signal. The final layer in the CNN detector is a dense layer with output of length m, and a softmax activation function. This results in an estimated p̂k 5 from the set of features that are extracted by the convolutional layers in the CNN. Figure 3(b) shows the structure of this NN. For symbol-by-symbol detection the estimated PMF p̂k is given by | x̂k = [PNN (xk = s1 |yk ), PNN (xk = s2 |yk ), · · · , PNN (xk = sm |yk )] , (7) where PNN is the probability of estimating each symbol based on the NN model used. The better the structure of the NN at capturing the physical channel characteristics based on Pmodel in (1), the better this estimate and the results. C. Sequence Detectors The symbol-by-symbol detector cannot take into account the effects of ISI between symbols. In this case, sequence detection can be performed using recurrent neural networks (RNN) [6], [7], which are well established for sequence estimation in different problems such as neural machine translation [33], speech recognition [30], or bioinformatics [35]. The estimated p̂k in this case is given by   PRNN (xk = s1 |yk , yk−1 , · · · , y1 )  PRNN (xk = s2 |yk , yk−1 , · · · , y1 )    (8) p̂k =  , ..   . PRNN (xk = sm |yk , yk−1 , · · · , y1 ) where PRNN is the probability of estimating each symbol based on the NN model used. In this work, we use long short-term memory (LSTM) networks [50], which have been extensively used in many applications. Figure 3(c) shows the RNN structure. One of the main benefits of this detector is that after training, similar to a symbol-by-symbol detector, it can perform detection on any data stream as it arrives at the receiver. This is because the observations from previous symbols are summarized as the state of the RNN, which is represented by the vector hk . Note that the observed signal during the j th transmission slot, yj where j > k, may carry information about the k th symbol xk due to delays in signal arrival which results in ISI. However, since RNNs are feed-forward only, during the estimation of p̂k , the observation signal yj is not considered. One way to overcome this limitation is by using bidirectional RNNs (BRNNs), where the sequence of received signals are once fed in the forward direction into one RNN cell and once fed in backwards into another RNN cell [51]. The two outputs are then concatenated and may be passed to more bidirectional layers. Figure 3(d) shows the BRNN structure. For a sequence of length L, the estimated p̂k for BRNN is given by   PBRNN (xk = s1 |yL ,yL−1 ,· · · ,y1 ) PBRNN (xk = s2 |yL ,yL−1 ,· · · ,y1 )   p̂k =  (9) , ..   . PBRNN (xk = sm |yL ,yL−1 ,· · · ,y1 ) where k ≤ L. In this work we use the bidirectional LSTM (BLSTM) networks [52]. The BRNN architecture ensures that in the estimation of a symbol, future signal observations are taken into account, Block Detector BRNN BRNN BRNN Stream of ! ! ! ! ! ! ! ! ! Observed Signals 1 # $ % & ' ( ) * Sliding BRNN Detector … BRNN BRNN BRNN Fig. 4: The sliding BRNN detector. thereby overcoming the limitations of RNNs. The main tradeoff is that as signals from a data stream arrive at the destination, the block length L increases, and the whole block needs to be re-estimated again for each new data symbol that is received. Therefore, this quickly becomes infeasible for long data streams. In the next section we present a new technique to solve this issue. D. Sliding BRNN Detector Since the data stream that arrives at the receiver can have any arbitrary length, it is not desirable to detect the whole sequence for each new symbol that arrives, as the sequence length could grow arbitrarily large. Therefore, we fix the maximum length of the BRNN. Ideally, the length must be at least the same size as the memory length of the channel. However, if this is not known in advance, the BRNN length can be treated as a hyperparameter to be tuned during training. Let L be the maximum length of the BRNN. Then during training, blocks of ` ≤ L consecutive transmissions are used for training. Note that sequences of different length could be used during training as long as all sequence lengths are smaller than or equal to L. After training, the simplest scheme would be to detect the stream of incoming data in fixed blocks of length ` ≤ L as shown in the top portion of Figure 4. The main drawback here is that the symbols at the end of each block may affect the symbols in the next block, and this relation is not captured in this scheme. Another issue is that ` consecutive symbols must be received before detection can be performed. The top portion of Figure 4, shows this scheme for ` = 3. To overcome these limitations, inspired by some of the techniques used in speech recognition [53], we propose a dynamic programing scheme we call the sliding BRNN (SBRNN) detector. In this scheme the first ` ≤ L symbols are detected using the BRNN. Then as each new symbol arrives at the destination, the position of the BRNN slides ahead by one symbol. Let the set Jk = {j | j ≤ k ∧ j + L > k} be the set of all valid starting positions for a BRNN detector of length L, such that the detector overlaps with the k th symbol. For example, if L = 3 and k = 4, then j = 1 is not in the set Jk since the BRNN detector overlaps with symbol positions 1, 2, (j) and 3, and not the symbol position 4. Let p̂k be the estimated PMF for the k th symbol, when the start of the sliding BRNN is on j ∈ Jk . The final PMF corresponding to the k th symbol is given by the weighted sum of the estimated PMFs for each of the relevant windows: 1 X (j) p̂k . (10) p̂k = |Jk | j∈Jk 6 One of the main benefits of this approach is that, after the first L symbols are received and detected, as the signal corresponding to a new symbol arrives at the destination, the detector immediately estimates that symbol. The detector also updates its estimate for the previous L − 1 symbols dynamically. Therefore, this algorithm is similar to a dynamic programming algorithm. The bottom portion of Figure 4 illustrates the sliding BRNN detector. In this example, after the first 3 symbols arrive, the PMF for the first three symbols, i ∈ {1, 2, 3}, is given by (1) p̂i = p̂i . When the 4th symbol arrives, the estimate of the first symbol is unchanged, but for i ∈ {2, 3}, the second and (1) (2) third symbol estimates are updated as x̂i = 12 (x̂i + x̂i ), (2) and the 4th symbol is estimated by p̂4 = p̂4 . Note that although in this paper we assume that the weights of all (j) p̂k are the same (i.e., |J1k | ), the algorithm can use different weights. Moreover, the complexity of the SBRNN increases linearly with the length of the BRNN window, and hence with the memory length. To evaluate the performance of all these NN detectors, we use both the Poisson channel model (a common model for optical and chemical communication systems) as well as an experimental platform for chemical communication where the underlying model is unknown [42]. The sequel discusses more details of the Poisson model and experimental platform, and how they were used for performance analysis of our proposed techniques. IV. T HE P OISSON C HANNEL M ODEL The Poisson channel has been used extensively to model different communication systems in optical and molecular communication [36]–[41]. In these systems, information is encoded in the intensity of the photons or particles released by the transmitter and decoded from the intensity of photons or particles observed at the receiver. In the rest of this section, we refer to the photons, molecules, or particles simply as particles. We now describe this channel, and a VD for the channel. In our model it is assumed that the transmitter uses on-offkeying (OOK) modulation, where the transmission symbol set is S = {0, 1}, and the transmitter either transmits a pulse with a fixed intensity to represent the 1-bit or no pulse to represent the 0-bit. Note that OOK modulation has been considered in many previous works on optical and molecular communication and has been shown to be the optimal input distribution for a large class of Poisson channels [54]–[56]. Let τ be the symbol interval, and xk ∈ S the symbol corresponding to the k th transmission. We assume that the transmitter can measure the number of particles that arrive at a sampling rate of ω samples per second. Then the number of samples in a given symbol duration is given by a = ωτ , where we assume that a is an integer. Let λ(t) be the system response to a transmission of the pulse corresponding to the 1-bit. For optical channels, the system response is proportional !" !" !" !" !" !" !" !" !" !" Fig. 5: A sample system response for optical and molecular channels. Left: Optical channel with λ(t) for N = 1, κOP = 1, α = 2, β = 0.2, τ = 0.2 µs, and ω = 20 MS/s. At τ = 0.2 µs, much of the intensity from the current transmission will arrive during future symbol intervals. Right: Molecular channel with κMO = 1, c = 8, µ = 40, τ = 2 s, and ω = 2 S/s. Molecular channel response has a loner tail than optical channel. to the Gamma distribution, and given by [57]–[59]: ( −α α−1 t exp(−t/β) t > 0 κOP β Γ(α) , λOP (t) = 0 t≤0 (11) where κOP is the proportionality constant, and α and β are parameters of the channel, which can change over time. For molecular channels, the system response is proportional to the inverse Gaussian distribution [39], [40], [60], [61] given by: h i ( p c c(t−µ)2 κMO 2πt t>0 3 exp − 2µ2 t , (12) λMO (t) = 0 t≤0 where κMO is the proportionality constant, and c and µ are parameters of the channel, which can change over time. Since the receiver samples the data at a rate of ω, for k ∈ N and j ∈ {1, 2, · · · , a}, let   j + ka λk [j] , λ (13) ω be the average intensity observed during the j th sample of the k th symbol in response to the transmission pulse corresponding to the 1-bit. Figure 5 shows the system response for both optical and molecular channels. Although for optical channels the symbol duration is many orders of magnitude smaller than molecular channel, the system responses are very similar in shape. Some notable differences are a faster rise time for the optical channel, and a longer tail for the molecular channel. The system responses are used to formulate the Poisson channel model. Particularly, the intensity that is observed during the j th sample of the k th symbol is distributed according to ! k X yk [j] ∼ P xk−i λi [j] + η , (14) i=0 where η is the mean of an independent additive Poisson noise due to background interference and/or the receiver noise. Using this model, the signal that is observed by the receiver, for any sequence of bit transmissions, can be generated as illustrated in Figure 6. This signal has a similar structure to the signal observed using the experimental platform in [43, see 7 1 0 1 0 1 1 0 0 1 1 1 0 0 0 Fig. 6: The observed signal for the transmission of the bit sequence 10101100111000 for κMO = 100, c = 8, µ = 40, τ = 1, ω = 100 Hz, and η = 1. Figure 13], although this analytically-modeled signal exhibits more noise. The model parameters (i.e., the CSI) for the Poisson channel model are ΘOP = [α, β, η] and ΘMO = [c, µ, η], respectively for optical and molecular channels. In this work, we assume that the sampling rate ω, and the proportionality constants κOP and κMO are fixed and are not part of the model parameters. Note that α and β can change over time due to atmospheric turbulence or mobility. Similarly, c and µ are functions of the distance between the transmitter and the receiver, flow velocity, and the Diffusion coefficient, which may change over time, e.g., due to variations in temperature and pressure [5]. The background noise η may also change with time. Note that although the symbol interval τ may be changed to increase or decrease the data rate, both the transmitter and receiver must agree on the value of τ . Thus, we assume that the value of τ is always known at the receiver, and therefore, it is not part of the CSI. In the next subsection, we present the optimal VD, assuming that the receiver knows all the model parameters ΘOP and ΘMO perfectly. within the current bit interval are generated independently and distributed according to (15). Note that (16) holds only if the memory length M is known perfectly. If the estimate of M is inaccurate, then (16) is also inaccurate. Let V = {v0 , v1 , · · · , v2M −1 } be the set of states in the trellis of the VD, where the state vu corresponds to the previous M transmitted bits [x−M , x−M +1 , · · · , x−1 ] forming the binary representation of u. Let x̂k , 1 ≤ k ≤ K be the information bits to be estimated. Let Vk,u be the state corresponding to the k th symbol interval, where u is the binary representation of [x̂k−M , x̂k−M +1 , · · · , x̂k−1 ]. Let L(Vk,u ) denote the log-likelihood of the state Vk,u . For a state Vk+1,u = [x̂k−M +1 , x̂k−M +2 , · · · , x̂k ], there are two states in M the set {Vk,i }2i=0−1 that can transition to Vk+1,u : u0 = b u2 c, u1 = b u2 c (17) +2 M −1 , (18) where b.c is the floor function. Let the binary vector bu0 = [0, x̂k−M +1 , x̂k−M +2 , · · · , x̂k−1 ] be the binary representation of u0 and similarly bu1 the binary representation of u1 . The log-likelihoods of each state in the next symbol slot are updated according to L(Vk+1,u ) = max[L(Vk,u0 ) + L(Vk,u0 , Vk+1,u ), L(Vk,u1 ) + L(Vk,u1 , Vk+1,u )], (19) where L(Vk,ui , Vk+1,u ), i ∈ {0, 1}, is the log-likelihood increment of transitioning from state Vk,ui to Vk+1,u . Let Λui ,u [j] = (u mod 2)λ0 [j]+ M X bui [M −l+1]λl [j]+η. l=1 (20) Using the PMF of the Poisson distribution, (15), (16), and (20) we have a a X X log(Λui ,u [j])yk [j], Λui ,u [j]+ L(Vk,ui , Vk+1,u ) = − j=1 j=1 (21) Pa A. The Viterbi Detector The VD assumes a certain memory length M where the current observed signal is affected only by the past M transmitted symbols. In this case, (14) becomes ! M X yk [j] ∼ P xk λ0 [j] + xk−l λl [j] + η . (15) l=1 Since the marginal distribution of the j th sample of the k th symbol is Poisson distributed according to (15), given the model parameters Θpois , we have P (yk | xk−M ,xk−M +1 , · · · , xk , Θpois ) = a Y P (yk [j] | xk−M , xk−M +1 , · · · , xk , Θpois ). where the extra term − j=1 log(yk [j]!) is dropped since it will be the same for both transitions from u0 and u1 . Using these transition probabilities and setting the L(V0,0 ) = 0 and L(V0,u ) = −∞, for u 6= 0, the most likely sequence x̂k , 1 ≤ k ≤ K, can be estimated using the Viterbi algorithm [62]. When the memory length is long, it is not computationally feasible to consider all the states in the trellis as they grow exponentially with memory length. Therefore, in this work we implement the Viterbi beam search algorithm [63]. In this scheme, at each time slot, only the transition from the previous N states with the largest log-likelihoods are considered. When N = 2M , the Viterbi beam search algorithm reduces to the traditional Viterbi algorithm. We now evaluate the performance of NN detectors using the Poisson channel model. j=1 (16) This is because, given the model parameters as well as the current symbol and the previous M symbols, the samples V. E VALUATION BASED ON P OISSON C HANNEL In this section we evaluate the performance of the proposed SBRNN detector. First, we use the Poisson channel model to 8 TABLE I: Performance of the VD beam search as function of N . The optical channel results is obtained using ΘOP = [β = 0.2, η = 1] and τ = 0.025 µs and the molecular channel results using ΘMO = [c = 8, µ = 40, η = 100] and τ = 0.5 s. N Opti. VD 0.0% error Opti. VD 2.5% error Opti. VD 5.0% error Mole. VD 0.0% error Mole. VD 2.5% error Mole. VD 5.0% error 10 100 200 500 1000 0.0466 0.226 0.4036 0.00466 0.0066 0.41792 0.03937 0.175 0.385 0.00398 0.0055 0.34667 0.03972 0.17561 0.38519 0.00464 0.00524 0.30424 0.03906 0.15889 0.39538 0.00448 0.0056 0.29314 0.03972 0.1509 0.36 0.00432 0.00582 0.30588 compare the performance of the SBRNN to an RNN detector, the VD detector with perfect CSI estimates, and the VD with imperfect CSI estimates. We demonstrate that unlike the RNN detector, the SBRNN detector is robust to changing channel conditions and can outperform the VD with CSI estimation error. Second, we use the experimental platform developed in [42] to demonstrate that the SBRNN detector, which does not require any underlying analytical channel model, can be implemented in practice to perform real-time detection. In particular, we use the experimental data collected on the platform to train and implement the SBRNN as part of a chemical communication system for real-time text messaging. We show that SBRNN outperforms all the other NN detectors we consider in terms of BER performance. For evaluating the performance of the SBRNN on the Poisson channel, we consider both the optical channel and the molecular channel. For the optical channel, we assume that the channel parameters are ΘOP = [β, η], and assume α = 2 and κOP = 10. We use these values for α and κOP since they resulted in system responses that resembled the ones presented in [57]–[59]. For the molecular channel the model parameters are ΘMO = [c, µ, η], and κMO = 104 . The value of κMO was selected to resemble the system response in [43]. For the optical channel we use ω = 2 GS/s and for the molecular channel we use ω = 100 S/s. For the VD algorithm we consider Viterbi with beam search, where only the top N = 100 states with the largest loglikelihoods are kept in the trellis during each time slot. We also consider two different scenarios for CSI estimation. In the first scenario we assume that the detector estimates the CSI perfectly, i.e., the values of the model parameters ΘOP and ΘMO are known perfectly at the receiver. In practice, it may not be possible to achieve perfect CSI estimation. In the second scenario we consider the VD with CSI estimation error. Let ζ be a parameter in ΘOP or ΘMO . Then the estimate of this parameter is simulated by ζ̂ = ζ + Z, where Z is a zero-mean Gaussian noise with a standard divination that is 2.5% or 5% of ζ. In the rest of this section, we refer to these cases as the VD with 2.5% and 5% error, and the case with perfect CSI as the VD with 0% error. Table I shows the BER performance of the VD for different values of N . It can be seen that N = 100, which is used in the rest of this section, is sufficient to achieve good performance with the VD. Both the RNN and the SBRNN detectors use LSTM cells [50]. For the SBRNN, the size of the output is 80. For the RNN, since the SBRNN uses two RNNs, one for the forward direction and one for the backward direction, the size of the output is 160. This ensures that the SBRNN detector and the RNN detector have roughly the same number of parameters. The number of layers used for both detectors in this section is 3. The input to the NNs are a set of normalized features rk extracted from the received signal yk . The feature extraction algorithm is described in appendix. This feature extraction step normalizes the input, which assists the NNs to learn faster from the data [7]. To train the RNN and SBRNN detectors, transmitted bits are generated at random and the corresponding received signal is generated using the Poisson model in (14). In particular, the training data consists of many samples of sequences of 100 consecutively transmitted bits and the corresponding received signal. Since in this work we focus on uncoded communication, we assume the occurrence of both bits in the transmitted sequence are equiprobable. For each sequence, the CSI are selected at random. Particularly, for the optical channel, for each 100-bit sequence, β ∼ U ({0.15, 0.16, 0.17, · · · , 0.3}), η ∼ U ({1, 10, 20, 50, 100, 200, 500}), τ ∼ U ({0.025, 0.05, 0.075, 0.1})(all in µs), where U (A) indicates uniform distribution over the set A. Similarly, for molecular channel, c ∼ U ({1, 2, · · · , 30}), µ ∼ U ({5, 10, 15, · · · , 65}), η ∼ U ({1, 50, 100, 500, 1k, 5k, 10k, 20k, 30k, 40k, 50k}), τ ∼ U ({0.5, 1, 1.5, 2})(all in s). For the SBRNN training, each 100-bit sequence is randomly broken into subsequences of length L ∼ U ({2, 3, 4, · · · , 50}). For all training, the Adam optimization algorithm [64] is used with the learning rate 10−3 , and the batch size is 500. We train on 500k sequences of 100 bits. First, we evaluate the BER performance with respect to the memory length M used in the VD, and the sequence length L used in the SBRNN. For all the BER performance plots in this section, to calculate the BER, 1000 sequences of 100 random bits are used. Figure 7(a) shows the results for the optical (top plots) and the molecular (bottom plots) channels with the parameters described above. From the results it is clear that the performance of the VD relies heavily on estimating the memory length of the system correctly. If this estimate is inaccurate, the SBRNN algorithm outperforms the VD with perfect CSI. We also observe that the SBRNN achieves a better BER when there is a CSI estimation error of 2.5% or more. Note that the RNN detector does not have a parameter that depends on the memory length and has a significantly larger BER compared to the SBRNN. For the optical channel, the RNN detector outperforms the VD with 5% error in CSI estimation. Moreover, it can seen that the optical channel has a shorter memory length compared to the molecular channel. Remark 1: When the VD has the perfect CSI, it can estimate the memory length correctly by using the system response. However, if there is CSI estimation error, the memory length may not be estimated correctly, and as can be seen in Figure 7(a), this can have degrading effects on the performance 9 optical optical molecular molecular (a) optical molecular (b) (c) Fig. 7: The BER performance comparison of the SBRNN detector, the RNN detector, and the VD. The top plots present the optical channel and the bottom plots present the molecular channel. (a) The BER at various memory lengths M and SBRNN sequence lengths L. Top: ΘOP = [β = 0.2, η = 1] and τ = 0.05 µs. Bottom: ΘMO = [c = 10, µ = 40, η = 100] and τ = 1 s. (b) The BER at various symbol durations for L = 50 and M = 99. The ΘOP (top) and ΘMO (bottom) are the same as (a). (c) The BER at various noise rates for L = 50 and M = 99. Except η, all the parameters are the same as those in (a). of the VD. However, in the rest of this section, for all the other VD plots, we use the memory length of 99, i.e., the largest possible memory length in sequences of 100 bits. Although this does not capture the performance degradation that may result from the error in estimating the memory length, as we will show, the SBRNN still achieves a BER performance that is as good or better than the VD plots with CSI estimation error under various channel conditions. Next we evaluate the BER for different symbol durations in Figure 7(b). Again we observe that the SBRNN achieves a better BER when there is a CSI estimation error of 2.5% or more. The RNN detector outperforms the VD with 5% CSI estimation error for the optical channel, but does not perform well for the molecular channel. All detectors achieve zeroerror in decoding the 1000 sequences of 100 random bits used to calculate the BER for the optical channel with τ = 0.1 µs. Similarly, for the molecular channel at τ = 1.5 s, all detectors except the RNN detector achieve zero error. Figure 7(c) evaluates the BER performance at various noise rates. The SBRNN achieves a BER performance close to the VD with perfect CSI across a wide range of values. For larger values of η, i.e., low signal-to-noise ratio (SNR), both the RNN detector and the SBRNN detector outperform the VD with CSI estimation error. In Figure 8, we evaluate the performance of the detection algorithms with respect to the channel parameters that affect the system response. Note that in optical and molecular communication these parameters can change rapidly due to atmospheric turbulence, changes in temperature, or changes in the distance between the transmitter and the receiver. Therefore, estimating these parameters accurately can be challenging. Furthermore, since these parameters change the shape of the system responses they change the memory length as well. From the plot, it can be seen that the SBRNN performs as well or better than the VD with an estimation error of 2.5%. Moreover, for the optical channel, the RNN detector performs better than the VD with 5% estimation error. We conclude this section by comparing the computational complexity of the SBRNN detector, the RNN detector and the VD. Let n be the length of the sequence to be decoded. Recall that L is the length of the sliding BRNN, M is the memory length of the channel, and N is the number of states with highest log-likelihood values among the 2M states of the trellis that are kept at each time instance in the beam search Viterbi algorithm. Note that for the traditional Viterbi algorithm N = 2M . The computational complexity of the SBRNN is given by O(L(n − L + 1)), while the computational complexity of the VD is given by O(N n). Therefore, for the traditional VD, the computational complexity grows exponentially with memory length M . However, this is not the case for the SBRNN detector. The computational complexity of the RNN detector is O(n). Therefore, the RNN detector is the most efficient in terms of computational complexity, while the SBRNN detector and the beam search VD algorithm can have similar computational complexity. Finally, the traditional VD algorithm is impractical for the channels considered due to its exponential computational complexity in the memory length M . We now evaluate the NN detectors on a data generated from a molecular communication experimental platform presented 10 (a) (b) (c) Fig. 8: The BER performance comparison of the SBRNN detector (L = 50), the RNN detector, and the VD (M = 99). (a) The BER at various β for the optical channel with η = 1 and τ = 0.05 µs. (b) The BER at various c for the molecular channel with µ = 40, η = 1, and τ = 1 s. (c) The BER at various µ for the molecular channel with c = 10, η = 1000, and τ = 1 s. in [42]. We demonstrate that NN detectors can be implemented in practice without any channel models, and that they can be trained directly on a limited experimental or field measurements. We also demonstrate that they can be implemented for real-time text detection by building a real-time messaging service using the experimental platform in [42]. VI. E VALUATION BASED ON E XPERIMENTAL P LATFORM We use the experimental platform in [42] to collect measurement data and create the dataset that is used for training and testing the detection algorithms. In the platform, timeslotted communication is employed where the transmitter modulates information on acid and base signals by injecting these chemicals into the channel during each symbol duration. The receiver then uses a pH probe for detection. A binary modulation scheme is used in the platform where the 0-bit is transmitted by pumping acid into the environment for 30 ms at the beginning of the symbol interval, and the 1-bit is represented by pumping base into the environment for 30 ms at the beginning of the symbol interval. The symbol interval consists of this 30 ms injection interval followed by a period of silence, which can also be considered as a guard band between symbols. In particular, four different silence durations (guard bands) of 220 ms, 304 ms, 350 ms, and 470 ms are used in this work to represent bit rates of 4, 3, 2.6, and 2 bps. This is similar to the OOK modulation used in the previous section for the Poisson channel model, except that chemicals of different types are released for both the 1-bit and the 0-bit. The training and test data sets are generated as follows. For each symbol duration, random bit sequences of length 120 are transmitted 100 times, where each of the 100 transmissions are separated in time. Since we assume no channel coding is used, the bits are i.i.d. and equiprobable. This results in 12k bits per symbol duration that is used for training and testing. From the data, 84 transmissions per symbol duration (10,080 bits) are used for training and 16 transmissions are used for testing (1,920 bits). Therefore, the total number of training bits are 40,320, and the total number of bits used for testing is 7,680. Although we expect from the physics of the chemical propagation and chemical reaction that the channel should have memory, since the channel model for this experimental platform is currently unknown, we implement both symbolby-symbol and sequence detectors based on NNs. Note that due to the lack of a channel model, we cannot use the VD for comparison since it cannot be implemented without an underlying channel model. Instead, as a baseline detection algorithm, we use the slope detector that was used in previous work [42]–[44]. For all training of the NN detectors, the Adam optimization algorithm [64] is used with the learning rate 10−3 . Unless specified otherwise, the number of epochs used during training is 200 and the batch size is 10. All the hyperparameters are tuned using grid search. We consider two symbol-by-symbol NN detectors. The first detector uses three fully connected layers with 80 hidden nodes and a final softmax layer for detection. Each fully connected layer uses the rectified linear unit (ReLU) activation function. The input to the network is a set of features extracted from the received signal, which are chosen based on performance and the characteristics of the physical channel as explained in appendix. We refer to this network as Base-Net. A second symbol-by-symbol detector uses 1-dimensional CNNs. The best network architecture that we found has the following layers. 1) 16 filters of length 2 with ReLU activation; 2) 16 filters of length 4 with ReLU activation; 3) max pooling layer with pool size 2; 4) 16 filters of length 6 with ReLU activation; 5) 16 filters of length 8 with ReLU activation; 6) max pooling layer with pool size 2; 7) flatten and a softmax layer. The stride size for the filters is 1 in all layers. We refer to this network as CNN-Net. For the sequence detection, we use three networks, two based on RNNs and one based on the SBRNN. The first network has 3 LSTM layers and a final softmax layer, where the length of the output of each LSTM layer is 40. Two different inputs are used with this network. In the first, the input is the same set of features as the Base-Net above. We refer to this network as LSTM3-Net. In the second, the input is the pretrained CNN-Net described above without the top softmax layer. In this network, the CNN-Net chooses the features directly from the received signal. We refer to this network as CNN-LSTM3-Net. Finally, we consider three layers 11 Bit Error Rate (BER) 10 1 10 2 10 3 Symb. Dur. 250 ms Symb. Dur. 334 ms Symb. Dur. 380 ms Symb. Dur. 500 ms 2 3 4 5 6 7 SBLSTM Length 8 9 10 Fig. 9: The BER as a function of SBLSTM length. of bidirectional LSTM cells, where each cell’s output length is 40, and a final softmax layer. The input to this network is the same set of features used for Base-Net and the LSTM3-Net. When this network is used, during testing we use the SBRNN algorithm. We refer to this network as SBLSTM3-Net. For all the sequence detection algorithms, during testing, sample data sequences of the 120 bits are treated as an incoming data stream, and the detector estimates the bits one-by-one, simulating a real communication scenario. This demonstrates that these algorithms can work on any length data stream and can perform detection in real-time as data arrives at the receiver. A. System’s Memory and ISI We first demonstrate that this communication system has a long memory. We use the RNN based detection techniques for this, and train the LSTM3-Net on sequences of 120 consecutive bits. The trained model is referred to as LSTM3Net120. We run the trained model on the test data, once resetting the input state of the LSTM cell after each bit detection, and once passing the state as the input state for the next bit. Therefore, the former ignores the memory of the system and the ISI, while the latter considers the memory. The bit error rate (BER) performance for the memoryless LSTM3Net120 detector is 0.1010 for 4 bps, and 0.0167 for 2 bps, while for the LSTM3-Net120 detector with memory, they are 0.0333 and 0.0005, respectively. This clearly demonstrates that the system has memory. To evaluate the memory length, we train a length-10 SBLSTM3-Net on all sequences of 10 consecutive bits in the training data. Then, on the test data, we evaluate the BER performance for SBLSTM of length 2 to 10. Figure 9 shows the results for each symbol duration. The BER reduces as the length of the SBLSTM increases, again confirming that the system has memory. For example, for the 500 ms symbol duration, from the plot, we conclude that the memory is longer than 4. Note that some of the missing points for the 500 ms and 380 ms symbol durations are because there were zero errors in the test data. Moreover, BER values below 5 × 10−3 are not very accurate since the number of errors in the test dataset are less than 10 (in a typical BER plot the number of errors should be about 100). However, given enough test data, it would be possible to estimate the channel memory using the SBLSTM detector by finding the minimum length after which BER does not improve. TABLE II: Bit Error Rate Performance Symb. Dur. 250 ms 334 ms 380 ms 500 ms Baseline Base-Net CNN-Net CNN-LSTM3-Net120 LSTM3-Net120 SBLSTM3-Net10 0.1297 0.1057 0.1068 0.0677 0.0333 0.0406 0.0755 0.0245 0.0750 0.0271 0.0417 0.0141 0.0797 0.0380 0.0589 0.0026 0.0083 0.0005 0.0516 0.0115 0.0063 0.0021 0.0005 0.0000 B. Performance and Resiliency Table II summarizes the best BER performance we obtain for all detection algorithms, including the baseline algorithm, by tuning all the hyperparameters using grid search. The number in front of the sequence detectors, indicates the sequence length. For example, LSTM3-Net120 is an LSTM3-Net that is trained on 120 bit sequences. In general, algorithms that use sequence detection perform significantly better than any symbol-by-symbol detection algorithm including the baseline algorithm. This is partly due to significant ISI present in the chemical communication platform. Overall, the proposed SBLSTM algorithm performs better than all other NN detectors considered. Another important issue for detection algorithms are changing channel conditions and resiliency. As the channel conditions worsen, the received signal is further degraded, which increases the BER. Although we assume no channel coding is used in this work, one way to mitigate this problem is by using stronger channel codes that can correct some of the errors. However, given that the NN detectors rely on training data to tune the detector parameters, overfitting may be an issue. To evaluate the susceptibility of NN detectors to this effect, we collect data with a pH probe that has a degraded response due to normal wear and tear. We collect 20 samples of 120 bit sequence transmissions for each of the 250 ms and 500 ms symbol durations using this degraded pH probe. First, to demonstrate that the response of the probe is indeed degraded, we evaluate it using the baseline slope-based detection algorithm. The best BERs obtained using the baseline detector are 0.1583 and 0.0741 for symbol durations of 250 ms and 500 ms, respectively. These values are significantly larger than those in Table II, because of the degraded pH probe. We then use the SBLSTM3-Net10 and the LSTM3-Net120 trained on the data from the good pH, on the test data from the degraded pH. For the SBLSTM3Net10, the BERs obtained are 0.0883 and 0.0142, and for the LSTM3-Net120, the BERs are 0.1254 and 0.0504. These results confirm again that the proposed SBRNN algorithm is more resilient to changing channel conditions than the RNN. Finally, to demonstrate that the proposed SBRNN algorithm can be implemented as part of a real-time communication system, we use it as part of a text messaging service built on the experimental platform. We demonstrate that using the SBRNN for detection at the receiver, we are able to reliably transmit and receive messages at 2 bps. This data rate is an order of magnitude higher than previous systems [43], [44]. VII. C ONCLUSIONS This work considered a machine learning approach to the detection problem in communication systems. In this scheme, 12 TABLE III: Set of features that are extracted from the received signal and are used as input to different NN detectors in this paper. These values have been selected such that the trained network achieves the best result on a small validation set. Feature/Parameter B γ b d b̂0 & b̂B−1 mean & var b̂ τ Sec. Sec. Sec. Sec. Sec. Sec. Sec. 10 10 9 30 30 9 9 1 1000 1 1 1 1 1 No No No Yes Yes No No Yes Yes Yes No No Yes Yes Yes Yes Yes No No Yes Yes Yes Yes Yes No No Yes Yes Yes Yes Yes No No Yes Yes V: Optical Channel V: Molecular Channel VI: Base-Net VI: CNN-Net VI: CNN-LSTM3-Net120 VI: LSTM3-Net120 VI: SBLSTM3-Net10 a neural network detector is directly trained using measurement data from experiments, data collected in the field, or data generated from channel models. Different NN architectures were considered for symbol-by-symbol and sequence detection. For channels with memory, which rely on sequence detection, the SBRNN detection algorithm was presented for real-time symbol detection in data streams. To evaluate the performance of the proposed algorithm, the Poisson channel model for molecular communication was considered as well as the VD for this channel. It was shown that the proposed SBRNN algorithm can achieve a performance close to the VD with perfect CSI, and better than the RNN detector and the VD with CSI estimation error. Moreover, it was demonstrated that using a rich training dataset that contains sample transmission data under various channel conditions, the SBRNN detector can be trained to be resilient to the changes in the channel, and achieves a good BER performance for a wide range of channel conditions. Finally, to demonstrate that this algorithm can be implemented in practice, a molecular communication platform that uses multiple chemicals for signaling was used. Although the underlying channel model for this platform is unknown, it was demonstrated that NN detectors can be trained directly from experimental data. The SBRNN algorithm was shown to achieve the best BER performance among all other considered algorithms based on NNs as well as a slope detector considered in previous work. Finally, a text messaging application was implemented on the experimental platform for demonstration where it was shown that reliable communication at rates of 2 bps is possible, which is an order of magnitude faster than the data rate reported in previous work for molecular communication channels. As part of future work we plan to investigate how techniques from reinforcement learning could be used to better respond to changing channel conditions. We would also like to study if the evolution of the internal state of the SBRNN detector could help in developing channel models for systems where the underlying models are unknown. A PPENDIX F EATURE E XTRACTION In this appendix we describe the set of features that are extracted from the received signal and are used as the input to the different NN detectors considered in this work. The set of features rk , extracted from the received signal during the k th channel use yk , must preserve and summarize the important information-bearing components of the received signal. For the Poisson channel, since the information is encoded in the intensity of the signal, much of the information is contained in the rate of change of intensity. In particular, intensity increases in response to the transmission of the 1-bit, while intensity decreases or remains the same in response to transmission of the 0-bit. Note that this is also true for the pH signal in the experimental platform used in Section VI. First the symbol interval (i.e., the time between the green lines in Figure 6) is divided into a number of equal subintervals or bins. Then the values inside each bin are averaged to represent the value for the corresponding bin. Let B be the number of bins, and b = [b0 , b1 , · · · , bB−1 ] the corresponding values of each bin. We then extract the rate of change during a symbol duration by differentiating the bin vector to obtain the vector d = [d0 , d1 , · · · , dB−2 ], where di−1 = bi − bi−1 . We refer to this vector as the slope vector and use it as part of the feature set rk extracted from the received signal. Other values that can be used to infer the rate of change are b0 and bB−1 , the value of the first and the last bins, and the mean and the variance of the b. Since the intensity can grow large due to ISI, b may be normalized with the parameter γ as b̂ = b/γ. Therefore, instead of b0 and bB−1 , b̂0 and b̂B−1 , and the mean and the variance of the b̂ may be used as part of the feature set rk . Finally, since the transmitter and the receiver have to agree on the symbol duration, the receiver knows the symbol duration, which can be part of the feature set. Table III summarizes the set of features that are used as input to the each of the NN detection algorithms in this paper. ACKNOWLEDGMENT The authors like to thank Chan-Byoung Chae, Yonathan Morin, Milind Rao, and Morteza Mardani Korani for helpful discussions that resulted in improvements in this manuscript. R EFERENCES [1] M. Stojanovic and J. Preisig, “Underwater acoustic communication channels: Propagation models and statistical characterization,” IEEE Communications Magazine, vol. 47, no. 1, pp. 84–89, 2009. [2] Y. Moritani, S. Hiyama, and T. Suda, “Molecular communication for health care applications,” in Proc. of 4th Annual IEEE International Conference on Pervasive Computing and Communications Workshops, Pisa, Italy, 2006, p. 5. [3] I. F. Akyildiz, F. Brunetti, and C. Blazquez, “Nanonetworks: A new communication paradigm,” Computer Networks, vol. 52, no. 12, pp. 2260– 2279, August 2008. [4] T. Nakano, A. W. Eckford, and T. Haraguchi, Molecular communication. Cambridge University Press, 2013. [5] N. Farsad, H. B. Yilmaz, A. Eckford, C. B. Chae, and W. Guo, “A comprehensive survey of recent advancements in molecular communication,” IEEE Communications Surveys & Tutorials, vol. 18, no. 3, pp. 1887–1919, thirdquarter 2016. [6] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, May 2015. [Online]. Available: http://dx.doi.org/10.1038/nature14539 [7] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, Nov. 2016. [8] M. Ibnkahla, “Applications of neural networks to digital communications a survey,” Signal Processing, vol. 80, no. 7, pp. 1185–1215, 2000. 13 [9] N. Farsad and A. Goldsmith, “A molecular communication system using acids, bases and hydrogen ions,” in 2016 IEEE 17th International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), 2016, pp. 1–6. [10] B. Grzybowski, Chemistry in Motion: Reaction-Diffusion Systems for Micro- and Nanotechnology. Wiley, 2009. [11] L. Debnath, Nonlinear partial differential equations for scientists and engineers. Springer Science & Business Media, 2011. [12] B. Aazhang, B. P. Paris, and G. C. Orsak, “Neural networks for multiuser detection in code-division multiple-access communications,” IEEE Transactions on Communications, vol. 40, no. 7, pp. 1212–1222, Jul 1992. [13] U. Mitra and H. V. Poor, “Neural network techniques for adaptive multiuser demodulation,” IEEE Journal on Selected Areas in Communications, vol. 12, no. 9, pp. 1460–1470, Dec 1994. [14] J. J. Murillo-fuentes, S. Caro, and F. Pérez-Cruz, “Gaussian processes for multiuser detection in cdma receivers,” in Advances in Neural Information Processing Systems 18, Y. Weiss, P. B. Schölkopf, and J. C. Platt, Eds. MIT Press, 2006, pp. 939–946. [15] Y. Işık and N. Taşpınar, “Multiuser detection with neural network and pic in cdma systems for awgn and rayleigh fading asynchronous channels,” Wireless Personal Communications, vol. 43, no. 4, pp. 1185–1194, 2007. [16] E. Nachmani, Y. Be’ery, and D. Burshtein, “Learning to decode linear codes using deep learning,” in 54th Annual Allerton Conference on Communication, Control, and Computing (Allerton), Sept 2016. [17] S. Dörner, S. Cammerer, J. Hoydis, and S. t. Brink, “Deep learning-based communication over the air,” arXiv preprint arXiv:1707.03384, 2017. [18] T. J. O’Shea, K. Karra, and T. C. Clancy, “Learning to communicate: Channel auto-encoders, domain specific regularizers, and attention,” in 2016 IEEE International Symposium on Signal Processing and Information Technology (ISSPIT), Dec 2016, pp. 223–228. [19] E. Nachmani, E. Marciano, D. Burshtein, and Y. Be’ery, “RNN decoding of linear block codes,” arXiv preprint arXiv:1702.07560, 2017. [20] E. Nachmani, E. Marciano, L. Lugosch, W. J. Gross, D. Burshtein, and Y. Be’ery, “Deep learning methods for improved decoding of linear codes,” IEEE Journal of Selected Topics in Signal Processing, 2018. [21] F. Liang, C. Shen, and F. Wu, “An iterative BP-CNN architecture for channel decoding,” IEEE Journal of Selected Topics in Signal Processing, 2018. [22] S. Cammerer, T. Gruber, J. Hoydis, and S. t. Brink, “Scaling deep learning-based decoding of polar codes via partitioning,” arXiv preprint arXiv:1702.06901, 2017. [23] S. Dörner, S. Cammerer, J. Hoydis, and S. ten Brink, “Deep learning-based communication over the air,” IEEE Journal of Selected Topics in Signal Processing, 2017. [24] N. Samuel, T. Diskin, and A. Wiesel, “Deep MIMO detection,” arXiv preprint arXiv:1706.01151, 2017. [25] C. Lee, H. B. Yilmaz, C.-B. Chae, N. Farsad, and A. Goldsmith, “Machine learning based channel modeling for molecular MIMO communications,” in IEEE International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), 2017. [26] T. J. O’Shea, K. Karra, and T. C. Clancy, “Learning approximate neural estimators for wireless channel state information,” arXiv preprint arXiv:1707.06260, 2017. [27] T. J. O’Shea and J. Hoydis, “An introduction to machine learning communications systems,” arXiv preprint arXiv:1702.00832, 2017. [28] 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. [29] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770–778. [30] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A. r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, and B. Kingsbury, “Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups,” IEEE Signal Processing Magazine, vol. 29, no. 6, pp. 82–97, 2012. [31] A. Graves and N. Jaitly, “Towards end-to-end speech recognition with recurrent neural networks,” in Proceedings of the 31st International Conference on Machine Learning (ICML-14), 2014, pp. 1764–1772. [32] D. Amodei, S. Ananthanarayanan, R. Anubhai, J. Bai, E. Battenberg, C. Case, J. Casper, B. Catanzaro, Q. Cheng, G. Chen et al., “Deep speech 2: End-to-end speech recognition in english and mandarin,” in International Conference on Machine Learning, 2016, pp. 173–182. [33] D. Bahdanau, K. Cho, and Y. Bengio, “Neural Machine Translation by Jointly Learning to Align and Translate,” arXiv:1409.0473 [cs, stat], Sep. 2014. [34] K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using RNN encoder-decoder for statistical machine translation,” arXiv preprint arXiv:1406.1078, 2014. [35] Z. Li and Y. Yu, “Protein Secondary Structure Prediction Using Cascaded Convolutional and Recurrent Neural Networks,” arXiv:1604.07176, 2016. [36] S. R. Z. Ghassemlooy, W. Popoola, Optical Wireless Communications: System and Channel Modelling with MATLAB, 1st ed. CRC Press, 2012. [37] C. Gong and Z. Xu, “Channel estimation and signal detection for optical wireless scattering communication with inter-symbol interference,” IEEE Transactions on Wireless Communications, vol. 14, no. 10, pp. 5326–5337, Oct 2015. [38] G. Aminian, H. Arjmandi, A. Gohari, M. Nasiri-Kenari, and U. Mitra, “Capacity of diffusion-based molecular communication networks over ltipoisson channels,” IEEE Transactions on Molecular, Biological and MultiScale Communications, vol. 1, no. 2, pp. 188–201, June 2015. [39] V. Jamali, A. Ahmadzadeh, C. Jardin, H. Sticht, and R. Schober, “Channel estimation for diffusive molecular communications,” IEEE Transactions on Communications, vol. 64, no. 10, pp. 423—4252, Oct 2016. [40] V. Jamali, A. Ahmadzadeh, N. Farsad, and R. Schober, “Scw codes for optimal csi-free detection in diffusive molecular communications,” in IEEE International Symposium on Information Theory (ISIT), June 2017, pp. 3190–3194. [41] V. Jamali, N. Farsad, R. Schober, and A. Goldsmith, “Non-coherent detection for diffusive molecular communications,” arXiv preprint arXiv:1707.08926, 2017. [42] D. P. N. Farsad and A. Goldsmith, “A novel experimental platform for in-vessel multi-chemical molecular communications,” in IEEE Global Communications Conference (GLOBECOM), 2017. [43] N. Farsad, W. Guo, and A. W. Eckford, “Tabletop molecular communication: Text messages through chemical signals,” PLOS ONE, vol. 8, no. 12, p. e82935, Dec 2013. [44] B. H. Koo, C. Lee, H. B. Yilmaz, N. Farsad, A. Eckford, and C. B. Chae, “Molecular MIMO: From theory to prototype,” IEEE Journal on Selected Areas in Communications, vol. 34, no. 3, pp. 600–614, March 2016. [45] A. J. Viterbi and J. K. Omura, Principles of digital communication and coding. Courier Corporation, 2013. [46] E. Dahlman, S. Parkvall, and J. Skold, 4G: LTE/LTE-advanced for mobile broadband. Academic press, 2013. [47] T. M. Cover and J. A. Thomas, Elements of Information Theory 2nd Edition, 2nd ed. Wiley-Interscience, 2006. [48] S. Lawrence, C. L. Giles, A. C. Tsoi, and A. D. Back, “Face recognition: A convolutional neural-network approach,” IEEE transactions on neural networks, vol. 8, no. 1, pp. 98–113, 1997. [49] 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. [50] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural computation, vol. 9, no. 8, pp. 1735–1780, 1997. [51] M. Schuster and K. K. Paliwal, “Bidirectional recurrent neural networks,” IEEE Transactions on Signal Processing, vol. 45, no. 11, pp. 2673–2681, 1997. [52] A. Graves and J. Schmidhuber, “Framewise phoneme classification with bidirectional lstm and other neural network architectures,” Neural Networks, vol. 18, no. 5, pp. 602–610, 2005. [53] A. Graves, S. Fernndez, and F. Gomez, “Connectionist temporal classification: Labelling unsegmented sequence data with recurrent neural networks,” in In Proceedings of the International Conference on Machine Learning, ICML 2006, 2006, pp. 369–376. [54] S. Shamai, “Capacity of a pulse amplitude modulated direct detection photon channel,” IEE Proceedings I - Communications, Speech and Vision, vol. 137, no. 6, pp. 424–430, Dec 1990. [55] J. Cao, S. Hranilovic, and J. Chen, “Capacity-achieving distributions for the discrete-time poisson channel–Part I: General properties and numerical techniques,” IEEE Transactions on Communications, vol. 62, no. 1, pp. 194–202, 2014. [56] N. Farsad, C. Rose, M. Mdard, and A. Goldsmith, “Capacity of molecular channels with imperfect particle-intensity modulation and detection,” in IEEE International Symposium on Information Theory (ISIT), June 2017, pp. 2468–2472. [57] N. Hayasaka and T. Ito, “Channel modeling of nondirected wireless infrared indoor diffuse link,” Electronics and Communications in Japan (Part I: Communications), vol. 90, no. 6, pp. 9–19, 2007. [58] A. K. Majumdar, C. E. Luna, and P. S. Idell, “Reconstruction of probability density function of intensity fluctuations relevant to free-space laser communications through atmospheric turbulence,” in Proc. SPIE, vol. 6709, 2007, p. 67090. [59] H. Ding, G. Chen, A. K. Majumdar, B. M. Sadler, and Z. Xu, “Modeling of non-line-of-sight ultraviolet scattering channels for communication,” IEEE Journal on Selected Areas in Communications, vol. 27, no. 9, 2009. [60] K. V. Srinivas, A. Eckford, and R. Adve, “Molecular communication in fluid media: The additive inverse gaussian noise channel,” IEEE Transactions on Information Theory, vol. 58, no. 7, pp. 4678–4692, 2012. [61] A. Noel, K. C. Cheung, and R. Schober, “Optimal receiver design for diffusive molecular communication with flow and additive noise,” IEEE Transactions on NanoBioscience, vol. 13, no. 3, pp. 350–362, Sept 2014. [62] G. D. Forney, “The viterbi algorithm,” Proceedings of the IEEE, vol. 61, no. 3, pp. 268–278, March 1973. 14 [63] X. Lingyun and D. Limin, “Efficient viterbi beam search algorithm using dynamic pruning,” in Proceedings. of 7th International Conference on Signal Processing, vol. 1, Aug 2004, pp. 699–702. [64] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014.
7cs.IT
arXiv:1711.11443v1 [cs.LG] 30 Nov 2017 ConvNets and ImageNet Beyond Accuracy: Explanations, Bias Detection, Adversarial Examples and Model Criticism Pierre Stock Facebook AI Research Moustapha Cisse Facebook AI Research [email protected] [email protected] Abstract ConvNets and Imagenet have driven the recent success of deep learning for image classification. However, the marked slowdown in performance improvement, the recent studies on the lack of robustness of neural networks to adversarial examples and their tendency to exhibit undesirable biases questioned the reliability and sustained development of these methods. This work investigates these questions from the perspective of the end-user by using human subject studies and explanations. We experimentally demonstrate that the accuracy and robustness of ConvNets measured on Imagenet are underestimated. We show that explanations can mitigate the impact of misclassified adversarial examples from the perspective of the end-user and we introduce a novel tool for uncovering the undesirable biases learned by a model. These contributions also show that explanations are a promising tool for improving our understanding of ConvNets’ predictions and for designing more reliable models1 . Figure 1: Top: CNNs performance evolution on Imagenet. Bottom: some images sampled from the Internet misclassified by a ResNet-101. genet features. Besides, convolutional architectures initially developed for image classification such as Residual Networks are now routinely used for machine translation [13] and speech recognition [45]. 1. Introduction Convolutional neural networks [29, 27] and Imagenet [9, 38] (the dataset and the challenge) have been instrumental to the recent breakthroughs in image classification. Imagenet has provided ConvNets with the data they needed to demonstrate their superiority compared to the previously used handcrafted features such as Fisher Vectors [35]. This success has triggered a renewed interest in convolutional approaches. Novel architectures such as ResNets [21] and DenseNets [22] have been introduced to improve the state of the art performance on Imagenet. The impact of this virtuous circle has permeated all aspects of computer vision and deep learning at large. Indeed, the use of feature extractors pre-trained on Imagenet is now ubiquitous. For example, the state of the art image segmentation [15, 20] or pose estimation models [23, 6] heavily rely on pre-trained Ima1 corresponding Since 2012, the top-1 error of state of the art (SOTA) models on Imagenet has been reduced from 43.45% to 22.35%. Recently, the evolution of the best performance seems to plateau (see Figure 1) despite the efforts in designing novel architectures [21, 22], introducing new data augmentation schemes [46] and optimization algorithms [26]. Concomitantly, several studies have demonstrated the lack of robustness of deep neural networks to adversarial examples [42, 16, 7] and raised questions about their tendency to exhibit (undesirable) biases [37]. Adversarial examples [42] are synthetic images designed to be indistinguishable from natural ones by a human, yet they are capable of fooling the best image classification systems. Undesirable biases are patterns or behaviors learned from the data, they are often highly influential in the decision of the model author: [email protected] 4321 but are not aligned with the values of the society in which the model operates. Examples of such biases include racial and gender biases [5]. While accuracy has been the leading factor in the broad adoption of deep learning across the industries, its sustained improvement together with other desirable properties such as robustness to adversarial examples and immunity to biases will be critical in maintaining the trust in the technology. It is therefore essential to improve our understanding of these questions in the context of Imagenet (the primary image classification benchmark), especially from the perspective of the end-user. In this work, we take a step in this direction by assessing the predictions of SOTA models on the validation set of Imagenet. We show that human studies and explanations can be valuable tools to perform this task. Human studies yield a new judgment of the quality of the model’s predictions from the perspective of the end-user, in addition to the traditional ground truth used to evaluate the model. We also use feature-based and example-based explanations. On the one hand, explaining the prediction of a black box classifier by a subset of the features of its input can yield valuable insights into the workings of the models and underline the essential features in its decision. On the other hand, examplebased explanations provide an increased interpretability of the model by yielding examples representative of the distribution of a given category as captured by the model. The particular form of example-based explanation we use is called model criticism [24]. It combines both prototypes and criticisms and is proven to capture better the complex distributions. Therefore, it facilitates human understanding. Our main findings are summarized below: solved. In the next section, we summarize the related work before presenting our experiments and results in details. 2. Related Work Adversarial examples. Deep neural networks can achieve high accuracy on previously unseen examples while being vulnerable to small adversarial perturbations of their inputs [42]. Such perturbed inputs, called adversarial examples, have recently aroused keen interest in the community [17, 42, 43, 7]. Several studies have subsequently analyzed the phenomenon [11, 40, 12, 12] and various approaches have been proposed to improve the robustness of neural networks [34, 8, 44, 46, 19]. More closely related to our work are the different proposals aiming at generating better adversarial examples [17, 32]. Given an input (train or test) example (x, y), an adversarial example is a perturbed version of the original pattern x̃ = x + δx where δx is small enough for x̃ to be undistinguishable from x by a human, but causes the network to predict an incorrect target. Given the network gθ (where θ is the set of parameters) and a p-norm, the adversarial example is formally defined as:  x̃ = argmax ` gθ (x̃), y (1) x̃:kx̃−xkp ≤ where  represents the strength of the adversary. Assuming the loss function `(·) is differentiable, [40] propose to take the first order taylor expansion of x 7→ `(gθ (x), y) to compute δx by solving the following simpler problem: T (2) x̃ = argmax ∇x `(gθ (x), y) (x̃ − x) x̃:kx̃−xkp ≤ When p = ∞, then x̃ = x +  · sign(∇x `(gθ (x), y)) which corresponds to the fast gradient sign method [17]. If instead p = 2, we obtain x̃ = x +  · ∇x `(gθ (x), y) where ∇x `(gθ (x), y) is often normalized. Optionally, one can perform more iterations of these steps using a smaller step-size. This strategy has several variants [32, 28]. In the rest of the paper, we refer to this method by iterative fast gradient method (IFGM) and will use it both to measure the robustness of a given model and to perform model criticism. • The accuracy of convolutional networks evaluated on Imagenet is vastly underestimated. For example, the top-1 error of a ResNet-101 trained on Imagenet and evaluated on the standard validation set is 9.47% instead of 22.69% when the errors are validated by human subjects. Similarly, the top-5 error is 1.94% instead of 6.44%. This observation holds across models. • The robustness of ConvNets to adversarial examples is also underestimated. In addition, providing explanations helps to mitigate the misclassification of adversarial examples from the perspective of the end-user. Model Criticism. Example-based explanations are a well-known tool in the realm of cognitive science for facilitating human understanding [41]. They have extensively been used in case-based reasoning (CBR) to improve the interpretability of the models [1, 4, 25]. In most cases, it consists in helping a human to understand a complex distribution (or the statistics captured by a model) by presenting her with a set of prototypical examples. However, when the distribution or the model for which one is seeking explanation is complex (as is often the case with real-world data), prototypes may not be enough. Recently, Kim et al. [24] have • Model Criticism is a good tool for detecting the biases in the predictions of the models. Further, adversarial examples can be effectively used for model criticism. Similar observations to our first point existed in prior work [2]. However, the scale, the conclusions and the implications of our study are different. Indeed we consider that if top-5 error is the measure of interest, Imagenet is (almost) 4322 where the best explanation minimizes a local weighted loss L between g and h in the vicinity πx of x, regularized by the complexity Ω(h) of such an explanation. The authors restrict h ∈ H to be a linear model such that h(z 0 ) = wh z 0 . They further define the vicinity of two samples using the exponential kernel proposed to use, in addition to the prototypes, data points sampled from regions of the input space not well captured by the model or the prototypes. Such examples, called criticism, are known to improve the human’s mental model of the distribution. Kim et al [24] introduced MMD-critic, an approach inspired by bayesian model criticism [14] to select the prototypes and the critics among a given set of examples. MMD-critic uses the maximum mean discrepancy [18] and large-scale submodular optimization [3]. Given a set of examples D = {(x, y)}ni=1 , let S ⊂ {1, . . . , n} such that DS = {xi , i ∈ S}. Given a RKHS with kernel function k(·, ·), the prototypes of MMD-critic are selected by minimizing the maximum mean discrepancy between D and DS . This is formally written as: max S∈2[n] ,|S|≤m Jb (S) πx (z) = e and define the local weighted loss L as: X 2 L(g, h, πx ) = πx (z) (g(z) − h(z 0 )) (6) where Z if the dataset of n perturbed samples obtained from x by randomly activating or deactivating some super-pixels in x. Note that z 0 denotes the one-hot encoding of the superpixels whereas z is the actual image formed by those superpixels. Finally, the interpretability of the representation is controlled by ( 0 if kwh k0 < K (7) Ω(h) = +∞ otherwise (3) i,j∈S Given a set of prototypes, the criticisms are similarly selected using MMD to maximize the deviation with the prototypes. The objective function in this case is regularized to promote diversity among the criticisms. A greedy algorithm can be used to select both prototypes and criticisms since the corresponding optimization problems are submodular under certain conditions [3]. In this work, we use MMDcritic as a baseline for example-based explanations. The authors solve this optimization problem by first selecting K features with Lasso and then learning the weights wg via least squares. In the case of DNNs, an explanation generated by this algorithm called LIME allows the user to just highlight the super-pixels with positive weights towards a specific class (see Fig 5). In what follows we set σ = 0.25, n = 1000 and and keep K constant. In the following we refer to an image prompted solely with its top super-pixels as an image with attention. Feature-based Explanation. Machine learning and especially Deep Neural Networks (DNNs) lie at the core of more and more technological advances across various fields. However, those models are still widely considered as black boxes, leading end users to mistrust the predictions or even the underlying models. In order to promote the adoption of such algorithms and to foster their positive technological impact, recent studies have been focusing on understanding a model’s behavior from a human point of view [30, 39, 31, 10]. In particular, [36] propose to explain the predictions of any classifier gθ (denoted as g) by approximating it locally with an interpretable model h. The role of h is to provide qualitative understanding between the input x and the classifier’s output g(x) for a given class. In the case where the input x is an image, h will act on vector x0 ∈ {0, 1}d denoting the presence or absence of the d super-pixels that partition the image x to explain the classifier’s decision. Finding the best explanation ξ(x) among the candidates h can be formulated as: ξ(x) = argmin L(g, h, πx ) + Ω(h) (5) z,z 0 ∈Z where Jb (S) can be expressed as follows: X 1 X 2 k(xi , xj ) − k(xi , xj ) Jb (S) = n|S| |S|2 i∈[n],j∈S kx−zk2 σ2 3. Experiments 3.1. Human Subject Study of Classification Errors We conduct a study of the misclassifications of various pre-trained architectures (e.g. ResNet-18, ResNet101, DenseNet-121, DenseNet-161) with human subjects on Amazon Mechanical Turk (AMT). To this end, we use the center-cropped images of size 224 × 224 from the standard validation set of Imagenet. The same setting holds in all our experiments. For every architecture, we consider all the examples misclassified by the model. Each of these examples is presented to five (5) different turkers together with the class (C) predicted by the model. Each turker is then asked the following question ”Is class C relevant for this image.” The possible answers are yes and no. The former means that the turker agrees with the prediction of the network, while the latter means that the example is misclassified. Figure 2 shows a breakdown of the misclassified images by a ResNet-101 (resp. a ResNet-18) according to the number of positive answers they receive from the turkers. (4) h∈H 4323 Model Resnet-18 Resnet-101 Densenet-121 Densenet-161 Top-1 error 31.39 22.69 25.53 22.85 Rectified Top-1 error 17.93 9.47 14.37 10.87 Table 1: Standard and rectified Top-1 errors for various models. Rectified Top-1 errors are significantly lower. Our first results show that for a ResNet-101 (resp. a ResNet-18), for 39.76% (resp. 27.14%) of the misclassified examples, all the turkers (5/5) agree with the prediction of the model. If we further consider the prediction of the model for a given image to be correct if at least four turkers out of five (4/5) agree with it, the rectified Top-1 error of the models are drastically reduced. Table 1 shows the original Top-1 errors together with the rectified versions. For the ResNet-101 and the DenseNet161, the rectified Top-1 error is respectively 9.47% and 10.87%. Similarly, the top-5 error of the ResNet-101 on a single crop is 6.44. When we present the misclassified images to the turkers together with the top 5 predictions of the model, the rectified top-5 error drops to 1.94%. When instead of submitting to the turker the misclassified images, we present them the pictures for which the ground truth is not in the top-5 predictions, the rectified top-5 error drops further to 1.37%. Therefore, the observation on top-5 is in line with the conclusions regarding top-1. If top-5 is the important measure, this experiment suggests that Imagenet is (almost) solved as far as accuracy is concerned. Therefore explaining the marked slowdown in performance improvement observed recently on Imagenet. The difference between the ground truth labeling of the images and the predictions of the models validated by the turkers can be traced back to the collection protocol of Imagenet. Indeed to create the dataset, Deng et al. [9] first queried several image search engines (using the synsets extracted from WordNet) to obtain good candidate images. Turkers subsequently cleaned the collected images by validating that each one contains objects of a given synset. This labeling procedure ignores the intrinsic multilabel nature of the images, neither does it take into account important factors such as composionality. Indeed, it is natural that the label wing is also relevant for a picture displaying a plane and labelled as airliner. Figure 3 shows examples of misclassifications by a RestNet-101 and a DenseNet-161. In most cases, the predicted class is (also) present in the image. Figure 2: Positive answers for misclassified samples. An image is prompted to 5 different subjects and a positive answer means the subject agrees with the predicted class. used the center-cropped images of the Imagenet validation set. Next, we consider a subset of 20 classes and generate an adversarial example from each legitimate image using the IFGSM attack on a pre-trained ResNet-101. We used a step size of  = 0.001 and a maximum number of iterations of M = 10. This attack deteriorated the accuracy of the network on the validation set from 77.31% down to 7.96%. Note that by definition, we only need to generate adversarial samples for the correctly predicted test images. We consider two settings in this experiment. In the first configuration, we present the turkers with the whole adversarial image together with the prediction of the network. We then ask each turker if the predicted label is relevant to the given picture. Again, the possible answers are yes and no. Each image is shown to five (5) different turkers. In the second configuration, we show each turker the interpretation image generated by LIME instead of the whole adversarial image using the top 8 most important features. The rest of the experimental setup is identical to the previous configuration where we showed the whole images to the turkers. If a turker participated in the second experiment with the interpretation images after participating in the first experiment where the whole images are displayed, his answers could be biased. To avoid this issue, we perform the two studies with three days intervals. Similarly to our previous experiments, we report the rectified Top-1 error on adversarial examples by considering the prediction of the model as correct if at least 4/5 turkers agree with it. Table 2 shows the standard and the rectified Top-1 errors for the adversarial examples. Two observations can be made. First, the robustness of the models as measured by the Top-1 error on adversarial samples generated from the validation set of Imagenet is also underestimated. Indeed, when the whole images are displayed to them, the turkers agree with 22.01% of the predictions of the networks on adversarial examples. This suggests that often, the predicted 3.2. Study of Robustness to Adversarial Examples We conducted a human subject study to investigate the appreciation of adversarial perturbation by end-users. Similarly to the human subject study of misclassifications, we 4324 Figure 3: Some test samples misclassified by a ResNet-101 (first row) and a Densenet-161 (second row). The predicted class is indicated in red, the ground truth in black and in parenthesis. All those examples gathered more than four (4 or 5) positive answers over 5 on AMT. Note that no adversarial noise has been added to the images. Setting Whole image Explanation Top-1 error 92.04 92.04 Rectified Top-1 error 76.78 70.68 Table 2: Standard and rectified Top-1 errors on adversarial examples for the whole images and the explanations. We further inspected the adversarial images on which the turkers agree with the model’s prediction when the explanation is shown but mostly disagree when the whole image is shown. Figure 6 displays examples of such images. In most cases, even though the predicted label does not seem correct when looking at the whole image, the explanation has one of the two following effects. It either reveals the relevant object supporting the prediction (e.g., Tripod image) or creates an ambiguous context that renders the predicted label plausible (e.g., Torch or Honeycomb images). In all cases, providing explanations to the user mitigates the impact of misclassifications due to adversarial perturbations. Figure 4: Positive answers for adversarial samples. The images are either displayed as a whole (entire image) or with attention (explanation). Every image is prompted to 5 different subjects. A positive answer means the subject agrees with the predicted adversarial class. label is easily identifiable in the picture by a human. Figure 5 shows an example (labeled jeep) with the explanations of the predictions for the legitimate and adversarial versions respectively. One can see that the adversarial perturbation exploits the ambiguity of the image by shifting the attention of the model towards regions supporting the adversarial prediction (e.g. the red cross). The second substantial observation is that the percentage of agreement between the predictions of the model and the turkers increases from 22.01% to 30.80% when the explanation is shown instead of the whole image (see also Figure 4). 3.3. Adversarial Examples for Model Criticism Example-based explanation methods such as model criticism aim at summarizing the statistics learned by a model by using a carefully selected subset of examples. MMDcritic proposes an effective selection procedure combining prototypes and criticisms for improving interpretability. Though applicable to a pre-trained neural network by using the hidden representation of the examples, it only indirectly exploits the discriminative nature of the classifier. In this 4325 Condition Adv - Prototypes and Criticisms MMD - Prototypes and Criticisms Probs - Prototypes and Criticisms Adv - Prototypes only MMD - Prototypes only Probs - Prototypes only Random Figure 5: Left: an adversarial image of the true class Jeep predicted as Ambulance by the network. Center: the explanation of the clean image for its prediction (Jeep). Right: the explanation of the adversarial image for its prediction (Ambulance). Mean (%) 57.06 50.64 49.36 55.02 53.18 52.44 49.80 Std (%) 3.22 3.25 3.26 3.23 3.24 3.25 3.25 Table 3: Results of the Prototype and Criticism study. We report the average success rate of the task (assign a target image to one of the six groups) for the seven conditions. The adversarial selection procedures outperforms MMDcritic as well as the other baselines used in the study. work, we argue that adversarial examples can be an accurate alternative to MMD-critic for model criticism. In particular, they offer a natural way of selecting prototypes and criticism based on the number of steps of FGSM necessary to change the decision of a classifier for a given example. Indeed, for a given class and a fixed number of maximum steps M of IFGSM, the examples that are still correctly classified after M steps can be considered as useful prototypes since they are very representative of what the classifier has learned from the data for this class. In contrast, the examples whose decision change after 1 or few steps of FGSM are more likely to be valid criticisms because they do not quite fit the model. We conducted a human study to evaluate our hypothesis. At each round, we present a turker with six classes represented by six images each, as well a target sample randomly drawn from one of those six classes. We measure how well the subject can assign the target sample to the class it belongs. The assignment task requires a class to be well-explained by its six images. The challenge is, therefore, to select well those candidate images. The adversarial method selects as prototypes the examples not misclassified IFGSM after M = 10 steps, and as prototypes, the examples misclassified after one step. In addition to MMD-critic (using λ = 10−5 ), we compare the adversarial approach to a simple baseline using the probabilities for selecting the prototypes (considerable confidence, e.g., > 0.9) and the criticisms (little confidence, e.g., < 0.1). We also compare with the baseline randomly sampling examples from a given class. For each method (except the random baseline), we experiment with showing six prototypes only vs. showing three prototypes and three criticisms instead. To properly exploit the results, we discarded answers based on the time spent by the turkers on the question to only consider answers given in the range from 20 seconds to 3 minutes. This resulted in 1, 600 valid answers for which we report the results in Table 3. Two observations arise from those results. First, the prototypes and criticisms sampled using the adversarial method represent better the class distribution and achieve higher scores for the assignment task both when only prototypes are used (57.06%) and when prototypes are combined with criticisms (55.02%). Second, the use of criticisms additionally to the prototypes always helps to better grasp the class distribution. More qualitatively, we display in Figures 7 and 8 some prototypes and criticisms for the class Banana generated using respectively the MMD and the adversarial method for the test samples, that demonstrate the superiority of the adversarial method. 3.4. Uncovering Biases with Model Criticism To uncover the undesirable biases learned by the model, we use our adversarial example approach to model criticism since it worked better than MMD-critic in our previous experiments. We consider the class basketball (for which humans often appear in the images).We select and inspect a reduced subset of prototypes and criticisms from the category basketball. The percentage of basketball training images on which at least one white person appears is about 55%. Similarly, the percentage of images on which at least one black person appears is 53%. This relative balance contrasts with the statistics captured by the model. Indeed, on the one hand, we found that about 78% of the prototypes contain at least one black person and only 44% for prototypes contain one white person or more. On the other hand, for criticisms, 90% of the images contain at least one white person and only about 20% include one black person or more. This suggests that the model has learned a biased representation of the class basketball where images containing black persons are prototypical. To further validate this hypothesis, we sample pairs of similar pictures from the Internet. The pairs are sampled such that the primary apparent difference between the two images is the skin color of the persons. We then fed images to the model and gathered the predictions. Figure 9 shows the results of the experiments. All images containing a black person are classified as basketball while similar photos with persons of 4326 Figure 6: Adversarial samples, displayed as a whole (entire image, first row) or with explanation (only k top super-pixels, second row). The adversarial class is indicated in red, the true class in black and between parenthesis. In red is also displayed the percentage of positive answers for the displayed image (over 5 answers). In both cases, a positive answer means the subject agrees with the predicted adversarial class. Figure 8: Prototypes (1st row) and Criticisms (2nd row), for the Banana class when using the adversarial selection. Figure 7: Prototypes (first row) and Criticisms (second row) for the Banana class when using the MMD-critic method. further investigations on this to future studies. different skin color are labeled differently. Figure 12 provides additional supporting evidence for this hypothesis. It shows the progressive feature based explanation path uncovering the super-pixels of an example (correctly classified as basketball) by their order of importance. The most importance super-pixels depict the jersey and the skin color of the player. The reasons why the model learns these biases are unclear. One hypothesis is that despite the balanced distribution of races in pictures labeled basketball, blacks persons are more represented in this class in comparison to the other classes. A Similar phenomenon have previously been noted in the context of textual data [33, 5]. We defer Remark have focused on racial biases because a human can easily spot them. In fact, we have found similar biases where pictures displaying Asians dressed in red are very often classified as ping-pong ball. However, we hypothesize the biases of the model are numerous and diverse. For example, we also have found that the model often predicts the class traffic-light for images of a blue sky with street lamps as depicted in Figure 11. In any case, model criticism has proven effective in uncovering the undesirable hidden biases learned by the model. 4327 Figure 9: Pairs of pictures (columns) sampled over the Internet along with their prediction by a ResNet-101. Figure 10: Prototypes (first row) and Criticisms (second row) for the test images of the Basketball class, adv method. Figure 11: Images sampled from the Internet classified as Traffic Light for a ResNet-101. Figure 12: Explanation path of a ResNet-101 for a test sample of the Basketball class. 4328 4. Conclusion [12] A. Fawzi, S.-M. Moosavi-Dezfooli, and P. Frossard. Robustness of classifiers: from adversarial to random noise. In Advances in Neural Information Processing Systems, pages 1624–1632, 2016. [13] J. Gehring, M. Auli, D. Grangier, D. Yarats, and Y. N. Dauphin. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122, 2017. [14] A. Gelman. Bayesian data analysis using r. 2006. [15] R. Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 1440–1448, 2015. [16] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. [17] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In Proc. ICLR, 2015. [18] A. Gretton, K. M. Borgwardt, M. J. Rasch, and y. Bernhard Schölkopf and Alexander J. Smola, booktitle=NIPS. A kernel method for the two-sample-problem. [19] C. Guo, M. Rana, M. Cisse, and L. van der Maaten. Countering adversarial images using input transformations. arXiv preprint arXiv:1711.00117, 2017. [20] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. arXiv preprint arXiv:1703.06870, 2017. [21] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. [22] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016. [23] E. Insafutdinov, L. Pishchulin, B. Andres, M. Andriluka, and B. Schiele. Deepercut: A deeper, stronger, and faster multiperson pose estimation model. In European Conference on Computer Vision, pages 34–50. Springer, 2016. [24] B. Kim, R. Khanna, and O. O. Koyejo. Examples are not enough, learn to criticize! criticism for interpretability. In Advances in Neural Information Processing Systems, pages 2280–2288, 2016. [25] B. Kim, C. Rudin, and J. A. Shah. The bayesian case model: A generative approach for case-based reasoning and prototype classification. In NIPS, 2014. [26] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [27] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet clas sification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [28] A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016. [29] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradientbased learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [30] Z. C. Lipton. The mythos of model interpretability. arXiv preprint arXiv:1606.03490, 2016. Through human studies and explanations, we have proven that the performance of SOTA models on Imagenet is underestimated. This leaves little room for improvement and calls for new large-scale benchmarks involving for example multi-label annotations. We have also improved our understanding of adversarial examples from the perspective of the end-user and positioned model criticism as a valuable tool for uncovering undesirable biases. These result open an exciting perspective on designing explanations and automating bias detection in vision models. Our study suggests that more research in these topics will be necessary to sustain the use of machine learning as a general purpose technology and to achieve new breakthroughs in image classification. References [1] A. Aamodt and E. Plaza. Case-based reasoning: Foundational issues, methodological variations, and system approaches. AI Commun., 7:39–59, 1994. [2] K. Andrej. What i learned from competing against a convnet on imagenet. http://karpathy.github.io/2014/ 09/02/what-i-learned-from-competingagainst-a-convnet-on-imagenet/, 2014. [3] A. Badanidiyuru, B. Mirzasoleiman, A. Karbasi, and A. Krause. Streaming submodular maximization: massive data summarization on the fly. In KDD, 2014. [4] I. Bichindaritz and C. R. Marling. Case-based reasoning in the health sciences: What’s next? Artificial intelligence in medicine, 36 2:127–35, 2006. [5] T. Bolukbasi, K.-W. Chang, J. Y. Zou, V. Saligrama, and A. T. Kalai. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In Advances in Neural Information Processing Systems, pages 4349–4357, 2016. [6] A. Bulat and G. Tzimiropoulos. Human pose estimation via convolutional part heatmap regression. In European Conference on Computer Vision, pages 717–732. Springer, 2016. [7] M. Cisse, Y. Adi, N. Neverova, and J. Keshet. Houdini: Fooling deep structured prediction models. arXiv preprint arXiv:1707.05373, 2017. [8] M. Cisse, P. Bojanowski, E. Grave, Y. Dauphin, and N. Usunier. Parseval networks: Improving robustness to adversarial examples. arXiv preprint arXiv:1704.08847, 2017. [9] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. FeiFei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. [10] Y. Dong, H. Su, J. Zhu, and F. Bao. Towards interpretable deep neural networks by leveraging adversarial examples. arXiv preprint arXiv:1708.05493, 2017. [11] A. Fawzi, O. Fawzi, and P. Frossard. Analysis of classifiers’ robustness to adversarial perturbations. arXiv preprint arXiv:1502.02590, 2015. 4329 [31] G. Montavon, W. Samek, and K.-R. Müller. Methods for interpreting and understanding deep neural networks. Digital Signal Processing, 2017. [32] S.-M. Moosavi-Dezfooli, A. Fawzi, and P. Frossard. Deepfool: a simple and accurate method to fool deep neural networks. arXiv preprint arXiv:1511.04599, 2015. [33] D. Paperno, M. Marelli, K. Tentori, and M. Baroni. Corpusbased estimates of word association predict biases in judgment of word co-occurrence likelihood. Cognitive psychology, 74:66–83, 2014. [34] N. Papernot, P. McDaniel, X. Wu, S. Jha, and A. Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pages 582–597. IEEE, 2016. [35] F. Perronnin, J. Sánchez, and T. Mensink. Improving the fisher kernel for large-scale image classification. Computer Vision–ECCV 2010, pages 143–156, 2010. [36] M. T. Ribeiro, S. Singh, and C. Guestrin. ”why should I trust you?”: Explaining the predictions of any classifier. CoRR, abs/1602.04938, 2016. [37] S. Ritter, D. G. Barrett, A. Santoro, and M. M. Botvinick. Cognitive psychology for deep neural networks: A shape bias case study. arXiv preprint arXiv:1706.08606, 2017. [38] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. [39] [40] [41] [42] [43] [44] [45] [46] 4330 International Journal of Computer Vision, 115(3):211–252, 2015. W. Samek, T. Wiegand, and K.-R. Müller. Explainable artificial intelligence: Understanding, visualizing and interpreting deep learning models. arXiv preprint arXiv:1708.08296, 2017. U. Shaham, Y. Yamada, and S. Negahban. Understanding adversarial training: Increasing local stability of neural nets through robust optimization. arXiv preprint arXiv:1511.05432, 2015. H. A. Simon and A. Newell. Human problem solving : the state of the theory in 1970. 1972. C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. P. Tabacof and E. Valle. Exploring the space of adversarial images. arXiv preprint arXiv:1510.05328, 2015. F. Tramèr, A. Kurakin, N. Papernot, D. Boneh, and P. McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017. Y. Wang, X. Deng, S. Pu, and Z. Huang. Residual convolutional ctc networks for automatic speech recognition. arXiv preprint arXiv:1702.07793, 2017. H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
2cs.AI
arXiv:1709.09024v3 [math.GR] 15 Feb 2018 LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) PRITAM GHOSH Dedicated to Lee Mosher on his 60th birthday Abstract. For a free group F of finite rank such that rank(F) ≥ 3, we prove that the set of weak limits of a conjugacy class in F under iterates of some hyperbolic φ ∈ Out(F) is equal to the collection of generic leaves and lines with endpoints in attracting fixed points of φ. As an application we describe the ending lamination set for a hyperbolic extension of F by a hyperbolic subgroup of Out(F) in a new way and use it to prove results about Cannon-Thurston maps for such extensions. We also use it to derive conditions for quasiconvexity of finitely generated, infinite index subgroups of F in the extension group. These results generalize similar results obtained in Mitra [1999], Kapovich and Lustig [2015] and use different techniques. 1. Introduction Fix a nonabelian free group F of finite rank and assume that rank(F) ≥ 3. The outer automorphism group, Out(F), of a free group F is defined as Aut(F) modulo the group of inner automorphisms of F. There are many tools in studying the properties of this group. One of them is by using train-track maps introduced in Bestvina and Handel [1992] and later generalized in Bestvina et al. [1997], Bestvina et al. [2000], Feighn and Handel [2011]. The fully irreducible outer automorphisms are elements in Out(F) which do not have iterates that leave a conjugacy class of some proper free factor invariant. They are the most well understood elements in Out(F). They behave very closely to the pseudo-Anosov homeomorphisms of surfaces with one boundary component, which have been well understood and are a rich source of examples and interesting theorems. Our focus will be on outer automorphisms φ which might not be fully irreducible but have a lift Φ ∈ Aut(F) such that ∃M > 0, λ > 1 ∋ λ|c| ≤ max {|ΦM (c)|, |Φ−M (c)|}∀c ∈ F Such classes of outer automorphisms are called hyperbolic outer automorphisms. It was shown by Bestvina and Feighn [1992] and Brinkmann [2000] that an outer automorphism is hyperbolic if and only if it does not have any periodic conjugacy classes. Our first objective (Section 3 ) is to classify all weak limits of any conjugacy class [c] under the action of a hyperbolic φ ∈ Out(F). For this we use the theory of completely split relative train track maps introduced by Feighn-Handel in their 2000 Mathematics Subject Classification. Primary 20F65; Secondary 57M, 37B, 37D. Key words and phrases. Free groups, Outer automorphism, Cannon-Thurston map. 1 2 PRITAM GHOSH Recognition Theorem work Feighn and Handel [2011] and later further studied in great details by Handel-Mosher in their body of work about Subgroup Decomposition in Out(F) Handel and Mosher [2017a,b]. Our main result in this direction is the following result (here Bgen (φ) denotes the set of all generic leaves of all attracting laminations for φ (See section 2.5) and BFix+ (φ) denotes the set of all lines with endpoints in Fix+ (φ).(See section 2.7)): Theorem 3.10. Suppose φ ∈ Out(F) is a hyperbolic outer automorphism and [c] is any conjugacy class in F. Then the weak limits of [c] under iterates of φ are in WL(φ) := Bgen (φ) ∪ BFix+ (φ) Conversely, any line in WL(φ) is a weak limit of some conjugacy class in F under iterates of φ. The dynamics of fully irreducible outer automorphisms are very well understood. This theorem, in a way shows that dynamical behavior of hyperbolic outer automorphisms which are not fully irreducible are also well behaved. One of the special properties of a fully irreducible and hyperbolic automorphism φ is that the nonattracting subgroup system (see section 2.6) of the unique attracting lamination of φ is trivial. This implies that every conjugacy class is attracted to the unique attracting lamination under iterates of φ. The above theorem goes on to show that a somewhat similar behaviour is observed in the case of hyperbolic automorphisms which are not fully irreducible. More precisely, every conjugacy class is attracted to some attracting lamination under iterates of φ, which is the content of Lemma 3.1. The above theorem also implies that φ is hyperbolic if and only if every conjugacy class is weakly attracted to some singular line of φ under iterates of φ (See 3.12). Theorem 3.10 is used to prove several important results in Section 4 . The work of [Brinkmann, 2000, Theorem 1.2] and Bestvina and Feighn [1992] show that φ is hyperbolic if and only if the mapping torus Gφ := Fhφi ⋊ Z is a Gromov hyperbolic group. We use the above theorem 3.10 to define a set of lines which describe the ending lamination set (Λhφi ) defined in [Mitra, 1997] for Fhφi ⋊ Z. We prove: Lemma 4.4. Let H = hφi for some hyperbolic φ ∈ Out(F). Then g g −1 ) Λhφi = WL(φ) ∪ WL(φ This new description of the ending lamination set has very significant implications. First we use this new description of the ending lamination set to prove the following theorem, which partially answers a question of Swarup: Theorem 4.8. Consider the exact sequence of hyperbolic groups: 1 → F → Gφ → hφi → 1 The Cannon-Thurston map bi : ∂F → ∂Gφ is a finite-to-one map and cardinality of preimage of each point in ∂Gφ is uniformly bounded, the bound depending only on rank of F. The proof of this theorem becomes fairly simple once we prove in Proposition 3.6 that every nongeneric generic leaf of an attracting lamination for φ is a line in BFix+ (φ). Then we can apply the proposition that the number of lines in BFix+ (φ) for any hyperbolic outer automorphism φ is uniformly bounded above by some number depending only on rank of F (see Proposition 2.24). LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 3 The special case, of the aforementioned theorem, when φ is fully irreducible was first proved by [Kapovich and Lustig, 2015, Theorem 5.4]. However the methods of our proofs are very different; we use the action of φ on conjugacy classes of F and their proof uses action of φ on boundary of outer space. In Section 4.2 the next application of the new description of the ending lamination set is in understanding quasiconvexity of finitely generated infinite index subgroups of F inside Gφ . Here we are able to give one equivalent condition and also one sufficient condition for quasiconvexity. (For definition of Fix+ (φ) please see section 2.3). Theorem 4.14. Consider the exact sequence 1 → F → Gφ → hφi → 1 where φ is a hyperbolic automorphism of F. Let H be a finitely generated infinite index subgroup of F. Then the following are equivalent: (1) H is quasiconvex in Gφ . (2) ∂H ∩ {Fix+ (φ) ∪ Fix− (φ)} = ∅. Moreover both (1) and (2) are satisfied if every attracting and repelling lamination of φ is minimally filling with respect to H. The proof of this theorem uses a result that was proved in Handel and Mosher [2009] 2.23, which states that every attracting lamination Λ of φ contains a leaf which is a singular line for φ and one of whose ends is dense in Λ. The concept of minimally filling with respect to H is motivated from the idea of minimally filling. We make this definition in 4.11 and show that this theorem indeed covers the case for a fully irreducible φ in Corollary 4.15. Dynamics of outer automorphisms have been studied for quite sometime using the notion of train track maps which were introduced in the seminal paper of Bestvina and Handel [1992]. Then [Bestvina et al., 1997, Proposition 2.4] studied the dynamics of fully irreducible outer automorphisms and proved the existence of an attracting lamination with the property that any finitely generated subgroup of F which carries this lamination must be of finite index in F. Note that this is a much stronger property than just “filling” the free group (not being carried by a proper free factor of F) and was called minimally filling by Kapovich-Lustig in their work Kapovich and Lustig [2015]. We establish a connection between minimally filling and filling (in the sense of free factor support) in Proposition 4.10. The primary obstruction that occurs is due to possible existence filling attracting laminations which are not minimally filling. We then proceed to generalize the notion of minimally filling for the purposes of using it for hyperbolic outer automorphisms which are not fully irreducible (Definition 4.11). Next we give an algebraic condition on a finitely generated, infinite index subgroup of F for it to be quasiconvex in Gφ (see Theorem 4.16). It is quite understandable that such a general condition is quite complicated in nature due to complexities that arise in a non-fully irreducible hyperbolic φ. For example, one might have a filling lamination which may not be minimally filling and whose nonattracting subgroup system is nontrivial implying that not every conjugacy class is attracted to it under iteration of φ. 4 PRITAM GHOSH Section 4.3 of this paper deals with the Cannon-Thurston maps for a more complicated scenario when we have an exact sequence of hyperbolic groups 1→F→G→H→1 where H is non-elementary hyperbolic subgroup of Out(F). Observe that hyperbolicity of G implies that H is purely atoroidal, meaning every element of H is a hyperbolic outer automorphism. We use the Lemma 4.4, where we describe the nature of ending lamination set for a hyperbolic φ in terms of generic leaves and lines in BFix+ (φ), to derive a list equivalent necessary conditions in Proposition 4.20 that elements of H must satisfy in order for the extension group to be hyperbolic. In particular it we observe that two hyperbolic outer automorphisms which do not have a common power but have a common attracting lamination cannot both belong to H. In a very recent work Dowdall et al. [2016] have shown the finiteness of the fibers of Cannon-Thurston map for the special case when H is convex cocompact. The general case however still remains open. We hope that the results we develop here will be useful for addressing this problem in its full generality and also other interesting questions related to hyperbolicity in Out(F). Acknowledgement: The author would like to thank Mahan Mj for suggesting the applications to quasiconvexity after reading the first draft of the paper. We also thank Pranab Sardar for help with the literature on quasiconvexity and other helpful discussions. The author was supported by SERB N-PDF grant PDF/2015/000038 during this project. 2. Preliminaries In this section we give the reader a short review of the definitions and some important results in Out(F) which are relevant to the theorem that we are trying to prove here. All the results which are stated as lemmas, can be found in full details in Bestvina et al. [2000], Feighn and Handel [2011], Handel and Mosher [2017a], Handel and Mosher [2017b]. b 2.1. Weak topology. Given any finite graph G, let B(G) denote the compact space of equivalence classes of circuits in G and paths in G, whose endpoints (if any) are vertices of G. We give this space the weak topology. Namely, for each finite b (G, γ) which contains all paths and circuits path γ in G, we have one basis element N b b in B(G) which have γ as its subpath. Let B(G) ⊂ B(G) be the compact subspace of all lines in G with the induced topology. One can give an equivalent description of B(G) following Bestvina et al. [2000]. A line is completely determined, upto reversal of direction, by two distinct points in ∂F, since there only one line that joins these two points. We can then induce the weak topology on the set of lines coming from the Cantor set ∂F. More explicitly, let Be = {∂F × ∂F− △}/(Z2 ), where △ is the diagonal and Z2 acts by interchanging factors. We can put the weak e induced by Cantor topology on ∂F. The group F acts on Be with a topology on B, e compact but non-Hausdorff quotient space B = B/F. The quotient topology is also called the weak topology. Elements of B are called lines. A lift of a line γ ∈ B is an LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 5 element γ e ∈ Be that projects to γ under the quotient map and the two elements of γ are called its endpoints. e One can naturally identify the two spaces B(G) and B by considering a homeomorphism between the two Cantor sets ∂F and set of ends of universal cover of G , where G is a marked graph. Out(F) has a natural action on B. The action comes from the action of Aut(F) on ∂F. Given any two marked graphs G, G′ and a homob b ′) topy equivalence f : G → G′ between them, the induced map f# : B(G) → B(G ′ is continuous and the restriction f# : B(G) → B(G ) is a homeomorphism. With respect to the identification B(G) ≈ B ≈ B(G′ ), if f preserves the marking then f# : B(G) → B(G′ ) is equal to the identity map on B. When G = G′ , f# agree with their homeomorphism B → B induced by the outer automorphism associated to f . Given a marked graph G, a ray in G is an one-sided infinite concatenation of edges E0 E1 E2 ....... A ray of F is an element of the orbit set ∂F/F. There is connection between these two objects which can be explained as follows. Two rays in G are asymptotic if they have equal subrays, and this is an equivalence relation on the set of rays in G. The set of asymptotic equivalence classes of rays ρ in G is in natural bijection with ∂F/F where ρ in G corresponds to end ξ ∈ ∂F/F if there is a lift ρ̃ ⊂ G of ρ and a lift ξ˜ ∈ ∂F of ξ, such that ρ̃ converges to ξ˜ in the Gromov compactification of G̃. A ray ρ is often said to be the realization of ξ if the above conditions are satisfied. A line(path) γ is said to be weakly attracted to a line(path) β under the action of φ ∈ Out(F), if the φk (γ) converges to β in the weak topology. This is same as saying, for any given finite subpath of β, φk (γ) contains that subpath for some value of k; similarly if we have a homotopy equivalence f : G → G, a line(path) γ k (γ) is said to be weakly attracted to a line(path) β under the action of f# if the f# converges to β in the weak topology. The accumulation set of a ray γ in G is the set of lines l ∈ B(G) which are elements of the weak closure of γ; which is same as saying every finite subpath of l occurs infinitely many times as a subpath γ. The weak accumulation set of some ξ ∈ ∂F is the set of lines in the weak closure of any of the asymptotic rays in its equivalence class. We call this the weak closure of ξ. A line l is said to be birecurrent if l if it is in the weak closure of some positive subray of itself and it is in the weak closure of some negative subray of itself. This implies that any finite subpath of l occurs infinitely often in either direction. 2.2. Free factor systems and subgroup systems. Given a finite collection {K1 , K2 , ....., Ks } of subgroups of F , we say that this collection determines a free factorization of F if F is the free product of these subgroups, that is, F = K1 ∗ K2 ∗ ..... ∗ Ks . The conjugacy class of a subgroup is denoted by [Ki ]. A free factor system is a finite collection of conjugacy classes of subgroups of F , K := {[K1 ], [K2 ], ....[Kp ]} such that there is a free factorization of F of the form F = K1 ∗ K2 ∗ .... ∗ B, where B is some finite rank subgroup of F (it may be trivial). There is an action of Out(F) on the set of all conjugacy classes of subgroups of F. This action induces an action of Out(F) on the set of all free factor systems. For notation simplicity we will avoid writing [K] all the time and write K instead, when we discuss the action of Out(F) on this conjugacy class of subgroup K or anything regarding the conjugacy class [K]. It will be understood that we actually mean [K]. 6 PRITAM GHOSH For any marked graph G and any subgraph H ⊂ G, the fundamental groups of the noncontractible components of H form a free factor system . We denote this by [H]. A subgraph of G which has no valence 1 vertex is called a core graph. Every subgraph has a unique core graph, which is a deformation retract of the union of the noncontractible components of H, implying that free factor system defined by the core of H is equal to the free factor system defined by core of H. Conversely, any free factor system can be realized as [H] for some nontrivial core subgraph of some marked graph G. A free factor system K carries a conjugacy class [c] in F if there exists some [K] ∈ K such that c ∈ K. We say that K carries the line γ ∈ B if for any marked graph G the realization of γ in G is the weak limit of a sequence of circuits in G each of which is carried by K. An equivalent way of saying this is: for any marked graph G and a subgraph H ⊂ G with [H] = K, the realization of γ in G is contained in H. Similarly define a subgrpoup system A = {[H1 ], [H2 ], ...., [Hk ]} to be a finite collection of conjugacy classes of finite rank subgroups Hi < F. A subgroup system A carries a conjugacy class [c] ∈ F if there exists some [A] ∈ A such that c ∈ A. Also, we say that A carries a line γ if one of the following equivalent conditions hold: • γ is the weak limit of a sequence of conjugacy classes carries by A. • There exists some [A] ∈ A and a lift γ e of γ so that the endpoints of γ e are in ∂A. The following lemma is an important property of lines carried by a subgroup system. The proof is by using the observation that A < F is of finite rank implies that ∂A is a compact subset of ∂F. Lemma 2.1. For each subgroup system A the set of lines carried by A is a closed subset of B From Bestvina et al. [2000] The free factor support of a set of lines B in B is (denoted by Asupp (B)) defined as the meet of all free factor systems that carries B. We are skipping giving the exact definition of meet here since we have no explicit use for that definition. Roughly speaking, one should think of the free factor support as the smallest (in terms of inclusion of subgroups) free factor system that carries B (for more details please see [Bestvina et al., 2000, Corollary 2.6.5]). If B is a single line then Asupp (B) is single free factor. We say that a set of lines, B, is filling if Asupp (B) = [F]. 2.3. Principal automorphisms and rotationless automorphisms. Given an outer automorphism φ ∈ Out(F) , we can consider a lift Φ in Aut(F). We call a lift principal automorphism, if it satisfies certain conditions described below. Roughly speaking, what such lifts guarantees is the the existence of certain lines which are not a part of the attracting lamination but it still fills the free group F. Such lines (called singular lines) will be a key tool in describing the set of lines which are not attracted to the attracting lamination of φ. Consider φ ∈ Out(F) and a lift Φ in Aut(F). Φ has an action on F, which has a fixed subgroup denoted by Fix(Φ). Consider the boundary of this fixed subgroup ∂Fix(Φ) ⊂ ∂F. It is either empty or has exactly two points. b : ∂F → ∂F. Let This action action extends to the boundary and is denoted by Φ b b Fix(Φ) denote the set of fixed points of this action. We call an element P of Fix(Φ) LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 7 attracting fixed point if there exists an open neighborhood U ⊂ ∂F of P such that b ) ⊂ U and for every points Q ∈ U the sequence Φ b n (Q) converges to we have Φ(U b denote the set of attracting fixed points of Fix(Φ). b Similarly let P . Let Fix+ (Φ) −1 b b Fix− (Φ) denote the attracting fixed points of Fix(Φ ). b = Fix(Φ) b − Fix− (Φ) b = ∂Fix(Φ) ∪ Fix+ (Φ). b We say that an automorLet FixN (Φ) phism Φ ∈ Aut(F) in the outer automorphism class of φ is a principal automorphism b has at least 3 points or FixN (Φ) b has exactly two points which are neither if FixN (Φ) the endpoints of an axis of a covering translation, nor the endpoints of a generic leaf of an attracting lamination Λ+ φ . The set of all principal automorphisms of φ is denoted by P (φ). Notation: For sake of simplicity we will abuse the notation in this paper. Since we will be dealing exclusively with hyperbolic outer automorphisms in this paper we know that ∂Fix(Φ) is trivial for any automorphism Φ in the class of φ. Hence b = Fix+ (Φ). b We shall abbreviate FixN (Φ) [ b Fix+ (Φ) Fix+ (φ) := Φ∈P (φ) Similarly for Fix− (φ). We have the following lemma from Levitt and Lustig [2008] that we shall be using in this paper to show that any conjugacy class limits to either a generic leaf of some attracting lamination of φ or a singular line of φ (see proposition 3.6). This result essentially tells us that the attracting fixed points are almost globally attracting, except for the finite number of repelling fixed points. Lemma 2.2. [Levitt and Lustig, 2008, Theorem I] If φ ∈ Out(F) has no periodic conjugacy classes in F then there exists an integer q ≥ 1 such that for each Φ ∈ Aut(F) representing φ and each ξ ∈ ∂F, one of the following holds: b q ). (1) ξ ∈ Fix− (Φ b qi converges to a point in Fix+ (Φ b q ). (2) The sequence Φ b = ∪k≥1 Fix(Φ b k ), Per+ (Φ) b = ∪k≥1 Fix+ (Φ b k ) and similarly define Per−(Φ) b Let Per(Φ) b and PerN (Φ). b = PerN (Φ) b for all Φ ∈ P (φ), and We say that φ ∈ Out(F) is rotationless if FixN (Φ) if for each k ≥ 1 the map Φ → Φk induces a bijection between P (φ) and P (φk ). The following two important lemmas about rotationless automorphisms are taken from Feighn and Handel [2011]. Lemma 2.3 (Feighn and Handel [2011],Lemma 4.43). There exists a K depending only upon the rank of the free group F such that for every φ ∈ Out(F) , φK is rotationless. The above lemma is heavily used in this paper. Whenever we write “pass to a rotationless power ”we intend to use this uniform constant K given by the lemma. Rotationless powers are useful and important since they kill any periodic behaviour (as the following lemma shows) and guarantee the existence of completely split relative train track maps as we shall see later. Lemma 2.4 (Feighn and Handel [2011]). If φ ∈ Out(F) is rotationless then: • Every periodic conjugacy class of φ is a fixed conjugacy class. 8 PRITAM GHOSH • Every free factor system which is periodic under φ is fixed. • Every periodic direction of φ is fixed by φ. Remark 2.5. These results show that given any φ ∈ Out(F) one can pass to ψ = φK which is rotationless and hence one can choose q = 1 for the rotationless outer automorphism ψ as in Lemma 2.2. This is the form in which we will be using lemma 2.2. 2.4. Topological representatives and Train track maps. Given φ ∈ Out(F) a topological representative is a homotopy equivalence f : G → G such that ρ : Rr → G is a marked graph, f takes vertices to vertices and edges to paths and ρ ◦ f ◦ ρ : Rr → Rr represents Rr . A nontrivial path γ in G is a periodic Nielsen k path if there exists a k such that f# (γ) = γ; the minimal such k is called the period and if k = 1, we call such a path Nielsen path. A periodic Nielsen path is indivisible if it cannot be written as a concatenation of two or more nontrivial periodic Nielsen paths. Given a subgraph H ⊂ G let G \ H denote the union of edges in G that are not in H. Given a marked graph G and a homotopy equivalence f : G → G that takes edges to paths, one can define a new map T f by setting T f (E) to be the first edge in the edge path associated to f (E); similarly let T f (Ei , Ej ) = (T f (Ei ), T f (Ej )). So T f is a map that takes turns to turns. We say that a nondegenerate turn is illegal if for some iterate of T f the turn becomes degenerate; otherwise the turn is legal. A path is said to be legal if it contains only legal turns and it is r − legal if it is of height r and all its illegal turns are in Gr−1 . Relative train track map. Given φ ∈ Out(F) and a topological representative f : G → G with a filtration G0 ⊂ G1 ⊂ · · · ⊂ Gk which is preserved by f , we say that f is a train relative train track map if the following conditions are satisfied: (1) f maps r-legal paths to legal r-paths. (2) If γ is a path in G with its endpoints in Hr then f# (γ) has its end points in Hr . (3) If E is an edge in Hr then T f (E) is an edge in Hr For any topological representative f : G → G and exponentially growing stratum Hr , let N (f, r) be the number of indivisible Nielsen paths ρ ⊂ G that intersect the interior of Hr . Let N (f ) = Σr N (f, r). Let Nmin be the minimum value of N (f ) that occurs among the topological representatives with Γ = Γmin . We call a relative train track map stable if Γ = Γmin and N (f ) = Nmin . The following result is Theorem 5.12 in Bestvina and Handel [1992] which assures the existence of a stable relative train track map. Lemma 2.6. Every φ ∈ Out(F) has a stable relative train track representative. Splittings, complete splittings and CT’s. Given relative train track map f : G → G, splitting of a line, path or a circuit γ is a decomposition of γ into subpaths i i i i ....γ0 γ1 .....γk .... such that for all i ≥ 1 the path f# (γ) = ..f# (γ0 )f# (γ1 )...f# (γk )... The terms γi are called the terms of the splitting of γ. Given two linear edges E1 , E2 and a root-free closed Nielsen path ρ such that f# (Ei ) = Ei .ρpi then we say that E1 , E2 are said to be in the same linear family and any path of the form E1 ρm E 2 for some integer m is called an exceptional path. Complete splittings: A splitting of a path or circuit γ = γ1 · γ2 ...... · γk is called complete splitting if each term γi falls into one of the following categories: LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 9 • γi is an edge in some irreducible stratum. • γi is an indivisible Nielsen path. • γi is an exceptional path. • γi is a maximal subpath of γ in a zero stratum Hr and γi is taken. Completely split improved relative train track maps. A CT or a completely split improved relative train track maps are topological representatives with particularly nice properties. But CTs do not exist for all outer automorphisms. Only the rotationless outer automorphisms are guaranteed to have a CT representative as has been shown in the following Theorem from Feighn and Handel [2011](Theorem 4.28). Lemma 2.7. For each rotationless φ ∈ Out(F) and each increasing sequence F of φ-invariant free factor systems, there exists a CT f : G → G that is a topological representative for φ and f realizes F . The following results are some properties of CT’s defined in Recognition theorem work of Feighn-Handel in Feighn and Handel [2011]. We will state only the ones we need here. (1) (Rotationless) Each principal vertex is fixed by f and each periodic direction at a principal vertex is fixed by T f . (2) (Completely Split) For each edge E in each irreducible stratum, the path f (E) is completely split. (3) (vertices) The endpoints of all indivisible Nielsen paths are vertices. The terminal endpoint of each nonfixed NEG edge is principal. (4) (Periodic edges) Each periodic edge is fixed. (5) (Zero strata) Each zero strata Hi is contractible and enveloped by a EG strata Hs , s > i, such that every edge of Hi is a taken in Hs . Each vertex of Hi is contained in Hs and link of each vertex in Hi is contained in Hi ∪ Hs . (6) (Linear Edges) For each linear edge Ei there exists a root free indivisible Nielsen path wi such that f# (Ei ) = Ei widi for some di 6= 0. (7) (Nonlinear NEG edges) [Feighn and Handel, 2011, Lemma 4.21] Each non-fixed NEG stratum Hi is a single edge with its NEG orientation and has a splitting f# (Ei ) = Ei · ui , where ui is a closed nontrivial completely split circuit and is an indivisible Nielsen path if and only if Hi is linear. CTs have very nice properties. The reader can look them up Feighn and Handel [2011] for a detailed exposition or Handel and Mosher [2017a] for a quick reference. We list below only a few of them that is needed for us. All three lemmas are present in the aforementioned papers. These properties along with the complete description of the components in a complete splitting of a circuit are the main reasons why will keep working with rotationless powers of a hyperbolic φ in the next two sections. We can achieve a great deal of control when we iterate random conjugacy classes under φ. Lemma 2.8. (Feighn and Handel [2011], Lemma 4.11) A completely split path or circuit has a unique complete splitting. The following lemma is a crucial component of our proof here. It assures us that as we iterate a circuit σ under f# eventually we will achieve a complete splitting at some point and then analyzing the components of such a splitting (as we do in Lemma 3.1) tells us what the possible limits could be. 10 PRITAM GHOSH Lemma 2.9. [Feighn and Handel, 2011, Lemma 4.26] If σ is a finite path or a k circuit with endpoint in vertices, then f# (σ) is completely split for all sufficiently k+1 large k ≥ 1 and f# (σ) has complete splitting that is a refinement of the complete k splitting of f# (σ). The following two Lemmas are used in proof of Lemma 3.1, when we give our argument with the zero strata within the proof. When a circuit σ is iterated k under a hyperbolic φ and we have a complete splitting for some f# (σ), where one of the components of the complete splitting is a path in a zero strata, these lemmas along with Property(5) listed above, tell us that the preceding and the following components (with respect to the component contained in zero strata) in the complete splitting must be an exponentially growing edge. Lemma 2.10. [Bestvina et al., 2000, Theorem 5.15, eg(i)] Every periodic Nielsen path is fixed. Also, for each EG stratum Hr there exists at most one indivisible Nielsen path of height r, upto reversal of orientation, and the initial and terminal edges of this Nielsen path is in Hr . The following lemma is part of [Feighn and Handel, 2011, Lemma 4.24] Lemma 2.11. If an EG stratum Hi has an indivisible Nielsen path of height i then there is no zero strata enveloped by Hi 2.5. Attracting Laminations and their properties under CTs. For any marked graph G, the natural identification B ≈ B(G) induces a bijection between the closed subsets of B and the closed subsets of B(G). A closed subset in any of these two cases is called a lamination, denoted by Λ. Given a lamination Λ ⊂ B we look at the corresponding lamination in B(G) as the realization of Λ in G. An element λ ∈ Λ is called a leaf of the lamination. A lamination Λ is called an attracting lamination for φ is it is the weak closure of a line l (called the generic leaf of λ) satisfying the following conditions: • l is birecurrent leaf of Λ. • l has an attracting neighborhood V , in the weak topology, with the property that every line in V is weakly attracted to l. • no lift e l ∈ B of l is the axis of a generator of a rank 1 free factor of F . We know from Bestvina et al. [2000] that with each φ ∈ Out(F) we have a finite set of laminations L(φ), called the set of attracting laminations of φ, and the set L(φ) is invariant under the action of φ. When it is nonempty φ can permute the elements of L(φ) if φ is not rotationless. For rotationless φ L(φ) is a fixed set. Attracting laminations are directly related to EG stratas. An important result from Bestvina et al. [2000] section 3 is that there is a unique bijection between exponentially growing strata and attracting laminations, which implies that there are only finitely many elements in L(φ). Dual lamination pairs. We have already seen that the set of lines carried by a free factor system is a closed set and so, together with the lemma that the weak closure of a generic leaf λ of an attracting lamination Λ is the whole lamination Λ tells us that Asupp (λ) = Asupp (Λ). In particular the free factor support of an attracting lamination Λ is a single free factor. Let φ ∈ Out(F) be an outer − automorphism and Λ+ φ be an attracting lamination of φ and Λφ be an attracting −1 lamination of φ . We say that this lamination pair is a dual lamination pair LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 11 − if Asupp (Λ+ φ ) = Asupp (Λφ ). By Lemma 3.2.4 of Bestvina et al. [2000] there is bijection between L(φ) and L(φ−1 ) induced by this duality relation. Tiles: Bestvina-Feighn-Handel introduced the concept of tiles in Bestvina et al. k [2000]. For an edge E in a EG stratum, an unoriented path of the form f# (E) is called a k-tile of height r. We state below a two important applications of tiles. Lemma 2.12. (1) [Bestvina et al., 2000, Lemma 3.1.10 item (4)] If Λr is the unique attracting lamination associated with Hr then every generic leaf can be written as a increasing union of tiles of height r. (2) [Handel and Mosher, 2017a, Lemma1.57 item(4)] There exists p such that for every k ≥ i ≥ 0, each k + p-tile of height r contains every i-tile of height r. This lemma will be used by us while analysing the weak limits of a conjugacy class under iterates of φ; when we look at a complete splitting of some φk# (σ) and one of the components in that splitting is an edge in a EG strata, these lemma tell us that such a circuit is weakly attracted to the attracting lamination related to that EG strata. 2.6. Nonattracting subgroup system Ana (Λ+ φ ). The nonattracting subgroup system of an attracting lamination contains information about lines and circuits which are not attracted to the lamination. The definition of this subgroup system is Definition 2.13. Suppose φ ∈ Out(F) is rotationless and f : G → G is a CT representing φ such that Λ+ φ is an invariant attracting lamination which corresponds to the EG stratum Hs ∈ G. The nonattracting subgraph Z of G is defined as a union of irreducible stratas Hi of G such that no edge in Hi is weakly attracted to Λ+ φ. This is equivalent to saying that a strata Hr ⊂ G \ Z if and only if there exists k (Er ) is an edge in Hs . Define the k ≥ 0 some term in the complete splitting of f# path ρbs to be trivial path at any chosen vertex if there does not exist any indivisible Nielsen path of height s, otherwise ρbs is the unique closed indivisible path of height s (from definition of stable train track maps). The groupoid hZ, ρbs i - Let hZ, ρbs i be the set of lines, rays, circuits and finite paths in G which can be written as a concatenation of subpaths, each of which is an edge in Z, the path ρbs or its inverse. Under the operation of tightened concatenation of paths in G, this set forms a groupoid (Lemma 5.6, [Handel and Mosher [2017b]]). Define the graph K by setting K = Z if ρbs is trivial and let h : K → G be the inclusion map. Otherwise define an edge Eρ representing the domain of the Nielsen path ρs : Eρ → Gs , and let K be the disjoint union of Z and Eρ with the following identification. Given an endpoint x ∈ Eρ , if ρs (x) ∈ Z then identify x ∼ ρs (x).Given distinct endpoints x, y ∈ Eρ , if ρs (x) = ρs (y) ∈ / Z then identify x ∼ y. In this case define h : K → G to be the inclusion map on K and the map ρs on Eρ . It is not difficult to see that the map h is an immersion. Hence restricting h to each component of K, we get an injection at the level of fundamental groups. The nonattracting subgroup system Ana (Λ+ φ ) is defined to be the subgroup system defined by this immersion. We will leave it to the reader to look it up in Handel and Mosher [2017b] where it is explored in details. We however list some key properties which we will be using and justifies the importance of this subgroup system. 12 PRITAM GHOSH Lemma 2.14. (Handel and Mosher [2017b]- Lemma 1.5, 1.6) (1) The set of lines carried by Ana (Λ+ φ ) is closed in the weak topology. (2) A conjugacy class [c] is not attracted to Λ+ φ if and only if it is carried by + Ana (Λφ ). (3) Ana (Λ+ φ ) does not depend on the choice of the CT representing φ. (4) Given φ, φ−1 ∈ Out(F) both rotationless elements and a dual lamination + − pair Λ± φ we have Ana (Λφ ) = Ana (Λφ ) (5) Ana (Λ+ φ ) is a free factor system if and only if the stratum Hr is not geometric. (6) Ana (Λ+ φ ) is malnormal. (7) If {γn }n∈N is a sequence of lines such that every weak limit of every subsequence of {γn } is carried by Ana (Λφ ) then {γn } is carried by Ana (Λφ ) for all sufficiently large n 2.7. Singular lines, Extended boundary and Weak attraction theorem. In this section we will look at some results from Handel and Mosher [2017b] which analyze and identify the set of lines which are not weakly attracted to an attracting lamination Λ± φ , given some exponentially growing element in Out(F). Most of the results stated here are in terms of rotationless elements as in the original work. However, we note that being weakly attracted to a lamination Λφ is not dependent on whether the element is rotationless. All lemmas stated here about rotationless elements also hold for non rotationless elements also, unless otherwise mentioned. This has been pointed out in Remark 5.1 in Handel and Mosher [2017b] The main reason for using rotationless elements is to make use of the train track structure from the CT theory. We will use some of the lemmas to prove lemmas about non rotationless elements which we will need later on. + Denote the set of lines not attracted to Λ+ φ by Bna (Λφ ). The non-attracting subgroup system carries partial information about such lines as we can see in Lemma 2.14. Other obvious lines which are not attracted are the generic leaves of Λ− φ . There is another class of lines, called singular lines, which we define below, which are not weakly attracted to Λ+ φ. Definition 2.15. Define a singular line for φ to be a line γ ∈ B if there exists a principal lift Φ of some rotationless iterate of φ and a lift e γ of γ such that the b ⊂ ∂F. endpoints of γ e are contained in Fix+ (Φ) The set of all singular lines of φ is denoted by Bsing (φ). The lemma [Lemma 2.1, Handel and Mosher [2017b]] below summarizes this discussion. Lemma 2.16. Given a rotationless φ ∈ Out(F) and an attracting lamination Λ+ φ, + any line γ that satisfies one of the following three conditions is in Bna (Λφ ). (1) γ is carried by Ana Λ± φ (2) γ is a generic leaf of some attracting lamination for φ−1 (3) γ is in Bsing (φ−1 ). But these are not all lines that constitute Bna (Λ+ φ ). A important theorem in [Theorem 2.6, Handel and Mosher [2017b], stated below, tells us that there is way to concatenate lines from the three classes we mentioned in the above lemma which will LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 13 also result in lines that are not weakly attracted to Λ+ φ . These are all possible types of lines in Bna (Λ+ ). A simple explanation of why the concatenation is necessary φ is, one can construct a line by connecting the base points of two rays, one of which is asymptotic to a singular ray in the forward direction of φ and the other is asymptotic to a singular ray in the backward direction of φ. This line does not fall into any of the three categories we see in the lemma above. The concatenation process described in Handel and Mosher [2017b] takes care of such lines. We will not describe the concatenation here, but the reader can look up section 2.2 in Handel and Mosher [2017b]. The following definition is by Handel and Mosher: Definition 2.17. Let A ∈ Ana Λ± φ and Φ ∈ P (φ), we say that Φ is A − related if b ∩ ∂A 6= ∅. Define the extended boundary of A to be FixN (Φ)  [ b F ixN (Φ) ∂ext (A, φ) = ∂A ∪ Φ where the union is taken over all A-related Φ ∈ P (φ). Let Bext (A, φ) denote the set of lines which have end points in ∂ext (A, φ); this set is independent of the choice of A in its conjugacy class. Define [ Bext (Λ+ Bext (A, φ) φ) = A∈Ana Λ± φ It is worth noting that the sets of lines mentioned in Lemma 2.18 are not necessarily pairwise disjoint. But if we have a line σ ∈ Bna (Λ+ φ ) that is birecurrent then the situation is much simpler. In that case σ is either a generic leaf of some attracting lamination for φ−1 or σ is carried by Ana Λ± φ . This takes us to the following result due to Handel and Mosher that we need to prove an important result about asymptotic behaviour of leaves of attracting laminations in Proposition 4.7, where we use the conclusion from the “moreover” part of the theorem to conclude that if two leaves of attracting laminations of φ can be asymptotic then they are both singular lines of φ. Lemma 2.18. [Handel and Mosher, 2017b, Theorem G] If φ, ψ = ψ −1 ∈ Out(F) are rotationless and Λ± φ is a dual lamination pair then ± Bna (Λ− φ , ψ) = Bext (Λφ , φ) ∪ Bgen (φ) ∪ Bsing (φ) Moreover the set of lines in Bna (Λ− φ , ψ) are closed under concatenation. More precisely if l′ , l′′ are two lines in Bna (Λ− φ , ψ) with one asymptotic end P say, and ′ ′′ two other distinct endpoints Q , Q for l′ , l′′ respectively, then either there exists ′ ′′ some [A] ∈ Ana (Λ± φ ) so that P, Q , Q ∈ ∂ext (A, φ) or there is a principal lift Φ b such that all three points P, Q′ , Q′′ are in FixN (Φ). This result also plays a key role in the proof of Proposition 3.10 where we show that weak limit of any conjugacy class under iterates of a hyperbolic outer automorphism is either a generic leaf or a singular line and uses the understanding of Bext (Λ± φ , φ). b = Fix+ (Φ). b Remark 2.19. For our purposes, where φ is hyperbolic, FixN (Φ) 14 PRITAM GHOSH From the work of Feighn and Handel in Recognition theorem we extract the following lemma by assuming φ is hyperbolic. The original statement is much more general. Lemma 2.20. [Feighn and Handel, 2011, Lemma 4.36] Let CT f : G −→ G represent a rotationless φ ∈ Out(F), and f˜ : G̃ −→ G̃ is a lift. If a vertex v is fixed by f and E is a non-fixed edge in some EG strata or superlinear NEG strata originating at v with a fixed initial direction, such that f# (E) = Eu, then there exists e = E· e ũ· f˜# (ũ)· f˜2 (ũ)......· f˜k (ũ).... is a ray a splitting f# (E) = E· u such that: R # # b for some principal lift Φ. b Moreover, if E is an and its endpoint is ξ˜ ∈ F ix+ (Φ) edge in some EG strata then the weak accumulation set of ξ is the unique attracting lamination associated to EG strata which contains E. b is obtained by iteration of a some nonfixed Conversely, every point ξ̃ ∈ F ix+ (Φ) edge with a fixed initial vertex. b may not be a principal lift and the ray may not be Note that in this case Φ a singular ray as we have described it here. What we are really interested in is the conclusion in the last sentence about accumulation set about the endpoint. The fact that the weak closure of any attracting fixed point contains an attracting lamination is used several times in this paper. In particular note that if we have a conjugacy class that gets attracted to a singular line under iterates of φ, then it is also weakly attracted to the attracting laminations which appear in the closure of the endpoints of this singular line. The following lemmas are applications of the above result which, put together, essentially tell that iteration of any edge whose initial vertex is principal will give us a ray whose endpoint is an attracting fixed point. Lemma 2.21. Let v be a principal vertex in a CT f : G −→ G representing a N rotationless φ ∈ Out(F). Then for every direction d originating from v, f# (d) is a fixed direction for some N > 0 . Proof. The number of directions originating at any given vertex is finite. If a direction is not periodic then upon iteration of f# it must repeat some direction after N ′ iterations. But since f is rotationless every periodic direction has period one. So, N ′ is bounded by valence of v. Repeat this for every direction and taking N the least common multiple we get N such that f# (d) has a fixed direction for any direction d.  Lemma 2.22. Let v be a principal vertex in a CT f : G −→ G representing a rotationless φ ∈ Out(F) and E ′ be a non-fixed EG edge originating at v. Then k f# (E ′ ) weakly accumulates on a singular ray as k → ∞. k Proof. By using the previous lemma we know that the initial direction of f# (E ′ ) is ′ k fixed for all k ≥ N , where N is as in Lemma 2.22. Hence we can write f# (E ) = Eu, where E is a principal edge. Since the initial direction of E is a fixed direction, we have f# (E) = E· u′ . So, f# (Eu) = E· u′ f# (u). Because, if f# (u) cancels out all of u′ , then we can write f# (u) = u′ u′′ and then in u′′ having an E in the k beginning must be followed by E, since the initial direction of f# (E ′ ) is principal. This is not possible by definition of f# . Thus, the splitting is indeed there. So, k+1 f# (E ′ ) = E· u′ f# (u). Upon iteration we see that this ray R′ accumulates on a singular ray R with initial direction E. LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 15 Next we note that since every finite subpath of R′ occurs as a subpath of R. This is because each tile of E ′ is contained in a tile of E. Hence the weak closure of R′ is contained in the weak closure of R. But the weak closure of R is just Λ+ . Hence weak closure of R′ is the same set and the two rays are asymptotic.  Structure of Singular lines: We now state a lemma which is a collection of lemmas from the subgroup decomposition work of Handel and Mosher that tells us the structure of singular lines and guarantees that one of the leaves of any attracting lamination is a singular line. Lemma 2.23. [Handel and Mosher, 2009, Lemma 3.5, Lemma 3.6], [Handel and Mosher, 2017a, Lemma 1.63] Let φ ∈ Out(F) be rotationless and hyperbolic and l ∈ Bsing (φ) then the following are true: (1) l = RαR′ where R for some singular rays R 6= R′ and some path α which is either trivial or a Nielsen path. Conversely, any such line is a singular line. (2) If Λ ∈ L(φ) then there exists a leaf of Λ which is a singular line and one of its ends is dense in Λ. We include a short sketch of the proof here for sake of completeness, since this result is fundamental to the work done in this paper here. For more technical details please refer to the original proof. Proof. Let f : G → G be a CT representing φ. Sketch of proof for (1): Suppose l is a singular line, then there exists a principal lift Φ of φ which fixes the endpoints of this line, which are attracting fixed points. Use Lemma 2.20 to conclude that there are singular rays R′ , R which converge to these endpoints. Join the initial endpoints of R, R′ by a path α̃. Then the endpoints of α̃ are fixed and the projection to G, say α, is a Nielsen path. However, the line RαR′ may not be locally injective at endpoints of α. But using the lemma that α has a unique decomposition into concatenation of indivisible Nielsen paths and fixed edges, one can choose R, R′ such that it is locally injective as is done in the original proof in [Handel and Mosher, 2009, Lemma 3.5]. The converse part follows straight from definition of a singular line. This completes the sketch of proof for (1). Sketch of proof for (2) [Handel and Mosher, 2009, Lemma 3.6]: Let Hr be the unique EG strata corresponding to Λ. Using the lemma that every generic leaf has a complete splitting (since it can be written as a increasing union of tiles) one concludes that a generic leaf l has a splitting of the form R · E · R′ , where E is an edge in Hr whose initial vertex is principal and initial direction is fixed (existence of E is due to [Feighn and Handel, 2011, Lemma 3.19]). Consider a further splitting of l = R · E · α · R′′ , where α is the longest initial segment of R′ which can be expressed as a concatenation of indivisible Nielsen paths and fixed edges. Recall that there is an upper bound on the number of components in the complete splitting of any path which occurs as a concatenation of fixed edges and indivisible Nielsen paths. Using this, choose l to maximize the number of components of α. Now iterate l by f# to get a leaf (since Λ is invariant under f# ) and this leaf will be a singular line due to choice of the splitting above. 16 PRITAM GHOSH  Finiteness of singular lines: Before we end this overview about singular lines we prove a lemma that shows that Bsing (φ) is a finite set. We will need this result to prove the uniform finiteness of fibers of Cannon-Thurston maps. Recall that the normal subgroup Inn(F) acts on Aut(F) by conjugation and the orbits of this action define an equivalence relation on Aut(F) called isogredience. The set of principal automorphisms representing some φ ∈ Out(F) is invariant under isogredience. Also any two elements of Aut(F) which are in the same equivalence class have the same attracting fixed points at the boundary. [Feighn and Handel, 2011, Remark 3.9] shows that the number of isogredience classes of principal automorphisms are finite. Let BFix+ (φ) denote the set of lines with endpoints in Fix+ (φ) Proposition 2.24. For any hyperbolic φ ∈ Out(F) the set of lines BFix+ (φ) is a finite set and its cardinality is bounded above by a number depending only on rank(F). The author thanks Lee Mosher for help with the proof. Proof. Let rank(F) = N . There are only finitely many isogredience classes of principal automorphisms in P (φ). Pick representatives Φ1 , Φ2 , ..., ΦK as principal automorphisms that represent these isogredience classes. Since φ is hyperbolic b i ) = Fix+ (Φ b i ) for all i = 1, 2, ...., K. If ai = |Fix+ (Φ b i )| for i = 1, 2, ...., K FixN (Φ then the main inequality of counting indexes in [Gaboriau et al., 1998, Theorem 1’] gives us a1 + a2 + ... + aK ≤ 2N b i ) for some Since any line in Bsing (φ) is obtained by joining two points in Fix+ (Φ b i , the above inequality shows that maximum number of possible lines principal lift Φ in Bsing (φ) is uniformly bounded above by some function of N . Now, coming to BFix+ (φ), by using Lemma 2.20 we can deduce that the endpoints of these lines are ones that are defined by singular rays. So, BFix+ (φ) is obtained by joining endpoints of lines in Bsing (φ), hence the cardinality of BFix+ (φ) is uniformly also bounded above by some number depending on rank(F).  2.8. Weak attraction theorem. The following lemma is very important for our purposes. The form in which we will be using it is: given a line l such that one endpoint of l, ξ say, is carried by some Ana (Λ± φ ) (i.e. there exists some [A] ∈ ± Ana (Λφ ) such that ξ ∈ ∂A) but the other point of l is not in ∂A then the lemma tells us that the line gets attracted to either the attracting lamination or the repelling lamination (or both). We call it the Weak attraction theorem. Lemma 2.25 (Handel and Mosher [2017b] Corollary 2.17, Theorem H). Let φ ∈ Out(F) be a rotationless and exponentially growing. Let Λ± φ be a dual lamination pair for φ. Then for any line γ ∈ B not carried by Ana (Λ± φ ) at least one of the following hold: (1) γ is attracted to Λ+ φ under iterations of φ. −1 (2) γ is attracted to Λ− . φ under iterations of φ LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 17 Moreover, if Vφ+ and Vφ− are attracting neighborhoods for the laminations Λ+ φ and Λ− respectively, there exists an integer l ≥ 0 such that at least one of the following φ holds: • γ ∈ Vφ− . • φl (γ) ∈ Vφ+ • γ is carried by Ana (Λ± φ ). Lemma 2.26. Suppose φ, ψ ∈ Out(F) are two exponentially growing automor+ phisms with attracting laminations Λ+ φ and Λψ , respectively. If a generic leaf + + + λ ∈ Λ+ φ is in Bna (Λψ ) then the whole lamination Λφ ⊂ Bna (Λψ ). Proof. Recall that a generic leaf is birecurrent. Hence, λ ∈ Bna (Λ+ ψ ) implies that λ is either carried by Ana (Λ± ) or it is a generic leaf of some element of L(ψ −1 ). ψ First assume that λ is carried by Ana (Λ± ψ ). Then using Lemma 2.14 item 1, we can + conclude that Λ+ is carried by A (Λ ). na φ ψ −1 Alternatively, if λ is a generic leaf of some element Λ− ), then the weak ψ ∈ L(ψ + − − closure λ = Λφ = Λψ and we know Λψ does not get attracted to Λ+ ψ . Hence, + + Λφ ⊂ Bna (Λψ ).  Lemma 2.27. Let φ ∈ Out(F) be rotationless and [c] be some conjugacy class in F. If Λ− is a repelling lamination for φ and V − is an attracting neighborhood for Λ− , then there are only finitely many values of k > 0 such that φk# ([c]) ∈ V − . − − Proof. Since φ is rotationless, Λ− is φ invariant and so φ−1 . Since # (V ) ⊂ V any weak neighborhood can be defined by some finite subpath of a generic leaf ([Bestvina et al., 2000, Corollary 3.1.11]), we see that under iterates of φ−1 # this subpath grows exponentially and since by [Bestvina et al., 2000, Lemma 3.1.16] a cicuit cannot be a generic leaf, we have that there exists some K such that − k [c] ∈ / φ−K / V −. # (V ). Hence for every k ≥ K, φ# ([c]) ∈  3. Main Theorem In this section the goal is to list all the possible weak limits of φk ([c]) as k → ∞, where φ is a hyperbolic outer automorphism of F and [c] is any conjugacy class in F. Let us denote this collection of weak limits by WL(φ). We shall see from Theorem 3.10 that WL(φ) = Bgen (φ) ∪ Bsing (φ) The set on the right hand side of the equality is a very well understood collection of lines in the theory of Out(F). Recall that it appears in the description of the set of nonattracted lines in 2.18 and this shows that the dynamics of conjugacy classes under iterates of a hyperbolic outer automorphism is very well controlled. There is an immediate observation one can make here; if a line γ is a weak limit of some conjugacy class under iterates of a hyperbolic φ, then γ is not weakly attracted to any repelling lamination of φ. We begin this section with a lemma that, in some sense, is the heart of the proof here. It does a detailed analysis of the components of any complete splitting of a circuit under iterates of a hyperbolic outer automorphism. A clear understanding 18 PRITAM GHOSH of the proof of this lemma gives a very clear indication of why the above equality is what one should expect. Notation: EG strata is an abbreviation for “exponentially growing strata”, NEG strata for “non-exponentially growing strata ” , CT stands for “completely split relative train track maps”, Bgen (φ) denotes the collection of all generic leaves of all attracting laminations for φ and Bsing (φ) denotes the collection of all singular lines of φ. Lemma 3.1. Let φ ∈ Out(F) be a rotationless and hyperbolic and f : G −→ G be any CT representing φ. If σ is a circuit in G then the terms that appear in a complete splitting of σ must contain an EG edge and hence is exponentially growing. Moreover, σ is attracted to some element of L(φ). k Proof. By using Lemma 2.9 we know that f# (σ) is completely split for all sufficiently large k. Existence of linear-NEG strata and geometric strata in G automatically guarantees the existence of a conjugacy class that is fixed by φ which is not possible since k φ is hyperbolic. Hence no term in any complete splitting of f# (σ) can be a linear edge or exceptional path or edge in a geometric EG strata. If G has any superlinear-NEG strata, then consider E ′ = Hr to be the nonfixed NEG stratum of lowest height. By (NEG edges, 2.4) there exists a circuit ur ⊂ Gr−1 such that f# (E ′ ) = E ′ · ur is a splitting and ur is completely split. The terms of its complete splitting are edges in irreducible stratum, indivisible Nielsen paths, fixed edges or maximal subpaths in zero strata which are taken. We claim that some term of such a splitting must be an EG edge. No term in splitting of ur can be a linear NEG edge since φ is hyperbolic. If we have taken, maximal subpaths in zero strata then we are done because one needs to pass through an EG stratum to enter and exit a zero strata (Envelope, 2.4) and the only way to do this would be if we had EG edges appearing as terms of complete splitting of ur (on either side of the splitting component contained in the zero strata) since all zero strata are contractible and EG strata that contain indivisible Nielsen path do not envelope zero strata (see Lemma 2.11) and indivisible Nielsen paths of higher EG strata have both their endpoints in the same strata by Lemma 2.10. So if we do not have paths contained in some zero strata then the only remaining possibilities for the components of complete splitting of ur remaining are that of EG edges, fixed edges and indivisible Nielsen paths (since we have assumed that Er has lowest height among NEG edges). If we have only fixed edges and indivisible Nielsen paths appearing as terms of complete splitting of ur then it would imply implies ur is a closed Nielsen path, which is not true since E ′ is superlinear NEG strata. Hence some term of complete splitting of ur must be an EG edge. Now for superlinear NEG edges of height s > r, one can similarly show by an induction argument that some term in the complete splitting of f k (us ) must be an EG edge, for some k > 0. Since we have ruled out the possibility of any linear NEG edge and geometric k strata in G, the only choices we have in the complete splitting of f# (σ) are EG edges, superlinear NEG edge, fixed edges, indivisible Nielsen paths and maximal connecting subpaths in a zero strata which are taken. Presence of only fixed edges and indivisible Nielsen paths would imply existence of a periodic circuit and violate the hyperbolicity assumption on φ. So we must have at least an EG edge, superlinear NEG edge or a taken connecting path in a zero stratum. If the last LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 19 case happens then, by the same argument we gave for superlinear-NEG edges, on either side of this subpath of zero strata the terms of complete splitting must be EG edges. Also, if we have a superlinear NEG edge, then by same argument above, an t (σ), for some t > 0 . Hence EG edge appears as a term of complete splitting in f# k some term in the complete splitting of f# (σ) must be an EG edge. Thus σ is exponentially growing and is weakly attracted to the attracting laminations which are associated to the EG strata whose edges appear in some complete k splitting of f# (σ) for some k > 0.  Notice that the above lemma implies that given any conjugacy class [c] in F, there exists at least one one nonattracting subgroup system Ana (Λ+ φ ) which does not carry [c]. We shall see shortly in Lemma 3.5 that this behaviour is also observed in any line that occurs as a weak limit of [c] under iterates of φ. Lemma 3.2. Let φ ∈ Out(F) be rotationless and hyperbolic. Then the weak closure of every point in ξ ∈ Fix+ (φ) contains an element of Λ ∈ L(φ). Moreover, if the principal edge whose iteration generates the singular ray with endpoint ξ is an EG edge then Λ is the unique attracting lamination associated to the EG strata that contains the principal edge. Proof. Let f : G −→ G be CT representing φ. Given any point ξ ∈ Fix+ (φ), it is obtained by iteration of an edge E whose initial vertex is principal and initial direction is fixed (such an edge is called principal edge) (use Lemma 2.9). If E is k an EG edge, and k → ∞, f# (E) generates a singular ray with endpoint in ξ then the closure of ξ equals the unique attracting lamination associated to the EG strata that contains E. On the other hand if E is superlinear NEG edge then f# (E) = E· u is a splitting and the circuit u is completely split. Arguing just as we did in the previous lemma, k some term in the complete splitting of f# (u) will be an EG edge and hence the k ray generated by f# (E), as k → ∞, is a singular ray which weakly accumulates on some attracting lamination Λ ∈ L(φ) (where Λ is the unique attracting lamination associated to the EG strata whose edge appears in some complete splitting of k f# (u)). This implies that the weak closure of ξ contains Λ. This shows that the weak closure of ξ is exactly the unique attracting lamination associated to the strata that contains the edge E by using Lemma 2.20.  Our next goal is to inspect the dynamical nature of a line γ which appears as a weak limit of some conjugacy class under iterates of some hyperbolic outer automorphism φ. We shall prove in Lemma 3.3 and Lemma 3.5 that any such line gets attracted to some attracting lamination of φ (under iterates of φ) but is never attracted to any repelling lamination of φ (under iterates of φ−1 ). Notice that this implies γ ∈ Bna (Λ− φ ) for every repelling lamination of φ and γ is not carried by + Ana (Λφ ) for at least one attracting lamination of φ. Lemma 3.3. Let φ be a rotationless hyperbolic outer automorphism and f : G −→ G be a CT representing φ. Suppose σ is a circuit in G. If γ is a weak limit of σ under action of f# , then γ is not attracted to any element of L(φ−1 ). 20 PRITAM GHOSH Proof. Suppose on the contrary γ gets attracted to some Λ− . If V − is an attracting − neighborhood of Λ− then φ−t for some t ≥ 1. This implies that γ ∈ # (γ) ∈ V t − t − − φ# (V ). Since φ# (Λ ) = Λ for all t ≥ 1 we can conclude that γ contains some k (σ) as a subpath for all subpath α of a generic leaf of Λ− . So α is contained in f# ′ sufficiently large k s. k But this would mean that f# (σ) ∈ V − for infinitely many value of k, which k contradicts the lemma that σ cannot be attracted to Λ− by iterates of f# (Lemma 2.27).  Corollary 3.4. Let φ ∈ Out(F) be rotationless and hyperbolic. If γ is line which is a weak limit of some conjugacy class in F then no endpoint of any lift of γ is in Fix− (φ). Proof. Suppose γ had an endpoint ξ ∈ Fix− (φ). Since φ is hyperbolic, so is φ−1 and using this we derive a contradiction to Lemma 3.3. Choose a CT f ′ : G′ −→ G′ representing some rotationless power of φ−1 . Using Lemma 2.20, every point in Fix− (φ) is obtained by iteration of an edge E ′ whose initial vertex is principal and initial direction is fixed. By using Lemma 3.2 we get that the weak closure of ξ, and hence γ, will contain an attracting lamination Λ− associated to the EG strata E ′ . This means γ is attracted to Λ− . Which contradicts Lemma 3.3.  Lemma 3.5. Let φ be a hyperbolic automorphism and suppose φk (c) converges weakly to some line γ as k → ∞. Then γ is weakly attracted to at least one element of L(φ). Proof. Replacing φ by some φN if necessary, we may assume that φ is rotationless. Let f : G −→ G be a CT representing φ and σ be the realization of the conjugacy class c in G. Note that if γ ∈ Bgen (φ) ∪ Bsing (φ) then weak closure of γ contains at least one attracting lamination of φ and hence by definition, γ is attracted to that attracting lamination. Hence we are left with the case when γ ∈ / Bgen (φ)∪Bsing (φ). By using Corollary 3.4 we know that no endpoint of any lift of γ is in Fix− (φ). Also Lemma 3.3 tells us that γ is not a generic leaf of some repelling lamination of φ. Hence using Lemma 2.18 we can conclude that if γ is not attracted to some attracting lamination Λ+ then it must be carried by Ana (Λ+ ). This implies that theres exists some lift γ̃ of γ such that both endpoints of γ̃ are carried by ∂A for some [A] ∈ Ana (Λ+ ). Therefore we can conclude that if γ is not attracted to any element of L(φ) then + is carried by Ana (Λ+ i ) for every element Λi ∈ L(φ) where i = 1, 2, ..., K for some + K < ∞. So there are [Ai ] ∈ Ana (Λi ) such that ∂Ai carries both endpoints of some lift of γ. Hence ∩∂Ai 6= ∅. Thus ∩Ai 6= ∅ and so there exists a conjugacy class [c] which is carried by Ana (Λ+ i ) for every i. But this contradicts Lemma 3.1. Therefore γ must be attracted to some element of L(φ).  The following proposition gives us one side of the inclusion of Theorem 3.10. Proposition 3.6. Let f : G −→ G be a CT representing a rotationless hyperbolic element of Out(F) and σ is a circuit in G. If l is a weak limit of σ under the action LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 21 of f# which is not a singular line for φ, then either l must be generic leaf of some element of L(φ) or both endpoints of l must be in Fix+ (φ). Proof. Suppose on the contrary that l ∈ / Bgen (φ). Given that l is not a singular line, and since we know that l is not weakly attracted to any element of L(φ−1 ) we can apply Lemma 2.18 and deduce that l ∈ Bext (Λ± , φ) for every dual lamination pair of φ since l ∈ / Bgen (φ) ∪ Bsing (φ). But there exists at least one element Λ+ ∈ L(φ), to which l is attracted (by Lemma 3.5), which implies that l is not carried by Ana (Λ± ). If we denote the two distinct endpoints of l by P and Q, then at least one endpoint, P say, is in Fix+ (φ). We now procced to give an argument by contradiction. Suppose that P ∈ Fix+ (φ) but Q ∈ / Fix+ (φ). In this case notice that Q ∈ / Fix− (φ), since that would violate corollary 3.4. Since Q ∈ / Fix+ (φ), iteration of Q by φ−t # converges to a point Q− in Fix− (φ−t ) (for some t ≥ 1) by Lemma 2.2. But this implies l is attracted to some Λ− Q− (since Fix+ (φ) and Fix− (φ) are disjoint and hence − − P 6= Q ), where ΛQ− is in the weak closure of Q− (by using Lemma 3.2). But this contradicts Lemma 3.4. Hence this case is not possible. Therefore P ∈ Fix+ (φ) and Q ∈ Fix+ (φ) and we get the desired conclusion. Note that since we have assumed that l is not a singular line there does not exist a principal lift that fixes both P and Q, hence this case covers more than singular lines.  We now state an important lemma from the Subgroup Decomposition work of Handel and Mosher. This lemma can be used to conclude that every line in Bsing (φ) and every leaf in any attracting lamination for φ occurs as a weak limit of some conjugacy class under action of φ# . Lemma 3.7. [Handel and Mosher, 2017a, Lemma 1.52] For each P ∈ Fix+ (φ) there is a conjugacy class [a] which is weakly attracted to every line in the weak accumulation set of P . Corollary 3.8. Let φ be a rotationless hyperbolic outer automorphism and Λ ∈ L(φ) be an attracting lamination. Then every nongeneric leaf (if it exists) of Λ must be a line with both endpoints in Fix+ (φ). Proof. Recall that Lemma 2.23 says that every attracting lamination Λ ∈ L(φ) contains a singular line as a leaf , one of whose ends is dense in Λ. Lemma 3.7 tells us that there exists a conjugacy class [a] which is weakly attracted to every line in Λ. The proof now follows directly from Proposition 3.6.  Remark 3.9. It is worth noting that this corollary is very special to hyperbolic outer automorphisms and will fail if φ is not hyperbolic. Once we have linear NEG edges or geometric strata the extended boundary takes a much more complex structure and one can easily construct examples where this lemma will fail. We finally state and prove the main theorem of this section which classifies all weak limits of conjugacy classes under iterations of a hyperbolic outer automorphism. Notation: Let BFix+ (φ) denote the set of all lines with endpoints in Fix+ (φ). Note that Bsing (φ) ⊂ BFix+ (φ). 22 PRITAM GHOSH Theorem 3.10. Suppose φ ∈ Out(F) is a hyperbolic outer automorphism and [c] is any conjugacy class in F. Then the weak limits of [c] under iterates of φ are in WL(φ) := Bgen (φ) ∪ BFix+ (φ) Conversely, any line in WL(φ) is a weak limit of some conjugacy class in F under action of φ. Proof. We may assume without loss that φ is rotationless, since the work of Feighn and Handel in Feighn and Handel [2011] show that there exists some number K such that φK is rotationless for any φ ∈ Out(F) and it is obvious that the set of weak limits of conjugacy classes is invariant under passing to a finite power. If γ occurs as a weak limit of some conjugacy class under action of φ# Proposition 3.6 guarantees that it is in Bgen (φ) ∪ BFix+ (φ). The proof of the converse part directly follows by using Lemma 3.2 and Lemma 3.7, since every attracting lamination Λ of φ has a leaf which is a singular line and one of whose ends is dense in Λ by using Lemma 2.23.  Remark 3.11. Note that the situation is much simpler in case of fully irreducible and hyperbolic φ since the unique attracting lamination of such an element does not contain any nongeneric leaves. Hence the equality just reduces to WL(φ) := Bgen (φ) ∪ Bsing (φ). We end this section with a corollary which characterizes hyperbolicity in terms of weak limits of conjugacy classes. Corollary 3.12. Let φ ∈ Out(F) be rotationless. Then φ is hyperbolic if and only if every conjugacy class [c] is weakly attracted to some line in Bsing (φ). Proof. Follows directly from Theorem 3.10 and Lemma 3.2.  4. Applications In this section we will look at some applications of the results we proved in the previous section. The first half of this section deals with Cannon-Thurston maps for a hyperbolic φ ∈ Out(F) and quasiconvexity of infinite index, finitely generated subgroups of F in the extension group G = F ⋊φ Z. In this half of the section we carefully develop the ideas and comment on possible motivations which leads to the Theorems 4.8, 4.14, 4.16. The next half of the section generalizes the results we prove in the first half to the case when we replace φ by a Gromov-hyperbolic and purely atoroidal group (recall that in such a group every element is hyperbolic). Except for description of the ending lamination set we will generally be brief about the proofs since they are almost identical to the ones in the first half of this section. Remark 4.1. There are a couple of important points that we would like to clarify before we proceed with the applications. This is for benefit of readers who are not familiar with standard terminologies in the weak attraction language. (1) A “line” l ∈ Be is not just a geodesic in F joining two points in ∂F × ∂F. Recall that Be = {∂F × ∂F− △}/(Z2 ) (see Preliminaries 2.1). The action of Z2 on ∂F×∂F is by interchanging endpoints. So a line of Be is unoriented and flip-invariant. Be carries the weak topology induced from Cantor topology LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 23 e on ∂F. Elements of B = B/F, are projections of line in Be in the quotient space which is compact but not Hausdorff. Elements of B are also referred to as lines. (2) When we say φk# ([c]) converges to a line l or l is a weak limit of φk# ([c]) as k → ∞ it is equivalent to saying every subpath α of l occurs as subpath of φs# ([c]) for all sufficiently large s. e if α̃ is a subpath of l̃ then either α̃ or α̃−1 occurs as a Lifting to B, subword of some cyclic permutation of a word w representing φs# ([c]). To summarize, φk# ([c]) converges to a line l or l is a weak limit of φk# ([c]) as k → ∞ is equivalent to saying that for every lift l̃ ∈ Be and every subword α̃ of l̃, either α̃ or α̃−1 occurs as a subword of some cyclic permutation of a word ws representing φs# ([c]) for all sufficiently large s. g Notation: By WL(φ) we denote all the lifts of lines in WL(φ) to B. 4.1. Canon-Thurston maps for hyperbolic φ. Let Γ be a word-hyperbolic group and H < Γ is a word-hyperbolic subgroup. If the inclusion map i : H → Γ extends to a continuous map of the boundaries bi : ∂H → ∂Γ then bi is called a Cannon-Thurston map. When it does exist, it is an interesting question to know what its properties are. Its precise behavior is captured by the notion of Ending laminations. The original definition was given in Mitra [1997] and for Free groups it was later modified and used in Kapovich and Lustig [2015] by Kapovich and Lustig. Let 1→F→G→H→1 be an exact sequence of hyperbolic groups where H < Out(F). Then Mitra defined: Definition 4.2. Let z ∈ ∂H and {φn } be a sequence of vertices on a geodesic joining 1 to z Cayley graph of H. Define Λz,[c] = {l ∈ ∂F × ∂F|w subword of l ⇒ ∃n ∋ w or w−1 subword of φn # ([c])} [ Λz,[c] Λz = c∈F−{1} ΛH = [ Λz z∈∂H In [Mitra, 1997, Lemma 3.3] shows that Λz is independent of the choice of the sequence φn . Strictly speaking Mitra’s definition is much more general, but we have adapted the definition as the special case for Out(F). The Cannon-Thurston map, when it exists, identifies the endpoints of the certain leaves of ending lamination. Our goal here is to understand the class of leaves that get identified by this map by using the theory of attracting laminations and singular lines. Let Γφ denote the mapping torus for a hyperbolic φ ∈ Out(F). The precise statement for the behaviour of Cannon-Thurston map is given by: Theorem 4.3. [Mitra, 1998, Theorem 4.11] If φ ∈ Out(F) is a hyperbolic outer automorphism then the Cannon-Thurston map bi : ∂F → ∂Γφ exists. Moreover, bi(X) = bi(Y ) if and only if the line l ∈ ∂F × ∂F joining X to Y is in Λz for some z ∈ ∂H. 24 PRITAM GHOSH We now proceed to give the description of Λz using our work in the earlier section. If φ ∈ Out(F) is hyperbolic then by Brinkmann’s work Brinkmann [2000] we have an exact sequence 1 → F → G → hφi → 1 of hyperbolic groups where G = F ⋊φ Z is the mapping torus of φ Lemma 4.4. Let H = hφi for some hyperbolic φ ∈ Out(F). Then g g −1 ) Λhφi = WL(φ) ∪ WL(φ Proof. In Definition 4.2 if we let H = hφi we see that ∂H has exactly two points, z1 and z2 say, and the sequences that converge to these points are φn and φ−n respectively. If we use our observations in (2) of Remark 4.1, we see that the set of lines in Λz1 ,[c] are exactly the lines l ∈ Be such that [c] weakly converges g Similarly to the projection of l in B under iteration of φ# . So, Λz1 = WL(φ). −1 −1 g g g ). Thus we have Λhφi = WL(φ) ∪ WL(φ ). Λz2 = WL(φ  Kapovich and Lustig in [Kapovich and Lustig, 2015, Theorem 5.4] showed the following: Theorem 4.5. For a hyperbolic and fully irreducible φ ∈ Out(F), the CannonThurston map bi : ∂F → ∂Γφ is a finite-to-one map and the cardinality of the preimage set of each point in ∂Γφ is bounded by 2N , where N = rank (F). We shall improve this theorem by removing the fully irreducible assumption. However the uniform bound that we provide is not a sharp bound like the one obtained above (see [Kapovich and Lustig, 2015, Remark 5.9]. We use the following lemma by [Handel and Mosher, 2017b, Lemma 2.15] to prove proposition 4.7, which is the main technical result in this section that tells us exactly which elements of WL(φ) are identified. A baby version of the lemma first appeared in [Handel and Mosher, 2011, Lemma 3.3] for the fully irreducible case. Lemma 4.6. For any rotationless φ and generic leaves l′ , l′′ of φ, if some end of l′ is asymptotic to some end of l′′ , then l′ , l′′ ∈ Bsing (φ). Notice that in the following proposition, by extending our set from Bsing (φ) to BFix+ (φ), we can generalize from generic leaves to include nongeneric leaves also. Proposition 4.7. Let φ be rotationless and hyperbolic and suppose l′ , l′′ are two leaves in ∪Λi , where Λi ’s are attracting laminations of φ. If some end of l′ is asymptotic to some end of l′′ then both l′ , l′′ ∈ BFix+ (φ). To summarize, only lines in BFix+ (φ) can be asymptotic. Proof. Let f : G −→ G be a CT representing φ. Denote the endpoints of l′ by Q′ , P and the endpoints of l′′ by Q′′ , P , where P is the common endpoint. If both the leaves are generic then we are done by Lemma 4.6. If both l′ , l′′ are nongeneric then they are already in BFix+ (φ) by Lemma 3.8. It remains to consider the case when l′ is nongeneric leaf but l′′ is generic. The following claim completes the proof. Claim: If l′ is a nongeneric leaf and l′′ is a generic leaf which are asymptotic then l′′ ∈ BFix+ (φ). LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 25 Proof of claim: Denote the endpoints of l′ , l′′ by Q′ , P, Q′′ respectively, where P is the common endpoint. Let Λ+ j denote the attracting lamination that contains − l′′ . Then both l′ , l′′ are in Bna (Λ− j ). Recall that the set of lines in Bna (Λj ) are closed under concatenation ( by Lemma 2.18 ). So consider the line l obtained by concatenation of l′ and l′′ , which has endpoints at Q′ , Q′′ . Then by using the work of Handel and Mosher 2.18 , there exists a principal lift Φ of φ such that either b or all three points are in ∂ext (A, φ) for some all three of P, Q′ , Q′′ are in Fix+ (Φ) ± [A] ∈ Ana (Λj ). If the first conclusion is true then l′′ ∈ Bsing (φ) by definition. If the second conclusion is true, then l′′ cannot have an endpoint carried by Ana (Λ± j ) because it ′′ is generic leaf of Λ+ and so the only remaining possibility is that P, Q are both in j ′′ Fix+ (φ) . This gives us that l ∈ BFix+ (φ).  We now use this Proposition to prove our main result about Cannon-Thurston maps for hyperbolic φ. Theorem 4.8. Consider the exact sequence of hyperbolic groups: 1 → F → G → hφi → 1 The Cannon-Thurston map bi : ∂F → ∂G is a finite-to-one map and cardinality of preimage of each point in ∂G is bounded above by a number depending only on rank(F). g Proof. The map bi identifies two points in ∂F if and only if there is a line in WL(φ)∪ −1 g WL(φ ) which connects the points. If three or more points are identified then we g g −1 ) (not both). get asymptotic lines in either WL(φ) or WL(φ The above proposition 4.7 tells us that only the lines in BFix+ (φ) or BFix− (φ) can be asymptotic. But for any given φ, both BFix+ (φ) and BFix− (φ) are finite sets with cardinality uniformly bounded above by Proposition 2.24.  4.2. Quasiconvexity in extension of F by φ. Next we proceed to show another application of our work. It is related to quasiconvexity of subgroups of F in the extension group G. First we quote a result due to Mitra: Lemma 4.9. [Mitra, 1999, Lemma 2.1] [Mj and Rafi, 2017, Lemma 2.4] Consider the exact sequence 1→F→G→H→1 of hyperbolic groups. If H is a finitely generated infinite index subgroup of F, then H is quasiconvex in G if and only if it does not carry a leaf of the ending lamination. We use our description of the ending lamination of hyperbolic φ to prove an interesting result about quasiconvexity of finitely generated subgroups of F. The first step is to connect the concept of filling in the sense of free factor supports with the concept of “minimally filling”. (see section 2.2) Kapovich and Lustig in their work of ending laminations [Kapovich and Lustig, 2015, Proposition A.2] showed that for a hyperbolic fully irreducible outer automorphism, its ending lamination set is minimally filling. A set of lines S is said to be minimally filling if there does not exist any finitely generated infinite index subgroup of F that carries a line of S. Note that minimally filling implies filling in 26 PRITAM GHOSH the sense of free factor support 2.2. The converse is generally not true. However something interesting can be said for the converse direction too. Proposition 4.10. Suppose S is a set of lines in F that is filling in the sense of free factor supports and there does not exist any free factor of any finite index subgroup of F that carries a line in S then S is minimally filling in F . Converse also holds. Proof. Using Corollary 1 from the work of Burns [1999], we know that any finitely generated subgroup of F can be realized as a free factor of some finite index subgroup of F . This together with the additional hypothesis in the lemma implies S is minimally filling. The converse part follows directly from definitions and the observation that any free factor of any finite index subgroup of F is finitely generated and infinite index in F .  The following definition generalizes the “minimally filling” so that we can use it for hyperbolic outer automorphisms which are not fully irreducible. The idea behind this definition is the property that the free factor support of lamination is either all of [F] or every line is carried by some proper free factor system [F i ] where F i is a proper free factor of F. Definition 4.11. Consider a finitely generated subgroup of infinite index H < F. A set of lines S in F said to be minimally filling with respect to H if for every finitely generated subgroup H ′ < F containing H as a proper free factor, no finitely generated infinite index subgroup in H ′ carries a line of S. Similarly we say a set of lines Λ in B is minimally filling with respect to H if every lift of Λ in Be is minimally filling with respect to H. It is easy to see that S is minimally filling with respect to H if and only if no finitely generated subgroup of F containing H as a proper free factor , carries a line in S. However we will use the aforementioned definition since it is easier to relate with the standard definition of minimally filling. The following lemma establishes the connection. Lemma 4.12. If S is minimally filling in F if and only if S is minimally filling with respect to every finitely generated, infinite index subgroup of F. Proof. To see the forward direction, let F ≥ H ′ ≥ H be finitely generated subgroups such that H is a proper free factor of H ′ . If H ′ carries a line in S then there exists a proper free factor K < H ′ of H ′ which carries this line. But then we know that K must have infinite index in H ′ , hence in F, which violates that S is minimally filling. Conversely, suppose S is minimally filling with respect to every finitely generated, infinite index subgroup of F . If there exists some finitely generated infinite index subgroup H < F which carries a line in S, then by using the result of Burns [1999], we know that there exists a finite index (hence finitely generated) subgroup H ′ < F which contains H as a free factor (if H is a free factor of F then take H ′ = F). But H has infinite index in H ′ since it is a proper free factor of H ′ and H ′ has finite index in F, hence S is not minimally filling with respect to H. Which is a contradiction.  Let us elaborate on the purpose of giving this definition. LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 27 Proposition 4.13. Consider the exact sequence 1 → F → G → hφi → 1 where φ ∈ Out(F) hyperbolic. Let H be a finitely generated, infinite index subgroup of F. If every attracting and every repelling lamination of φ is minimally filling with respect to H then H is quasiconvex in G. Proof. Suppose H is not quasiconvex. Then by Lemma 4.9 it carries a leaf of the ending lamination set. Without loss we may assume that it carries a line in g g WL(φ). Since the closure of projection of any line in WL(φ) contains an attracting lamination and ∂H is compact, H must carry lift of a generic leaf of some Λi ∈ L(φ). Using Burns [1999] one has a finite index subgroup H ′ < F such that H is a proper free factor of H ′ (since H is infinite index in F), and hence infinite index in H ′ and H carries lift of a leaf of Λi . This violates that Λi is minimally filling with respect to H. Hence H must be quasiconvex in G.  The following result establishes certain dynamical conditions for a finitely generated, infinite index H < F to be quasiconvex in the extension group G. We give one equivalent condition and one sufficient condition for H to be quasiconvex. Theorem 4.14. Consider the exact sequence 1 → F → G → hφi → 1 where φ is a hyperbolic automorphism of F. Let H be a finitely generated infinite index subgroup of F. Then the following are equivalent: (1) H is quasiconvex in G (2) ∂H ∩ {Fix+ (φ) ∪ Fix− (φ)} = ∅. Moreover both (1) and (2) are satisfied if every attracting and repelling lamination of φ is minimally filling with respect to H. Proof. The conclusion in the “moreover” part is discussed in Proposition 4.13. We proceed to prove the equivalence of (1) and (2). Suppose H is quasiconvex in G. Since H is finite rank subgroup of F, ∂H is compact in ∂F the set of lines carried by [H] is closed in the weak topology. If P ∈ ∂H ∩ {Fix+ (φ) ∪ Fix− (φ)} = 6 ∅ then weak closure of P must contain either an attracting lamination or a repelling lamination for φ. Hence H contains leaves of the ending lamination set and this contradicts that H quasiconvex by using Lemma 4.9 Conversely, if ∂H ∩ {Fix+ (φ) ∪ Fix− (φ)} = ∅, then H does not carry a leaf of any ending lamination set, hence H is quasiconvex. To see this use Theorem 3.10 and Lemma 2.23 which states that every attracting (repelling) lamination carries a singular line which has endpoints in Fix+ (φ) (Fix− (φ)) .  We make the following observation regarding the special case when φ is fully irreducible. This case is well known and was done in Mitra [1999], Kapovich and Lustig [2015]. Corollary 4.15. If φ is fully irreducible, then any finitely generated infinite index subgroup is quasiconvex in the extension group G. 28 PRITAM GHOSH Proof. This follows from the work of [Bestvina et al., 1997, Proposition 2.4] and [Kapovich and Lustig, 2015, Proposition A.2] where both papers prove that Λ is minimally filling in F and hence minimally filling with respect to any finitely generated infinite index subgroup of F, where Λ is the unique attracting lamination of φ. Similarly for the unique repelling lamination.  Now we proceed to give an algebraic condition for quasiconvexity: Theorem 4.16. Consider the exact sequence 1 → F → G → hφi → 1 where φ is a hyperbolic automorphism of F. If H is a finitely generated, infinite index subgroup of F such that: (1) H is contained in a proper free factor of F. (2) H does not contain any subgroup which is also a subgroup of some φ periodic free factor. Then H is quasiconvex in G. Moreover if φ does not have an attracting lamination that fills in the sense of free factor support, condition (2) is a sufficient condition for quasiconvexity of H in G. Proof. Suppose H is not quasiconvex. Then by Lemma 4.9, H carries a leaf of the ending lamination set. Since the attracting and repelling laminations are paired by free factor supports, (see 2.5) without loss assume that H carries lift of a line in WL(φ). Since H is of finite rank, ∂H is compact and set of lines carried by [H] is closed in the weak topology. This implies that H carries lift of an attracting lamination Λi ∈ L(φ). Let [F i ] be the (necessarily φ-invariant, see proof of Lemma 3.2.4, Bestvina et al. [2000]) free factor support of Λi . Case 1: F i is not proper: In this case we use condition (1) to get a contradiction. Since H is contained in a proper free factor H ′ say, the free factor support of lines carried by H is contained in H ′ . This implies F i < H ′′ for some conjugate of H ′ , but since F i = F we get a contradiction. Case 2: F i is a proper free factor: In this case we conclude that H ∩ gF i g −1 is nonempty for some g ∈ F and hence a subgroup of a φ invariant free factor. This violates condition (2). The “moreover” part is a consequence of the proof of Case 2.  4.3. Ending Laminations for purely atoroidal H. We now proceed to define the notion of weak limit set of a group H ∈ Out(F), which is purely atoroidal i.e. every element of H is a hyperbolic outer automorphism. For this we will use the ideas developed so far to prove the special case in 3.10 and use the notion of ending laminations as a guide. It is to be noted that extending the definition from g g WL(φ) to WL(H) is not entirely obvious at a first glance, however familiarity with description of the ending lamination set (see remark 4.1) will be of great help. So for the rest of the section let us fix the following notations and assumptions: Assumptions: (1) 1 → F → G → H → 1 is an exact sequence of hyperbolic groups where H is non-elementary and purely atoroidal. (2) z ∈ ∂H is point in the Gromov boundary of H. LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 29 (3) φn → z means φn is a sequence of vertices in the Cayley graph of H so that they lie on a geodesic joining 1 to z in the compactified space H ∪ ∂H. So whenever we use the notation φn we mean a term in the sequence as described here. e (4) If S is a set of lines in B, we denote its lift to Be by S. Definition 4.17. Let z ∈ ∂H and φn be a sequence in H converging to z. Define the sets WL(φn , [c]) = {l ∈ B|l is a weak limit of φkn# ([c]) as k → ∞} g WL(z, [c]) = ∞ ∞ \ [ k=1 j=k g j , [c]) WL(φ g So a line l̃ is in WL(z, [c]) if and only if given any finite subpath α of ˜l and M ≥ 1 there exists j > M such that α is a subpath of φkj # ([c]) for some k > 0. g This is equivalent to saying that every line in WL(z, [c]) is a weak limit of lines g l̃j ∈ WL(φj , [c]). This implies that α is a subpath of φj ([c′ ]) for some c′ ∈ F−{1}. Hence we deduce that for any subpath α of l̃ and any M > 0, there exists j > M and a conjugacy g [c]) ⊂ Λz = Λz . class [c′ ] such that α is subpath of φj # ([c′ ]). This implies WL(z, Hence we have the following corollary: Corollary 4.18. If for z ∈ ∂H, Λz is the ending lamination set defined by Mitra, then: g WL(z, [c]) ⊂ Λz . g Note that WL(z, [c]) is a closed set by construction. As we can see that the ending lamination set is far more complicated when H is not a cyclic group. One of the big problems one faces is if a set of lines that occurs as a attracting or repelling lamination for every element of H. Recall that stabilizers of attracting (repelling) laminations of a fully irreducible φ ∈ Out(F) are virtually cyclic [Bestvina et al., 1997, Theorem 2.14]. But this may not be true if φ is hyperbolic but reducible even if the lamination fills (in the sense of free factor supports). Infact something worse can happen. Since H is hyperbolic the stabilizer subgroup of lamination inside H if not virtually cyclic will necessarily contain a nonabelian free group. This is due to the lemma that Bestvina, Feighn and Handel showed Tits alternative holds for Out(F) Bestvina et al. [2000] and Feighn, Handel proved every abelian subgroup of Out(F) is virtually Zn for some n Feighn and Handel [2000]. In order to make a meaningful conclusion about Cannon-Thurston maps for G we need to avoid these situations. The following results guarantee that such things do not occur. Lemma 4.19. Suppose φ, ψ are two hyperbolic elements of Out(F) contained in H. Denote the ending laminations Λz , Λz′ , where z = φ∞ , z ′ = ψ ∞ are in ∂H. Let l, l′ ∈ Λz ∪ Λz′ . Also suppose that φ and ψ do not have a common attracting fixed point. Under these assumptions, if l, l′ have an asymptotic end, then 30 PRITAM GHOSH (1) φ and ψ have a common attracting lamination. (2) Both l, l′ are lifts of lines in either BFix+ (φ) or BFix+ (ψ). Proof. Due to the conclusion from Proposition 4.7 we may assume that l ∈ Λz , l′ ∈ Λz′ . We split the proof into cases: Case 1: If l, l′ are both generic leaves of φ and φ and share an endpoint P , then + + + the weak closure of P , P = Λ+ φ = Λψ , where Λφ and Λψ are attracting laminations for φ and ψ respectively. So l, l′ can be treated as lifts of generic leaves of Λ+ φ and (since both are birecurrent leaves) the conclusion (2) now follows directly from Proposition 4.7. Case 2: Suppose l is lift of some generic leaf of φ, l′ is lift of a line BFix+ (ψ) + and they are asymptotic with common endpoint P . Thus P = Λ+ φ ⊇ Λψ . If the + inclusion is proper then the leaves of Λ+ ψ are nongeneric leaves of Λψ . But by using Corollary 3.8 we know that these nongeneric leaves are lines in BFix+ (φ), which is a finite set by using Proposition 2.24. But since Λ+ ψ is an uncountable set we must + + have Λφ = Λψ . Now apply Proposition 4.7 (on ψ) to get the second conclusion.  The proposition below gives some necessary conditions that a pair of elements of H must satisfy in order for the extension group to be hyperbolic. Recall that Dowdall-Taylor proved that for the extension group to be hyperbolic, every element of H must be hyperbolic. Proposition 4.20. If φ, ψ ∈ H are two points such that φ, ψ do not have a common power , then the following equivalent conditions are satisfied: (1) φ∞ , ψ ∞ are distinct points in ∂H (2) They do not have a common attracting lamination. (3) They do not have common attracting fixed point. (4) No leaf of an attracting lamination or singular line of φ is asymptotic to a leaf of an attracting lamination or singular line for ψ. Proof. Using [Mitra, 1997, Proposition 5.1] we know that φ∞ and ψ ∞ are distinct points if and only if no line in Λφ∞ has any endpoint common with a line in Λψ∞ . Hence they do not have a common attracting lamination by using Proposition 4.4. The reverse direction is true by Theorem 3.10. This establishes the equivalence between (1) and (2). The equivalence between (1) and the others follow similarly by using 3.10 and 4.4.  Remark 4.21. Note that the above proposition combined with Mitra’s result [Mitra, 1997, Proposition 5.1] and Theorem 3.10 shows that for any z ∈ ∂H which is not the endpoint of an axis, its corresponding ending lamination set Λz does not contain any line which is equal or asymptotic to a leaf or a singular line of any element of H. This shows that the techniques we used for showing finiteness of fibers of Cannon-Thurston maps cannot be directly applied in the more general setting when H is not (virtually) cyclic. We end this paper with a question: Is the converse to Corollary 4.18 true ? Address: Department of Mathematical Sciences, IISER Mohali, Punjab, India. Contact: [email protected] LIMITS OF CONJUGACY CLASSES UNDER ITERATES OF HYPERBOLIC ELEMENTS OF Out(F) 31 References M. Bestvina and M. Feighn. A combination theorem for negetively curved groups. J. Differential Geom., 43(4):85–101, 1992. M. Bestvina and M. Handel. Train tracks and Automorphisms of Free groups. Ann. of Math., 135:1–51, 1992. M. Bestvina, M. Handel, and M. Feighn. Laminations, Trees, and irreducible automorphisms of free groups. Geom. Func. Anal., 7:215–244, 1997. M. Bestvina, M. Feighn, and M. Handel. Tits alternative in Out(Fn )-I: Dynamics of Exponentially-growing Automorphisms. Ann. of Math., 151:517–623, 2000. P. Brinkmann. Hyperbolic Automorphisms of Free Groups. Geom. Funct. Anal., 10(5): 1071–1089, 2000. R. Burns. . Proc. Amer. Math. Soc., 127:1625–1631, 1999. S. Dowdall, I. Kapovich, and S. Taylor. Cannon-Thurston maps for hyperbolic Free group extensions. Israel journal of Math., 216:743–797, 2016. M. Feighn and M. Handel. Abelian subgroups of Out(Fn)). Geometry and Topology, 13: 1657–1727, 2000. M. Feighn and M. Handel. The recognition theorem for Out(Fn ). Groups Geom. Dyn, 5: 39–106, 2011. D. Gaboriau, G. Levitt, A. Jaeger, and M. Lustig. An index for counting fixed points of automorphisms of free groups. Duke Math. J, 93(3):425–452, 1998. M. Handel and L. Mosher. Axes in Outer space. Mem. Amer. Math. Soc, 213(1004), 2011. M. Handel and L. Mosher. Subgroup decomposition in Out(Fn ), Part I: Geometric Models. Mem. Amer. Math. Soc, (accepted), 2017a. URL http://arxiv.org/abs/1302.2378. M. Handel and L. Mosher. Subgroup decomposition in Out(Fn ), Part III: Weak Attraction theory. Mem. Amer. Math. Soc., (accepted), 2017b. URL http://arxiv.org/find/math/1/au:+Mosher_L/0/1/0/all/0/1. M. Handel and Lee Mosher. Subgroup classification in Out(Fn ). arXiv, 2009. URL http://arxiv.org/abs/0908.1255. I. Kapovich and M. Lustig. Cannon-Thuston maps for irreducible automorphisms of Fn . J. London. Math. Soc, 91:203–224, 2015. G. Levitt and M. Lustig. Automorphisms of free groups have asymptotically periodic dynamics. J. Reine Angew. Math., 619:1–36, 2008. M. Mitra. Ending laminations for hyperbolic group extensions. Geom. Func. Anal., 7(2): 379–402, 1997. M. Mitra. Cannon-Thurston maps for hyperbolic group extensions. Topology, 37(3):527– 538, 1998. M. Mitra. On a theorem of Scott and Swarup. Proc. Amer. Math. Soc., (arXiv:1209.4165 corrected version), 127:1625–1631, 1999. M. Mj and K. Rafi. Algebraic Ending Laminations and Quasiconvexity. arXiv:1506.08036, 2017.
4math.GR
Spiking Analog VLSI Neuron Assemblies as Constraint Satisfaction Problem Solvers Jonathan Binas, Giacomo Indiveri, Michael Pfeiffer arXiv:1511.00540v2 [cs.NE] 6 Apr 2016 Institute of Neuroinformatics, University of Zurich and ETH Zurich, Switzerland Email: [email protected] Abstract—Solving constraint satisfaction problems (CSPs) is a notoriously expensive computational task. Recently, it has been proposed that efficient stochastic solvers can be obtained through appropriately configured spiking neural networks performing Markov Chain Monte Carlo (MCMC) sampling. The possibility to run such models on massively parallel, low-power neuromorphic hardware holds great promise; however, previously proposed networks are based on probabilistically spiking neurons, and thus rely on random number generators or external noise sources to achieve the necessary stochasticity, leading to significant overhead in the implementation. Here we show how stochasticity can be achieved by implementing deterministic models of integrate and fire neurons using subthreshold analog circuits that are affected by thermal noise. We present an efficient implementation of spikebased CSP solvers using a reconfigurable neural network VLSI device, and the device’s intrinsic noise as a source of randomness. To illustrate the overall concept, we implement a generic Sudoku solver based on our approach and demonstrate its operation. We establish a link between the neuron parameters and the system dynamics, allowing for a simple temperature control mechanism. I. I NTRODUCTION Constraint satisfaction problems (CSPs) include some of the most prominent problems in science and engineering. A CSP is defined by a set of variables and a set of conditions (constraints) on those variables that need to be satisfied simultaneously. Solutions to a given CSP typically form a vanishingly small subset of an exponentially large search space, rendering this type of problem NP-hard in the general case. Many CSP solvers therefore involve problem-specific heuristics to avoid searching the entire space. Alternatively, one can consider a massively parallel system of simple computing elements that tackle different parts of the problem simultaneously, and discover a global solution through communicating local search mechanisms. Here, we explore event-based neural hardware as a substrate of computation, however, there are various other approaches, such as quantum annealing [1], special cellular automata hardware [2], or oscillator networks [3]. The idea of using recurrent neural networks for finding solutions to computationally hard problems goes back to Hinton [4] and Hopfield [5]. While the deterministic Hopfield network fails in the general case because of local minima it can get caught in, the probabilistic Boltzmann machine proposed by Hinton and Sejnowski [4] overcomes this limitation by sampling its states from a probability distribution rather than evolving along a deterministic trajectory. It has been shown recently, how such stochastic samplers can be implemented in networks of spiking neurons [6], [7]. The resulting neural sampling framework has been applied to constraint satisfaction problems by Jonke et al. [8], demonstrating advantages of the spiking network approach over standard Gibbs sampling in certain cases. The main technological advantage of using such neural samplers in practical applications lies in the ability to implement spiking neurons efficiently in neuromorphic hardware. However, the models proposed in [6], [8] are difficult to directly transfer onto spiking VLSI neurons, because they require individual neurons to emit spikes probabilistically, sampling from a probability distribution of a specific form. This is not easily implementable in an electronic circuit without explicit sources of noise, or random number generators. Here we show, for the first time, how a similar sampling mechanism can be implemented in a system of analog electronic integrate and fire neurons. To avoid the additional cost of implementing dedicated noise sources on chip, we propose a mechanism that makes use of the small amount of (thermal) noise that is present in any analog electronic system to achieve the desired stochastic network dynamics. We demonstrate these principles using a standalone system, based on a reconfigurable neuromorphic processor [9], comprising a configurable network of adaptive exponential integrate and fire neurons and synapse circuits with biophysically realistic dynamics [10]. Once programmed for a given CSP, the system will output streams of candidate solutions. Our experimental results demonstrate that these samples predominantly represent configurations with no or few violated constraints. II. S OLVING CSP S WITH S PIKING N EURAL N ETWORKS Solving an NP-complete decision problem stochastically through sampling means transforming it into an NP-hard optimization problem, and solving it using some kind of annealing mechanism rather than sophisticated algorithmics. Thereby, a cost function is formulated such that the solutions to a given problem are transformed into optima. It is not clear whether the corresponding optimization problem is easier to solve in general, however, typically the conversion can be done in polynomial time, and in some cases the optimization problem can be parallelized more easily or more efficiently than the decision problem. Many types of problems can be transformed to simple graph structures with little effort [11], and thus almost naturally map onto a network of nodes that interact through positive and negative links. In contrast to most conventional algorithmic solvers, the optimization-based approach does not depend on problem-specific heuristics, and can thus be regarded as more general. As a first step, we outline how arbitrary discrete CSPs can be mapped onto a network of neurons. We consider constraint satisfaction problems defined by a set of n discrete variables {x1 , . . . , xn } on finite domains and a set of constraints, each 4 4 3 3 2 2 1 1 Fig. 1. Illustration of the Sudoku solver network. Colored dots represent neurons, lines crossing several dots represent all-to-all inhibitory connections between them. A variable x ∈ {1, 2, 3, 4} is one-hot encoded and its value represented by activity of one of four cells, which mutually inhibit each other (left). The condition xi 6= xj can be implemented by setting negative connections between cells representing the same value (middle). The whole Sudoku network can be implemented using constraints of the type xi 6= xj (right; only a subset of the 64 cells comprising the 4 × 4 × 4 cube is shown). A 9 × 9 Sudoku solver implemented based on the same scheme would require 93 = 729 neurons. linking several of those variables, e.g. (xi = a ∨ xj = b) ∧ xi 6= xj etc. Without loss of generality, any such problem can be expressed in terms of binary variables by using a one-hot scheme, i.e. by representing each discrete variable xi as a vector of binary variables (xi,k )k , where exactly one is active at any time, xi = a ⇔ xi,a = 1, xi,k6=a = 0. Furthermore, a CSP can be written in conjunctive normal form, i.e. in the form ∧i (∨j lij ), where the lij are literals (binary variables or their negations). In a network of spiking neurons, following the models introduced in [6], [12], the state of each variable is represented by the spiking activity of multiple cells. There is one cell per value a variable can assume, and a cell is called active at time t if it has emitted a spike within a certain time window [t−τbin , t]. The neural sampling framework [6] describes how a network of stochastically spiking cells can generate samples from a Boltzmann distribution, where the samples are represented by network states. A problem in conjunctive normal form can be mapped to an Ising model [13] and therefore be solved by the spiking network sampling from the corresponding Boltzmann distribution. Alternatively, special network motifs implementing the OR relation between several variables can be used to achieve a smaller and more efficient network [8]. The energy function which defines the probability distribution of outputs, i.e. the sampled states of all variables, is designed such that solutions to the CSP occur at particularly high rates. Note that such a sampler does not know whether its current state represents a solution and will continue exploring the state space. However, potential solutions can be validated by a secondary mechanism in polynomial time, for example by testing their conformity with the pairwise interactions between cells in the network. To illustrate our experimental results we implemented a 4×4 Sudoku solver on spiking analog hardware. A reduced version of the standard 9×9 Sudoku problem was chosen due to the limited number of neurons available on the device. In this example problem, there are 16 variables xi ∈ {1, 2, 3, 4}, i = 1, . . . , 16 that are aligned in a 4 × 4 grid and restricted by the constraints that no two variables in a row, in a column, or in a 2 × 2 quadrant must assume the same value. As described above, this can be written in binary form, by introducing four binary variables for each variable xi , whereby exactly one of them must be true at any time. Whenever one cell becomes active it shuts off all the others representing the same variable for a certain period by providing a strong inhibitory post-synaptic potential (IPSP) of duration τinh . On the other hand, all cells in the array receive a constant excitatory input current, such that one of them will spike if none are active, ensuring that the respective variable is in a defined state at any time. The activity of a single cell is limited by the refractory period, inactivating a cell for a duration τref immediately after a spike is emitted. The implementation of the Sudoku solver is illustrated in fig. 1. The constraint xi 6= xj , which exists for any two variables of the same row, column, or 2 × 2 quadrant, is implemented by specifying inhibitory interactions between cells representing the same value (fig. 1 middle), such that the two variables cannot assume the same value at the same time. III. S TOCHASTIC DYNAMICS IN AN A NALOG VLSI N EURAL N ETWORK In this section we introduce a simple neuron model that can be used to describe our analog VLSI implementation of neural sampling. In principle, the stochastic spiking neurons used in previous work [6], [12], [8] can be approximated by integrateand-fire neurons, which are injected large amounts of noise, as proposed by [14], [15], [16]. This approach, however, requires an independent noise source for every cell, and therefore cannot easily be implemented directly in hardware. Instead, we propose a mechanism that is based on conventional deterministic neuron models, and becomes stochastic through slight jitter in the duration of temporally extended pulses in analog VLSI. Such small (thermal) fluctuations are inherent to any analog electronic system, and thus can be exploited in analog hardware implementations of the proposed model. EPSP t1 t2 Count xi 6= xj x ∈ {1, 2, 3, 4} t3 t spike refr. period ms 96.5 97 97.5 τref variability Fig. 2. Abstract neuron model. EPSPs (blue) are provided to a cell at times t1 and t2 , triggering spikes and subsequent state transition of the cell into refractory period (red). Due to the variability in the duration of the refractory period and post-synaptic potentials, sometimes one or the other is longer, even though on average, they are roughly of the same length. For instance, the EPSP provided at t2 lasts slightly longer than the refractory period triggered by the spike at t2 , leading to a second spike at t3 . Equivalent effects are observed for IPSPs (functionally, the refractory period is equivalent to an IPSP in our model). On the right, measurements of refractory period duration from the actual hardware are shown, indicating an approximately Gaussian distribution. To illustrate our model, we assume simple leaky integrateand-fire neurons that produce an output spike and remain in refractory period for a duration τref when their membrane potential crosses a threshold Θ. A spike in one cell triggers an excitatory or inhibitory postsynaptic potential (PSP) at synapses connecting it to other cells. In the simplest case, which is also at the core of previous models [6], [12], this can be thought of as a rectangular signal of duration τinh or τexc , respectively. We make the assumption that the magnitudes of these signals are large enough to either trigger a spike in the target cell almost instantaneously (for excitatory inputs), or silence the The assumptions made to construct our model are fulfilled in intrinsically noisy analog neural hardware which can, with this method, be configured such that very small fluctuations in the electronic signals can lead to large deviations in the network dynamics. The jitter in the refractory period or PSP durations is thereby introduced by thermal fluctuations in the analog signals representing those variables. As signals in analog electronics are affected by fabrication-induced variability, in practice systematic deviations will be observed between PSPs of different synapses. In order for the sampling mechanism to function properly under these conditions, the variability in PSP duration due to thermal noise needs to be at least of the same order as the variability due to fabrication-induced mismatch. If this is not the case, the distribution gets biased and might not represent the problem accurately enough. Note that this is not necessarily problematic as long as the minima are conserved. For our experimental setup, we used the programmable neuromorphic device described in [9], comprising 256 integrate and fire neurons and 128k programmable synapses, to implement a network that evolves in real time and produces a stream of output events that can be interpreted as states of the system. The network described in fig. 1 was programmed into the hardware by setting the respective inhibitory connections and run by injecting small amounts of direct current into each cell. The mean values of the tunable time constants τref and τinh were set to approximately 100 ms for all cells. The sampling rate Constr. violated As an example, assume two neurons that are coupled through inhibitory connections and are driven by a constant external current, and assume further that τref  τinh . In this circuit, whichever cell became active first would keep inhibiting the other cell. This is due to the short refractory period, which lets the active neuron spike again before the IPSP it provides to the other cell ends. This network would end up in a local optimum, and would never explore the other possible state where the second cell is active. If, however, the refractory period τref and the inhibitory pulse width τinh are of similar size, small amounts of noise in the analog system, leading to jitter in the duration of both pulses, will sometimes cause the inhibitory PSP to be longer than the refractory period, and vice versa. Such a system could indeed explore all possible states. This mechanism can be considered a kind of noise amplification or, alternatively the system can be regarded as being close to a critical point, where vanishingly small fluctuations can lead to dramatically different behavior. Intuitively, longer refractory periods cause more explorative behavior, whereas short refractory periods let the network settle into local energy minima. Note that all time constants in the system are defined relative to each other, and the relation to real time is of little relevance. Thus, extending the refractory period is equivalent to shortening the PSPs, i.e. weakening the links between nodes. In that sense, the refractory period can be regarded as a kind of temperature, that could be used in an annealing schedule to steer the dynamics of the network. Cell number cell completely (for inhibitory inputs), such that additional excitatory inputs have no effect. Note that the refractory period can be thought of as a strong inhibitory input of a cell to itself. The stochasticity in our system is then introduced by small amounts of noise in the duration of those PSPs and refractory periods. As a consequence, we can regard τinh , τexc , and τref as mean values, and in practice the durations are jittered around those values, as shown in fig. 2. 1 2 4 3 1 3 2 4 4 1 2 3 4 4 3 1 2 4 4 1 2 3 4 1 2 2 1 3 4 4 1 3 3 2 1 4 3 3 4 2 1 3 4 2 1 4 4 3 2 1 40 20 0 45 35 0 5 10 Time (s) 15 20 Fig. 3. Sudoku solver on an analog VLSI chip. The panels show representative spiking activity of a subset of the neurons used in the Sudoku solver implementation (bottom), and the temporal evolution of the number of constraints violated (top) over a period of 20 s. A binary sample vector is acquired by binning the network activity over 100 ms and assigning a 1 or 0 to each cell, depending on whether it has spiked in the given interval or not. Three example states are shown, where a red cell indicates that the respective variable violates one or more constraints. The system frequently converges to states that represent solutions to the problem (0 constraints violated), but, due to the noise it is able to escape from those energy minima. Note that the solutions found at around 2 s and 16 s are not identical (3 and 4 are swapped). at which the network states were evaluated was set to 10 Hz, such that the network activity was binned over 100 ms for each sample. While the system could be run much faster, the time constants were set to relatively large values to allow for visualization of the network evolution in real time. IV. E XPERIMENTAL R ESULTS Figure 3 shows representative spiking activity of the Sudoku solver network implemented and running on an analog VLSI chip. The system occasionally converges to states solving the problem (0 constraints violated), however, it is also able to escape from those local optima and explore other possible states. The “temperature” or “exploration rate”, can be controlled by tuning the neuron parameters, i.e. the IPSP duration or the length of the refractory period. As expected from our considerations above, the system can be constrained to lower energy regions by lowering the temperature parameter, i.e. decreasing the refractory period. Figure 4 shows the distribution of the number of constraints violated, i.e. the measure of “energy” that we intend to minimize. As expected, we observe fundamentally different behavior for the case where the refractory period is larger than the IPSP, compared to the case where it is smaller. This leads to a phase transitionlike phenomenon when this threshold is crossed. For longer refractory periods the distribution can be well fitted by an exponential function, indicating a strong concentration around the low energy states. If the refractory period is shorter than the IPSP, however, the distribution is even more concentrated around zero, and can be approximated by a double exponential exp(λ1 exp(−β1 x)) 102 102 λ2 exp(−β2 x) τref < τinh τref > τinh λ4 exp(−β4 |x|) Count Count 103 103 τref < τinh τref > τinh 101 101 exp(λ3 exp(−β3 |x|)) 0 10 0 10 0 20 40 60 80 Constraints violated 100 120 Fig. 4. Empirical analysis of the samples generated by the hardware CSP solver. The plots show histograms of the number of constraints violated, based on 10 mins of spiking activity of the Sudoku network. Solid lines are leastsquares fits to the data. Slightly varying one of the network parameters (the mean refractory period, in this case) leads to fundamentally different behavior of the system. If the refractory period is longer than the IPSP, the frequency of states of a certain energy decreases exponentially with the number of constraints violated. For shorter refractory periods, the system samples almost exclusively from very low energy states, and the distribution can be described by a double exponential function. For these measurements, τinh was fixed to ≈ 110 ms, while τref was set to ≈ 100 ms (red) or ≈ 120 ms (blue). function. As shown in fig. 5, a similar effect can be observed in the distribution of energy jumps, i.e. the difference in the number of constraints violated between one state and the next. Good fits are again obtained by exponential and a double exponential functions, respectively. This indicates that, similar to a Gibbs sampler, the system predominantly switches between states of similar energy, rather than doing high energy jumps. V. C ONCLUSION We present the first analog VLSI implementation of a CSP solver based on neural sampling with spiking neurons. Our contribution is a simple neuron model that achieves stochasticity without the external noise sources required by previous approaches, but instead exploits small variations and noise in the duration of temporally extended signals. The empirical results obtained from an analog neuromorphic processor demonstrate the function and performance of the proposed mechanism. While the hardware system used in our experiments is deliberately slowed down to operate at timescales similar to real neurons, our approach could, without restrictions, be used with much faster hardware to solve computationally hard problems quickly and efficiently. We can empirically relate the duration of the refractory period, or alternatively the duration of PSPs, to a temperature parameter, such that those time constants could be varied in an annealing schedule to control the temperature. We regard our work as a proof-of-concept and further research is required to optimize performance and analyze theoretical properties of the model. ACKNOWLEDGMENT We thank Wolfgang Maass and our colleagues at the Institute of Neuroinformatics for fruitful discussions. The research was supported by the Swiss National Science Foundation Grant 200021 146608 and by the EU ERC Grant neuroP (257219). −60 −40 −20 0 20 ∆ Constraints violated 40 60 Fig. 5. Empirical analysis of the dynamics of the analog VLSI Sudoku solver. The plots show the distribution of energy jumps, i.e. the difference in the number of constraints violated between two consecutive states for different network parameters (values as in fig. 4). R EFERENCES [1] E. Farhi, J. Goldstone, S. Gutmann, J. Lapan, A. Lundgren, and D. Preda, “A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem.” Science, vol. 292, no. 5516, pp. 472–475, 2001. [2] T. Fujita, K. Sakomizu, and T. Ogura, “Hardware Annealing on DT-CNN using CAM 2,” CNNA, 2010. [3] H. Mostafa, L. K. Müller, and G. Indiveri, “An event-based architecture for solving constraint satisfaction problems,” arXiv preprint, 2015. [4] G. E. Hinton, T. J. Sejnowski, and D. H. Ackley, “Boltzmann machines: Constraint satisfaction networks that learn,” Tech. Rep. CMS-CS-84-119, 1984. [5] J. J. Hopfield and D. W. Tank, ““Neural” computation of decisions in optimization problems.” Biol. Cyb., vol. 52, no. 3, pp. 141–152, 1985. [6] L. Buesing, J. Bill, B. Nessler, and W. Maass, “Neural dynamics as sampling: A model for stochastic computation in recurrent networks of spiking neurons,” PLoS Comp. Biol., vol. 7, 2011. [7] W. Maass, “Noise as a resource for computation and learning in networks of spiking neurons,” Proceedings of the IEEE, vol. 102, no. 5, pp. 860– 880, 2014. [8] Z. Jonke, S. Habenschuss, and W. Maass, “A theoretical basis for efficient computations with noisy spiking neurons,” arXiv preprint, 2014. [9] N. Qiao, H. Mostafa, F. Corradi, M. Osswald, F. Stefanini, D. Sumislawska, and G. Indiveri, “A reconfigurable on-line learning spiking neuromorphic processor comprising 256 neurons and 128K synapses,” Frontiers in Neuroscience, vol. 9, 2015. [10] E. Chicca, F. Stefanini, C. Bartolozzi, and G. Indiveri, “Neuromorphic Electronic Circuits for Building Autonomous Cognitive Systems,” Proceedings of the IEEE, pp. 1367–1388, 2014. [11] A. Lucas, “Ising formulations of many NP problems,” Frontiers in Physics, vol. 2, 2014. [12] B. Nessler, M. Pfeiffer, L. Buesing, and W. Maass, “Bayesian computation emerges in generic cortical microcircuits through spike-timingdependent plasticity,” PLoS Comp. Biol., vol. 9, no. 4, 2013. [13] V. Choi, “Adiabatic Quantum Algorithms for the NP-Complete Maximum-Weight Independent Set, Exact Cover and 3SAT Problems,” arXiv preprint, 2010. [14] P. Merolla, T. Ursell, and J. Arthur, “The thermodynamic temperature of a rhythmic spiking network,” arXiv preprint, 2010. [15] E. Neftci, S. Das, B. Pedroni, K. Kreutz-Delgado, and G. Cauwenberghs, “Event-driven contrastive divergence for spiking neuromorphic systems.” Frontiers in Neuroscience, vol. 7, 2013. [16] M. Petrovici, J. Bill, I. Bytschok, J. Schemmel, and K. Meier, “Stochastic inference with deterministic spiking neurons,” arXiv preprint, 2013.
9cs.NE
Approaches to Stochastic Modeling of Wind Turbines arXiv:1711.03589v1 [cs.CE] 8 Nov 2017 M. N. Gevorkyan,1, * A. V. Demidova,1, † Robert A. Sobolewski,2, ‡ I. S. Zaryadov,1, 3, S A. V. Korolkova,1, ¶ D. S. Kulyabov,1, 4, ** and L. A. Sevastianov1, 5, †† 1 Department of Applied Probability and Informatics, Peoples’ Friendship University of Russia (RUDN University), 6 Miklukho-Maklaya str., Moscow, 117198, Russia 2 Department of Power Engineering, Fotonics and Lighting Technology, Bialystok University of Technology, Poland, 15-351 Bialystok, Wiejska 45 D street 3 Institute of Informatics Problems, FRC CSC RAS, IPI FRC CSC RAS, 44-2 Vavilova str., Moscow, 119333, Russia 4 Laboratory of Information Technologies Joint Institute for Nuclear Research 6 Joliot-Curie, Dubna, Moscow region, 141980, Russia 5 Bogoliubov Laboratory of Theoretical Physics Joint Institute for Nuclear Research 6 Joliot-Curie, Dubna, Moscow region, 141980, Russia Background. This paper study statistical data gathered from wind turbines located on the territory of the Republic of Poland. The research is aimed to construct the stochastic model that predicts the change of wind speed with time. Purpose. The purpose of this work is to find the optimal distribution for the approximation of available statistical data on wind speed. Methods. We consider four distributions of a random variable: Log-Normal, Weibull, Gamma and Beta. In order to evaluate the parameters of distributions we use method of maximum likelihood. To assess the the results of approximation we use a quantile-quantile plot. Results. All the considered distributions properly approximate the available data. The Weibull distribution shows the best results for the extreme values of the wind speed. Conclusions. The results of the analysis are consistent with the common practice of using the Weibull distribution for wind speed modeling. In the future we plan to compare the results obtained with a much larger data set as well as to build a stochastic model of the evolution of the wind speed depending on time. Keywords: approximation, Weibull distribution, lognormal distribution, gamma distribution, beta distribution, wind speed, statistics I. INTRODUCTION This work is devoted to the problem of stochastic modeling of speed of wind, which is used to generate electrical power in wind plants located on the territory of the Republic of Poland. As a first step several distributions for accuracy of the wind speed approximation will be examined. For this purpose Log-Normal, Weibull, Gamma and Beta are chosen. All these distributions have shape-location-scale parametrisation. For statistical data processing the authors used Python 3 with numpy, scipy.stats [1] and matplotlib [2] libraries and also Jupyter [3] — an interactive shell. We used books [4–6] as reference materials for distributions properties. Articles [7, 8] are the primary sources in which the Weibull distribution is presented for the first time. Articles [9–12, 14? ] describe the use of the Weibull distribution in the modeling of wind turbines and wind speed. II. THE DESCRIPTION OF THE STATISTICAL DATA STRUCTURE The set of statistical data is stored in the file csv consisting of the following columns: 1. 𝑇 — time of fixation of wind speed and direction by sensors installed on the wind power turbine (hh:mm format); 2. 𝑋1 — output power of wind turbine [kW] (the negative values mean the power is consumed rather then generated); 3. 𝑋2 — wind speed [m/s] (measured by anemometer installed at the top of wind turbine nacelle); * † ‡ S ¶ ** †† [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 4. 𝑋3 — wind direction [deg] (measured by anemometer installed at the top of wind turbine nacelle; measured clockwise, the value 0 to the N); 5. 𝑋4 — wind speed 10 m [m/s] obtained at 10 m above the ground m; 2 0.008 III. The direction of wind on the top of the nacelle 0.007 PROBABILITY DISTRIBUTIONS Rate of X3 0.006 0.005 0.004 0.003 0.002 0.001 0.000 0.008 The direction of wind at a distance of 10 meters from ground 0.007 Rate of X5 0.006 0.005 0.004 0.003 0.002 Each of distributions is parameterized by three parameters: 𝛼 — shape factor, 𝑙 — location factor and 𝑠 — scale factor. In the case of the beta distribution the second scale factor is added, denoted by 𝛽-letter. All distributions parameters are positive real numbers: 𝛼, 𝛽, 𝑠, 𝑙 ∈ R, 𝛼, 𝛽, 𝑠 > 0, 𝑙 > 0. The probability density function (PDF) of a LogNormal random variable 𝑋 is: 0.001 0.000 0.008 The direction of wind at a distance of 50 meters from ground 0.007 Rate of X7 0.006 0.005 0.004 0.003 0.002 0.001 0.000 0 50 100 150 200 250 The wind direction in degrees 300 350 Figure 1. Histogram of wind direction at three levels of height 6. 𝑋5 — wind direction 10 m [deg] (obtained at 10 m above the ground; measured clockwise, the value from 0 to the N); 7. 𝑋6 — wind speed 50 m [m/s] (obtained at 50 m above the ground); 8. 𝑋7 — wind direction 50 m [deg] (obtained at 50 m above the ground; measured clockwise, the value ftom 0 to the N). The indicators of wind speed and direction were read out from the sensors every 10 minutes for about 9 months. In total, the table contains 39606 entries. To make an initial choice of distributions that may be suitable for wind speed approximation, the histograms of wind speed are drawn. Visual assessment of these histograms suggest that the adequate choice will be a "heavy-tailed" distribution. But for the wind direction approximation these distributions are not suitable, as can be seen from the figure ??. To read out the data we used the function genfromtxt from numpy [1] lib. ws1 , ws2 , ws3 = np . g e n f r o m t x t ( ’ data . c s v ’ , d e l i m i t e r= ’ ; ’ , skip_header=True , u s e c o l s =(2 , 4 , 6 ) , unpack=True ) where ’data.csv’ is data file, delimiter=’;’ is columns separator, skip_header = True specifies ignoring of the first line as the names of the columns, usecols=(2, 4, 6) makes function to use only 2, 4, 6 columns (numbering begins with zero) and unpack=True — contents of each column should be written in separate arrays ws1, ws2 and ws3 for further analysis of the data separately. 𝑓𝐿𝑁 (𝑥; 𝛼, 𝑙, 𝑠) = (︃ ⎧ (︂ )︂2 )︃ 1 1 ln(𝑥 − 𝑙) − ln 𝑠 ⎪ ⎨ √ exp − , 𝑥 > 𝑙. 2 𝛼 = (𝑥 − 𝑙)𝛼 2𝜋 ⎪ ⎩ 0, 𝑥 < 𝑙. The probability density function of a Weibull [7, 8] random variable 𝑋 is: 𝑓𝑊 (𝑥; 𝛼, 𝑙, 𝑠) = ⎧ (︂ )︂𝛼−1 [︂ (︂ )︂𝛼 ]︂ ⎪ 𝑥−𝑙 ⎨𝛼 𝑥 − 𝑙 exp − , 𝑥 > 𝑙. = 𝑠 𝑠 𝑠 ⎪ ⎩ 0, 𝑥 < 𝑙. The probability density function of a Gamma random variable 𝑋 is: ⎧ (︁ )︁ (𝑥−𝑙) 𝛼−1 ⎪ ⎪ (𝑥 − 𝑙) exp − ⎨ 𝑠 , 𝑥 > 𝑙. 𝛼 Γ(𝛼) 𝑓Γ (𝑥; 𝛼, 𝑙, 𝑠) = 𝑠 ⎪ ⎪ ⎩0, 𝑥 < 𝑙. where Γ(𝛼) is gamma-function. The probability density function of a Beta random variable 𝑋 is: 𝑓ℬ (𝑥; 𝛼, 𝛽, 𝑙, 𝑠) = ⎧ (︂ )︂𝛼−1 (︂ )︂𝛽−1 ⎪ 𝑥−𝑙 ⎨ Γ(𝛼 + 𝛽) 𝑥 − 𝑙 1− , 𝑥 > 𝑙. = 𝑠Γ(𝛼)Γ(𝛽) 𝑠 𝑠 ⎪ ⎩ 0, 𝑥 < 𝑙. If in PDF formulas of Log-Normal, Weibull and Gamma distributions let 𝑙 = 0, and for Beta distribution let 𝑠 = 1, we get the formulas of distributions most frequently used in [4, 6]. IV. DETERMINATION OF DISTRIBUTIONS PARAMETERS In scipy.stats [1] following objects are defined: lognorm, weibull_min, gamma and beta. These objects implement distributions we work with. Every one of these 3 0.18 1.0 Theor. PDF Data 0.16 0.8 0.14 Probability Probability 0.12 0.10 0.08 0.6 0.4 0.06 0.04 0.2 Theor. CDF Data 0.02 0.00 0 5 10 15 20 0.0 0 25 5 10 Wind speed Wind speed Figure 2. PDF of Log-Normal distribution compared with data histogram 15 20 Figure 3. CDF of Log-Normal distribution compared with empirical distribution function 0.18 Theor. PDF Data 0.16 For parameters estimation of our distributions the library scipy.stats provides the function fit(data), which calculates the parameters of distributions by maximum likelihood method and the empirical data. We used this function to calculate parameters of the considered distributions. Then we used pdf and cdf functions to compute values of the probability density function and cumulative distribution function. There is the example of the code for the case of LogNormal distribution: s , loc , s c a l e = s c i p y . s t a t s . lognorm . f i t ( ws1 ) xs = np . l i n s p a c e ( np . min( ws1 ) , np .max( ws1 ) , 1 0 0 0 ) logN_PDF = s c i p y . s t a t s . lognorm . pdf ( xs , s , loc , s c a l e ) logN_CDF = s c i p y . s t a t s . lognorm . c d f ( xs , s , loc , s c a l e ) The results are presented graphically on figures 2, 3, 4, 5, 6, 7, 8, 9 and 11, 10, 12, 13. The figures were plotted for theoretical distributions, the parameters of which have been determined on the basis of the entire dataset. From the analysis of the quantile-quantile plots (Q-Q plots) we can conclude that the Weibull distribution is best suited for approximation of available data (although only slightly), outmatching them only in the approximation of extreme values of a random variable. We also performed computations with the considered distributions parameterized by only two parameters (let 𝑙 = 0, and for Beta distribution an addition let 𝑠 = 1). After plotting the results of calculations we found out that the two-parameter Weibull distribution has superiority over other two-parameters distributions (Log-Normal, Gamma and Beta), which is not true for three-parameter case. Probability 0.12 0.10 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 Wind speed Figure 4. PDF of Weibull distribution compared with data histogram V. CONCLUSIONS The results of statistical data processing correspond to the results presented in the literature, where Weibull distribution is the most often used distribution for the wind speed approximation [9–14]. Our future work will be aimed at the construction of stochastic models that can approximate the wind speed depending on time [15]. On the other hand, we expect to verify the results of this work by using more dilated and large data array. ACKNOWLEDGMENTS The work is partially supported by RFBR grants No’s 15-07-08795 and 16-07-00556. Also the publication was 1.0 0.8 Probability objects has PDF function pdf(x, a, [b,] loc, scale) and CDF (cumulative distribution) function cdf(x, a, [b,] loc, scale), where x — function argument, a, b — shape parameters 𝛼, (and 𝛽 for Beta-distribution), loc and scale are location and scale parameters. 0.14 0.6 0.4 0.2 Theor. CDF Data 0.0 0 5 10 Wind speed 15 20 Figure 5. CDF of Weibull distribution compared with empirical distribution function 4 0.18 1.0 Theor. PDF Data 0.16 0.8 0.14 Probability Probability 0.12 0.10 0.08 0.6 0.4 0.06 0.04 0.2 Theor. CDF Data 0.02 0.00 0 5 10 15 20 0.0 0 25 5 10 Wind speed Wind speed Figure 6. PDF of Gamma distribution compared with data histogram 15 20 Figure 7. CDF of Gamma distribution compared with empirical distribution function supported by the Ministry of Education and Science of the Russian Federation (the Agreement No 02.a03.21.0008). The computations were carried out on the Felix computational cluster (RUDN University, Moscow, Russia) and on the HybriLIT heterogeneous cluster (Multifunctional center for data storage, processing, and analysis at the Joint Institute for Nuclear Research, Dubna, Russia). 0.18 Theor. PDF Data 0.16 0.14 Probability 0.12 0.10 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 Wind speed Figure 8. PDF of Beta distribution compared with data histograms 1.0 0.8 Probability [1] E. Jones, T. Oliphant, P. Peterson, et al., SciPy: Open source scientific tools for Python, [Online; accessed 19.01.2017] (2001). URL http://www.scipy.org/ [2] M. Droettboom, T. A. Caswell, J. Hunter, E. Firing, J. H. Nielsen, B. Root, P. Elson, D. Dale, J.-J. Lee, N. Varoquaux, J. K. Seppänen, D. McDougall, R. May, A. Straw, E. S. de Andrade, A. Lee, T. S. Yu, E. Ma, C. Gohlke, S. Silvester, C. Moad, P. Hobson, J. Schulz, P. Würtz, F. Ariza, Cimarron, T. Hisch, N. Kniazev, A. F. Vincent, I. Thomas, matplotlib/matplotlib: v2.0.0 (Jan. 2017). doi:10.5281/zenodo.248351. URL https://doi.org/10.5281/zenodo.248351 [3] Project jupyter home, [Online; accessed 19.01.2017] (2017). URL https://jupyter.org [4] N. B. Norman L. Johnson, Samuel Kotz, Continuous Univariate Distributions, Vol. 1 of Wiley Series in Probability and Statistics, Wiley-Interscience, 1994. [5] N. B. Norman L. Johnson, Samuel Kotz, Continuous Univariate Distributions, Vol. 2, Vol. 2 of Wiley Series in Probability and Statistics, Wiley-Interscience, 1995. 0.6 0.4 0.2 Theor. CDF Data 0.0 0 5 10 Wind speed 15 20 Figure 9. CDF of Beta distribution compared with empirical distribution function [6] W. B. Nelson, Applied Life Data Analysis (Wiley Series in Probability and Statistics), 1982. [7] M. R. Fréchet, Sur la loi de probabilité de l’écart maximum, Annales de la Société Polonaise de Mathematique (1927) 93–116. [8] W. Weibull, A statistical distribution function of wide applicability, Journal of Applied Mechanics (1951) 293– 5 14 wind turbines under various tower heights and rated wind speeds using weibull distribution, IEEE Transactions on Energy Conversion 23 (2) (2008) 592–602. doi:10.1109/ TEC.2008.918626. 12 14 12 8 10 6 Data quantiles Data quantiles 10 4 2 0 8 6 4 0 2 4 6 8 10 12 Log-Normal theoretical quantiles 14 2 Figure 10. Q-Q plot for LogNormal distribution 0 0 2 14 14 14 10 12 8 10 6 Data quantiles Data quantiles 12 Figure 12. Q-Q plot for Gamma distribution 12 4 2 0 4 6 8 10 Gamma theoretical quantiles 8 6 4 0 2 4 6 8 10 Weibull theoretical quantiles 12 14 Figure 11. Q-Q plot for Weibull distribution 297. [9] I. Y. Lun, J. C. Lam, A study of weibull parameters using long-term wind observations, Renewable Energy 20 (2) (2000) 145–153. doi:http://dx.doi.org/10. 1016/S0960-1481(99)00103-2. [10] J. Seguro, T. Lambert, Modern estimation of the parameters of the weibull wind speed distribution for wind energy analysis, Journal of Wind Engineering and Industrial Aerodynamics 85 (1) (2000) 75–84. doi:http: //dx.doi.org/10.1016/S0167-6105(99)00122-1. [11] G. J. Bowden, P. R. Barker, V. O. Shestopal, J. W. Twidell, The weibull distribution function and wind power statistics, Wind Engineering 7 (1983) 85–98, provided by the SAO/NASA Astrophysics Data System. [12] T. H. Yeh, L. Wang, A study on generator capacity for 2 0 0 2 4 6 8 10 Beta theoretical quantiles 12 14 Figure 13. Q-Q plot for Beta distribution [13] M. Islam, R. Saidur, N. Rahim, Assessment of wind energy potentiality at kudat and labuan, malaysia using weibull distribution function, Energy 36 (2) (2011) 985–992. doi: http://dx.doi.org/10.1016/j.energy.2010.12.011. [14] A. Garcia, J. Torres, E. Prieto, A. de Francisco, Fitting wind speed distributions: a case study, Solar Energy 62 (2) (1998) 139–144. doi:http://dx.doi.org/10. 1016/S0038-092X(97)00116-3. [15] R. Z. Miñano, F. Milano, Construction of sde-based wind speed models with exponential autocorrelation (2015). arXiv:arXiv:1511.02345. Исследование подходов к стохастическому моделированию ветроэнергетических установок М. Н. Геворкян,1, * А. В. Демидова,1, † Р. А. Соболевский,2, ‡ И. С. Зарядов,1, 3, S А. В. Королькова,1, ¶ Д. С. Кулябов,1, 4, ** и Л. А. Севастьянов1, 5, †† arXiv:1711.03589v1 [cs.CE] 8 Nov 2017 1 Кафедра прикладной информатики и теории вероятностей, Российский университет дружбы народов, ул. Миклухо-Маклая, д. 6, Москва, Россия, 117198 2 Кафедра энергетики, машиностроения, фотоники и технологий освещения, Белостокский технологический университет, Республика Польша, 15-351 Белосток, ул. Wiejska 45 D 3 Институт проблем информатики ФИЦ ИУ РАН (ИПИ ФИЦ ИУ РАН), Москва, ул. Вавилова 44 кор.2, Россия, 119333 4 Лаборатория информационных технологий, Объединённый институт ядерных исследований, ул. Жолио-Кюри 6, Дубна, Московская область, Россия, 141980 5 Лаборатория теоретической физики, Объединённый институт ядерных исследований, ул. Жолио-Кюри 6, Дубна, Московская область, Россия, 141980 Предпосылки. В работе исследуются статистические данные, собранные с ветроэнергетических установок, находящихся на территории Республики Польши. исследования направленны на построение стохастической модели, предсказывающей изменение скорости ветра в зависимости от времени. Целью данной работы является поиск наиболее оптимального распределения для аппроксимации имеющихся статистических данных по скорости ветра. Методы Рассматриваются четыре распределения случайной величины: логнормальное, Вейбулла, гамма и бета. Из массива статистических данных методом функции максимального правдоподобия находятся параметры данных распределений. Для оценки аппроксимации используется квантиль-кванлиль (Q-Q) график. Результаты Все рассматриваемые распределения имеющиеся данные. Распределение Вейбулла показывает лучшие результаты аппроксимации для крайних значений скорости ветра. Выводы Результаты анализа согласуются с общепринятой практикой использования распределения Вейбулла для моделирования скорости ветра. В дальнейшем планируется сравнить полученные результаты с гораздо большим массивом данных, а также построить стохастическую модель эволюции скорости ветра в зависимости от времени. Ключевыеслова: аппроксимация, распределение Вейбулла, логнормальное распределение, гамма распределение, бета распределение, скорость ветра, статистические данные I. ВВЕДЕНИЕ Данная работа посвящена проблеме стохастического моделирования изменения скорости ветра, используемого для генерации электроэнергии на ветроэнергетических установках находящихся на территории Республики Польши (Republic of Poland). В качестве первого этапа выбирается вид теоретического распределения случайной величины 𝑤, которая должна аппроксимировать скорость ветра. В данной работе мы исследовали несколько распределений на предмет аппроксимации располагаемых нами данных, а именно: логнормальное, Вейбулла, а также бета и гамма распределения. Все рассматриваемые * † ‡ S ¶ ** †† [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] распределения имеют параметризацию коэффициентами формы, сдвига и масштаба (shape-location-scale parametrisation). Для обработки статистических данных применялся язык Python 3 в связке с библиотеками numpy, scipy.stats [1] и matplotlib [2], а также интерактивной оболочкой Jupyter [3]. Мы использовали книги [4–6] в качестве справочных материалов по свойствам используемых нами распределений. Статьи [7, 8] — первоисточники, в которых распределение Вейбулла представлено впервые. Статьи [9– 14] описывают использование распределения Вейбулла при моделировании ветроэнергетических установок и скорости ветра. II. ОПИСАНИЕ СТРУКТУРЫ СТАТИСТИЧЕСКИХ ДАННЫХ Статистические данные представляют собой таблицу величин в формате csv составленную из следующих колонок: 1. 𝑇 — время фиксации скорости и направления 2 0.008 ветра датчиками, установленными на ветроэнергетической турбине (в формате чч:мм); Rate of X3 2. 𝑋1 — мощность турбины [кВт] (отрицательные значения означают, что электроэнергия не производится, а потребляется); The direction of wind on the top of the nacelle 0.007 0.006 0.005 0.004 0.003 0.002 0.001 0.000 0.008 The direction of wind at a distance of 10 meters from ground 0.007 Rate of X5 3. 𝑋2 — скорость ветра на [м/с] (измеряется анемометром на вершине гондолы воздушной турбины), 0.006 0.005 0.004 0.003 0.002 0.001 0.000 0.008 The direction of wind at a distance of 50 meters from ground 0.007 0.006 Rate of X7 4. 𝑋3 — направление ветра [градусы] (измеряется анемометром на вершине гондолы воздушной турбины; измеряется по часовой стрелке, значения от 0∘ до 𝑁 ∘ ); 0.005 0.004 0.003 0.002 5. 𝑋4 — скорость ветра на уровне 10 метров от поверхности земли [м/с]; 6. 𝑋5 — направление ветра на уровне 10 метров от поверхности земли [градусы]; 7. 𝑋6 — скорость ветра на уровне 50 метров [м/с] от поверхности земли; 8. 𝑋7 — направление ветра на уровне 50 метров от поверхности земли [градусы]. Показатели скорости и направления ветра снимались с датчиков каждые 10 минут на протяжении около 9 месяцев. В общей сложности таблица содержит 39606 записей. Чтобы осуществить первоначальный выбор распределений, которые могут подойти для аппроксимации скорости ветра мы нарисовали гистограммы распределения скоростей ветра. Визуальная оценка этих гистограмм позволила предположить, что адекватным выбором будут распределения с «тяжелыми хвостами». Для аппроксимации направлений ветра такие распределения не подойдут, в чем можно убедиться посмотрев на гистограмму на рис. 1. Для считывания данных мы использовали функцию genfromtxt библиотеки numpy [1] ws1 , ws2 , ws3 = np . g e n f r o m t x t ( ’ data . c s v ’ , d e l i m i t e r= ’ ; ’ , skip_header=True , u s e c o l s =(2 , 4 , 6 ) , unpack=True ) где ’data.csv’ — файл с данными, delimiter=’;’ — разделитель колонок, skip_header = True — указывает на необходимость игнорирования первой строки, так как в ней перечислены названия колонок, usecols=(2, 4, 6) — использовать только 2,4,6 колонки (нумерация начинается с нуля) и unpack=True — содержимое каждой из колонок следует записать в отдельные массивы ws1, ws2 и ws3 для дальнейшего анализа данных по отдельности. 0.001 0.000 0 50 100 150 200 250 The wind direction in degrees 300 350 Рис. 1. Histogram of wind direction at three levels of height III. ИСПОЛЬЗУЕМЫЕ РАСПРЕДЕЛЕНИЯ Каждое из рассматриваемых в работе распределений параметризовано тремя параметрами: 𝛼 — коэффициент формы (shape), 𝑙 — коэффициент сдвига (location) и 𝑠 — коэффициент масштаба (scale). В случае бетараспределения добавляется еще второй коэффициент масштаба, обозначаемый буквой 𝛽. Для всех распределений параметры полагаются положительными действительными числами: 𝛼, 𝛽, 𝑠, 𝑙 ∈ R, 𝛼, 𝛽, 𝑠 > 0, 𝑙 > 0. Напомним основные определения. Случайная величина 𝑋 распределена по логнормальному закону, если функция плотности вероятности задается следующей формулой: 𝑓𝐿𝑁 (𝑥; 𝛼, 𝑙, 𝑠) = (︃ ⎧ (︂ )︂2 )︃ 1 1 ln(𝑥 − 𝑙) − ln 𝑠 ⎪ ⎨ √ exp − , 𝑥 > 𝑙. 2 𝛼 = (𝑥 − 𝑙)𝛼 2𝜋 ⎪ ⎩ 0, 𝑥 < 𝑙. Случайная величина 𝑋 распределена по Вейбуллу [7, 8], если функция плотности вероятности задается следующей формулой: 𝑓𝑊 (𝑥; 𝛼, 𝑙, 𝑠) = ⎧ (︂ )︂𝛼−1 [︂ (︂ )︂𝛼 ]︂ ⎪ 𝑥−𝑙 ⎨𝛼 𝑥 − 𝑙 exp − , 𝑥 > 𝑙. = 𝑠 𝑠 𝑠 ⎪ ⎩ 0, 𝑥 < 𝑙. Случайная величина 𝑋 подчинена гаммараспределению, если функция плотности вероятности 3 0.18 0.14 0.12 Probability 𝑥 > 𝑙. 𝑥 < 𝑙. где Γ(𝛼) — гамма-функция. Случайная величина 𝑋 подчинена бетараспределению, если функция плотности вероятности задается следующей формулой: 𝑓ℬ (𝑥; 𝛼, 𝛽, 𝑙, 𝑠) = ⎧ (︂ )︂𝛼−1 (︂ )︂𝛽−1 ⎪ 𝑥−𝑙 ⎨ Γ(𝛼 + 𝛽) 𝑥 − 𝑙 , 𝑥 > 𝑙. 1− = 𝑠Γ(𝛼)Γ(𝛽) 𝑠 𝑠 ⎪ ⎩ 0, 𝑥 < 𝑙. Если в формулах плотности вероятности логнормального, Вейбулла и гамма-распределений положить 𝑙 = 0, а у бета распределения в добавок 𝑠 = 1, то мы получим вид данных распределений, наиболее часто используемый в литературе [4, 6]. 0.10 0.08 0.06 0.04 0.02 0.00 0 s , loc , s c a l e = s c i p y . s t a t s . lognorm . f i t ( ws1 ) xs = np . l i n s p a c e ( np . min( ws1 ) , np .max( ws1 ) , 1 0 0 0 ) logN_PDF = s c i p y . s t a t s . lognorm . pdf ( xs , s , loc , s c a l e ) logN_CDF = s c i p y . s t a t s . lognorm . c d f ( xs , s , loc , s c a l e ) 10 15 20 25 Рис. 2. PDF of Log-Normal distribution compared with data histogram 1.0 0.8 0.6 0.4 0.2 Theor. CDF Data 0.0 0 5 10 Wind speed 15 20 Рис. 3. CDF of Log-Normal distribution compared with empirical distribution function ОПРЕДЕЛЕНИЕ ПАРАМЕТРОВ РАСПРЕДЕЛЕНИЙ В библиотеке scipy.stats [1] определены объекты lognorm, weibull_min, gamma и beta которые реализуют рассматриваемые нами распределения. У каждого из данных объектов предусмотрены методы, которые реализуют функцию плотности вероятности pdf(x, a, [b,] loc, scale) и функцию распределения вероятности cdf(x, a, [b,] loc, scale), где x — аргумент функции, a, b — параметры формы 𝛼, (и 𝛽 в случае бета-распределения), loc и scale — параметры смещения и масштаба. Для нахождения параметров рассматриваемых распределений в scipy.stats предусмотрена функция fit(data), которая вычисляет методом максимального правдоподобия параметры соответствующего распределения. Мы использовали данную функцию для вычисления параметров рассматриваемых нами распределений. После чего с помощью функций pdf и cdf были вычислены значения функции плотности вероятности и функции распределения. Приведём пример кода для случая логнормального закона. 5 Wind speed V. РЕЗУЛЬТАТЫ Результаты исследования представлены в графическом виде на рисунках 2, 3, 4, 5, 6, 7, 8, 9 и 11, 10, 12, 13. Данные изображения были получены для теоретических распределений, параметры которых определялись на основе всего массива данных. Из рассмотрения квантиль-квантиль графиков можно сделать вывод, что распределение Вейбулла наилучшим образом подходит для аппроксимации имеющихся у нас данных, хотя и превосходит другие распределения лишь незначительно, обходя их лишь в точности аппроксимации крайних значений случайной величины. Мы также провели вычисления с рассматриваемыми распределениями параметризованными только двумя параметрами (положив 𝑙 = 0, а в бета распределении дополнительно 𝑠 = 1). После представления результа0.18 Theor. PDF Data 0.16 0.14 0.12 Probability IV. Theor. PDF Data 0.16 Probability задается следующей формулой: ⎧ )︁ (︁ ⎪ ⎪ (𝑥 − 𝑙)𝛼−1 exp − (𝑥−𝑙) ⎨ 𝑠 , 𝛼 Γ(𝛼) 𝑓Γ (𝑥; 𝛼, 𝑙, 𝑠) = 𝑠 ⎪ ⎪ ⎩0, 0.10 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 Wind speed Рис. 4. PDF of Weibull distribution compared with data histogram 4 0.18 1.0 Theor. PDF Data 0.16 0.8 0.14 Probability Probability 0.12 0.6 0.4 0.10 0.08 0.06 0.04 0.2 Theor. CDF Data 0.0 0 5 10 Wind speed 15 0.02 0.00 0 20 5 10 15 20 25 Wind speed Рис. 5. CDF of Weibull distribution compared with empirical distribution function Рис. 8. PDF of Beta distribution compared with data histograms 0.18 Theor. PDF Data 0.16 1.0 0.14 0.8 Probability Probability 0.12 0.10 0.08 0.06 0.6 0.4 0.04 0.2 0.02 0.00 0 Theor. CDF Data 5 10 15 20 25 Wind speed 0.0 0 5 10 Wind speed 15 20 Рис. 6. PDF of Gamma distribution compared with data histogram Рис. 9. CDF of Beta distribution compared with empirical distribution function тов в графическом виде очевидно явное превосходство двухпараметрического распределения Вейбулла над остальными двухпараметрическими распределениями (логнормального, гамма и бета), чего не наблюдается в трехпараметрическом случае. результаты данной работы на статистических данных с гораздо большим числом записей, чем имеющиеся в нашем распоряжении на данный момент времени. БЛАГОДАРНОСТИ ЗАКЛЮЧЕНИЕ Результаты проделанной статистической обработки данных соответствуют результатам, изложенным в литературе, где распределение Вейбулла наиболее часто используется для аппроксимации скорости ветра [9– 14]. Дальнейшая наша работа будет направленна на построение стохастической модели, способной аппроксимировать скорость ветра в зависимости от времени [15]. С другой стороны, мы рассчитываем верифицировать 1.0 Probability 0.8 Работа частично поддержана грантами РФФИ № 1507-08795, 16-07-00556. Также публикация выполнена при финансовой поддержке Минобрнауки России (Со14 12 10 Data quantiles VI. 8 6 4 0.6 0.4 2 0.2 Theor. CDF Data 0.0 0 5 10 Wind speed 15 20 Рис. 7. CDF of Gamma distribution compared with empirical distribution function 0 0 2 4 6 8 10 12 Log-Normal theoretical quantiles 14 Рис. 10. Q-Q plot for LogNormal distribution 5 14 глашение № 02.a03.21.0008). Расчёты проведены на вычислительном кластере «Felix» РУДН и на Гетерогенном вычислительном кластере «HybriLIT» Многофункционального центра хранения, обработки и анализа данных ОИЯИ. 12 Data quantiles 10 8 6 4 2 0 0 2 4 6 8 10 Weibull theoretical quantiles 12 14 Рис. 11. Q-Q plot for Weibull distribution 14 12 Data quantiles 10 8 6 4 2 0 0 2 4 6 8 10 Gamma theoretical quantiles 12 14 Рис. 12. Q-Q plot for Gamma distribution [1] Jones Eric, Oliphant Travis, Peterson Pearu et al. SciPy: Open source scientific tools for Python. — 2001. — [Online; accessed 19.01.2017]. URL: http://www.scipy. org/. [2] Droettboom Michael, Caswell Thomas A, Hunter John et al. matplotlib/matplotlib: v2.0.0. — 2017. — Jan. — URL: https://doi.org/10.5281/zenodo.248351. [3] Project Jupyter home. — 2017. — [Online; accessed 19.01.2017]. URL: https://jupyter.org. [4] Norman L. Johnson Samuel Kotz N. Balakrishnan. Continuous Univariate Distributions. — Wiley-Interscience, 1994. — Vol. 1 of Wiley Series in Probability and Statistics. [5] Norman L. Johnson Samuel Kotz N. Balakrishnan. Continuous Univariate Distributions, Vol. 2. — WileyInterscience, 1995. — Vol. 2 of Wiley Series in Probability and Statistics. [6] Nelson Wayne B. Applied Life Data Analysis (Wiley Series in Probability and Statistics). — 1982. [7] Fréchet Maurice René. Sur la loi de probabilité de l’écart maximum // Annales de la Société Polonaise de Mathematique. — 1927. — P. 93–116. [8] Weibull Waloddi. A statistical distribution function of wide applicability // Journal of Applied Mechanics. — 1951. — P. 293–297. [9] Lun Isaac Y.F, Lam Joseph C. A study of Weibull parameters using long-term wind observations // Renewable Energy. — 2000. — Vol. 20, no. 2. — P. 145–153. [10] Seguro J.V., Lambert T.W. Modern estimation of the parameters of the Weibull wind speed distribution for wind energy analysis // Journal of Wind Engineering and Industrial Aerodynamics. — 2000. — Vol. 85, no. 1. — 6 14 12 Data quantiles 10 8 6 4 2 0 0 2 4 6 8 10 Beta theoretical quantiles 12 Рис. 13. Q-Q plot for Beta distribution 14 P. 75–84. [11] Bowden G. J., Barker P. R., Shestopal V. O., Twidell J. W. The Weibull distribution function and wind power statistics // Wind Engineering. — 1983. — Vol. 7. — P. 85– 98. — Provided by the SAO/NASA Astrophysics Data System. [12] Yeh T. H., Wang L. A Study on Generator Capacity for Wind Turbines Under Various Tower Heights and Rated Wind Speeds Using Weibull Distribution // IEEE Transactions on Energy Conversion. — 2008. — June. — Vol. 23, no. 2. — P. 592–602. [13] Islam M.R., Saidur R., Rahim N.A. Assessment of wind energy potentiality at Kudat and Labuan, Malaysia using Weibull distribution function // Energy. — 2011. — Vol. 36, no. 2. — P. 985–992. [14] Garcia A., Torres J.L., Prieto E., de Francisco A. Fitting wind speed distributions: a case study // Solar Energy. — 1998. — Vol. 62, no. 2. — P. 139–144. [15] Miñano Rafael Zárate, Milano Federico. Construction of SDE-based wind speed models with exponential autocorrelation. — 2015. — arXiv:1511.02345.
5cs.CE
Expurgated Bounds for the Asymmetric Broadcast Channel Ran Averbuch, Nir Weinberger∗ , and Neri Merhav arXiv:1711.10299v1 [cs.IT] 28 Nov 2017 November 29, 2017 The Andrew & Erna Viterbi Faculty of Electrical Engineering Technion - Israel Institute of Technology Technion City, Haifa 3200003, ISRAEL [email protected], {rans@campus, merhav@ee}.technion.ac.il Abstract This work contains two main contributions concerning the expurgation of hierarchical ensembles for the asymmetric broadcast channel. The first is an analysis of the optimal maximum likelihood (ML) decoders for the weak and strong user. Two different methods of code expurgation will be used, that will provide two competing error exponents. The second is the derivation of expurgated exponents under the generalized stochastic likelihood decoder (GLD). We prove that the GLD exponents are at least as tight as the maximum between the random coding error exponents derived in an earlier work by Averbuch and Merhav (2017) and one of our ML–based expurgated exponents. By that, we actually prove the existence of hierarchical codebooks that achieve the best of the random coding exponent and the expurgated exponent simultaneously for both users. Index Terms: Asymmetric broadcast channel, error exponent, expurgated exponent, likelihood decoder. * This work was done while N. Weinberger was at the Technion. Currently, he is with the School of Electrical Engineering at Tel–Aviv University. 1 1 Introduction One of the most elementary system configuation models in multi-user information theory is the broadcast channel (BC). It has been introduced more than four decades ago by Cover [1], and since then, a vast amount of papers and books, analyzing different aspects of the broadcast model, have been published. Although the characterization of the capacity region of the general BC is still an open problem, some special cases have been solved. Most notably, the broadcast channel with degraded message sets, also known as the asymmetric broadcast channel (ABC), was introduced and solved by Körner and Marton [3]. The direct part of their coding theorem relies on Bergmans’ scheme [2], which suggested the use of an hierarchical random code: first generate “cloud centers”, which designate messages intended to both the receiver with the relatively high channel quality, henceforth referred to as the strong user, and the receiver with the relatively low channel quality, henceforth referred to as the weak user. Then, in the second step, “around” each cloud center, generate a “sattelite” codeword for each message that is intended to the strong user only. The transmitter sends a codeword pertaining to one of the clouds. The strong decoder fully decodes both the common message (cloud center) and his private message (sattelite), whereas the weak decoder decodes the common message only. While the capacity region of the ABC has been known for many years, only little is known about its reliability functions. The earliest work on error exponents for the general ABC is of Körner and Sgarro [4]. Later, Kaspi and Merhav [5] have derived tighter lower bounds to the reliability functions of both users by analyzing random coding error exponents of their optimal decoders. Most recently [6], the exact random coding error exponents have been determined for both the strong user and the weak user, for the ensemble of fixed composition codes. Even in the single–user case, it is known for many years that the random coding error exponent is not tight (with respect to the reliability function) for relatively low coding rates, and may be improved by expurgation [7], [15]. Specifically, improved bounds are obtained by eliminating codewords that contribute relatively highly to the error probability, and asserting that some upper bound holds for all remaining codewords. More recent papers, where the method of expurgation is studied are [8], [9] (list decoding), [10] (Gaussian BC) and [11] (discrete memoryless multiple–access channels), among many others. 2 The main objective of this paper is to study expurgation techniques for the hierarchical ensemble used over the ABC. Expurgating a code for the ABC is not a trivial extension of expurgation in the single-user case, because there might be conflicting goals from the viewpoints of the two users. Nonetheless, we were able to define expurgation procedures that guarantee no harm to the performance of either user. This has paved the way to derive tighter lower bounds on the reliability functions of the ABC. We start by analyzing the optimal maximum likelihood (ML) decoder, and derive some expurgated bounds, that are natural generalizations of the single–user expurgated bound due to Csiszár, Körner and Marton (CKM) [7]. Although our first process of code expurgation is fairly intuitive, there is at least one specific step in our first derivation where exponential tightness might be compromised. This point gives rise to a possible room for improvement upon the results of our first theorem, and indeed, such an improvement is achieved by a second method of expurgation. Here, one starts by expurgating cloud centers, and only afterwards, single codewords. The intuition behind this technique is the following. When the exponential rate of the codewords within a cloud is too high, the weak user can still make a good estimation, merely by relying on the set of cloud centers. The expurgated bounds of our second method, however, are not always tighter than those of the first method, because of other differences in their derivations. We then expand the scope and consider the generalized likelihood decoder (GLD), which is a more general family of stochastic likelihood decoders. For such decoders, the probability of deciding on a given message is proportional to a general exponential function of the joint empirical distribution of the cloud–center, the codeword and the received channel output vector. The random coding error exponent of the ordinary and the mismatched likelihood decoders for single–user have been derived by Scarlett et al. [12]. In a more recent paper by Merhav [13], the expurgated exponent of the GLD has been derived and compared to the classical expurgated bound of [7], showing an explicit improvement at relatively high coding rates. In this paper, we consider GLD’s for both the strong and the weak users of an ABC, and derive expurgated exponents under these decoders. These bounds generalize the bound of [13], and prove that they are at least as tight as the maximum between the random coding error exponents of [6] and the expurgated bounds of our first theorem, which are based on the ML decoder. By that, we actually prove the existence of hierarchical codebooks that attain the best of the random coding 3 exponent and the expurgated exponent simultaneously for both users. The main drawback of those error exponents is that they are not easy to calculate since they involve minimizations over relatively cumbersome auxiliary channels, and hence, efficient computation algorithms for the GLD bound are under current research. From this viewpoint, the exponents of our first theorems are much more attractive. The remaining part of the paper is organized as follows. In Section 2, we establish notation conventions, and review some preliminaries. In Section 3, we formalize the model, the decoders and reliability functions. In Section 4, we summarize the main theoretical results of this paper. Sections 5, 6 and 7 provide the proofs of our main theorems. 2 2.1 Notation Conventions and Preliminaries Notation Conventions Throughout the paper, random variables will be denoted by capital letters, specific values they may take will be denoted by the corresponding lower case letters, and their alphabets will be denoted by calligraphic letters. Random vectors and their realizations will be denoted, respectively, by capital letters and the corresponding lower case letters, both in the bold face font. Their alphabets will be superscripted by their dimensions. For example, the random vector X = (X1 , . . . , Xn ), (n - positive integer) may take a specific vector value x = (x1 , . . . , xn ) in X n , the n-th order Cartesian power of X , which is the alphabet of each component of this vector. Sources and channels will be subscripted by the names of the relevant random variables/vectors and their conditionings, whenever applicable, following the standard notation conventions, e.g., QX , QY |X , and so on. When there is no room for ambiguity, these subscripts will be omitted. For a generic joint distribution QXY = {QXY (x, y), x ∈ X , y ∈ Y}, which will sometimes be abbreviated by Q, information measures will be denoted in the conventional manner, but with a subscript Q, that is, HQ (X) is the marginal entropy of X, HQ (X|Y ) is the conditional entropy of X given Y , IQ (X; Y ) = HQ (X)−HQ (X|Y ) is the mutual information between X and Y , and so on. The weighted divergence between two conditional distributions (channels), say, QZ|X and W = {W (z|x), x ∈ X , z ∈ Z}, with weighting QX is defined as D(QZ|X ||W |QX ) = X QX (x) x∈X X z∈Z 4 QZ|X (z|x) log QZ|X (z|x) , W (z|x) (1) where logarithms, here and throughout the sequel, are taken to the natural base. The probability of an event E will be denoted by Pr{E}, and the expectation operator with respect to (w.r.t.) a probability distribution P will be denoted by EP {·}, where the subscript will often . be omitted. For two positive sequences an and bn , the notation an = bn will stand for equality in the exponential scale, that is, limn→∞ 1 n log abnn = 0. The indicator function of an event E will be denoted by I{E}. The notation [x]+ will stand for max{0, x}. The empirical distribution of a sequence x ∈ X n , which will be denoted by P̂x , is the vector of relative frequencies, P̂x (x), of each symbol x ∈ X in x. The type class of x ∈ X n , denoted T (x), is the set of all vectors x0 with P̂x0 = P̂x . When we wish to emphasize the dependence of the type class on the empirical distribution P̂ , we will denote it by T (P̂ ). Information measures associated with empirical distributions will be denoted with ’hats’ and will be subscripted by the sequences from which they are induced. For example, the entropy associated with P̂x , which is the empirical entropy of x, will be denoted by Ĥx (X). Similar conventions will apply to the joint empirical distribution, the joint type class, the conditional empirical distributions and the conditional type classes associated with pairs (and multiples) of sequences of length n. Accordingly, P̂xy would be the joint empirical distribution of (x, y) = {(xi , yi )}ni=1 , T (P̂xy ) will denote the joint type class of (x, y), T (x|y) will stand for the conditional type class of x given y, Iˆxy (X; Y ) will denote the empirical mutual information, and so on. When we wish to emphasize the dependence of T (x|y) upon y and the relevant empirical conditional distribution, QX|Y = P̂x|y , we denote it by T (QX|Y |y). Similar conventions will apply to triples of sequences, say, {(x, y, z)}, etc. Likewise, when we wish to emphasize the dependence of empirical information measures upon a given empirical distribution, Q, we denote them using the subscript Q, as described above. 2.2 Preliminaries As already mentioned in the Introduction, the exact random coding error exponents of the ABC have been derived and analyzed in [6]. For the weak user, it is given by  h i  Ew (Ry , Rz ) = min D(QZ|U X kWZ|X |QU X ) + IQ (U ; Z) + [IQ (X; Z|U ) − Ry ]+ − Rz , QZ|U X + (2) 5 while the exact error exponent of the strong user is given by  Es (Ry , Rz ) = min D(QY |U X kWY |X |QU X ) QY |U X n o . + min [IQ (U X; Y ) − Ry − Rz ]+ , [IQ (X; Y |U ) − Ry ]+ (3) Along the proofs in the current paper, some mathematical results are used extensively. Instead of explaining them each time repeatedly, let us summerize them: • We abbreviate the union bounds and Markov’s inequality by UB and MI, respectively. • We refer to the following inequality as the power distribution inequality (PD), s  X X  asj aj  ≤ (4) j∈J j∈J which holds whenever s ∈ [0, 1] and aj ≥ 0 for all j ∈ J [15, Exercise 4.15(f)]. A special case occurs when the cardinality of J is subexponential in the blocklength n (e.g., when we sum over type–classes) and then  s  s X . X nsaj naj  . naj  e = max e = max ensaj = e . j∈J j∈J j∈J (5) j∈J • Let N be a binomial random variable with enR (R ≥ 0) trials and success rate of the exponential order of e−nI (I ≥ 0). It is shown in [16, Chap. 6.3] that for s > 0  exp {n[R − I]s} R≥I s . . E {N } = exp {n[R − I]} R<I 3 (6) Definitions and Problem Formulation We consider a memoryless ABC with a finite input alphabet X and finite output alphabets Y and Z. Let WY |X ≡ W1 = {W1 (y|x), x ∈ X , y ∈ Y} and WZ|X ≡ W2 = {W2 (z|x), x ∈ X , z ∈ Z} denote the single–letter input–output transition probability matrices, associated with the strong user and the weak user, respectively. When these channels are fed by an input vector x ∈ X n , they produce the corresponding output vectors y ∈ Y n and z ∈ Z n , according to W1 (y|x) = W2 (z|x) = n Y t=1 n Y t=1 6 W1 (yt |xt ), (7) W2 (zt |xt ). (8) We are interested in sending one out of My Mz messages to the strong user, that observes y, and one out of Mz messages to the weak user, that observes z. The two messages are chosen with uniform probability. Although our results prove the existence of a single sequence of deterministic hierarchical constant composition (HCC) codebooks, whose error probabilities are provably bounded, our proof techniques use extensively the following mechanism of random selection of an HCC code for the ABC. Let U be a finite alphabet, let PU be a given probability distribution on U, and let PX|U be a given matrix of conditional probabilities of X given U , such that the type– class T (PU ) and the conditional type–class T (PX|U |u) are non–empty. We first select, independently at random, Mz = denRz e n-vectors (“cloud centers”), u0 , u1 , . . . , uMz −1 , all under the uniform distribution over the type–class T (PU ). Next, for each m = 0, 1, . . . , Mz − 1, we select conditionally independently (given um ), My = denRy e codewords, xm,0 , xm,1 , . . . , xm,(My −1) , under the uniform distribution across the conditional type–class T (PX|U |um ). We denote the sub–code for each cloud by Cm (n) = {xm,0 , xm,1 , . . . , xm,(My −1) }. Thus, the communication rate to the weak user is Rz , while the total communication rate to the strong user is Rz + Ry . Mz −1 Cm (n), and the collection of cloud centers, Once selected, the entire codebook C(n) = ∪m=0 {u0 , u1 , . . . , uMz −1 }, are revealed to the encoder and to both decoders. We usually omit the dependence on n from the notation of the code, and use C and Cm , for short. For any of the following described decoding rules, denote by [m̂(y), î(y)] the decoded pair of the strong user, and by m̃(z) the decoded cloud of the weak user. The ML decoder for the strong user is given by [m̂(y), î(y)] = arg max W1 (y|xmi ), (9) 0≤m≤Mz −1,0≤i≤My −1 and the optimal ML decoder for the weak user (the bin index decoder) is given by m̃(z) = arg max W2 (z|Cm ), (10) 0≤m≤Mz −1 where ∆ W2 (z|Cm ) = My −1 1 X 1 X W2 (z|x) = W2 (z|xmi ). My My i=0 x∈Cm (11) The likelihood decoder is a stochastic decoder, that chooses the decoded message according to the posterior probability mass function, induced by the channel output (either y or z). For the strong user, the ordinary likelihood decoder randomly selects the estimated message (m̂, î) 7 according to the following posterior distribution n o W1 (y|xmi ) Pr m̂ = m, î = i y = PM −1 PMy −1 . z 0 i0 ) W (y|x 0 0 1 m m =0 i =0 (12) The generalized likelihood decoder (GLD) for the strong user is defined by n o exp{ngs (P̂um xmi y )} , Pr m̂ = m, î = i y = PM −1 PMy −1 z m0 =0 i0 =0 exp{ngs (P̂um0 xm0 i0 y )} (13) where P̂um xmi y is the empirical distribution of (um , xmi , y), and gs (·) is a given continuous, real valued functional of this empirical distribution. In the same manner, the ordinary likelihood decoder for the weak user randomly selects the estimated cloud m̃ according to PMy −1 W2 (z|xmi ) Pr {m̃ = m|z} = PM −1i=0 , PMy −1 z 0 i0 ) W (z|x 0 0 2 m m =0 i =0 (14) while the GLD for the weak user is defined by PMy −1 exp{ngw (P̂um xmi z )} . Pr {m̃ = m|z} = PM −1i=0 P M −1 y z m0 =0 i0 =0 exp{ngw (P̂um0 xm0 i0 z )} (15) Exactly as the universal decoders derived in [6], generalized decoders may also depend on the cloud–centers, which may be helpful, since all of the codewords in each sub–code are highly correlated via their cloud–center. One of the most important properties of the GLD is the following. The union bound, which is used in the first steps of the derivations for both users, actually provides an exact expression for the probability of error, unlike in the analyses of the ML decoders, where the union bound harms the exponential tightness, at least for relatively high rates. The generalized likelihood decoders cover several important special cases for the strong user. The choice gs (P̂um xmi y ) = X P̂um xmi y (u, x, y) log W1 (y|x) = u,x,y X P̂xmi y (x, y) log W1 (y|x) (16) x,y corresponds to the ordinary likelihood decoder. More generally, one may introduce an “inverse temperature” parameter β ≥ 0 and define gs (P̂um xmi y ) = β X P̂xmi y (x, y) log W1 (y|x). x,y 8 (17) Here, β controls the degree of skewedness of the distribution (13): while β = 1 corresponds to the ordinary likelihood decoder, β → ∞ leads to the deterministic ML decoder. In the same manner, gs (P̂um xmi y ) = β X P̂xmi y (x, y) log W 0 (y|x), (18) x,y for W 0 being different from W1 , defines a family of mismatched likelihood decoders. Yet another interesting choice is gs (P̂um xmi y ) = β Iˆum xmi y (U X; Y ), (19) which is a parametric family of stochastic mutual information decoders, where the limit of β → ∞ yields the ordinary maximum mutual information (MMI) universal decoder [14]. Similarly for the weak user, the choice gw (P̂um xmi z ) = X P̂xmi z (x, z) log W2 (z|x) (20) x,z corresponds to the ordinary likelihood decoder for the weak user. From now on, we will assume that gs (·) and gw (·) are the same functional, and denote both of them by g(·). Let Y ∈ Y n and Z ∈ Z n be the random channel outputs resulting from the transmission of xmi . For a given code C(n), define the error probabilities as n o Pe|mi (C(n)) = Pr [m̂(Y ), î(Y )] 6= (m, i) xmi sent , (21) My −1 1 X Pe|m (C(n)) = Pr {m̃(Z) 6= m|xmi sent} , My (22) and i=0 where in both definitions, Pr{·} designates the probability measure associated with the randomness of the channel outputs given its input, and the (possibly) stochastic decoder. Moreover, the error probabilities are defined to be zero whenever the blocklength is such that no code can be generated. Our main objective is to prove the existence of sequences of HCC codes and obtain the tightest possible single–letter expressions that lower bound the following limits   log maxm,i Pe|mi (C(n)) Esu (Ry , Rz ) = lim inf − , (23) n→∞ n 9 and  log maxm Pe|m (C(n)) Ewu (Ry , Rz ) = lim inf − , n→∞ n  (24) both for the ML decoder and the GLD. In a recent paper [6], exact random coding error exponents have been derived for both users of the ABC. We may expect to improve these error exponents, at least when one of the coding rates is low, by code expurgation. In this paper, we derive expurgated exponents for the ABC under ML decoding in two different methods. In addition, we discuss the GLD, that enables us to achieve the best between the random coding bound and one of the ML–based expurgated bounds. 4 Main Results For maximum likelihood decoding, we distinguish between two different methods of expurgation for the HCC ensemble. The first methodology is based on the following technique of expurgation: we randomly draw a HCC codebook, and then simultaneously expurgate both bad clouds and bad codewords within the remaining clouds. The resulting expurgated bounds are given in Theorem 1, which is proved in Section 5. A full discussion of the first two theorems follows the second theorem. In order to state our first theorem, we start with the following definitions. We define the following sets of distributions ∆  S = QU XX 0 : QU X 0 = QU X = PU X , ∆  P = QU U 0 XX 0 : QU 0 X 0 = QU X = PU X . For a general channel W , we define the averaged Chernoff distance function by   X X ∆ W 1−s (y|x) · W s (y|x0 ) , Ds (QXX 0 ) = − QXX 0 (x, x0 ) log  (x,x0 )∈X 2 (25) (26) (27) y∈Y where in the following, we choose W = W1 or W = W2 , depending on the user we are relating to. For the weak user, define an error exponent function as ∆ ML1 Ewu (Ry , Rz ) = max 0≤t≤1 min QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )≤2Ry +Rz   IQ (U X; U 0 X 0 ) + Dt (QXX 0 ) − Ry − Rz . 10 (28) Next, for the strong user we define the following error exponent functions ∆ ML1 Esu-1 (Ry , s) = QU XX 0 ∈S IQ (X;X 0 |U )≤Ry ∆ ML1 Esu-2 (Ry , Rz , s) =  min  IQ (X; X 0 |U ) + Ds (QXX 0 ) − Ry , min QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )≤Ry +Rz   IQ (U X; U 0 X 0 ) + Ds (QXX 0 ) − Ry − Rz , ∆ ML1 ML1 ML1 Esu (Ry , Rz ) = max min {Esu-1 (Ry , s), Esu-2 (Ry , Rz , s)} . 0≤s≤1 (29) (30) (31) Theorem 1. There exists a sequence of HCC codes, {C(n), n = 1, 2, . . . }, with a rate pair (Ry , Rz ) for which both   log maxm,i Pe|mi (C(n)) ML1 lim inf − ≥ Esu (Ry , Rz ), n→∞ n (32)  log maxm Pe|m (C(n)) ML1 lim inf − ≥ Ewu (Ry , Rz ). n→∞ n (33) and  The second method is somewhat different, and the idea behind it is the following. At the first step, we expurgate sub–codes, merely according to their cloud–centers. Then, at the second step, we fix the set of cloud–centers of the remaining clouds from the first step, and then expurgate specific codewords, as well as clouds, according to some collective behavior of their codewords. The resulting expurgated bounds are given in Theorem 2, and as can be seen below, the expressions are more complicated than those of Theorem 1, at least for the weak user. The proof can be found in Section 6. In order to state our second theorem, we need a few definitions. For a given marginal QU Z , let S(QU Z ) denote the set of conditional distributions {QX|U Z } P such that z QU Z (u, z)QX|U Z (x|u, z) = PU X (u, x) for every (u, x) ∈ U × X , where PU X = PU × PX|U . We denote t̄ = 1 − t. For the weak user, define ∆ D̂t (Ry , QU U 0 ) = min min min QZ|U U 0 QX|U Z ∈S(QU Z ) QX 0 |U 0 Z ∈S(QU 0 Z ) n t̄ · D(QZ|U X kWZ|X |QU X ) + t · D(QZ|U 0 X 0 kWZ|X 0 |QU 0 X 0 ) o + t̄ · IQ (Z; U 0 |U ) + t · IQ (Z; U |U 0 ) + t · [IQ (X; Z|U ) − Ry ]+ + t̄ · [IQ (X 0 ; Z|U 0 ) − Ry ]+ . (34) We define the following set of distributions ∆  Q = QU U 0 : QU = QU 0 = PU , 11 (35) and an error exponent function ∆ ML2 Ewu (Ry , Rz ) = max 0≤t≤1 min QU U 0 ∈Q IQ (U ;U 0 )≤Rz   IQ (U ; U 0 ) + D̂t (Ry , QU U 0 ) − Rz . (36) Next, for the strong user we define the following error exponent functions ∆ ML2 Esu-1 (Ry , s) = ∆ ML2 Esu-2 (Ry , Rz , s) = min QU XX 0 ∈S IQ (X;X 0 |U )≤Ry min QU U 0 XX 0 ∈P IQ (U ;U 0 )≤Rz   IQ (X; X 0 |U ) + Ds (QXX 0 ) − Ry ,   IQ (U X; U 0 X 0 ) + Ds (QXX 0 ) − Ry − Rz , ∆ ML2 ML2 ML2 Esu (Ry , Rz ) = max min {Esu-1 (Ry , s), Esu-2 (Ry , Rz , s)} . 0≤s≤1 (37) (38) (39) Theorem 2. There exists a sequence of HCC codes, {C(n), n = 1, 2, . . . }, with a rate pair (Ry , Rz ) for which both  log maxm,i Pe|mi (C(n)) ML2 lim inf − ≥ Esu (Ry , Rz ), n→∞ n (40)  log maxm Pe|m (C(n)) ML2 ≥ Ewu (Ry , Rz ). lim inf − n→∞ n (41)  and  Discussion First, all of the expressions in Theorems 1 and 2 generalize the well–known CKM expurgated ML1 bound [7]. For example, it can be easily recovered from the expression Ewu (Ry , Rz ) of Theorem 1, when degenerating the hierarchical codebook by choosing Ry = 0, as well as PX|U (x|u) = δ(x − u) (assuming that X = U), in order to get back to the CKM expurgated bound. Concerning the strong user, each bound is given by the minimum between two different expressions. The first expression is related to error events within the cloud of the true codeML1 ML2 word. In fact, we have that Esu-1 (Ry , s) = Esu-1 (Ry , s), where the difference is given by the ML1 ML2 second components, Esu-2 (Ry , Rz , s) and Esu-2 (Ry , Rz , s), for which the method of expurgation is relevant and cause a change in the final expressions. Although the objectives in (30) and (38) are exactly the same, the constraints are different, and are not subsets of one another. Concerning the weak user, the situation is much more complicated, because of the structure of the optimal decoder. The derivation in the proof of Theorem 1 contains a passage [(68) 12 to (69)] that may harm the exponential tightness of the result. Specifically, we use the PD inequality over the sums that stems from the definition of the optimal decoder, i.e.,  1−t  t y −1 y −1  1 MX   1 MX  W2 (z|xmi ) W2 (z|xm0 j )  My   My  i=0 (42) j=0 My −1 My −1 ≤ 1 X X W21−t (z|xmi ) · W2t (z|xm0 j ), My i=0 (43) j=0 and therefore, the resulting bound of Theorem 1 is, in fact, a natural generalization of the classical single–user expurgated bound, which only depends on the Chernoff distance between pairs of codewords. Because of this passage, the bound of Theorem 1 is inferior to the bound of Theorem 2, at relatively high values of Ry . However, the resulting exponent of Theorem 1 still outperforms the result of Theorem 2, at least for relatively low Ry values (see Fig. 1). The reason for the bound of Theorem 2 to be inferior at relatively low rates is because of the remaining parts of the two proofs. While both proofs use Markov’s inequality in order to show the existence of good codebooks, some logical arguments that can only be claimed in the proof of Theorem 1 provide tighter upper bounds. More specifically, the proof of Theorem 1 relies merely on type–class enumerators, which takes only integer values. It is shown that there exists codebooks, for which those enumerators must equal to zero in some range of relatively low rates. On the other hand, the proof of Theorem 2 relies on some more complicated quantities, that are not necessarily integer–valued, and hence, they cannot be assured to be equal to zero at any range of rates. Since the derivation in the proof of Theorem 2 is exponentially tight after the first two steps, and does not compromise on the optimal decoders (as Theorem 1 does in the passage we mentioned above), it provides a better result at relatively high Ry . Specifically, the expression given in Theorem 2 reaches a plateau at high Ry , while the expression of Theorem 1 reaches zero. One should note that the improvement at high rates is obtained by expressions which are more complicated to compute. We next provide some numerical results, comparing our expurgated bounds for the weak user (Fig. 1) and for the strong user (Fig. 2), as given by Theorems 1 and 2. Let W1 and W2 be two binary symmetric channels (BSCs) with crossover parameters py and pz , respectively (pz > py ). Let U be binary as well and let PU be uniformly distributed over {0, 1}. Also, let PX|U be a BSC with crossover parameter px|u = 0.15. Let us choose the channel probabilities to be pz = 0.001 and py = 0.0005. 13 Figure 1: Expurgated bounds for the weak user (Rz = 0). ML1 (Ry , s), which In Fig. 2, the orange (dot-dashed) curve describes the expression of Esu-1 is common in both exponents. As can be seen, each of the two exponents is dominated by this expression at relatively high sattelite rates. Note that at least for this specific example, ML1 ML2 Esu (Ry , Rz ) is higher than Esu (Ry , Rz ) at any pair of coding rates. Figure 2: Expurgated bounds for the strong user (Rz = 0.2). 14 We now move on to the GLD. As was already mentioned earlier, the GLD enables us to make a tighter derivation for the probability of error, and therefore, the resulting expurgated bounds are strictly tighter, at least at relatively high rates. The drawback of the expressions of Theorem 3 is that they are quite cumbersome, at least when compared to those of Theorems 1 or 2. In order to characterize the expurgated bounds of the GLD, we define first a few quantities. Let φ(Ry , QU Y ) = [g(Q) − IQ (X; Y |U )] + Ry , max (44) {QX|U Y : IQ (X;Y |U )≤Ry } and ψ(Ry , Rz , QY ) = [g(Q) − IQ (U X; Y )] + Rz + Ry . max {QU X|Y : IQ (U ;Y )≤Rz , IQ (U X;Y )≤Rz +Ry } (45) Also, define  Υ(QU XX 0 , Ry , Rz ) = min QY |U XX 0 D(QY |U X kWY |X |QU X ) + IQ (X 0 ; Y |U X) h i  + max g(QU XY ), φ(Ry , QU Y ), ψ(Ry , Rz , QY ) − g(QU X 0 Y ) +  , (46) and  Ω(Q U U 0 XX 0 , Ry , Rz ) = min QY |U U 0 XX 0 D(QY |U X kWY |X |QU X ) + IQ (U 0 X 0 ; Y |U X) i   0 0 + max g(QU XY ), φ(Ry , QU Y ), ψ(Ry , Rz , QY ) − g(QU X Y ) . (47) h + We define the following error exponent functions. For the weak user, ∆ GLD Ewu (Ry , Rz ) = min QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )<2Ry +Rz , IQ (U ;U 0 )<Rz [IQ (U X; U 0 X 0 ) + Ω(Q, Ry , Rz )] − Ry − Rz , (48) and for the strong user ∆ GLD Esu-1 (Ry , Rz ) = ∆ GLD Esu-2 (Ry , Rz ) = min QU XX 0 ∈S IQ (X;X 0 |U )<Ry min [IQ (X; X 0 |U ) + Υ(Q, Ry , Rz )] − Ry , QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )<Ry +Rz , IQ (U X;U 0 )<Rz [IQ (U X; U 0 X 0 ) + Ω(Q, Ry , Rz )] − Ry − Rz , ∆ GLD GLD GLD Esu (Ry , Rz ) = min {Esu-1 (Ry , Rz ), Esu-2 (Ry , Rz )} . 15 (49) (50) (51) Theorem 3. There exists a sequence of HCC codes, {C(n), n = 1, 2, . . . }, with a rate pair (Ry , Rz ) for which both  log maxm,i Pe|mi (C(n)) GLD lim inf − ≥ Esu (Ry , Rz ), n→∞ n (52)  log maxm Pe|m (C(n)) GLD lim inf − ≥ Ewu (Ry , Rz ). n→∞ n (53)  and  Discussion • An expurgated bound for the GLD in the single user regime has been derived by Merhav [13]. It should be noticed that the resulting expressions of Theorem 3, as well as some parts of its proof (in Section 7) are direct generalizations of the single–user case. In those cases, we will omit some parts of the proof that highly resemble those in [13]. • The expression of eq. (48) has the same structure as the bound given in Theorem 1, except that here the functional Ω(Q, Ry , Rz ) replaces the expected Chernoff distance, and an additional constraint (IQ (U ; U 0 ) < Rz ) has been added. We prove in Appendix A that at least GLD for the choice g(Q) = EQ log W2 (Z|X), the expurgated bound of Theorem 3, Ewu (Ry , Rz ), is ML1 at least as tight as the bound of Theorem 1, Ewu (Ry , Rz ). • One of the main advantages of the GLD, is the fact that the derivation of its probability of error may be exponentially tighter than the derivations in the proofs of Theorems 1 or 2, because its circumvents the use of the union bound in the proofs of Theorems 1 and 2 [eqs. GLD (55)–(56)]. As a consequence, we show in Appendix B that Ewu (Ry , Rz ) cannot be smaller than the random coding error exponent of the weak user at any pair of rates, by examining the former for the suboptimal GLD based on the universal metric g(Q) = IQ (U X; Z). We conclude GLD ML1 that Ewu (Ry , Rz ) is at least as tight as the maximum between Ewu (Ry , Rz ) and the random coding error exponent, Ew (Ry , Rz ). GLD • The same can be proved for the strong user, i.e., that Esu (Ry , Rz ) is at least as tight ML1 as the maximum between Esu (Ry , Rz ) and the random coding error exponent, Es (Ry , Rz ). We conclude, that there exist a HCC codebook, for which one user works in the “expurgated region” (slope greater than 1), while the other user works in the “random coding region” (slope smaller than 1). For example, it may be the case when the channel to the strong user is quite clean, while the channel to the weak user is very noisy, compared to the required rates. 16 • Keeping in mind the discussion after Theorem 2, it is now clear that the expurgated bound GLD ML2 for the weak user of Theorem 3, Ewu (Ry , Rz ), is strictly tighter than the bound Ewu (Ry , Rz ) ML1 of Theorem 2, at relatively low rates, and is strictly tighter than the bound Ewu (Ry , Rz ) of Theorem 1, at relatively high rates. However, we were not able to determine whether GLD ML2 Ewu (Ry , Rz ) is at least as tight as Ewu (Ry , Rz ) of Theorem 2, at relatively high rates. In other words, it is not clear whether the bound of Theorem 3 is at least as tight as the maximum between the bounds of the first two theorems, although we conjecture that it is indeed the case when choosing one of the decoding metrics g(Q) = βEQ log W2 (Z|X) or g(Q) = βIQ (U X; Z), and letting β → ∞. 5 Proof of Theorem 1 The proof has three main parts: In part 1, we upper bound the error probabilities and express each one of them using suitable type-class enumerators. In part 2, which is the main step of the proof, we show the existence of an hierarchical codebook for which these enumerators are upper bounded by specific deterministic functions of information measures. In part 3, we put back these deterministic bounds in order to get the desired results. 5.1 Part 1 We define the Chernoff distance between the codewords x and x0 by (W = W1 or W = W2 )   X ∆ ds (x, x0 ) = − log  W 1−s (y|x) · W s (y|x0 ) . (54) y For the strong user, we have the following upper bound for any s ∈ [0, 1]    n o X [ Pe|mi (C) = W1 (y|xmi ) · I W1 (y|xm0 j ) ≥ W1 (y|xmi )  0  y (m ,j)6=(m,i)  s X UB X W1 (y|xm0 j )  ≤ W1 (y|xmi ) ·  W1 (y|xmi ) y (m0 ,j)6=(m,i) P s PD X (m0 ,j)6=(m,i) W1 (y|xm0 j ) ≤ W1 (y|xmi ) · W1s (y|xmi ) y X X = W11−s (y|xmi ) · W1s (y|xm0 j ) (m0 ,j)6=(m,i) y 17 (55) (56) (57) (58) X =  exp −ds (xmi , xm0 j ) (59) (m0 ,j)6=(m,i) = X exp {−ds (xmi , xmj )} +  exp −ds (xmi , xm0 j ) (60) m0 6=m j=0 j6=i X = y −1 X MX IN Nmi (QU XX 0 , C) · e−nDs (QXX 0 ) QU XX 0 ∈S X + OUT Nmi (QU U 0 XX 0 , C) · e−nDs (QXX 0 ) , (61) QU U 0 XX 0 ∈P IN where Nmi (QU XX 0 , C) denotes the number of codewords xmj ∈ Cm , for any j 6= i, such that the joint empirical distribution of xmj with (um , xmi ) is QU XX 0 , that is IN Nmi (QU XX 0 , C) = o X n I (um , xmi , xmj ) ∈ T (QU XX 0 ) , (62) j6=i OUT and Nmi (QU U 0 XX 0 , C) denotes the number of pairs (um0 , xm0 j ), xm0 j ∈ Cm0 , for any m0 6= m, such that the joint empirical distribution of them with (um , xmi ) is QU U 0 XX 0 , that is y −1 n o X MX I (um , xmi , um0 , xm0 j ) ∈ T (QU U 0 XX 0 ) . OUT Nmi (QU U 0 XX 0 , C) = m0 6=m (63) j=0 For the weak user, we have for any t ∈ [0, 1] Pe|m (C) = UB ≤ 1 My 1 My    [ n o W2 (z|xmi ) · I W2 (z|Cm0 ) ≥ W2 (z|Cm )  0  i=0 z m 6=m t  My −1 X X X W2 (z|Cm0 )  W2 (z|xmi ) ·  W (z|C ) 2 m 0 z My −1 X X (64) (65) m 6=m i=0 P My −1 t 1 X X m0 6=m W2 (z|Cm0 ) ≤ W2 (z|xmi ) · My W2t (z|Cm ) i=0 z X X = W21−t (z|Cm ) · W2t (z|Cm0 ) m0 6=m z 1−t  t   y −1 y −1   1 MX  X X  1 MX  = W2 (z|xmi ) W2 (z|xm0 j )   My   My  0 z PD m 6=m PD ≤ i=0 i=0 (67) (68) j=0 y −1 My −1 X X 1 MX X W21−t (z|xmi ) · W2t (z|xm0 j ) M y 0 z m 6=m (66) (69) j=0 My −1 My −1 = 1 X X X X 1−t W2 (z|xmi ) · W2t (z|xm0 j ) My 0 m 6=m i=0 j=0 z 18 (70) My −1 My −1  1 X X X = exp −dt (xmi , xm0 j ) My 0 m 6=m i=0 = 1 My X (71) j=0 N̂m (QU U 0 XX 0 , C)e−nDt (QXX 0 ) , (72) QU U 0 XX 0 ∈P where N̂m (QU U 0 XX 0 , C) denotes the number of triplets (um0 , xmi , xm0 j ), xmi ∈ Cm , xm0 j ∈ Cm0 , for any m0 6= m, such that the joint empirical distribution of them with um is QU U 0 XX 0 , that is N̂m (QU U 0 XX 0 , C) = y −1 My −1 n o X MX X I (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ) . m0 6=m i=0 (73) j=0 Remark: It is important to notice that the main weakness of this derivation is the passage between (68) and (69), where we are using the PD inequality over the two exponential sums of sizes My , but in spite of that, the resulting exponent is still higher at relatively low coding rates, as can be seen in Fig. 1. 5.2 Part 2 At this part we prove the existence of codebooks with prescribed upper bounds on the enumerators. The main idea here is that for every  > 0 and all sufficiently large n, there exists a code C with a rate pair (Ry , Rz ), that satisfies, for every codeword (m, i) and every QU U 0 XX 0 , IN ∗ Nmi (QU XX 0 , C) ≤ NIN (QU XX 0 ) n o ( exp n[Ry − IQ (X; X 0 |U ) + ] ∆ = 0 Ry ≥ IQ (X; X 0 |U ) −  (74) Ry < IQ (X; X 0 |U ) − , and OUT ∗ Nmi (QU U 0 XX 0 , C) ≤ NOUT (QU U 0 XX 0 ) n o ( exp n[Ry + Rz − IQ (U X; U 0 X 0 ) + ] ∆ = 0 Ry + Rz ≥ IQ (U X; U 0 X 0 ) −  (75) Ry + Rz < IQ (U X; U 0 X 0 ) − , and furthermore, for every cloud m and every QU U 0 XX 0 , N̂m (QU U 0 XX 0 , C) ≤ N̂ ∗ (QU U 0 XX 0 ) n o ( exp n[2Ry + Rz − IQ (U X; U 0 X 0 ) + ] ∆ = 0 19 2Ry + Rz ≥ IQ (U X; U 0 X 0 ) −  2Ry + Rz < IQ (U X; U 0 X 0 ) −  . (76) To show this, we first compute ensemble averages. Define ∆ N̂ (QU U 0 XX 0 , C) = Mz −1 1 X N̂m (QU U 0 XX 0 , C), Mz (77) m=0 y −1 M z −1 M X X 1 IN N (QU XX 0 , C) = Nmi (QU XX 0 , C), My Mz ∆ IN (78) m=0 ∆ N OUT (QU U 0 XX 0 , C) = i=0 Mz −1 My −1 X X 1 OUT Nmi (QU U 0 XX 0 , C). My Mz m=0 (79) i=0 For the weak user, we have that E{N̂ (Q U U 0 XX 0 Mz −1 1 X E{N̂m (QU U 0 XX 0 , C)} , C)} = Mz (80) m=0 = E{N̂0 (QU U 0 XX 0 , C)}  = (Mz − 1) · My2 · Pr (U , U 0 , X, X 0 ) ∈ T (QU U 0 XX 0 ) |T (QU U 0 XX 0 )| = (Mz − 1) · My2 · |T (PU )|2 · |T (PX|U )|2 exp{nHQ (U, U 0 , X, X 0 )} . = (Mz − 1) · My2 · ) e2nH(U ) · e2nH(X|U n o = exp n[2Ry + Rz − IQ (U X; U 0 X 0 )] . (81) (82) (83) (84) (85) Similarly, for the strong user, we have that y −1 M z −1 M X X  IN 1 E{N (QU XX 0 , C)} = E Nmi (QU XX 0 , C) M y Mz m=0 i=0 n o . 0 = exp n[Ry − IQ (X; X |U )] , IN (86) (87) and E{N OUT (Q U U 0 XX 0 y −1 M z −1 M X X  OUT 1 E Nmi (QU U 0 XX 0 , C) , C)} = My M z m=0 i=0 n o . = exp n[Ry + Rz − IQ (U X; U 0 X 0 )] . It then follows that    o [ n Pr C : N̂ (QU U 0 XX 0 , C) > E{N̂ (QU U 0 XX 0 , C)} · en/2   QU U 0 XX 0   o [ [ n N IN (QU XX 0 , C) > E {N IN (QU XX 0 , C)} · en/2   QU XX 0 20 (88) (89)  [ UB ≤  n o N OUT (QU U 0 XX 0 , C) > E {N OUT (QU U 0 XX 0 , C)} · en/2   QU U 0 XX 0 n o X Pr C : N̂ (QU U 0 XX 0 , C) > E{N̂ (QU U 0 XX 0 , C)} · en/2 [ (90) QU U 0 XX 0 o n Pr C : N IN (QU XX 0 , C) > E {N IN (QU XX 0 , C)} · en/2 X + QU XX 0 n o Pr C : N OUT (QU U 0 XX 0 , C) > E {N OUT (QU U 0 XX 0 , C)} · en/2 X + (91) QU U 0 XX 0 MI ≤ X e−n/2 + QU U 0 XX 0 X e−n/2 + QU XX 0 ≤ 3 · (n + 1) |U |2 ·|X |2 ·e −n/2 X e−n/2 (92) QU U 0 XX 0 → 0, (93) which means that with high probability Mz −1 1 X 0 0 N̂m (QU U 0 XX 0 , C) ≤ en[2Ry +Rz −IQ (U X;U X )+/2] ∀QU U 0 XX 0 , Mz 1 My Mz m=0 y −1 M −1 z X MX IN Nmi (QU XX 0 , C) ≤ en[Ry −IQ (X;X 0 |U )+/2] ∀QU XX 0 , (94) (95) m=0 i=0 Mz −1 My −1 X X 1 0 0 OUT Nmi (QU U 0 XX 0 , C) ≤ en[Ry +Rz −IQ (U X;U X )+/2] ∀QU U 0 XX 0 . My M z m=0 (96) i=0 For a given such code and every given QU U 0 XX 0 , there must exist at least (1 − 3e−n/2 ) · Mz values of m and at least (1 − 3e−n/2 ) · My Mz pairs (m, i) such that N̂m (QU U 0 XX 0 , C) ≤ en[2Ry +Rz −IQ (U X;U IN Nmi (QU XX 0 , C) ≤ en[Ry −IQ (X;X 0 X 0 )+] 0 |U )+] OUT Nmi (QU U 0 XX 0 , C) ≤ en[Ry +Rz −IQ (U X;U , , (97) (98) 0 X 0 )+] . (99) Upon eliminating the exceptional clouds and exceptional codewords from the code, for all QU U 0 XX 0 , we end up with at least [1 − 3(n + 1)|U | 3(n + 1)|U | 2 ·|X |2 2 ·|X |2 · e−n/2 ] · Mz clouds and at least [1 − · e−n/2 ] · My Mz codewords for which N̂m (QU U 0 XX 0 , C) ≤ en[2Ry +Rz −IQ (U X;U IN Nmi (QU XX 0 , C) ≤ en[Ry −IQ (X;X 0 |U )+] OUT Nmi (QU U 0 XX 0 , C) ≤ en[Ry +Rz −IQ (U X;U 21 0 X 0 )+] ∀QU U 0 XX 0 , ∀QU XX 0 , 0 X 0 )+] ∀QU U 0 XX 0 . (100) (101) (102) Let C 0 denote the sub-code formed by these [1 − 3(n + 1)|U | and [1 − 3(n + 1)|U | 2 ·|X |2 2 ·|X |2 · e−n/2 ] · Mz remaining clouds · e−n/2 ] · My Mz remaining codewords. Since N̂m (QU U 0 XX 0 , C 0 ) ≤ IN IN OUT OUT N̂m (QU U 0 XX 0 , C), Nmi (QU XX 0 , C 0 ) ≤ Nmi (QU XX 0 , C) and Nmi (QU U 0 XX 0 , C 0 ) ≤ Nmi (QU U 0 XX 0 , C), then the sub-code certainly satisfies N̂m (QU U 0 XX 0 , C 0 ) ≤ en[2Ry +Rz −IQ (U X;U IN Nmi (QU XX 0 , C 0 ) ≤ en[Ry −IQ (X;X 0 X 0 )+] 0 |U )+] OUT Nmi (QU U 0 XX 0 , C 0 ) ≤ en[Ry +Rz −IQ (U X;U ∀m, QU U 0 XX 0 , ∀(m, i), QU XX 0 , 0 X 0 )+] (103) (104) ∀(m, i), QU U 0 XX 0 . (105) Finally, observe that since N̂m (QU U 0 XX 0 , C 0 ) is a non-negative integer, then for QU U 0 XX 0 with 2Ry + Rz − IQ (U X; U 0 X 0 ) +  < 0, the inequality of (103) means N̂m (QU U 0 XX 0 , C 0 ) = 0, in which case the right hand side of (103) becomes N̂ ∗ (QU U 0 XX 0 ), and similarly for (104) with ∗ ∗ (Q NIN U XX 0 ) and for (105) with NOUT (QU U 0 XX 0 ). Thus, we have shown that there exists a code C 0 consisting of [1−3(n+1)|U | 2 ·|X |2 ·e−n/2 ]·enRz clouds and [1−3(n+1)|U | 2 ·|X |2 ·e−n/2 ]·en(Ry +Rz ) codewords, for which all clouds satisfy N̂m (QU U 0 XX 0 , C 0 ) ≤ N̂ ∗ (QU U 0 XX 0 ), and all codewords IN ∗ (Q OUT 0 ∗ satisfy Nmi (QU XX 0 , C 0 ) ≤ NIN U XX 0 ) and Nmi (QU U 0 XX 0 , C ) ≤ NOUT (QU U 0 XX 0 ) for all joint types QU U 0 XX 0 . Since there are at least 21 ·enRz clouds in C 0 (we take the factor of one half just for simplicity), and at least 1 2 · en(Rz +Ry ) codewords, then we conclude that at least 1 4 · enRz clouds contain at least 14 · enRy codewords each. Thus, we can eliminate some more clouds and codewords in order to obtain a codebook, for which each cloud contains exactly the same number of codewords. 5.3 Part 3 As a consequence of the above observation, we have seen the existence of a code C 0 for which max Pe|m (C 0 ) m X ≤ e−nRy  N̂ ∗ (QU U 0 XX 0 ) exp − nDt (QXX 0 ) (106) QU U 0 XX 0 ∈P X = e−nRy  exp n[2Ry + Rz − IQ (U X; U 0 X 0 ) − Dt (QXX 0 ) + ] (107) QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )≤2Ry +Rz + = X  exp n[Ry + Rz − IQ (U X; U 0 X 0 ) − Dt (QXX 0 ) + ] , QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )≤2Ry +Rz + 22 (108) as well as max Pe|mi (C 0 ) m,i X ∗ ≤ NIN (QU XX 0 ) · e−nDs (QXX 0 ) + QU XX 0 ∈S ∗ NOUT (QU U 0 XX 0 ) · e−nDs (QXX 0 ) (109) QU U 0 XX 0 ∈P n o exp n[Ry − IQ (X; X 0 |U ) − Ds (QXX 0 ) + ] X = X QU XX 0 ∈S IQ (X;X 0 |U 0 )≤Ry + n o exp n[Ry + Rz − IQ (U X; U 0 X 0 ) − Ds (QXX 0 ) + ] , X + (110) QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )≤Ry +Rz + and due to the arbitrariness of  > 0, this means that there exists a sequence of codes with a rate pair (Ry , Rz ) for which (32) and (33) hold. This completes the proof of Theorem 1. 6 Proof of Theorem 2 As we explained in Section 4, the expurgation of an hierarchical codebook can be done in two stages. In part 1, we concentrate only on the cloud-centers, and discard a negligible amount of them in order to have a good set, where by “good” we mean that some specific structural properties are ensured to be valid. Then, we fix the set of cloud-centers, and move to the second stage, where we continue to expurgate clouds, as well as codewords, in order to obtain a complete codebook, for which some additional properties are assured. More specifically, in part 2, we upper bound the error probabilities and express each one of them using suitable quantities. Part 3 is rather technical and contains the derivations of the ensemble averages. In part 4, which is the main step of the proof, we show the existence of an hierarchical codebook, for which these quantities are upper bounded by specific deterministic functions of information measures of the fixed cloud centers. In the final part, we put back these deterministic bounds in order to get the desired results. 6.1 Part 1 Let Nm (QU U 0 , C) denote the number of cloud centers um0 , for any m0 6= m, such that the joint empirical distribution of um0 with um is QU U 0 , that is Nm (QU U 0 , C) = X n o I (um , um0 ) ∈ T (QU U 0 ) . m0 6=m 23 (111) As in proof of Theorem 1, one can easily prove that for every  > 0 and all sufficiently large n, there exists a code C (cloud-centers) with a rate Rz (essentially), that satisfies, for every cloud m and every QU U 0 , Nm (QU U 0 , C) ≤ N ∗ (QU U 0 ) n o ( exp n[Rz − IQ (U ; U 0 ) + ] ∆ = 0 Rz ≥ IQ (U ; U 0 ) −  Rz < IQ (U ; U 0 ) − . (112) Although the proof is omitted here, one important point should be noticed. It is shown that  2 ∆  there exists a code C 0 consisting of Mz0 = 1 − (n + 1)|U | · e−n/2 · Mz clouds, for which all of them satisfy Nm (QU U 0 , C 0 ) ≤ N ∗ (QU U 0 ) for all joint types QU U 0 , and hence, we stick with Mz0 , instead of the original size of Mz . From now on, we assume without loss of generality that M 0 −1 {ul }l=0z is the set of cloud centers for which this property holds. Now, let us continue to the second stage of expurgation. 6.2 Part 2 In order to continue, we need a few definitions. First, define the average log–likelihood f (QXZ ) = 1 log W2 (z|x) = n X QXZ (x, z) log W2 (z|x), (113) (x,z)∈X ×Z where QXZ is understood to be the joint empirical distribution of (x, z) ∈ X n × Z n , and let    R − I (X; Z|U ) Ry ≥ IQ (X; Z|U ) ∆ y Q ·t E0 (Ry , QU XZ , t) =  . (114) Ry − IQ (X; Z|U ) Ry < IQ (X; Z|U ) Next, define ∆ E1 (Ry , QU Z , t) = max QX|U Z ∈S(QU Z ) [E0 (Ry , QU XZ , t) + tf (QXZ )] , (115) and furthermore, let   ∆ B(Ry , t, QU U 0 ) = max HQ (Z|U, U 0 ) + E1 (Ry , QU Z , 1 − t) + E1 (Ry , QU 0 Z , t) . QZ|U U 0 (116) For the strong user, let us denote ∆ K(Ry , s, QU U 0 ) = max QXX 0 |U U 0   Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) − Ds (QXX 0 ) . 24 (117) For the weak user, we use the same upper bound that we have derived in (68): 1−t  t   My −1 y −1  MX  1 X X  X W2 (z|xm0 j )  . Pe|m (C) ≤ W2 (z|xmi )     My 0 j=0 i=0 m 6=m z (118) Let us further define 1−t  t   y −1 y −1 MX  MX  X ∆  W2 (z|xmi ) G(Cm , Cm0 ) = W2 (z|xm0 j )  ,     z i=0 j=0 (119) such that we can write in short Pe|m (C) ≤ 1 X G(Cm , Cm0 ), My 0 (120) m 6=m to emphasize here the difference from Theorem 1. The “price” for not using the upper bound P P ( i ai )t ≤ i ati is that we need to keep the channel output z. Next, for the strong user, we take the upper bound of (60) Pe|mi (C) ≤ X exp {−ds (xmi , xmj )} + m0 6=m j6=i X = y −1 X MX IN Nmi (QU XX 0 , C) · e  exp −ds (xmi , xm0 j ) (121) j=0 −nDs (QXX 0 ) + y −1 X MX  exp −ds (xmi , xm0 j ) , (122) m0 6=m j=0 QU XX 0 ∈S IN where Nmi (QU XX 0 , C) has already been defined in (62). We will prove in Part 4 that for every  > 0 and all sufficiently large n, there exists a code C 00 ⊆ C 0 with a rate pair (Ry , Rz ), that satisfies, for every codeword (m, i) and every QU XX 0 , IN ∗ Nmi (QU XX 0 , C 00 ) ≤ NIN (QU XX 0 ) n o ( exp n[Ry − IQ (X; X 0 |U ) + ] ∆ = 0 Ry ≥ IQ (X; X 0 |U ) −  Ry < IQ (X; X 0 |U ) − , (123) and y −1 X MX m0 6=m j=0 0 Mz −1 n o X 1 X 0 exp −ds (xmi , xm j ) ≤ 0 exp n[K(Ry , s, P̂um um0 ) + ] , Mz 0  (124) m=0 m 6=m and furthermore, for every cloud m, X m0 6=m Mz0 −1 n o X 1 X G(Cm , Cm0 ) ≤ 0 exp n[B(Ry , t, P̂um um0 ) + ] . Mz 0 m=0 m 6=m 25 (125) 6.3 Part 3 Now, we move to a rather technical part of calculating the conditional expectations (given the fixed set of cloud-centers) of the averages of the left-hand-sides of (123), (124) and (125). We start with the strong user. y −1 M z −1 M X X  IN 1 N (QU XX 0 ) = E Nmi (QU XX 0 , C) M y Mz ∆ IN (126) m=0 i=0 Mz −1 My −1 = X X  1 (My − 1) · Pr (X, X 0 ) ∈ T (QXX 0 |U |um ) M y Mz (127) X X |T (QXX 0 |U |um )| 1 (My − 1) · M y Mz |T (PX|U |um )|2 (128) m=0 i=0 Mz −1 My −1 = m=0 i=0 y −1 M z −1 M X X exp{nHQ (X, X 0 |U )} 1 (My − 1) · nH(X|U ) nH(X 0 |U ) M y Mz e e m=0 i=0 n o = exp n[Ry − IQ (X; X 0 |U )] . . = (129) (130) 0 m (Q Preparing to the next step, let us define the enumerator Nmi U U 0 XX 0 , C) to be the number of codewords xm0 j ∈ Cm0 , such that the joint empirical distribution of xm0 j with (um , um0 , xmi ) is QU U 0 XX 0 , where (um , um0 , xmi ) ∈ T (QU U 0 X ), that is My −1 m0 Nmi (QU U 0 XX 0 , C) = n o I (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ) . X (131) j=0 OUT Also note that Nmi (QU U 0 XX 0 , C) = m0 m0 6=m Nmi (QU U 0 XX 0 , C). P We have n o  m0 E Nmi (QU U 0 XX 0 , C) um , um0 , xmi = My · Pr X 0 ∈ T (QX 0 |U U 0 X |um , um0 , xmi ) = My · |T (QX 0 |U U 0 X |um , um0 , xmi )| |T (PX|U |um0 )| exp{nHQ (X 0 |U, U 0 , X)} . = My · enH(X 0 |U 0 ) n o = exp n[Ry − IQ (U X; X 0 |U 0 )] , such that we can evaluate the second expression of the strong user   y −1   X MX  0 M −1 E exp −ds (X mi , X m0 j ) {ul }l=0z  0  m 6=m j=0   y −1  X MX  0 M −1 = E exp −ds (X mi , X m0 j ) {ul }l=0z   0 m 6=m j=0 26 (132) (133) (134) (135) (136) X = m0 6=m X =    y −1 MX   0 M −1  E E exp −ds (xmi , X m0 j ) X mi , {ul }l=0z   (137) j=0 X X 1 |T (PX|U )| xmi ∈T (QX|U U 0 )   y −1 MX   0 M −1 ×E exp −ds (xmi , X m0 j ) xmi ∈ T (QX|U U 0 ), {ul }l=0z .   m0 6=m QX|U U 0 (138) j=0 For the conditional expectation in the last expression, we have the following   y −1  MX n o 0 Mz −1 0 exp − ds (xmi , X m j ) xmi ∈ T (QX|U U 0 ), {ul }l=0 E   j=0    X  0 M −1 m0 =E Nmi (QU U 0 XX 0 , C) · e−nDs (QXX 0 ) xmi ∈ T (QX|U U 0 ), {ul }l=0z   QX 0 |U U 0 X n o X m0 = E Nmi (QU U 0 XX 0 , C) um , um0 , xmi · e−nDs (QXX 0 ) (139) (140) (141) QX 0 |U U 0 X . = X n o exp n[Ry − IQ (U X; X 0 |U 0 )] · e−nDs (QXX 0 ) (142) QX 0 |U U 0 X ( ) . = exp n · max [Ry − IQ (U X; X 0 |U 0 ) − Ds (QXX 0 )] , QX 0 |XU U 0 and substituting it back into (138) gives   y −1  X MX   M 0 −1 E exp −ds (X mi , X m0 j ) {ul }l=0z  0  (143) (144) m 6=m j=0 . X = X X m0 6=m QX|U U 0 xmi ∈T (QX|U U 0 ) 1 |T (PX|U )| ) ( × exp n max [Ry − IQ (U X; X 0 |U 0 ) − Ds (QXX 0 )] QX 0 |XU U 0 ( ) X |T (QX|U U 0 )| 0 0 = · exp n · max [Ry − IQ (U X; X |U ) − Ds (QXX 0 )] QX 0 |XU U 0 |T (PX|U )| 0 m 6=m QX|U U 0 ( )   . X −nIQ (X;U 0 |U ) 0 0 = max e exp n · max Ry − IQ (U X; X |U ) − Ds (QXX 0 ) X m0 6=m = X QX|U U 0 QX 0 |XU U 0 n o exp nK(Ry , s, P̂um um0 ) , (145) (146) (147) (148) m0 6=m 27 where K(Ry , s, P̂um um0 ) has been defined in (117). Hence,   0 y −1 y −1 z −1 M   1 MX n o X X MX Mz0 −1 0j ) E {u } exp − d (X , X s mi l m l=0   My Mz0 m=0 i=0 m0 6=m j=0   My −1 Mz0 −1 My −1   n o X X X X 1 Mz0 −1 0j ) = {u } E exp − d (X , X s mi l m l=0   0 My Mz0 m=0 . = i=0 (150) m 6=m j=0 Mz0 −1 My −1 n o X X X 1 exp nK(Ry , s, P̂um um0 ) My Mz0 0 m=0 (149) (151) i=0 m 6=m Mz0 −1 n o X 1 X = 0 exp nK(Ry , s, P̂um um0 ) . Mz 0 (152) m=0 m 6=m Next, we assess the expectation of G(Cm , Cm0 ). Let Nz ,um (QU XZ , C) denote the number of codewords xmi ∈ Cm , such that the joint empirical distribution of xmi with (um , z) is QU XZ , that is My −1 Nz ,um (QU XZ , C) = X n o I (um , xmi , z) ∈ T (QU XZ ) . (153) i=0 It follows from eq. (6) that n o E [Nz ,um (QU XZ , C)]1−t  n  o   exp n Ry − IQ (X; Z|U ) (1 − t) . n  = o  exp n Ry − IQ (X; Z|U ) Ry ≥ IQ (X; Z|U ) = exp {nE0 (Ry , QU XZ , 1 − t)} . Hence, from the independence of codewords of different clouds, we get    X M 0 −1 E G(Cm , Cm0 ) {ul }l=0z  0  m 6=m  1−t   t   y −1 y −1  X X MX  MX   0 M −1  =E W2 (z|xm,i ) W2 (z|xm0 ,j )  {ul }l=0z  0      i=0 j=0 m 6=m z  1−t  X X  X   =E Nz ,um (QU XZ , C)enf (QXZ )  0   QX|U Z m 6=m z t      X  M 0 −1 × Nz ,um0 (QU 0 X 0 Z , C)enf (QX 0 Z )  {ul }l=0z    QX 0 |U 0 Z 28 (154) Ry < IQ (X; Z|U ) (155) (156) (157)   X X X .  =E [Nz ,um (QU XZ , C)]1−t en(1−t)f (QXZ )  0 QX|U Z m 6=m z PD × X  QX 0 |U 0 Z    t ntf (Q 0 ) 0 M −1 X Z  {u } z Nz ,um0 (QU 0 X 0 Z , C) e l l=0  (158)  = X X X  m0 6=m z o n E [Nz ,um (QU XZ , C)]1−t en(1−t)f (QXZ ) QX|U Z × X  n t o ntf (Q 0 ) X Z  E Nz ,um0 (QU 0 X 0 Z , C) e (159) QX 0 |U 0 Z  n o . X X X = exp nE0 (Ry , QU XZ , 1 − t) · en(1−t)f (QXZ ) QX|U Z m0 6=m z  n o exp nE0 (Ry , QU 0 X 0 Z , t) · entf (QX 0 Z )  (160)  n o . X X = max exp nE0 (Ry , QU XZ , 1 − t) · en(1−t)f (QXZ ) QX|U Z m0 6=m z # n o × max exp nE0 (Ry , QU 0 X 0 Z , t) · entf (QX 0 Z ) (161) × X QX 0 |U 0 Z QX 0 |U 0 Z = X X m0 6=m QZ|U U 0 X h  exp nE1 (Ry , QU Z , 1 − t) z ∈T (QZ|U U 0 |um ,um0 ) i  × exp nE1 (Ry , QU 0 Z , t) n  X o exp n HQ (Z|U, U 0 ) + E1 (Ry , QU Z , 1 − t) + E1 (Ry , QU 0 Z , t) . X = (162) (163) m0 6=m QZ|U U 0 n  o . X = max exp n HQ (Z|U, U 0 ) + E1 (Ry , QU Z , 1 − t) + E1 (Ry , QU 0 Z , t) m0 6=m = QZ|U U 0 n o exp nB(Ry , t, P̂um um0 ) , X (164) (165) m0 6=m which means that   0 Mz0 −1 z −1 X  1 MX  n o X 0 1 X Mz −1 0 E G(C , C ) {u } = exp nB(R , t, P̂ ) m m y um um0 . (166) l l=0  Mz0  Mz0 0 0 m=0 m 6=m m=0 m 6=m 29 6.4 Part 4 Define now the following three events. For the strong user, define   Mz0 −1 My −1   [ X X 1 ∆ IN n[Ry −IQ (X;X 0 |U )+/2] 0 C: , A1 = N (Q , C) > e U XX mi   My Mz0 m=0 QU XX 0 (167) i=0 and  Mz0 −1 My −1 y −1  X X X MX  1 ∆ A2 = C : exp −ds (xmi , xm0 j ) 0  M y Mz 0 m=0 i=0 m 6=m j=0 > 1 Mz0 Mz0 −1 X X n[K(Ry ,s,P̂um u e m0 )+/2] m=0 m0 6=m   . For the weak user, define   Mz0 −1 Mz0 −1   X X X X 1 1 n[B(Ry ,t,P̂um u 0 )+/2] ∆ m 0 G(C , C ) > e . A3 = C : m m   Mz0 Mz0 0 0 m=0 m 6=m (168)  (169) m=0 m 6=m Notice that the expression in the right hand side inside each of these events equals the conditional expectation (given the set of cloud centers) of the expression in the left hand side, multiplied by en/2 . Hence, by Markov’s inequality, n o M 0 −1 Pr A1 ∪ A2 ∪ A3 {ul }l=0z n o n o n o UB M 0 −1 M 0 −1 M 0 −1 ≤ Pr A1 {ul }l=0z + Pr A2 {ul }l=0z + Pr A3 {ul }l=0z X MI ≤ e−n/2 + e−n/2 + e−n/2 (170) (171) (172) QU XX 0 2 ≤ 3 · (n + 1)|U |·|X | · e−n/2 → 0, (173) which means that there exists a code with 0 0 Mz −1 Mz −1 X X n[B(Ry ,t,P̂ 1 X 1 X um um0 )+/2] , G(Cm , Cm0 ) ≤ 0 e 0 Mz M z 0 0 m=0 m 6=m m=0 m 6=m Mz0 −1 0 Mz −1 y −1 y −1 X MX X MX X n[K(Ry ,s,P̂ 1 1 X −ds (xmi ,xm0 j ) um um0 )+/2] , e e ≤ 0 My Mz0 M z 0 0 m=0 m=0 m 6=m i=0 m 6=m j=0 Mz0 −1 My −1 X X 1 0 IN Nmi (QU XX 0 , C) ≤ en[Ry −IQ (X;X |U )+/2] ∀QU XX 0 . 0 My Mz m=0 i=0 30 (174)  For a given such code and every given QU XX 0 , there must then exist at least 1 − 3e−n/2 · Mz0 values of m and at least (1 − 3e−n/2 ) · My Mz0 pairs (m, i) such that 0 X m0 6=m y −1 X MX m0 6=m j=0 Mz −1 X n[B(Ry ,t,P̂ 1 X um um0 )+] , G(Cm , Cm0 ) ≤ 0 e Mz 0 m=0 m 6=m 0 Mz −1 X n[K(Ry ,s,P̂  1 X um um0 )+] , e exp −ds (xmi , xm0 j ) ≤ 0 Mz 0 m=0 m 6=m IN Nmi (QU XX 0 , C) ≤ e n[Ry −IQ (X;X 0 |U )+] , (175) Upon eliminating the exceptional clouds and exceptional codewords from the code, for all 2 QU XX 0 , we end up with at least [1 − 3(n + 1)|U |·|X | · e−n/2 ] · Mz0 clouds and at least [1 − 3(n + 2 1)|U |·|X | · e−n/2 ] · My Mz0 codewords for which 0 X m0 6=m y −1 X MX m0 6=m j=0 Mz −1 X n[B(Ry ,t,P̂ 1 X um um0 )+] , e G(Cm , Cm0 ) ≤ 0 Mz 0 m=0 m 6=m 0 Mz −1 X n[K(Ry ,s,P̂  1 X um um0 )+] , e exp −ds (xmi , xm0 j ) ≤ 0 Mz 0 m=0 m 6=m IN Nmi (QU XX 0 , C) ≤ e n[Ry −IQ (X;X 0 |U )+] ∀QU XX 0 . (176) 2 Let C 00 denote the sub-code formed by these [1 − 3(n + 1)|U |·|X | · e−n/2 ] · Mz0 remaining clouds 2 and [1 − 3(n + 1)|U |·|X | · e−n/2 ] · My Mz0 remaining codewords. IN Since Nmi (QU XX 0 , C 00 ) ≤ IN Nmi (QU XX 0 , C), then the sub-code certainly satisfies 0 X m0 6=m y −1 X MX m0 6=m j=0 Mz −1 X n[B(Ry ,t,P̂ 1 X um um0 )+] ∀m, 0 0 e Gmm (Cm , Cm ) ≤ 0 Mz 0 (177) m=0 m 6=m 0 Mz −1 X n[K(Ry ,s,P̂  1 X um um0 )+] ∀(m, i), exp −ds (xmi , xm0 j ) ≤ 0 e Mz 0 (178) m=0 m 6=m IN Nmi (QU XX 0 , C 00 ) ≤ en[Ry −IQ (X;X 0 |U )+] ∀(m, i), QU XX 0 . (179) 2 Thus, we have shown that there exists a code C 00 consisting of [1 − 3(n + 1)|U |·|X | · e−n/2 ] · enRz 2 clouds and [1 − 3(n + 1)|U |·|X | · e−n/2 ] · en(Ry +Rz ) codewords, for which all clouds satisfy both IN ∗ (Q (112) and (177) and all codewords satisfy (178) and Nmi (QU XX 0 , C 00 ) ≤ NIN U XX 0 ) for all joint types QU XX 0 . 31 6.5 Part 5 As a consequence of the previous parts, we have seen the existence of a code C 00 for which max Pe|m (C 00 ) m 1 X ≤ G(Cm , Cm0 ) My 0 (180) m 6=m Mz0 −1 n o X 1 1 X ≤ exp n[B(R , t, P̂ ) + ] y um um0 My Mz0 0 (181) m=0 m 6=m Mz0 −1 = 1 1 X My Mz0 n o Nm (QU U 0 , C 0 ) · exp n[B(Ry , t, QU U 0 ) + ] X (182) m=0 QU U 0 ∈Q ≤ 1 My n o n o exp n[Rz − IQ (U ; U 0 ) + ] · exp n[B(Ry , t, QU U 0 ) + ] X (183) QU U 0 ∈Q IQ (U ;U 0 )≤Rz + n o exp n[Rz − IQ (U ; U 0 ) + B(Ry , t, QU U 0 ) − Ry + 2] , X = (184) QU U 0 ∈Q IQ (U ;U 0 )≤Rz + as well as max Pe|mi (C 00 ) m,i ≤ X 00 IN −nDs (QXX 0 ) Nmi (QU XX 0 , C ) · e + y −1 X MX m0 6=m QU XX 0 ∈S  exp −ds (xmi , xm0 j ) (185) j=0 Mz0 −1 n o X X 1 ∗ exp n[K(Ry , s, P̂um um0 ) + ] (186) ≤ NIN (QU XX 0 ) · e−nDs (QXX 0 ) + 0 Mz m=0 m0 6=m QU XX 0 ∈S n o X = exp n[Ry − IQ (X; X 0 |U ) − Ds (QXX 0 ) + ] X QU XX 0 ∈S IQ (X;X 0 |U )≤Ry + M 0 −1 ≤ z 1 X + 0 Mz m=0 X X n o Nm (QU U 0 , C 0 ) · exp n[K(Ry , s, QU U 0 ) + ] (187) QU U 0 ∈Q n o exp n[Ry − IQ (X; X 0 |U ) − Ds (QXX 0 ) + ] QU XX 0 ∈S IQ (X;X 0 |U )≤Ry + + X n o n o exp n[Rz − IQ (U ; U 0 ) + ] · exp n[K(Ry , s, QU U 0 ) + ] (188) QU U 0 ∈Q IQ (U ;U 0 )≤Rz + and due to the arbitrariness of  > 0, this means that there exists a sequence of codes with a rate pair (Ry , Rz ) for which (40) and (41) hold. As for the final expression for the weak 32 user, one can easily move from the expressions of E0 , E1 and B [defined in (114)–(116)] to the expression of D̂t [defined in (34)] by using standard information–measures identities. This completes the proof of Theorem 2. 7 Proof of Theorem 3 Consider first the two expressions ∆ Φm,i (um , y) = X exp{ng(P̂um xmj y )}, (189) j6=i ∆ Ψm (y) = y −1 X MX m0 6=m exp{ng(P̂um0 xm0 j y )}, (190) j=0 where the sum in Φm,i (um , y) is over all wrong codewords in the true cloud, while the sum in Ψm (y) is over all codewords of the incorrect clouds. Let  > 0 be arbitrarily small, and for every y ∈ Y n and um ∈ U n , define the events n o S (m, i, um , y) = C : Φm,i (um , y) ≤ exp{nφ(Ry − , P̂um y )} , n o K (m, y) = C : Ψm (y) ≤ exp{nψ(Ry − , Rz − , P̂y )} , (191) (192) where φ and ψ are defined in (44) and (45), respectively. In Appendixes C and D, we show that the vast majority of constant composition codes {C} are outside both S (m, i, um , y) and K (m, y), simultaneously for all (m, i), all um and all y. More precisely, it is shown that Pr{S (m, i, um , y)} ≤ exp {−en + n + 1} , (193) Pr{K (m, y)} ≤ exp {−en + n + 1} , (194) for every (m, i), um and y, and hence,   [ [ [  [  Pr S (m, i, um , y) ∪ K (m, y) m  i um ∈U n y ∈Y n ∆ = Pr {B } (195) (196) UB ≤ 2en(Rz +Ry ) |U|n |Y|n exp {−en + n + 1} , (197) which still decays double-exponentially. Thus, for all codes in G = Bc , which is the vast majority of codes, we have both Φm,i (um , y) ≥ exp{nφ(Ry −, P̂um y )} and Ψm (y) ≥ exp{nψ(Ry −, Rz − , P̂y )} simultaneously for all m = 0, 1, . . . , Mz − 1, i = 0, 1, . . . , My − 1, y ∈ Y n and um ∈ U n . 33 7.1 Analysis for the strong user For a given code C, the probability of error given that message (m, i) was transmitted is given by the following summation over all wrong codewords in the codebook X X (m0 ,j)6=(m,i) X y X (m0 ,j)6=(m,i) y Pe|mi (C) = = × n o W1 (y|xmi ) · Pr m̂ = m0 , î = j y (198) W1 (y|xmi ) exp{ng(P̂um0 xm0 j y )} . P exp{ng(P̂um xmi y )} + (m̃,k)6=(m,i) exp{ng(P̂um̃ xm̃k y )} (199) Now, trivially, exp{ng(P̂um0 xm0 j y )} ≤ 1, P exp{ng(P̂um xmi y )} + (m̃,k)6=(m,i) exp{ng(P̂um̃ xm̃k y )} (200) and for a code in G , we also have exp{ng(P̂um0 xm0 j y )} P exp{ng(P̂um xmi y )} + (m̃,k)6=(m,i) exp{ng(P̂um̃ xm̃k y )} = ≤ exp{ng(P̂um xmi y )} + exp{ng(P̂um0 xm0 j y )} P P k6=i exp{ng(P̂um xmk y )} + m̃6=m k exp{ng(P̂um̃ xm̃k y )} P exp{ng(P̂um0 xm0 j y )} exp{ng(P̂um xmi y )} + exp{nφ(Ry − , P̂um y )} + exp{nψ(Ry − , Rz − , P̂y )} . (201) Thus, for such a code exp{ng(P̂um0 xm0 j y )} P exp{ng(P̂um xmi y )} + (m̃,k)6=(m,i) exp{ng(P̂um̃ xm̃k y )} ( ) exp{ng(P̂um0 xm0 j y )} ≤ min 1, exp{ng(P̂um xmi y )} + exp{nφ(Ry − , P̂um y )} + exp{nψ(Ry − , Rz − , P̂y )}  h i   . = exp −n max g(P̂um xmi y ), φ(Ry − , P̂um y ), ψ(Ry − , Rz − , P̂y ) − g(P̂um0 xm0 j y ) + n o ∆ = exp −nξ(Ry − , Rz − , P̂um um0 xmi xm0 j y ) . (202) For any ρ ≥ 1, we take the expectation over the randomness of the incorrect part of the codebook, C mi = C \ {um , xmi }, where um and xmi are kept fixed for now. Let P (C mi ) denote 34 the conditional probability of C mi given um , xmi . Then, o 1/ρ um , xmi Pe|mi (C) X  1/ρ = P (C mi ) Pe|mi (C) E n (203) C mi = X  1/ρ  1/ρ P (C mi ) Pe|mi (C) + P (C mi ) Pe|mi (C) X C mi ∈G  (a) ≤ X X X (m0 ,j)6=(m,i) y P (C mi )  C mi ∈G X + (204) C mi ∈B 1/ρ n o W (y|xmi ) exp −nξ(Ry − , Rz − , P̂um um0 xmi xm0 j y )  P (C mi ) · 11/ρ (205) C mi ∈B  ·  ≤ E   1/ρ o n X X  W (y|xmi ) exp −nξ(Ry − , Rz − , P̂um um0 xmi xm0 j y )  um , xmi  (m0 ,j)6=(m,i) y (206)   1/ρ n o  XX  ≤ E  W (y|xmi ) exp −nξ(Ry − , Rz − , P̂um um xmi xmj y )  um , xmi  j6=i y   1/ρ My −1 n o  X X X  + E  W (y|xmi ) exp −nξ(Ry − , Rz − , P̂um um0 xmi xm0 j y )  um , xmi  m0 6=m j=0 y (207)   1/ρ n o (b) .  X  = E  exp − nΥ(P̂um xmi xmj , Ry , Rz )  um , xmi  j6=i   1/ρ My −1 n o X X   + E  exp − nΩ(P̂um um0 xmi xm0 j , Ry , Rz )  um , xmi  (208) m0 6=m j=0   = E  X IN Nmi (QU XX 0 , C) exp {−nΥ(QU XX 0 , Ry , Rz )} QU XX 0 ∈S   + E  X OUT Nmi (QU U 0 XX 0 , C) exp {−nΩ(QU U 0 XX 0 , Ry , Rz )} QU U 0 XX 0 ∈P . = E  um , xmi   1/ρ  PD  1/ρ  um , xmi  (209)  X IN [Nmi (QU XX 0 , C)]1/ρ exp {−nΥ(QU XX 0 , Ry , Rz )/ρ} um , xmi  QU XX 0 ∈S 35   OUT [Nmi (QU U 0 XX 0 , C)]1/ρ exp {−nΩ(QU U 0 XX 0 , Ry , Rz )/ρ} um , xmi  (210) X + E QU U 0 XX 0 ∈P   IN E [Nmi (QU XX 0 , C)]1/ρ um , xmi exp {−nΥ(QU XX 0 , Ry , Rz )/ρ} X = QU XX 0 ∈S   OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi exp {−nΩ(QU U 0 XX 0 , Ry , Rz )/ρ} , (211) X + QU U 0 XX 0 ∈P IN OUT where Nmi (QU XX 0 , C) and Nmi (QU U 0 XX 0 , C) are defined in (62) and (63), respectively. The passage (a) is due to (202), and the passage (b) is due to the following derivation:  h X  W (y|xmi ) exp − n max g(P̂um xmi y ), φ(Ry − , P̂um y ), y i  ψ(Ry − , Rz − , P̂y ) − g(P̂um0 xm0 j y ) +  h X X  W (y|xmi ) exp − n max g(P̂um xmi y ), φ(Ry − , P̂um y ), = QY |U U 0 XX 0 y ∈T (QY |U U 0 XX 0 ) i  ψ(Ry − , Rz − , P̂y ) − g(P̂um0 xm0 j y ) (212) + (  . = max exp n HQ (Y |U, U 0 , X, X 0 ) + EQ log[W (Y |X)] QY |U U 0 XX 0 ) i   − max g(QU XY ), φ(Ry − , QU Y ), ψ(Ry − , Rz − , QY ) − g(QU 0 X 0 Y ) h + = max QY |U U 0 XX 0 (  exp n HQ (Y |U, U 0 , X, X 0 ) − HQ (Y |U, X) − D(QY |U X kWY |X |QU X ) ) i   − max g(QU XY ), φ(Ry − , QU Y ), ψ(Ry − , Rz − , QY ) − g(QU 0 X 0 Y ) h + ( −n = exp min QY |U U 0 XX 0 ) i   + max g(QU XY ), φ(Ry − , QU Y ), ψ(Ry − , Rz − , QY ) − g(QU 0 X 0 Y ) + n o − nΩ(QU U 0 XX 0 , Ry − , Rz − ) ,  W (y|xmi ) exp (215) (216) and similarly X (214)  D(QY |U X kWY |X |QU X ) + IQ (U 0 X 0 ; Y |U X) h = exp (213) h  − n max g(P̂um xmi y ), φ(Ry − , P̂um y ), y ψ(Ry − , Rz − , P̂y ) − g(P̂um xmj y ) 36 i  + . = exp n o − nΥ(QU XX 0 , Ry − , Rz − ) . (217) Now, it only remains to assess the conditional expectations of (211). For the left one, we have according to eq. (6) n o IN E [Nmi (QU XX 0 , C)]1/ρ um , xmi  exp{n[Ry − IQ (X; X 0 |U )]/ρ} . = exp{n[Ry − IQ (X; X 0 |U )]} Ry > IQ (X; X 0 |U ) . (218) Ry ≤ IQ (X; X 0 |U )   OUT In order to assess the second conditional expectation, E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi , we make the following definitions. Let Num ,um0 ,xmi (Q) denote the number of codewords xm0 j ∈ Cm0 , such that (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ), that is My −1 Num ,um0 ,xmi (Q) = X n o I (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ) . (219) j=0 Let Āum ,xmi (QU U 0 X ) denote the set of cloud-centers um0 , such that (um , um0 , xmi ) ∈ T (QU U 0 X ). In addition, let N̄um ,xmi (QU U 0 X ) be the total amount of them, that is N̄um ,xmi (QU U 0 X ) = X n o I (um , um0 , xmi ) ∈ T (QU U 0 X ) . (220) m0 6=m We condition on the set Āum ,xmi (QU U 0 X ) and assume that N̄um ,xmi (QU U 0 X ) = enλ . For a given ρ > 1, let s ∈ [1, ρ]. then, o n OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ Āum ,xmi (QU U 0 X )   1/ρ       X   0 =E  Num ,ũ,xmi (Q) Āum ,xmi (QU U X )      ũ∈Āum ,x (QU U 0 X )  mi    1/s s/ρ         X     0 =E  N (Q) Ā (Q )   um ,xmi U U X um ,ũ,xmi        ũ ∈ Ā (Q ) 0   um ,xmi U U X   s/ρ       h i X 1/s  PD  0 Ā (Q ) ≤E  Num ,ũ,xmi (Q)  um ,xmi U U X       ũ∈Āum ,x (QU U 0 X ) mi s/ρ       h i X 1/s   ≤ E Num ,ũ,xmi (Q) Āum ,xmi (QU U 0 X )    ũ∈Ā  um ,xmi (QU U 0 X ) 37 (221) (222) (223) (224)  X  = E ũ∈Āum ,xmi (QU U 0 X ) h s/ρ i1/s   Num ,ũ,xmi (Q)  , (225) where the the second inequality is due to Jensen’s inequality (JI) and the concavity of the function f (v) = v s/ρ when 0 < s/ρ ≤ 1. Now, by eq. (6), we have h i1/s  E Num ,ũ,xmi (Q)  exp{n[Ry − IQ (U X; X 0 |U 0 )]/s} Ry > IQ (U X; X 0 |U 0 ) . = 0 0 exp{n[Ry − IQ (U X; X |U )]} Ry ≤ IQ (U X; X 0 |U 0 ) , (226) and so, n o OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ Āum ,xmi (QU U 0 X )  h i1/s s/ρ nλs/ρ ≤e · E Num ,ũ,xmi (Q)  exp{n[Ry − IQ (U X; X 0 |U 0 )]/ρ} Ry > IQ (U X; X 0 |U 0 ) . nλs/ρ =e · 0 0 exp{n[Ry − IQ (U X; X |U )]s/ρ} Ry ≤ IQ (U X; X 0 |U 0 )  exp{n[λs + Ry − IQ (U X; X 0 |U 0 )]/ρ} Ry > IQ (U X; X 0 |U 0 ) = . exp{n[λ + Ry − IQ (U X; X 0 |U 0 )]s/ρ} Ry ≤ IQ (U X; X 0 |U 0 ) (227) (228) (229) Optimizing over s, we get n o 1 OUT log E [Nmi (QU U 0 XX 0 , C)]1/ρ Āum ,xmi (QU U 0 X ) n  Ry > IQ (U X; X 0 |U 0 )  [λs + Ry − IQ (U X; X 0 |U 0 )] /ρ 0 0 [λ + Ry − IQ (U X; X |U )] s/ρ Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry > IQ (U X; X 0 |U 0 ) ≤ min 1≤s≤ρ  [λ + Ry − IQ (U X; X 0 |U 0 )] s/ρ Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry ≤ IQ (U X; X 0 |U 0 ) (230)  Ry > IQ (U X; X 0 |U 0 )  [λ + Ry − IQ (U X; X 0 |U 0 )] /ρ 0 0 [λ + Ry − IQ (U X; X |U )] /ρ Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry > IQ (U X; X 0 |U 0 ) =  [λ + Ry − IQ (U X; X 0 |U 0 )] ρ/ρ Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry ≤ IQ (U X; X 0 |U 0 ) (231)  [λ + Ry − IQ (U X; X 0 |U 0 )] /ρ λ + Ry > IQ (U X; X 0 |U 0 ) = (232) 0 0 [λ + Ry − IQ (U X; X |U )] λ + Ry ≤ IQ (U X; X 0 |U 0 ) ∆ = Ē1 (Ry , QU U 0 XX 0 , ρ, λ). (233) Next, we have to take the expectation over the set Āum ,xmi (QU U 0 X ). Since the expression of (232) is independent of the specific cloud-centers, we only have to average it over the cardinality 38 of Āum ,xmi (QU U 0 X ), namely, over N̄um ,xmi (QU U 0 X ). h n oi EN̄ exp nĒ1 (Ry , QU U 0 XX 0 , ρ, λ) Rz / n o n o . X = Pr eni ≤ N̄um ,xmi (QU U 0 X ) ≤ en(i+1) · exp nĒ1 (Ry , QU U 0 XX 0 , ρ, i) . (234) i=0 Now, notice that the type-class enumerator N̄um ,xmi (QU U 0 X ) is a binomial random variable, 0 pertaining to enRz trials and probability of success e−nIQ (U X;U ) . On the one hand, we have [17] n o .  Pr N̄um ,xmi (QU U 0 X ) ≤ ent = I Rz ≤ IQ (U X; U 0 ) + t , and on the other hand, we have [16, pp. 167–169] o n . Pr N̄um ,xmi (QU U 0 X ) ≥ ent = e−nĒ(QU U 0 X ,t) , (235) (236) where, (   IQ (U X; U 0 ) − Rz + Ē(QU U 0 X , t) = ∞   R − IQ (U X; U 0 ) + ≥ t  z  . (237) Rz − IQ (U X; U 0 ) + < t  First, assume that Rz > IQ (U X; U 0 ). We conclude that the event ent ≤ N̄um ,xmi (QU U 0 X ) ≤  en(t+) occurs with very high probability if and only if Rz −IQ (U X; U 0 ) ∈ [t, t+), otherwise, its probability has a double exponential decay. Therefore, it turns out that the sum in (234)  is dominated by one summand, the one for which i = Rz − IQ (U X; U 0 ) /. Otherwise, if Rz ≤ IQ (U X; U 0 ), then the sum is dominated by the term i = 0, which has an exponent of IQ (U X; U 0 ) − Rz . By using the fact that  > 0 is arbitrarily small, we get that the expectation in question behaves like n o OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi    ≤ EN̄ exp nĒ1 (Ry , QU U 0 XX 0 , ρ, λ) n    o . = exp n · Ē1 (Ry , QU U 0 XX 0 , ρ, λ̄) − IQ (U X; U 0 ) − Rz + , (238) (239) ∆ where λ̄ = [Rz − IQ (U X; U 0 )]+ . It can also be written as n o 1 OUT log E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi n  ([Rz − IQ (U X; U 0 )]+ + Ry − IQ (U X; X 0 |U 0 )) /ρ − [IQ (U X; U 0 ) − Rz ]+     If [Rz − IQ (U X; U 0 )]+ + Ry > IQ (U X; X 0 |U 0 )   ≤ 0 )] + R − I (U X; X 0 |U 0 ) − [I (U X; U 0 ) − R ] [R − I (U X; U  z + y z + Q Q Q    If [Rz − IQ (U X; U 0 )]+ + Ry ≤ IQ (U X; X 0 |U 0 ) 39 (240)  ([Rz − IQ (U X; U 0 )]+ + Ry − IQ (U X; X 0 |U 0 )) /ρ − [IQ (U X; U 0 ) − Rz ]+     If [Rz − IQ (U X; U 0 )]+ + Ry > IQ (U X; X 0 |U 0 ), Rz > IQ (U X; U 0 )     ([Rz − IQ (U X; U 0 )]+ + Ry − IQ (U X; X 0 |U 0 )) /ρ − [IQ (U X; U 0 ) − Rz ] + = 0 )] + R > I (U X; X 0 |U 0 ), R ≤ I (U X; U 0 ) If [R − I (U X; U z + y z Q Q Q        [Rz − IQ (U X; U 0 )]+ + Ry − IQ (U X; X 0 |U 0 ) − [IQ (U X; U 0 ) − Rz ]+    If [Rz − IQ (U X; U 0 )]+ + Ry ≤ IQ (U X; X 0 |U 0 )  (Rz + Ry − IQ (U X; U 0 X 0 )) /ρ     If Rz + Ry > IQ (U X; U 0 X 0 ), Rz > IQ (U X; U 0 )     (Ry − IQ (U X; X 0 |U 0 )) /ρ − [IQ (U X; U 0 ) − Rz ] = . If Ry > IQ (U X; X 0 |U 0 ), Rz ≤ IQ (U X; U 0 )        [Rz − IQ (U X; U 0 )]+ + Ry − IQ (U X; X 0 |U 0 ) − [IQ (U X; U 0 ) − Rz ]+    If [Rz − IQ (U X; U 0 )]+ + Ry ≤ IQ (U X; X 0 |U 0 ) (241) (242) Finally, both conditional expectations of (211) have been calculated, and it should be noticed that the expressions of (218) and (242) are, in fact, independent of (um , xmi ). Substituting them n o 1/ρ back into (211) provides an upper bound on E Pe|mi (C) um , xmi , which is independent of (um , xmi ). 7.2 Analysis for the weak user For a given code C, the average probability of error given that one of the messages from cloud m was transmitted is given by My −1  1 X X X W (z|xmi ) · Pr m̃ = m0 |z Pe|m (C) = My i=0 m0 6=m z (243) My −1 1 X X X = W (z|xmi ) My i=0 m0 6=m z PMy −1 × PMy −1 l=0 exp{ng(P̂um0 xm0 j z )} . P PMy −1 exp{ng(P̂um xml z )} + m̃6=m k=0 exp{ng(P̂um̃ xm̃k z )} j=0 (244) Notice that for every codebook within the set G , and a given index j [appearing in the nominator of the last term of (244)], we have My −1 X y −1 X MX exp{ng(P̂um xml z )} + l=0 exp{ng(P̂um̃ xm̃k z )} (245) m̃6=m k=0 = exp{ng(P̂um xmi z )} + X exp{ng(P̂um xml z )} l6=i + exp{ng(P̂um0 xm0 j z )} + X exp{ng(P̂um̃ xm̃k z )} m̃6=m (m̃,k)6=(m0 ,j) 40 (246) ≥ exp{ng(P̂um xmi z )} + exp{nφ(Ry − , P̂um z )} + exp{ng(P̂um0 xm0 j z )} + exp{nψ(Ry − , Rz − , P̂z )} (247) n h io . = exp n max g(P̂um xmi z ), φ(Ry − , P̂um z ), g(P̂um0 xm0 j z ), ψ(Ry − , Rz − , P̂z ) . (248) For any ρ ≥ 1, we take the expectation over the randomness of C m = C \ {um }, while um is kept fixed. o n 1/ρ um E Pe|m (C) X  1/ρ = P (C m ) Pe|m (C) (249) Cm = X  1/ρ  1/ρ P (C m ) Pe|m (C) + P (C m ) Pe|m (C) X C m ∈B (250) C m ∈G  My −1 X   1 X X X 1/ρ = P (C m ) Pe|m (C) + P (C m )  W (z|xmi ) My m m 0 z i=0 m 6=m C ∈B C ∈G X 1/ρ exp{ng(P̂um0 xm0 j z )}  × PMy −1 P PMy −1 exp{ng( P̂ )} + exp{ng( P̂ )} um xml z um̃ xm̃k z j=0 m̃6=m l=0 k=0  My −1 X X X X X m 1/ρ m  1 W (z|xmi ) ≤ P (C ) · 1 + P (C ) My m m 0 z My −1 X C ∈B C ∈G My −1 × i=0 m 6=m 1/ρ exp{ng(P̂um0 xm0 j z )} X j=0 (251) io  n h exp n max g(P̂um xmi z ), φ(Ry − , P̂um z ), g(P̂um0 xm0 j z ), ψ(Ry − , Rz − , P̂z ) (252)  · ≤ X Cm × My −1 My −1 1 X X X X  W (z|xmi ) P (C ) My i=0 m0 6=m j=0 z m 1/ρ exp{ng(P̂um0 xm0 j z )} n h io  exp n max g(P̂um xmi z ), φ(Ry − , P̂um z ), g(P̂um0 xm0 j z ), ψ(Ry − , Rz − , P̂z ) (253)   1/ρ My −1 My −1  .  1 X X X  exp − nΩ(P̂um um0 xmi xm0 j , Ry , Rz )  um  . = E  My 0 (254) i=0 m 6=m j=0 In order to continue, we have to define the following enumerators. Let Num (Q) denote the number of triplets (xmi , um0 , xm0 j ), such that (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ), that is y −1 My −1 n o X MX X Num (Q) = I (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ) . m0 6=m i=0 j=0 41 (255) Let Num ,um0 (Q) denote the number of pairs (xmi , xm0 j ), such that (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ), that is My −1 My −1 Num ,um0 (Q) = X X i=0 n o I (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ) . (256) j=0 Let Num ,um0 ,xmi (Q) denote the number of codewords xm0 j ∈ Cm0 , such that (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ), that is My −1 Num ,um0 ,xmi (Q) = X n o I (um , um0 , xmi , xm0 j ) ∈ T (QU U 0 XX 0 ) . (257) j=0 Let Âum (QU U 0 ) denote the set of cloud-centers um0 , such that the joint empirical distribution of um0 with um is QU U 0 . In addition, let N̂um (QU U 0 ) be the total amount of them, that is N̂um (QU U 0 ) = n o I (um , um0 ) ∈ T (QU U 0 ) . X (258) m0 6=m Let Ãum ,um0 (QU U 0 X ) denote the set of codewords xmi ∈ Cm , such that the joint empirical distribution of xmi with (um , um0 ) is QU U 0 X . In addition, let Ñum ,um0 (QU U 0 X ) be the total amount of them, that is My −1 Ñum ,um0 (QU U 0 X ) = X n o I (um , um0 , xmi ) ∈ T (QU U 0 X ) . (259) i=0 Continuing with the conditional expectation of (254), we have   1/ρ   y −1 y −1  1 MX  X MX    E um exp − nΩ(P̂um um0 xmi xm0 j , Ry , Rz )    My i=0 m0 6=m j=0    1/ρ     X −nRy −nΩ(Q,Ry ,Rz )   =E e Num (Q)e um     QU U 0 XX 0 ∈P   1/ρ     X −n[Ω(Q,Ry ,Rz )+Ry ]   =E Num (Q)e um    QU U 0 XX 0 ∈P      X . 1/ρ −n[Ω(Q,Ry ,Rz )+Ry ]/ρ =E [Num (Q)] e um   QU U 0 XX 0 ∈P o n X = E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ]/ρ . QU U 0 XX 0 ∈P 42 (260) (261) (262) (263) (264) o n In order to evaluate the moments E [Num (Q)]1/ρ um , we condition on the set Âum (QU U 0 ) and assume that N̂um (QU U 0 ) = enµ . For a given ρ > 1, let s ∈ [1, ρ]. then, n o E [Num (Q)]1/ρ Âum (QU U 0 )   1/ρ       X   Âum (QU U 0 ) Num ,ũ (Q) =E        ũ∈Âum (QU U 0 )   1/s s/ρ          X      = E  Num ,ũ (Q)  Âum (QU U 0 )       ũ∈Âum (QU U 0 )     s/ρ       h i1/s X PD   0 Âum (QU U ) ≤E  Num ,ũ (Q)       ũ∈Âum (QU U 0 )  s/ρ       h i1/s X JI   0 Num ,ũ (Q) ≤ E Âum (QU U )    ũ∈Â (Q )  um U U 0 s/ρ    h i1/s X   E Num ,ũ (Q) =  . ũ∈Âum (QU U 0 ) (265) (266) (267) (268) (269) h i1/s In turn, in order to evaluate the moments E Num ,ũ (Q) , we condition on the set Ãum ,ũ (QU U 0 X ) and assume that Ñum ,ũ (QU U 0 X ) = enλ . For a given s ∈ [1, ρ], let t ∈ [1, s]. then, h  i1/s E Num ,ũ (Q) Ãum ,ũ (QU U 0 X )   1/s       X   Ãum ,ũ (QU U 0 X ) =E  Num ,ũ,x̃ (Q)      x̃∈Ã  um ,ũ (QU U 0 X )    1/t t/s         X      = E  Num ,ũ,x̃ (Q)  Ãum ,ũ (QU U 0 X )       x̃∈Ãu ,ũ (QU U 0 X )   m   t/s       h i1/t X PD   0 ≤E  Num ,ũ,x̃ (Q)  Ãum ,ũ (QU U X )       x̃∈Ã (QU U 0 X ) um ,ũ 43 (270) (271) (272) t/s       h i1/t X JI   ≤ E Ãum ,ũ (QU U 0 X )  Num ,ũ,x̃ (Q)   x̃∈Ã  um ,ũ (QU U 0 X )  t/s   h i1/t X   = E Num ,ũ,x̃ (Q)  . x̃∈Ãu ,ũ (QU U 0 X ) (273) (274) m According to eq. (6), h i1/t  E Num ,ũ,x̃ (Q)  exp{n[Ry − IQ (U X; X 0 |U 0 )]/t} . = exp{n[Ry − IQ (U X; X 0 |U 0 )]} Ry > IQ (U X; X 0 |U 0 ) Ry ≤ IQ (U X; X 0 |U 0 ) , (275) and so, h  i1/s E Num ,ũ (Q) Ãum ,ũ (QU U 0 X )  h i1/t t/s nλt/s ≤e · E Num ,ũ,x̃ (Q)  exp{n[Ry − IQ (U X; X 0 |U 0 )]/s} Ry > IQ (U X; X 0 |U 0 ) . nλt/s =e · exp{n[Ry − IQ (U X; X 0 |U 0 )]t/s} Ry ≤ IQ (U X; X 0 |U 0 )  exp{n[λt + Ry − IQ (U X; X 0 |U 0 )]/s} Ry > IQ (U X; X 0 |U 0 ) = . 0 0 exp{n[λ + Ry − IQ (U X; X |U )]t/s} Ry ≤ IQ (U X; X 0 |U 0 ) After optimizing over t, we get h  i1/s 1 log E Num ,ũ (Q) Ãum ,ũ (QU U 0 X ) n   [λt + Ry − IQ (U X; X 0 |U 0 )] /s [λ + Ry − IQ (U X; X 0 |U 0 )] t/s ≤ min 1≤t≤s  [λ + Ry − IQ (U X; X 0 |U 0 )] t/s   [λ + Ry − IQ (U X; X 0 |U 0 )] /s [λ + Ry − IQ (U X; X 0 |U 0 )] /s =  [λ + Ry − IQ (U X; X 0 |U 0 )] s/s (276) (277) (278) Ry > IQ (U X; X 0 |U 0 ) Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry > IQ (U X; X 0 |U 0 ) Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry ≤ IQ (U X; X 0 |U 0 ) (279) Ry > IQ (U X; X 0 |U 0 ) Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry > IQ (U X; X 0 |U 0 ) Ry ≤ IQ (U X; X 0 |U 0 ), λ + Ry ≤ IQ (U X; X 0 |U 0 ) (280)  = [λ + Ry − IQ (U X; X 0 |U 0 )] /s [λ + Ry − IQ (U X; X 0 |U 0 )] λ + Ry > IQ (U X; X 0 |U 0 ) λ + Ry ≤ IQ (U X; X 0 |U 0 ) ∆ = Ẽ1 (Ry , QU U 0 XX 0 , s, λ). (281) (282) Next, we take the expectation over the set Ãum ,ũ (QU U 0 X ). Since the expression of (281) is independent of the specific codewords, we only have to average it over the cardinality of 44 Ãum ,ũ (QU U 0 X ), namely, over Ñum ,ũ (QU U 0 X ). h n oi EÑ exp nẼ1 (Ry , QU U 0 XX 0 , s, λ) Ry / n o n o . X = Pr eni ≤ Ñum ,ũ (QU U 0 X ) ≤ en(i+1) · exp nẼ1 (Ry , QU U 0 XX 0 , s, i) . (283) i=0 Notice that the type–class enumerator Ñum ,ũ (QU U 0 X ) is a binomial random variable, pertaining to enRy trials and probability of success e−nIQ (X;U 0 |U ) . By making a similar large deviations analysis as we did for the sum (234), we get that the expectation in question behaves like h i1/s  h n oi E Num ,ũ (Q) ≤ EÑ exp nẼ1 (Ry , QU U 0 XX 0 , s, λ) (284) n    o . = exp n · Ẽ1 (Ry , QU U 0 XX 0 , s, λ∗ ) − IQ (X; U 0 |U ) − Ry + , (285) ∆ where λ∗ = [Ry − IQ (X; U 0 |U )]+ . It can also be written as h i1/s  E Num ,ũ (Q) n o  0 |U )] + R − I (U X; X 0 |U 0 )) /s − n [I (X; U 0 |U ) − R ]  exp n ([R − I (X; U  y + y y Q Q Q +    0 |U )] + R > I (U X; X 0 |U 0 ) If [R − I (X; U y + y Q Q n  o ≤ 0 |U )] + R − I (U X; X 0 |U 0 ) − [I (X; U 0 |U ) − R ]  exp n [R − I (X; U  y + y y Q Q Q +    If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ) (286) We substitute it back into (269) and get that n o E [Num (Q)]1/ρ Âum (QU U 0 )  s/ρ   h i X 1/s   ≤ E Num ,ũ (Q) (287)  ũ∈Âum (QU U 0 ) n o  0 |U )] + R − I (U X; X 0 |U 0 )) /ρ − n [I (X; U 0 |U ) − R ] s/ρ  exp n ([R − I (X; U  y + y y + Q Q Q    0 |U )] + R > I (U X; X 0 |U 0 ) If [R − I (X; U y + y Q Q n   o ≤ enµs/ρ · 0 0 |U 0 ) − [I (X; U 0 |U ) − R ]  exp n [R − I (X; U |U )] + R − I (U X; X s/ρ  y + y y Q Q Q +    If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ) (288) n    o   exp n [Ry − IQ (X; U 0 |U )]+ + Ry − IQ (U X; X 0 |U 0 ) + s µ − [IQ (X; U 0 |U ) − Ry ]+ /ρ    If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ) = .  exp {n (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) s/ρ}    If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ) (289) 45 Optimizing over s, we get o n 1 log E [Num (Q)]1/ρ Âum (QU U 0 ) n     0 |U )] + R − I (U X; X 0 |U 0 ) + s µ − [I (X; U 0 |U ) − R ]  [R − I (X; U /ρ y + y y + Q Q Q     0 0 0 0  If [Ry − IQ (X; U |U )]+ + Ry > IQ (U X; X |U ), µ − [IQ (X; U |U ) − Ry ]+  >0      0 0 0 0    [Ry − IQ (X; U |U )]+ + Ry − IQ (U X; X |U ) + s µ − [IQ (X; U |U ) − Ry ]+ /ρ If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0 ≤ min 1≤s≤ρ   (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) s/ρ      If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0     (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) s/ρ   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ ≤ 0 (290)      [Ry − IQ (X; U 0 |U )]+ + Ry − IQ (U X; X 0 |U 0 ) + µ − [IQ (X; U 0 |U ) − Ry ]+ /ρ      If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ − [IQ (X; U 0 |U ) − Ry ]+  >0      0 0 0 0    [Ry − IQ (X; U |U )]+ + Ry − IQ (U X; X |U ) + ρ µ − [IQ (X; U |U ) − Ry ]+ /ρ If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0 =   (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) /ρ      If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0     (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) ρ/ρ   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ ≤ 0 (291)  (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) /ρ    0 0 0 0  >0   If [Ry − IQ (X; U |U )]+ + Ry > IQ (U X; X |U ), µ − [IQ (X; U |U ) − Ry ]+     0 0 0 0   [Ry − IQ (X; U |U )]+ + Ry − IQ (U X; X |U ) + ρ µ − [IQ (X; U |U ) − Ry ]+ /ρ   If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0 = , 0 |U ) − I (U X; X 0 |U 0 ) + µ) /ρ  (2R − I (X; U  y Q Q     If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0     (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ)   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ ≤ 0 (292) where in the last passage, we have used the identity a = [a]+ − [−a]+ on the objective of the first line. Let us look on the constraints of the first line. We can sum the inequalities [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ) and µ − [IQ (X; U 0 |U ) − Ry ]+ > 0 to get 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0, and hence, the first and third lines can be unified. Thus, n o 1 log E [Num (Q)]1/ρ Âum (QU U 0 ) n 46  (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) /ρ     If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0        [Ry − IQ (X; U 0 |U )]+ + Ry − IQ (U X; X 0 |U 0 ) + ρ µ − [IQ (X; U 0 |U ) − Ry ]+ /ρ    If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0 ≤  (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ) /ρ      If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0     (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ)   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ ≤ 0 (293)  0 0 0 (2Ry − IQ (X; U |U ) − IQ (U X; X |U ) + µ) /ρ    If 2R − I (X; U 0 |U ) − I (U X; X 0 |U 0 ) + µ > 0   y Q Q       0 [Ry − IQ (X; U |U )]+ + Ry − IQ (U X; X 0 |U 0 ) + ρ µ − [IQ (X; U 0 |U ) − Ry ]+ /ρ =  If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0      (2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ)   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ ≤ 0 (294) . Next, we have to take the expectation over the set Âum (QU U 0 ). Since the expression of (294) is independent of the specific cloud-centers, we only have to average it over the size of the set Âum (QU U 0 ), namely, over N̂um (QU U 0 ). Define, Ẽ2 (Ry , QU U 0 XX 0 , ρ, µ)  [2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ] /ρ     If 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ > 0    ([R − I (X; U 0 |U )] + R − I (U X; X 0 |U 0 )) /ρ + µ − [I (X; U 0 |U ) − R ] ∆ y + y y + Q Q Q = 0 |U )] + R > I (U X; X 0 |U 0 ), µ − [I (X; U 0 |U ) − R ] ≤ 0 If [R − I (X; U  y + y y Q Q Q  +    [2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ]   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ ≤ 0 (295) We assess the expectation as h n oi EN̂ exp nẼ2 (Ry , QU U 0 XX 0 , ρ, µ) Rz / n o n o . X = Pr eni ≤ N̂um (QU U 0 ) ≤ en(i+1) · exp nẼ2 (Ry , QU U 0 XX 0 , ρ, i) . (296) i=0 The type–class enumerator N̂um (QU U 0 ) is a binomial random variable, pertaining to enRz trials 0 and success rate of e−nIQ (U ;U ) . Repeating once again the large deviations analysis as we did for the sum (234), we get that the expectation in question behaves like n o h n oi 1/ρ 0 0 E [Num (Q)] um ≤ EN̂ exp nẼ2 (Ry , QU U XX , ρ, µ) n    o . = exp n · Ẽ2 (Ry , QU U 0 XX 0 , ρ, µ∗ ) − IQ (U ; U 0 ) − Rz + , 47 (297) (298) . ∆ where µ∗ = [Rz − IQ (U ; U 0 )]+ . It can also be written as n o E [Num (Q)]1/ρ um  n 2R −I (X;U 0 |U )−I (U X;X 0 |U 0 )+µ∗ /ρ−n I (U ;U 0 )−R ) [Q z ]+ Q  e ( y Q    0 0 0 ∗  )+µ >0  If 2Ry − IQ (X; U |U ) − IQ (U X; X |U      n [Ry −IQ (X;U 0 |U )]+ +Ry −IQ (U X;X 0 |U 0 )+ρ µ∗ −[IQ (X;U 0 |U )−Ry ] /ρ−n[IQ (U ;U 0 )−Rz ] + + e ≤ 0 0 0 ∗ 0  U |U )]+ + Ry > IQ (U X; X |U ), µ − [IQ (X; U |U ) − Ry ]+ ≤ 0   If [Ry − IQ (X;   n(2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+µ∗ )−n[IQ (U ;U 0 )−Rz ]+    e  If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ∗ (299)    n 2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+[Rz −IQ (U ;U 0 )]+ /ρ−n[IQ (U ;U 0 )−Rz ]+   e    0 0 0  − IQ (U ; U 0 )]+ > 0, Rz > IQ (U ; U 0 )  z  If 2Ry − IQ (X; U |U ) − IQ (U X; X |U ) + [R   n 2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+[Rz −IQ (U ;U 0 )]+ /ρ−n[IQ (U ;U 0 )−Rz ]+   e    0 ) + [R − I (U ; U 0 )] > 0, R ≤ I (U ; U 0 ) If 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U z z  Q Q +   = 0 |U )−R 0 )−R 0 0 0 ∗ n [R −I (X;U |U )] +R −I (U X;X |U )+ρ µ − I (X;U − I (U ;U  [ ] ]+ /ρ [ z y y y + Q Q Q Q  + e     If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ∗ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0       n 2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+µ∗ −[IQ (U ;U 0 )−Rz ]+   e   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ∗ (300)  0 0 0 0  en(2Ry +Rz −IQ (X;U |U )−IQ (U X;X |U )−IQ (U ;U ))/ρ     If 2Ry + Rz − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) − IQ (U ; U 0 ) > 0, Rz > IQ (U ; U 0 )    0 0 0 0  n  e (2Ry −IQ (X;U |U )−IQ (U X;X |U ))/ρ−n[IQ (U ;U )−Rz ]     If 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) > 0, Rz ≤ IQ (U ; U 0 )    = n [Ry −IQ (X;U 0 |U )]+ +Ry −IQ (U X;X 0 |U 0 )+ρ µ∗ −[IQ (X;U 0 |U )−Ry ]+ −[IQ (U ;U 0 )−Rz ]+ /ρ  e     If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ∗ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0      n 2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+µ∗ −[IQ (U ;U 0 )−Rz ]+   e    If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ∗ (301)  0 0  en(2Ry +Rz −IQ (U X;U X ))/ρ     If 2Ry + Rz − IQ (U X; U 0 X 0 ) > 0, Rz > IQ (U ; U 0 )     en(2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 ))/ρ−n[IQ (U ;U 0 )−Rz ]      If 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) > 0, Rz ≤ IQ (U ; U 0 )    = n [Ry −IQ (X;U 0 |U )]+ +Ry −IQ (U X;X 0 |U 0 )+ρ µ∗ −[IQ (X;U 0 |U )−Ry ]+ −[IQ (U ;U 0 )−Rz ]+ /ρ  e     If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ∗ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0      n 2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+µ∗ −[IQ (U ;U 0 )−Rz ]+    e   If [Ry − IQ (X; U 0 |U )]+ + Ry ≤ IQ (U X; X 0 |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ∗ (302) 48 ≤0 ≤0 ≤0 . ≤0 o n Notice that this upper bound on E [Num (Q)]1/ρ um is, in fact, independent of um . Thus, o n 1/ρ um , which is by substituting it back into (264), we get an upper bound on E Pe|m (C) independent of um . 7.3 Wrapping up Since the bounds of (211) and (264) are independent of um and xmi , they also hold for the  1/ρ  1/ρ unconditional expectations, E Pe|m (C) and E Pe|mi (C) , i.e., E n 1/ρ o Pe|m (C) ≤ n o ∆ E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ]/ρ = ∆w , X QU U 0 XX 0 ∈P and n 1/ρ o Pe|mi (C)   X IN E [Nmi (QU XX 0 , C)]1/ρ um , xmi exp {−nΥ(QU XX 0 , Ry , Rz )/ρ} ≤ E QU XX 0 ∈S + X   ∆ OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi exp {−nΩ(QU U 0 XX 0 , Ry , Rz )/ρ} = ∆s . QU U 0 XX 0 ∈P According to MI, we get that  (  ) y −1 M z −1 M z −1  1 MX [ X X    1/ρ 1 1/ρ Pr  Pe|m (C) > 4 · ∆w  Pe|mi (C) > 4 · ∆s  Mz M y  Mz m=0 i=0 m=0   ( ) y −1 Mz −1 z −1 M  1 MX  X UB  1/ρ  1/ρ 1 X ≤ Pr Pe|m (C) > 4 · ∆w Pe|mi (C) > 4 · ∆s + Pr  Mz My  Mz m=0 m=0 i=0 (303) MI ≤ 1 1 + , 4 4 (304) which means that there exists a code with both y −1 M z −1 M X X  1/ρ 1 Pe|mi (C) ≤ 4 · ∆s , Mz My 1 Mz m=0 i=0 M z −1 X  1/ρ Pe|m (C) ≤ 4 · ∆w . (305) m=0 Now, for a given code C, index the message pairs {(m, i)} according to decreasing order of {Pe|mi (C)}, and furthermore, index the clouds {m} according to decreasing order of {Pe|m (C)}. Expurgate half of the pairs that have the highest scores. Then, among the remaining codewords 49 one can find at least Mz /2 different clouds, such that each one of them still contains at least My /2 codewords. Afterwards, expurgate from the original codebook quarter of the clouds that have the highest scores. Intersecting those two remaining sets, at least Mz /4 values of m are in common. Denote this good eighth by C 0 . Then, for this sub–code 1/ρ Pe|mi (C 0 ) ≤ 16 · ∆s ∀(m, i),   1/ρ Pe|m (C 0 ) ≤ 16 · ∆w ∀m.  (306) Thus, for the strong user, max Pe|mi (C 0 ) m,i    X IN ≤ E [Nmi (QU XX 0 , C)]1/ρ um , xmi exp {−nΥ(QU XX 0 , Ry , Rz )/ρ} QU XX 0 ∈S ρ X +   OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi exp {−nΩ(QU U 0 XX 0 , Ry , Rz )/ρ} (307) QU U 0 XX 0 ∈P  n  oρ IN E [Nmi (QU XX 0 , C)]1/ρ um , xmi exp {−nΥ(QU XX 0 , Ry , Rz )} , QU XX 0 ∈S  n  oρ 1/ρ OUT E [Nmi (QU U 0 XX 0 , C)] max um , xmi exp {−nΩ(QU U 0 XX 0 , Ry , Rz )} . . = max max QU U 0 XX 0 ∈P (308) Since it holds for every ρ ≥ 1, the maximal probability of error can be bounded as max Pe|mi (C 0 ) m,i  ≤ inf max max n  oρ IN E [Nmi (QU XX 0 , C)]1/ρ um , xmi exp {−nΥ(QU XX 0 , Ry , Rz )} , ρ>1 QU XX 0 ∈S  n  oρ 1/ρ OUT um , xmi max E [Nmi (QU U 0 XX 0 , C)] exp {−nΩ(QU U 0 XX 0 , Ry , Rz )} (309) QU U 0 XX 0 ∈P  n  oρ IN ≤ lim max max exp {−nΥ(QU XX 0 , Ry , Rz )} , E [Nmi (QU XX 0 , C)]1/ρ um , xmi ρ→∞ QU XX 0 ∈S  n  oρ 1/ρ OUT 0 0 0 0 max E [Nmi (QU U XX , C)] um , xmi exp {−nΩ(QU U XX , Ry , Rz )} (310) QU U 0 XX 0 ∈P  n  oρ IN exp {−nΥ(QU XX 0 , Ry , Rz )} , = max max lim E [Nmi (QU XX 0 , C)]1/ρ um , xmi QU XX 0 ∈S ρ→∞  n  oρ 1/ρ OUT exp {−nΩ(QU U 0 XX 0 , Ry , Rz )} . max lim E [Nmi (QU U 0 XX 0 , C)] um , xmi QU U 0 XX 0 ∈P ρ→∞ (311) 50 It is easy to see that n  oρ IN E [Nmi (QU XX 0 , C)]1/ρ um , xmi ρ→∞  exp{n[Ry − IQ (X; X 0 |U )]} Ry > IQ (X; X 0 |U ) = lim 0 ρ→∞ exp{n[Ry − IQ (X; X |U )] · ρ} Ry ≤ IQ (X; X 0 |U )  exp{n[Ry − IQ (X; X 0 |U )]} Ry > IQ (X; X 0 |U ) = , 0 Ry ≤ IQ (X; X 0 |U ) lim (312) (313) (314) and similarly, n  oρ OUT E [Nmi (QU U 0 XX 0 , C)]1/ρ um , xmi (315) ρ→∞  exp {n (Rz + Ry − IQ (U X; U 0 X 0 ))}     If Rz + Ry > IQ (U X; U 0 X 0 ), Rz > IQ (U X; U 0 )     exp {n (Ry − IQ (U X; X 0 |U 0 )) − n [IQ (U X; U 0 ) − Rz ] · ρ} ≤ lim Ry > IQ (U X; X 0 |U 0 ), Rz ≤ IQ (U X; U 0 ) ρ→∞  n  If  o   0 )] + R − I (U X; X 0 |U 0 ) − [I (U X; U 0 ) − R ]   exp n [R − I (U X; U z z + y Q Q Q  + ·ρ   0 0 0 If [Rz − IQ (U X; U )]+ + Ry ≤ IQ (U X; X |U ) (316)  0 0 0 0 exp {n (Rz + Ry − IQ (U X; U X ))} Rz + Ry > IQ (U X; U X ), Rz > IQ (U X; U 0 ) . = 0 elsewhere (317) lim Substituting (314) and (317) back into (311) gives the desired result (49)–(51). For the weak user, we have that  X max Pe|m (C 0 ) ≤  m ρ n o E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ]/ρ  . (318) QU U 0 XX 0 ∈P Since it holds for every ρ ≥ 1, the maximal probability of error can be bounded as  ρ n o X max Pe|m (C 0 ) ≤ inf  E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ]/ρ  m ρ>1 (319) QU U 0 XX 0 ∈P ρ n o 1/ρ −n[Ω(Q,Ry ,Rz )+Ry ]/ρ max E [Num (Q)] um e ρ>1 QU U 0 XX 0 ∈P  n oρ = inf max E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ] ρ>1 QU U 0 XX 0 ∈P  n oρ ≤ lim max E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ] ρ→∞ QU U 0 XX 0 ∈P  n oρ = max lim E [Num (Q)]1/ρ um e−n[Ω(Q,Ry ,Rz )+Ry ] . . = inf  QU U 0 XX 0 ∈P ρ→∞ 51 (320) (321) (322) (323) Finally, ρ o  n lim E [Num (Q)]1/ρ um ρ→∞  0 0  en(2Ry +Rz −IQ (U X;U X ))      If 2Ry + Rz − IQ (U X; U 0 X 0 ) > 0, Rz > IQ (U ; U 0 )   0 0 0 0   en(2Ry −IQ (X;U |U )−IQ (U X;X |U ))−n[IQ (U ;U )−Rz ]·ρ     If 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) > 0, Rz ≤ IQ (U ; U 0 )    ≤ lim n [Ry −IQ (X;U 0 |U )]+ +Ry −IQ (U X;X 0 |U 0 )+ρ µ∗ −[IQ (X;U 0 |U )−Ry ]+ −[IQ (U ;U 0 )−Rz ]+ ρ→∞  e     If [Ry − IQ (X; U 0 |U )]+ + Ry > IQ (U X; X 0 |U 0 ), µ∗ − [IQ (X; U 0 |U ) − Ry ]+ ≤ 0      n 2Ry −IQ (X;U 0 |U )−IQ (U X;X 0 |U 0 )+µ∗ −[IQ (U ;U 0 )−Rz ] ·ρ   + e    0 0 If [Ry − IQ (X; U |U )]+ + Ry ≤ IQ (U X; X |U 0 ), 2Ry − IQ (X; U 0 |U ) − IQ (U X; X 0 |U 0 ) + µ∗ ≤ 0 (324) ( 0 0 en(2Ry +Rz −IQ (U X;U X )) IQ (U X; U 0 X 0 ) < 2Ry + Rz , IQ (U ; U 0 ) < Rz = , (325) 0 elsewhere and so, max Pe|m (C 0 ) m ≤ QU U 0 XX 0 ∈P: max IQ (U X;U 0 X 0 )<2Ry +Rz ,IQ (U ;U 0 )<Rz e−n[IQ (U X;U 0 X 0 )+Ω(Q,R y ,Rz )−Ry −Rz ]             0 0 = exp −n [IQ (U X; U X ) + Ω(Q, Ry , Rz ) − Ry − Rz ] , min   QU U 0 XX 0 ∈P     IQ (U X;U 0 X 0 )<2Ry +Rz ,     0 (326) (327) IQ (U ;U )<Rz which is (48). The proof of Theorem 3 is now complete. Appendix A GLD ML1 Comparison Between Ewu (Ry , Rz ) and Ewu (Ry , Rz ) In order to compare between the expurgated exponents, let us first compare between Dt (QXX 0 ) [defined in (27)] and Ω(QU U 0 XX 0 , Ry , Rz ) [defined in (47)]. Recall that n o exp − nΩ(QU U 0 XX 0 , Ry , Rz ) (A.1)   h i  . X = W (z|x) exp − n max g(P̂uxz ), φ(Ry , P̂uz ), ψ(Ry , Rz , P̂z ) − g(P̂u0 x0 z ) + z ) ( exp{ng(P̂u0 x0 z )} . X , = W (z|x) · min 1, exp{ng(P̂uxz )} + exp{nφ(Ry , P̂uz )} + exp{nψ(Ry , Rz , P̂z )} z (A.2) 52 and,   W (z|x0 ) t . X W (z|x) · exp{−nDt (QXX 0 )} = , t ∈ [0, 1], W (z|x) z which can also be written using the same notation as " #t eng(P̂u0 x0 z ) . X W (z|x) · exp{−nDt (QXX 0 )} = , t ∈ [0, 1]. eng(P̂uxz ) z It is easy to argue that for t ∈ [0, 1]: ( ) exp{ng(P̂u0 x0 z )} min 1, exp{ng(P̂uxz )} + exp{nφ(Ry , P̂uz )} + exp{nψ(Ry , Rz , P̂z )} #t " eng(P̂u0 x0 z ) . ≤ eng(P̂uxz ) (A.3) (A.4) (A.5) To see why this is true, let us distinguish between the cases g(P̂u0 x0 z ) ≤ g(P̂uxz ) and g(P̂u0 x0 z ) > g(P̂uxz ). In the former case, ( ) exp{ng(P̂u0 x0 z )} min 1, exp{ng(P̂uxz )} + exp{nφ(Ry , P̂uz )} + exp{nψ(Ry , Rz , P̂z )} ≤ exp{ng(P̂u0 x0 z )} (A.6) exp{ng(P̂uxz )} #t " exp{ng(P̂u0 x0 z )} . ≤ exp{ng(P̂uxz )} (A.7) In the latter case, the right-hand side of (A.5) exceeds unity, whereas the left-hand side is always less then unity. The conclusion from this observation is that at least for the choice P g(Q) = u,x,z Q(u, x, z) log W (z|x), the inequality Ω(QU U 0 XX 0 , Ry , Rz ) ≥ Dt (QXX 0 ) holds for any t ∈ [0, 1]. Now, we have the following ML1 Ewu (Ry , Rz ) = max 0≤t≤1 ≤ ≤ [IQ (U X; U 0 X 0 ) + Dt (QXX 0 )] − Ry − Rz (A.8) min [IQ (U X; U 0 X 0 ) + Ω(QU U 0 XX 0 , Ry , Rz )] − Ry − Rz (A.9) min [IQ (U X; U 0 X 0 ) + Ω(QU U 0 XX 0 , Ry , Rz )] − Ry − Rz (A.10) min QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )<2Ry +Rz QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )<2Ry +Rz QU U 0 XX 0 ∈P IQ (U X;U 0 X 0 )<2Ry +Rz IQ (U ;U 0 )<Rz GLD = Ewu (Ry , Rz ), (A.11) GLD hence, the GLD–based expurgated bound, Ewu (Ry , Rz ), is at least as tight as the ML–based expurgated bound of Theorem 1. 53 Appendix B GLD Comparison Between Ewu (Ry , Rz ) and Ew (Ry , Rz ) The expurgated exponent of the weak user under the GLD is given by [IQ (U X; U 0 X 0 ) + Ω(Q, Ry , Rz )] − Ry − Rz , (B.1) P̃ = {QU U 0 XX 0 : Q ∈ P, IQ (U X; U 0 X 0 ) < 2Ry + Rz , IQ (U ; U 0 ) < Rz }. (B.2) GLD Ewu (Ry , Rz ) = min QU U 0 XX 0 ∈P̃ where, ∆ Let us choose g(Q) = IQ (U X; Z). We then get φ(Ry , QU Z ) = [g(Q) − IQ (X; Z|U )] + Ry = IQ (U ; Z) + Ry , max (B.3) {QX|U Z : IQ (X;Z|U )≤Ry } and ψ(Ry , Rz , QZ ) = [g(Q) − IQ (U X; Z)] + Rz + Ry max {QU X|Z : IQ (U ;Z)≤Rz , IQ (U X;Z)≤Rz +Ry } = Rz + Ry , (B.4) (B.5) and furthermore Ω(QU U 0 XX 0 , Ry , Rz ) = min QZ|U U 0 XX 0 h  D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; Z|U X)  + max g(QU XZ ), φ(Ry , QU Z ), ψ(Ry , Rz , QZ ) − g(QU 0 X 0 Z )  = min D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; Z|U X) i  + (B.6) QZ|U U 0 XX 0 h  + max IQ (U X; Z), IQ (U ; Z) + Ry , Rz + Ry i  − IQ (U X ; Z) . 0 0 + (B.7) Define ∆ P̃z = {QU U 0 XX 0 Z : Q ∈ P, IQ (U X; U 0 X 0 ) < 2Ry + Rz , IQ (U ; U 0 ) < Rz }, ∆ P̂z = {QU 0 X 0 |U XZ : Q ∈ P, IQ (U X; U 0 X 0 ) < 2Ry + Rz , IQ (U ; U 0 ) < Rz }. 54 (B.8) (B.9) Substituting into (B.1) gives GLD Ewu (Ry , Rz ) ( ≥ min  min QZ|U U 0 XX 0 QU U 0 XX 0 ∈P̃ h D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; Z|U X)  + max IQ (U X; Z), IQ (U ; Z) + Ry , Rz + Ry ) i  0 0 + IQ (U X; U X ) − IQ (U X ; Z) 0 0 + − Ry − Rz (B.10) ( = D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; U XZ) min QU U 0 XX 0 Z ∈P̃z h  + max IQ (U X; Z), IQ (U ; Z) + Ry , Rz + Ry i − IQ (U 0 X 0 ; Z) ) − Ry − Rz + (B.11) ( = D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; U X|Z) + IQ (U 0 X 0 ; Z) min QU U 0 XX 0 Z ∈P̃z h  + max IQ (U X; Z), IQ (U ; Z) + Ry , Rz + Ry i − IQ (U X ; Z) 0 ) 0 + − Ry − Rz (B.12) ( = min QU U 0 XX 0 Z ∈P̃z D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; U X|Z) ) + max IQ (U X; Z), IQ (U 0 X 0 ; Z), IQ (U ; Z) + Ry , Rz + Ry  − Ry − Rz (B.13) ( = min min QZ|U X Q 0 0 U X |U XZ ∈P̂z D(QZ|U X kWZ|X |QU X ) + IQ (U 0 X 0 ; U X|Z) )  0 0 − Ry − Rz + max IQ (U X; Z), IQ (U X ; Z), IQ (U ; Z) + Ry , Rz + Ry ( = min QZ|U X D(QZ|U X kWZ|X |QU X ) + min (B.14)  IQ (U 0 X 0 ; U X|Z) QU 0 X 0 |U XZ ∈P̂z + max IQ (U X; Z), IQ (U 0 X 0 ; Z), IQ (U ; Z) + Ry , Rz + Ry  ) − Ry − Rz (B.15) ( = min QZ|U X D(QZ|U X kWZ|X |QU X ) )  + max IQ (U ; Z) + IQ (X; Z|U ), IQ (U ; Z) + Ry , Rz + Ry = min QZ|U X − Ry − Rz (B.16) n D(QZ|U X kWZ|X |QU X ) o  + max IQ (U ; Z) + IQ (X; Z|U ) − Ry − Rz , IQ (U ; Z) − Rz , 0 55 (B.17) = min QZ|U X n D(QZ|U X kWZ|X |QU X )    o + max IQ (U ; Z) + IQ (X; Z|U ) − Ry − Rz , IQ (U ; Z) − Rz + (B.18) n o    = min D(QZ|U X kWZ|X |QU X ) + IQ (U ; Z) + max IQ (X; Z|U ) − Ry , 0 − Rz + (B.19) QZ|U X n h i o = min D(QZ|U X kWZ|X |QU X ) + IQ (U ; Z) + [IQ (X; Z|U ) − Ry ]+ − Rz (B.20) QZ|U X + = Ew (Ry , Rz ), (B.21) where the first inequality is because the metric g(Q) = IQ (U X; Z) may be sub–optimal, and where the inner minimum of (B.15) is attained for a random variable (U 0 , X 0 ) which is independent of (U, X, Z), for which both IQ (U 0 X 0 ; U X|Z) = 0 and IQ (U 0 X 0 ; Z) = 0, and the constraints IQ (U ; U 0 ) ≤ Rz and IQ (U X; U 0 X 0 ) ≤ 2Ry + Rz are obviously satisfied since IQ (U ; U 0 ) = 0 and IQ (U X; U 0 X 0 ) = 0. Appendix C Proving that Pr{S (m, i, um , y)} decays double-exponentially fast Let Num ,y (Q) denote the number of codewords xmj ∈ Cm , such that the joint empirical distribution of xmj with um and y is QU XY , that is o X n Num ,y (Q) = I (y, um , xmj ) ∈ T (QU XY ) . (C.1) j6=i First, note that Φm,i (um , y) = X exp{ng(P̂um xmj y )} = X Num ,y (Q)eng(Q) . (C.2) Q j6=i M −1 y Thus, taking the randomness of {X mj }j=0 into account, n o Pr Φm,i (um , y) ≤ exp{nφ(Ry − , P̂um y )} ( ) X ng(Q) = Pr Num ,y (Q)e ≤ exp{nφ(Ry − , P̂um y )} (C.3) (C.4) Q   ng(Q) ≤ Pr max Num ,y (Q)e ≤ exp{nφ(Ry − , P̂um y )} Q o \n = Pr Num ,y (Q)eng(Q) ≤ exp{nφ(Ry − , P̂um y )} (C.5) (C.6) Q = Pr o \n Num ,y (Q) ≤ exp{n[φ(Ry − , P̂um y ) − g(Q)]} . Q 56 (C.7) Now, Num ,y (Q) is a binomial random variable with enRy trials and success rate which is of the exponential order of e−nIQ (X;Y |U ) . We prove that by the very definition of the function φ(Ry − , P̂um y ), there must exist some conditional distribution Q∗X|U Y such that for Q∗ = P̂um y × Q∗X|U Y , the two inequalities IQ∗ (X; Y |U ) ≤ Ry −  and Ry −  − IQ∗ (X; Y |U ) ≥ φ(Ry − , P̂um y ) − g(Q∗ ) hold. To show that, we assume conversely, i.e., that for every conditional distribution QX|U Y , which defines Q = P̂um y × QX|U Y , either IQ (X; Y |U ) > Ry −  or Ry − IQ (X; Y |U ) −  < φ(Ry − , P̂um y ) − g(Q), which means that for every distribution Q Ry −  < max{IQ (X; Y |U ), IQ (X; Y |U ) + φ(Ry − , P̂um y ) − g(Q)} = IQ (X; Y |U ) + [φ(Ry − , P̂um y ) − g(Q)]+ . (C.8) (C.9) Writing it slightly differently, for every QX|U Y there exists some real number t ∈ [0, 1] such that Ry −  < IQ (X; Y |U ) + t[φ(Ry − , P̂um y ) − g(Q)], (C.10) or equivalently, φ(Ry − , P̂um y ) > max min g(Q) + QX|U Y t∈[0,1]  Ry − IQ (X; Y |U ) −  t = max g(Q) + Ry − IQ (X; Y |U ) −  −∞ = max QX|U Y (C.11) IQ (X; Y |U ) ≤ Ry −  IQ (X; Y |U ) > Ry −  [g(Q) − IQ (X; Y |U )] + Ry −  {QX|U Y : IQ (X;Y |U )≤Ry −} ≡ φ(Ry − , P̂um y ), (C.12) (C.13) (C.14) which is a contradiction. Let the conditional distribution Q∗X|U Y be as defined above. Then, o \n Pr Num ,y (Q) ≤ exp{n[φ(Ry − , P̂um y ) − g(Q)]} (C.15) Q n o ≤ Pr Num ,y (Q∗ ) ≤ exp{n[φ(Ry − , P̂um y ) − g(Q∗ )]} . (C.16) Now, we know that both of the inequalities IQ∗ (X; Y |U ) ≤ Ry −  and Ry − IQ∗ (X; Y |U ) −  ≥ φ(Ry − , P̂um y ) − g(Q∗ ) hold. By the Chernoff bound, the probability of (C.16) is upper bounded by exp n o − enRy D(e−an ke−bn ) , (C.17) where a = Ry + g(Q∗ ) − φ(Ry − , P̂um y ) and b = IQ∗ (X; Y |U ), and where D(αkβ), for α, β ∈ [0, 1], is the binary divergence function, that is D(αkβ) = α log α 1−α + (1 − α) log . β 1−β 57 (C.18) Since a − b ≥ , the binary divergence is lower bounded as follows ([16, Section 6.3]): n o D(e−an ke−bn ) ≥ e−bn 1 − e−(a−b)n [1 + n(a − b)] ≥ e−nIQ∗ (X;Y |U ) [1 − e−n (1 + n)], (C.19) (C.20) where in the second inequality, we invoked the decreasing monotonicity of the function f (t) = (1 + t)e−t for t ≥ 0. Finally, we get that n o Pr Num ,y (Q∗ ) ≤ exp{n[φ(Ry − , P̂um y ) − g(Q∗ )]} n o ≤ exp − enRy · e−nIQ∗ (X;Y |U ) [1 − e−n (1 + n)]  ≤ exp − en [1 − e−n (1 + n)]  = exp − en + n + 1 . (C.21) (C.22) (C.23) (C.24) Appendix D Proving that Pr{K (m, y)} decays double-exponentially fast Let Ñy (QU Y ) denote the number of cloud-centers um0 , m0 6= m, such that the joint empirical distribution of um0 with y is QU Y , that is Ñy (QU Y ) = X n o I (y, um0 ) ∈ T (QU Y ) . (D.1) m0 6=m In addition, let Ny (Q) denote the number of codewords xm0 j ∈ Cm0 , for any m0 6= m for which (y, um0 ) ∈ T (QU Y ), such that the joint empirical distribution of xm0 j with um0 and y is QU XY , that is y −1 n o X MX I (y, um0 , xm0 j ) ∈ T (QU XY ) . Ny (Q) = m0 6=m (D.2) j=0 As before, we start by observing that Ψm (y) = y −1 X MX m0 6=m exp{ng(P̂um0 xm0 j y )} = j=0 X X QU |Y QX|U Y 58 Ny (Q)eng(Q) . (D.3) Thus, considering the randomness of the cloud–centers {U m0 } and the codewords {X m0 j }, n o Pr Ψm (y) ≤ exp{nψ(Ry − , Rz − , P̂y )} ( ) X X = Pr Ny (Q)eng(Q) ≤ exp{nψ(Ry − , Rz − , P̂y )} (D.4) (D.5) QU |Y QX|U Y   ng(Q) ≤ Pr max max Ny (Q)e ≤ exp{nψ(Ry − , Rz − , P̂y )} QU |Y QX|U Y o \ \ n = Pr Ny (Q)eng(Q) ≤ exp{nψ(Ry − , Rz − , P̂y )} (D.6) (D.7) QU |Y QX|U Y = Pr \ o \ n Ny (Q) ≤ exp{n[ψ(Ry − , Rz − , P̂y ) − g(Q)]} . (D.8) QU |Y QX|U Y We now show that by the very definition of the function ψ(Ry − , Rz − , P̂y ), there must exist some conditional distributions Q∗U |Y and Q∗X|U Y such that for Q∗ = P̂y × Q∗U |Y × Q∗X|U Y , the three inequalities IQ∗ (U ; Y ) ≤ Rz − , IQ∗ (U ; Y ) + IQ∗ (X; Y |U ) ≤ Rz + Ry − 2 and Rz + Ry − IQ∗ (U ; Y ) − IQ∗ (X; Y |U ) − 2 ≥ ψ(Ry − , Rz − , P̂y ) − g(Q∗ ) hold. Assume conversely, that for every QU |Y and every QX|U Y , which defines Q = P̂y × QU |Y × QX|U Y , either IQ (U ; Y ) > Rz −  or IQ (U ; Y ) + IQ (X; Y |U ) > Rz + Ry − 2 or Rz + Ry − IQ (U ; Y ) − IQ (X; Y |U ) − 2 < ψ(Ry − , Rz − , P̂y ) − g(Q), which means that for every Q Rz −  (D.9) n < max IQ (U ; Y ), IQ (U ; Y ) + IQ (X; Y |U ) − Ry + , o IQ (U ; Y ) + IQ (X; Y |U ) − Ry +  + ψ(Ry − , Rz − , P̂y ) − g(Q) n = IQ (U ; Y ) + max 0, IQ (X; Y |U ) − Ry + , o IQ (X; Y |U ) − Ry +  + ψ(Ry − , Rz − , P̂y ) − g(Q) h n = IQ (U ; Y ) + max IQ (X; Y |U ) − Ry + , oi IQ (X; Y |U ) − Ry +  + ψ(Ry − , Rz − , P̂y ) − g(Q) + h n oi = IQ (U ; Y ) + IQ (X; Y |U ) − Ry +  + max 0, ψ(Ry − , Rz − , P̂y ) − g(Q) + h   i = IQ (U ; Y ) + IQ (X; Y |U ) − Ry +  + ψ(Ry − , Rz − , P̂y ) − g(Q) + + (D.10) (D.11) (D.12) (D.13) (D.14) or, in other words, that for every QU |Y and QX|U Y there exists (t, s) ∈ [0, 1]2 such that h  i Rz −  < IQ (U ; Y ) + t IQ (X; Y |U ) − Ry +  + s ψ(Ry − , Rz − , P̂y ) − g(Q) , 59 (D.15) or equivalently, ψ(Ry − , Rz − , P̂y ) (D.16) ! Rz − IQ (U ; Y ) −  + Ry − IQ (X; Y |U ) −  QU |Y QX|U Y t  1 Rz + Ry − IQ (U X; Y ) − 2 = max max min g(Q) + s {QU |Y : IQ (U ;Y )≤Rz −} QX|U Y s∈[0,1] > max max = min (t,s)∈[0,1]2 g(Q) + 1 s max (D.17) (D.18) [g(Q) − IQ (U X; Y )] + Rz + Ry − 2 max {QU |Y : IQ (U ;Y )≤Rz −} {QX|U Y : IQ (U X;Y )≤Rz +Ry −2} (D.19) = max [g(Q) − IQ (U X; Y )] + Rz + Ry − 2 {QU X|Y : IQ (U ;Y )≤Rz −, IQ (U X;Y )≤Rz +Ry −2} ≡ ψ(Ry − , Rz − , P̂y ), (D.20) (D.21) which is a contradiction. Let then Q∗U |Y and Q∗X|U Y be two conditional distributions as defined above. Then, Pr \ o \ n Ny (Q) ≤ exp{n[ψ(Ry − , Rz − , P̂y ) − g(Q)]} (D.22) QU |Y QX|U Y n o ≤ Pr Ny (Q∗ ) ≤ exp{n[ψ(Ry − , Rz − , P̂y ) − g(Q∗ )]} . (D.23) Now, remember that IQ∗ (U ; Y ) ≤ Rz −, IQ∗ (U X; Y ) ≤ Rz +Ry −2 and Rz +Ry −IQ∗ (U X; Y )− 2 ≥ ψ(Ry − , Rz − , P̂y ) − g(Q∗ ). Next, given that Ñy (Q∗U Y ) = enλ , Ny (Q∗ ) is a binomial random variable with en(Ry +λ) trials and success rate of the exponential order of e−nIQ∗ (X;Y |U ) . By the Chernoff bound, the probability of (D.23) is upper bounded by o n Pr Ny (Q∗ ) ≤ exp{n[ψ(Ry − , Rz − , P̂y ) − g(Q∗ )]} Ñy (Q∗U Y ) = enλ n o ( exp − en(Ry +λ) D(e−an ke−bn ) λ∈G ≤ 1 λ ∈ Gc where a = Ry + λ + g(Q∗ ) − ψ(Ry − , Rz − , P̂y ), b = IQ∗ (X; Y |U ) and n o G = λ IQ∗ (X; Y |U ) ≤ Ry −  + λ + g(Q∗ ) − ψ(Ry − , Rz − , P̂y ) . (D.24) (D.25) (D.26) Noting that a − b = Ry + λ − IQ∗ (X; Y |U ) + g(Q∗ ) − ψ(Ry − , Rz − , P̂y ) (D.27) = Rz + Ry − IQ∗ (U X; Y ) + g(Q∗ ) − ψ(Ry − , Rz − , P̂y ) + λ + IQ∗ (U ; Y ) − Rz (D.28) ≥ 2 + λ + IQ∗ (U ; Y ) − Rz (D.29) ∆ = Θ(λ, Rz ), (D.30) 60 the binary divergence can be lower bounded as: D(e−an ke−bn ) ≥ e−bn {1 − e−(a−b)n [1 + n(a − b)]} h i ≥ e−nIQ∗ (X;Y |U ) 1 − e−nΘ(λ,Rz ) (1 + nΘ(λ, Rz )) , (D.31) (D.32) where in the second inequality, we have used the decreasing monotonicity of the function f (t) = (1 + t)e−t for t ≥ 0. Thus, o − en(Ry +λ) D(e−an ke−bn )  h i n(Ry +λ) −nIQ∗ (X;Y |U ) −nΘ(λ,Rz ) ≤ exp − e ·e 1−e (1 + nΘ(λ, Rz ))  h i n(Rz +Ry −IQ∗ (U X;Y )+IQ∗ (U ;Y )−Rz +λ) −nΘ(λ,Rz ) = exp − e · 1−e (1 + nΘ(λ, Rz ))  h i n(2+IQ∗ (U ;Y )−Rz +λ) −nΘ(λ,Rz ) ≤ exp − e · 1−e (1 + nΘ(λ, Rz ))  h i nΘ(λ,Rz ) −nΘ(λ,Rz ) = exp − e · 1−e (1 + nΘ(λ, Rz )) n o = exp − enΘ(λ,Rz ) + nΘ(λ, Rz ) + 1 . exp n (D.33) (D.34) (D.35) (D.36) (D.37) (D.38) Let us continue from (D.25) and upper bound as follows o n Pr Ny (Q∗ ) ≤ exp{n[ψ(Ry − , Rz − , P̂y ) − g(Q∗ )]} Ñy (Q∗U Y ) = enλ n o   ≤ exp − en(Ry +λ) D(e−an ke−bn ) · I G + I G c n o  ≤ exp − enΘ(λ,Rz ) + nΘ(λ, Rz ) + 1 + I G c . (D.39) (D.40) (D.41) Then, the next step will be to evaluate the expectation over the enumerator Ñy (Q∗U Y ).   n o  E exp − enΘ(λ,Rz ) + nΘ(λ, Rz ) + 1 + I G c (D.42) Rz /δ n o . X = Pr eniδ ≤ Ñy (Q∗U Y ) ≤ en(i+1)δ i=0  × exp n −e nΘ(iδ,Rz ) o  + nΘ(iδ, Rz ) + 1 + I G c  . (D.43) Moving forward, notice that the type class enumerator Ñy (Q∗U Y ) is a sum of enRz independent binary random variables, each one with an expectation of e−nIQ∗ (U ;Y ) . On the one hand, we have n o n o . Pr Ñy (Q∗U Y ) ≤ ent = I Rz ≤ IQ∗ (U ; Y ) + t , 61 (D.44) and on the other hand, we have o n ∗ . Pr Ñy (Q∗U Y ) ≥ ent = e−nÊ(QU Y ,t) (D.45) where, (   ∗ (U ; Y ) − Rz I Q + Ê(Q∗U Y , t) = ∞   Rz − IQ∗ (U ; Y ) + ≥ t   Rz − IQ∗ (U ; Y ) + < t. (D.46)  Since Rz −  ≥ IQ∗ (U ; Y ), we conclude that the event ent ≤ Ñy (Q∗U Y ) ≤ en(t+δ) occurs with  very high probability if and only if Rz −  − IQ∗ (U ; Y ) ∈ [t, t + δ), otherwise, its probability has a double exponential decay. Therefore, it turns out that the sum in (D.43) is dominated  by one summand only, the one for which i = Rz −  − IQ∗ (U ; Y ) /δ. For this value of i, we have that Θ(iδ, Rz ) = 2 + iδ + IQ∗ (U ; Y ) − Rz = , (D.47) and, in addition,   I G c = I IQ∗ (X; Y |U ) > Ry −  + iδ + g(Q∗ ) − ψ(Ry − , Rz − , P̂y )  = I IQ∗ (U X; Y ) > Ry + Rz − 2 + g(Q∗ ) − ψ(Ry − , Rz − , P̂y ) = 0, (D.48) (D.49) (D.50) thanks to the fact that Rz + Ry − IQ∗ (U X; Y ) − 2 ≥ ψ(Ry − , Rz − , P̂y ) − g(Q∗ ). By using the fact that δ > 0 is arbitrarily small, we get that the expectation in question behaves like   n o  c  . nΘ(λ,Rz ) E exp − e + nΘ(λ, Rz ) + 1 + I G = exp − en + n + 1 . (D.51) References [1] T. M. Cover, “Broadcast channels,” IEEE Trans. on Inform. Theory, vol. 18, no. 1, pp. 2–14, January 1972. [2] P. P. Bergmans, “Random coding theorem for broadcast channels with degraded components,” IEEE Trans. on Inform. Theory, vol. IT-19, pp. 197-207, March 1973. [3] J. Körner and K. Marton, “General broadcast channels with degraded message sets,” IEEE Trans. on Inform. Theory, vol. IT-23, pp. 60-64, January 1977. 62 [4] J. Körner and A. Sgarro, “Universally attainable error exponents for broadcast channels with degraded message sets,” IEEE Trans. on Inform. Theory, vol. 26, no.6, pp. 670-679, November 1980. [5] Y. Kaspi and N. Merhav, “Error exponents for broadcast channels with degraded message sets,” IEEE Trans. on Inform. Theory, vol. 57, no. 1, pp. 101–123, January 2011. [6] R. Averbuch and N. Merhav, “Exact random coding exponents and universal decoders for the asymmetric broadcast channel,” submitted for publication, February 2017. Available on–line at https://arxiv.org/pdf/1702.08003.pdf [7] I. Csiszár, J. Körner, and K. Marton, “A new look at the error exponent of discrete memoryless channels,” in Proc. ISIT ‘77, p. 107 (abstract), Cornell University, Ithaca, New York, 1977. [8] J. Scarlett, L. Peng, N. Merhav, A. Martinèz, and A. G. i Fàbregas, “Expurgated random– coding ensembles: exponents, refinements and connections,” IEEE Trans. on Inform. Theory, vol. 60, no. 8, pp. 4449–4462, August 2014. [9] N. Merhav, “List decoding – random coding exponents and expurgated exponents,” IEEE Trans. on Inform. Theory, vol. 60, no. 11, pp. 6749–6759, November 2014. [10] L. Weng, S. S. Pradhan, and A. Anastasopoulos, “Error exponent regions for gaussian broadcast and multiple–access channels,” IEEE Trans. on Inform. Theory, vol. 54, no. 7, pp. 2919–2942, July 2008. [11] A. Nazari, A. Anastasopoulos, and S. S. Pradhan, “Error exponent for multiple–access channels: lower bounds,” IEEE Trans. on Inform. Theory, vol. 60, no. 9, pp. 5095–5115, September 2014. [12] J. Scarlett, A. Martinèz, and A. G. i Fàbregas, “The likelihood decoder: error exponents and mismatch,” Proc. 2015 IEEE International Symposium on Information Theory (ISIT 2015), pp. 86–90, Hong Kong, June 2015. [13] N. Merhav, “The generalized stochastic likelihood decoder: random coding and expurgated bounds,” IEEE Trans. on Inform. Theory, vol. 63, no. 8, pp. 5039–5051, August 63 2017. See also a correction at IEEE Trans. on Inform. Theory, vol. 63, no. 10, pp. 6827– 6829, October 2017. [14] I. Csiszár and J. Körner, Information Theory: Coding Theorems for Discrete Memoryless Systems, Cambridge University Press, 2011. [15] R. G. Gallager, Information Theory and Reliable Communication, New York, Wiley 1968. [16] N. Merhav,“Statistical physics and information theory,” Foundations and Trends in Communications and Information Theory, vol. 6, nos. 12, pp. 1–212, 2009. [17] N. Merhav, “Exact random coding error exponents of optimal bin index decoding,” IEEE Trans. on Inform. Theory, vol. 60, no. 10, pp. 6024–6031, October 2014. 64
7cs.IT
arXiv:cs/0011027v1 [cs.SE] 20 Nov 2000 Extended Abstract – Model-Based Debugging of Java Programs∗† Cristinel Mateis Markus Stumptner Dominik Wieland Franz Wotawa ‡ Technische Universität Wien Institut für Informationssysteme Database and Artificial Intelligence Group Favoritenstraße 9–11, A-1040 Vienna, Austria {mateis,mst,wieland,wotawa}@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at 1 Introduction Model-based reasoning is a central concept in current research into intelligent diagnostic systems. It is based on the assumption that sources of incorrect behavior in technical devices can be located and identified via the existence of a model describing the basic properties of components of a certain application domain. When actual data concerning the misbehavior of a system composed from such components is available, a domain-independent diagnosis engine can be used to infer which parts of the system contribute to the observed behavior. Model-based Diagnosis provides a set of proven algorithms and methods for searching faults [14] and identifying points of measurement [3]. ∗ This work was partially supported by the Austrian Science Fund project P12344-INF and project N Z29-INF. † In M. Ducassé (ed), proceedings of the Fourth International Workshop on Automated Debugging (AADEBUG 2000), August 2000, Munich. COmputer Research Repository (http://www.acm.org/corr/), cs.SE/0011027; whole proceedings: cs.SE/0010035. ‡ Authors are listed in alphabetical order. 1 2 AADEBUG 2000 This paper describes the application of the model-based approach to the debugging of Java programs written in a subset of Java. We show how a simple dependency model can be derived from a program, demonstrate the use of the model for debugging and reducing the required user interactions, give a comparison of the functional dependency model with program slicing [16], and finally discuss some current research issues. 2 Model-Based Diagnosis The model-based approach is based on the notion of providing a representation of the correct behavior of a technical system. By describing the structure of a system and the function of its components, it is possible to ask for the reasons why the desired behavior was not achieved. In the diagnosis community, the model-based approach has achieved wide recognition due to its advantages: • once an adequate model has been developed for a particular domain, it can be used to diagnose different actual systems of that domain • the model can be used to search for single or multiple faults in the system without alteration • different diagnosis algorithms can be used for a given model • the existence of a clear formal basis for judging and computing diagnoses Using the standard consistency-based view as defined by Reiter [14], a diagnosis system can be seen formally as a tuple (SD, COMP ) where SD is a logical theory sentence modeling the behavior of the given system (in our case the program to be debugged), and COMP a set of components, i.e., statements. A diagnosis system together with a set of observations OBS, i.e., a test-case, forms a diagnosis problem. A diagnosis ∆, i.e., a bug candidate, is a subset of COMP , with the property that the assumption that all statements in ∆ are incorrect, and the rest of the statements is correct, should be consistent with SD and OBS. Formally, ∆ is a diagnosis iff SD ∪ OBS ∪ {¬AB(C)|C ∈ COMP \ ∆} ∪ {AB(C)|C ∈ ∆} is consistent. A component not working as expected, i.e., a statement containing a bug, is represented by the predicate AB(C). Model-based Debugging of Java Programs 3 The basis for this is that an incorrect output value (where the incorrectness can be observed directly or derived from observations of other signals) cannot be produced by a correctly functioning component with correct inputs. Therefore, to make a system with observed incorrect behavior consistent with the description and avoid a contradiction, some subset of its components must be assumed to work incorrectly. In practical terms, one is interested in finding minimal diagnoses, i.e., a minimal set of components whose malfunction explains the misbehavior of the system (otherwise, one could explain every error by simply assuming every component to be malfunctioning). Basic properties of the approach as well as algorithms for efficient computation of diagnoses are described in [14]. Starting from straightforward work that used a logic program directly as system descriptions [2, 1], in the last years the use of model-based reasoning (MBR) for debugging of software has been examined in a wider context [12, 4, 15, 10, 11]. All of the approaches have in common that they use a model derived from a program for locating (or, rarely, correcting) a bug. They differ in the considered programming language (ranging from purely logical languages to hardware description languages – in particular VHDL [4], functional, and finally imperative languages), and the type of model (qualitative [12], dependency-, or value-based models). The purpose of previous research was to show the applicability of MBR in the software domain by introducing models, often for special purpose languages. Our current work deals with the extension and application of these principles to a mainstream language (Java). This paper presents first results of an implemented debugger prototype using different example programs. The JADE debugger currently implements a functional dependency model that extends our earlier work [10, 11]. The granularity of the debugger, i.e., the elements of a program that are considered to be faulty or not, is currently set to the statement level (instead of individual expression level) for efficiency reasons. The JADE debugger combines the standard operation modes of diagnosis systems and standard debuggers. First, the program is converted into the dependency representation which is compiled into a logical model. Once the program has been executed actual observations of its behavior can be provided. This behavior together with the logical model is used by the diagnosis engine to compute bug candidates that map back to positions (and statements) within the program to be debugged (see Figure 1). 4 AADEBUG 2000 Programming Language Specification Model fragments Modeling Java Programming Language Program Model [SD] Conversion Java Program Diagnoses [Bug locations] Testcases [OBS] Diagnosis Method Call Figure 1: Model-based Diagnosis for Debugging 3 Modeling for Debugging We first give an overview of computing the dependencies for Java programs and then describe the derivation of the system description which is used for diagnosis. Dependencies For the sake of brevity we omit the discussion of objectoriented features such as dynamic binding in this paper and concentrate on the ”basic” imperative features of the language. A more detailed technical description of the basic idea behind the conversion algorithm (excluding external side effects and method calls) can be found in [10], and a discussion about references and side effects in [11]. In order to compute dependencies, we must consider that the variables occurring in the methods change their values during program execution. This is handled by assigning a unique index to all locations where a variable occurs as target of an assignment (we refer to each such location as an occurrence of the variable. It is the various variable occurrences that dependencies are computed for. Let x and y be indexed variable occurrences of a given method m. We say that x depends on y iff the value of y determines the value of x for at least one input vector. This definition is based on earlier work on dependencies in software debugging, e.g., [8, 13]. Beside debugging dependencies are used for verification (see [7]). Formally, we define a functional dependency as a pair (x, Mx ), where x is a variable occurrence and Mx is a set of variable occurrences such that x depends on every y ∈ Mx . We can now compute all functional dependencies of a particular statement by determining the functional dependencies of all variables used within the statement. 5 Model-based Debugging of Java Programs Line 1. class SWExamples { 2. public static void test(int a,b,c,d,e) { 3. int f,g,s1,s2,s3; 4. s1=a*c; 5. s2=b*d; 6. s3=c*e; 7. f=s1+s2; 8. g=s2+s3; 9. } 10.} (a) Source code 2. 3. 4. 5. 6. 7. 8. 9. 10. Environment test(3,2,2,3,3) atest = 3, btest = 2, ctest = 2, dtest = 3,etest = 3 s1test = 6 s2test = 6 s3test = 6 ftest = 12 gtest = 12 test(3, 2, 2, 3, 3) = void (b) Evaluation Trace for test(3,2,2,3,3) Figure 2: A simple Java method Whereas the variables correspond to the ports of traditional diagnosis components, the natural choice for components given the abstract nature of the dependency-based representation are statements. The set of diagnosis components can be viewed as a diagnosis system where the connections are formed by the variable occurrences inside the components, i.e., components ci and cj are connected iff one component establishes the functional dependency (vi , M) and the other, (wj , {. . . , vi , . . .}). Variable occurrences v0 are inputs of the whole diagnosis system. A variable occurrence vi is an output iff there is no other occurrence vj such that j > i. Since during conversion indices are always increased, the resulting diagnosis system, i.e., the graph representation, is acyclic. Computing functional dependencies for Java programs requires compiling each method declared for a class. A method m of a Java program is converted by sequentially converting its statements into diagnosis components. We illustrate the computation of functional dependencies using the example of Figure 2. The functional dependencies for s1=a*c; are {(s12 , {a1 , c1 })} because the value of s1 is given by the product of the values of a and c. In summary we obtain the following dependency sets (indices are ignored) for the 5 statements: f d(C4) = {(s1, {a, c})}, f d(C5) = {(s2, {b, d})}, f d(C6 ) = {(s3, {c, e})}, f d(C7) = {(f, {s1, s2})}, f d(C8 ) = {(g, {s2, s3})} 6 AADEBUG 2000 where Ci denotes the statement in line i. The System Description After computing all dependencies, we map them to a logical representation, which can be directly used for model-based debugging. For this purpose we assume that the statements are given as a set COMP , and that for all statements, the functional dependencies are defined. The set of functional dependencies for a statement st is written as f d(st). Functional dependencies describe behavior implicitly by describing influences between variables. Instead of speaking about real values, we can only speak about whether a value v is correct (written as ok(v)) or not (written nok(v)). We can further write that if a statement s is assumed to be correct (i.e., ¬AB(s) holds) and all input variables have a correct value then the value of variables used as target in an assignment statement must be correct. Formally, the system description is given by: " ∀ (o,M )∈f d(C) ¬AB(C) ∧ ^ x∈M # ok(x) → ok(o) ∈ SD where C ∈ COMP is a statement. In addition, we know that it is impossible that a variable value is known to be correct and incorrect at the same time. Therefore, we have to add the rule ok(v) ∧ nok(v) → ⊥ to the model SD, for each variable occurrence v in the program. The described model can be used together with a standard MBD algorithm for computing bug locations. For software debugging, the observations required for diagnosis are given by the specified behavior, in our case the expected input/output vectors. By comparing the specified output with the computed output, we can classify the correctness of variables. Variables v that are assumed to have the correct value lead to the observation ok(v). Variables with an incorrect value are represented by nok(v). In Figure 2(b) the evaluation trace for the call test(3,2,2,3,3) for the Java program given in Figure 2(a) is given. The trace only presents the lines of code which are involved in the current evaluation, and the new environments created. To distinguish different local variables they are indexed with the name of the method where they are declared. In this case there is no return value. From the dependencies computed above, we get the logical model SD: ¬AB(C4 ) ∧ ok(a) ∧ ok(c) → ok(s1) ¬AB(C6 ) ∧ ok(c) ∧ ok(e) → ok(s3) ¬AB(C8 ) ∧ ok(s2) ∧ ok(s3) → ok(g) ¬AB(C5 ) ∧ ok(b) ∧ ok(d) → ok(s2) ¬AB(C7 ) ∧ ok(s1) ∧ ok(s2) → ok(f ) 7 Model-based Debugging of Java Programs ok(a) ∧ nok(a) → ⊥ ok(b) ∧ nok(b) → ⊥ ... ok(s3) ∧ nok(s3) → ⊥ In this example we assume that the method call test(3,2,2,3,3) should lead to values f=12 and g=0, i.e., that line 8 should be g=s2-s3 instead of g=s2+s3. For this case, we get observations OBS: ok(a) ∧ ok(b) ∧ ok(c) ∧ ok(d) ∧ ok(e) ∧ ok(f ) ∧ nok(g) Using SD ∪ OBS we get 3 diagnoses, each pinpointing a single possible bug location: {C5 }, {C6 }, {C8}. The other statements can be ignored in this case. Using the measurement selection algorithm from [3] we can compute the optimal next question to be presented to the user in order to distinguish between the 3 candidates. 4 Diagnosing with the Dependency Model The JADE debugger with dependency model can be proven to be complete with regard to bugs that do not alter the dependency structure of the program, since all statements that may cause a wrong value are considered and therefore are diagnosis candidates. However, discrimination capability can be low. Consider the example program from Figure 2, together with the specified values f = 12 and g = 0. In this case, the debugger returns the candidate {C5} which could be eliminated when using a value-based model. Now assume C5 is incorrect, all other statements are correct, and apply the test case from Figure 2. From C4 and C6 and the input values we derive s1test = s3test = 6. Using these values together with C7 and ftest = 12, we get s2test = 6. Now using this value together with the assumption C8 is correct leads to gtest = 12, contradicting our specified value gtest = 0. Hence, {C5} is not a diagnosis w.r.t the value-based model, illustrating the (unsurprising) fact that a model based purely on dependencies is too weak to discriminate between all possible program errors. Concerning performance, for smaller programs and interactive debugger use, diagnosis times should be in the single second range although longer times are acceptable for very large programs. It is obvious that searching for all single bugs using our model is restricted to O(n2 ), where n denotes the number of diagnosis components, i.e., in our case, statements. Using empirical results from [6] we can expect that computing all single bugs for Java methods with several hundred statements should be done in less than 8 AADEBUG 2000 1 second, a result that is consistent with the experience from the VHDL domain [4]. Like program slicing [16], our dependency model is based on static analysis of the code, i.e., it is computed using the program structure and does not use the runtime program behavior for fault localization. A program slice is defined as the part of a program possibly influencing the value of given variables and not occurring within the program after a given position. The slice for our running example for variables {g} and position 8 comprises the lines 8, 6, and 5. This result is equal to the one obtained by our dependency model and the question arises about the differences between both approaches. Our dependency model is more hierarchically organized, e.g., formally a conditional statement is viewed as a single diagnosis component and sub-divided only after being identified as faulty. To allow a comparison of slicing with MBD using the functional dependency model, we assume an appropriate mapping. In this respect we obtain similar results from both techniques except in the cases where several variables have a faulty value after program execution. In this situation the model-based approach tries to minimize the source of the misbehavior leading to fewer solutions, while slicing does not. Given the example, assume that line 5 is faulty, leading to wrong values for variables f and g. The slice for f and g is the whole program, while our dependency model would deliver only line 5 as single fault candidate. 5 Empirical results The following experiments show the results of the JADE debugger using various Java methods from our example library, modified at randomly selected statements: Example 1: The adder method implements a binary full adder mapping three inputs to two outputs. Example 2: The library method is part of a small application that creates a sample library and then computes the author who has published the most books of all authors whose books can be found in the library (methods involving object-oriented language structures, such as multiple objects, instance method calls, class & instance variables, etc...) Example 3: Sorting methods: various sorting methods, providing the full complement of control statements: loops, selection statements, and method calls. 9 Model-based Debugging of Java Programs Test 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Sum Av. Method Lines adder f 1 adder f 2 adder f 3 adder f 4 adder f 5 adder f 6 adder f 7 adder f 8 adder f 9 adder f 10 adder f 11 adder f 12 adder f 13 adder f 14 library f 1 bubbleSort f 1 bubbleSort f 2 insertionSort f shellSort f 1 shellSort f 2 selectionSort f 1 heapSort f 1 heapSort f 2 heapSort f 3 17 17 17 17 17 17 17 17 17 17 17 17 17 17 30 10 10 19 14 14 14 11 11 11 382 15.92 Error 4 4 7 7 7 12 12 11 11 14 14 16 12 9 28 4 7 4 3 6 1 7 8 9 217 9.042 Setup 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 24 1 Query 2 2 2 2 2 4 4 4 6 4 4 4 4 4 5 2 5 2 2 3 1 6 4 3 81 3.37 Interactions Loop Exprs. 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 1 2 1 3 1 2 1 1 1 3 1 0 1 1 1 1 1 1 1 16 24 0.67 1 Iter. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 1 1 2 0 1 1 1 11 0.46 Total 4 4 4 4 4 6 6 6 8 6 6 6 6 6 10 7 12 7 6 10 3 10 8 7 156 6.5 Total 2 3 3 3 3 3 5 5 5 7 5 5 5 5 5 6 3 6 3 3 4 2 7 5 4 105 4.37 Table 1: Debugging results from Java examples Table 1 shows (from left to right) the tested method (in which a single error has been installed), the total number of statements in each method, the index of the buggy statement within the method (which can directly be used to compare the outcomes of the Jade debugger tests with ”manual” use of a debugger where the user steps through the code sequentially until the erroneous line is found), and finally the number of user interactions which are needed to exactly locate the bug, classified by type: Setup: verify the system output connections, i.e. all output variables of the method. Query: verify the value of a variable at a particular statement Loop: debug the condition of a loop or selection statement Exprs: find the smallest sub-expression of a particular statement. This allows further debugging of method and constructor calls. Iter.: determine the first loop iteration in which the error occurs The ”Total” column from the right shows the total number of user inter- 10 AADEBUG 2000 actions, and the ”Total2” column the sum of all setup and query interactions. The latter figure determines the debugger’s performance at statement level and can therefore be compared with Column 4. These two columns give a simple comparison of the user interactions needed to find the exact location of a faulty statement with the two different debugging strategies, i.e. model-based vs. unsupported debugging. Locating a bug in the adder method with a traditional debugging tool requires 10 user interactions versus 4.43 with the JADE debugger. This fairly drastic difference in favor of the model-based technique is due to the simple block structure of the method with the model-based debugger exploiting its knowledge about the underlying functional dependency structure of the block. The longer the block, the greater the advantage. For the same reason, the faulty version of the library method requires 28 user interactions in the traditional approach compared to 6 using the JADE debugger. To locate a bug in a sorting algorithm a traditional debugger on average needs 5.45 steps versus 4.12 for the JADE debugger, the advantage being less clear due to the complex control structures. Overall, 24 tests are compiled in the table with 9.04 user interactions on average required in the traditional case and 4.37 for the JADE debugger, clearly highlighting the potential abilities of model-based debugging tools. Note that as with techniques like program slicing, the bug location efficiency of the model-based approach does not depend on the actual location of the error in the code. The number of user interactions it takes to find the bug is therefore much better assessable. 6 Discussion and Conclusion One of the main advantages of the model-based approach is the ability to incorporate multiple models in the same formal and computational framework. The dependency-based representation described in this paper has the advantage of being simple and computationally efficient to solve, thus providing an answer to the important question of scalability of the approach (our use of a dependency based mechanism in the VHDL domain was usable for very large programs [4]). Its disadvantage of low discrimination can be counteracted by combining it with a more detailed (i.e., value-based) model, e.g., by focusing in on smaller program parts isolated by the dependency model, and diagnosing them with the more detailed model, which is cur- Model-based Debugging of Java Programs 11 Figure 3: The JADE debugger main window rently undergoing implementation [11]. The value-based model, unlike the dependency model, is dynamic and based on the evaluation trace, similar to the manner in which Dynamic Program Slicing [9] extends classical Program Slicing. The value-based model records, in a detailed manner, which program parts actually contribute to the faulty behavior. By propagating value assumptions forward and backward via the standard diagnosis algorithms it provides better discrimination. In [5] an approach for combining program slicing and algorithmic debugging for debugging of procedural programs was introduced. The ideas of using test specifications and test results can be easily incorporated into our approach. In contrast to [5] we can change the debugging performance by changing the underlying model without changing the underlying algorithms. The JADE debugger is a prototype system for research purposes and for demonstrating the underlying model-based techniques. Its main application interface can be seen in Figure 3. The system is not yet applicable in a real production environment. The incorporated Java evaluator that is used for computing variable values to be presented to the user during debugging implements only the basic Java functionality and some important classes and is far away from being JDK compliant. In addition, JADE assumes that the 12 AADEBUG 2000 Java source code for all involved classes is available. Both problems have to be tackled for a production version of JADE. We have described the application of model-based technology in the building of a prototype intelligent debugger for Java programs. The approach is based on automatically building a formal internal model of the executed program, which a generic diagnosis engine then uses, together with observations of incorrect program output, for identifying possible sources of the error in the program. This combines modeling flexibility with the ability to reuse standard algorithms like measurement selection. Following an approach that we have followed in the domain of hardware design languages, the currently used model is purely dependency based for simplicity and quick diagnosis, and will be combined with a more detailed value-based model for improved discrimination capabilities. References [1] G. W. Bond and B. Pagurek. A Critical Analysis of “Model-Based Diagnosis Meets Error Diagnosis in Logic Programs”. Tech. Rep. SCE94-15, Carleton Univ., Dept. of Systems and Computer Engineering, Ottawa, Canada, 1994. [2] Luca Console, Gerhard Friedrich, and Daniele Theseider Dupré. Modelbased diagnosis meets error diagnosis in logic programs. In Proc. IJCAI, pages 1494–1499, Chambery, August 1993. [3] J. de Kleer and B. C. Williams. Diagnosing multiple faults. Artificial Intelligence, 32(1):97–130, 1987. [4] Gerhard Friedrich, Markus Stumptner, and Franz Wotawa. Model-based diagnosis of hardware designs. Artificial Intelligence, 111(2):3–39, July 1999. [5] Peter Fritzson, Tibor Gyimothy, Mariam Kamkar, and Nahid Shahmehri. Generalized Algorithmic Debugging and Testing. In Proc. Conf. on Programming Language Design and Implementation, Canada, 1991. [6] Peter Fröhlich and Wolfgang Nejdl. A Static Model-Based Engine for Model-Based Reasoning. In Proc. 15th IJCAI, Nagoya, Japan, August 1997. Model-based Debugging of Java Programs 13 [7] Daniel Jackson. Aspect: Detecting Bugs with Abstract Dependences. ACM TOSEM, 4(2):109–145, 1995. [8] Bogdan Korel. PELAS–Program Error-Locating Assistant System. IEEE TSE, 14(9):1253–1260, 1988. [9] Bogdan Korel and Jurgen Rilling. Applications of Dynamic Slicing in Program Debugging. In Proceedings of the Third International Workshop on Automatic Debugging (AADEBUG-97), Linköping, Sweden, 1997. [10] Cristinel Mateis, Markus Stumptner, and Franz Wotawa. Debugging of Java programs using a model-based approach. In Proc. DX’99 Workshop, Loch Awe, Scotland, 1999. [11] Cristinel Mateis, Markus Stumptner, and Franz Wotawa. Locating bugs in Java programs – first results of the Java Diagnosis Experiments (Jade) project. In Proceedings IEA/AIE, New Orleans, 2000. Springer-Verlag. [12] Antoine Missier, Spyros Xanthakis, and Louise Travé-Massuyés. Qualitative Algorithmics using Order of Growth Reasoning. In Proc. ECAI 94, pages 750–754, 1994. [13] Mark Moriconi and Timothy Winkler. Approximate reasoning about the semantic effects of program changes. IEEE Transactions on Software Engineering, 16(9):980–992, September 1990. [14] Raymond Reiter. A theory of diagnosis from first principles. Artificial Intelligence, 32(1):57–95, 1987. [15] Markus Stumptner and Franz Wotawa. Debugging Functional Programs. In Proc. 16th IJCAI, Stockholm, Sweden, August 1999. [16] Mark Weiser. Program slicing. IEEE TSE, 10(4):352–357, July 1984.
6cs.PL
1 Dynamic Spectrum Access in Time-varying Environment: Distributed Learning Beyond Expectation Optimization arXiv:1502.06672v4 [cs.IT] 28 Jul 2017 Yuhua Xu, Member, IEEE, Jinlong Wang, Senior Member, IEEE, Qihui Wu, Senior Member, IEEE, Jianchao Zheng, Member, IEEE, Liang Shen, and Alagan Anpalagan, Senior Member, IEEE Abstract—This article investigates the problem of dynamic spectrum access for canonical wireless networks, in which the channel states are time-varying. In the most existing work, the commonly used optimization objective is to maximize the expectation of a certain metric (e.g., throughput or achievable rate). However, it is realized that expectation alone is not enough since some applications are sensitive to fluctuations. Effective capacity is a promising metric for time-varying service process since it characterizes the packet delay violating probability (regarded as an important statistical QoS index), by taking into account not only the expectation but also other high-order statistic. Therefore, we formulate the interactions among the users in the time-varying environment as a non-cooperative game, in which the utility function is defined as the achieved effective capacity. We prove that it is an ordinal potential game which has at least one pure strategy Nash equilibrium. Based on an approximated utility function, we propose a multi-agent learning algorithm which is proved to achieve stable solutions with dynamic and incomplete information constraints. The convergence of the proposed learning algorithm is verified by simulation results. Also, it is shown that the proposed multi-agent learning algorithm achieves satisfactory performance. Index Terms—Dynamic spectrum access, effective capacity, statistical QoS, potential game, multi-agent learning, dense networks. I. I NTRODUCTION D YNAMIC spectrum access (DSA) has been regarded as one of the most important technology for future wireless networks since it provides flexible and efficient spectrum usage. With the significant advances in cognitive radios in the last decade [1], [2] , DSA can be implemented in more A part of this work has been accepted by IEEE International Conference on Communications (ICC’17). This work was supported by Natural Science Foundation for Distinguished Young Scholars of Jiangsu Province under Grant No. BK20160034, the National Science Foundation of China under Grant No. 61671473, No. 61401508 and No. 61631020, and in part by the Open Research Foundation of Science and Technology on Communication Networks Laboratory. Yuhua Xu is with the College of Communications Engineering, PLA University of Science and Technology, Nanjing, China. He is also with the Science and Technology on Communication Networks Laboratory, Shijiazhuang, China. ([email protected]). Jinlong Wang, Jianchao Zheng and Liang Shen are with the College of Communications Engineering, PLA University of Science and Technology, Nanjing, China ([email protected], [email protected], [email protected]). Qihui Wu is with the College of Electronic and Information Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing, China (e-mail: [email protected]). Alagan Anpalagan is with the Department of Electrical and Computer Engineering, Ryerson University, Toronto, Canada ([email protected]). intelligent and smart manners [3], [4]. Generally, there are two main application scenarios [5]: open-access, in which all users are equal to access the spectrum, and primary-secondary access, in which the spectrum is owned by the primary users and can be used by the secondary users when it is idle. For decision-making, it has been shown that the methodologies for the two scenarios are mostly overlapped [3]. A number of existing studies, e.g., [6]–[11], have considered intelligent spectrum access for static wireless networks in which the channel states remain unchanged during the selection procedure. However, it has been realized that although the assumption of static channel leads to mathematical tractability, it is not generally true since the spectrum are always time-varying in wireless environment [12]–[14]. To track the channel dynamics, an instinctive approach is to reiterate the selection algorithms in each quasi-static period. This method, however, is off-line, costly and inefficient, and is even not feasible for fast-varying channels. Thus, it is timely important to develop on-line intelligent channel selection algorithms for dynamic wireless networks. In this article, we consider a dynamic wireless canonical networks, in which the channel states are time-varying and there is no information exchange among the users. In a few existing researches for dynamic networks with time-varying channels, e.g., [12]–[15], the commonly used optimization objective is to maximize the expectation of a certain metric, e.g., the expected throughput. However, only considering the expectation is not enough for practical applications. For example, in real-time multimedia applications, higher expected transmission rate as well as lower fluctuation are desirable, which implies that not only the expectation but also other statistic, e.g., the variance, should be taken into account for dynamic wireless networks. A promising metric is the effective capacity, which is defined as the maximum packet arrival rate that a time-varying service process can support while a statistical quality-of-service (QoS) constraint on delay violating probability can be met [16]. Mathematically, effective capacity takes into account the expectation and all other statistics [17]; further, it degrades the expectation if the statistical QoS index is sufficiently small. Therefore, we use effective capacity as the optimization metric in this article1 . 1 It should be pointed out that the main focus of this paper is to consider both expectation and other statistic in dynamic wireless networks. Thus, except for the used effective capacity, other forms of optimization metric can also be used. We will explain this more specific later. 2 The considered DSA network encounters dynamic and incomplete information constraints for the decision procedure. Specifically, the channel states are not deterministic at each slot and change from slot to slot, and a user can only monitor its chosen channel and know nothing about other users. Furthermore, the introduction of effective capacity into dynamic cognitive radio networks leads to additional challenges. In comparison, the expectation admits additive property in the time domain while the effective capacity does not. In particular, an expected value can be obtained by cumulatively averaging the random payoffs in a long period. However, effective capacity does not admit the additive property due to its nonlinearity. Thus, the task of designing effective-capacity oriented intelligent channel selection approaches for multiple users with the dynamic and incomplete information constraints remains unsolved and is challenging. Since the decisions of the users are interactive, we formulate the problem of dynamic spectrum access in timevarying environment as a non-cooperative game, in which utility function is defined as the effective capacity. We prove that it is an ordinal potential game which has at least one pure strategy Nash equilibrium (NE). Due to the dynamic and incomplete information constraints, existing game-theoretic algorithms, e.g., the best response [18], fictitious play [19], spatial adaptive play [6] and regret learning [7], can not be applied to the considered dynamic networks. The reason is that they are originally designed for static systems with complete information. It is known that users in cognitive radios are able to observe the environment, learn from history experiences, and make intelligent decisions [2]. Following the CODIPAS learning techniques [17] (COmbined fully DIstributed PAyoff and Strategy), we propose a multi-agent learning algorithm to achieve the Nash equilibria of the formulated dynamic spectrum access game in time-varying environment. To summarize, the main contributions of this article are: 1) We formulate the problem of dynamic spectrum access in time-varying environment as a non-cooperative game, in which the utility function of each user is defined as the effective capacity characterized by a statistical QoS index. In particular, the utility function takes into account not only the expectation of the achievable transmission rate but also other statistic. We prove that the game is an ordinal potential game and hence has at least one pure strategy NE point. 2) Based on an approximated utility function, we propose a multi-agent learning algorithm to achieve the pure strategy NE points of the game with unknown, dynamic and incomplete information constraints. The proposed algorithm is fully distributed and autonomous, since it only relies on the individual information of a user and does not need information about other players. Simulation results show that the proposed learning algorithm achieves satisfactory performance. Note that there are some previous work which also considered effective capacity in dynamic spectrum access/cognitive radio networks, e.g., [20]–[23]. The main differences in methodology are: i) most existing studies considered opti- mization of effective capacity in a centralized manner, while we consider it in a distributed manner, ii) we consider the interactions among multiple users and propose a multi-agent learning algorithm to achieve stable solutions, and iii) the effective capacity can not be obtained by cumulatively averaging the random payoffs in a long period due to its nonlinearity, which brings new challenges for the learning solutions. Also, it should be pointed out that the presented game model is motivated by the risk-sensitive game proposed in [17], which admits the same utility function. The key differences in this paper are: (i) the effective capacity has physical meaning in wireless communications, i.e., it implies statistical QoS provisioning, and (ii) we show that the dynamic spectrum access game with effective capacity optimization is an ordinal potential game. The rest of the article is organized as follows. In Section II, we give a brief review of related work. In Section III, we present the system model and formulate the problem. In Section IV, we present the dynamic spectrum access game and investigate the properties of its NE, and propose a multi-agent learning algorithm for achieving stable solutions. In Section V, simulation results are presented. Finally, we present discussion and draw conclusion in Section VI. II. R ELATED W ORK The problem of dynamic spectrum access in both openaccess and primary-secondary access scenarios has been extensively investigated in the context of cognitive radio, e.g., [6]–[11], [24]–[26]. These work mainly focused on static networks, in which the channel states remain unchanged during the learning and decision procedure. However, it has been realized that the assumption of static channel is not always true in practice. Recently, the problem dynamic spectrum access with varying channel states began to draw attention, using e.g., Markovian decision process (MDP) [13], online learning algorithms for multi-armed bandit (MAB) problems [15], and game-theoretic learning [12], [14]. The commonly used optimization metric in these work is to maximize the expected achievable transmission rate, which does not consider the QoS requirement in the packet delay. In addition, the algorithms in MDP and MAB models are mainly for scenarios with single user. Compared with those existing studies, this work is differentiated in that a statistical QoS requirement in packet delay is considered for a multiuser DSA network with time-varying channels. It is noted that multi-agent learning algorithms for gametheoretic solutions in wireless networks have been an active topic. Specifically, stochastic learning automata [27] based algorithms for wireless communications can be found in the literature, e.g., distributed channel selection for opportunistic spectrum access [12], [14], distributed power control [28], precoding selection for MIMO systems [29], spectrum management [30] and cooperative coordination design [31] for cognitive radio networks. Furthermore, Q-learning based dynamic spectrum access was reported in [32]–[34], various combined fully distributed payoff and strategy-reinforcement learning algorithms for 4G heterogeneous networks were studied in 3 [35], a trial-and-error learning approach for self-organization in decentralized networks was studied in [36], and several variations of logit-learning algorithms were studied in [10], [11]. In methodology, all of the above mentioned algorithms are originally designed for maximizing the expectation and hence can not be applied. We consider a new optimization metric that takes into account not only the expectation but also other high-order moments. The most related work is [37], in which a game-theoretic optimization approach for effective capacity in cognitive femtocells was studied. The key difference in this work is that we focus on formulating the game model as well as designing multi-agent learning with dynamic and incomplete information constraints. Nevertheless, the authors of [37] only focused on game formulation and analysis. Another related work is [38], in which a satisfaction equilibrium approach is proposed for QoS provisioning in decentralized networks. Note that a part of this work with some preliminary results can be found in [39]. Note that NE may be inefficient due to its inherent noncooperative nature. There are some other solutions beyond NE to improve the efficiency, e.g., pricing [40], auction [41], Nash bargaining [42], and coalitional games [43], [44]. The key difference in this paper is that the proposed solution does not need information exchange while these solutions need information exchange among users, which may cause heavy communication overhead. III. S YSTEM M ODELS AND P ROBLEM F ORMULATION A. System model We consider a distributed canonical network consisting of N users and M channels. A user in canonical networks is a collection of multiple entities with intra-communications and there is a heading managing the whole community [45]. Examples of users in canonical networks given by, e.g., a WLAN access point with the serving clients [46], a small cell base station with its mobile terminals [47], and a cluster head with its belonged members. For presentation, denote the user set as N , i.e., N = {1, . . . , N }, and the channel set as M, i.e., M = {1, . . . , M }. Due to fading in wireless environment, the transmission rate of each channel is always time-varying. To capture the rate fluctuations, the finite rate channel model is applied [48]. In particular, the rate set of channel m is denoted as Sm = {sm1 , sm2 , . . . , smK }, where smk indicates that the channel can support certain transmission rate (packets/slot). The corresponding rate-state probabilities are given by Πm = {πm1 , . . . , πmK } and P the expected transmission rate of channel m is given by s̄m = k πmk smk . The users do not know the rate distribution of the channels. We assume that time is divided into slots with equal length and the transmission rate of each channel is block-fixed in a slot and changes randomly in the next slot. Specifically, the achievable transmission rate of channel m for user n in slot i is denoted as rnm (i), which is randomly chosen from the rate set Sm . We consider heterogeneous spectrum in this article, i.e., the transmission rate set and the corresponding probability set vary from channel to channel2. The task of each user is to choose an appropriate channel to access. Without loss of generality, we assume that the number of users is larger than that of the channels, i.e., N > M . When more than one user chooses the same channel, they share the channel using some multiple access mechanisms, e.g., TDMA or CSMA. There is no central controller and no information exchange among the users, which means that the users should choose appropriate channels through learning and adjusting. Denote an as the chosen channel of user n, i.e., an ∈ M. In the following, we analyze the achievable transmission rates of the users for different multiple access mechanisms [39]: 1) If perfect TDMA is applied to resolve contention among the users, the instantaneous achievable transmission rate of user n is determined as follows: all the users share the channel equally. Thus, the instantaneous achievable rate of user n is as follows: rn (t) = 1+ s (t) Pan , I(an , ai ) (1) i∈N ,n6=i where san (t) is the instantaneous transmission rate of channel an in time t, and I(an , an′ ) is the following indicator function:  1, an = an′ I(an , an′ ) = (2) 0, an 6= an′ 2) If perfect CSMA is applied, the instantaneous achievable transmission rate of user n is determined as follows: only a user can transmit successfully and all other users on the same channel must stay silent. Thus, the instantaneous achievable rate of user n is as follows: rn (t) =   sa (t),    n  0,    w.p. w.p.   1− 1+ P 1 I(an ,ai ) i∈N ,n6=i 1+ P1 l∈N ,n6=l I(an ,al )   , (3) B. Preliminary of effective capacity Since the channel transmission rate are time-varying, one candidate optimization matric is to maximize the expected transmission rate of user n, i.e., max E[rn (t)]. It is noted that such an objective is not enough since the rate fluctuation may cause severe delay-bound violating probability whereas the expected rate cannot reflect this event. To study the effect of time-varying transmission rate, one would take into account not only the expectation but also the variance and other higherorder the moments. Among all possible solutions, the theory of effective capacity of time-varying service process is a promising approach. Therefore, we use effective capacity to study 2 The feature of heterogeneous spectrum is caused by the flexible spectrum usage pattern in current wireless communication systems. Examples are given by: (i) in cognitive radio networks, the channels are occupied by the primary users with different probabilities and (ii) in heterogeneous networks, the channels belong to different networks have different rate sets. 4 the problem of opportunistic channel access in heterogeneous spectrum. Using the large deviations theory [49], it was shown in [50] that for a dynamic queuing system with stationary arrival and service processes, the probability that the stationary queue length L(t) is large than a threshold l is given by: h log Pr{L(t) > l} i = −θ, (4) lim l→∞ l where θ serves as the exponential decay rate tail distribution of the stationary queue length. Therefore, for sufficiently large l, the queue length violating probability can be approximated by Pr{L(t) > l} ≈ e−θl . It is shown that larger θ corresponds to strict QoS requirement while small θ implies loose QoS requirement. Furthermore, for a stationary traffic with fixed arrival rate α, the delay-bound violating probability and the length-bound violating probability is related by: p (5) Pr{D(t) > d} ≤ c Pr{L(t) > l}, where c is some positive constant and l = αd. From the above analysis, it is seen that both the queue length violating probability and delay-bound violating probability are determined by the exponential decay rate θ, which specifies the QoS requirement. Thus, we will pay attention to θ in this article. For a time-varying service process with independent and identical distribution (i.i.d.), the effective capacity is defined as follows [50]:  1 C(θ) = − log E[e−θx(t) ] , (6) θ where x(t) is the time-varying service process, and θ is the statistical QoS index as specified by (4). The properties of effective capacity is analyzed as follows [17]: • For a given time-varying service, it is a decreasing function with respect to θ, i.e., 0 < θ2 < θ1 ⇒ C(θ1 ) < C(θ2 ). • For each θ > 0, the effective capacity is always less than the expected capacity, i.e., C(θ) < E[x(t)], ∀θ > 0, • (7) (8) which can be proved by Jensen’s inequality [51]. As θ approaches zero, the effective capacity degrades to the expected capacity, i.e., lim C(θ) = E[x(t)]. θ→0 (9) If θ is sufficiently small, by performing Taylor expansion, we have: θ C(θ) = E[x(t)] − var[x(t)] + o(θ), (10) 2 where var[x(t)] is the variance of x(t), and o(θ) is the infinitely small quantity of higher order. From (7) to (10), it is seen that the effective capacity takes into account not only the expectation but also other moments (including the variance and other high-order moments) to capture the fluctuation in the time-varying service rate. • C. Problem formulation For the considered dynamic spectrum access system, we use the effective capacity as the optimization metric. Specifically, denote θn as the statistical QoS index of user n, then the achievable effective capacity of user n is given by Cn (an , a−n , θn ) = −  1 log E[e−θn rn (i) ] , θn (11) where rn (i) is the instantaneous transmission rate as specified by (1) or (3) , and a−n is the channel selection profile of all the users except user n. For each user, the optimization objective is to choose a channel to maximize the effective capacity3 . It has been pointed out that information is key to decision-making problems [3]. For the considered dynamic spectrum access with statistical QoS provisioning, the information constraints can be summarized as follows: • • Dynamic: the instantaneous channel transmission rates are not deterministic, and the event of successfully accessing a channel in a slot is random. Furthermore, the instantaneous channel transmission rate is time-varying. Incomplete: the rate-state probabilities of each channel are unknown to the users, and a user does not know the QoS index of other users. Moreover, there is no information exchange among the users. Due to the above dynamic and incomplete information constraints, it is challenging to achieve desirable solutions even in a centralized manner, not to mention in an autonomous and distributed manner. Learning, which is core of cognitive radios [1], would achieve satisfactory performance in complex and dynamic environment. In the following, we propose a multiagent learning approach to solve this problem. IV. M ULTI - AGENT L EARNING A PPROACH Since there is no central controller, the users behave autonomously and selfishly, i.e., each user optimizes its individual effective capacity. In addition, there is no information exchange between the users, which means that cooperation is not feasible in this scenario. This motivates us to formulate a noncooperative game to capture the interactions among users. The properties of the formulated game are investigated. However, due to the dynamic and incomplete information constraints, most existing game-theoretic algorithms can not be applied. Therefore, we propose a multi-agent learning approach for the users to achieve desirable solutions autonomously and distributively. 3 Since the main concern of this paper is to consider both expectation and other-order statistic for dynamic OSA networks, other forms of optimization metric can also be used. For example, one may use the following objective: O1 = α1 E[x(t)] − α2 var[x(t)], where α1 and α2 are the weighted coefficients determined by the specific practical applications. The reasons for using effective capacity as the optimization goal in this paper are twofold: (i) effective capacity takes into both expectation and other statistic into account, and (ii) it has physical meanings related to QoS provisioning for time-varying OSA networks. 5 A. Dynamic spectrum access game with QoS provisioning The dynamic channel access game with QoS provisioning is denoted as G = {N , θn , An , un }, where N is the player (user) set, An is the action space of player n, θn is the QoS index of player n and un is the utility function of player n. The action space of each player is exactly the available channel set, i.e., An ≡ M, ∀n ∈ N . In this game, the utility function is exactly the achievable effective capacity, i.e.,  1 (12) un (an , a−n ) = − log E[e−θn rn (i) ] , θn Theorem 1. The dynamic spectrum access game with effective capacity serving as the utility function is an OPG, which has at least one pure strategy Nash equilibrium. Proof: For presentation, we consider the scenarios that TDMA is applied. To begin with, we omit the logarithmic term in the utility function in (12) and denote: vn (an , a−n ) = E[e−θnrn (i) ]. For an arbitrary player n ∈ Cm , we have: In non-cooperative games, each player maximizes its individual utility. Therefore, the proposed dynamic spectrum access game with QoS provisioning can be expressed as: G: max un (an , a−n ), ∀n ∈ N (13) For a channel selection profile (an , a−n ), denote the set of users choosing channel m as Cm , i.e., Cm = {n ∈ N : an = m}, then the number of users choosing P channel m can be I(an , ai ). expressed as cm (an , a−n ) = |Cm |=1 + vn (an , a−n ) = φv(k) (an , a−n ) = un (an , a−n ) − un (a′n , a−n ) = φe (an , a−n ) − φe (a′n , a−n ) (15) In other words, the change in the utility function caused by an arbitrary unilateral action change of a user is the same with that in the exact potential function. Definition 2. A game is an ordinal potential game (OPG) if there exists an ordinal potential function φo : A1 ×· · ·×AN → R such that for all n ∈ N , all an ∈ An , and a′n ∈ An , the following holds: (16) In other words, if the change in the utility function caused by an arbitrary unilateral action change is increasing, the change in the ordinal potential function keeps the same trend. According to the finite improvement property [18], both EPG and OPG admits the following two promising features: (i) every EPG (OPG) has at least one pure strategy Nash equilibrium, and (ii) an action profile that maximizes the exact (ordinal) potential function is also a Nash equilibrium. smk cm , (18) cm (an ,a−n ) X πmk e−θn smk l , (19) l=1 and φv (an , a−n ) = XK k=1 φ(k) v (an , a−n ). (20) Now, suppose that player n unilaterally changes its channel selection from an to a′n (denote a′n = m′ for presentation), (k) the change in vn (an , a−n ) caused by this unilateral change can be expressed as: (k) To investigate the properties of the formulated game, we first present the following definitions [18]. Definition 1. A game is an exact potential game (EPG) if there exists an exact potential function φe : A1 ×· · ·×AN → R such that for all n ∈ N , all an ∈ An , and a′n ∈ An , un (an , a−n ) − un (a′n , a−n ) ≥ 0 ⇔ φo (an , a−n ) − φo (a′n , a−n ) ≥ 0 M X m=1 (14) πmk e−θn where smk is the random transmission rate of channel m and πmk is the corresponding probability. For presentation, smk (k) denote vn (an , a−n ) = πmk e−θn cm , k = 1, . . . , K, which are a family of functions. Motivated by Rosenthal’s potential (k) function [52], we define φv (an , a−n ) : A1 × · · · AN → R as B. Analysis of Nash equilibrium (NE) un (a∗n , a∗−n ) ≥ un (an , a∗−n ), ∀n ∈ N , ∀an ∈ An K X k=1 i∈N ,n6=i In this subsection, we present the concept of Nash equilibrium (NE), which is the most well-known stable solution in non-cooperative game models, and analyze its properties. A channel selection profile a∗ = (a∗1 , . . . , a∗N ) is a pure strategy NE if and only if no player can improve its utility function by deviating unilaterally [19], i.e., (17) (k) vn (a′n , a−n ) − vn (an , a−n ) = πm′ k e −θn c s m m′ k ′ ′ (an ,a−n ) − πmk e −θn c smk m (an ,a−n ) (21) (k) Accordingly, the change in φv (an , a−n ) is given by (22), which is shown in the top of next page. The change in the channel selection of player n only affects the users in channel m and m′ . Furthermore, we have cm′ (a′n , a−n ) = cm′ (an , a−n ) + 1 and cm (a′n , a−n ) = cm (an , a−n ) − 1. Therefore, (22) can be further expressed as (23). Combining (k) (k) (21) and (23), the changes in vn (a′n , a−n ) and φv (an , a−n ) are related by (24). Therefore, for all n ∈ N , all an ∈ An and a′n ∈ An , it always holds that vn (a′n , a−n ) − vn (an , a−n ) = φv (a′n , a−n ) − φv (an , a−n ). (27) Furthermore, due to the monotony of the logarithmic funcis monotonously decreasing with respect to tion, i.e., − log(x) θn x, the inequalities specified by (25) and (26) always hold. Now, define the potential function as follows: φu (an , a−n ) = −  1 log φv (an , a−n ) , θn (28) where φv (an , a−n ) is given by (20). Also, according to (12) and (17), the utility function can be re-written as follows: un (an , a−n ) = −  1 log vn (an , a−n ) θn (29) 6 c m′ M X X ′ (k) φ(k) v (an , a−n ) − φv (an , a−n ) = πm′ k e−θn s m′ k l − m′ =1 l=1 (k) φv (a′n , a−n ) − (k) φv (an , a−n ) = cm′ (anP ,a−n )+1 − l=1 −θn c = πm′ k e πmk e−θn smk l (22) m=1 l=1 πm′ k e −θn s m′ k l + πm′ k e cm (anP ,a−n )−1 πmk e −θn smk l l=1 l=1 cm′ (aP n ,a−n ) cm M X X −θn s ′ m k (a ,a )+1 m′ n −n s m′ k l + cm (aP n ,a−n ) − πmk e πmk e −θn smk l l=1 −θn c smk m (an ,a−n ) ! ! ′ (k) ′ vn(k) (a′n , a−n ) − vn(k) (an , a−n ) = φ(k) v (an , a−n ) − φv (an , a−n ), ∀n, k, an , an i  ih 1 1 log vn (an , a−n ) + log vn (a′n , a−n ) vn (an , a−n ) − vn (a′n , a−n ) ≤ 0, ∀an , a′n θn θn h i  ih 1 1 − log φv (an , a−n ) + log φv (a′n , a−n ) φv (an , a−n ) − φv (a′n , a−n ) ≤ 0, ∀an , a′n θn θn h − (23) (24) (25) (26) For the formulated dynamic spectrum access game with QoS provisioning, the utility function of player n, characterized by (12), can be re-written as:     XT un (a′n , a−n )−un (an , a−n ) φu (a′n , a−n )−φu (an , a−n ) ≥ 0, 1 un (an , a−n ) = lim − log e−θn rn (i) . (31) (30) i=1 T →∞ T θn which always holds for all n ∈ N , an ∈ An and a′n ∈ An . It is seen that the utility function does not enjoy the additive According to Definition 2, it is proved that the formulated property with respect to the random payoff part rn (i). On opportunistic channel access game with QoS provisioning is the contrary, it leads to multiplicative dynamic programming an OPG with φu serving as an ordinal potential function. in essence [17]. To cope with this problem, the following Therefore, Theorem 1 is proved4. approximated part can be obtained by performing Taylor expansion of the logarithmic function [17]: Then, combining (27), (25), (26), (28) and (29) yields the following inequality: C. Multi-agent learning for achieving Nash equilibria Since the formulated dynamic spectrum access game is an OPG, as characterized by Theorem 1, it has at least one pure strategy Nash equilibrium. In the literature, there are large number of learning algorithms for an OPG to achieve its Nash equilibria, e.g., best (better) response [18], fictitious play [19] and no-regret learning [7]. However, these algorithms require the environment to be static and need to know information of other users in the learning process, which means that these algorithms can not be applied to the considered dynamic system. Based on the CODIPAS learning techniques [17] (COmbined fully DIstributed PAyoff and Strategy), we propose a multi-agent learning algorithm to achieve the Nash equilibria of the formulated opportunistic channel access game in the presence of unknown, dynamic and incomplete information constraints. 4 The presented proof is for scenarios with TDMA policy. If CSMA policy is applied, (17) is given by: vn (an , a−n ) = 1 cm  XK k=1 πmk e−θn smk  +1− 1 cm Then, the same result characterized by (27) can be obtained using similar proof lines in [12]. Finally, Theorem 1 can also be proved following the same methodology. un (an , a−n ) = 1 − E[e−θn rn (i) ] + o(rn (i)), θn (32) where o(rn (i)) is the infinitely small quantity of higher order. By omitting the logarithmic term, we define u′n (an , a−n ) = 1−E[e−θn rn (i) ] , which is an approximation of un (an , a−n ). It θn can be proved that u′n (an , a−n ) has some important properties with un (an , a−n ). In particular, limθ→0 u′n (an , a−n ) = E[r(i)]. For the expected part of u′n (an , a−n ), it can be written as: 1 XT e−θn rn (i) , (33) yn (T ) = i=0 T +1 which can be further re-written in the following recursive form [17]:  1 1 yn (T − 1) + T +1 e−θn rn (T ) yn (T ) = 1 − T +1  (34) 1 −θn rn (T ) − yn (T − 1) = yn (T − 1) + T +1 e Based on the above recursive analysis, we propose a multiagent learning algorithm, which is derived from the CODIPAS learning techniques [17]. To begin with, we extend the formulated dynamic spectrum access game into a mixed strategy form. Let P(i) = (p1 (i), . . . , pn (i)) denotes the mixed strategy profile in slot i, where pn (i) = (pn1 (i), . . . , pnM (i)) is the probability vector of player n choosing the channels. The underlying idea of the proposed multi-agent learning algorithm is that each player chooses a channel, receives a random 7 Algorithm 1: Multi-agent learning algorithm for dynamic spectrum access with QoS provisioning strategies, i.e., ′ ωn (m, p −n ) = Ea−n [un (an , a−n )]|an =m Q P ′ pkak un (a1 , . . . , an−1 , m, an+1 , . . . , aN ) = k6=n ak ,k6=n Initialization: set the iteration index i = 0, the initial chan1 1 ,..., M ), nel selection probability vector as pn (0) = ( M and the initial estimation Qnm (0) = 0, ∀n, m. Let each player n randomly select a channel an (0) ∈ An with equal probabilities. Loop for i = 0, 1, . . . , Channel access and get random payoff: with the channel selection profile (an (i), a−n (i)), the players contend for the channels and get random payoffs rn (i), which are determined by (1) or (3). Update estimation: each player updates the estimations according to the following rules: Qnm (i + 1) = Qnm (i)   −θn rn (i) − Qnm (i) , +λi I(an (i), m) 1−e θn (35) where λi is the step factor, I(an (i), m) = 1 if an (i) = m and I(an (i), m) = 0 otherwise. Update channel selection probabilities: each player updates its channel selection probabilities using the following rule: pnm (i+1) = PM pnm (i)(1 + ηi )Qnm (i) m′ =1 pnm′ (i)(1 + ηi )Qnm′ (i) , ∀n, m (36) where ηi is the learning parameter. Based on the updated mixed strategy, the players choose the channel selection an (i + 1) in the next iteration. End loop payoff, and then updates its channel selection in the next slot. Specifically, it can be summarized as follows: i) in the first slot, each player chooses the channels with equal probabilities, i.e., 1 1 pn (0) = ( M ,..., M ), ∀n ∈ N , ii) at the end of slot t, player n receives random payoff rn (t) and constructs estimation Qnm for the aggregate reward of choosing each channel, and iii) it updates its mixed strategy based on the estimations. Formally, the illustrative paradigm of the multi-agent learning algorithm for dynamic spectrum access with QoS provisioning is shown in Fig. 1 and the procedure is formally described in Algorithm 1. The properties of the proposed multi-agent learning algorithm are characterized by the following theorems. First, using the method of ordinal differential equalization (ODE) approximation, the long-term behaviors of the probability matrix sequence P(i) and the estimation sequence Q(i) are characterized. Secondly, the stable solutions of the approximated ODE are analyzed. To begin with, define ωn (m, p−n ) as the expected value of u′n (an , a−n ) when player n chooses channel m while all other players choose their channels according to the mixed (37) Proposition 1. With sufficiently small λi and ηi , the channel selection probability matrix sequence pnm (i) can be approximately characterized by the following ODE: h dpnm (t) = p (t) ωn (m, p−n ) nm dt i (38) PM − m′ =1 pnm′ (t)ωn (m′ , p−n ) Proof: The following proof follows the lines for proof in [17], which are mainly based the theory of stochastic approximation. First, the expected changes of the estimation Qnm (i) in one slot is as follows:   nm (i) |p (i) E Qnm (i+1)−Q n λi   (39) −θn rn (i) ] = pnm (i) 1−E[e θn − Qnm (i) . If the step factor λi is sufficiently small, the discrete time process (39) can be approximated by the following differential equalization:   −θn rn (t) dQnm (t) ] − Qnm (t) . (40) = pnm (i) 1−E[e θn dt Second, the changes of the channel selection probability in one slot is as follows: pnm (i+1)−pnm (i) h ηi Q (i) 1 P pnm (i)(1+ηi ) nm = ηi M Q (i) nm′ p (i)(1+η ) ′ i m′ =1 nm pnm (i) i − pnm (i) = PM pnm′ (i)(1+ηi )Qnm′ (i) ′ hm =1 Qnm (i) i M Q (i) P nm′ −1 −1 × (1+ηi ) ηi . pnm′ (i) (1+ηi ) ηi − m′ =1 (41) x Using the fact that (1+ηηii) −1 → x as ηi → 0, and taking the conditional expectation, the discrete time process (40) can be approximated by the following differential ordinal equalization:   P dpnm (t) = pnm (t) E[Qnm (t)] − M m′ =1 pnm′ (t)E[Qnm′ (t)] . dt (42) Furthermore, according to the asymptotic convergence of the estimation updating process [17], we have E[Qnm (t)] → ωn (m, p−n ) for (42). Therefore, Theorem 1 is proved. For the proposed multi-agent algorithm, the stable solutions of (38) and the Nash equilibria of the formulated channel access game with approximated utility function u′n (an , a−n ) are related by the following proposition [17], [53]. Proposition 2. The following statements are true for the proposed multi-agent algorithm: 1) All the stable stationary points of the ODE are Nash equilibria. 2) All Nash equilibria are the stationary points of the ODE. 8 Learning Estimation update QoS index Action update The random payoff Spectrum access 噯 噯 The time-varying channels Learning Action update Spectrum access The random payoff QoS index Estimation update Fig. 1. The illustrative paradigm of the multi-agent learning algorithm for dynamic spectrum access with QoS provisioning. Theorem 2. With sufficiently small λi and ηi , the proposed multi-agent algorithm asymptotically converges to Nash equilibria of the formulated dynamic spectrum access game with approximated utility function u′n (an , a−n ). Proof: The proof follows the lines for proof in [12], n ,a−n ) [17]. It is seen that u′n (an , a−n ) = 1−vn (a , where θn vn (an , a−n ) is defined in (17). Therefore, there also exists an ordinal potential function for u′n (an , a−n ). Specially, the potential function for u′n (an , a−n ) is expressed as: φu′ (an , a−n ) = 1 − φv (an , a−n ) , θn (43) where φv (an , a−n is characterized by (20). We define the expected value of the potential function over mixed strategy profile P as Φu′ (P) and the expected value of the potential function when player n chooses a pure strategy m while all other active players employ P mixed strategies p−n as Φu′ (m, p−n ). Since Φu′ (P) = m pnm Φu′ (m, p−n ), the variation of Φu′ (P) can be expressed as follows: ∂Φu′ (P) (44) = Φu′ (m, p−n ) ∂pnm We can re-write the ODE specified by (38) as follows: hP M dpnm (t) = p (t) nm m′ =1 pnm′ ωn (m, p−n ) dt i (45) PM − m′ =1 pnm′ (t)ωn (m′ , p−n ) The derivation of Φu′ (P) is given by (46), which is shown in the top of next page. According to the properties of EPG and OPG, we have:   ′ Φu′ (m, h p−n ) − Φu′ (m , p−n ) i (47) × ωn (m, p−n ) − ωn (m′ , p−n ) > 0 Therefore, we have dΦudt′ (P) ≥ 0, which implies that Φu′ (P) increases as the algorithm iterates. Furthermore, since Φu′ (P) is upper-bounded, it will eventually converge to some maximum points, as dΦudt′ (P) = 0. Finally, we have the following relationships: dΦu′ (P) =0 dt ⇒ ωn (m, p−n ) − ωn (m′ , p−n ) ⇒ dpdtnm = 0, ∀n, m ⇒ dP dt = 0 = 0, ∀n, m, m′ (48) The last equation shows that P eventually converges to the stationary point of (38). Therefore, according to Proposition 2, it is proved that the proposed multi-agent learning algorithm converges to Nash equilibria of the formulated opportunistic channel access game with approximated utility function u′n (an , a−n )., which proves Theorem 2. Remark 1. It is noted the proposed algorithm is distributed and uncoupled, i.e., each player makes the decisions autonomously and does not to know information about other players. However, it should be pointed out that the estimation of Q-value, which is originally derived from the recursive equalization (34), is not equal to the expectation of effective capacity. Actually, the Q-value is used to represent the winningness for a user choosing a particular channel. More specifically, each user chooses a channel according to the Qvalues and then updates them based on the outcome of last channel selections. In general, a user prefers to choose channels with high Q-values. As the users randomly change their channel selections, the Q-values are also updated randomly in time. Thus, the estimation is generally not equal to the actual expectation. As no prior information is available in the initial stage, the users chooses the channels with equal probabilities, i.e., the 9 dΦu′ (P) dt = P n,m ∂Φu′ (P) dpnm ∂pnm dt h i P ′ ′ (t)ω(m , p−n ) p pnm′ ω(m, p−n ) − M ′ nm m =1 h i P PM = n,m Φu′ (m, p−n )pnm (t) m′ =1 pnm′ ω(m, p−n ) − ω(m′ , p−n ) h i P = n,m,m′ pnm (t)pnm′ Φu′ (m, p−n ) ω(m, p−n ) − ω(m′ , p−n ) i  h P = 12 n,m,m′ pnm (t)pnm′ Φu′ (m, p−n ) − Φu′ (m′ , p−n ) ω(m, p−n ) − ω(m′ , p−n ) n,m Φu′ (m, p−n )pnm (t) PM m′ =1 Q-values for all the channels are set to the same. If the initial choices are different, the algorithm still converges to a stable solution. However, different initial parameters may result in different stable solutions. The reasons are as follows: the instantaneous channel rates, the channel selection profiles and the user contentions are random, which leads to the random payoff after each play. Then, the converging channel selection is also not deterministic. Remark 2. The choice of λ is to balance the tradeoff between exploration and exploitation. In practice, the value of λ decreases as the algorithm iterates. Specifically, in the beginning state, the users want to explore all channels and hence the Q-values on each channel are updated significantly. However, as the algorithm iterates, the users want to exploit the best channel and the Q-values are updated trivially. In practice, we can use λ = 1/t, where t is the iteration index. Also, the value choice of η balances the tradeoff between performance and convergence speed. For larger value of η, it converges rapidly but it may converge to local optimal solutions. For smaller values, it has more opportunities to find global optimal solutions but it may take more times. Thus, the learning parameters should be application-dependent [12]. Remark 3. Although the above convergence analysis is for the game with the approximated utility function u′n , the convergence for the original game can be expected. The reason is that the approximated utility function is close to the original utility function. In particular, its convergence will be verified by simulation results in the next section. V. S IMULATION R ESULTS AND D ISCUSSION We use the finite state channel model to characterize the time-varying transmission rates of the channels. Specifically, with the help of adaptive modulation and coding (ACM), the channel transmission rate is classified into several states according to the received instantaneous signal-to-noise-ratio (SNR). The state classification is jointly determined by the average received SNR γ and the target packet error rate pe . The HIPERLAN/2 standard [54] is applied in the simulation study, in which the channel rate set is given by {0, 1, 2, 3, 6}. Here, the rate is defined as the transmitted packets in a slot. To make it more general, we consider Rayleigh fading and set different average SNR for the channels5. Using the method proposed in [48], the state probabilities can be obtained for a given average SNR and a certain packet error rate. Taking γ = 5 dB and pe = 10−3 as an example, the state probabilities are given 5 It is noted that such a configuration is just for the purpose of illustration. The proposed multi-agent learning approach can applied to other scenarios. (46) 1 p n1 0.9 p n2 The channel selection probabilities = P p 0.8 n3 pn4 0.7 p n5 0.6 0.5 0.4 0.3 0.2 0.1 0 0 200 400 600 The iteration index 800 1000 Fig. 2. The evolution of channel selection probabilities of an arbitrarily chosen user (the number of users is N = 5 and the QoS indices of the users are set to θ = 10−2 ). by π = {0.3376, 0.2348, 0.2517, 0.1757, 0.002}. Furthermore, the learning parameters are set to λi = 1t and ηi = 0.1 unless otherwise specified. The CSMA policy is applied in the simulation study6 . We first present the convergence behaviors of the proposed multi-agent learning algorithm, and then investigate the effective capacity performance. A. Convergence behavior In this subsection, we study the convergence behavior of the proposed multi-agent learning approach. Specifically, there are eight users and five channels with average received SNR being 5dB, 6dB, 7dB, 8dB and 9dB respectively. For convenience of presentation, the QoS indices of all the users are set to θ = 10−2 . For an arbitrarily chosen user, the evolution of channel selection probabilities are shown in Fig. 2. It is noted that the selection properties converge to a pure strategy ({0,0,0,1,0}) in about 400 iterations. These results validate the convergence of the proposed multi-agent learning algorithm with dynamic and incomplete information. In addition, for an arbitrarily choosing user, the evolution of effective capacity, as characterized by (12), and the approximation effective capacity, as characterized by (32), are shown in Fig. 3-5. It is noted from the figures that the effective capacity also converges in about 500 iterations. The interesting results are: i) for small QoS index, e.g., 6 Due to the limited space, we only present simulation results for CSMA policy here. Simulation results for TDMA policy can be found in [39], which admits similar tendencies as expected. 10 2.2 2.2 The effective capacity characterized by (12) The approximation effective capacity characterized by (34) 2 1.8 1.6 1.4 1.2 1.8 1.6 1.4 1.2 1 0.8 0 200 400 600 800 1000 1200 1400 1600 1800 2000 1.6 1.4 1.2 1 1 0.8 0.8 0 200 400 The iteration index 600 800 1000 1200 1400 1600 1800 2000 0 200 The iteration index Fig. 3. Small QoS index (θ = 10−2 ). Fig. 4. 400 600 800 1000 1200 1400 1600 1800 2000 The iteration index Moderate QoS index (θ = 5 × 10−2 ). Fig. 5. Large QoS index (θ = 10−1 ). 8.4 1 8.2 0.9 8 θ=10−2 7.8 7.6 7.4 −1 θ=10 7.2 7 6.8 η=0.2 η=0.1 η=0.05 6.6 6.4 0 500 1000 The iteration index 1500 The cumulative distribution function (CDF) The aggregate effective capacity of all the users (packets/slot). The effective capacity characterized by (12) The approximation effective capacity characterized by (34) 1.8 Effective capacity (packets/slot) Effective capacity (packets/slot) Effective capacity (packets/slot) 2 2 The effective capacity characterized by (12) The approximation effective capacity characterized by (34) 0.8 0.7 0.6 0.5 0.4 0.3 M=5,N=5 M=5,N=12 M=10,N=12 0.2 0.1 2000 Fig. 6. The convergence behaviors versus different learning parameter η for different QoS indices (the number of users is N = 8). 0 0 500 1000 1500 The convergence iterations. 2000 Fig. 7. The communicative distribution function (CDF) of convergence iterations for different number of users (N ) and number of channels (M ). θ = 10−2 , the effective capacity is almost the same with the proposed approximation effective capacity, ii) for moderate QoS index, e.g., θ = 5 × 10−2 , there is a slight performance gap (less than 0.05), iii) for large QoS index, e.g., although the performance gap increases, it is still acceptable (about 0.1). These results validate not only the convergence of the proposed learning algorithm but also the effectiveness of the proposed approximation formulation. We study the convergence behavior versus the learning parameter η for different QoS indices and the comparison results for different parameters are shown in Fig. 6. These results are obtained by performing 200 independent trials and then taking the expectation. It is noted from the figure that the convergence behaviors are different for different QoS indices. In particular, for relatively small QoS indices, e.g., θ = 10−2 , the final achievable performance increases as the learning parameter η decreases. On the contrary, for relatively large QoS indices, e.g., θ = 10−1 , the trend is opposite. Also, it is noted although it takes about 2000 iterations for the proposed multi-agent learning algorithm to converge, it achieves satisfactory performance rapidly (e.g., it achieves 90% performance in about 500 iterations). Thus, the choice of the algorithm iteration is application-dependent. As the convergence iterations is random, we study its cumulative distribution function (CDF) in Fig. 7. It is shown that for a given number of channels, e.g., M = 5, increasing the number of users (for example from N = 5 to N = 12) decreases the convergence speed. Also, for a given number of users, e.g., N = 12, increasing the number of channels (for example from M = 5 to M = 10) accelerates the convergence speed. The reasons is as follows: when the number of users increases, the spectrum becomes crowded and hence it needs more time to converge. B. Throughput performance In this subsection, we evaluate the throughput performance of the proposed multi-agent learning algorithm. We study the achievable effective capacities of the users with different QoS indices. Furthermore, we compare the proposed multi-agent learning algorithm with the random selection approach. Under the dynamic and incomplete information, random selection is an instinctive approach. For convenience of simulating, the QoS indices of all the users are set to the same, otherwise specified. To begin with, the achievable effective capacities of the users with different QoS indices are shown in Fig. 8. There are also five channels with the average received SNR being 5dB, 6dB, 7dB, 8dB and 9dB respectively. The results are obtained by taking 5000 independent trials and then taking expectation. It is noted that for a given QoS index, e.g., θ = 10−2 , increas- The aggregate effective capacity of all the users (packets/slot). The aggregate effective capacity of all the users (packets/slot). 11 9 8.5 8 Expected capacity 7.5 N=5 N=7 N=9 N=11 N=13 N=15 7 6.5 10-1 10-1.5 10-2 10-2.5 10-3 10-3.5 10-4 8 7.5 7 6.5 6 The proposed multi−agent learning approach SLA for expected throughput optimization [12] Random selection approach 5.5 5 10 15 Number of users (N) 20 25 Fig. 9. The comparison results between the proposed multi-agent learning approach and the SLA approach for expected throughput optimization. The QoS indices of users ( θ ) Fig. 8. The achievable aggregate effective capacity of the uses for different statistical QoS indices. ing the number of the users leads to significant increases in the aggregate effective capacity when the number of users is small, e.g., N ≤ 11. However, it is also shown that the increase in the aggregate effective capacity becomes trivial when the number of users is large, e.g., N > 11. The reason is that the access opportunities are abundant when the number of the users is small while they are saturated when the number of users is large. Also, for a given number of users, e.g., N = 7, the achievable aggregate increases as the QoS indices decrease. In particular, as the QoS indices become sufficiently small, e.g., θ < 10−3 , the achievable effective capacity moderates. The reasons are as follows: 1) smaller value of QoS index implies loose QoS requirements in the packet violating probability and hence leads to larger effective capacity, and 2) when the QoS index approaches zero, say, when it becomes sufficiently small, the effective capacity degrades to the expected capacity. It is noted that the presented results in this figure comply with the properties of the effective capacity, which were analyzed in Section III.B. Secondly, in order to validate the proposed learning approach for effective capacity optimization, we compare it with an existing stochastic learning automata algorithm (SLA), which is an efficient solution for expected throughput optimization in dynamic and unknown environment [12]. Specifically, the SLA algorithm is implemented for maximizing the expected throughput explicitly rather than maximizing the effective capacity, and then the achievable effective capacity is calculated over the converging channel selection profile. There are also five channels with the average received SNR being 5dB, 6dB, 7dB, 8dB and 9dB respectively, and the QoS indices of the users are randomly chosen from the following set A = [0.2×10−1, 0.5×10−1, 10−1 , 2×10−1, 5×10−1, 0.2× 10−2 , 0.5 × 10−2 , 10−2 , 10−3 ] and the learning step size of SLA is set to b = 0.08. The comparison results are shown in Fig. 9. It is noted from the figure that the performance of the proposed learning algorithm is better than the SLA algorithm when N > 8, which follows the fact that the SLA algorithm is for expected throughput optimization and is not for effective capacity optimization. However, when the number of users is small, i.e., N < 8, the SLA approach performs better. The reasons can be analyzed as follows: (i) the competition among users is slight in this scenario, and (ii) the SLA approach converges to more efficient channel selection profiles in this scenario. The presented results again validate the effectiveness of the proposed multi-agent learning approach for effective capacity optimization. We also compare the proposed learning algorithm with the random selection approach in Fig. 9. It is noted from Fig. that the achievable performance of the approaches increase rapidly as N increases when the number of users is small, e.g., N < 15, while it becomes moderate when the number of users is large, e.g., N > 20. The reasons are: 1) when the multi-agent learning approach finally converges to a pure strategy, the users are spread over the channels. On the contrary, the users are in disorder with the random selection approach, which means that some channels may be crowded while some others may be not occupied by any user. 2) the access opportunities are abundant when the number of users is small, which means that adding a user to the system leads to relatively significant performance improvement. On the contrary, the access opportunities are saturated when the number of users is large, which means that the performance improvement becomes small. 3) when the number of users becomes sufficiently larger, the users are asymptotically uniformly spread over the channels. Thus, the performance gap between the two approaches is trivial. Thirdly, considering the tendency in future wireless networks where the networks are dense and more resources are available [47] (e.g. use of high frequencies), we evaluate the proposed learning algorithm for denser networks with fixed ratio of number of users and channels N/M = 2 in Fig. 10. The QoS indices of the users are set to θ = 10−2 , and the average received SNR of the channels are randomly selected from [5dB, 6dB, 7dB, 8dB, 9dB, 10dB] in each trial. The results are obtained by taking 5000 independent trials The aggregate effective capacity of all the users (packets/slot). 12 R EFERENCES 35 30 25 20 15 10 The proposed multi-agent learning appraoch Random approach 4 6 8 10 12 14 16 18 20 Number of channels (M) Fig. 10. The comparison results between the proposed multi-agent learning approach and random approach with fixed N/M = 2 (the QoS indices are set as θ = 10−2 ). and then taking expectation. It it noted from the figure that both approaches increase linearly as the number of channels increases. Also, it is noted from the figure that the proposed multi-agent learning algorithm significantly outperforms the random selection approach while the performance gap increases as the number of users increases. These results validate the effectiveness of the proposed learning algorithm in future wireless networks. VI. C ONCLUSION In this article, we investigated the problem of dynamic spectrum access in time-varying environment. To capture the expectation and fluctuation in dynamic environment, we considered effective capacity, which takes into account not only the expectation but also other-order moments, to characterize the statistical QoS constraints in packet delay. We formulated the interactions among the users in the dynamic environment as a non-cooperative game and proved it is an ordinal potential game which has at least one pure strategy Nash equilibrium. Based on an approximated utility function, we proposed a multi-agent learning algorithm which is proved to achieve stable solutions with dynamic and incomplete information constraints. The convergence of the proposed learning algorithm is verified by simulation. In future, we plan to establish a general distributed optimization framework which considers the expectation and other higher-order moments. Due to the fact that the considered dynamic spectrum access network is fully distributed and autonomous, NE solution is desirable in this work. However, when information exchange is available, some more efficient solutions beyond NE, e.g., the before-mentioned Nash bargaining and coalitional games, should be developed. In future work, we also plan to develop solutions beyond NE for spectrum management in dense dynamic and heterogeneous networks, in which there is a controller in charge for the users and information exchange is feasible. [1] J. Mitola, and G. Q. Maguire, “Cognitive radio: making software radios more personal,” IEEE Personal Communications, vol. 6, no. 4, pp. 13 –18, Aug. 1999. [2] S. Haykin, “Cognitive radio: brain-empowered wireless communications,” IEEE J. Sel. Areas Commun., vol. 23, no. 2, pp. 201 – 220, 2005. [3] Y. Xu, A. Anpalagan, Q. Wu, et al., “Decision-theoretic distributed channel selection for opportunistic spectrum access: Strategies, challenges and solutions,” IEEE Communications Surveys and Tutorials, vol. 15, no. 4, pp. 1689-1713, Fourth Quarter, 2013. [4] M. Masonta, M. Mzyece, N. Ntlatlapa, “Spectrum decision in cognitive radio networks: A survey,” IEEE Communications Surveys and Tutorials, vol. 15, no. 3, pp. 1088–1107, 2013. [5] Ian. F. Akyildiz, W. Lee, M. Vuran, et al., “NeXt generation/dynamic spectrum access/cognitive radio wireless networks: a survey,” Computer Networks, vol. 50, no. 13, pp. 2127-2159, 2006. [6] Y. Xu, J. Wang, Q. Wu, et al, “Opportunistic spectrum access in cognitive radio networks: Global optimization using local interaction games,” IEEE J. Sel. Signal Process, vol. 6, no. 2, pp. 180–194, 2012. [7] N. Nie and C. Comaniciu, “Adaptive channel allocation spectrum etiquette for cognitive radio networks,” Mobile Networks & Applications, vol. 11, no. 6, pp. 779–797, 2006. [8] M. Felegyhazi, M. Cagalj, and J. P. Hubaux, “Efficient MAC in cognitive radio systems: A game-theoretic approach,” IEEE Trans. Wireless Commun., vol. 8, no. 4, pp. 1984 –1995, 2009. [9] M. Maskery, V. Krishnamurthy, and Q. Zhao, “Decentralized dynamic spectrum access for cognitive radios: Cooperative design of a noncooperative game,” IEEE Trans. Commun., vol. 57, no. 2, pp. 459 –469, 2009. [10] Y. Xu, Q. Wu, J. Wang, et al, “Opportunistic spectrum access using partially overlapping channels: Graphical game and uncoupled learning”, IEEE Trans. on Commun., vol. 61, no. 9, pp. 3906-2918, 2013. [11] Y. Xu, Q. Wu, L. Shen, et al, “Opportunistic spectrum access with spatial reuse: Graphical game and uncoupled learning solutions,” IEEE Trans. on Wireless Commun., vol. 12, no. 10, pp.4814–4826, 2013. [12] Y. Xu, J. Wang, and Q. Wu, et al, “Opportunistic spectrum access in unknown dynamic environment: A game-theoretic stochastic learning solution”, IEEE Trans. Wireless Commun., vol. 11, no. 4, pp. 1380 – 1391, 2012. [13] Q. Zhao, L. Tong, A. Swami, and Y. Chen, “Decentralized cognitive MAC for opportunistic spectrum access in ad hoc networks: A POMDP framework,” IEEE J. Sel. Areas Commun., vol. 25, no. 3, pp. 589-600, 2007 [14] Q. Wu, Y. Xu, J. Wang, et al, “Distributed channel selection in timevarying radio environment: Interference mitigation game with uncoupled stochastic learning,” IEEE Trans. on Veh. Technol., vol. 62, no. 9, pp. 4524 - 4538, 2013. [15] K. Liu and Q. Zhao, “Distributed learning in multi-armed bandit with multiple players,” IEEE Trans. Signal Process., vol. 58, no. 11, pp. 56675681, 2010. [16] A. Balasubramanian and S. Miller, “The effective capacity of a time division downlink scheduling system,” IEEE Trans. Commun., vol. 58, no. 1, pp. 73-78, 2010. [17] H. Tembine, Distributed strategic learning for wireless engineers, CRC Press, 2012. [18] D. Monderer. and L. S. Shapley, “Potential games,” Games and Economic Behavior, vol. 14, pp. 124–143, 1996. [19] R. Myerson, Game Theory: Analysis of Conflict. Cambridge, MA: Harvard Univ. Press, 1991. [20] L. Musavian, S. Aı̈ssa and S. Lambotharan, “Effective capacity for interference and delay constrained cognitive radio relay channels,” IEEE Trans. Wireless Commun., vol. 9, no. 5, pp. 1698-1707, 2010. [21] L. Musavian and S. Aı̈ssa, ”Effective capacity of delay-constrained cognitive radio in Nakagami fading channels,” IEEE Trans. Wireless Commun., vol. 9, no. 3, pp. 1054-1062, 2010. [22] S. Akin and M. Gursoy, ”Effective capacity analysis of cognitive radio channels for quality of service provisioning,” IEEE Trans. Wireless Commun., vol. 9, no. 11, pp. 3354-3364, 2010. [23] H. Su and X. Zhang, “Cross-layer based opportunistic MAC protocols for QoS provisionings over cognitive radio wireless networks,” IEEE J. Sel. Areas Commun., vol. 26, no. 1, pp. 118-129, 2008. [24] H. Li and Z. Han, “Competitive spectrum access in cognitive radio networks: Graphical game and learning,” in Proc. IEEE WCNC, pp. 1–6, 2010. 13 [25] Y. Xu, Q. Wu, J. Wang, et al., “Distributed channel selection in CRAHNs with heterogeneous spectrum opportunities: A local congestion game approach,” IEICE Trans. Commun., vol. E95-B, no. 3, pp. 991–994, 2012. [26] J. Wang, Y. Xu, A. Anpalagan, et al, “Optimal distributed interference avoidance: Potential game and learning,” Transactions on Emerging Telecommunications Technologies, vol. 23, no. 4, pp. 317-326, 2012. [27] P. Sastry, V. Phansalkar and M. Thathachar, “Decentralized learning of nash equilibria in multi-person stochastic games with incomplete information,” IEEE Trans. Syst., Man, Cybern. B, vol. 24, no. 5, pp. 769-777, May 1994. [28] Y. Xing and R. Chandramouli, “Stochastic learning solution for distributed discrete power control game in wireless data networks,” IEEE/ACM Trans. Netw., vol. 16, no. 4, pp. 932-944, 2008. [29] W. Zhong, Y. Xu, M. Tao, et al., “Game theoretic multimode precoding strategy selection for MIMO multiple access channels,” IEEE Signal Process. Lett., vol. 17, no. 6, pp. 563-566, 2010. [30] C. Wu, K. Chowdhury, M. D. Felice and W. Meleis, “Spectrum management of cognitive radio using multi-agent reinforcement learning,” Proc. of 9th Int. Conf. on Autonomous Agents and Multiagent Systems (AAMAS 2010), pp. 1705-1712, 2010. [31] W. R. Zame, J. Xu, and M. van der Schaar, “Cooperative multi-agent learning and coordination for cognitive radio networks,” IEEE J. Sel. Areas Commun., vol. 32, no. 3, pp. 464-477, 2014. [32] H. Li, ”Multi-agent Q-learning for Aloha-like spectrum access in cognitive radio systems,” EURASIP Journal on Wireless Communications and Networking, vol. 2010, pp. 1-15. [33] H. Li, “Multi-agent q-learning of channel selection in multi-user cognitive radio systems: A two by two case,” in Pro. IEEE Conference on System, Man and Cybernetics (SMC), pp. 1893–1898, 2009 [34] H. Li, “Multi-agent q-learning for competitive spectrum access in cognitive radio systems.” in IEEE Fifth Workshop on Networking Technologies for Software Defined Radio Networks, 2010. [35] M. Khan, H. Tembine and A. Vasilakos, “Game dynamics and cost of learning in heterogeneous 4G networks,” IEEE J. Sel. Areas Commun., vol. 30, no. 1, pp. 198-213, 2012. [36] L. Rose, S. Perlaza, C. Martret and Mérouane Debbah, “Selforganization in decentralized networks: A trial and error learning approach,” IEEE Trans. Wireless Commun., vol. 13, no. 1, pp. 268–279, 2014. [37] S. Lien, Y. Lin and K. Chen, “Cognitive and game-theoretical radio resource management for autonomous femtocells with QoS guarantees,” IEEE Trans. Wireless Commun., vol. 10, no. 7, pp. 2196-2206, 2011. [38] S. Perlaza, H. Tembine and S. Lasaulce, “Quality-of-service provisioning in decentralized networks: A satisfaction equilibrium approach,” IEEE J. Sel. Signal Process, vol. 6, no. 2, pp. 104-116, 2012. [39] Y. Xu, J. Wang, Q. Wu, J. Zheng, L. Shen and A. Anpalagan, ”Opportunistic spectrum access with statistical QoS provisioning: an effectivecapacity based multi-agent learning approach,” IEEE International Conference on Communications (ICC’17), accepted. [40] N. Dusit, E. Hossain, and Z. Han, “Dynamic spectrum access in IEEE 802.22-based cognitive wireless networks: A game theoretic model for competitive spectrum bidding and pricing,” IEEE Wireless Communications, vol. 16, no. 2, pp.16–23, 2009. [41] L. Gao, Y. Xu, and X. Wang, “MAP: Multiauctioneer progressive auction for dynamic spectrum access,” IEEE Transactions on Mobile Computing, vol. 10, no. 8, pp. 1144–1161, 2011. [42] J. Suris, L. Dasilva, Z. Han, A. Mackenzie, and R. Komali, “Asymptotic optimality for distributed spectrum sharing using bargaining solutions,” IEEE Trans. Wireless Commun., vol. 8, no. 10, pp. 5225–5237, Oct. 2009. [43] D. Li, Y. Xu, X. Wang, et al, “Coalitional game theoretic approach for secondary spectrum access in cooperative cognitive radio networks”, IEEE Trans. Wireless Commun., vol. 10, no. 3, pp. 844–856, 2011. [44] W. Saad, Z. Han, R. Zheng, et al, “Coalitional games in partition form for joint spectrum sensing and access in cognitive radio networks,” IEEE J. Sel. Signal Process, vol. 6, no. 2, pp. 195–209, 2012. [45] B. Babadi, and V. Tarokh, “GADIA: A greedy asynchronous distributed interference avoidance algorithm,” IEEE Trans. Inf. Theory, vol. 56, no. 12, pp. 6228–6252, 2010. [46] L. Cao and H. Zheng, “Distributed rule-regulated spectrum sharing,” IEEE J. Sel. Areas Commun.,, vol. 26, no. 1, pp.130–145, 2008. [47] Y. Xu, J. Wang, Q. Wu, Z. Du, L. Shen and A. Anpalagan, “A game theoretic perspective on self-organizing optimization for cognitive small cells,” IEEE Communications Magazine, vol. 53, no. 7, pp. 100-108, 2015. [48] W. Liu, L. Zhou and B. Giannakis, “Queuing with adaptive modulation and coding over wireless links: Cross-layer analysis and design,” IEEE Trans. Wireless Commun., vol. 4, no. 3, pp. 1142-1153, 2005. [49] K. B. Letaief and J. S. Sadowsky, “Computing bit error probabilities for avalanche photodiode receivers using large deviations theory,” IEEE Trans. Inform. Theory, vol. 38, no. 3, pp. 1162-1169, 1992. [50] 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, 2003. [51] M. Kuczma, An Introduction To The Theory Of Functional Equations and Inequalities: Cauchy’S Equation And Jensen’S Inequality, Springer, 2008. [52] B. Vcking and R. Aachen, “Congestion games: optimization in compe tition,” in Proc. 2006 Algorithms and Complexity in Durham Workshop, pp. 9-20. [53] P. Sastry, V. Phansalkar, and M. Thathachar, “Decentralized learning of nash equilibria in multi-person stochastic games with incomplete information,” IEEE Trans. Syst., Man, Cybern. B, vol. 24, no. 5, pp. 769-777, May 1994. [54] A. Doufexi, S. Armour, M. Butler, et al., “A comparison of the HIPERLAN/2 and IEEE 802.11 a wireless LAN standards,” IEEE Communications Magazine, vol. 40, no. 5, pp. 172-180, 2002.
7cs.IT
G. R. MacCartney, Jr., T. S. Rappaport and A. Ghosh, “Base Station Diversity Propagation Measurements at 73 GHz Millimeter-Wave for 5G Coordinated Multipoint (CoMP) Analysis,” 2017 IEEE Globecom Workshops (GC Wkshps), Singapore, Dec. 2017, pp. 1-7. Base Station Diversity Propagation Measurements at 73 GHz Millimeter-Wave for 5G Coordinated Multipoint (CoMP) Analysis arXiv:1710.03626v1 [cs.IT] 10 Oct 2017 George R. MacCartney Jr.a , Theodore S. Rappaporta , and Amitava Ghoshb a NYU WIRELESS, b NOKIA Bell Labs Abstract—This paper describes wideband (1 GHz) base station diversity and coordinated multipoint (CoMP)-style large-scale measurements at 73 GHz in an urban microcell open square scenario in downtown Brooklyn, New York on the NYU campus. The measurements consisted of ten random receiver locations at pedestrian level (1.4 meters) and ten random transmitter locations at lamppost level (4.0 meters) that provided 36 individual transmitterreceiver (TX-RX) combinations. For each of the 36 radio links, extensive directional measurements were made to give insights into small-cell base station diversity at millimeter-wave (mmWave) bands. High-gain steerable horn antennas with 7◦ and 15◦ halfpower beamwidths (HPBW) were used at the transmitter (TX) and receiver (RX), respectively. For each TX-RX combination, the TX antenna was scanned over a 120◦ sector and the RX antenna was scanned over the entire azimuth plane at the strongest RX elevation plane and two other elevation planes on both sides of the strongest elevation angle, separated by the 15◦ HPBW. Directional and omnidirectional path loss models were derived and match well with the literature. Signal reception probabilities derived from the measurements for one to five base stations that served a single RX location show significant coverage improvement over all potential beamformed RX antenna pointing angles. CDFs for nearest neighbor and Best-N omnidirectional path loss and cell outage probabilities for directional antennas provide insights into coverage and interference for future mmWave small-cells that will exploit macro-diversity and CoMP. Index Terms—MmWave, channel sounder, 73 GHz, diversity, macro-diversity, CoMP, outage, path loss, beamforming. I. I NTRODUCTION Millimeter-wave (mmWave) bands will play an important role in fifth-generation (5G) wireless communications for mobile access and backhaul [1], [2]. 5G trials are on-going for fixedwireless and mobile scenarios in mmWave bands, with customer trials expanding [3]. Numerous propagation measurements were performed to show that mmWave bands are viable for future 5G wireless and to assist in the creation of channel models [4]– [7]. However, a few key aspects have yet to be extensively examined at mmWave bands such as spatial consistency, dynamic blocking and rapid fading, and base station diversity [8]–[11]. This paper presents initial results from a coordinated multipoint (CoMP)-style propagation measurement campaign conducted at NYU during the summer of 2016, with the goal of understanding mmWave base station diversity characteristics, also known as macro-diversity. Base station and/or antenna diversity in small cells is well understood to improve signal-to-interference-plus-noiseratio (SINR) for increased capacity and to reduce outage [12]. CoMP techniques were standardized by 3GPP and are employed in Long Term Evolution-Advanced (LTE-A) to make use of spatially separated base stations to jointly communicate with a This material is based upon work supported by NOKIA and the NYU WIRELESS Industrial Affiliates Program, and three National Science Foundation (NSF) Research Grants: 1320472, 1302336, and 1555332. The authors thank S. Sun, Y. Xing, H. Yan, J. Koka, R. Wang, and D. Yu, for their help in conducting the measurements. Corresponding e-mail: [email protected] mobile user through coordination [13], [14]. CoMP is typically referred to as network or distributed multiple-input multipleoutput (MIMO) and reduces intercell interference, increases network capacity, and improves coverage for cell-edge users [12]. Base station diversity and CoMP are attractive technologies for mmWave systems in order to reduce outages caused by dynamic channel conditions and human blocking [8], [11]. MmWave systems will use high-gain and fast-switching electrically steerable antennas to overcome the additional free space path loss (FSPL) in the first meter of propagation compared to sub-6 GHz bands [15]. An implication of this architecture is the influence of dynamic objects in both line-of-sight (LOS) and non-LOS (NLOS) scenarios that can cause deep fading in beamformed links between a base station and mobile. Traditional cellular systems use quasi-omnidirectional or sectored antennas at the base station and nearly omnidirectional antennas at the mobile (also called user equipment or UE) that result in broad angles of departure and arrival. There are very few large-scale propagation studies for CoMP / base station diversity in dense urban environments at mmWave frequencies. Measurements were conducted by Le et al. at 25 GHz over 20 MHz of bandwidth and at 38 GHz over 200 MHz of bandwidth for links less than 1 kilometer (km) to see how diversity could overcome adverse effects of rain at centimeter-wave (cmWave) and mmWave bands [16]. Results in [16] with 29 dBi and 32 dBi high-gain antennas showed that as the spatial separation between base stations increased, site diversity gain increased. A second observation corroborated earlier measurement results and theory where diversity gain increased as angle separation between the mobile and two base stations increased [16]. A 5G multipoint field trial was conducted at 15 GHz in the parking lot of NTT Docomo in Japan with a 5G prototype system in a 100 m x 70 m cell and a 20 m x 20 m small-cell to investigate throughput gains using multipoint coordination between two transmission points (TPs) each with 90◦ sectored-beam antennas, as a UE with multiple omnidirectional antennas traveled along a route [17]. Downlink CoMP with joint transmission (JT) and dynamic point selection (DPS) revealed a 70% throughput gain in the small-cell study and a 30% throughput improvement in the larger study area, compared to a single serving TP. Ericsson conducted a study in Stockholm, Sweden to test distributed MIMO and CoMP potentials with 4x4 MIMO at 15 GHz over 200 MHz of bandwidth and with two base station TPs that each consisted of an antenna array with 15 dBi and 90◦ HBPW antennas while the UE had an array of omnidirectional antennas [18]. Spatial multiplexing gains were achieved in LOS where throughput improved from 1.1 Gbps (5.7 bps/Hz) to 2.5 Gbps (12.6 bps/Hz). For large angular separation between the two TPs and the UE (appears to be 180◦ ), rank-4 transmission was consistent with a maximum achievable spectral efficiency of 13 bps/Hz [18]. In order to obtain an understanding of the mmWave channel for real-world base station diversity and CoMP applications, we conducted a large-scale measurement campaign using directional high-gain and narrowbeam antennas which is described in Section II. Preliminary results and models are presented in Section III, and Section IV provides conclusions. II. M EASUREMENT C AMPAIGN AND H ARDWARE A. Measurement Environment Propagation measurements at 73.5 GHz were conducted in summer 2016 on the NYU Engineering campus, which is built around an orchard of cherry trees that is surrounded by an open square (O.S.) in downtown Brooklyn, New York. The campus was a typical downtown environment with lampposts, street signs, tall buildings, walkways, foliage, etc., and the study area spanned ∼200 m by 200 m, representing an urban microcell (UMi) scenario. The campus is surrounded by buildings of four to fifteen stories on all four sides, with urban canyon streets at the intersection of each corner. Overall, 11 locations were chosen for both TX and RX locations, representing typical locations for base stations or heavy-user concentrations, based on access to power and are displayed as yellow stars in Fig. 1. Of the 11 locations, on any given day, one of the locations was chosen as the TX location, and some of the other 10 locations would be used for measuring RX responses. Each of the 11 locations was systematically chosen as a TX location when the other locations were used as RX locations throughout the measurement campaign. Not all RX locations were measured for a given TX, but the goal was to measure at least 3 RX’s for each TX and to transmit from at least 3 TX’s to each RX, for a diverse range of nearest neighbor distances and environments for each measurement subset. Over 150 Gigabytes (GBs) of data were collected for directional scanning antenna measurements as described below. In total, 36 TX-RX radio links were tested, where signals were received from 3 or more TX locations at 9 RX locations, and where 8 TX locations were used to transmit to 3 or more RX locations. Measurements revealed values and variations in received power, outage, best beam angles, and temporal delay spread among various pointing angles at each RX, for the case of multiple serving base station locations and pointing directions in both LOS and NLOS. A total of 11 LOS and 25 NLOS TX-RX links were measured using 14.9 dBm TX power (into the antenna) and 1 GHz of RF null-to-null bandwidth, with 3D transmitter-receiver (T-R) separation distances that ranged from 21 m to 140 m in LOS and 59 m to 170 m in NLOS. The 3D T-R separation distances were measured as the 3D Euclidean distance between a TX and RX, where TX heights were 4.0 m above ground level (AGL) and RX heights were 1.4 m AGL. The heights were chosen to emulate a small-cell scenario where access points (APs) are on lampposts and very tall street signs and to emulate a mobile user interacting with their device in an Internet browsing mode. Throughout this paper, the terms base station (BS) and access point (AP) are used interchangeably. Table I indicates the TX-RX location combinations and their corresponding T-R separation distance ranges. Table II provides the mean, median, standard deviation, and range of distances (R) of the nearest serving base stations for the RX locations. The green patches in the center of the open square in Fig. 1 consist Fig. 1: TX and RX locations on the NYU Engineering campus. The measurement area is approximately 200 m by 200 m and Table I indicates the TX-RX combinations measured. TABLE I: List of the TX locations used to transmit to each RX location. RX Location L1 L2 L3 L4 L7 L8 L9 L10 L12 L13 Serving TX Location L3,L4,L7,L11,L13 L3,L9,L12 L2 L1,L3,L7,L10,L13 L1,L2,L4,L10 L1,L7,L9 L1,L2,L4,L11 L4,L7,L13 L1,L2,L4,L7,L11 L1,L4,L10 T-R Dist. Range (m) 80 ≤ d ≤ 140 61 ≤ d ≤ 78 77 80 ≤ d ≤ 170 72 ≤ d ≤ 133 21 ≤ d ≤ 78 63 ≤ d ≤ 123 59 ≤ d ≤ 140 61 ≤ d ≤ 149 59 ≤ d ≤ 107 of moderate to full foliage, with the canopy approximately 67 meters AGL. The 4 meter TX heights were below the tree canopy and thus only thin branches and tree trunks contributed to light obstructions in propagation paths. A TX-RX combination was considered to be LOS if a straight line (in 3D space) drawn between the TX antenna and RX antenna resulted in a clear optical path. If a clear optical path was obstructed by either a large tree trunk or buildings, then the TX-RX combination was considered NLOS. In cases where a TX-RX combination had light branches along the straight line drawn between the TX and RX antennas, the setting was specified as LOS. B. Measurement Hardware The measurement campaign was conducted using an absolutetiming ultra-wideband sliding correlator channel sounder that transmitted a 500 Mega-chips-per-second (Mcps) pseudorandom noise (PN) sequence with a 1 GHz RF null-to-null bandwidth at a center frequency of 73.5 GHz [19], [20]. The system TABLE II: Distance (R) statistics for the 9 UMi RX locations and their nearest neighbor TX locations, rounded to the nearest integer. Nearest Neighbor 1 2 3 Mean [m]: R̄ / Median [m]: R̃ 63/63 75/78 93/87 STD [m]: σR 19 14 20 Range [m]: R ∈ [min, max] [21,80] [41,87] [78,140] TABLE III: Ultra-wideband sliding correlator channel sounding system specifications used for the 73 GHz CoMP/AP diversity campaign [19]. Carrier Frequency Probing Signal TX PN Code Chip Rate TX PN Code Chip Width RX PN Code Chip Rate Slide Factor RF Center Frequency RF Bandwidth (Null-to-Null) TX Antenna Gain TX Az./El HPBW RX Antenna Gain RX Az./El. HPBW Max. TX Power / Max. EIRP TX/RX Antenna Height Max. Measurable Path Loss Multipath Time Resolution TX Polarization RX Polarization 73.5 GHz 11th order PRBS (length=2047) 500 Mcps 2.0 ns 499.9375 Mcps 8 000 73.5 GHz 1 GHz 27 dBi 7◦ /7◦ 20 dBi 15◦ /15◦ 14.9 dBm / 41.9 dBm 4.0 m / 1.4 m 175 dB w/ antennas 2 ns Vertical Vertical / Horizontal vertical-to-vertical (V-V) antennas. The same procedure was repeated for cross-polarized vertical-to-horizontal (V-H) antennas, resulting in a maximum of 90 azimuthal scans for a single TXRX combination. As described earlier, there were six instances where 2 additional TX pointing angles were measured, resulting in 102 scans. Each of the azimuthal scans consisted of 24 recorded PDPs, for a maximum of 2,160 recorded PDPs per TX-RX location combination (2,448 for 102 azimuth scans), although, 700 PDPs were recorded on average for each TXRX location combination since angles where a signal was not detectable were not recorded. A total of 25,614 PDPs were recorded. We note that the start (1st) and end (15th) angles of the TX sector were manually determined during the measurements for each TX-RX link so as to measure the most dominant angles of departure that resulted in the strongest received power at the RX. The center angle (8th) of the sector typically resulted in the maximum received power at the RX. III. P RELIMINARY R ESULTS employed narrowbeam rotatable directional horn antennas with a 7◦ azimuth/elevation (Az./El.) half-power beamwidth (HPBW) and 27 dBi of gain at the TX, and a 15◦ Az./El. HPBW antenna with 20 dBi of gain at the RX. Narrowbeam and directional antennas were used at both the TX and RX for spatial filtering and to emulate future mmWave systems that will consist of adaptable directional beams from a base station to somewhat broader beamwidths that are steerable at a mobile handset. The TX and RX antennas were mechanically rotated by programming a FLIR D100 pan/tilt gimbal in LabVIEW. The channel sounder was able to record absolute and relative time-delay power delay profiles (PDPs) per the synchronization procedure outlined in [19], with 2 ns multipath component (MPC) time resolution. The synchronization procedure allowed for synthesizing accurate omnidirectional and sectored PDPs. Table III provides specifications for the ultra-wideband sliding correlator channel sounder (See [19] for additional details). C. Measurement Methodology and Beam Sweeping Procedure To understand the directional nature of the mmWave channel and to obtain a large amount spatial information at the TX and RX for AP diversity analysis, the transmitted signal for each TX-RX combination was radiated with a 7◦ HPBW antenna and was rotated in sequential increments of 8◦ to span at least a 120◦ sector (15 pointing angles), representative of a typical panel base station. For six of the measured TX-RX links with rich reflections and scattering observed beyond the 120◦ sector, a larger TX sector of 136◦ was measured. For each TX antenna pointing angle, the RX antenna with a 15◦ HPBW antenna was scanned in 15◦ increments over the complete azimuth plane and this was repeated for three elevation planes. Measurements were recorded for the RX elevation angle with the strongest received power and ± 15◦ from the strongest elevation angle which was typically 2◦ to 5◦ above the horizon. A PDP was recorded with 20 averages for each unique antenna pointing angle combination between the TX and RX where a signal was detectable. If the signal was not detectable, a PDP was not recorded. For three elevation planes and 15 TX pointing angles, this amounted to 45 azimuthal measurement scans for co-polarized A. Path Loss Models UMi O.S. directional and omnidirectional path loss models were by-products of the measurements. Path loss models describe large-scale propagation loss for link budget and interference analysis. Friis’ free space transmission formula describes the received power at a distance d in meters as calculated by [21]:  Pr (d) = Pt Gt Gr λ 4πd 2 (1) where Pr is the received power in milliwatts (mW), Pt is the transmit power in mW, Gt and Gr are the linear gains of the TX and RX antennas, respectively, λ is the wavelength in meters, and d is the 3D Euclidean distance in meters between the TX and RX. Friis’ transmission formula in (1) is often re-written in log-scale as [4], [21]:  Pr (d)[dBm] = Pt [dBm] + Gt [dBi] + Gr [dBi] + 20 log10 λ 4πd  (2) The square exponent in (1) and the “20” before the log-term in (2) indicate that radio waves decay by 20 dB per decade of distance in free space. An interesting note about (1) and Friis’ transmission formula is the relationship between antenna gain, the size of the antenna aperture, and the carrier wavelength. In general, antenna gain is a function of the effective aperture area Ae and wavelength λ: G = Aλe 24π . If one increases the frequency and keeps the same physical size of the antenna aperture at the TX and RX, then received power in free space is greater at higher frequencies than at lower frequencies. This received power gain in free space can be expressed as a function of the two frequencies:  Gincrease = f2 f1 2 (3) where f1 is the lower frequency and f2 is the higher frequency, with identical size TX and RX antenna apertures at both frequencies [22]. Regardless of the use of directional or omnidirectional antennas, received power in the real-world (non-free space channels) can be calculated as a function of the measured path loss when removing the antenna gains from the path loss model [22]: Pr (d)[dBm] = Pt [dBm] + Gt + Gr − PL(d)[dB] (4) TABLE IV: 73 GHz directional CI V-V path loss model (6) parameters for the UMi O.S. scenario with TX heights of 4.0 m and RX heights of 1.4 m. TX antennas had 27 dBi of gain with 7◦ Az./El. HPBW and RX antennas had 20 dBi of gain with 15◦ Az./El HPBW. 73 GHz Directional CI Path Loss Models for d0 = 1 m LOS NLOS NLOS-best Freq. Pol. PLE σ [dB] PLE σ [dB] PLE σ [dB] 73 GHz V-V 2.0 1.9 4.6 11.4 2.9 11.0  d d0  + χσ for d ≥ d0 (5) where fc is the carrier frequency in Hz, d0 is a reference distance (1 m), n is the path loss exponent (PLE), and FSPL(f c , d0 )  4π = 32.4 + is the FSPL at 1 m at f given by: 20 log c 10 λ   fc 20 log10 1GHz . The zero-mean Gaussian random variable χσ with standard deviation σ (in dB) represents the shadow fading. A common way of re-writing (5) is in the 3GPP-style format with d0 set to 1 m [23], [24]: PLCI (fc , d)[dB] = 32.4 + 10n log10 (d) + 20 log10 (fc ) + χσ Setting LOS NLOS where PL(d)[dB] is the observed path loss at a 3D distance d. The close-in free space reference distance (CI) path loss model is commonly used in the literature and standard bodies and is written as [4], [23]: PL(fc , d)[dB] = FSPL(fc , d0 ) + 10n log10 TABLE V: Omnidirectional path loss model environment terminology. (6) where d is the 3D Euclidean distance between the TX and RX, fc is the carrier frequency in GHz, n is the PLE without antenna gains considered in path loss computation [4], [25], [26], and 32.4 is FSPL at 1 GHz at 1 m. The use of 1 m as a reference distance allows path loss to be tied to a true physical anchor point that represents the free space transmit power away from the TX antenna and at a close-in reference distance d0 where no obstructions or blockages are likely to exist. 1) UMi Open Square Directional Path Loss: The directional path loss models are based on the AP diversity measurements performed across numerous angles of departure (AODs) and angles of arrival (AOAs) as described in Section II. The path loss data was calculated by integrating the power under each PDP and subtracting that from the transmit power and removing the TX and RX antenna gains as indicated in (4), for each of the arbitrary antenna pointing angles between the TX and RX. FSPL at the close-in reference distance of d0 = 1 m at 73.5 GHz is 69.8 dB. Table IV in [4] describes the environmental designation terminology for the LOS, NLOS, and NLOS-best directional path loss models [4] given subsequently. Table IV provides the CI V-V path loss model parameters for a 1 meter reference distance derived from the directional measurements. The LOS CI path loss model has a PLE of n = 2.0 which perfectly matches theoretical FSPL by Friis’ free space transmission formula [21]. The NLOS CI PLE of n = 4.6 indicates that 73 GHz radio frequencies attenuate by 46 dB per decade of distance beyond 1 m in the UMi O.S. scenario, which is nearly identical to the PLE of 4.7 from UMi measurements in Manhattan [4]. A surprising result here is the PLE of n = 2.9 for the best TX-RX pointing angle combinations in NLOS (NLOS-best). This result shows that if the TX and RX antennas can beamform and optimally align, that path loss can be reduced in NLOS by 18 dB per decade of distance beyond the first meter of propagation, compared to arbitrary antenna pointing angles. This observation is larger than the 7 dB and 10 dB per decade Description Path loss when there is a clear optical path between the TX and RX site. Path loss when the TX and RX sites are separated by obstructions and there is no clear direct/optical path between the TX and RX sites. TABLE VI: 73 GHz omnidirectional CI V-V path loss model (6) parameters with d0 = 1 for the UMi O.S. scenario in downtown Brooklyn with TX heights of 4.0 m and RX heights of 1.4 m. 73 GHz Omnidirectional CI Path Loss Models for d0 = 1 m LOS NLOS Freq. Pol. PLE σ [dB] PLE σ [dB] 73 GHz V-V 1.9 1.7 2.8 8.7 improvement for UMi in Manhattan at 28 GHz and 73 GHz, respectively [4]. This improvement in link margin for the best TX-RX pointing angle combinations may be attributed to the much more extensive beam sweeping conducted in this campaign or might be due to the fact that the measured environment has buildings on all four sides of the square that support rich reflections and scatterers. 2) UMi Open Square Omnidirectional Path Loss: While directional path loss models are useful for simulating and designing systems that will use narrowbeam antennas and beamforming techniques, omnidirectional path loss models are historically used by standards bodies since most legacy wireless systems use quasi-omnidirectional or sectored antennas at the base station and relatively omnidirectional antennas at the mobile side. Typically, arbitrary antenna patterns and MIMO processing are simulated with omnidirectional path loss models, but accurate representation of the angles and time delays of the channel must be used [27]. The method for synthesizing omnidirectional path loss values from directional path loss data described in [4], [26], [28] was performed with the directional path loss data. The LOS and NLOS terminology for the omnidirectional path loss models is provided in Table V. The LOS and NLOS CI V-V omnidirectional path loss models (6) and path loss data are plotted in Fig. 2, with CI path loss model parameters given in Table VI. The omnidirectional CI model PLE is n = 1.9 and indicates a multipath rich LOS environment. Since Table VI indicated that the directional LOS PLE was n = 2.0, an omnidirectional PLE of n = 1.9 indicates that the LOS UMi O.S. environment results in 1 dB less attenuation per decade of distance when using omnidirectional antennas compared to directional antennas. However, it is important to note that omnidirectional antennas have less gain than directional antennas, meaning the system range and link budget will be smaller when using omnidirectional antennas for a given TX power level into the antenna, despite the smaller PLE [29]. Thus, it can be inferred that the direct LOS path contains most but not all of the propagating energy from the TX to the RX such that multipath reflections, scatterers, and diffuse components also contribute to the total received power at the RX. The omnidirectional LOS PLE of n = 1.9 is comparable to the LOS PLE of n = 1.85 reported for the UMi O.S. scenario in [5]. The NLOS PLE for the UMi O.S. at 73 GHz was determined to be n = 2.8 and might indicate more reflections and scattering TABLE VII: Probability that an RX experienced signal reception over all antenna pointing angles for one to five serving base stations. # of Serving Base Stations 1 2 3 4 5 Fig. 2: 73 GHz omnidirectional CI V-V path loss for the UMi O.S. scenario in downtown Brooklyn. Blue circles represent LOS path loss data and red crosses indicate NLOS path loss data compared to the UMi Street Canyon and UMa scenarios that reported PLEs of n = 3.0 or greater [5]. The relatively low PLE of 2.8 in NLOS in the UMi O.S. might be attributed to light foliage and large cross-sectional reflectors (buildings) in the environment that result in low attenuation and strong multipath components, respectively. The UMi O.S. NLOS CI path loss model in [5] reported a PLE of 2.83 which is nearly identical to the PLE of 2.8 found here. B. Directional Outage Probabilities For each of the TX locations indicated in Table I, the RX locations measured for each TX may be considered as random drops in a realistic small-cell scenario with multiple base stations over an approximate 200 m by 200 m area. We first note that received power was measured for at least one arbitrary TX-RX antenna pointing angle combination for each of the 36 TX-RX links, resulting in a 0% outage for the entire campaign. This means that there was at least one TX and RX pointing angle for every TX-RX combination that enabled signal reception above a 5 dB SNR threshold, which is remarkable given that the TX power was only 14.9 dBm into the TX antenna. Also note that an outage means that received power was not measurable above the 5 dB SNR threshold of our system when recording PDPs, for which the maximum measurable path loss was 175 dB with the TX/RX antennas used (see Table III). Since each RX was scanned in 15◦ increments over the 360◦ azimuth plane (24 pointing angles) and at three separate elevation planes, 72 overall RX beamformed angles were tested. In order to learn the outage for the beamformed angles at each RX and over all of the TX antenna pointing angles for each TX-RX link, the probability of reception over all RX antenna pointing angles was calculated. For outage discussion purposes, if a signal was recordable above the 5 dB SNR threshold for all 72 RX antenna pointing angles, then the link was not considered an outage for the following analysis. Of all 36 TX-RX combinations measured, 20 RX locations resulted in recordable PDPs for all 72 measured RX pointing angles (3 different elevation angles, and all 24 azimuthal angles per elevation angle). This resulted in all random RX locations to effectively receive detectable signal 55.6% of the time from Probability of Reception over all RX Angles 55.6% 81.5% 90.5% 94.1% 100.0% # of Link Combinations 36 54 42 17 3 just a single TX when considering the entire 120◦ TX sector, over all arbitrary RX antenna pointing directions. The data was then examined to determine the probability of detectable received signal at the RX over all RX antenna pointing angles if being served by two, three, four, or five base stations. For an RX served by exactly two 120◦ sectored base stations (all combinations of 1 RX and 2 TX base stations), a received signal was detectable over all 72 RX antenna pointing angles, 81.5% of the time, a nearly 26% improvement in reception for all beamformed angles compared to service from a single base station. Next, all possible TX-RX combinations for which an RX is served by three, four, or five base stations were considered for determining service/outage probability. A received signal was detectable over all arbitrary RX antenna pointing angles when served by three base stations with a probability of 90.5%. This indicates an additional 9% improvement compared to two serving base stations. For RX’s with four serving base stations, only one RX lacked reception over all antenna pointing angles. Additionally, for the 3 combinations where an RX had five serving base stations, a signal was recordable over all RX antenna pointing angles, resulting in no directional outage. Table VII provides the probabilities of signal reception over all 72 arbitrary RX antenna pointing angles with one to five serving base stations. These probabilities indicate the likelihood of a non-outage over all RX antenna beamformed pointing angles spanning 360◦ and 45◦ in the azimuth and elevation planes, respectively, for wide TX sectors of 120◦ . This observation is extremely important at mmWave frequencies and for electrically steerable antenna beams where mobiles will need to be served by multiple APs. The results here indicate that if three base stations serve a single RX to maintain coverage, and if 90.5% of the time all beamformed angles can maintain a detectable received signal, then in the event of a rapid fade or blockage in one direction, the RX antenna could quickly beam switch to another direction with a high probability of maintaining the link and avoiding loss in coverage. C. Nearest Neighbor and Best-N Omnidirectional Path Loss The CDFs of omnidirectional path loss for nearest neighbors or the closest TX locations in Euclidean distance to each RX location are plotted in Fig. 3. Note that there were 9 RX locations with 3 serving base stations and 1 RX location with 1 serving base station. In Fig. 3 the 1st nearest neighbor (NN) corresponds to path loss observed at an RX for the closest TX, the 2nd NN corresponds to path loss observed at an RX for the second closest TX, and so on. Inspection of the median values shows that the 1st, 2nd, and 3rd NNs are separated by 7 dB each. An interesting note though is that NN does not always result in the lowest path loss, as noticed when comparing the 90% to 100% marks on the CDFs. TABLE VIII: Best and arbitrary beam pointing outage probabilities for median nearest neighbor base station distances from Table II. Scenario NLOS NLOS-Best Scenario NLOS NLOS-Best Probability (Path Loss (dB) < Abscissa) Fig. 3: CDF of 73 GHz V-V omnidirectional path loss at an RX for nearest neighbor base stations. 1 CDF of 73 GHz V-V Omnidirectional Path Loss for Best-N Base Stations 0.8 Median Path Loss: All BS: 118.2 dBm Best-1 BS: 104.2 dBm Best-2 BS: 116.1 dBm Best-3 BS: 127.0 dBm 0.6 power, for various antenna gains, and/or for a different receiver threshold. If the received power level x at a distance R is represented by a normal random variable with mean x and shadow fading standard deviation σ (in dB) about the distant dependent mean, and a receiver threshold x0 , then the probability that the received signal exceeds the threshold on a cell boundary is [30]: Z ∞ p(x)dx = Px0 (R) = P [x > x0 ] = 0.4 x0 ALL TX-RX Combinations Best-1 Base Station Best-2 Base Station Best-3 Base Station 0.2 0 95 Poutage at Cell-Edge Nearest Neighbor Cell Radius 3rd 100 m 200 m 1st 2nd 5.5% 8.0% 52.0% 2.4% 12.2% 6.9E-5% 2.3E-4% 8.6E-4% 2.3E-2% 4.1E-4% Poutage in Region w/ Cell Radius Nearest Neighbor Cell Radius 3rd 100 m 200 m 1st 2nd 0.7% 1.8% 2.8% 4.6% 27.1% 1.8E-5% 6.0E-5% 7.1E-3% 1.1E-4% 2.4E-4% 100 105 110 115 120 125 130 135 140 145 Omnidirectional Path Loss (dB) Fig. 4: CDF of 73 GHz V-V omnidirectional path loss at an RX for the Best-N serving base stations. For the Best-N base stations, the omnidirectional path losses for each RX and its serving base stations are sorted from lowest to highest such that N=1 considers the lowest path loss for each RX, N=2 considers the second lowest path loss for each RX, and so on. The CDFs for the Best-N up to N=3 are plotted in Fig. 4 and a noteworthy observation is the difference in median omnidirectional path loss for the Best-N base stations, where the Best-1 and Best-2 median path losses differ by almost 12 dB and the Best-2 and Best-3 base station path losses differ by nearly 11 dB. The CDFs reveal how much interference to expect from the 2nd strongest base station for a given RX, or the coverage one can expect if the strongest base station is blocked or inaccessible. D. Coverage Distance and Coverage Area Probabilities Using the median nearest neighbor distances in Table II along with 100 m and 200 m (predicted mmWave cell radii), a simple signal coverage analysis was performed. For typical system coverage and worst-case analysis, the NLOS and NLOS-best path loss model parameters from Table IV were used to determine the probability that a received signal is above the received signal threshold for a mobile at a median nearest neighbor distance or the cell-edge. The system parameters for the measurements were used for analysis (see Table III) which resulted in a receiver threshold of: Pr(thresh.) = PT X + GT X + GRX − P Lmax + 10 log10 (BW[GHz]) = 14.9 dBm + 27 dBi + 20 dBi − 175 dB + 0 dB = −113.1 dBm (7) The formula in (7) can be modified for a similar system by scaling the bandwidth relative to 1 GHz, for a different transmit 1 1 − erf 2 2  x0 − x √ σ 2  (8) The CI V-V path loss models in Table IV were used to determine the mean path loss x at a distance R with the shadow fading standard deviation σ (in dB), and receiver threshold x0 = Pr(thresh.) , in (8). These probabilities are also extended to the probability of outage within a coverage region as described in [30]. Table VIII provides the NLOS and NLOS-best model probability that a mobile experiences an outage at the median distances from the three nearest base stations as well as the probability of outage within a coverage region having a cell radius of the nearest neighbor base station median distances. The coverage probabilities at a cell-edge in Table VIII show that a mobile may experience only an 8% outage at a median distance from the 3rd nearest base station in NLOS for any arbitrary antenna pointing direction. A cell with radius 200 m has 52% outage at the cell-edge, but improves nearly 40% for a radius of 100 m. Surprisingly, outage at the cell-edge and within a coverage region from the nearest neighbor and max cell radius base stations are nearly zero percent for situations in which the TX and RX antennas can perfectly align their beams to provide maximum received power in NLOS (NLOS-best). This indicates a significant improvement in coverage for mmWave cellular networks that can beamform and beam track under NLOS conditions, even if the 1st and 2nd nearest neighbor base stations are inaccessible. This preliminary study shows macro-diversity and joint transmission or coordinated scheduling CoMP in mmWave small-cells will be advantageous. IV. C ONCLUSION A new base station diversity and CoMP-style measurement campaign conducted at 73 GHz mmWave was presented. The measurements were conducted in a UMi O.S. scenario in downtown Brooklyn, New York to study the impact of AP diversity and coverage at mmWave bands. In all, 36 total TX-RX location combinations were measured for a number of directional TX and RX antenna pointing angles. LOS and NLOS directional path loss models were derived, indicating that LOS propagation in the UMi O.S. scenario matches perfectly with FSPL with a PLE of 2.0, and minimal shadow fading of 1.9 dB. While the directional NLOS PLE was 4.6 (similar to other UMi campaigns [4]), the directional NLOS PLE was 2.9 when considering the best antenna pointing angles between the TX and RX. This is on par with sub6 GHz NLOS path loss models, as long as the TX and RX can beamform and steer in the optimal directions. Omnidirectional path loss models synthesized from the directional measurements revealed a LOS PLE of 1.9 and a NLOS PLE of 2.8 which are nearly identical to path loss parameters in the literature. Probabilities of signal reception over all tested beamformed RX pointing angles for wide sectored TX angles of departure were provided for scenarios with one to five serving base stations. For one serving base station, an RX was able to receive a signal over all antenna pointing angles with a probability of 55.6%. The probability of signal reception was improved when increasing the number of serving base stations to an RX, resulting in 81.5% and 90.5% probability of signal reception across all RX angles when served by two and three base stations, respectively. The nearly 26% improvement from one to two serving base stations and the 9% improvement from two to three serving base stations shows that an RX has a high probability of maintaining signal coverage over all angles of arrival in a mmWave small-cell with macro-diversity and multiple APs. Additionally, if service to one arbitrary angle is blocked or experiences a deep signal fade, the results here show that either another arbitrary angle at the RX could be used with high probability, or rapid re-routing handoff between another serving base station could be employed. Nearest neighbor and Best-N statistics for omnidirectional path loss at the mobile handset were provided for coverage and interference analysis for mmWave macro-diversity and CoMP. An interesting observation was the nearly 12 dB median difference in omnidirectional path loss between the Best-1 and Best-2 serving base stations. Analysis for NLOS showed that a mobile being served by the 3rd nearest neighbor base station will receive a signal above a receiver threshold with a 92% probability for arbitrary TX and RX antenna pointing angles. Additionally, if the TX and RX antennas can beam steer and optimally align in NLOS, then the probability of outage in a coverage region with a cell radius of 200 m is less than onehundredth of a percent. Future work will explore spatial lobes and angular spread, temporal delay, and more, from the AP diversity measurements described herein. R EFERENCES [1] T. S. Rappaport et al., “Millimeter Wave Mobile Communications for 5G Cellular: It Will Work!” IEEE Access, vol. 1, pp. 335–349, May 2013. [2] F. Boccardi et al., “Five disruptive technology directions for 5G,” IEEE Communications Magazine, vol. 52, no. 2, pp. 74–80, Feb. 2014. [3] A. Pressman, “Verizon testing super fast 5g internet with customers in 11 cities,” Fortune, Feb. 2017. [Online]. Available: http://fortune.com/2017/ 02/22/verizon-testing-5g-11-cities/ [4] T. S. Rappaport et al., “Wideband millimeter-wave propagation measurements and channel models for future wireless communication system design (Invited Paper),” IEEE Transactions on Communications, vol. 63, no. 9, pp. 3029–3056, Sept. 2015. [5] Aalto University et al., “5G channel model for bands up to 100 GHz,” Oct. 21, 2016. [6] 3GPP, “Technical specification group radio access network; study on channel model for frequencies from 0.5 to 100 GHz (Release 14),” 3rd Generation Partnership Project (3GPP), TR 38.901 V1.0.1, Mar. 2017. [Online]. Available: http://www.3gpp.org/DynaReport/38901.htm [7] mmMAGIC, “Measurement campaigns and initial channel models for preferred suitable frequency ranges,” H2020-ICT-671650-mmMAGIC/D2.1 v1.0, Mar. 2016. [Online]. Available: https://5g-ppp.eu/mmmagic/ [8] G. R. MacCartney, Jr. et al., “Millimeter-wave human blockage at 73 GHz with a simple double knife-edge diffraction model and extension for directional antennas,” in 2016 IEEE 84th Vehicular Technology Conference (VTC2016-Fall), Sept. 2016, pp. 1–6. [9] A. Samuylov et al., “Characterizing spatial correlation of blockage statistics in urban mmwave systems,” in 2016 IEEE Globecom Workshops (GC Wkshps), Dec. 2016, pp. 1–7. [10] T. S. Rappaport et al., “Overview of millimeter wave communications for fifth-generation (5G) wireless networks-with a focus on propagation models,” IEEE Transactions on Antennas and Propagation, Special Issue on 5G, Dec. 2017. [11] ——, “Small-scale, local area, and transitional millimeter wave propagation for 5G communications,” IEEE Transactions on Antennas and Propagation, Special Issue on 5G, Dec. 2017. [12] G. J. Foschini, K. Karakayali, and R. Valenzuela, “Coordinating multiple antenna cellular networks to achieve enormous spectral efficiency,” IEE Proceedings-Communications, vol. 153, no. 4, pp. 548–555, Aug. 2006. [13] 3GPP, “Technical specification group radio access network; coordinated multi-point operation for LTE physical layer aspects (Release 11),” 3rd Generation Partnership Project (3GPP), TR 36.819, Sept. 2013. [14] D. Lee et al., “Coordinated multipoint transmission and reception in LTE-advanced: deployment scenarios and operational challenges,” IEEE Communications Magazine, vol. 50, no. 2, pp. 148–155, Feb. 2012. [15] S. Sun et al., “MIMO for millimeter-wave wireless communications: beamforming, spatial multiplexing, or both?” IEEE Communications Magazine, vol. 52, no. 12, pp. 110–121, Dec. 2014. [16] H. V. Le et al., “Diversity property of millimeter wave wireless networks against localized rain,” in 2014 IEEE Fifth International Conference on Communications and Electronics (ICCE), July 2014, pp. 407–410. [17] D. Kurita et al., “Field experiments on 5G radio access using multipoint transmission,” in 2015 IEEE Global Telecommunications Conference Workshops (Globecom Workshops), Dec. 2015, pp. 1–6. [18] B. Halvarsson et al., “Distributed mimo demonstrated with 5g radio access prototype,” in 2016 European Conference on Networks and Communications (EuCNC), June 2016, pp. 302–306. [19] G. R. MacCartney, Jr. and T. S. Rappaport, “A flexible millimeter-wave channel sounder with absolute timing,” IEEE Journal on Selected Areas in Communications, vol. 35, no. 6, pp. 1402–1418, June 2017. [20] G. R. MacCartney, Jr. et al., “A flexible wideband millimeter-wave channel sounder with local area and NLOS to LOS transition measurements,” in 2017 IEEE International Conference on Communications (ICC), May 2017, pp. 1–7. [21] H. T. Friis, “A note on a simple transmission formula,” Proceedings of the IRE, vol. 34, no. 5, pp. 254–256, May 1946. [22] T. S. Rappaport, R. W. Heath, Jr., R. C. Daniels, and J. N. Murdock, Millimeter Wave Wireless Communications. Pearson/Prentice Hall, 2015. [23] S. Sun et al., “Investigation of prediction accuracy, sensitivity, and parameter stability of large-scale propagation path loss models for 5G wireless communications (Invited Paper),” IEEE Transactions on Vehicular Technology, vol. 65, no. 5, pp. 2843–2860, May 2016. [24] G. R. MacCartney, Jr. and T. S. Rappaport, “Rural macrocell path loss models for millimeter wave wireless communications,” IEEE Journal on Selected Areas in Communications, vol. 35, no. 7, pp. 1663–1677, July 2017. [25] A. I. Sulyman et al., “Radio propagation path loss models for 5G cellular networks in the 28 GHz and 38 GHz millimeter-wave bands,” IEEE Communications Magazine, vol. 52, no. 9, pp. 78–86, Sept. 2014. [26] G. R. MacCartney, Jr. et al., “Indoor office wideband millimeter-wave propagation measurements and models at 28 GHz and 73 GHz for ultradense 5G wireless networks (Invited Paper),” IEEE Access, vol. 3, pp. 2388– 2424, Oct. 2015. [27] S. Sun, G. R. MacCartney, Jr., and T. S. Rappaport, “A novel millimeterwave channel simulator and applications for 5G wireless communications,” in 2017 IEEE International Conference on Communications (ICC), May 2017, pp. 1–7. [28] S. Sun et al., “Synthesizing omnidirectional antenna patterns, received power and path loss from directional antennas for 5G millimeter-wave communications,” in 2015 IEEE Global Communications Conference (GLOBECOM), Dec. 2015, pp. 3948–3953. [29] T. S. Rappaport et al., “Broadband millimeter-wave propagation measurements and models using adaptive-beam antennas for outdoor urban cellular communications,” in IEEE Transactions on Antennas and Propagation, vol. 61, no. 4, Apr. 2013, pp. 1850–1859. [30] W. C. Jakes, Jr., Microwave Mobile Communications. Wiley-Interscience, 1974.
7cs.IT
JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 1 Effective Image Retrieval via Multilinear Multi-index Fusion arXiv:1709.09304v1 [cs.CV] 27 Sep 2017 Zhizhong Zhang, Yuan Xie, Member, IEEE, Wensheng Zhang, Qi Tian, Fellow, IEEE, Abstract—Multi-index fusion has demonstrated impressive performances in retrieval task by integrating different visual representations in a unified framework. However, previous works mainly consider propagating similarities via neighbor structure, ignoring the high order information among different visual representations. In this paper, we propose a new multi-index fusion scheme for image retrieval. By formulating this procedure as a multilinear based optimization problem, the complementary information hidden in different indexes can be explored more thoroughly. Specially, we first build our multiple indexes from various visual representations. Then a so-called indexspecific functional matrix, which aims to propagate similarities, is introduced for updating the original index. The functional matrices are then optimized in a unified tensor space to achieve a refinement, such that the relevant images can be pushed more closer. The optimization problem can be efficiently solved by the augmented Lagrangian method with theoretical convergence guarantee. Unlike the traditional multi-index fusion scheme, our approach embeds the multi-index subspace structure into the new indexes with sparse constraint, thus it has little additional memory consumption in online query stage. Experimental evaluation on three benchmark datasets reveals that the proposed approach achieves the state-of-the-art performance, i.e., N-score 3.94 on UKBench, mAP 94.1% on Holiday and 62.39% on Market-1501. Index Terms—Image retrieval, Multi-index fusion, Tensor multi-rank, Person re-identification I. I NTRODUCTION T HIS paper considers the Content Based Image Retrieval (CBIR), whose aim is to find relevant images in massive visual data. Most CBIR systems are built on various kinds of visual features with different index building methods. It usually consists two steps, where the first step is to describe a image by a vector with fixed dimension, such as the bagof-visual-words (BOW) [15], Fisher vectors [2], Vector of locally aggregated descriptors (VLAD) [4], and other deep convolutional neural network (CNN) based features [20], [3]; then a simple comparison of two such vectors with cosine distance reflects the similarity of original sets. However, different visual features are different representations of the same instance, which reflects distinct information from different perspectives, e.g., SIFT feature has good representative ability for local texture [8], while CNN feature focuses on reflecting high level semantic information [17], [18]. Although both of Z. Zhang, Y. Xie, and W. Zhang are with the Research Center of Precision Sensing and Control, Institute of Automation, Chinese Academy of Sciences, Beijing, 100190, China and the School of Computer and Control Engineering, University of Chinese Academy of Sciences, Beijing, 101408, China. E-mail: {zhangzhizhong2014, yuan.xie}@ia.ac.cn, [email protected] Q. Tian is with the Department of Computer Science, University of Texas at San Antonio, San Antonio, TX 78249 USA; E-mail: [email protected] Find optimal functional matrix Tensor Update index matrixes Stack the functional matrix Initialize functional matrix The Final Index Index 1 Index 2 Index 3 Obtain final index Generate the different index matrixes Fig. 1. The flowchart of the proposed approach. these methods are capable of searching visually similar images effectively, totally different results may be obtained, which motivates us to fuse various features [11], [5], [6] to boost the retrieval accuracy. But, the feature characteristics and the procedures of index building methods are quite different, such as the holistic feature based method [13], [16] and the local feature based method [7], [21], [57], resulting in the difficulties of fusion on feature level. Alternatively, a simple yet effective way is to fuse different visual features on index level (also referred to multi-index fusion) [45], [46], which implicitly conduct feature fusion by updating the indexes. The index structure is usually considered as a specific database management strategy. By avoiding the exhaustive search, a proper index scheme can significantly promote the efficiency of CBIR system. A representive index structure is the inverted index structure. Local descriptors extracted from the images are firstly quantized to the visual word via nearest neighbor search. Then each image can be indexed as a sparse vector and similar images can be retrieved by counting the co-occurrence of visual words with TF-IDF weighting [15]. Since only the product of non-zero elements is calculated, inverted index structure has brought the CBIR system to deal with large scale data. Furthermore, the traditional index building techniques accompanying with deep ConvNet feature have elevated the performance of image retrieval to a new level [33]. To make sufficient use of the inverted index structure, previous multi-index fusion works mainly consider propagating similarities via neighbor structure [45], [46]. This raises a problem that the high order information among different visual representations is more or less ignored. By contrast, motivated by the multi-view learning methods [22], [23], our work learns a index-specific functional matrix to propagate similarities JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 in a unsupervised manner. Instead of simply measuring the Euclidean distance in one visual feature space to find the neighbor structure, our approach optimize the functional matrix in a unified tensor space with the recently proposed tensorSingular Value Decomposition (t-SVD) based tensor nuclear norm [25], such that the high order information by comparing every image sample (sample-specific) and every type of visual feature (index-specific) can be captured more effectively and thoroughly. In this paper, we propose a new multi-index fusion scheme for image retrieval. We formulate this procedure as a multilinear based optimization problem to find a index-specific functional matrix. We need to emphasize here that our contributions are not meant as a simple combination between [46] and [23]. The proposed method (called as MMF) carefully considers the sparse index structure for retrieval, which is the intrinsic property of inverted index structure. Meanwhile, the complementary information captured by high order tensor norm can be propagated via the index-specific functional matrix. Although the proposed method seems to need an unaffordable computing cost and memory usage, the heavy procedure is performed offline only once at training time and can be further invested by dividing images into groups. In summary, the key insight of our approach is to propagate similarity via high order (tensor) information in a unsupervised manner, which implicitly conduct feature fusion on index level. Fig. 1 shows the pipeline of our proposed scheme. The main contributions of this paper are summarized as follows: • • • We propose a new multi-index fusion scheme to implicitly conduct feature fusion on index level, where complementary information from all visual indexes can be effectively explored via high-order low-rank tensor norm. We present an efficient optimization algorithm to solve the proposed objective function, with relatively low computational complexity and theoretical convergence guarantee. We conduct the extensive evaluation of our method on several challenge datasets, where a significant improvement over the state-of-the-art approaches is achieved. By regarding person re-identification as a special retrieval task, the proposed model has achieved highly competent (even better) performance compared to recent proposed method. The rest of this paper is organized as follows. Section II introduces related works. Section III gives the notations that will be used throughout the paper and the preliminaries on tensors. In Section IV, we review previous multi-index fusion method and motivate our model in detail, give an optimization algorithm to solve it, and analyze its convergence. In Section V, we show our experimental analysis and completion results to verify our method. Then we analyse and discuss the proposed model in detail. Finally, we conclude the proposed method in Section VI. 2 II. R ELATED WORK Most of the CBIR systems can be roughly divided into two parts: image representation and image indexing. Additionally, our work is also related with the multi-feature fusion and multi-view subspace learning. Their strengths and limitations are briefly reviewed below. A. Image representation Image representation has been extensively studied in recent years. To give more discriminative description for image, local features such as SIFT [8] are introduced in CBIR systems [15]. Due to its good property of invariance to orientation, uniform scaling and illumination changes, BOW based CBIR systems achieve great success [28], [27], [29]. During this period, several methods are proposed to promote the discrimination of BOW based image representation, such as the Hamming embedding [28], negative evidence [30], soft assignment [14] and so on. Meanwhile, a lot of works aim to produce the compact image representation [7], [21], [4], [2], which is benefit for computational efficiency and memory cost. Furthermore, several recent proposed methods attempt to extract features from the pre-trained deep convolutional networks via compact encoding. By using the compact codes, Babenko et al. discover that the features from the fully-connected layers of CNN (fully-connected feature) provide high-level descriptors of the visual content [13], yielding competitive results. But more recently, the research attention has moved to the activations of CNN filters (convolutional feature) [20]. Convolutional features have a natural interpretation as descriptors of local image regions, which not only share the same benefits with the local features, but also hold high-level semantic information [31]. Empirically, they gain even better results than the local features. Generally speaking, both of these methods hold distinct merits, resulting in different retrieval results. This may cause us to consider whether we should only focus on one type visual feature (e.g., abandon these hand-crafted features), or combine different visual representations for retrieval. B. Image indexing Indexing local features by inverted index structure and hashing holistic features by compact binary codes have been two mainstreams methods in recent years. For the hash technique, data-independent hash method can produce high collision probability, but often needs long hash bits and multiple hash tables [36], [37]. Data-dependent hash methods, such as Stochastic Multiview Hashing [38], Spectral Hashing [39] and Nonlinear Sparse Hashing [50] aim to generate short binary codes via a learning processing, which is more effectively and efficiently. We refer the readers to [40] for a comprehensive review. Although it provides accurate search results, the hash method is a method that loss information. In contrast, inverted index structure, as one of lossless indexing methods, is prevalently utilized in the BOW based image search, which has shown excellent scalability by extensively studies [28]. JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 3 For inverted index structure, previous works mainly focus on adding detail information into the inverted indexes after the seminal work [15]. Zhou et al. [32] index the geometric clues of local features via spatial coding. Zhang et al. [34] jointly embed the local features and semantic clues into the inverted indexes. Babenko et al. propose a inverted multi-index framework to reduce the quantization loss [35]. Recently, Mohedano et al. encode the convolutional features via Bagof-words scheme, where competitive results demonstrate the suitability of the BOW based index building methods for CNN features [33]. tensors [24], where the familiar tools used in matrix case can be directly extended to tensor case. Hence, it has good theoretical properties for handling complicated relationship among different views. For more detail information, we refer readers to read the section III. C. Feature fusion A. Basic Notations To take full advantage of the strengths of each feature, a lot of works have already begun to combine different visual features to boost the retrieval performance [11], [5], [12]. In [5], Zhang et al. conduct the fusion in ranking stage. By performing a link analysis on a fused graph, the retrieval accuracy can be greatly improved. Zheng et al. [11] introduce a scorelevel fusion method for similar image search. Zheng et al. [12] propose a coupled Multi-index framework to conduct the feature fusion. Nevertheless, these methods treat each image representation independently, ignoring the complementarity among different visual features. Moreover, query operations must be performed multiple times for multiple indexes. To overcome these drawbacks, some works focus on fusing visual features on index level. A common assumption shared in these methods is that: two images, which are nearest neighbors to each other under one type of visual representation, are probably to be true related. By pushing them closer in other visual feature spaces, the search accuracy can be greatly promoted. Under the guidance of this principle, the proposed collaborative index embedding method [46], which is most relevant to our work, utilize an alternating index update scheme to fuse feature. By enriching the corresponding feature, it refine the neighborhood structures to improve the retrieval accuracy. Chen et al. [45] extend this model for the multi-index fusion problem. However, both of these methods neglect the distance information of original feature space. More importantly, high order information is more or less ignored. III. BACKGROUND AND P RELIMINARIES In this section, we will introduce the notations and basic concepts used in this paper. We use bold lower case letters x to denote vector (e.g., BOW based sparse histogram), bold upper case letters X to denote matrix, and lower case P 2The P letters2 x1ij for entries ofPmatrix. 1 2 notation kXkFP:= ( i,j |xij | ) , kXk2,1 := i ( j xij ) 2 and kXk1 := i,j |xij | are the Frobenius norm, the P l2,1 -norm and the l1 -norm for matrix, respectively. kXk∗ := i σi (X) is the matrix nuclear norm, where σi (X) denotes the i-th largest singular value of a matrix. The bold calligraphy letters are denoted for tensors (i.e., Z ∈ Rn1 ×n2 ×n3 is a three-order tensor, where order means the number of ways of the tensor and is fixed at 3 in this paper). For a three-order tensor X , the 2D section X (i, :, :), X (:, i, :) and X (:, :, i) (Matlab notation is used for better understanding) denote the ith horizontal, lateral and frontal slices. Analogously, the 1D section X (i, j, : ), X (i, :, j) and X (:, i, j) are the mode-1, mode-2 and mode-3 fibers of tensor, as shown in Fig. 2. Specially, X (k) is used to represent kth Frontal Slice X (:, :, k) for convenience. And X f denotes the tensor that we apply Fourier transform to X along the third dimension. Mode-1 Fiber Mode-2 Fiber Mode-3 Fiber D. multi-view subspace learning Our work is also related with the multi-view subspace learning methods, especially the subspace clustering methods. Sparse subspace clustering [41] and low-rank representation [22] are most popular subspace clustering methods, which explore the relationships between samples via self-representation matrix. Zhang et al. [42] extend the low-rank representation to the multi-view setting via imposing a unfolding high-order norm to the subspace coefficient tensor. However, this tensor constraint can not explore the complementary information thoroughly, due to the fact that the low-rank norm penalize each view equally. By using a new tensor construction method, Xie et al. [23] replace the unfolding tensor norm with a recently proposed t-SVD based norm [25], [43], which is based on a new tensor computational framework [44]. This framework provides a closed multiplication operation between (:, i, j) (i, j,:) (i,:, j ) Frontal Slices Lateral Slices Horizontal Slices (:,:, i ) (:, i,:) (i ,:,:) Fig. 2. The 1D section and 2D section of a 3-order tensor. JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 4 (i) B. t-SVD framework and key results Before we introduce the t-SVD based tensor nuclear norm (TNN-norm), there is a need to give some pre-definitions about the new computational framework [24], [44] for a better interpretation. (i) (i) ||X ||~ := min(n1 ,n2 ) n3 X X i=1 n1 ×n2 ×n3 and Y ∈ Definition 1 (t-product). Let X ∈ R Rn2 ×n4 ×n3 be tensors. Then the t-product M = X ∗ Y is an n1 × n4 × n3 tensor defined as   (1)    (1)  Y X X (n3 ) · · · X (2) M(1) (2)  (1) (3)    M(2)   X (2) X · · · X  Y     ·    . = . .  .. .. ..  ..   .. . . .   ..  M(n3 ) X (n3 ) X (n3 −1) ··· X (1) Y (n3 ) (1) where · is the standard matrix multiplication. Definition 2 (Transpose). If X ∈ Rn1 ×n2 ×n3 , then the X T is an n2 × n1 × n3 tensor by transposing each frontal slice of X and reversing the order of the transposed frontal slices 2 through n3 . Definition 3 (Orthogonal). A tensor Q ∈ Rn1 ×n1 ×n3 is orthogonal if QT ∗ Q = Q ∗ QT = I, Based on the above definitions, it is easy to obtain that tproduct can be transformed to matrix multiplication of frontal slices in the Fourier domain. Formally Eq. (1) equals to: (k) (k) (k) = X f Y f , k = 1, . . . , n3 , (3) Thus t-product can be calculated efficiently via Fourier transform. And more importantly, an important theoretical resulting property [24] can be concluded from the t-product framework, which is similar to matrix case. Theorem 1 (t-SVD). Let X ∈ Rn1 ×n2 ×n3 be a real-valued tensor. Then X can be decomposed as X = U ∗ S ∗ V T, |S f (i, i, k)|. (6) k=1 Due to the fact that the diagonal block matrix in Fourier domain can be reversed to cyclic matrix in origin domain [24], t-SVD based tensor nuclear norm can be also given as:  (1)  X X (n3 ) · · · X (2)  X (2) X (1) · · · X (n3 )    ||X ||~ = k  . ..  k∗ (7) .. ..  .. . . .  X (n3 ) X (n3 −1) ··· X (1) Different from the tensor nuclear norm (sum the matrix nuclear norm of unfolding matrix of tensor) defined in [42], TNNnorm measures the tensor rank by comparing every row and every column of each frontal slices, which is the tightest convex approximation to l1 norm of tensor multi-rank proved by [43]. IV. T HE PROPOSED M ETHODS (2) where I ∈ Rn1 ×n1 ×n3 is the identity tensor whose first frontal slice is the identity matrix and other frontal slices are zero. Mf (i) where X f = U f S f (V f )T , i = 1, . . . , n3 are standard matrix SVD. Thus the t-SVD based tensor nuclear norm [43] is given as (4) where U ∈ Rn1 ×n1 ×n3 and V ∈ Rn2 ×n2 ×n3 are orthogonal tensors. S is an n1 × n2 × n3 tensor whose each frontal slices is diagonal matrix. Theorem 1 tells us that any real-valued tensor can be written as the t-product of tensors, which is analogous to matrix SVD. Meanwhile, its derived equivalence Eq. (4) in the Fourier domain can be given as :  (1)   (1)  Xf Uf     .. .. = ·  . .     (n ) (n ) Xf 3 Uf 3 (5) T  (1)   (1) Sf Vf     .. .. ·  ,  . .     (n ) (n ) Sf 3 Vf 3 Multi-index fusion is a technique for implicitly conducting feature fusion on index level, where we can only keep one visual index for both effect and efficient image retrieval. Suppose we have V types of feature indexes denoted as X1 , X2 , . . . , XV ∈ Rdv ×N , whose column is a feature vector (e.g., BOW based histograms), dv is the dimension of vth visual representation, and N is the image number in the database. Previous multi-index fusion strategies [45], [46] mainly consider propagating similarity via the neighbor structure through different indexes. As suggested in [46], feature fusion on index level can be formulated as: e 1 = X1 + α · g(X1 ) X e 2 = X2 + β · g(X2 ) X X 1 Φ2 , (8) X 2 Φ1 , where α and β are constant factors, g(·) is a zero-indicator function equaling 1 if the element is zero. And denotes the element-wise multiplication operator. The Φm , m = 1, 2 is defined as: ( Φm (k, i) = 1, if k 6= i, xk ∈ Rm (xi ) (9) Φm (k, i) = 0, otherwise where Rm (xi ), m = 1, 2 denote the neighbor sets of image i in feature index m. Eq. (8) and Eq. (9) assume that the neighbor information in one feature space need to be embedded into the updated feature vector in another feature space, such that the distance between similar images will be reduced. However this method can only handle two feature fusion problem. To keep their own characteristics of each visual index, we learn a index-specific functional matrix for updating the index matrices instead. We formulate the index updating scheme as: X∗v = Xv (I + Zv ), v = 1, 2, . . . , V (10) JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 5 Index-specific dependence N N N Shifit Merge 1st Frontal Slice N V N Functional matrix N 1st Frontal Slice Nth 2nd 1st ... ... Nth N-1th ... ... 2nd Nth Sample-specific dependence ... ... 1st N V Tensor V Cyclic matrix derived from Fig. 3. The construction of tensor Z and its derived cyclic matrix. where I is the identity matrix, Zv ∈ RN ×N is named as functional matrix and optimized in the unified tensor space in this paper, whose element z v (i, j) is greater than 0, meaning that image i and image j should be pushed closer. Flowchart 3 to 5 of Fig. 1 show the learning procedure. This fusion procedure can be regarded as an ”off-line” query-expansion. Given the functional matrices, the similarities in different visual indexes can be propagated through different visual representations, such that the index matrices can achieve a refinement with much more discriminative power. In the following, we will introduce the new scheme to obtain the functional matrix Zv . A. Motivation There are two basic assumptions in this work, which clearly illustrates our motivation. One is assuming that the related images can be interpreted as a special subspace structure by regarding the gallery as the whole space. This assumption is based on the observation that the corresponding feature vectors of related images are similar to each other, which is analogous to subspace structure. We call this assumption as samplespecific dependence. The another is the index-specific dependence, which assumes that the similarities between images measured in different feature space are highly dependent. As discussed above, different visual representations hold distinct merits and thus their search results differ a lot, but that does not mean they have nothing in common. To put it simply, related images are still close among most feature spaces, even if they may not be the nearest neighbors in minority indexes. That is to say, what we need to learn is the consistency rather than the diversity. B. multi-linear based multi-index fusion In this paper, we utilize a multilinear based optimization to model both dependence. Specially, we consider the selfrepresentation based method [22], [23]. Formally, we present our model as follow: X min λkEk2,1 + kZk~ + σ kZv k1 (11) Zv ,E s.t. v Xv = Xv Zv + Ev , v = 1, 2, . . . , V, where σ and λ are constant parameters to control the reconstruction errors and the sparseness of functional matrix, respectively. Xv ∈ Rd×N denotes the v-th index matrix, and d is the dimension of feature vector, Zv ∈ RN ×N denotes the v-th index-specific functional matrix. Z = Φ(Z1 , Z2 , . . . , ZV ) ∈ RN ×V ×N is a tensor by merging different Zv to a 3order tensor and then shifting illustrated in Fig. 3, E = [E1 , E2 , . . . , EV ] is the error matrix, k · k~ denotes the t-SVD based tensor nuclear norm. Consequently, kEk2,1 in Eq. (11) attempts to control the reconstruction errors, whose aim is to update the index matrices mildly and keep the original representation of database images. The t-SVD based norm kZk~ is used for exploring both dependence by comparing every row (sample-specific) and every column (index-specific) from Eq. (7). For the samplespecific dependence, we assume each functional matrix Zv has low rank property. While for the index-specific dependence, we use the high correlations of the index-specific functional matrices for a replacement, where we also assume the different functional matrices share the low rank structure. As a result, related images’ information can be embedded into the ”new” feature vector via the updating scheme. Meanwhile, the sparse constraint kZv k1 aims to embed the most significant relevant images into the new index and keep the sparseness of the updated indexes. C. Optimization Procedure We can use the Augmented Lagrange Multiplier (ALM) [26] to solve this optimization problem efficiently. By introducing the auxiliary tensor G and the auxiliary matrices Mv , v = 1, 2, . . . , V , the optimization problem can be transferred to: L(Z1 , . . . , ZV ; E1 , . . . , EV ; M1 , . . . , MV ; G) X = (σkMv k1 + hYv , Xv − Xv Zv − Ev i v µ + ||Xv − Xv Zv − Ev ||2F + hNv , Zv − Mv i 2 ξ + ||Zv − Mv ||2F ) + λkEk2,1 + kGk~ 2 ρ + hW, Z − Gi + ||Z − G||2F , (12) 2 where the matrix Nv ,Yv , and the tensor W are Lagrange multipliers. µ, ξ and ρ are the penalty parameters. An accurate and joint optimization of Ev , Mv , Zv and G seems to be costly. In contrast, we adopt an alternating scheme and partition the unconstrained problem into four steps alternatingly. Subproblem Zv : When the G, E, M are fixed, we will solve JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 6 the following subproblem for updating the functional matrix Zv : min hYv , Xv − Xv Zv − Ev i + Zv Algorithm 1: Multi-index fusion Input: Index matrix Xv , v = 1, 2, . . . , V , λ > 0, σ > 0 , sparse threshold threshold, iters Output: Fused index matrix X∗v , v = 1, 2, . . . , V µ ||Xv − Xv Zv 2 ξ − Ev ||2F + hNv , Zv − Mv i + ||Zv − Mv ||2F i 2 ρ + hWv , Zv − Gv i + ||Zv − Gv ||2F . 2 1 2 (13) It is easy to solve this optimization problem due to the closedform solution. We can obtain the solution by setting the derivative to 0: 3 4 5 6 Z∗v =(Xv T Yv + µXv T Xv − µXv T Ev − Wv − Nv 7 8 µ + ρGv + ξMv )/(ρ + ξ)(I + Xv T Xv )−1 . (14) ρ+ξ 9 10 Subproblem Mv : When G, E, Z are fixed, solving Eq. (12) is equal to minimize the following problem for updating the auxiliary matrix Mv : 1 ξ min σ kMv k1 + ||Mv − (Zv + Nv )||2F . Mv 2 ξ (15) 11 12 13 14 We can use Soft Thresholding to solve Eq. (15). 1 M∗v (i, j) =sign(Zv (i, j) + Nv (i, j))· ξ 1 σ max(|Zv (i, j) + Nv (i, j)| − , 0). ξ ξ 15 16 17 (16) 18 19 20 Subproblem Ev : For given G, Z, M , we can get: 21 µ E∗ = argmin λkEk2,1 + kXv − Xv Zv − Ev k2F 2 E X + hYv , Xv − Xv Zv − Ev i In addition, the Lagrange multipliers are also need to be updated as: v 1 = argmin λkEk2,1 + kE − Dk2F , 2 E (17) where D is constructed by vertically concatenating the matrices (Xv − Xv Zv + µ1 Yv ) . This subproblem can be solved by [22]. Subproblem G: At last, when the E, Z, M are fixed, we will solve the following subproblem for updating the tensor G, ρ 1 G ∗ = argmin kGk~ + kG − (Z + W)k. 2 ρ G (18) When we transform the Eq. (18) to the Fourier domain, it can be reformulated as: G ∗f = argmin Gf for iter=1:iters do Initialized: Zv = Ev = Yv = Mv = Nv = 0; G = W = 0; µ = 10−5 , ρ = 10−5 ,ξ = 10−5 , η = 2, µmax = ρmax = ξmax = 1010 , ε = 10−7 ; while not converge do Update Zv , v = 1, 2, . . . , V by using (14); Update E by solving (17); Update Mv , v = 1, 2, . . . , V by using (16); Obtain Z = Φ(Z1 , Z2 , . . . , ZV ); Update G via subproblem (19); Update Lagrange multipliers W, Yv , Nv , v = 1, 2, · · · , V by using (20); Update parameters µ, ξ and ρ: µ = min(ηµ, µmax ), ρ = min(ηρ, ρmax ), ξ = min(ηξ, ξmax ); (Z1 , . . . , ZV ) = Φ−1 (Z), (G1 , . . . , GV ) = Φ−1 (G); Check the convergence conditions: ||Xv − Xv Zv − Ev ||∞ < ε ||Zv − Gv ||∞ < ε; ||Zv − Mv ||∞ < ε; end Z∗v = sparse(Zv ), v = 1, 2, . . . , V PV Xi = Xi v=1 (Z∗v + Z∗v T ), i = 1, 2, . . . , V λ = 10 · λ, σ = 10 · σ end X∗v = sparse(Xv ), v = 1, 2, . . . , V Return Fused index matrix X∗v , v = 1, 2, . . . , V . N X 1 ρ (j) (j) (j) τ 0 ||G f ||∗ + ||G f − (Z + W)f ||2F . 2 ρ j=1 (19) Thus the tensor optimization can be divided into N independent matrix subproblems in Fourier domain to solve. The procedure in [23] can be applied to solve this subproblem. Yv∗ = Yv + µ(Xv − Xv Zv − Ev ), W ∗ = W + ρ(Z − G), N∗v (20) = Nv + ξ(Zv − Nv ). The above four steps are repeated until the convergence condition is satisfied. Although it is not easy to prove the convergence of the algorithm theoretically, two sufficient conditions suggested in [22] for our algorithm to converge are easily to be met fortunately. Finally, the small value of functional matrix may not affect retrieval accuracy but will introduce the noise into the new index. So we simply set the value which is below a certain threshold θ1 to 0.  sparse(Z) = 0, |zij | < θ1 zij , |zij | ≥ θ1 (21) JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 7 D. Index Updating and Online Query In the fusion process, we update our index matrix as follows, X∗v = Xv (I + 1 X (Zv + ZTv )), v = 1, 2, . . . V. V v (22) We iteratively fuse indexes for T times until we obtain the best retrieval accuracy. In each iteration, we execute normalization on each new index and expand the parameter λ and σ tenfold to guarantee the original representation of database images. When the fusion is finished, only one index is selected to be the final index for online retrieval. To leverage the inverted index structure and reduce the cost in memory and computation, we also set the elements of the final index below the threshold θ2 to zero. Given the query image q, in the online query stage, we first extract only one type of visual feature xv (q) used in our feature index. Then, we compute the consine similarity between the query and each database image. It is worth noting that we can make full use of the high sparseness of feature indexes, i.e., hypercolomn index. The computational complexity of calculating distance will be greatly reduced. At last, we sort the similarity scores in descending order and return the retrieval result. The entire fusion process is summarized in Algorithm 1. V. E XPERIMENT In this section, we perform experiments to present a comprehensive evaluation of the proposed method. Two applications (i.e. image retrieval and person re-identification) are tested, where we regard the person re-identification as a special retrieval task. The retrieval accuracy and memory consumption are evaluated for our approach in the retrieval benchmark datasets, while only search accuracy is tested on the Market-1501. Comparison is made to measure performance improvement to the baseline methods and some other state-ofthe-art methods. All experiments are implemented in Matlab on a workstation with Intel Xeon E5-2630 @ 2.30 GHz CPU, 128GB RAM, and TITANX GPU (12GB caches). To promote the culture of reproducible research, source codes and experimental results accompanying this paper will be released at https://www.researchgate.net/profile/Zhizhong Zhang5. A. Experimental Setup We evaluate the proposed algorithm on three public benchmark datasets i.e., UKBench [27], Holidays [28] and Market1501 [47], where Market-1501 is one of the biggest person reidentification dataset. The UKBench dataset contains 10,200 images. All images in UKBench are taken as query and each of which has 4 relevant images. We evaluate the retrieval accuracy by N-S score, which is the average number of relevant images of top 4 returned images. The Holidays dataset consists of 1,491 images taken from personal holidays photos, where 500 images are selected to be queries. Mean average precision (mAP) is adopted to evaluate the retrieval accuracy. The Market-1501 dataset is collected in front of a supermarket in Tsinghua University. Overall, this dataset contains 32,668 annotated bounding boxes of 1,501 identities. There are 12,936 images used for training and other 19732 images for testing. Both rank-1 error and mAP are adopted for evaluation. It is worth noting that we only use the testing images for training our multi-index fusion method. TABLE I C OMPARISON OF RETRIEVAL ACCURACY AND MEMORY COST. T HE PERFORMANCE OF THE COMPARISON METHODS ARE TAKEN FROM THOSE ORIGINAL PAPERS . T HE AVERAGE SIFT FEATURES PER IMAGE OF COMPARISON METHOD IS ASSUMED TO BE 2,000. OQMC MEANS ONLINE QUERY MEMORY COST FOR EACH INDEXED IMAGE . MMF MEANS THE INDEX AFTER OUR MULTI - INDEX FUSION . * MEANS THE BASELINE METHOD Methods SIFT Index* FC Index* HC Index* c-MI [12] QSF [5] QaLF [11] CIE [46] MFSMP [45] CoInd [34] MMF-SIFT MMF-FC MMF-HC UKBench(NS-score) 3.03 3.42 3.28 3.85 3.77 3.84 3.86 3.78 3.60 3.94 3.92 3.87 Holiday(mAP) 31.8% 70.4% 74.3% 85.8% 84.6% 88.0% 89.2% 78.8% 80.9% 84.8% 93.6% 94.1% OQMC 21.5KB 5.1KB 1.5KB 13.5KB 20KB 62KB 4KB 0.38KB 24KB 10.1KB 2.8KB 1.2KB B. Implementation Details In this section, we introduce some experiments detail such as the index building methods. On the UKBench and Holidays datasets, we extract three types of features to build our indexes separately. Specially, for SIFT index, we first extract the SIFT features [1], [8] and transform each SIFT descriptor with rootSIFT [10]. To avoid the loss in quantization, we assign each descriptor to three nearby visual words [14] with a pre-trained codebook[9]. Following the traditional Bag-of-Words method [15], we represent each database image as a 20K sparse vector in a TF-IDF manner [15]. For CNN fully-connected index (FC index), we first resize each image to 224 × 224 and then pass it through the deep convolutional network, i.e., AlexNet [17], which is pre-trained on ImageNet by Caffe implementation [19]. The outputs of the fully connected layers (FC6) are extracted and thus each dimension of feature vector can be regarded as a visual word. For Hypercolumn index (HC index), we use the VggNet [18], which is also pre-trained on ImageNet by Caffe implementation, as our Hypercolumn feature extractor. The feature maps of conv 5 4 layer are extracted, whose size is 14 × 14 × 512. We take the activations of all filters fh (m) ∈ R512 , m = 1, 2, . . . , 196 as our feature vector. Then similar to the strategy of standard vector quantization, we quantize each fh (m) to three nearest visual words of a pre-trained 10K codebook via TF-IDF weighting. For Market-1501 dataset, we follow three baseline methods proposed by [48], [47]. C. Experimental Results on Image Retrieval For each image in the UKbench and Holidays datasets, we extract the CNN feature and SIFT feature, then perform JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 8 TABLE II C OMPARISON OF RETRIEVAL ACCURACY O N M RAKET-1501. R ANK -1 ERROR AND M AP ARE USED FOR EVALUATION . * MEANS THE BASELINE METHOD . Multiple Query Rank-1 mAP 3.7 0.8 3.6 0.7 mAP Single Query Rank-1 mAP 1 0.9 3.8 N-S score Method 4 3.9 3.5 3.4 3.3 0.5 3.2 14.75% 32.10% 49.36% 44.36% 66.63% 81.26% 19.41% 41.25% 59.10% NULL[52] Reranking[51] LBA[49] Gate-SCNN[54] S-LSTM[53] 61.02% 77.11% 73.87% 65.88% - 35.68% 63.63% 47.89% 39.55% - 71.56% 81.29% 76.04% 65.6% 46.03% 56.98% 48.45% 35.31% SCSP[55] CIE[46] SSDAL[56] 51.9% 73.77% 39.40% 26.35% 57.55% 19.60% 79.39% 49.00% 65.24% 25.80% MMF-BOW MMF-CaffeNet MMF-ResNet50 55.73% 69.63% 77.11% 37.64% 53.93% 62.39% 63.81% 76.93% 82.51% 44.37% 61.79% 69.58% the feature transform as aforementioned in section V-B. As shown in Table I, our approach significantly outperforms the baseline methods on both UKBench and Holidays datasets. On UKBench dataset, we get the N-S score of 3.94, 3.92 and 3.87, which achieves absolute gain of 30.3%, 14.6% and 18.0%, respectively. For Holidays dataset, we increase the mAP of the baseline from 31.8% to 84.8% for SIFT index, from 70.4% to 93.6% for FC index and from 74.3% to 94.1% for HC index. It indicates that our MMF method could capture the complementarity between the SIFT feature and CNN feature, and elevate the performance to a higher level. More importantly, our approach shows the robustness for degenerate visual representation such as the SIFT index on Holidays. It is also worth noting that the baseline method have a great impact on the fusion result such as the high-dimensional MMFSIFT index outperforms the other indexes on UKbench, while MMF-HC index achieves the best performance on Holiday. The reason for this phenomenon is that the two datasets vary greatly i.e., Holidays includes a very large variety of scene types, UKbench is a set of images containing relatively simple objects, which causes the performance of SIFT baseline on UKbench is much better than it on Holidays. Moreover, our approach significantly outperforms the stateof-the-art feature fusion methods [11], [5], [12] with less online memory consumption. Although the proposed multiindex fusion method [45] also provides comparable online memory consumption, its search accuracy is much worse than ours. Meanwhile, to achieve a accurate search result, the proposed CIE [46] method requires elaborate baseline method (i.e., N-S score of 3.53 and 3.33), which also demonstrates the effectiveness of the proposed method. In the online retrieval stage, the main memory cost of our method is to store the MMF index files. We assume each non-zero element of the feature vector in the index matrix takes 8 bytes to store the weight and image ID with the 3 0 1 2 3 MMF-FC MMF-SIFT MMF-HC 0.4 0.3 0 4 1 2 3 iterations iterations (a) (b) 4 5 0.7 0.8 0.6 0.7 0.5 0.6 mAP 35.84% 49.36% 74.02% MMF-FC MMF-SIFT MMF-HC 3.1 Rank-1 error BOW*[47] CaffeNet*[48] ResNet50*[48] 0.6 0.4 0.5 MMF-ResNet MMF-CaffeNet MMF-BOW CIE-ResNet CIE-CaffeNet 0.4 0.3 0 1 2 3 Fusion Iterations 4 5 0.3 MMF-ResNet MMF-CaffeNet MMF-BOW CIE-ResNet CIE-CaffeNet 0.2 0.1 0 1 2 3 4 5 Fusion Iterations (c) (d) Figure 4. Influence of iteration number on retrieval accuracy on UKBench (a), Holiday (b) and Market-1501(c, d). CIE means the proposed Collaborative Index Embedding [46]. Iteration 0 means the origin index. inverted index structure. After applying the sparse operation, our indexes require even less memory overhead than the origin index files, while keeping the competitive retrieval result. The online query computation complexity also gain the benefit from the sparsity of index files, which greatly reduce the query response time. D. Experimental Results on Person Re-identification Following the protocol in [48], [47], we extracted three kinds of image features on Market-1501: the BOW feature, the ResNet50 feature and the AlexNet feature (CaffeNet feature). As shown in Table II, the proposed method also outperforms baseline method on both single query and multiple query by a large margin. Although the CaffeNet and the BOW model obtain more improvement, the best Rank-1 error and mAP are still achieved by the MMF-ResNet50, which is also the best baseline method. However, the improvement of mAP is much higher than the improvement of Rank-1 error. While easy to understand, the proposed MMF can be regarded as an ”off-line” query expansion or re-ranking technique, which can not fundamentally improve the discrimination of visual feature. The similar results are also presented by [51]. From another perspective, if we can design more discriminative visual features, our multi-index fusion scheme can further improve its performance. Some representative retrieval results are shown in Fig. 5, where the black bounding box means the distractors or the images that come from the same camera with the query, the red bounding box means the true match persons and otherwise are wrong. The complement information, such as the rank-1 and rank-2 images measured in CaffeNet, which includes the same person with the query, can be transferred through the different visual representations (i.e., ResNet model). As demonstrated in Table II, the proposed approach achieves the comparable (even better) results with the state- JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 of-the-art competitors, including the Gated Siamese Convolutional Neural Network(Gate-SCNN) [54], Discriminative Null Space(NULL) [52], Spatially Constrained Similarity function on Polynomial feature map(SCSP)[55], Siamese Long ShortTerm Memory (S-LSTM) [53], Looking Beyond Appearances(LBA) [49], Deep attributes(SSDAL) [56], Re-ranking [51] and the multi-index fusion method [46]. It is remarked that our method utilize the complementary information among different visual representation and perform at off-line stage, while the re-ranking [51] method takes advantage of the probe information and must perform at on-line stage. E. Parameter Analysis In this section, we discuss the impact of parameters for our approach. Five key parameters influence the performance of the retrieval system, including the parameter λ, σ in Eq. (11), the threshold θ1 for functional matrix, the threshold θ2 for the final index and the fusing iteration number T . We first evaluate the impact of fusing iteration number T for the search accuracy. As shown in Fig. 4, the retrieval accuracy on both UKbench and Holidays first quickly rises to the peak and then keep stable with the increase of fusing iterations. On UKBench, we fuse 3 times until the MMF-SIFT index obtain the best performance but there is still room for HC index to improve. On Holidays, we fuse 4 times when the performance of all the indexes are keeping stable. As for the Market-1501 dataset, the Rank-1 error of MMF ResNet slightly drops after T = 2, which is even worse in [46]. But the mAP of all the indexes keep improving due to the characteristic of the multi-index fusion methods. We choose T = 4 for Market1501 for relatively stable performance. Although the CIE method achieves comparable result, by setting the parameter α = β = 0.4, p = q = 9, m = 20 (with a simple grid search), its performance of Rank1-error drops sharply after a few iterations. We then evaluate the impact of reconstruction error parameters λ and sparse parameters σ by using different values of λ and σ. Although the parameter λ and σ play an important role on performance, most results are still much better than the baseline methods. As shown in Fig. 6, when the λ increases, the retrieval accuracy firstly climbs to the peak point and then slowly decreases on both datesets by fixing the σ = 0.001. The reason for this phenomenon is that the larger λ is, the less modification is made to the index. As λ decreases to 0, the functional matrix is degenerated to identity matrix. The influence of parameter σ shows similar performance as λ on both datasets by fixing the λ = 0.005 and 0.015 respectively. But when σ increases to a certain extent, all the values of functional matrix have been suppressed due to excessive sparsity constraints, which cause the retrieval accuracy, i.e., MMF-SIFT index drops sharply. For Market-1501 dataset, we set λ = 0.010 and σ = 0.001 to obtain the best performance. Empirically, λ is often locate at 0.005 to 0.015 and σ = 0.001 is suitable for most situations. Fig. 7 shows the influence of threshold θ2 for final index on the sparseness and retrieval accuracy of index matrix. We can easily get that the larger fusing iteration number, the less 9 sparseness of the index structure, where this phenomenon is also presented in [45], [46]. When the threshold increases, it is observed that the sparseness of indexes drop sharply while the retrieval accuracy keeps stable on both two datasets. The situation on Holidays is slightly different from it on UKBench, especially for the MMF-SIFT index due to the fact that the larger fusing iteration number and the larger SIFT descriptors number, which smooth the energy. The influence of threshold θ1 for functional matrix will keep stable with a little performance boosting when it varies from 0.005 to 0.02. The detail analyse will be presented in section V-F. In addition, our optimization method converges fast by setting the parameter as Algorithm 1 states, which is illustrated in Fig. 9. Three curves record the errors (defined in Eq. (23)) in each iteration step. Err1 = ||Xv − Xv Zv − Ev ||∞ Err2 = ||Zv − Gv ||∞ (23) Err3 = ||Zv − Mv ||∞ F. Discussion and Analyses We conduct further analyses and experiments to better understand the characteristics of our Multi-index fusion scheme. Scalability: Although the updating scheme seems costly, as discussed above, the whole procedure only perform once at off-line training time. Meanwhile, in Algorithm 1, the inverse matrix can only be calculated once during the whole iteration with proper parameter. The most time consuming part of our method is to solve the subproblem Z, but it equals to calculate (N 2−1) matrix SVD, whose dimension is N ×V . This special structure can be easily parallelized and will be invested in our future work. In summary, it takes O(2N 2 V log(N )) for calculating the FFT and its inverse. Take O(N 2 V 2 ) for calculating the matrix SVD. As for the subproblem E and Mv , they take O(N 2 V ) in each iteration. Since log(N )  V , the complexity of our MMF method is: O(T K(2N 2 V log(N ))), (24) where K means the iteration number. In practice, T usually locates at 3-4 and K locates at 30-50. More importantly, as shown in Fig. 8, a block matrix structure is presented, which clearly demonstrates the sample-dependence assumption. Thus we can divide the dataset into image groups to further reduce the computation and memory consumption without incurring the performance lost. This will be invested in our future work. Robust: We also extract GIST feature as the 4th index for retrieval on UKbench and get a NS-score of 1.89. When we iteratively fuse three times, its performance improve to 3.24. While for the other indexes, we almost achieve the same result with only 0.01 absolute N-S score reduction as shown in Fig. 10. This phenomenon demonstrates the robustness of our method and verify the index-specific dependence assumption implicitly. Analysis on functional matrix Z: To evaluate the effect JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 10 BOW MMF-BOW CaffeNet MMF-CaffeNet ResNet-50 MMF-ResNet Probe Rank Rank Fig. 5. Representative retrieval results on the Market-1501 dataset. The black bounding box means the distractors or the images that come from the same camera with the query. The red bounding box means the true match persons and otherwise are wrong. 4 1 3.8 0.8 3.6 0.6 3.4 N-S score 3.6 mAP N-S score 1 0.9 0.8 0.7 3.2 MMF-FC MMF-SIFT MMF-HC 3 2.8 0.6 0 0.005 0.01 0.5 0.005 0.015 MMF-FC MMF-SIFT MMF-HC 0.01 0.015 3.2 3 0.02 (a) 0.4 3.4 lambda lambda mAP 4 3.8 0.001 4 0.011 0 0.021 0.031 0.041 MMF-FC MMF-SIFT MMF-HC 0.001 0.051 The threshold for final index (b) 3.9 0.2 MMF-FC MMF-SIFT MMF-HC (a) 1 1 0.9 0.8 0.011 0.021 0.031 0.041 The threshold for final index 0.051 (b) 1 MMF-FC MMF-SIFT MMF-HC MMF-FC MMF-SIFT MMF-HC 0.8 0.8 0.7 sparseness 3.6 sparness 3.7 map N-S score 3.8 0.6 0.4 0.6 0.4 3.5 MMF-FC MMF-SIFT MMF-HC 3.4 3.3 0 1 2 sigma 3 ×10-3 0.6 MMF-FC MMF-SIFT MMF-HC 0.5 0 1 2 sigma 3 ×10-3 0.2 0.2 0 0 0.001 0.011 0.021 0.031 0.041 The threshold for final index 0.051 0.001 0.011 0.021 0.031 0.041 The threshold for final index 0.051 (c) (d) Figure 6. Influence of λ, σ on retrieval accuracy on UKBench (left) and Holiday (right) (c) (d) Figure 7. Influence of threshold for final index on the sparseness and retrieval accuracy on UKBench (left) and Holiday (right) of sparsity of functional matrix in our model, we conduct experiments with variants of our approach. On Market-1501, we remove the sparse operation on the functional matrix, it drops a almost 5% absolute reduction on Rank1-error. It indicates that the sparsity of functional matrix not only play an important role for scalability, but also the performance of the multi-index fusion framework. In practice, the sparsity of our learned functional matrix have been identified as shown in Fig. 8. Experiments demonstrate almost 97% elements of our learned functional matrix are zero on Market-1501, which clearly reveals the subspace structure in the gallery. Furthermore, only a few relevant images have been updated, JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 11 limitations in this work, which will be further invested in the future work. First of all, without the ground-truth, it is hardly to choose the final index, especially when we meet the poor baseline method (e.g., GIST index). Second, the sparseness of the visual index will not be guaranteed directly during the iteration. The sparse operation will destroy the original image representation and compel the related images to be the same. For these limitations, we can use the priori knowledge and the larger θ1 to solve, but need further investigation. VI. C ONCLUSION 10 In this paper, a t-SVD based tensor optimization is proposed to tackle the multi-index fusion problem for image retrieval. Our proposed technique, MMF, inherits the core idea of CIE [46], that is, fuse different visual representations on index level. Furthermore, MMF explores the high-order information assumed by index-specific and sample-specific dependence to capture the complementary shared by different visual feature. Different from traditional multi-index fusion approach, the proposed method find an optimal functional matrix, which is optimized in a unified tensor space, to propagate similarities and update the indexes with sparse constraint. Experimental results reveal that our approach significantly outperforms baseline methods and some other state-of-the-art methods in retrieval accuracy, and with little additional memory cost in online query stage. Future research will include the following: 1) the parallel computing for t-SVD; 2) the final index selection method; 3) the strategy of splitting images into groups for scalable image retrieval. 5 R EFERENCES Fig. 8. Representative functional matrix Z learned on the Holidays datasets. Larger values indicate two images are more positively correlated. 30 Err1 Err2 Err3 25 Error 20 15 0 1 5 9 13 17 21 25 29 Iteration Fig. 9. Convergence curves on Holiday dataset. FC GIST SIFT HC NS-score 3.5 2.5 1.5 Original index MMF index Fig. 10. Comparison between the original index and the proposed MMF inedx in terms of accuracy on UKbench dataset. which may slightly destroy the original visual representation. Limitations and Future work: Although the proposed method achieves impressive performances, there are still some [1] K. Mikolajczyk, C. Schmid. Scale affine & invariant interest point detectors. International journal of computer vision, vol. 60, no. 1, pp. 63-86, 2004. [2] F. Perronnin, C. Dance. Fisher kernels on visual vocabularies for image categorization. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2007. [3] F. Radenović, G. Tolias, O. Chum. CNN image retrieval learns from BoW: Unsupervised fine-tuning with hard examples. European Conference on Computer Vision, 2016. [4] H. Jégou, F. Perronnin, M. Douze, et al. Aggregating local image descriptors into compact codes. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, no. 9 pp. 1704-1716, 2012. [5] S. Zhang, M. Yang, T. Cour, K. Yu, D. N. Metaxas. Query specific rank fusion for image retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, no. 9, pp. 803-815, 2015. [6] Y. Yang, J. Song, Z. Huang, Z. Ma, N. Sebe, A. G. Hauptmann. MultiFeature Fusion via Hierarchical Regression for Multimedia Analysis. IEEE Trans. on Multimeadia, vol. 15, no. 3, pp. 572-581, 2012. [7] H. Jégou, A. Zisserman. Triangulation embedding and democratic aggregation for image search. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. [8] D. Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, vol. 60, no. 2, pp. 91-110, 2004. [9] J. Philbin, O. Chum, M. Isard, J. Sivic, A. Zisserman. Object retrieval with large vocabularies and fast spatial matchin. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2007. [10] R. Arandjelović, A. Zisserman. Three things everyone should know to improve object retrieval. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2012. [11] L. Zheng, S. Wang, L. Tian, F. He, Z. Liu, Q. Tian. Query-adaptive late fusion for image search and person re-identification. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015. [12] L. Zheng, S. Wang, Z. Liu, Q. Tian. Packing and Padding: Coupled Multi-Index for Accurate Image Retrieval. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, JUNE 2017 [13] A. Babenko, A. Slesarev, A. Chigorin, V. Lempitsky. Neural codes for image retrieval. European conference on computer vision, 2014. [14] J. Philbin, O. Chum, M. Isard, J. Sivic, A. Zisserman. Lost in quantization: Improving particular object retrieval in large scale image databases View Document. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2008. [15] J. Sivic, A. Zisserman. Video Google: A text retrieval approach to object matching in videos. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2003. [16] F. Shen, W. Liu, S. Zhang, Y. Yang, H. T. Shen. Learning binary codes for maximum inner product search. Proceedings of the IEEE International Conference on Computer Vision , 2015. [17] A. Krizhevsky, I. Sutskever, G. E. Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 2012. [18] K. Simonyan, A. Zisserman. Very deep convolutional networks for largescale image recognition. arXiv preprint arXiv:1409.1556, 2014. [19] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, T. Darrell. Caffe: Convolutional architecture for fast feature embedding. Proceedings of ACM international conference on Multimedia, 2014. [20] J. Ng, F. Yang, L. Davis. Exploiting local features from deep networks for image retrieval. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015. [21] Z. Gao, J. Xue, W. Zhou, S. Pang, Q. Tian. Democratic diffusion aggregation for image retrieval. IEEE Trans. on Multimedia, vol. 18, no. 8, pp. 1661-1674, 2016. [22] G. Liu, Z. Lin, S. Yan, J. Sun, Y. Yu, Y. Ma. Robust recovery of subspace structures by low-rank representation. IEEE Trans. on Pattern Analysis and Machine Intelligence, vol 35, no. 1, pp. 171-184, 2013. [23] Y. Xie, D. Tao, W. Zhang, L. Zhang. On Unifying Multi-View SelfRepresentations for Clustering by Tensor Multi-Rank Minimization. arXiv preprint arXiv:1610.07126, 2016. [24] M. E. Kilmer and C. D. Martin. Factorization strategies for thirdordertensors. Linear Algebra and its Applications, vol. 435, no. 3, pp. 641-658, 2011. [25] Z. Zhang, G. Ely, S. Aeron, N. Hao, and M. Kilmer, Novel methods for multilinear data completion and de-noising based on tensor-SVD. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. [26] Z. Lin, M. Chen, Y. Ma. The augmented Lagrange multiplier method for exact recovery of corrupted low-rank matrices. Technical Report UILUENG-09-2215, UIUC, 2009. [27] D. Nister, H. Stewenius. Scalable recognition with a vocabulary tree. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2006. [28] H. Jegou, M. Douze, and C. Schmid. Hamming embedding and weak geometric consistency for large scale image search. European conference on computer vision, 2008. [29] R. Arandjelović, A. Zisserman. Three things everyone should know to improve object retrieval. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2012. [30] H. Jégou, O. Chum. Negative evidences and co-occurences in image retrieval: The benefit of PCA and whitening. European conference on computer vision, 2012. [31] A. Babenko, V. Lempitsky. Aggregating local deep features for image retrieval. Proceedings of the IEEE International Conference on Computer Vision , 2015. [32] W. Zhou, Y. Lu, H. Li, Q. Tian. Spatial coding for large scale partialduplicate web image search. Proceedings of the ACM international conference on Multimedia, 2010. [33] E. Mohedano, K. Mcguinness K, N. E. O’Connor, A. Salvador, F. Marqués, X. Giró-i-Nieto. Bags of Local Convolutional Features for Scalable Instance Search. Proceedings of the ACM International Conference on Multimedia Retrieval, 2016. [34] S. Zhang, M. Yang, X. Wang, Y. Lin, Q. Tian. Semantic-Aware CoIndexing for Image Retrieval. IEEE Trans. on Pattern Analysis and Machine Intelligence, vol 37, no. 12, pp. 2573-2587, 2015. [35] A. Babenko, V. Lempitsky. The Inverted Multi-Index. IEEE Trans. on Pattern Analysis and Machine Intelligence, vol 37, no. 6, pp. 1247-1260, 2015. [36] B. Neyshabur, N. Srebro. On Symmetric and Asymmetric LSHs for Inner Product Search. Proceedings of the international conference on machine learning, 2015. [37] A. Gionis, P. Indyk, R. Motwani. Similarity search in high dimensions via hashing. Proceedings of the VLDB Conference, 1999. 12 [38] Y. Hao, T. Mu, R. Hong, M. Wang, N. An, J. Y. Goulermas. Stochastic Multiview Hashing for Large-Scale Near-Duplicate Video Retrieval. IEEE Trans. on Multimedia, vol 19, no. 1, pp. 1-14, 2016. [39] Y. Weiss, A. Torralba, R. Fergus. Spectral hashing. Advances in neural information processing systems, 2009. [40] J. Wang, W. Liu, S. Kumar, S. F. Chang. Learning to hash for indexing big datała survey. Proceedings of the IEEE, 2016. [41] E. Elhamifar, R. Vidal. Sparse subspace clustering: Algorithm, theory, and applications. IEEE Trans. on Pattern Analysis and Machine Intelligence, vol 35, no. 11, pp. 2765-2781, 2013. [42] C. Zhang, H. Fu, S. Liu, G. Liu, X. Cao. Low-rank tensor constrained multiview subspace clustering. Proceedings of the IEEE International Conference on Computer Vision, 2015. [43] O. Semerci, N. Hao, M. E. Kilmer, et al. Tensor-based formulation and nuclear norm regularization for multienergy computed tomography. IEEE Transactions on Image Processing, vol 24, no.4, pp.1678-1693, 2014. [44] M. E. Kilmer, K. Braman, N. Hao, R. C. Hoover. Third-order tensors as operators on matrices: A theoretical and computational framework with applications in imaging. SIAM Journal on Matrix Analysis and Applications, vol 34, no. 1, pp. 148-172, 2013. [45] X. Chen, J. Wu, S. Sun, Q. Tian. Multi-Index Fusion via Similarity Matrix Pooling for Image Retrieval. IEEE International Conference on Communications, 2017. [46] W. Zhou, H. Li, Q. Tian, J. Sun. Collaborative Index Embedding for Image Retrieval. IEEE Trans. on Pattern Analysis and Machine Intelligence, doi=10.1109/TPAMI.2017.2676779, 2017. [47] L. Zheng, L. Shen, L. Tian, S. Wang, J. Wang, Q. Tian. Scalable person re-identification: A benchmark. Proceedings of the IEEE International Conference on Computer Vision, 2015. [48] L. Zheng, Y. Yang, A. G. Hauptmann. Person Re-identification: Past, Present and Future. arXiv preprint arXiv:1610.02984, 2016. [49] I. B. Barbosa, M. Cristani, B. Caputo, A. Rognhaugen, T. Theoharis. Looking beyond appearances: Synthetic training data for deep cnns in re-identification. arXiv preprint arXiv:1701.03153, 2017. [50] Z. Chen, J. Lu, J. Feng, J. Zhou. Nonlinear Sparse Hashing. IEEE Trans. on Multimedia, doi=10.1109/TMM.2017.2705918, 2017. [51] Z. Zhong, L. Zheng, D. Cao, S. Li. Re-ranking Person Re-identification with k-reciprocal Encoding. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. [52] L. Zhang, T. Xiang, S. Gong. Learning a Discriminative Null Space for Person Re-identification. IEEE Conference on Computer Vision and Pattern Recognition. 2016. [53] R. R. Varior, B. Shuai, J. Lu, D. Xu, G. Wang. A Siamese Long Short-Term Memory Architecture for Human Re-identification. European conference on computer vision, 2016. [54] R. R. Varior, B. Shuai, M. Haloi, G. Wang. Gated siamese convolutional neural network architecture for human reidentification. European conference on computer vision, 2016. [55] D. Chen, Z. Yuan, B. Chen, and N. Zheng. Similarity learning with spatial constraints for person re-identification. IEEE Conference on Computer Vision and Pattern Recognition, 2016. [56] C. Su, S. Zhang, J. Xing, W. Gao, and Q. Tian. Deep attributes driven multi-camera person re-identification. European conference on computer vision, 2016. [57] Z. Liu, H. Li, W. Zhou, R. Hong, Q, Tian. Uniting keypoints: Local visual information fusion for large-scale image search. IEEE Trans. on Multimedia, vol 17, no. 4, pp. 538-548, 2015.
1cs.CV
Long-Distance Loop Closure Using General Object Landmarks arXiv:1710.10466v1 [cs.RO] 28 Oct 2017 Andrew Holliday1 and Gregory Dudek2 Abstract— Visual localization under large changes in scale is an important capability in many robotic mapping applications, such as localizing at low altitudes in maps built at high altitudes, or performing loop closure over long distances. Existing approaches, however, are robust only up to a 3x difference in scale between map and query images. We propose a novel combination of deep-learning-based object features and hand-engineered point-features that yields improved robustness to scale change, perspective change, and image noise. We conduct experiments in simulation and in realworld outdoor scenes exhibiting up to a 7x change in scale, and compare our approach against localization using state-of-theart SIFT features. This technique is training-free and classagnostic, and in principle can be deployed in any environment out-of-the-box. Far Image Near Image SIFT res3d, 64 × 64 input I. INTRODUCTION In this work, we attempt to address the problem of performing metric localization in a known environment under extreme changes in visual scale. Our localization approach is based on the identification of objects in the environment, and their use as landmarks. By “objects” we here mean physical entities which are distinct from their surroundings and have some consistent physical properties of structure and appearance. Many robotic applications involve repeated traversals of a known environment over time. In such applications, it is usually beneficial to first construct a map of the environment, which can then be used by a robot to navigate the environment in subsequent missions. Surveying the environment from a very high altitude allows complete geographic coverage of the environment to be obtained by shorter, and thus more efficient, paths through the environment by the surveyor. At the same time, a robot that makes use of this high-altitude map to localize may have mission parameters requiring it to operate at a much lower altitude. One such scenario is that of performing visual surveys of benthic environments, such as coral reefs, as in [1]. A fast-moving surface vehicle may be used to rapidly map a large area of a reef. This map may then be used by a slower-moving, but more maneuverable, autonomous underwater vehichle (AUV) such as the Aqua robot [2], to navigate the reef while capturing imagery very close to the sea floor. Another relevant scenario is that of a robot performing loop closure over long distances while performing simultaneous localization and mapping (SLAM) in terrestrial environments. Loop closure, the recognition of a previously-viewed location when viewing it a second time, 1 Andrew Holliday and Gregory Dudek are with the Center for Intelligent Machines, McGill University, 845 Sherbrooke St, Montreal, Canada [email protected], [email protected] Fig. 1: The results of SIFT features alone, and of the overallbest configuration of our system, on the largest-scale-change image pair in the dataset. Despite the scale factor of 6, the highly-distinctive object in the foreground allows our system to determine an accurate homography between the images, while SIFT features fail to do so. is key to accurate SLAM, and the overall accuracy of SLAM could be considerably improved if loop closure could be conducted across major changes in scale and perspective. In scenarios such as the above, a robot must deal with the considerable change in visual scale between two perspectives, which in our scenarios may be 5 times or even greater. In some scenarios, such as in benthic environments, other factors may also intrude, such as colour-shifting due to the optical properties of water, and image noise due to particulate suspended in the water. Identifying scenes across such large changes in scale is very challenging for modern visual localization techniques. Even the most scale-robust techniques, such as Scale-Invariant Feature Transforms (SIFT), can only localize reliably under scale factors less than 3. We consider that the hierarchical features computed by the intermediate layers of a convolutional neural network (CNN) [3] may prove robust to changes in scale, due to their high degree of abstraction. We propose a technique for performing metric localization across significant changes in scale by identifying and describing non-semantic objects in a way that allows them to be associated between scenes. We show that these associations can be used to localize correctly under visual scale factors of 3 and greater. The proposed system does not require any environment-specific training, and in principle can be deployed out-of-the-box in arbitrary environments. The objects used by our system are defined functionally, in terms of their utility as scaleinvariant landmarks, and are not limited to semanticallymeaningful object categories. We demonstrate the approach both in simulation and on a novel dataset of real-world image pairs of urban scenes. II. RELATED WORK Global Localization refers to the problem of determining a robot’s location in a pre-existing map with no prior on the robot’s position [4]. This is closely related to the problem of loop closure in SLAM, and there is a large body of literature exploring this problem. Prominent early work includes Leonard et al. [5] and Mackenzie et al. [6], and [7]. Many traditional visual approaches to these problems have been based on the recognition of whole-image descriptors of particular scenes, such as GIST features [8]. Successful instances include SeqSLAM [9], which uses a heavily downsampled version of the input image as a descriptor, and FAB-MAP [10], ORB-SLAM [11], and Ho et al. [12] which discretize point-feature descriptors to build bag-ofwords histograms of the input images, starting from SURF [13], ORB [14], and SIFT [15] features, respectively. Other successful results include LSD-SLAM of Engel et al. [16] as well as Hansen et al. [17], Cadena et al., [18], Liu et al. [19] and Naseer et al. [20]. Because whole-image descriptors encode the geometric relationships of features in the 2D image plane, images of the same world scene from different perspectives can have very different descriptors, in general no more similar than those of images of completely different places. Most such methods are thus very sensitive to changes in perspective, and depend on viewing the world from the same perspective in the mapping and localization stages. Other global localization approaches attempt to recognize particular landmarks in an image, and use those to produce a metric estimate of the robot’s pose. SLAM++ of Salas-Moreno et al. [21] performs SLAM by recognizing landmarks from a database of 3D object models. Linegar et al. [22] and Li et al. [23] both train a bank support vector machines (SVMs) to detect specific landmarks in a known environment, one SVM per landmark. More recently, [24] made use of a Deformable Parts Model (DPM) [25] to detect objects for use as loop-closure landmarks in their SLAM system. All of these approaches require a pre-existing database of either object types or specific objects to operate. These databases can be costly to construct, and these systems will fail in environments in which not enough landmarks belonging to the database are present. Some work has explored the use of CNNs for global localization. PoseNet [26] is a CNN that learns mapping from an image in an environment to the metric pose of the camera, but can only operate on the environment on which the network was trained. In Sünderhauf et al. [27], the intermediate activations of a CNN trained for image classification were used as whole-image descriptors for place recognition, a non-metric form of global localization. Their subsequent work [28] refined this approach by using the same descriptor technique on object proposals within an image instead of the whole image. These pre-trained deep descriptors were robust to changes in appearance and perspective. Schmidt et al. [29] and Simo-Serra et al. [30] have both explored the idea of learning point-feature descriptors with a CNN, which could replace classical point features in a bag-of-words model. When exploring robustness to perspective change, all of these works only consider positional variations of at most a few meters, when the scenes exhibit within-image scale variations of tens or hundreds of meters, and when the reference or training datasets consisted of images taken over traversals of environments ranging from hundreds to thousands of meters. As a result, little significant change in scale exists between map images and query images in these experiments. To the best of our knowledge, ours is the first to attempt to combine deep object-like features and point features into a single, unified representation of landmarks. This synthesis provides superior metric localization to either technique in isolation, particularly under significant (3x and greater) changes in scale. III. PROPOSED SYSTEM The first stage of our metric localization pipeline consists in detecting objects in a pair of images, computing convolutional descriptors for them, and matching these descrpitors between images. Our approach here closely follows that used for image-retrieval by Sünderhauf et al. [27]; we differ in using Selective Search (SS), as proposed by Uijlings et al. [31], to propose object regions, and in our use of a more recent CNN architecture. To extract objects from an image, Selective Search object proposals are first extracted from the image, and filtered to remove objects with bounding boxes less than 200 pixels in size and with aspect ratio greater than 3 or less than 1/3. The image regions defined by each surviving SS bounding box are then extracted from the image, rescaled to a fixed size via bilinear interpolation, and run through a CNN. We use a ResNet-50 architecture trained on the ImageNet imageclassification dataset, as described in He et al. [32]. Experiments were run using six different layers of the network as feature descriptors, and with inputs to the network of four different resolutions. The network layers and resolutions are listed in Table I. Having extracted objects and their descriptors from a pair of images, we perform brute-force matching of the objects between the images. Following [28], we take the match of each object descriptor in image i to be the descriptor in image j that has the smallest cosine distance from i, as defined in 1. Matches are validated by cross-checking; a match (xi , yj ) is only considered valid if xi is the most similar object to yj in image i and yj is the most similar object to xi in image j. tcos err (u, v) =1− u·v ||u||2 · ||v||2 (1) TABLE I: The sizes, as a number of floating-point values, of the output layers of ResNet-50 at different input resolutions. Values in bold indicate layer-resolution pairs which provided the best results in any of our experiments. Input res. 224 × 224 128 × 128 64 × 64 32 × 32 pool1 201k 66k 16k 4k selective search res2c 803k 262k 66k 16k res3d 401k 131k 32k 32k res4f 200k 65k 66k 66k res5c 100k 131k 131k 131k pool5 2k 8k 8k 8k pool1 res2c res3d res4f res5c pool5 Fig. 3: The map image of the gazebo environment used in our experiments, without noise. Fig. 2: A simplified illustration of our object-detection architecture. Once object matches are found, we extract SIFT features from both images, using 3 octave layers, an initial Gaussian with σ = 1.6, an edge threshold of 10, and a contrast threshold of 0.04. For each pair of matched objects, we match SIFT features that lie inside the corresponding bounding boxes to one another. SIFT features are matched via their Euclidean distance, and cross-checking is again used to filter out bad matches. By limiting the space over which we search for SIFT matches to matched object regions, we greatly increase the accuracy of SIFT matching, and thus of the resulting metric pose estimates. As a baseline against which to compare our results, experiments were also run using SIFT alone, with no object proposals. In these baseline experiments, SIFT matching was performed in the same way, but the search for matches was conducted over all SIFT features in both images. These point matches are used to produce a metric pose estimate. Depending on the experiment, we compute either a homography H or an essential matrix E, or both. In either case, the calculation of H or E from point correspondences is done via a RANSAC algorithm with an inlier threshold of 6, measured in pixel units. IV. EXPERIMENTS IN SIMULATION A. Experimental Setup A range of experiments were conducted in simulation that imitate the scenario of a low-altitude robot with a downwardfacing camera localizing in an approximately-planar world using a visual map constructed at an altitude several times higher. These experiments were conducted in the Gazebo simulation environment, using a world consisting of a variety publicly-available textured 3D models spread over an untextured ground plane. A simulated camera was used first to take a ”map” image at a high altitude, encompassing all of the objects in the environment. Then, a set of query images were taken at a ”pyramid” of poses spaced in regular 9-by9 grids at a range of altitudes, giving rise to scale changes between the map and query image of 1.5 times to 7 times. All images taken were 1200 × 900 pixels, with a simulated focal length of 1039.47 in pixel units. At each location, a random orientation was generated by sampling a ∆yaw, ∆pitch, and ∆roll from a uniform distribution over the range [−40◦ , 40◦ ], and these deltas were added to the yaw, pitch, and roll of the downward-facing mapping camera’s orientation. The camera pose from which each image was taken was recorded and used as ground truth for evaluation. Images which did not contain any visible objects were filtered out of the dataset. The final simulated dataset consisted of one map image and 561 query images. Fig. 3 is the map image against which the query images were compared. For each query image, a set of point matches was produced between the query image and the map image according to the method detailed in III, or using SIFT feature matching in the case of the SIFT-only experiments. These point matches were used to estimate both a homography matrix H and an essential matrix E. Pose estimates (RH , tH ) and (RE , tE ) describing the transform between the mapping camera and the query camera, consisting of a rotation matrix and a translation vector, was derived from each of these matrices. The reprojection error of all inlier matches for each of H and E was computed from the respective pose estimates, and the pose estimate with the lower reprojection error was returned. The quality of the estimate was measured as the relative positional error, as defined in 2. trel err = ||tg − te ||2 ||tg ||2 (2) where tg is the ground-truth translation between the two cameras and te is the estimated translation. We normalize the vector from the estimated pose to the true pose to remove the correlation of that vector’s length with the magnitude of the true translation. In degenerate cases of erroneous matches, the estimated translation can be extremely large, and in practice any trel err greater than 2 means that the magnitude of the error is twice the magnitude of the actual translation. Hence, we threshold the error above at 2: error = min(trel err , 2) (3) If no pose can be estimated for a query image due to insufficient or incoherent point matches, we set the error to 2 for this query as well. To test the degree of robustness to noise of our technique, each experiment is repeated with multiple levels of Gaussian per-pixel noise applied to each image. The σ values used are 0, 0.04, 0.08, and 0.12, where the pixel intensities range from 0 to 1. The same per-pixel noise is applied to each colour channel. Fig. 4: The mean error vs. the scale factor relative to the map image for SIFT features and the best configuration of our system, at four levels of per-pixel noise. B. Results Table II displays the average error of each configuration of our system over all queries, as well as that of using SIFT features alone. Features drawn from network layer res5c with 6x × 64-pixel inputs gave the best performance overall, but notably, 13 of the 24 configurations - more than half - outperformed SIFT overall. Notably, for each input resolution, the deepest convolutional layers of the network - res4f, res5c, and pool5 - performed best at each input resolution. This supports the idea that more levels of abstraction from the input pixels in a descriptor leads to improved robustness to scale and perspective change. Fig. 4 compares the performance of feature res5c at input resolution 64 × 64 to that of SIFT features alone, at each query scale factor and at each noise level. All methods have average error close to 2 at scale factors of 5 and above, implying that most queries fail to localize at these scale changes. At scale factors 2, 3, and 4, however, there is a notable difference between our system and SIFT features at all noise levels. The gap between the average error without noise and that with the highest level of noise is significantly greater for SIFT features than for our system at all scale factors less than 4, indicating that limiting the search for SIFT matches only to the regions of matching objects improves their robustness not only to changes in scale, but also to image noise. TABLE II: The average positional error over all query images at all noise levels, for each configuration of our system, as well as for SIFT features alone. The best-performing configuration is in bold. Input res. 224 × 224 128 × 128 64 × 64 32 × 32 SIFT pool1 1.751 1.768 1.740 1.673 1.666 res2c 1.889 1.842 1.750 1.676 res3d 1.779 1.685 1.626 1.619 res4f 1.669 1.614 1.589 1.573 res5c 1.609 1.591 1.567 1.594 pool5 1.630 1.612 1.587 1.604 V. MONTREAL IMAGE PAIR EXPERIMENTS A. Experimental Setup To test the effectiveness of the proposed system in a real-world scenario, a set of 31 image pairs were taken across twelve scenes surrounding the Montreal campus. Scenes were chosen to contain a roughly-centred object of approximately uniform depth in the scene, so that a uniform change in the object’s image scale could be achieved by taking images at various distances from the object. Scenes were also selected so that any objects surrounding the central object were closer to the camera than the central object, so that no part of the scene would exhibit a much smaller scale change than that of the central object. This ensures that successful matches must be made under the close to the desired change in scale, and makes the relationship between the images amenable to description by a homography. The image pairs exhibit changes in scale ranging from factors of about 1.5 to about 7, with the exception of one image pair showing scale change of about 15 in a prominent foreground object. All images were taken using the rearfacing camera of a Samsung Galaxy S3 phone, and were downsampled to 900x1200 pixels via bilinear interpolation for all experiments. Each image pair was hand-annotated with a set of 10 point correspondences, distributed approximately evenly over the nearer image in each pair. The proposed system was used to compute point matches between each image pair, and from these point matches, a homography H was computed as described in section III. H was used to calculate the total symmetric transfer error (STE) for the image pair e over the ground truth points: STE = N X i ||pif ar − Hpinear ||2 + ||pinear − H −1 pif ar ||2 (4) The maximum STE we observed for any attempted method on any image pair was ST Emax = 15, 833, 861, 380.8. Whenever no H could be found for an image pair by some method, its on that image pair was set to ST Emax . The plain STE ranges over many orders of magnitude on this dataset, so we present the results using the logarithmic STE, making the results easier to interpret. The same set of parameters were run over this dataset as in the simulation experiments - our system at six network layers and four input resolutions, plus SIFT alone for comparison. B. Results Table III shows the performance of each feature layer and each input resolution over the whole Montreal dataset, and shows the results from using SIFT features alone as well. As this table shows, the total error using just SIFT features is significantly greater than that of the best-performing input resolution for each feature layer. Also, the average error of the intermediate layers res2c, res3d, and res4f, are all very comparable. It is interesting to note that in this experiment, more intermediate layers are favoured, while the simulation experiments favoured the deepest layers of the network. This may arise from the relatively small degrees of change in viewing angle between these image pairs in comparison with those in the simulation experiments. Fig 5 show the error of each of the three best-performing configuration, as well as SIFT, on each of the image pairs in the dataset, plotted versus the median scale change over all pairs of ground-truth matches (pi , pj ) in each image. The scale change between matches (pi , pj ) is defined in 5. The lines of best fit for each method further emphasize the improvement of our system over SIFT features at all scale factors up to 6. The best-fit lines for all of the top-three configurations of our system overlap almost perfectly, although there is a fair degree of variance in their performances on individual examples. scale changei,j = ||pinear − pjnear ||2 ||pif ar − pjf ar ||2 (5) The use of homographies to relate the image pairs allows us to visually inspect the quality of the estimated H, by using H to map all pixels in the farther image to their estimated locations in the nearer image. Visual inspection of these mappings for the 31 image pairs confirm that those configurations with lower logarithmic STEs tend to have more correct-looking mappings, although all configurations of our system with mean logarithmic STE ¡ 10 produce comparable mappings for most pairs, and on some pairs, higher-error configurations such as res4f with 64 × 64-pixel inputs produce a subjectively better mapping than the lowesterror configuration. Fig. 1 and Fig. 6 display some example homography mappings. VI. CONCLUSIONS We have shown that by combining deep learning with classical methods, we can recognize scenes and perform TABLE III: A table showing the logarithmic STE of each configuration of the system, averaged over all image pairs. The best-performing feature overall is res3d with a 64 × 64 input size, followed closely by res2c with 64 × 64 inputs and res4f with 128 × 128 inputs. The mean log. STE of SIFT features alone is presented as well, for comparison. Input res. 224 × 224 128 × 128 64 × 64 32 × 32 SIFT pool1 11.102 10.389 10.921 10.134 10.654 res2c 13.057 11.716 9.381 10.162 res3d 9.631 10.231 9.339 10.473 res4f 10.277 9.458 9.777 9.658 res5c 10.537 9.930 10.234 10.301 pool5 10.011 9.505 9.667 10.607 Fig. 5: The error of SIFT features alone, and the three bestperforming configurations of our system, on each image pair in the dataset, plotted versus the median scale change exhibited in the image pair, along with a line of best fit for each method. accurate localization across vast changes in scale. Our system uses a pre-trained deep network to describe arbitrary objects and correctly match them between images for use as navigation landmarks. Restricting SIFT feature matching to matched objects substantially improves the robustness of SIFT features both to changes in image noise and to changes in scale. Despite much prior work on place recognition and localization using both classical methods and deep learning, our result sets a new benchmark for metric localization performance across scale. One strength of our proposed system is that it requires no domain-specific training, making use only of a pre-trained CNN. However, as future work we wish to explore the possibility of training a CNN with the specific objective of producing a perspective-invariant object descriptor, as doing so may result in more accurate matching of objects. We also wish to explore the possibility that including matches from multiple layers of the network in the localization process could improve the system’s accuracy. Far Image Near Image SIFT res3d, 64 × 64 input res4f, 128 × 128 input res5c, 128 × 128 input Fig. 6: The results of SIFT features and three different configurations of our system on another pair. The homography estimated by the best-overall configuration, res3d at 64 × 64 input size, is notably worse than those produced by two other intermediate feature layers. No configuration of our system performs best on all image pairs. R EFERENCES [1] M. Johnson-Roberson, O. Pizarro, S. B. Williams, and I. Mahon, “Generation and visualization of large-scale three-dimensional reconstructions from underwater robotic surveys,” Journal of Field Robotics, vol. 27, no. 1, pp. 21–51, 2010. [2] J. Sattar, G. Dudek, O. Chiu, I. Rekleitis, P. Giguère, A. Mills, N. Plamondon, C. Prahacs, Y. Girdhar, M. Nahon, and J.-P. Lobos, “Enabling autonomous capabilities in underwater robotics,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS, Nice, France, September 2008. [3] I. Goodfellow, Y. Bengio, and A. Courville, “Deep learning. book in preparation for mit press,” URL¡ http://www. deeplearningbook. org, 2016. [4] G. Dudek and M. Jenkin, Computational principles of mobile robotics. Cambridge university press, 2010. [5] J. J. Leonard and H. F. Durrant-Whyte, “Mobile robot localization by tracking geometric beacons,” IEEE Transactions on robotics and Automation, vol. 7, no. 3, pp. 376–382, 1991. [6] P. MacKenzie and G. Dudek, “Precise positioning using model-based maps,” in Robotics and Automation, 1994. Proceedings., 1994 IEEE International Conference on. IEEE, 1994, pp. 1615–1621. [7] D. Fox, W. Burgard, and S. Thrun, “Markov localization for mobile robots in dynamic environments,” Journal of Artificial Intelligence Research, vol. 11, pp. 391–427, 1999. [8] A. Oliva and A. Torralba, “Modeling the shape of the scene: A holistic representation of the spatial envelope,” Int. J. Comput. Vision, vol. 42, no. 3, pp. 145–175, May 2001. [Online]. Available: http://dx.doi.org/10.1023/A:1011139631724 [9] M. Milford and G. Wyeth, “Seqslam : visual route-based navigation for sunny summer days and stormy winter nights,” in IEEE International Conferece on Robotics and Automation (ICRA 2012), N. Papanikolopoulos, Ed. River Centre, Saint Paul, Minnesota: IEEE, 2012, pp. 1643–1649. [Online]. Available: http://eprints.qut. edu.au/51538/ [10] M. Cummins and P. Newman, “Invited Applications Paper FAB-MAP: Appearance-Based Place Recognition and Mapping using a Learned Visual Vocabulary Model,” in 27th Intl Conf. on Machine Learning (ICML2010), 2010. [11] R. Mur-Artal, J. M. M. Montiel, and J. D. Tards, “Orb-slam: a versatile and accurate monocular slam system.” CoRR, vol. abs/1502.00956, 2015. [12] K. L. Ho and P. Newman, “Detecting loop closure with scene sequences,” Int. J. Comput. Vision, vol. 74, no. 3, pp. 261– 286, Sept. 2007. [Online]. Available: http://dx.doi.org/10.1007/ s11263-006-0020-1 [13] H. Bay, A. Ess, T. Tuytelaars, and L. Van Gool, “Speededup robust features (surf),” Comput. Vis. Image Underst., vol. 110, no. 3, pp. 346–359, June 2008. [Online]. Available: http: //dx.doi.org/10.1016/j.cviu.2007.09.014 [14] E. Rublee, V. Rabaud, K. Konolige, and G. Bradski, “Orb: An efficient alternative to sift or surf,” in Proceedings of the 2011 International Conference on Computer Vision, ser. ICCV ’11. Washington, DC, USA: IEEE Computer Society, 2011, pp. 2564–2571. [Online]. Available: http://dx.doi.org/10.1109/ICCV.2011.6126544 [15] D. G. Lowe, “Object recognition from local scale-invariant features,” in Proceedings of the International Conference on Computer VisionVolume 2 - Volume 2, ser. ICCV ’99. Washington, DC, USA: IEEE Computer Society, 1999, pp. 1150–. [Online]. Available: http://dl.acm.org/citation.cfm?id=850924.851523 [16] J. Engel, T. Schöps, and D. Cremers, “Lsd-slam: Large-scale direct monocular slam,” in European Conference on Computer Vision. Springer, 2014, pp. 834–849. [17] P. Hansen and B. Browning, “Visual place recognition using hmm sequence matching,” in 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, Sept 2014, pp. 4549–4555. [18] C. Cadena, D. Galvez-Lpez, J. D. Tardos, and J. Neira, “Robust place recognition with stereo sequences,” IEEE Transactions on Robotics, vol. 28, no. 4, pp. 871–885, Aug 2012. [19] Y. Liu and H. Zhang, “Performance evaluation of whole-image descriptors in visual loop closure detection,” in 2013 IEEE International Conference on Information and Automation (ICIA), Aug 2013, pp. 716–722. [20] T. Naseer, L. Spinello, W. Burgard, and C. Stachniss, “Robust visual robot localization across seasons using network flows,” in AAAI Conference on Artificial Intelligence, 2014. [Online]. Available: http://www.aaai.org/ocs/index.php/AAAI/AAAI14/paper/view/8483 [21] R. F. Salas-Moreno, R. A. Newcombe, H. Strasdat, P. H. Kelly, and A. J. Davison, “Slam++: Simultaneous localisation and mapping at the level of objects,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2013, pp. 1352–1359. [22] C. Linegar, W. Churchill, and P. Newman, “Made to measure: Bespoke landmarks for 24-hour, all-weather localisation with a camera,” in 2016 IEEE International Conference on Robotics and Automation (ICRA), May 2016, pp. 787–794. [23] R. M. E. Jie Li and M. Johnson-Roberson, “High-level visual features for underwater place recognition.” [24] S. L. Bowman, N. Atanasov, K. Daniilidis, and G. J. Pappas, “Probabilistic data association for semantic slam,” in 2017 IEEE International Conference on Robotics and Automation (ICRA), May 2017, pp. 1722– 1729. [25] P. Felzenszwalb, D. McAllester, and D. Ramanan, “A discriminatively trained, multiscale, deformable part model,” in Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on. IEEE, 2008, pp. 1–8. [26] A. Kendall and R. Cipolla, “Modelling uncertainty in deep learning for camera relocalization,” Proceedings of the International Conference on Robotics and Automation (ICRA), 2016. [27] N. Sünderhauf, F. Dayoub, S. Shirazi, B. Upcroft, and M. Milford, “On the performance of convnet features for place recognition,” CoRR, vol. abs/1501.04158, 2015. [Online]. Available: http://arxiv. org/abs/1501.04158 [28] A. J. F. D. E. P. B. U. Niko S underhauf, Sareh Shirazi and M. Milford, “Place recognition with convnet landmarks: Viewpointrobust, condition-robust, training-free,” in Proceedings of Robotics: Science and Systems (RSS), 2015. [29] T. Schmidt, R. Newcombe, and D. Fox, “Self-supervised visual descriptor learning for dense correspondence,” IEEE Robotics and Automation Letters, vol. 2, no. 2, pp. 420–427, 2017. [30] E. Simo-Serra, E. Trulls, L. Ferraz, I. Kokkinos, P. Fua, and F. MorenoNoguer, “Discriminative learning of deep convolutional feature point descriptors,” in Proceedings of the IEEE International Conference on Computer Vision, 2015, pp. 118–126. [31] J. R. R. Uijlings, K. E. A. van de Sande, T. Gevers, and A. W. M. Smeulders, “Selective search for object recognition,” International Journal of Computer Vision, vol. 104, no. 2, pp. 154– 171, 2013. [Online]. Available: https://ivi.fnwi.uva.nl/isis/publications/ 2013/UijlingsIJCV2013 [32] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” arXiv preprint arXiv:1512.03385, 2015.
2cs.AI
STRUCTURE, MINIMAL GENERATING SYSTEMS AND PROPERTIES OF SYLOW 2-SUBGROUPS OF ALTERNATING GROUP arXiv:1612.02473v1 [math.GR] 7 Dec 2016 RUSLAN SKURATOVSKII Abstract. The background of this paper is the following: search of the minimal systems of generators for this class of group which still was not founded also problem of representation for this class of group, exploration of systems of generators for Sylow 2-subgroups Syl2 A2k and Syl2 An of alternating group, finding structure of these subgroups. The authors of [1] didn’t proof minimality of finding by them system of generators for such Sylow 2-subgroups of An and structure of it were founded only descriptively. The aim of this paper is to research the structure of Sylow 2-subgroups and to construct a minimal generating system for such subgroups. In other words, the problem is not simply in the proof of existence of a generating set with elements for Sylow 2-subgroup of alternating group of degree 2k and its constructive proof and proof its minimality. For the construction of minimal generating set we used the representation of elements of group by automorphisms of portraits for binary tree. Also, the goal of this paper is to investigate the structure of 2-sylow subgroup of alternating group more exactly and deep than in [1]. The main result is the proof of minimality of this generating set of the above described subgroups and also the description of their structure. Key words: minimal system of generators; wreath product; Sylow subgroups; group; semidirect product. 1. Introduction The aim of this paper is to research the structure of Sylow 2-subgroups of A2k , An and to construct a minimal generating system for it. Case of Sylow subgroup where p = 2 is very special because group C2 ≀ C2 ≀ C2 . . . ≀ C2 admits odd permutations, this case was not fully investigated in [1, 2]. This groups have applications in automaton theory, because if all states of automaton A have output function that can be presented as cycle (1, 2, ..., p) then group GA (X) of this automaton is Sylows p-subgroup of the group of all automaton transformations GA(X). There was a mistake in a statement about irreducibility that system of k+1 elements for Syl2 (A2k ) which was in abstract [3] on Four ukraine conference of young scientists in 2015 year. All undeclared terms are from [4, 5]. A minimal system of generators for a Sylow 2-subgroups of An was found. We denote by vj,i the vertex of X j , which has the number i. 2. Main result Let X ω denote a rooted tree, i.e. a connected graph with no cycles and a designated vertex v called the root. The n-th level, denoted by X n is defined by the distance n, and X 0 = v. The subtree of X ∗ induced by the set of vertices ∪ni=0 X i is called by restriction of rooted tree. Let’s denote by X [k] a labeled regular truncated binary rooted tree (with 1 2 number of levels from 0 to k but active states are only from X l , 0 ≤ l ≤ k − 1) labeled by vertex, vj,i X [k−j] – subtree of X [k] with root in vj,i . Note that the unique vertex vki corresponds to every word v in alphabet X. For every automorphism g ∈ AutX ∗ and every word v ∈ X ∗ define the section g(v) ∈ AutX ∗ of g at v by the rule: g(v) (x) = y for x, y ∈ X ∗ if and only if g(vx) = g(v)y. A restriction g(v)|X [1] is called the state of g at vertex v. Denote by ski (α) the state of automorphism at vertex vki ; that is: if αvki = 1, then ski (α) = 1, otherwise ski (α) = 0. An automorphism of X [k] with non-trivial state in some of v1,1 , v1,2 , v2,1 ,..., v2,4 , ... ,vm,1 , ... ,vm,j , m < k, j ≤ 2m is denoted by β1,(i11 ,i12 );...;l,(il1,...,i l );...;m,(im1 ,...,im2m ) where the indexes l are the numbers of l2 levels with non-trivial states, in parentheses after this numbers we denote a cortege of vertices of this level, imj = 0 if state in vmj is trivial imj = 1 in other case. If for some l all ilj = 0 then cortege l, (il1 , ..., il2l ) does not figure in indexes of β. But if numbers of vertices with active states are certain, for example vj,1 and vj,s we can use more easy notation βj,(1,s); . If in parentheses only one index then parentheses can be omitted for instance βj,(s); = βj,s;. Denote by τi,...,j the automorphism, which has a nontrivial vertex permutation (v.p.) only in vertices vk−1,i , ... ,vk−1,j , j ≤ 2k−1 of the level X k−1 . Denote by τ the automorphism τ1,2k−1 . Let’s consider special elements such that: α0 = β0 = β0,(1,0,...,0), α1 = β1 = β1,(1,0,...,0) , . . . , αl = βl = βl,(1,0,...,0). Recall that wreath product of permutations groups is associative construction. Lemma 1. Every state from X l , l < k − 1 determines an even permutation on X k . Proof. Actually every transposition from X l , l < k − 1 acts at even number of pair of vertexes because of binary tree structure, so it realize even permutation (of set which is k−1 k−l−l k−l−l vertexes of X k ) with cyclic structure [7] (12 −2 , 22 ) because it formed by the structure of binary tree.  Corollary 1. Due to Lemma 1 vertices permutations from AutX [k−1] = hα0 ...., αk−2 i form a group: Bk−1 = C2 ≀ ... ≀ C2 which acts at X k−1 by even permutations. Order of | {z } k−1 k−1 −1 Bk−1 equal to 22 . Let us denote by Gk the subgroup of AutX [k] such that Gk ≃ Syl2A2k and Wk−1 the subgroup of Gk that has active states only on X k−1. k−1 −1 Proposition 1. An order of Wk−1 is equal to 22 k−1 (C2 )2 −1 . , k > 1 its structure is Wk−1 ≃ Proof. On X k−1 we have 2k−1 vertexes where can be group Vk−1 ≃ C2 × C2 × ... × C2 ≃ (C2 )k−1 , but as a result of the fact that X k−1 contains only even number of active states or active vertex permutations (v.p.) in vertexes of X k−1, there are only half of all 2k−1 permutations from Vk−1 on X k−1 . So it’s subgroup of Vk−1 : Wk−1 ≃ C2 /C2 . So we can state: |Wk−1| = 2k−1 − 1, Wk−1 has k − 1 generators and we can consider Wk−1 as vector space of dimension k − 1.  4−1 −1 For example let’s consider subgroup W4−1 of A24 its order is 22 = 27 and |A24 | = 214 . 3 Lemma 2. The elements τ and α0 , ..., αk−1 generates arbitrary element τij . Proof. According to [5, 6] the set α0 , ..., αk−2 is minimal system of generators of group AutX [k−1] . Firstly, we shall proof the possibility of generating an arbitrary τij , from set v(k−1,i) , 1 ≤ i ≤ 2k−2 . Since Autv1,1 X [k−2] ≃ hα1 , ..., αk−2 i acts at X k−1 transitively from it follows existing of an ability to permute vertex with a transposition from automorphism τ and stands in vk−1,1 in arbitrary vertex vk−1,j , j ≤ 2k−2 of v1,1 X [k−1] , for this goal we act by αk−j at τ : αk−j τ αk−j = τj,2k−2 . Similarly we act at τ by corespon−1 dent αk−i to get τi,2k−2 from τ : αk−i τ αk−i = τi,2k−2 . Note that automorphisms αk−j and αk−i , 1 < i, j < k − 1 acts only at subtree v1,1 X [k−1] that’s why they fix v.p. in vk−1,2k−1 . Now we see that τi,2k−2 τj,2k−2 = τi,j , where 1 ≤ i, j < 2k−2 . To get τm,l from v1,2 X [k−1], i.e. 2k−2 < m, l ≤ 2k−1 we use α0 to map τi,j in τi+2k−2 ,j+2k−2 ∈ v1,2 AutX [k−1]. To construct arbitrary transposition τi,m from Wk we have to multiply τ1,i τ τm,2k−1 = τi,m . Lets realize natural number of vk,l , 1 < l < 2k in 2-adic system of presentation (binary arithmetic). Then l = δl1 2ml + δl2 2ml −1 + ... + δlml +1 , δli ∈ {0, 1} where is a correspondence between δli that from such presentation and expressing of automorQml δli Q l δli phisms: τl,2k−1 = m i=1 αk−2−(ml −i) , 1 ≤ ml ≤ k − 2. In other words i=1 αk−2−(ml −i) τ hα0 , ..., αk−2 , τ i ≃ Gk .  Corollary 2. The elements from conditions of Lemma 2 is enough to generate basis of Wk−1 . Lemma 3. Orders of groups Gk = hα0 , α1 , α2 , ..., αk−2 , τ i and Syl2(A2k ) are equal to k 22 −2 . h ki h ki h ki k Proof. In accordance with Legender’s formula, the power of 2 in 2 ! is 22 + 222 + 223 + h ki k −1 ...+ 22k = 22−1 . We need to subtract 1 from it because we have only n!2 of all permutations k k −1 as a result: 22−1 − 1 = 2k − 2. So |Syl(A2k )| = 22 −2 . The same order has group Gk = Bk−1 ⋉ Wk−1 : |Gk | = |Bk−1| · |Wk−1 | = |Syl2A2k |, since order of groups Gk according k−1 k to Proposition 1 and the fact that |Bk−1 | = 22 −1 is 22 −2 . For instance the orders of 3−1 Syl2(A8 ), B3−1 and W3−1 : |W3−1 | = 22 −1 = 23 = 8, |B3−1 | = |C2 ≀ C2 | = 2 · 22 = 23 3 3 3 and according to Legendre’s formula, the power of 2 in 2k ! is 22 + 222 + 223 − 1 = 6 so k 4 Syl2(A8 ) = 26 = 22 −2 , where k = 3. Next example for A16 : Syl2 (A16 ) = 22 −2 = 214 , k = 4−1 4, |W4−1 | = 22 −1 = 27 , |B4−1 | = |C2 ≀ C2 ≀ C2 | = 2 · 22 · 24 = 27 . So we have equality 27 27 = 214 which endorse the condition of this Lemma.  Theorem 1. A maximal 2-subgroups Gk of AutX [k] that acts by even permutations on X k have structure of semidirect product Gk ≃ Bk−1 ⋉Wk−1 and isomorphic to Syl2A2k . Proof. A maximal 2-subgroup of AutX [k−1] is isomorphic to Bk−1 ≃ S2 ≀ S2 ≀ ... ≀ S2 (this {z } | k−1 group acts on X k−1). A maximal 2-subgroup which has elements with active states only on X k−1 corresponds subgroup Wk−1 . Since subgroups Bk−1 and Wk−1 are embedded in AutX [k] , then define an action of Bk−1 on elements of Wk−1 as τ σ = στ σ −1 , σ ∈ Bk−1 , τ ∈ Wk−1 , i.e. action by inner automorphism (inner action) from AutX [k] . Note 4 that Wk−1 is subgroup of stabilizer of X k−1 i.e. Wk−1 < StAutX [k] (k − 1) ⊳ AutX [k] and is normal too Wk−1 ⊳ AutX [k], because conjugation keeps a cyclic structure of permutation so even permutation maps in even. Therefore such conjugation induce automorphism of k−1 Wk−1 and Gk ≃ Bk−1 ⋉ Wk−1 . Since at X k−1 is 22 vertexes and half of combinations of k−1 k−1 active states from X can form even permutation thus |Wk−1 | = 22 −1 that is proved in Proposition 1. Using the Corollary 1 about Bk−1 we get order of Gk ≃ Bk−1 ⋉ Wk−1 is k−1 k−1 k 22 −1 · 22 −1 = 22 −2 . Since Gk is maximal 2-subgroup then Gk ≃ Syl2 A2k .  Theorem 2. The set Sα = {α0 , α1 , α2 , ..., αk−2 , τ } of elements from subgroup of AutX [k] generates a group Gk which isomorphic to Syl2 (A2k ). Proof. As we see from Corollary 1, Lemma 2 and Corollary 2 group Gk are generated by Sα and their orders according to Lemma 3 is equal. So according to Sylow’s theorems 2-subgroup Gk < A2k is Syl2(A2k ).  Consequently, we construct a generating system, which contains k elements, that is less than in [3]. k−1 Q k−1 The structure of Sylow 2-subgroup of A2k is the following: ≀ C2 ⋉ 2i=1 −1 C2 , where i=1 we take C2 as group of action on two elements and this action is faithful, it adjusts with construction of normalizer for Sylp(Sn ) from [10], where it was said that Syl2 (A2l ) is self-normalized in S2l . Number of such minimal generating systems for Gk is C21k−2 C21k−2 = 2k−2 · 2k−2 = 22k−4. Let us present new operation ⊠ (similar to that is in [1]) as a subdirect product of P SylS2i , n = ji=0 aki 2i , i.e. SylS2k1 ⊠SylS2k2 ⊠...⊠SylS2kl = P ar(SylS2k1 ×SylS2k2 ×...× SylS2kl ), where P ar(G) – set of all even permutations of G. Note, that ⊠ is not associated operation, for instance ord(G1 ⊠G2 ⊠G3 ) = |G1 × G2 × G3 | : 2 but ord(G1 ⊠G2 )⊠G3 = |G1 × G2 × G3 | : 4. For cases n = 4k + 1, n = 4k + 3 it follows from formula of Legendre. Statment 1. Sylow subgroups of Sn is isomorphic to Syl2 S2k1 × Syl2S2k2 × ... × Syl2 S2kl , where n = 2k1 + 2k2 + ... + 2kl , ki ≥ 0, ki < ki−1 . Sylow subgroup Syl2(An ) has index 2 in Syl2(Sn ) and it’s structure: Syl2 S2k1 ⊠ Syl2 S2k2 ⊠ ... ⊠ Syl2S2kl . Proof. Group Syl2 (S2k ) is isomorphic to C2 ≀ C2 ≀ ... ≀ C2 [1, 2] and this group is isomorphic {z } | k−1 to AutX [k], that acts at 2k vertices on X k . In case Syl2(Sn ), ∄k, k ∈ N : n = 2k but n = 2k1 + 2k2 + ... + 2kl , ki ∈ N ∪ {0} is a direct product: AutX [k1 ] × ... × AutX [kl ] [7]. k k k k k ... + 1}). Power of 2 in this |An |: 221 + 241 + ... + 1 + 221 + 242 + ... + 1 + 22l + ... + 1 − (1| + {z l But only half of these automorphism determines even permutations on X k so we have been subtracted 1 l times. For counting order of AutTk1 × ... × AutTkl we have to take in consideration that AutX [ki ] has active states on levels X 0 , X 1 , ... ,X ki −1 and hasn’t k active states on X ki so |AutX [ki] | = 1 · 2 · 22 · ... · 2ki −1 = 22 i − 1. 5 Such presentations is unique because it determines by binary number presentation n = 2k1 + ... + 2kl , ki ∈ N ∪ {0}, exactly for this presentation corresponds decomposition in direct product Syl2 S2k1 × Syl2S2k2 × ... × Syl2 S2kl and this decomposition determines Sylow 2-subgroup of maximal order by unique way. It is so, since for alternating decomposition 2k1 = 2l + 2l order: |Syl2S2k1 | > |Syl2S2l × Syl2 S2l | or more precisely |Syl2S2k1 | = 2 |Syl2 S2l × Syl2S2l | it following from structure of group binary trees. For instance Syl2 S22 ≃ Syl2 S16 × Syl2S4 × Syl2 S2 and correspondent orders 215 , 23 , 2 so it’s order is 219 = 215 · 23 · 2, on the other hand order of Syl2 S22 by formula of Legendre is 219 = 211+5+2+1 , analogously Syl2S24 ≃ Syl2S16 × Syl2S8 and 222 = 215 · 27 , on the other hand 222 = 212+6+3+1 . Let us prove that such decompositions of Syl2Sn and AutTn are unique in accord with n = 2k1 + 2k2 + ... + 2km , where k1 > k2 > ... > km ≥ 0. Really in accord with Legender’s formula n! is divisible by 2 in power n − m = 2k1 + 2k2 + ... + 2km − m so |Syl2 S22 | = 2n−m , group AutTk1 × ... × AutTkm , where k1 > k2 > k −1 km −1 ... > km ≥ 0, also has order 22 1 +...+2 = 2n−m it follows from formula of geometric progression. Such decomposition Syl2 S2k1 × Syl2 S2k2 × ... × Syl2 S2kl determines 2-Sylows subgroup of maximal order. It is so, since for alternating decomposition 2k1 = 2l +2l order: |Syl2S2k1 | > |Syl2S2l × Syl2S2l | or more precisely |Syl2S2k1 | = 2 |Syl2 S2l × Syl2S2l | it following from structure of group binary trees (AutTl × AutTl ) which correspondent for Syl2S2l × Syl2 S2l and formula of geometric progression. It also follows from nesting (embeding) of Sylows subgroups. If n = 2k1 + 2k2 = 2l + 2l + 2k3 , where 2k1 = 2l + 2l , then AutTn ≃ AutTk1 × AutTk2 , if not then Syl2 An don’t contains Syl2A2k1 .  Remark 1. If n = 2k + 1 then Syl2(An ) ∼ = Syl2(Sn−1 ). = Syl2(An−1 ) and Syl2(Sn ) ∼ Proof. Orders of these subgroups are equal since according to Legender’s formula which counts power of 2 in (2k + 1)! and (2k)! we get that these powers are equal. So these maximal 2-subgroups are isomorphic. From Statement 1 can be obtained that vertex with number 2k + 1 will be fixed to hold even number of transpositions on X k1 from decomposition of n which is in Statement 1. For instance Syl2 (A7 ) ≃ Syl2(A6 ) and by the way Syl2(A6 ) ≃ C2 ≀ C2 ≃ D4 , Syl2(A11 ) ≃ Syl2(A10 ) ≃ C2 ≀ C2 ≀ C2 .  Definition 1. We call index of automorphism β on X l number on active states of β on X l. Definition 2. Define a generator of type T as an automorphism τi0 ,...,i2k−1 ;j2k−1 ,...,j2k , that has even index at X k−1 and τi0 ,...,i2k−1 ;j2k−1 ,...,j2k ∈ StAutX k (k − 1), and it consists of odd number of active states in vertexes vk−1,j with number j ≤ 2k−2 and odd number in vertices vk−1,j , 2k−2 < j ≤ 2k−1 . Set of such elements denote T. Definition 3. A combined generator is such an automorphism βl;τ̃ , that the restriction βl;τ̃ |X k−1 coincides with αl and Rist<βil ;τ̃ > (k − 1) = hτ ′ i, where τ ′ ∈T. The set of such elements is denoted by CG. Definition 4. A combined element is such an automorphism β1,i1 ;2,i2 ;...;k−1,ik−1;τ̃ , that it’s restriction β1,i1 ;2,i2 ;...;k−1,ik−1;τ̃ Xk−1 coincide with one of elements that can be generated by 6 Sα and Rist<β1,i1 ;2,i2 ;...;k−1,ik−1 ;τ̃ > (k − 1) = hτ ′ i where τ ′ ∈T. Set of such elements is denoted by C. In other word elements g ∈C and g ′ ∈CG on level X k−1 have such structure as element and generator of type T. The minimal number of elements in a generating set S of G we denote by rkG and call the rank of S. By distance between vertexes we shall understand usual distance at graph between its vertexes. By distance of vertex permutations we shall understand maximal distance between two vertexes with active states from X k−1 . Lemma 4. A vertices permutations on X k that has distance d0 can not be generated by vertex permutations with distance d1 : d1 < d0 . Proof. Really vertex permutation τij : ρ(τij ) = d0 , d0 < d1 can be mapped by automorphic mapping only in permutation with distance d0 because automorphism keep incidence relation and so it possess property of isometry. Also multiplication of portrait of automorphism τij : ρ(τij ) = d1 give us automorphism with distance d1 , it follows from properties of group operation and property of automorphism to keep a distance between vertices on graph.  Lemma 5. An arbitrary automorphism τ ′ ∈T (or in particular τ ) can be generated only with using odd number of automorphisms from C or T. Proof. Let us assume that there is no such element which has distance of v. p. 2k τij then accord to Lemma 4 it is imposable to generate are pair of transpositions τ ′ with distance ρ(τij ) = 2k since such transpositions can be generated only by τij that described in the conditions of this Lemma: i ≤ 2k−2 , j > 2k−2. Combined element can be decomposed in product τ β̇il = βil ;τ so we can express by using τ or using a product where odd number an elements from T or C. If we consider product P of even number elements from T then automorphism P has even number of active states in vertexes vk−1,i with number i ≤ 2k−2 so P does not satisfy the definition of generator of type T.  Corollary 3. Any element of type T can not be generated by τij ∈ Autv1,1 X [k−1] and τml ∈ Autv1,2 X [k−1] . The same corollary is true for a combined element. Proof. It can be obtained from the Lemma 4 because such τij ∈ Autv1,1 X [k−1] has distance less then 2k − 2 so it does not satisfy conditions of the Lemma 4. I.e. τ ′ can not be generated by vertices permutations with distance between vertices less than 2k − 2 such distance has only automorphisms of type T and C. But elements from Autv1,1 X [k−1] do not belongs to type T or C.  It’s known that minimal generating system Sα of AutTk−1 has k − 1 elements [5], so if we complete it by τ (or element of type T or change one of its generators on β ∈ T we get system Sβ : Gk ≃ hSβ i and |Sβ | = k. So to construct combined element we multiply generator βi of Sβ (or arbitrary element β that can be express from Sβ ) by the element of type τ , i.e. we take τ ′ · βi instead of βi and denote it βi;τ̃ . It’s equivalent that Ristβ1,i;2,...,j;τ (k) = hτ ′ i, where τ ′ – generator of type T. 7 Lemma 6. Sets of elements of types T, C are not closed by multiplication and raising to even power. Proof. Let ̺, ρ ∈ T (or C) and ̺, ρ = η. The numbers of active states in vertices vk−1,i , 1 ≤ i ≤ 2k−2 of ̺ and ρ sums by mod2, numbers of active states in vertices on vk−1,i , 1 ≤ i ≤ 2k−2 of ̺ and ρ sums by mod2 too. Thus η has even numbers of active states on these corteges. So RiSthηi (k − 1) doesn’t contain elements of type τ so η ∈T. / Really if we raise the element β1,i1 ;2,i2 ;...;k−1,ik−1;τ ∈T to even power or we evaluate a product of even number of multipliers from C corteges µ0 and µ1 permutes with whole subtrees v1,1 X [k−1] and v1,2 X [k−1] , then we get an element g with even indices of X k in v1,1 X k−1 and v1,2 X k−1. Thus g ∈T. / Consequently elements of C do not form a group, and the set T as a subset of C is not closed too.  We have to take into account that all elements from T have the same main property to consists of odd number of active states in vertices vk−1,j with index j ≤ 2k−2 and odd number in vertices with index j : 2k−2 < j ≤ 2k−1. ′ Let Sα = hα0 , α1 , ..., αk−2i, then Sα = α0 , α0;1,(i11 ,i12 ); , ..., α0;1,(i11 ,...);...,k−2,(ik−2,1,...) , ′ hSα i = Sα = AutX [k−1] , rk (Sa ) = k − 1 where rk (S) is the rank of group which is equal to number generators of its least generating system S [11]. Let Sβ = Sα ∪ τi...j , ′ τi...j ∈T, Sβ = β0 , β1,(1);τ x , ..., βk−2,(1);τ x , τ , x ∈ {0, 1}, note if x = 0 then βl,(1);τ x = βl . ′ In Sβ can be used τ instead of τi...j ∈ T because it is not in principle for proof so let Sβ = Sα ∪ τ hence hSβ i = Gk . ′ Let us assume that Sβ does not contain τ and so had rank k − 1. To express element ′ ′ ′ / Sβ in contrary of type T from Sβ we can use a word βi,τ βi−1 = τ but if βi,τ ∈ Sβ then βi ∈ ′ case rank of Sβ is k. So we can not express word βi,τ βi−1 |X [k−1] = e then βi,τ βi−1 = τ so we have to find relation in restriction of group Gk on X [k−1] . Next lemma investigate existing of such word. We have to take in consideration that Gk |X k−1 = Bk−1 ≃ AutX [k−1] . ′ Lemma 7. An element of type T cannot be expressed by Sβ \{τ } with using a product, where are even number of the elements have combine type. Proof. In this case an element of type T can be expressed only without using elements from C. Note that element of type τ belongs to RiStAutTk (k−1). Let us show that automorphism α : α |X k−1 ∈ RiStG (k), i.e. that is trivial at restriction on X [k−1] and belongs to T can ′ not be expressed from Sβ without using even number of elements from C because word αi1 αi2 ...αin = e of AutTk−1 is word that may be reduced to relation in S2 ≀ ... ≀ S2 . It known | {z } m k−1 that in wreath product ≀kj=1C2 holds a relations βi2 = e and [βi−1 βj βi , σj ] = e, i < j, i −i j −j hβj , σj i ≃ Gj , [2, 9] or more specially [βm βin ,τ βm , βm βik ,τ βm ] = e, i 6= j, where n, k, m k are number of group in ≀j=1 C2 (m < n, m < k) [2], βin , βm , βik are generators from Sβ . As we see such relations ri has structure of commutator so logarithm [8] of every ri by every generator βi ∈ Sβ is zero because every exponent entering with different signs so every ri has logarithm 0 by every element from C hence is not equal to element of T because Lemma 6. Really product of even number of arbitrary elements of T according to Lemma 6 (analogously C) isn’t element of T. So other way to express automorphism 8 α : α |X k−1 ∈ RiStBk−1 (k−1) doesn’t exist according to relations in Gk . Cyclic relation in x 2y this group has form βi20 ;τ = e, analogously for β1,i = e because it is 2-group, 1 ;2,i2 ;...;k−1,ik−1 ;τ so we need to raise generator to even power. So another way to express automorphism α : α |X k−1 ∈ RiStBk−1 (k − 1) does not exist according to relations in Gk .  Let us assume existence of generating system of rank k − 1 for Syl2(A2k ) that in general case has form Sβ∗ (k−1) = β0 , β0;1,(i11 ,i12 );π1 , ..., β0;...;i,(ii1,...,iij );πi , ..., β0;...;k,(ik−11,...,ik−1j ) ; πk , 0 < i < k − 1, j ≤ 2i , π1 ∈ T,, where πi is the cortege of vertices from X k−1 with non trivial states which realize permutation with distance 2(k − 1). In other word if element πi ∈ T then β0;...;i,(ii1,...,iij );πi = πi α0;...;i,(ii1,...,iij ) . From it follows β0;1,(i11 ,i12 );...;m,(im1 ,...,imj ;πm ) |X [k−1] = ′ α0;1,(i11 ,i12 );...,m,(im1 ,...,imj ) ∈ Sα . Note, that automorphisms from system Sβ∗ (k − 1) generate on truncated rooted tree [4] k−1 (i) X [k−1] group hSβ∗ (k − 1)i |X [k−1] ≃ ≀i=1 C2 ≃ Bk . Theorem 3. Any element of type T can not be expressed by elements of Sβ∗ (k − 1). Proof. It is necessary to express an automorphism θ of type T express such automorphism which has zero indexes of X 0 , ..., X k−2, this conclusion follows from structure of elements from T. It means that word w from letters of Sβ∗ (k − 1) such that w = θ is trivial in group Bk , that arise on restriction of hSβ∗ (k − 1)i on X [k−1] , as well restriction Gk |X [k−1] ≃ Bk . Every relation from Bk can be expressed as a product of words from the normal closure Bk R of the set of constitutive relations of the group Bk [11]. But defined relations ri of Bk have form of commutators [9, 2] so the number of inclusions of every multiplier is even and (j) as follows from lemma 6 that ri |[X k ] ∈ / T. Really in wreath product ≀kj=1C2 ≃ Bk−1 holds m −i j −j i a constitutive relations αi2 = e and [αm , αm αik α m ] = e, i 6= j, where n, k, m α in αm (j) k are number of groups in ≀j=1Cl (m < n, m < k) [2, 9], where αin , αin , αm , αik are ′ i −i j −j βin ,π βm , βm βik ,π βm ] , i 6= j that generators of the Bk−1 from Sα . So it give us a word [βm could be an automorphism θ but does not belongs to T because the word has structure of commutator or belongs to normal closure RBk−1 so has logarithm 0 by every element, where βin , βm , βik , βin ,π are generators of Gk from Sβ∗ (k − 1). Let β1,1,(i11 ,i12 ),...,i,(ii1 ,...,ii2i );πi is arbitrary element of type C, where πi – cortege of vertexes from X k−1 with non trivial states which realize permutation with distance 2(k − 1). The case where θ = βk−1;πi ∈ T can be expressed by multiplying arbitrary β1,(i11,12 ),...,i,(ii1 ,...,ii2i );πi −1 on β1,(i means that such system has rank more then k − 1 what is 11,12 ),...,i,(ii1 ,...,ii2i ) contradiction. Really if β1,(i11,12 ),...,i,(ii1 ,...,ii2i ) and β1,(i11,12 ),...,i,(ii1 ,...,ii2i );πi ∈ Sβ∗ then β1,(i11,12 ),...,i,(ii1 ,...,ii2i ) |X [k−1] = β1,(i11,12 ),...,i,(ii1 ,...,ii2i );πi |X [k−1] i.e. these elements are mutually inverse at restriction on X [k−1] , but it means that in restriction Sβ∗ (k − 1) on X [k−1] ′ that corresponds to the generating system Sα (k − 1) for AutX [k−1] ≃ Bk−1 we use two equal generators. So it has at least k generators, because rank of AutX [k−1] is equal to k − 1 according to lemma 1. −1 The subcase of this case where β1,(i can be expressed from Sβ∗ (k − 1) as 11 ,i12 ),...,l,(il1 ,...,il2i ) a product of its generators has the same conclusion. Really if we can generate arbitrary element from Bk by generators from Sβ∗ (k −1) then k −1 generators is contained in system Sβ∗ (k − 1) but we have a further β1,(i11 ,i12 ),...,i,(ii1 ,...,ii2i );π . In other words if arbitrary element 9 β1,(i11 ,i12 ),...,l,(il1 ,...,il2i ) of the Bk−1 does not contains in Sβ∗ (k − 1) but can be expressed from it then Sβ∗ (k − 1) has at least k − 1 elements exclusive of β1,(i11 ,i12 ),...,i,(ii1 ,...,ii2i );π then its rank at least k.  ′ Corollary 4. A necessary and sufficient condition of expressing an element τ from Sβ is ′ existing of pair: βim ;τ , βim in hSβ i. So rank of a generating system of Gk which contains ′ Sβ is at least k. Proof. Proof can be obtained from Lemma 7 and Lemma 3 from which we have that i −i j −j element of type T cannot be expressed from [βm βin .τ βm , βm βik .τ βm ] = e, i 6= j because such word has even number of elements from C. Sufficient condition follows from formula = τ.  βim ;τ βi−1 m ′ Lemma 8. A generating system of Gk contains Sα and has at least k − 1 generators. Proof. The subgroup Bk−1 < Gk is isomorphic to AutX k−1 that has a minimal system of generators of k − 1 elements [5]. Moreover, the subgroup Bk−1 ≃ Gk /Wk−1 , because Gk ≃ Bk−1 ⋉ Wk−1 , where Wk−1 ⊲ Gk . As it is well known that if H ⊳ G then rk(G) ≥ rk(H), because all generators of Gk may belongs to different quotient classes [6].  As a corollary of last lemma and lemma 7 we see that generating system of rank k − 1 does not exist. Statment 2. Frattini subgroup φ(Gk ) = Gk 2 ·[Gk , Gk ] = Gk 2 acts by all even permutations on X l , 0 ≤ l < k − 1 and by all even permutations on X k except for those from T. Proof. Index of the automorphism α2 , α ∈ Sβ on X l is always even. Really the parity of the number of vertex permutations at X l in the product (αi αj )2 , αi , αj ∈ Sα , i, j < k is determined exceptionally by the parity of the numbers of active states at X l in α and β (independently of the action of v.p. from the higher levels). On X k−1 group G2 contains all automorphisms of form τ1i , i ≤ 2k−1 which can be generated in such way (αk−2 τ12 )2 = τ1234 , τ12 τ1234 = τ34 , (αk−i τ12 )2 = τ1,2,1+2k−i ,2+2k−i then τ1,2,1+2k−i ,2+2k−i τ12 = τ1+2k−i ,2+2k−i . In such way we get set of form τ12 , τ23 , , τ34 , ..., τ2k−1 −1,2k−1 . This set is the base for Wk−1 . The parity of the number of vertex permutations at X l in the product αi or αi αj , αi , αj ∈ Sα ) is determined exceptionally by the parity of the numbers of active states at X l in α and β (independently of the action of v.p. from the higher levels). Thus [α, β] = αβα−1 β −1 has an even number of v. p. at each level. Therefore, the commutators of the generators from Sα and elements from G2 generate only the permutations with even number of v. p. at each X l , (0 ≤ l ≤ k − 2). Let us consider (α0 αl )2 = βl(1,2l−1 +1) . Conjugation by the element β1(1,2) (or βi(1,2) , 0 < i < l) give us ability to express arbitrary coordinate x : 1 ≤ x ≤ 2l−1 where x = 2k−1 − i, i.e. from the element βl(1,2l−1 +1) we can express βl(x,2l−1 +1) . For instance x = 2j−1 + 1, j < l: βl−j(1,2) βl(1,2l−1 +1) βl−j(1,2) = βl(2j−1 +1,2l−1 +1) . If x = 2l−j + 2 than to realize every shift on x on set X l the element βl(1,2l−1 +1) should to be conjugated by such elements βl−j(1,2) βl−1(1,2) . So in such way can be realized every βl(x,2l−1 +1) and analogously every βl(2l−1 ,y) and βl(x,y) . Hence we can express from elements of G2 every even number of active states on X l .  10 Define the subgroup G(l) < AutX [k] , where l ≤ k, as StabAutX [k] (l) |X l . Let us construct 2l P a homomorphism from G(l) to C2 in the following way: ϕ(α) = sli (α) mod 2. Note i=1 that ϕ(α · β) = ϕ(α) ◦ ϕ(β) = ( 2l P sli (α) + i=1 2l P sli (β))mod2. i=1 k Structure of subgroup G2k Gk ′ ⊳ ≀ S2 ≃ AutX [k] can be described in next way. This 1 subgroup contains the commutant – G′k so it has on each X l , 0 ≤ l < k − 1 all even indexes that can exists there. On X k−1 it does not exist v.p. of type T, which has the distance 2k − 2, rest of even the indexes are present on X k−1 . It’s so, because the sets of elements of types T and C are not closed under operation of calculating the even power as it proved in Lemma 6. Thus, the squares of the elements don’t belong to T and C (because they have the distance, which is less than 2k − 2). This implies the following corollary. Corollary 5. A quotient group Gk /G2 G′ is isomorphic to C2 × C2 × ... × C2 . | {z } k k k ′ ′ Proof. The proof is based on two facts G2k Gk ≃ G2k ⊳ Gk and G : G2k Gk = 2k . Construct 2l P a homomorphism from Gk (l) to C2 in the following way: ϕ(α) = sli (α) mod 2. Note i=1 that ϕ(α · β) = ϕ(α) ◦ ϕ(β) = ( 2l P sli (α) + i=1 2l P sli (β))mod2, where α, β ∈ AutX [n] . Index i=1 of α ∈ G2k on X l , l < k − 1 is even but index of β ∈ Gk on X l can be both even and odd. Note that Gk (l) is abelian group and G2k (l) E Gk . Since words with equal logarithms to all bases [8] belong to distinct cosets of the commutator, the subgroup G2k (l) is the kernel of this mapping. Also we can use homomorphism ϕ which is described above and denote it as ϕl , to map Gk (l) to C2 the ker ϕl = G2k (l). Really if α from Gk (l) has odd number of active states on X l , l < k − 1 than ϕi (α) = 1 in C2 otherwise if this number is even than α from ker ϕi so ϕi (α) = 0 hence ker ϕi = G2k (l). So Gk (l) /G2k (l) = C2 analogously Bk (l) /Bk2 (l) = C2 . Let us check that mapping (ϕ0 , ϕ1 , ..., ϕk−2, φk−1 ) is the homomorphism from Gk to C2 × C2 × ... × C2 . So we can construct and homomorphism {z } | k−1 ϕi from every factor Gk (i) /G2k (i) of this direct product to C2 . The group Gk /G2k is elementary abelian 2-group because g 2 = e, g ∈ G. Index subgroup ϕ(α · β) = (ϕ(α) + ϕ(β)) mod 2 because multiplilcation α · β in Gk does not change a parity of index of β, β ∈ Gk on X l . Really action of element of active group A = S2 ≀ S2 ≀ ... ≀ S2 from wreath power | {z } l−1 (S2 ≀ S2 ≀ ... ≀ S2 )≀S2 on element from passive subgroup S2 of second multiplier from product {z } | l−1 gf, g, f ∈ (S2 ≀ S2 ≀ ... ≀ S2 ) ≀ S2 does not change a parity of index of β on X l , if index of β | {z } l−1 was even then under action it stands to be even and the sum ϕ(α) mod 2 + ϕ(β) mod 2 will be equal to (ϕ(α) + ϕ(β)) mod 2, hence it does not change a ϕ(β). Since words with 11 equal logarithms to all bases [8] belong to distinct cosets of the commutator, the subgroup G2k (l) is the kernel of this mapping. Let us define the permutations of the type 2 that act on X1 and X2 , where X1 = {vk,1 , ..., vk,2k−1 }, X2 = {vk,2k−1 +1 , ..., vk,2k }, X1 ∪ X2 = X k only by even permutations. Subgroup G2k G′ k acts only by permutations of type 2 on X1 , X2 , according to Statement 2. The restriction G2k |X [k−1] acts only by permutations of the second type (elements of it form a normal subgroup in Gk ) by parity of permutation on sets X1 and X2 . A permutation of Type 1, where on X1 and X2 the group Gk can acts by odd as well as by even permutations but in such way to resulting permutation on X k is always even. The number of active states from subgroup Gk (k − 1) on X k−1 can be even as well as odd. It means that on set of vertices of X k−1 over X1 i.e. vertices which are connected by edges with vertices of X k−1 over X1 automorphism of Gk can contains odd number of active states (and X2 analogously). For subgroup Gk (k − 1) it was constructed a homomorphism onto C2 as a sum of non-trivial states by mod 2 on both sets X1 and X2 . For subgroup Gk (k − 1) we construct a homomorphism onto C2 as a sum of nontrivial v.p. by mod 2 on both sets X1 and X2 . For a subgroup G(k − 1) such that has the normal subgroup Gk 2 (k − 1)⊳Gk (k − 1) we construct a homomorphism: φk−1 (Gk (Xk )) → C2 ≃ Gk (k − 1)/G2k (k−1) as product of sum by mod2 of active states (sk−1,i ∈ {0, 1}, k−2 2P k−2 sk−1,i (α)(mod 0<j≤2 if sij ∈ X1 ) on each set X1 and X2 : φα (X1 ) · φα (X2 ) = i=1 2) · k−1 2P sk−1,i (α)(mod2). Where sk−1,i (α) = 1 if there is active state in vk−1,i , i < i=2k−2 +1 k−1 2 + 1 and sk−1,i (α) = 0 if there is no active state. It follows from structure of Gk that ′ φα (X1 ) = φα (X2 ) so it is 0 or 1. But G2k Gk admits only permutations of Type 2 on X k so G2k Gk ′ (Xk ) ⊳ Gk (Xk ) because it holds a conjugacy and it is kernel of map from Gk (Xk ) onto C2 . Hence for a subgroup G(k −1) such that has the normal subgroup Gk 2 (k −1)⊳Gk (k −1) it was constructed a homomorphism: φk−1 (Gk (k − 1)) → C2 ≃ Gk (k − 1)/G2k (k−1) as product of sum by mod2 of active states from X1 and X2 . As the result we have Gk /G2k ≃  C2 × C2 × ... × C2 . {z } | k−1 Considering that it was proved in Theorem 1 and Theorem 2 that Gk ≃ A2k we can formulate next Corollary. Corollary 6. The group A2k has minimal system of generators from k elements. ′ Proof. Since quotient group of Gk by subgroup of Frattini G2k Gk has minimal system of generators from k elements because Gk /G2 G′ is isomorphic to linear p-space (p = 2) of k k dimension k (or elementary abelian group) then Gk has rank k [12].  Main Theorem. The set Sβ = {β0 , β1 , β2 , . . . , βk−2 , τ }, where βi = αi , is a minimal generating system for a group Gk that is isomorphic to Sylow 2-subgroup of A2k . 12 We have isomorphism of Gk and Syl2 (A2k ) from Theorem 2, the minimality of Sβ following from Lemma 7 which said that Sβ has to contain an element of type T, Theorem 3 and Lemma 8 about minimal rank. Another way to prove the minimality of Sβ is given to us by Corollary 5 about quotient by Frattini subgroup. For example a minimal system of generators for Syl2 (A8 ) can be constructed by following way, for convenience let us consider the next system: 1 • · · τ β1 1• · · 1• · · · β0 1• · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Consequently, in such way we construct second generating system for A2k of k elements that is less than in [3], and this system is minimal. 3. Structure and propeties of Syl2An The structure of Syl2 A12 is the same as of the subgroup H12 < Syl2(S8 ) × Syl2(S4 ), for which [Syl2(S8 ) × Syl2 (S4 ) : H12 ] = 2. |Syl2 (A12 )| = 2[12/2]+[12/4]+[12/8]−1 = 29 . Also |Syl2(S8 )| = 27 , |Syl2(S4 )| = 23 , so |Syl2(S8 ) × Syl2(S4 )| = 210 and |H12 | = 29 , because its index in Syl2(S8 ) × Syl2(S4 ) is 2. The structure of Syl2(A6 ) is the same as of H6 < Syl2(S4 ) × (C2 ). Here H6 = {(g, hg )|g ∈ Syl2 (S4 ), hg ∈ C2 }, where ( hg = e, if g|L2 ∈ Syl2(A6 ), (1) hg = (5, 6), if g|L2 ∈ Syl2 (S6 ) \ Syl2 (A6 ), The structure of Syl2(A6 ) is the same as subgroup H6 : H6 < Syl2(S4 ) × (C2 ) where H6 = {(g, h)|g ∈ Syl2 (S4 ), h ∈ AutX}. So last bijection determined by (1) giving us Syl2A6 ≃ Syl2S4 . As a corollary we have Syl2 A2k +2 ≃ Syl2S2k . The structure of Syl2(A7 ) is the same as of the subgroup H7 : H7 < Syl2 (S4 )×S2 where H6 = {(g, h)|g ∈ Syl2(S4 ), h ∈ S2 } and h depends of g: ( hg = e, if g|L2 ∈ Syl2 A7 , (2) hg = (i, j), i, j ∈ {5, 6, 7}, if g|L2 ∈ Syl2 S7 \ Syl2A7 . The generators of the group H7 have the form (g, h), g ∈ Syl2(S4 ), h ∈ C2 , namely: {β0 ; β1 , τ } ∪ {(5, 6)}. An element hg can’t be a product of two transpositions of the set: (i, j), (j, k), (i, k), where i, j, k ∈ {5, 6, 7}, because (i, j)(j, k) = (i, k, j) but ord(i, k, j) = 3, so such element doesn’t belong to 2-subgroup. In general elements of Syl2 A4k+3 have the structure (2), where hg = (i, j), i, j ∈ {4k + 1, 4k + 2, 4k + 3} and g ∈ Syl2 S4k . Also |Syl2(S8 )| = 27 , |Syl2(S4 )| = 23 , so |Syl2(S8 ) × Syl2(S4 )| = 210 and |H12 | = 29 , because its index in Syl2(S8 ) × Syl2 (S4 ) is 2. The structure of Syl2(A6 ) is the same as of H6 < Syl2 (S4 ) × (C2 ). Here H6 = {(g, hg )|g ∈ Syl2(S4 ), hg ∈ C2 }. 13 The orders of this groups are equal, really |Syl2(A7 )| = 2[7/2]+[7/4]−1 = 23 = |H7 |. In case g|L2 ∈ S7 \ A7 we have C32 ways to construct one transposition that is direct factor in H which complete Syl2S4 to H7 by one transposition : {(5, 6); (6, 7); (5, 7)}. The structure of Syl2(A2k +2l ) (k > l) is the same as of the subgroup H2k +2l < Syl2(S2k ) × Syl2(S2l ), for which [Syl2(S2k ) × Syl2 (S2l ) : H] = 2. |Syl2(A2k +2l )| = k l k l 2[(2 +2 )!/2]+[(2 +2 )!/4]+....−1. Here H = {(g, hg )|g ∈ Syl2 (S2k ), hg ∈ Syl2(S2l }, where (3) ( h ∈ A2l , if g|X k−1 ∈ A2k , h : h|X 2 ∈ Syl2(S2l ) \ Syl2(A2l ), if g|X k ∈ Syl2(S2k ) \ Syl2(A2k ). The generators of the group H7 have the form (g, h), g ∈ Syl2(S4 ), h ∈ C2 , namely: β0 ; β1 , τ ∪ (5, 6).  I.e. for element βσ (2i − 1) = 2σ(i) − 1, βσ (2i) = 2σ(i), σi ∈ 1, 2, ..., 2k−1 . Property 1. Relation between structures of Sylow subgroups is given by Syl2(A4k+2 ) ≃ Syl2(S4k ), where k ∈ N. Proof. Here H6 = {(g, hg )|g ∈ Syl2(S4 ), hg ∈ C2 }, where (4) ( hg = e, if g|Lk ∈ Syl2 (A4k+2 ), hg = (4k + 1, 4k + 2), if g|Lk ∈ Syl2(S4k+2 ) \ Syl2 (A4k+2 ), The structure of Syl2 (A6 ) is the same as subgroup H6 : H6 < Syl2(S4 ) × (C2 ) where H6 = {(g, h)|g ∈ Syl2 (S4 ), h ∈ AutX}. So last bijection determined by (4) give us Syl2A6 ≃ Syl2S4 . As a corollary we have Syl2A2k +2 ≃ Syl2S2k .  Property 2. Relation between orders of Sylows subgroup for n = 4k − 2 and n = 4k is given by |Syl2 (A4k−2 )| = 2i |Syl2(A4k )|, where value i depend only of power of 2 in decomposition of prime number of k. , therefore |A4k | = Proof. Really |A4k−2 | = (4k−2)! 2 mines only by k and isn’t bounded. (4k−2)! (4k 2 − 1)4k, it means that i deter Lemma 9. If n = 4k + 2, then the group Syl2 (An ) is isomorphic to Syl2(S4k ). Proof. Bijection correspondence between set of elements of Syl2(An ) and Syl2(S4k ) we have from (4). Let’s consider a mapping φ : Syl2(S4k ) → Syl2 (A4k+2 ) if σ ∈ Syl2 (S4k ) then φ(σ) = σ ◦ (4k + 1, 4k + 2)χ(σ) = (σ, (4k + 1, 4k + 2)χ(σ) ), where χ(σ) is number of transposition in σ by module 2. So φ(σ) ∈ Syl2 (A4k+2 ). If φ(σ) ∈ An then χ(σ) = 0, so φ(σ) ∈ Syl2 (An−1 ). Check that φ is homomorphism. Assume that σ1 ∈ Syl2(S4k \A4k ), σ2 ∈ Syl2(A4k ), then φ(σ1 )φ(σ2 ) = (σ1 , hχ(σ1 ) )(σ2 , e) = (σ1 σ2 , h) = σ1 σ2 ◦ (4k + 1, 4k + 2), where (σi , h) = σi ◦ hχ(σi ) ∈ Syl2(A4k+2 ). If σ1 , σ2 ∈ S2k \A2k , then φ(σ1 )φ(σ2 ) = (σ1 , hχ(σ1 ) )(σ2 , hχ(σ2 ) ) = (σ1 σ2 , e) = (a, e), where σ1 σ2 = a ∈ A4k+2 . So it is isomorphism.  14 Remark 2. If n = 4k, then index Syl2(An+3 ) in An+3 is equal to [S4k+1 : Syl2 (A4k+1 )](2k + 1)(4k +3), index Syl2(An+1 ) in An+1 as a subgroup of index 2m−1 , where m is the maximal natural number, for which 4k! is divisible by 2m . Proof. For Syl2(An+3 ) its order equal to maximal power of 2 which divide (4k + 3)! this power on 1 grater then correspondent power in (4k + 1)! because (4k + 3)! = (4k + 1)!(4k + 2)(4k + 3) = (4k + 1)!2(2k + 1)(4k + 3) so | Syl2An+3 |= 2m · 2 = 2m+1 . As a result of it indexes of An+3 and An+1 are following: [S4k+1 : Syl2(A4k+1 )] = (4k+1)! and 2m (4k+1)! [S4k+3 : Syl2(A4k+3 )] = [S4k+1 : Syl2 (A4k+1 )](2k + 1)(4k + 3) = 2m (2k + 1)(4k + 3).  Remark 3. If n = 2k then [Syl2 (An ) : Syl2(Sn−1 )] = 2m−1 , where m is the maximal power of 2 in factorization of n. Proof. |Syl2(Sn−1 )| is equal to t that is a maximal power of 2 in (n − 1)!. |Syl2(An )| is equal to maximal power of 2 in (n!/2). Since n = 2k then (n/2)! = (n − 1)! n2 and 2f is equal to product maximal power of 2 in (n − 1)! on maximal power of 2 in m−1 |Syl2 (An )| n . Therefore |Syl = 2 2t 2t = 2m−1 . Note that for odd m = n − 1 the group 2 2 (Sn−1 )| Syl2(Sm ) ≃ Syl2 (Sm−1 ) i.e. Syl2(Sn−1 ) ≃ Syl2(Sn−2 ). The group Syl2(Sn−2 ) contains the automorphism of correspondent binary subtree with last level X n−2 and this automorphism realizes the permutation σ on X n−2 . For every σ ∈ Syl2(Sn−2 ) let us set in correspondence a permutation σ(n − 1, n)χ(σ) ∈ Syl2(An ), where χ(σ) – number of transposition in σ by mod 2, so it is bijection φ(σ) 7−→ σ(n − 1, n)χ(σ) which has property of homomorphism, see Lemma 9. Thus we prove that Syl2(Sn−1 ) ֒→ Syl2(An ) and its index is 2d−1 .  Remark 4. The ratio of |Syl2(A4k+3 )| and |Syl2(A4k+1 )| is equal to 2 and ratio of indexes [A4k+3 : Syl2(A4k+3 )] and [A4k+1 : Syl2 (A4k+1 )] is equal (2k + 1)(4k + 3). Proof. The ratio |Syl2 (A4k+3 )| : |Syl2(A4k+1 )| = 2 holds because formula of Legendere gives us new one power of 2 in (4k + 3)! in compering with (4k + 1)!. Second part of statement follows from theorem about p-subgroup of H, [G : H] 6= kp then one of p-subgroups of H is Sylow p-group of G. In this case p = 2 but |Syl2(A4k+3 )| : |Syl2 (A4k+1 )| = 2 so we have to divide ratio of indexes on 2.  Let us consider function of Morse [13] f : D 2 → R that painted at pict. 2 and graph of Kronrod-Reeb [14] which obtained by contraction every set’s component of level of f −1 (c) in point. Group of automorphism of this graph is isomorphic to Syl2S2k where k = 2 in general case we have regular binary rooted tree for arbitrary k ∈ N. According to investigations of [15] for D 2 we have that Syl2S2k > Gk ≃ Syl2A2k is quotient group of diffeomorphism group which stabilize function and isotopic to identity. Analogously to investigations of [14, 15, 16] there is short exact sequence 0 → Zm → π1 Of (f ) → G → 0, where G-group of automorphisms Reeb’s (Kronrod-Reeb) graph [14] and Of (f ) is orbit under action of diffeomorphism group, so it could be way to transfer it for a group Syl2(S2k ), where m in Zm is number of inner edges (vertices) in Reeb’s graph, in case for Syl2 S4 we have m = 3. 15 Picture 2. Higher half of projection of manifold from pic. 2 can be determed by product of the quadratic forms −((x + 4)2 + y 2)((x + 3)2 + y 2 )((x − 3)2 + y 2)((x − 4)2 + y 2) = z in points (−4, 0)(−3, 0)(3, 0)(4, 0) it reach a maximum value 0. Generally there is −d21 d22 d23 d24 = z. Also from Statement 2 and corollary from it about (AutX [k] )′ can be deduced that derived length of Syl2Ak2 is not always equal to k as it was said in Lemma 3 of [1] because in case A2k if k = 2 its Syl2A4 ≃ K4 but K4 is abelian group so its derived length is 1. 4. Conclusion The proof of minimality of constructed generating set was done, also the description of the structure Syl2A2k , Syl2An and its property was founded. References [1] U. Dmitruk, V. Suschansky Structure of 2-sylow subgroup of symmetric and alternating group. UMJ. 3 (1981) 304-312 P. [2] R. Skuratovskii Generators and relations for sylows р-subgroup of group Sn . Naukovi Visti KPI. 4 (2013) 94 -105 P. [3] V. Ivanchenko System of generators for 2-sylow subgroup alternating group, Four ukraine conference of young scientists. Kiev: KPI (2015, (http://matan.kpi.ua/uk/ysmp4conf.html)), 60 P. [4] Nekrashevych V. Self-similar groups. International University Bremen. American Mathematical Society. Monographs. Volume 117. 230 p. [5] R.I. Grigorchuk, Solved and unsolved problems around one group. Infinite Groups: Geometric, Combinatorial and Dynamical Aspects. Вasel2005. Progress Math., vol 248. pp. 117-218. [6] V. Magnus, A. Karras, D. Soliter Combinatorial Group Theory: Presentations of Groups in Terms of Generators and Relations. – M.: Science, 1974. 453 p. [7] V.S. Sikora, В.I. Suschanskii Operations on groups of permutations. Chernivci: Ruta, 2003. 256 p. [8] M. I. Kargapolov, J. I. Merzljakov Fundamentals of the Theory of Groups Springer. Softcover reprint of the original 1st ed. 1979 edition. Springer. 1st ed. 1979. 312 p. [9] Y.A. Drozd, R.V. Skuratovskii "Generators and and relations for wreath products of groups". Ukr. matem. zhurn. - 60, No. 7. - 2008. 997-999 P. [10] Louis Weisner "On the Sylow Subgroups of the Symmetric and Alternating Groups". American Journal of Mathematics Vol. 47, No. 2 (Apr., 1925), 121-124 P. [11] Oleg Bogopolski An Introduction to the Theory of Groups. European Mathematical Society, 2008. — 189 p. [12] J. J. Rotman An introduction to the Theory of Groups. New Yourk. Springer 1995 – XV. 513 p. [13] V. V. Sharko Smooth topological equivalence of functions of surfaces. Ukrainian Mathematical Journal, 5 (2003), 687-700 P. (in Russian). 16 [14] S. I. Maksymenko Homotopy types of stabilizers and orbits of Morse functions on surfaces. Annals of Global Analysis and Geometry, vol. 29, no. 3 (2006), 241-285 P. [15] S. I. Maksymenko Path-components of Morse mappings space Some problems of contemporary mathematics. Proceedings of Intsitute of Mathematics of Ukrainian NAS, vol. 25, (1998), 135-153 P. [16] Skuratovskii R. Minimal generating systems and properties of Syl2 A2k and Syl2 An . X International Algebraic Conference in Odessa dedicated to the 70th anniversary of Yu. A. Drozd, p. 104.
4math.GR
1 On the extraction of instantaneous frequencies from ridges in time-frequency representations of signals arXiv:1310.7276v3 [cs.CE] 27 Sep 2015 D. Iatsenko, P. V. E. McClintock, A. Stefanovska Abstract—The extraction of oscillatory components and their properties from different time-frequency representations, such as windowed Fourier transform and wavelet transform, is an important topic in signal processing. The first step in this procedure is to find an appropriate ridge curve: a sequence of amplitude peak positions (ridge points), corresponding to the component of interest. This is not a trivial issue, and the optimal method for extraction is still not settled or agreed. We discuss and develop procedures that can be used for this task and compare their performance on both simulated and real data. In particular, we propose a method which, in contrast to many other approaches, is highly adaptive so that it does not need any parameter adjustment for the signal to be analysed. Being based on dynamic path optimization and fixed point iteration, the method is very fast, and its superior accuracy is also demonstrated. In addition, we investigate the advantages and drawbacks that synchrosqueezing offers in relation to curve extraction. The codes used in this work are freely available for download. Index Terms—ridge analysis, wavelet ridges, time-frequency representations, wavelet transform, windowed Fourier transform, instantaneous frequency, synchrosqueezing I. I NTRODUCTION Separation of amplitude and frequency-modulated components (AM/FM components) in a given signal, and estimation of their instantaneous characteristics, is a classical problem of signal analysis. It can be approached by projecting the signal onto the time-frequency plane, on which the changes of its spectral content can be followed in time. Such projections are called time-frequency representations (TFRs), with their typical examples being the windowed Fourier transform (WFT) and the wavelet transform (WT). If the construction of the TFR is well-matched to the signal’s structure, then each AM/FM component will appear as a “curve” in the time-frequency plane, formed by a unique sequence of TFR amplitude peaks – ridge points. Based on properties of these curves, one can estimate the time-varying characteristics of the corresponding components (such as amplitude, phase and instantaneous frequency), an idea that was first expressed in [1] (for a discussion of different reconstruction methods and their performance, see [2]). However, to estimate the parameters of the component in this way, one first needs to extract its associated ridge curve, i.e. find the corresponding peak sequence. This is not a trivial issue, since in real cases there are often many peaks in the TFR amplitude at each time, and their number often varies. In such circumstances it can be unclear which peak corresponds to which component, and which are just noise-induced artifacts. In the present paper, we concentrate solely on the problem of the ridge curve identification, which is of great importance in time-frequency signal processing. Thus, ridge analysis is widely used for e.g. machine fault diagnosis [3], fringe pattern analysis [4], studies of cardiovascular dynamics [5] and system classification [6], [7]. Although curve extraction has been addressed explicitly in the past [8], [9], [5], [10], [11], there seems to be no agreement as to the optimal procedure to be used for this task. Here we discuss and generalize some existing algorithms, present new ones, and compare their performance. We end up with a method that is accurate and of universal applicability, so that it works well for a large class of signals and, in most cases, does not require adjustment by the user; this is the main contribution of the work. The effects of synchrosqueezing [12], [13], [11], [14] on curve extraction are also studied. The plan of the work is as follows. After reviewing the background and notation in Sec. II, we discuss different schemes for curve extraction in Sec. III. In Sec. IV we compare the performance of these schemes, while the advantages and drawbacks of synchrosqueezing in relation to curve extraction are studied in Sec. V, and the limitations of the proposed methods are discussed in Sec. VI. We draw conclusions and summarize the work in Sec. VII. A dynamic programming algorithm for fast optimization of a path functional of particular form over all possible peak sequences is discussed in the Appendix. II. BACKGROUND AND NOTATION In what follows, we denote by fˆ(ξ) and f + (t) the Fourier transform of the function f (t) and its positive frequency part, respectively: Z ∞ Z ∞ 1 fˆ(ξ)eiξt dξ, fˆ(ξ) = f (t)e−iξt dt ⇔ f (t) = 2π −∞ −∞ Z ∞ 1 f + (t) ≡ fˆ(ξ)eiξt dξ, 2π 0 (II.1) Next, by an AM/FM component (or simply component) we will mean a signal of the form: x(t) = A(t) cos φ(t) (∀t : A(t) > 0, φ0 (t) > 0), (II.2) iφ(t) which is additionally required to satisfy A(t)e ≈ 2[A(t)eiφ(t) ]+ , so that A(t) and φ(t) are determined uniquely and, in the case of a single component, can be found using the analytic signal approach; a more detailed discussion of issues related to the definition and estimation of the amplitude A(t), phase φ(t) and instantaneous frequency ν(t) ≡ φ0 (t) of the component can be found in [15], [16], [17], [18], [2]. In real cases, a signal usually contains many components xi (t) of the form (II.2), as well as some noise ζ(t) (that can be of any form, and is not necessarily white and Gaussian [18]): X s(t) = xi (t) + ζ(t), (II.3) concentrate on curve extraction only and, except where it is unavoidable, do not consider the reconstruction issues; for a detailed study of the latter, see [2]. Note that, in practice, it is convenient to find the ridge curve associated with the dominant component present, which can then be reconstructed and subtracted from the signal; the procedure can then be repeated to extract any other possible ridge curves. In what follows, we denote the ridge frequencies, i.e. positions of the peaks at each time, as νm (t), the corresponding TFR amplitudes as Qm (t), and their numbers as Np (t):  h i   ∂ω |Hs (ω, t)| = 0, h iω=νm (t) νm (t) :  (II.6) < 0,  ∂ω2 |Hs (ω, t)| i The goal of ridge analysis is to extract these components, either all or only those of interest, from the signal’s TFR. The two main linear TFRs suitable for components extraction and reconstruction are the windowed Fourier transform (WFT) Gs (ω, t) and the wavelet transform (WT) Ws (ω, t). Given a signal s(t), they can be constructed as Z ∞ Gs (ω, t) ≡ s+ (u)g(u − t)e−iω(u−t) du −∞ Z ∞ 1 eiξt ŝ(ξ)ĝ(ω − ξ)dξ, = 2π 0 Z ∞ (II.4)  ω(u − t)  ωdu Ws (ω, t) ≡ s+ (u)ψ ∗ ωψ ωψ −∞ Z ∞ 1 = eiξt ŝ(ξ)ψ̂ ∗ (ωψ ξ/ω)dξ, 2π 0 ω=νm (t) Qm (t) ≡ |Hs (νm (t), t)|, where Hs (ω, t) is the chosen TFR of a given signal (WFT Gs (ω, t) or WT Ws (ω, t)). The ridge curve can then be parametrized as ωp (t) = νmc (t) (t), where mc (t) is the sequence of selected peak indices at each time t, which we need to find. Note that the number of peaks Np (t) can vary in time and in practice is often greater than the number of components present in the signal, with the additional peaks being attributable e.g. to noise. For simplicity, we have treated ω and t as continuous variables. In practice, however, both time and frequency are discretized, and so also are many other related quantities (e.g. the ridge curve ωp (t) becomes a discrete set of points). In what follows we therefore assume that the signal is sampled at tn = (n − 1)∆t for n = 1, ..., N , so that N is the signal’s length in samples, while the TFRs (II.4) are calculated for the k−1 frequencies ωk = ωmin +(k−1)∆ω (WFT) or ωk = 2 nv ωmin (WT), where k = 1, ..., Nf . The discretization parameters ∆ω and nv are generally selected by the user, but one can use e.g. the criteria suggested in [2] to make an appropriate choice. where s+ (t) is the positive frequency part of the signal (as defined in (II.1)), g(t) and ψ(t) are respectively the window and wavelet functions chosen, and ωψ ≡ argmax |ψ̂(ξ)| denotes the wavelet peak frequency (for the WFT we assume argmax |ĝ(ξ)| = 0). Note that the WT is commonly defined through the scales a = ωψ /ω, but that in (II.4) we have already transformed to frequencies. The main difference between the two TFRs mentioned is that the WFT distinguishes the components on the basis of their frequency differences (linear frequency resolution), while the WT does so on the basis of ratios between their frequencies (logarithmic frequency resolution). In effect, while the timeresolution of the WFT is fixed, for the WT it is linearly proportional to frequency, so that the time-modulation of the higher frequency components is represented better than that for the components at lower frequencies. In numerical simulations we use a Gaussian window for the WFT and a lognormal wavelet for the WT: 2 ĝ(ξ) = e−(f0 ξ) /2 ⇔ g(t) = √ ψ̂(ξ) = e−(2πf0 log ξ) 2 /2 , −1 2 1 e−(f0 t) /2 , 2πf0 m = 1, ..., Np (t), III. C URVE EXTRACTION SCHEMES The most straightforward way to extract the ridge curve is to first choose some starting point ωp (t0 ), and then follow from it forward and backward in time, selecting next ridges as those maximizing some suitably chosen functional of the corresponding peak amplitudes and the previously selected ridges. This approach, which we will call one-step optimization, can be formulated mathematically as (II.5) ωψ = 1, where f0 is the resolution parameter determining the tradeoff between time and frequency resolution of the resultant transform (we use f0 = 1 by default). While the methods developed below are generally applicable for any window/wavelet, the forms (II.5) seem to be the best choice [2], at least for the extraction and reconstruction of components. As illustrated in Fig. 1, the components present in the signal appear in its TFR as “curves” (which will be referred to as ridge curves), i.e. time sequences of close peaks. The problem of curve extraction therefore lies in selecting from among all possible trajectories the sequence of peaks that corresponds to a single component; the positions of these peaks then form a specific frequency profile, which will be denoted as ωp (t). Having found the ridge curve, the parameters of the corresponding component can be estimated in a number of ways [2], [19], [12]. In the present work, however, we for n = n0 + 1, . . . , N do: n  mc (tn ) = argmax F tn , Qm (tn ), νm (tn ), m o ωp (tn−1 ), ωp (tn−2 ), . . . , ωp (tn0 ) ωp (tn ) = νmc (tn ) (tn ), (III.1) and similarly backwards in time, for n = n0 −1, n0 −2, . . . , 1. In (III.1), n0 denotes the discrete index of the starting time t0 (for which ωp (tn0 ) is known), and the F ... is the chosen functional of the current discrete time tn , the peak positions νm (tn ) and amplitudes Qm (tn ) at this time, and all previously selected ridge points {ωp (tn0 ≤ t ≤ tn−1 )}. For scheme 2   Fig. 1. Windowed Fourier transforms (WFTs): (a) of the signal s(t) = 1+ 13 cos 2πt cos 2πt+6 sin 2πt +cos 2πt )+0.8 cos 2π×1.75t+0.5 sin 2πt ; 9 30 12 5 and (b) of the electrocardiogram (ECG) signal. Black lines show the ridge curves ωp (t), i.e. the sequence of the WFT amplitude peaks, corresponding to the dominant component in each case.   (III.1) to be O(N ), the functional F ... should either depend on the finite number of previously selected ridges, or on the set of parameters which can be updated in O(1) steps whenever new point becomes available (e.g. the moments of ωp (t)). To implement (III.1), one needs to choose the starting time index n0 and the corresponding ridge ωp (tn0 ). It seems natural to select this starting point (among all times and ridges) as being that for which the functional in (III.1) is likely to attain its maximum: ωp (tn0 ) =νm0 (tn0 ), n o {m0 , n0 } =argmax F0 [tn , Qm (tn ), νm (tn )] , {ωp (tn−i ), ..., ωp (tn−1 )} rather than the full history, then the optimal path in terms of (III.3) can be selected in O(N ) computations using dynamic programming algorithm (see Appendix). Note that, in this way, the widely-used method of Carmona et. al. [8] can also be performed in O(N ) steps instead of using the computationally-expensive simulated annealing, as previously. As will be seen, the path optimization (III.3) usually gives much better results than the one-step optimization (III.1), and should therefore always be preferred to the latter. Furthermore, it has no problem associated with the selection of the starting point (III.2), as all the trajectories are explored. What remains is to select an appropriate functional in (III.3). We consider below some curve-extraction schemes defined by particular classes of F [...]. We first develop these schemes for the WFT, and then discuss how they can be adjusted for the WT. In all cases, we perform path optimization using the algorithm discussed in the Appendix. Taking into account its complexity, and the fact that one needs to locate all peaks (II.6) in the TFR prior to applying any extraction procedure, the computational costs of the methods discussed below are O(Nf N )+O(Mp2 N ) (scheme I) and O(Nf N )+O(Mp2 N log N ) (scheme II), with log N corresponding to the number of iterations as discussed below; Nf and Mp ≡ maxt Np (t) are respectively the number of frequencies ωk for which the TFR is calculated, and the maximum number of TFR amplitude peaks present at any one time. Both Nf and Mp are independent of N . (III.2) {m,n} where F0 [...] denotes a “zero-step” version of the original functional, obtained from the latter by taking its maximum among all the other parameters. For example, if one has F [...] = f (Qm (tn ), νm (tn )) + g(νm (tn ) − ωp (tn−1 )), then F0 [...] = f (Qm (tn ), νm (tn )) + max∆ξ g(∆ξ); if additionally f (Qm (tn ), νm (tn )) does not depend on νm (tn ) and is proportional to Qm (tn ), then (III.2) will correspond to the highest TFR amplitude peak over all times. The criterion (III.2) works well in most cases, although it could still provide a “bad” starting point when the sharp time events are present or the noise is too strong. A serious drawback of the outlined one-step approach (III.1) is that even a single wrongly selected point might completely change all the following curve being extracted. Consequently, it is more accurate to optimize the functional not over each consecutive point, as in (III.1), but over the whole profile ωp (t), selecting the ridge curve as that which maximizes the full integral of F [...] over time: Remark III.1. Because in practice the frequency scale for the WFT/WT is discretized, the ridge frequencies νm (t) also take discrete values at each time. As a result, e.g. the differences between consecutive ridges ∆ωp (tn ) ≡ ωp (tn ) − ωp (tn−1 ) cannot reliably be calculated, being “quantized” in steps determined by the widths of the frequency bins. To avoid consequential problems, we use parabolic interpolation (based on the TFR amplitude at the corresponding peak and in the two adjacent bins) to find peak positions νm (t) more precisely. Because the TFR amplitudes take continuous values, the estimates of νm (t) (and therefore those of ∆ωp (t)) also become continuous. One then does not need to worry about the related discretization effects, which could otherwise influence significantly the performance of methods that are based on the {ωp (t1 ), ..., ωp (tN )} ={νmc (t1 ) (t1 ), ..., νmc (tN ) (tN )}, {mc (t1 ), ..., mc (tN )} = argmax N X  F tn , Qmn (tn ), {m1 ,m2 ,...,mN } n=1   νmn (tn ), νm1 (t1 ), ..., νmN (tN ) . (III.3) This approach, where the optimization is performed over all possible sequences of peak numbers {m1 , m2 , ..., mN }, will be referred to as the path optimization. In general, it is computationally very expensive. However, if the functional depends on only a finite number of previous points 3 For a Gaussian window (II.5) one obtains ∆ξg /∆τg = 1/f02 , and this result remains the same even if using as ∆ξg and ∆τg the conventional standard deviations of |ĝ(ξ)|2 and |g(t)|2 , respectively. With the choice (III.5), the parameter α is expected to be relatively universal, so that the same value should work well for different window functions. Note that, although in (III.5) we use w(r) e = −|r|, other functions can be utilized instead. However, for any reasonable choice, the method remains qualitatively the same, i.e. one expects it to suffer from the same drawbacks and to have similar issues. It is important to note, that scheme I corresponds to simple cases of “global maximum” and “nearest neighbour” curve extraction for α = 0 and α → ∞, respectively: • Global Maximum (α = 0). In this case the functional (III.4) reduces to F [...] = log Qm (tn ), so that the maximum peak will be selected at each time, taking no account of the previous ridge points. • Nearest Neighbour (α → ∞). This case differs for onestep optimization (III.1) and path optimization (III.3). The former approach corresponds to selecting at each new step the peak which is nearest to the previous one, taking no account of its amplitude. The latter approach will give simply the least frequency-varying curve (which is a rather pathological case). differences between ridge frequencies. A. Scheme I(α): penalization of frequency jumps A widespread approach is to penalize the frequency difference between the consecutive ridge points, so that   F ... = log Qm (tn ) + w(νm (tn ) − ωp (tn−1 ), α), (III.4) where w(∆ξ, α) is some weighting function, aimed at suppressing frequency jumps, and α is its set of adjustable parameters. Note that in (III.4) one can choose another function of Qm (tn ) instead of the logarithm, e.g. |Qm (tn )|2 ; however, the logarithm seems to be the most appropriate because, in this case, the path functional (III.3) depends on the product of all amplitudes and thus can be significantly influenced even by a single “wrong” point, making selection of the latter less probable. The class of functionals (III.4) is a very popular choice. Thus, the approach of [10] corresponds to w(∆ξ, α) = 0 for ∆ξ ∈ [−1/α, 1/α] and = −∞ otherwise, while the procedure used in [11], [18] utilizes the quadratic weights w(∆ξ, α) = α∆ξ 2 (though in these methods the optimization is carried out over all frequency bins ωk at each time rather than using only the peaks νm (t), as we do here). The algorithm of [5] also represents a variant of (III.4). Finally, the approach of Carmona et. al. [8] can be viewed as a modified version of (III.4) with additional penalization of the second order frequency differences. The main disadvantage of the approaches mentioned is that they require fine tuning of each method’s parameters to obtain an accurate result, with different choices being needed for different signals and different characteristics of the TFR in use. To make the parametrization more universal, the weighting function should utilize the resolution properties of the WFT, which are determined by the window function g(t). Thus, for a given window there exists a minimum frequency (resp. time) difference ∆ξg (resp. ∆τg ) for which two frequency events, e.g. tones (resp. time events, e.g. delta-peaks) can be resolved in the WFT. In other words, the larger ∆τg (smaller f0 in (II.5)) is, the less time-variability is allowed for the components (so one expects smaller frequency jumps). We therefore penalize the ratio of the observed timederivative of the ridge frequency difference to its characteristic value, which can naturally be taken as ∆ξg /∆τg . This leads to the choice  f |∆ξ|  fs |∆ξ| s = −α , (III.5) w(∆ξ, α) = αw e ∆ξg /∆τg ∆ξg /∆τg B. Scheme II(α,β): adaptive parametrization In the previous scheme, there is an adjustable parameter α that determines the suppression of the frequency variations. Although some choices (e.g. α = 1) appear to be relatively universal, they still remain highly non-adaptive, so that a particular parameter value might be suitable for one type of the signal, and a different value for another type. For example, in the case of chirps ∼ cos(at + bt2 ) it is clear that one should penalize not the frequency jumps, but their differences from the actual frequency growth rate. To make the scheme adaptive, the parameters of the functional should be matched to the properties of the component being extracted, such as the typical variations of its instantaneous frequency. The latter can be characterized by the averages and standard deviations of the ridge frequencies ωp (t) and their differences ∆ωp (tn ) ≡ ωp (tn )−ωp (tn−1 ); or, which appears to be more stable in practice, by the corresponding medians m[...] and 50% ranges s[...], defined for an arbitrary function f (t) as where fs is the signal sampling frequency, while ∆ξg and ∆τg are chosen resolution measures. We use those introduced in [2], taking ∆ξg and ∆τg as the widths of the regions in time and frequency encompassing 50% of the window function: m[f (t)] ≡ perc[f (t)], 0.5 s[f (t)] ≡ perc[f (t)] − perc[f (t)], 0.75 0.25 (III.7) where percp [f (t)] denotes the pth quantile of f (t). An adaptive functional can then be constructed by suppressing not the absolute frequency jumps, as before, but the relative deviations of the component’s ridge frequency and its derivative from their typical values:    F ... = log Qm (tn ) + w2 νm (tn ), m[ωp ], s[ωp ], β  + w1 νm (tn ) − ωp (tn−1 ), m[∆ωp ], s[∆ωp ], α . (III.8) ∆ξg = ξg(2) (0.5) − ξg(1) (0.5), ∆τg = τg(2) (0.5) − τg(1) (0.5); ξg(1,2) () : |Rg (ξ ≤ ξg(1) )| < /2, |1 − Rg (ξ ≥ ξg(2) )| < /2; τg(1,2) () : |Pg (τ ≤ τg(1) )| < /2, |1 − Pg (τ ≥ τg(2) )| < /2; Rω Rτ ĝ(ξ)dξ g(t)dt −∞ Rg (ω) ≡ R ∞ , Pg (τ ) ≡ R−∞ . ∞ ĝ(ξ)dξ g(t)dt −∞ −∞ (III.6) 4 needed is always relatively small, being proportional to log N ; it is determined primarily by the signal’s time length, while the sampling frequency only has a very minor effect. Note also that one can set some maximum number of allowed iterations if desired, though in our simulations the procedure always converged exactly and rapidly. As previously, we choose the first order penalization functions  ∆ξ − m[∆ωp ] , w1 ∆ξ, m[∆ωp ], s[∆ωp ], α = −α s[∆ωp ] (III.9)  ξ − m[ωp ] w2 ξ, m[ωp ], s[ωp ], β = −β . s[ωp ] By maximizing the path integral (III.3) based on the functional (III.8), one is in fact trying to extract the curve which is most consistent with itself. Thus, the strength of the respective frequency variations becomes not important, and it is only their agreement and similarity at different times that matters. Even the most adaptive method can be parametrized to tackle special cases, and in (III.8) we have introduced the adjustable parameters α and β controlling the strengths of suppression of the corresponding relative deviations. However, although there are now two parameters, they are in fact more universal than the single parameter of scheme I. Thus, the particular choice of α, β for scheme II is expected to work well for a larger class of signals than the particular choice of α in the scheme I, as will be seen below. This is because in (III.8) we take explicitly into account the actual properties of the component being extracted, penalizing deviations from its typical behavior rather than simply the frequency jumps. Additionally, by suppressing the relative deviations of the component’s frequency from its mean, scheme II stabilizes the curve in its characteristic frequency range (thus lowering the possibility that it will “escape” and switch to another component), while there is no such mechanism in scheme I. The functional (III.8) depends, however, on the whole timeevolution of ωp (t), so that the path optimization (III.3) cannot be performed in O(N ) steps, as before (see Appendix); nor is it evident how to update the functional at each step if using the one-step optimization (III.1). Nevertheless, one can approach the approximately optimal curve ωp (t) by use of a kind of fixed point iteration [20]. Thus, starting with some (0) initial guess ωp (t), one calculates the corresponding medians and ranges, fixes them in (III.8) (so that the functional now depends on only two consecutive ridges rather than on the full history, meaning that the algorithm discussed in Appendix (1) becomes applicable), and extracts the newer profile ωp (t) in the usual way. The (fixed) medians and ranges are then updated (1) to those of the ωp (t) and, based on these newer estimates, (2) the next approximation ωp (t) is found in the same manner. The procedure is repeated until the curves obtained in two (n) (n−1) consecutive iterations coincide perfectly (ωp (t) = ωp (t) for all t). For the first iteration, we use a simple Global (0) Maximum curve ωp (t) = argmaxω |Gs (ω, t)|. The convergence of the fixed-point algorithm outlined above is in general hard to prove. In practice, however, the procedure converges not only exactly (so that the next iterations produce absolutely identical curves), but also rapidly. To show this, we have analysed the performance of the method for white noise signals with different sampling frequencies and time lengths, thus trying to model the worst case (as the method will obviously converge faster if the signal contains some pronounced components). The results are presented in Supplementary Material (Fig. 1 there). The number of iterations C. Adjustments for the WT Due to the logarithmic frequency resolution of the WT, one should consider not the frequencies but their logarithms, which is the only significant difference from the WFT case. Thus, in the case of the WT one uses the same schemes and functionals, but now everything is taken on a logarithmic frequency scale (ωp (tn ) → log ωp (tn ), ∆ωp (tn ) ≡ ωp (tn ) − ωp (tn−1 ) → ∆ log ωp (tn ) ≡ log ωp (tn ) − log ωp (tn−1 ), and similarly for all the other frequency variables). We now summarize briefly the required adjustments. Scheme I: Instead of w(νm (tn ) − ωp (tn−1 ), α), in (III.4) one uses w(log νm (tn ) − log ωp (tn−1 ), α). The form of the penalization function (III.5) remains qualitatively the same:  f |∆ log ξ|  fs |∆ log ξ| s = −α , w(∆ log ξ, α) = αw e ∆ log ξψ /∆τψ ∆ log ξψ /∆τψ (III.10) but one now uses the wavelet’s characteristic log-frequency and time differences ∆ log ξψ and ∆τψ , respectively. We use the estimates given in [2], which are calculated as (2) ∆ log ξψ = log (1,2) ξψ ξψ (0.5) (1) ξψ (0.5) (2) (1) , ∆τψ = τψ (0.5) − τψ (0.5); (1) (2) (1) (2) () : |Rψ (ξ ≤ ξψ )| < /2, |1 − Rψ (ξ ≥ ξψ )| < /2; (1,2) () : |Pψ (τ ≤ τψ )| < /2, |1 − Pψ (τ ≥ τψ )| < /2; Rτ Rω ∗ ψ ∗ (t)eiωψ t dt ψ̂ (ξ)dξ/ξ 0 . , Pψ (τ ) ≡ R−∞ Rψ (ω) ≡ R ∞ ∞ ψ ∗ (t)eiωψ t dt ψ̂ ∗ (ξ)dξ/ξ −∞ 0 (III.11) Scheme II: In (III.8) the w1 (...) and w2 (...) are changed to w1 (log νm (tn ) − log ωp (tn−1 ), m[∆ log ωp ], s[∆ log ωp ]) and w2 (log νm (tn ), m[log ωp ], s[log ωp ]), respectively, with their basic forms (III.9) remaining the same. τψ IV. C OMPARISON OF SCHEMES A. Test signals We now test the relative performances of the different methods on two signals. The first signal is an AM/FM component with simple sinusoidal amplitude modulation and twosinusoidal frequency modulation, plus a weaker component: 1 2πt  2πt 2πt s1 (t) = 1 + cos cos 2πt + 6 sin + cos ) 3 9 30 12 2πt  + 0.8 cos 2π × 1.75t + 0.5 sin . 5 (IV.1) Note that, although an AM/FM component around 1 Hz is dominant in terms of both maximum amplitude and mean squared amplitude, there are certain times at which the amplitude of the other component (at around 1.75 Hz) becomes higher, thereby introducing additional complications for the 5 Fig. 2. WFTs of the same signals as in Fig. 1, but additionally corrupted by noise of the form (IV.2), with a standard deviation σ = 0.6 for the signal corresponding to (a), and σ = 0.3 for the signal corresponding to (b). The corresponding error f can then be defined as curve extraction. The second test signal is taken from real life, representing the central 200 s part of a 30 min electrocardiogram (ECG) signal recorded from a 30 years old male subject [5]. The WFTs for both signals are shown above in Fig. 1. 2f ≡ |η̂(ξ)| ∼ 1 . 4π 2 + ξ 2 (IV.3) where h...i denotes the time-average. An additional complication is that, because noise changes the ridge profile as it appears in the WFT, there always exists some deviation between the extracted profiles with and without noise, which is unrelated to performance of extraction method. Thus, the f (IV.3) contains both an irreducible, inherent, error related to the effect of noise on the TFR, and the error of the curve extraction method. Therefore, we only compare the performance of different methods, without aiming to find the profile as it would be without noise (which is generally impossible). In the simulations, both test signals are sampled at 20 Hz. We will test curve extraction only for the WFT, but the results remain qualitatively the same for the WT as well. To eliminate boundary distortions in the TFR, we simulate the first test signal (IV.1) for 1000 s, calculate the corresponding WFT and then use only its central 200 s part; the same procedure is applied for the ECG signal. We use a Gaussian window (II.5) with f0 = 1 and calculate the WFTs at frequencies ωk /2π = 0.25 + (k − 1)∆ω/2π ∈ [0.25, 2.25] (this range of frequencies is chosen based on a priori knowledge that all components of interest are contained in it) with ∆ω = ∆ξg /25 ≈ 2π ×0.008. For both signals, we use 40 noise realizations, which are the same for each method, parameters and noise intensities σ being tested. The main complications that arise in curve extraction relate to the appearance of other WFT amplitude peaks near ωp (t), which can be due either to noise or to other components. We model these complications by corrupting the signal with colored noise η(t) of unit deviation and a particular Fourier amplitude (while the phases of its Fourier coefficients are random): s(t) = s(t) + ση(t), h[ωp (t) − ω ep (t)]2 i , h[e ωp − he ωp i]2 i (IV.2) Being asymmetric, the noise amplitude at frequency 0.5 Hz is around 2.5 times higher than at 1.5 Hz, corrupting the dominant components (which have a mean frequency around 1 Hz in both test signals) unequally in frequency on the two sides. This gives an opportunity to study reliably the relative performance of the different methods, as colored noise can additionally model the effect of other components that are asymmetrically distributed in frequency around the component of interest. The WFTs of the two test signals corrupted with noise are presented in Fig. 2. It is well known that, even in the absence of noise, the ridge points are not located exactly at the true instantaneous frequencies ν(t) ≡ φ0 (t) [19], [2]. Thus, if we compare the ωp (t) obtained with the true frequency profile then, even in the case when the curve extraction works perfectly (e.g. when there is a single peak at each time, and hence only one possible ridge curve) there will be some discrepancy between the two. At the same time, what we want to test is how well the methods presented can identify the peak sequence corresponding to the component of interest, and not how well one can then reconstruct the component’s parameters from this sequence. Therefore, to assess the performance of the curve identification method, rather than the performance of the TFR itself or the accuracy with which frequencies are estimated from ridges, we compare the extracted ωp (t) with the “ideal” ridge curve ω ep (t) obtained in the noise-free case. Remark IV.1. Note that, for the first test signal (IV.1), if one extracts ωp (t) corresponding  to the weaker component 0.8 cos 2π ×1.75t+0.5 sin 2πt 5 , this can also be regarded as a not-bad result. However, we are mainly interested in testing the accuracy with which the parameters of the dominant component (around 1 Hz) can be recovered. Therefore, if the ridge profile ωp (t) extracted from the WFT of the first test signal lies closer to the frequency of the non-dominant component, we discard the corresponding peaks and re-extract the curve. This does not apply for the second test signal. B. Results Results of application of the different curve extraction schemes to the WFT of the first test signal (IV.1) are presented 6 Frequency (Hz) (a) εf (b) I(0) Frequency (Hz) εf I(10) I(1000) 1 0 0 100 Time (s) 200 0 1 0 100 Time (s) 200 0 2 0 100 Time (s) 200 0 1 2 0 100 Time (s) 200 1 2 4 2 1 0 0 (c) (d) I(1) 2 0.69 1 0.46 0.46 σ σ σ σ II(1,1) II(10,1) II(1,10) II(10,10) 2 1 0 0 100 Time (s) 200 0 2 0 100 Time (s) 200 0 2 0 100 Time (s) 200 0 100 Time (s) 2 0 0.82 200 4 2 1 0 0 0.82 σ 0.61 1 σ 0.76 1 σ 2 σ Fig. 3. Performance of the different schemes for ridge curve extraction from the WFT of the first test signal (IV.1), as illustrated by: (a,c) examples of the extracted ωp (t) when the noise standard deviation is σ = 0.6 (the WFT of the particular signal realization at this noise level is presented in Fig. 2(a)); (b,d) dependence of the relative error f (IV.3) on the standard deviation σ of the noise. In (a,c) the wide gray background line shows the extracted frequency profile in the noise-free case, the bold black lines correspond to the mean ωp (t) over all noise realizations, while the (mostly almost coincident) thin lines show individual extracted curves for 10 (out of 40) noise realizations. In (b,d) the bold black lines show the mean f over all noise realizations, with the gray regions around them indicating ±1 standard deviation; the bold gray dashed lines show the ensemble mean of f if the schemes were performed using the one-step optimization (III.1) instead of the (default) path optimization (III.3); vertical dotted lines indicate the values of σ for which the mean error plus its standard deviation over noise realizations crosses the level f = 0.5, shown by horizontal dashed lines. in Fig. 3. The performance of each method is quantified by its maximum tolerable noise level σmax , indicated by vertical dotted lines in Fig. 3: we define it as the noise intensity σ at which the mean error f (IV.3) plus its standard deviation over noise realizations reaches 0.5, implying that in many cases the resultant ωp (t) is inaccurate. Note that, in each case, the default path optimization (III.3) approach has clear and significant advantages over the one-step optimization (III.1), with the mean errors for the latter being shown by dashed gray lines in Fig. 3(b,d). II(10,1) and II(1,10) do not work so well, indicating that large asymmetries between α and β are not advantageous, which is to be expected given that we use relative (i.e. normalized) deviations. Results for the second test signal, the ECG, are presented in Fig. 4. Clearly, the situation there is similar to the one observed for the first test signal in Fig. 3. However, now the performance of methods I and II is almost independent of their parameters (except I(0)), at least for the parameter values considered. Summarizing, the best results were achieved with scheme II, in particular II(1,1) and II(10,10). Scheme I(α) seem to be most accurate for α = 1 (at least for the parameters tested), while the Global Maximum method, corresponding to I(0), is largely useless and should not be used. In all cases, the path optimization (III.3) approach was superior to the onestep optimization (III.1). From Fig. 3, it can be seen that the worst performance in the case of the first test signal (IV.1) is exhibited by the I(0) (Global Maximum) method, which is to be expected, given that the amplitude of the weaker component is sometimes higher than that of the dominant one. With increasing α above zero, the performance of the method I(α) greatly improves (Fig. 3(a,b)), reaching its optimum at some 0 < α < 10, and then deteriorating again. Thus, for scheme I and the parameters tested, the best results are achieved at α = 1. V. E XTRACTION OF CURVES FROM THE SYNCHROSQUEEZED TRANSFORMS Nevertheless, much better performance is demonstrated by schemes II(1,1) and II(10,10), which can trace the ridge curve reliably even in the presence of very strong noise. Methods Synchrosqueezing [12], [13], [11] represents a particular reassignment method [21], [14] that can be used to construct a more concentrated representation from the WFT and WT 7 Frequency (Hz) (a) I(0) I(10) I(1000) 1 0.5 0 εf (b) 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0.5 1 8 4 2 0 0 0.16 (c) Frequency (Hz) I(1) 1.5 0.21 0.20 0 0.19 σ σ σ σ II(1,1) II(10,1) II(1,10) II(10,10) 1.5 1 0.5 εf (d) 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0.5 1 8 4 2 0 0 0.22 σ 0.22 σ 0.23 σ 0.22 σ Fig. 4. Results for the second test signal; otherwise same as Fig. 3. In (a,c) the examples of extracted ωp (t) are now shown for σ = 0.3 (the WFT of one .particular signal realization at this noise level is presented in Fig. 2(b)) sums all the interferences and other complications present in the WFT/WT into a more compact frequency regions so that, even if the components appear more separated as a result, this does not mean that their parameters can be better estimated. In this respect the SWFTs/SWTs are somehow similar to the WFT/WT skeletons (the corresponding transforms with only their amplitude peaks left) which, although being perfectly concentrated, do not obviously possess better resolution properties than the respective WFTs/WTs; see [2] for a more detailed discussion of this issue. Nevertheless, it still remains to be established whether or not synchrosqueezing provides any advantages in terms of curve extraction, i.e. whether the “correct” amplitude peak sequences can be identified more easily in the SWFT/SWT than in the original WFT/WT. In other words, the following question is to be addressed: will performing synchrosqueezing first and then applying curve extraction methods to the resultant SWFT/SWT give more accurate results than applying these methods directly to the original WFT/WT? Evidently, the schemes developed for the WFT/WT can straightforwardly be applied for tracing ridge curves in the SWFT/SWT. Nothing qualitatively changes, except that now one uses the amplitude peaks of the synchrosqueezed transforms. However, an immediate and serious drawback of this approach is that, in contrast to the case of the WFT/WT, the peak amplitudes in the synchrosqueezed transforms are not universally proportional to the amplitudes of the corresponding by utilizing relationships between the rates of phase growth of the corresponding coefficients. The synchrosqueezed WFT (SWFT) Vs (ω, t) and synchrosqueezed WT (SWT) Ts (ω, t) can be constructed as Z ∞  Vs (ω, t) = Cg−1 δ ω − νG (ω, t) Gs (e ω , t)de ω, −∞ Z ∞  de ω Ts (ω, t) = Cψ−1 δ ω − νW (ω, t) Ws (e ω , t) , ω e 0 Z Z 1 ∞ 1 ∞ ∗ Cg ≡ ĝ(ξ)dξ = πg(0), Cψ ≡ ψ̂ (ξ)dξ/ξ, 2 −∞ 2 0  ∂t Ws (ω,t) (V.1)  t Gs (ω,t)  and ν ≡ Im are where νG ≡ Im ∂G W Ws (ω,t) s (ω,t) the instantaneous phase velocities of the WFT and WT, respectively. In practice, the frequency scale is discretized, so one calculates the SWFT and SWT as Vs (ω, t) and Ts (ω, t) already integrated over the corresponding frequency bin (see e.g. the discussion in [2]). Figure 5 shows SWFTs constructed from the WFTs depicted in Figs. 1 and 2 (see also [18] for a systematic analysis of the effects of different kinds of noise on performance of the SWT). Clearly, synchrosqueezed TFRs are very concentrated and visually appealing. However, it has been found [2] that they do not possess better time or frequency resolution, i.e. do not allow for better reconstruction of components that are close in frequency or have high time variability (as compared to the original WFT/WT). Thus, the synchrosqueezing just 8 Fig. 5. Synchrosqueezed WFTs: (a,b) constructed from the WFTs shown in Figs. 1; (c,d) constructed from the WFTs shown in Fig. 2. Thin red lines show the ridge curves corresponding to the dominant components in each case. |SWFT| t = 79 s 0.4 t = 80 s ∆ω=0.02 ∆ω=0.01 (b) (c) (d) 0.2 0 0.8 |WFT| (a) 0.4 0 0.5 1 1.5 2 0.5 Frequency (Hz) 1 1.5 2 Frequency (Hz) Fig. 6. Snapshots (a,b) of the SWFT amplitudes and (c,d) of the WFT amplitudes for the first test signal (IV.1) corrupted with noise (IV.2) of standard deviation σ = 0.6. Thick gray lines and thin black lines show the values obtained using frequency bin widths of ∆ω/2π = 0.02 and ∆ω/2π = 0.01, respectively. Dotted vertical lines indicate the instantaneous frequencies of each of the two AM/FM components in signal (IV.1) at the corresponding times. This figure shows that, while the WFT peaks (c,d) are generally proportional to the amplitudes of the components, peaks in the SWFT (a,b) depend on the choice of the discretization step ∆ω in a nonuniversal and quite sophisticated way. components; instead, they are largely determined by the parameters of frequency discretization being used, as illustrated in Fig. 6. Thus, it can be seen that, even if one component has a smaller amplitude than the other, it may still have a much higher peak in the SWFT (see Fig. 6(a,c)). due to the non-smoothness of the SWFT/SWT, one cannot apply peak interpolation to better locate the ridges νm (t), so that they remain discrete, and such a discretization in turn affects performance of the extraction schemes (see Remark III.1). Because of all these issues, the use of the SWFT/SWT peak amplitudes for discriminating between the components is in general not appropriate and can lead to unpredictable results, introducing considerable instability. Generally, the relationships between the peaks will depend on the discretization step ∆ω, and this dependence proves to be highly nonlinear and time-varying, being influenced by many factors such as the instantaneous amplitude and frequency modulation of the component, its interference with other components and noise. Hence, the outcomes of different curve extraction methods when applied to synchrosqueezed transforms will also depend on the widths of frequency bins used. This effect is additionally augmented by the fact that, A possible way to avoid the drawbacks discussed above is to use the “integrated” ridges instead of the peaks. Thus, it is well-known [2], [12], [14] that in the case of the synchrosqueezed transforms the amplitude of the component should be estimated based on the overall sum of the SWFT/SWT over the (time-dependent) frequency region 9 Fig. 7. Comparison of the curves extracted by different methods from the WFT (a) and SWFT (using the peaks (b) or integrated ridges (c)) for the first test signal (IV.1) at a noise level σ = 0.6 (IV.2). The lower panels (d,e,f) show the component’s amplitude as reconstructed from the corresponding ridge curve by (V.2) for the SWFT, and in a similar manner (by integrating over the widest frequency regions of unimodal TFR amplitude around ωp (t) at each time, see [2]) for the WFT. A typical examples of the extracted curves are presented in Fig. 7, where one can see that, in contrast to the case of the WFT, the results of curve extraction from the SWFT become very sensitive to the method and its parameters being used. This is mainly because, in contrast to the usual WFT and WT, the synchrosqueezed transforms often contain a lot of “spikes” with small Qm (t) not corresponding to any component (see Fig. 6(a,b)). These small peaks occur both due to noise and as a side effect of amplitude/frequency modulation or interference. Consequently, at any given time, there are numerous closely spaced candidate ridge points νm (t) in the SWFT/SWT, which makes it easier to switch between the curves corresponding to different components by building “bridges” between them (cf. blue lines in Fig. 7(a) and (b,c)), while for the WFT/WT this would require jumping large frequency distance in a sudden. Furthermore, this structure of the synchrosqueezed transforms allows selection of an almost straight curve formed mainly from the spurious ridges of close frequencies, and such a curve will indeed be returned if penalization of frequency or its time-derivative is strong enough (cf. black lines in Fig. 7(a) and (b,c)). Note that a similar situation would occur for the WFT/WT if we used all available frequencies as candidate ridge points νm (t), but using only the peaks (II.6) avoids the corresponding drawbacks. Finally, it should also be noted that the computational cost of curve extraction from the synchrosqueezed transforms is usually considerably higher than for the conventional smooth TFRs. Thus, the number of computations is proportional to the sum of squares of numbers Np (t) of ridge points νm (t) at each time (see Appendix), and these numbers are much larger for the SWFT/SWT than for the original WFT/WT. where it is concentrated. The problems attributable to use of the peaks can therefore be solved by using a more appropriate amplitude/frequency estimates. Hence, at each time t we break the SWFT/SWT into the widest regions of non-zero amplitude (m) (m) [ω− (t), ω+ (t)]. Then, instead of using peak values (II.6), the ridge amplitudes Qm (t) and frequencies νm (t) (which are used in all procedures) are estimated from the corresponding regions as Z ω+(m) (t) (a) (a) Qm (t) = |xm (t)|, xm (t) ≡ Vs (ω, t)dω, (m) ω− (t) (V.2)   Z −1 (a) νm (t) ≡ Re xm (t) ωSs (ω, t)dω , for the SWFT, and similarly (Vs (ω, t) → Ts (ω, t)) for the SWT. Since such Qm (t) do not depend on the widths of the frequency bins, being directly proportional to the true amplitudes of the corresponding components, while νm (t) now take continuous values, curve extraction methods based on integrated ridges are expected to give consistent results that are relatively unaffected by frequency discretization. However, in both cases of using usual and integrated ridges, we have found most of the methods considered to perform either similarly, or often worse, if applied to the SWFT/SWT instead of the original WFT/WT. The corresponding results for the two test signals are shown in Supplementary Figs. 2, 3, 4 and 5; in all cases, the best performance was demonstrated by scheme II(1,1). Note that, in the case of weak frequency modulation (such as for the ECG signal), for some parameters the performance of the schemes might actually be slightly improved if using the SWFT/SWT peaks instead of the WFT/WT ones but, on the other hand, this causes the same schemes to fail completely for other parameters (see e.g. Supplementary Fig. 3). In any case, as discussed previously, the use of the SWFT/SWT peaks in the context of curve extraction is not generally appropriate. VI. L IMITATIONS The methods proposed are subject to a few important limitations. First, all schemes are designed to extract accurately the 10 curves corresponding to components that persist throughout the whole signal (or disappear only briefly). This is typically the case for signals of biological origin, such as recordings of ECG, EEG, respiration, or blood flow. On the other hand, when the signal contains transient components that are present only during short time frames, as is often the case e.g. in sound analysis, the curves returned by schemes I and II will most likely consist of the curves corresponding to different components appearing at similar frequencies but different times. This is because the proposed techniques do not have any built-in criteria to terminate curve extraction after a component ceases to exist. How best to formulate such a criterion is a separate topic, and will be the subject of future research. Secondly, in common with virtually any curve extraction method, the proposed schemes can have problems with the signals containing components whose frequencies cross each other. In such cases it becomes unclear which path to follow after the crossing occurs. In practice one would like to select the profile which seems “most consistent”, which in mathematical terms can be formulated as the most smooth. If the differences between components’ amplitudes and/or frequency derivatives are high at the crossing point, then it is likely that the proposed schemes will return appropriate curves; otherwise they can generally select any path. Suppressing deviations of the higher derivatives of the component’s frequency (in addition to the first one in both schemes) is likely to improve the situation, albeit with increased method complexity and computational cost. Finally, it should be noted that to obtain reliable results with generally any method applied to the signal’s TFR, the latter should represent appropriately at least the basic signal structure. How to achieve this is a general topic of timefrequency analysis (see e.g. [2], [22], [23]. extraction compared to that of the WFT/WT, at least for the methods considered. A PPENDIX : FAST PATH OPTIMIZATION OF THE FUNCTIONAL WITH FINITE MEMORY Finding the solution ωp (t) to the path optimization problem (III.3) is generally very expensive computationally, often being carried out by simulated annealing. However, if the functional F [...] has finite memory, i.e. depends on the finite number of points selected at previous times (rather than the full history), then the optimal path can be found in O(N ) operations using dynamic programming techniques [25]. The corresponding algorithm is discussed in detail below. Consider first the functional F [Qm (tn ), νm (tn ), ωp (tn−1 )], which depends only on the ridge point at the current time tn (characterized by Qm (tn ) and νm (tn )) and the frequency of the previous one ωp (tn−1 ). This is basically the case utilized in all schemes presented in this work. The optimization problem (III.3) consists of finding the sequence of ridge point indices mc (tn ) maximizing the integral of this functional over time: argmax N X   F Qmn (tn ), νmn (tn ), νmn−1 (tn−1 ) . {m1 ,m2 ,...,mN } n=1 (VII.1) The ridge curve is then recovered as ωp (tn ) = νmc (tn ) (tn ). It is clear that at each time tn for each ridge νm (tn ) there exists a history of previous peaks {m e c (m, tn , t1 ), . . . , m e c (m, tn , tn−1 )} which maximizes the integral to this point U (m, tn ) = F [Qm (tn ), νm (tn ), νm e c (m,tn ,tn−1 ) (tn−1 )] + n−1 X F [Qm e c (m,tn ,ti ) , νm e c (m,tn ,ti ) (ti ), νm e c (m,tn ,ti−1 ) (ti−1 )]. i=1 (VII.2) What makes a fast path optimization possible is that, for functionals depending only on the current and previous points, if the profile {mc (t)} maximizing (III.3) includes νm (tn ), then it should include the best path to νm (tn ) as well: {mc (t1 ), . . . , mc (tn )} = {m e c (m, tn , t1 ), . . . , m e c (m, tn , tn−1 ), m}. This is because the behavior of mc (ti=n+1,..,N ) does not influence the integral over the previously extracted points mc (ti=1,..,n−1 ). Therefore, at each step we can leave only the best paths to each peak νm (t) and discard all the others. It is useful to express m e c (m, tn , ti ) through the matrix q(m, tn ) which maps the peak number m at time tn to the previous peak number in such a way that (VII.2) is maximized. We therefore introduce VII. C ONCLUSIONS We have developed and compared the techniques that can be used for ridge curve extraction from the WFT/WT, and discussed a number of related issues. Among the proposed approaches, scheme II(α,β) with α = β was shown to produce the best results. Its parameters β and α control the strengths of suppression of the relative deviations of ridge frequency and its time-derivative from the corresponding median values, respectively. Although these parameters can be adjusted to better match any specific problem, due to high adaptivity of the approach the default choice α = β = 1 works well in the majority of cases (within the limitations discussed in the previous section). Thus, scheme II(1,1) appears to be of almost universal utility, being a type of “just apply” method that does not require any tuning by the user. The corresponding MatLab codes, as well as other useful time-frequency analysis tools, are freely available at [24]. We have also tested the effects of synchrosqueezing [12], [13], [11], [14] in relation to curve extraction, and found that its drawbacks heavily outweigh the advantages. Thus, although scheme II(1,1) still remains the best and works reasonably well if applied to the synchrosqueezed transforms, in general the structure of the SWFT/SWT seems to be less suitable for curve q[i](m, tn ) ≡ m e c (m, tn , tn−i ) = q(q[i − 1](m, tn ), tn−i+1 ) : q[0](m, tn ) = m, q[1](m, tn ) = q(m, tn ) = m e c (m, tn−1 ), q[2](m, tn ) = q(q(m, tn ), tn−1 ) = m e c (m, tn−2 ), ... (VII.3) What remains is to find at each time tn (starting from t1 ), and for each ridge m = 1, . . . , Np (tn ), the maximum value 11 U (m, tn ) of the integral up to this point and the index of the previous ridge q(m, tn ) for which this maximum is achieved: for n = 1, ..., N and m = 1, ..., Np (tn ) do:  q(m, tn ) =argmax F [Qm (tn ), νm (tn ), νk (tn−1 )] k +U (k, tn−1 ) , (VII.4) U (m, tn ) =F [Qm (tn ), νm (tn ), νq(m,tn ) (tn−1 )] +U (q(m, tn ), tn−1 ), Then U (m, tN ) represents the full integral (VII.1) to each of the last ridges νm (tN ), and one has mc (tN ) = argmaxm U (m, tN ), with the sequence corresponding to this index being the optimal path: {mc (t)} = {q[N − 1](mc (tN ), tN ), . . . , q[1](mc (tN ), tN ), mc (tN )}. Note, that in this example there are two ways of going from the second peak at time t1 : either to the second row (mc (t2 ) = 2), corresponding to U (2, t2 ) = 2.0, or to the third one, corresponding to U (3, t2 ) = 2.4. The one-step scheme (III.1) would select the third peak, but using the path optimization scheme we explore all the possibilities, and find out that going through the second one leads at the end to the higher path functional (III.3). The path optimization for functionals depending on any finite number of previous peak positions (and not only one, as in (VII.1)) can be performed in a manner analogous to that outlined above. For example, if functional F [...] depends on two previous points ωp (tn−1 ) and ωp (tn−2 ), then one will need to apply the same procedure but instead of single ridges treat their one-step sequences. Thus, in this case at time tn one selects the trajectory maximizing the path functional (III.3) to each of the Np (tn−1 ) × Np (tn ) point combinations {νk (tn−1 ), νm (tn )}. The general case of accounting for d previous points is qualitatively similar, so the computational cost of the procedure is O(Mpd+1 N ). For example, for the functional F [...] = log Qm (tn ) + w(νm (tn ) − ωp (tn−1 ), α) (scheme I (III.4)), we calculate t1 : for m = 1, ..., Np (t1 ) q(m, t1 ) = 0, U (m, t1 ) = log Qm (t1 ), t2 : for m = 1, ..., Np (t2 )  q(m, t2 ) = argmax log Qm (t2 ) + w(νm (t2 ) − νk (t1 ), α) k + U (k, t1 ) , U (m, t2 ) = log Qm (t2 ) + w(νm (t2 ) − νq(m,t1 ) (t1 ), α) + U (q(m, t2 ), t1 ), t3 : for m = 1, ..., Np (t3 )  q(m, t3 ) = argmax log Qm (t3 ) + w(νm (t3 ) − νk (t2 ), α) R EFERENCES k [1] N. Delprat, B. Escudie, P. Guillemain, R. Kronland-Martinet, P. Tchamitchian, and B. Torrésani, “Asymptotic wavelet and Gabor analysis: Extraction of instantaneous frequencies,” IEEE Trans. Inform. Theor., vol. 38, no. 2, pp. 644–664, 1992. [2] D. Iatsenko, P. V. E. McClintock, and A. Stefanovska, “Linear and synchrosqueezed time-frequency representations revisited: Overview, standards of use, reconstruction, resolution, concentration, and algorithms,” Dig. Signal Proc., vol. 42, pp. 1–26, 2015. [3] Z. Zhang, Z. Ren, and W. Huang, “A novel detection method of motor broken rotor bars based on wavelet ridge,” IEEE Trans. Energy. Convers., vol. 18, no. 3, pp. 417–423, 2003. [4] J. Zhong and J. Weng, “Phase retrieval of optical fringe patterns from the ridge of a wavelet transform,” Opt. Lett., vol. 30, no. 19, pp. 2560–2562, 2005. [5] D. Iatsenko, A. Bernjak, T. Stankovski, Y. Shiogai, P. J. Owen-Lynch, P. B. M. Clarkson, P. V. E. McClintock, and A. Stefanovska, “Evolution of cardio-respiratory interactions with age,” Phil. Trans. R. Soc. Lond. A, vol. 371, no. 1997, p. 20110622, 2013. [6] Y. F. Suprunenko, P. T. Clemson, and A. Stefanovska, “Chronotaxic systems: A new class of self-sustained nonautonomous oscillators,” Phys. Rev. Lett., vol. 111, no. 2, p. 024101, 2013. [7] W. Staszewski, “Identification of non-linear systems using multi-scale ridges and skeletons of the wavelet transform,” J. Sound Vib., vol. 214, no. 4, pp. 639–658, 1998. [8] R. A. Carmona, W. L. Hwang, and B. Torresani, “Characterization of signals by the ridges of their wavelet transforms,” IEEE Trans. Signal Proc., vol. 45, no. 10, pp. 2586–2590, 1997. + U (k, t2 ) , U (m, t3 ) = log Qm (t3 ) + w(νm (t3 ) − νq(m,t2 ) (t2 ), α) + U (q(m, t3 ), t2 ), ... (VII.5) where q(m, t1 ) is set to zero because there are no peaks before the starting time t1 . Numerically, the q(m, tn ) and U (m, tn ) represent Mp × N matrices, updated at each step, where Mp = maxn Np (tn ) is the maximum number of peaks; the excess entries q({Np (tn ) + 1, .., Mp }, tn ) and U ({Np (tn ) + 1, .., Mp }, tn ) are set to Not-a-Numbers (NaNs). Since at each time tn we need to calculate for each of the Np (tn ) peaks the functional with each of the Np (tn−1 ) of the previous peaks (to find the one maximizing it), the overall computational cost of the procedure is O(Mp2 N ) (or, more precisely, O(hNp (ti )Np (ti+1 )iN )). The outcome of the algorithm is illustrated below on a schematic example: 12 [9] ——, “Multiridge detection and time-frequency reconstruction,” IEEE Trans. Signal Proc., vol. 47, no. 2, pp. 480–492, 1999. [10] A. K. Barros and N. Ohnishi, “Heart instantaneous frequency (HIF): an alternative approach to extract heart rate variability,” IEEE Trans. Biomed. Eng., vol. 48, no. 8, pp. 850–855, 2001. [11] G. Thakur, E. Brevdo, N. S. Fuckar, and H.-T. Wu, “The synchrosqueezing algorithm for time-varying spectral analysis: Robustness properties and new paleoclimate applications,” Sig. Process., vol. 93, no. 5, pp. 1079–1094, 2013. [12] I. Daubechies, J. Lu, and H. Wu, “Synchrosqueezed wavelet transforms: An empirical mode decomposition-like tool,” Appl. Comput. Harmon. Anal., vol. 30, no. 2, pp. 243–261, 2011. [13] G. Thakur and H.-T. Wu, “Synchrosqueezing-based recovery of instantaneous frequency from nonuniform samples,” SIAM J. Math. Anal., vol. 43, no. 5, pp. 2078–2095, 2011. [14] F. Auger, P. Flandrin, Y.-T. Lin, S. McLaughlin, S. Meignen, T. Oberlin, and H.-T. Wu, “Time-frequency reassignment and synchrosqueezing: An overview,” IEEE Signal Proc. Mag., vol. 30, no. 6, pp. 32–41, 2013. [15] B. Boashash, “Estimating and interpreting the instantaneous frequency of a signal. I. Fundamentals,” Proc. IEEE, vol. 80, no. 4, pp. 520–538, 1992. [16] D. Vakman, “On the analytic signal, the Teager-Kaiser energy algorithm, and other methods for defining amplitude and frequency,” IEEE Trans. Signal Proc., vol. 44, no. 4, pp. 791–797, 1996. [17] B. Picinbono, “On instantaneous amplitude and phase of signals,” IEEE Trans. Signal Proc., vol. 45, no. 3, pp. 552–560, 1997. [18] Y.-C. Chen, M.-Y. Cheng, and H.-T. Wu, “Non-parametric and adaptive modelling of dynamic periodicity and trend with heteroscedastic and dependent errors,” J. Roy. Stat. Soc. B, vol. 76, no. 3, pp. 651–682, 2014. [19] J. M. Lilly and S. C. Olhede, “On the analytic wavelet transform,” IEEE Trans. Inform. Theor., vol. 56, no. 8, pp. 4135–4156, 2010. [20] R. P. Agarwal, A. Katok, D. O’Regan, M. Meehan, B. Bollobás, P. Sarnak, F. Kirwan, and W. Fulton, Fixed Point Theory and Applications. Cambridge University Press, 2001. [21] F. Auger and P. Flandrin, “Improving the readability of time-frequency and time-scale representations by the reassignment method,” IEEE Trans. Sig. Process., vol. 43, no. 5, pp. 1068–1089, 1995. [22] S. Mallat, A Wavelet Tour of Signal Processing, 3rd edn. Burlington: Academic Press, 2008. [23] B. Boashash, Time Frequency Signal Analysis and Processing. Elsevier, 2003. [24] The MatLab codes used in this work, as well as many others, are freely available at http://www.physics.lancs.ac.uk/research/nbmphysics/ diats/tfr/. [25] D. P. Bertsekas, Dynamic programming and optimal control. Athena Scientific Belmont, MA, 1995, vol. 1, no. 2. 13 Supplementary Information Number of iterations Fixed sampling frequency = 64 Hz 20 Fixed time length = 64 s (a) 20 10 0 (b) 10 3 4 10 0 5 10 10 3 4 10 5 10 N 10 N Fig. 1. The dependence on N (the signal’s length in samples) of the mean number of iterations needed for scheme II(1,1) to converge exactly in the case of a white noise signal; the error bars show ±1 standard deviation, and 40 independent noise realizations were used for each N . (a): The value of N is varied by changing the time length of the signal. (b): The value of N is varied by changing the sampling frequency of the signal. In all cases, scheme II was applied to the signals’ WFTs calculated for the frequency range [0, 5] Hz, but the results do not change qualitatively if one calculates these WFTs for all available ranges (up to the Nyquist frequency). Frequency (Hz) (a) εf (b) I(0) Frequency (Hz) εf I(10) I(1000) 1 0 0 100 Time (s) 200 0 1 0 100 Time (s) 200 0 1 0 100 Time (s) 200 0 100 Time (s) 200 1 2 4 2 1 0 0 (c) (d) I(1) 2 0.62 1 2 0.07 σ σ σ σ II(1,1) II(10,1) II(1,10) II(10,10) 2 1 0 0 100 Time (s) 200 0 2 0 100 Time (s) 200 0 2 0.05 100 Time (s) 200 0 1 2 0 100 Time (s) 200 4 2 1 0 0 0.69 1 σ Fig. 2. 0.69 1 σ σ 0.771 σ Same as Fig. 3 in the manuscript, but the curve is extracted from the synchrosqueezed WFT using amplitude peaks as ridge points. 14 2 Frequency (Hz) (a) I(0) I(10) I(1000) 1 0.5 0 εf (b) 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0.5 1 8 4 2 0 0.06 (c) Frequency (Hz) I(1) 1.5 0.20 0.24 0 0.18 σ σ σ σ II(1,1) II(10,1) II(1,10) II(10,10) 1.5 1 0.5 εf (d) 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0.5 1 8 4 2 0 0 0.26 σ Fig. 3. 0.24 0 0.1 σ σ 0.24 σ Same as Fig. 4 in the manuscript, but the curve is extracted from the synchrosqueezed WFT using amplitude peaks as ridge points. 15 Frequency (Hz) (a) εf (b) I(0) Frequency (Hz) εf I(10) I(1000) 1 0 0 100 Time (s) 200 0 1 0 100 Time (s) 200 1 2 0 100 Time (s) 200 1 2 0 100 Time (s) 200 1 2 4 2 1 0 0 (c) (d) I(1) 2 0.46 0 0.37 0 0.34 σ σ σ σ II(1,1) II(10,1) II(1,10) II(10,10) 2 1 0 0 100 Time (s) 200 0 2 0 100 Time (s) 200 0 2 0 100 Time (s) 200 0 1 0 100 Time (s) 200 4 2 1 0 0 0.79 σ 0.57 1 σ σ 0.65 1 2 σ Fig. 4. Same as Fig. 3 in the manuscript, but the curve is extracted from the synchrosqueezed WFT using “integrated” ridge points (see Eq. (V.2) in the manuscript). 16 Frequency (Hz) (a) I(0) I(10) I(1000) 1 0.5 0 εf (b) 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0.5 1 8 4 2 0 0.11 (c) Frequency (Hz) I(1) 1.5 0 0.17 0 0.16 0.11 σ σ σ σ II(1,1) II(10,1) II(1,10) II(10,10) 1.5 1 0.5 εf (d) 0 100 Time (s) 200 0.5 1 0 100 Time (s) 200 0 0.5 1 0 100 Time (s) 200 0 0.5 0 0.15 100 Time (s) 200 0.5 1 8 4 2 0 0 0.17 σ 0 0.16 σ σ σ Fig. 5. Same as Fig. 4 in the manuscript, but the curve is extracted from the synchrosqueezed WFT using “integrated” ridge points (see Eq. (V.2) in the manuscript). 17
5cs.CE
When Hashes Met Wedges: A Distributed Algorithm for Finding High Similarity Vectors Aneesh Sharma C. Seshadhri Ashish Goel ∗ Twitter, Inc. University of California Santa Cruz, CA [email protected] arXiv:1703.01054v1 [cs.SI] 3 Mar 2017 [email protected] [email protected] Stanford University ABSTRACT Keywords Finding similar user pairs is a fundamental task in social networks, with numerous applications in ranking and personalization tasks such as link prediction and tie strength detection. A common manifestation of user similarity is based upon network structure: each user is represented by a vector that represents the user’s network connections, where pairwise cosine similarity among these vectors defines user similarity. The predominant task for user similarity applications is to discover all similar pairs that have a pairwise cosine similarity value larger than a given threshold τ . In contrast to previous work where τ is assumed to be quite close to 1, we focus on recommendation applications where τ is small, but still meaningful. The all pairs cosine similarity problem is computationally challenging on networks with billions of edges, and especially so for settings with small τ . To the best of our knowledge, there is no practical solution for computing all user pairs with, say τ = 0.2 on large social networks, even using the power of distributed algorithms. Our work directly addresses this challenge by introducing a new algorithm — WHIMP — that solves this problem efficiently in the MapReduce model. The key insight in WHIMP is to combine the “wedge-sampling” approach of Cohen-Lewis for approximate matrix multiplication with the SimHash random projection techniques of Charikar. We provide a theoretical analysis of WHIMP, proving that it has near optimal communication costs while maintaining computation cost comparable with the state of the art. We also empirically demonstrate WHIMP’s scalability by computing all highly similar pairs on four massive data sets, and show that it accurately finds high similarity pairs. In particular, we note that WHIMP successfully processes the entire Twitter network, which has tens of billions of edges. Similarity search, nearest neighbor search, matrix multiplication, wedge sampling ∗ Research supported in part by NSF Award 1447697. c 2017 International World Wide Web Conference Committee (IW3C2), published under Creative Commons CC BY 4.0 License. WWW 2017, April 3–7, 2017, Perth, Australia. ACM 978-1-4503-4913-0/17/04. http://dx.doi.org/10.1145/3038912.3052633 . 1. INTRODUCTION Similarity search among a collection of objects is one of the oldest and most fundamental operations in social networks, web mining, data analysis and machine learning. It is hard to overstate the importance of this problem: it is a basic building block of personalization and recommendation systems [12, 21], link prediction [1, 30], and is found to be immensely useful in many personalization and mining tasks on social networks and databases [41, 33, 42, 35]. Indeed, the list of applications is so broad that we do not attempt to survey them here and instead refer to recommender systems and data mining textbooks that cover applications in diverse areas such as collaborative filtering [35, 29]. Given the vast amount of literature on similarity search, many forms of the problem have been studied in various applications. In this work we focus on the social and information networks setting where we can define pairwise similarity among users on the network based on having common connections. This definition of similarity is particularly relevant in the context of information networks where users generate and consume content (Twitter, blogging networks, web networks, etc.). In particular, the directionality of these information networks provides a natural measure that is sometimes called “production” similarity: two users are defined to be similar to each other if they are followed by a common set of users. Thus, “closeness” is based on common followers, indicating that users who consume content from one of these users may be interested in the other “producer” as well.1 The most common measure of closeness or similarity here is cosine similarity. This notion of cosine similarity is widely used for applications [1, 26, 5, 30] and is in particular a fundamental component of the Who To Follow recommendation system at Twitter [20, 21]. Our focus in this work is on the computational aspect of this widely important and well studied problem. In particular, despite the large amount of attention given to the problem, there remain significant scalability challenges with computing all-pairs similarity on massive size information networks. A unique aspect of this problem on these large networks is that cosine similarity values that are traditionally considered “small” can be quite meaningful for social 1 One can also define “consumption” similarity, where users are similar if they follow the same set of users. and information network applications — it may be quite useful and indicative to find users sharing a cosine similarity value of 0.2, as we will illustrate in our experimental results. With this particular note in mind, we move on to describing our problem formally and discuss the challenges involved in solving it at scale. 1.1 Problem Statement As mentioned earlier, the similarity search problem is relevant to a wide variety of areas, and hence there are several languages for describing similarity: on sets, on a graph, and also on matrix columns. We’ll attempt to provide the different views where possible, but we largely stick to the matrix notation in our work.pGiven two sets S and T , their cosine similarity is |S ∩ T |/ |S| · |T |, which is a normalized intersection size. It is instructive to define this geometrically, by representing a set as an incidence vector. Given two (typically non-negative) vectors ~v1 and ~v2 , the cosine similarity is ~v1 · ~v2 /(k~v1 k2 k~v2 k2 ). This is the cosine of the angle between the vectors; hence the name. In our context, the corresponding ~v for some user is the incidence vector of followers. In other words, the ith coordinate of ~v is 1 if user i follows the user, and 0 otherwise. Abusing notation, let us denote the users by their corresponding vectors, and we use the terms “user” and “vector” interchangably. Thus, we can define our problem as follows. Problem 1.1. Given a sets of vectors ~v1 , ~v2 , . . . , ~vm in (R+ )d , and threshold τ > 0: determine all pairs (i, j) such that ~vi · ~vj ≥ τ . Equivalently, call ~vj τ -similar to ~vi if ~vi · ~vj ≥ τ . For every vector ~vi , find all vectors τ -similar to ~vj . In terms of (approximate) information retrieval, the latter formulation represents a more stringent criterion. Instead of good accuracy in find similar pairs overall, we demand high accuracy for most (if not all) users. This is crucial for any recommendation system, since we need good results for most users. More generally, we want good results at all “scales”, meaning accurate results for users with small followings as well as big followings. Observe that the sparsity of ~v is inversely related to the indegree (following size) of the user, and represents their popularity. Recommendation needs to be of high quality both for newer users (high sparsity ~v ) and celebrities (low sparsity ~v ). We can mathematically express Problem 1.1 in matrix terms as follows. Let A be the d × n matrix where the ith column is ~vi /k~vi k2 . We wish to find all large entries in the Gramian matrix AT A (the matrix of all similarities). It is convenient to think of the input as A. Note that the non-zeros of A correspond exactly to the underlying social network edges. 1.2 Challenges Scale: The most obvious challenge for practical applications is the sheer size of the matrix A. For example, the Twitter recommendation systems deal with a matrix with hundreds of millions of dimensions, and the number of nonzeros is in many tens of billions. Partitioning techniques become extremely challenging for these sizes and clearly we need distributed algorithms for Problem 1.1. The similarity value τ : An equally important (but less discussed) problem is the relevant setting of threshold τ in Problem 1.1. In large similarity search applications, a cosine similarity (between users) of, say, 0.2 is highly significant. Roughly speaking, if user u is 0.2-similar to v, then 20% of u’s followers also follow v. For recommendation, this is an immensely strong signal. But for many similarity techniques based on hashing/projection, this is too small [24, 3, 37, 39, 38, 4]. Techniques based on LSH and projection usually detect similarities above 0.8 or higher. Mathematically, these methods have storage complexities that scale as 1/τ 2 , and are simply infeasible when τ is (say) 0.2. We stress that this point does not receive much attention. But in our view, it is the primary bottleneck behind the lack of methods to solve Problem 1.1 for many real applications. The practical challenge: This leads us to main impetus behind our work. For the matrix A corresponding to the Twitter network with O(100B) edges, find (as many as possible) entries in AT A above 0.2. For a majority of users, reliably find many 0.2-similar users. 1.3 Why previous approaches fail The challenge described above exemplifies where big data forces an algorithmic rethink. Matrix multiplication and variants thereof have been well-studied in the literature, but no solution works for such a large matrix. If a matrix A has a 100 billion non-zeroes, it takes upwards of 1TB just to store the entries. This is more than an order of magnitude of the storage of a commodity machine in a cluster. Any approach of partitioning A into submatrices cannot scale. There are highly tuned libraries like Intel MKL’s BLAS [25] and CSparse [13]. But any sparse matrix multiplication routine [22, 2] will generate all triples (i, i0 , j) such that Ai,j Ai0 ,j 6= 0. In our example, this turns out to be more than 100 trillion triples. This is infeasible even for a large industrial-strength cluster. Starting from the work of Drineas, Kannan, and Mahoney, there is rich line of results on approximate matrix multiplication by subsampling rows of the matrix [15, 17, 16, 36, 7, 32, 34, 23]. These methods generate approximate products according to Frobenius norm using outer products of columns. This would result in dense matrices, which is clearly infeasible at our scale. In any case, the large entries (of interest) contribute to a small part of the output. Why communication matters: There are upper bounds on the total communication even in industrial-strength Hadoop clusters, and in this work we consider our upper bound to be about 100TB2 . A promising approach for Problem 1.1 is the wedge sampling method of Cohen-Lewis [11], which was further developed in the diamond sampling work of Ballard et al [6]. The idea is to set up a linear-sized data structure that can sample indices of entries proportional to value (or values squared in [6]). One then generates many samples, and picks the index pairs that occur most frequently. These samples can be generated in a distributed manner, as shown by Zadeh and Goel [43]. The problem is in the final communication. The sampling P calculations show that about 10τ −1 i,j a~i · a~j samples are required to get all entries above τ with high probability. These samples must be collected/shuffled to actually find the large entries. In our setting, this is upwards of 1000TB of communication. 2 Note that if a reducer were to process 5GB of data each, processing 100TB would require 20,000 reducers. Figure 1: Result on WHIMP for τ = 0.2: the left plot the precision-recall curves for finding all entries in AT A above 0.2 (with respect to a sampled evaluation set). The other plots give the cumulative distribution, over all sampled users, of the minimum of precision and recall. We observe that for an overwhelming majority of users, WHIMP reliably finds more than 70% of 0.2-similar users. Locality Sensitive Hashing: In the normalized setting, maximizing dot product is equivalent to minimizing distance. Thus, Problem 1.1 can be cast in terms of finding all pairs of points within some distance threshold. A powerful technique for this problem is Locality Sensitive Hashing (LSH) [24, 18, 3]. Recent results by Shrivastava and Li use LSH ideas for the MIPS problem [37, 39, 38]. This essentially involves carefully chosen low dimensional projections with a reverse index for fast lookup. It is well-known that LSH requires building hashes that are a few orders of magnitude more than the data size. Furthermore, in our setting, we need to make hundreds of millions of queries, which involve constructing all the hashes, and shuffling them to find the near neighbors. Again, this hits the communication bottleneck. 1.4 Results We design WHIMP, a distributed algorithm to solve Problem 1.1. We specifically describe and implement WHIMP in the MapReduce model, since it is the most appropriate for our applications. Theoretical analysis: WHIMP is a novel combination of wedge sampling ideas from Cohen-Lewis [11] with random projection-based hashes first described by Charikar [10]. We give a detailed theoretical analysis of WHIMP and prove that it has near optimal communication/shuffle cost, with a computation cost comparable to the state-of-the-art. To the best of our knowledge, it is the first algorithm to have such strong guarentees on the communication cost. WHIMP has a provable precision and recall guarantee, in that it outputs all large entries, and does not output small entries. Empirical demonstration: We implement WHIMP on Hadoop and test it on a collection of large networks. Our largest network is flock, the Twitter network with tens of billions of non-zeroes. We present results in Fig. 1. For evaluation, we compute ground truth for a stratified sample of users (details in §7). All empirical results are with respect to this evaluation. Observe the high quality of precision and recall for τ = 0.2. For all instances other than flock (all have non-zeros between 1B to 100B), the accuracy is near perfect. For flock, WHIMP dominates a precision-recall over (0.7, 0.7), a significant advance for Problem 1.1 at this scale. Even more impressive are the distribution of precisionrecall values. For each user in the evaluation sample (and for a specific setting of parameters in WHIMP), we compute the precision and recall 0.2-similar vectors. We plot the cumulative histogram of the minimum of the precision and recall (a lower bound on any F-score) for two of the largest datasets, eu (a web network) and flock. For more than 75% of the users, we get a precision and recall of more than 0.7 (for eu, the results are even better). Thus, we are able to meet our challenge of getting accurate results on an overwhelming majority of users. (We note that in recent advances in using hashing techniques [37, 39, 38], precisionrecall curves rarely dominate the point (0.4, 0.4).) 2. PROBLEM FORMULATION Recall that the problem of finding similar users is a special case of Problem 1.1. Since our results extend to the more general setting, in our presentation we focus on the AT B formulation for given matrices A and B. The set of columns of A is the index set [m], denoted by CA . Similarly, the set of columns of B, indexed by [n], is denoted by CB . The dimensions of the underlying space are indexed by D = [d]. We use a1 , . . . to denote columns of A, b1 , . . . for columns in B, and r1 , r2 , . . . for dimensions. For convenience, we assume wlog that n ≥ m. We denote rows and columns of A by Ad,∗ and A∗,a respectively. And similar notation is used for B. We also use nnz(·) to denote the number of non-zeroes in a matrix. For any matrix M and σ ∈ R, the thresholded matrix [M ]≥σ keeps all values in M that are at least σ. In other words, ([M ]≥σ )i,j = Mi,j if Mi,j ≥ σ and zero otherwise. We use kM k1 to be the entrywise 1-norm. We will assume that kAT Bk1 ≥ 1. This is a minor technical assumption, and one that always holds in matrix products of interest. We can naturally represent A as a (weighted) bipartite graph GA = (CA , D, EA ), where an edge (a, d) is present iff Ad,a 6= 0. Analogously, we can define the bipartite graph GB . Their union GA ∪ GB is a tripartite graph denoted by GA,B . For any vertex v in GA,B , we use N (v) for the neighborhood of v. Finally, we will assume the existence of a Gaussian random number generator g. Given a binary string x as input, g(x) ∼ N (0, 1). We assume that all values of g are independent. The computational model: While our implementation (and focus) is on MapReduce, it is convenient to think of an abstract distributed computational model that is also a close proxy for MapReduce in our setting [19]. This allows for a transparent explanation of the computation and communication cost. Let each vertex in GA,B be associated with a different processor. Communication only occurs along edges of GA,B , and occurs synchronously. Each round of communication involves a single communication over all edges of GA,B . 3. HIGH LEVEL DESCRIPTION The starting point of our WHIMP algorithm (Wedges and Hashes in Matrix Product) is the wedge sampling method of Cohen-Lewis. A distributed MapReduce implementation of wedge sampling (for the special case of A = B) was given by Zadeh-Goel [43]. In effect, the main distributed step in wedge sampling is the following. For each dimension r ∈ [d] (independently and in parallel), we construct two distributions on the index sets of vectors in A and B. We then choose a set of independent samples for each of these distributions, to get pairs (a, b), where a indexes a vector in A, and b indexes a vector in B. These are the “candidates” for high similarity. If enough candidates are generated, we are guaranteed that the candidates that occur with high enough frequency are exactly the large entries of AT B. The primary bottleneck with this approach is that the vast majority of pairs generated occur infrequently, but dominate the total shuffle cost. In particular, most non-zero entries in AT B are very small, but in total, these entries account for most of kAT Bk1 . Thus, these low similarity value pairs dominate the output of wedge sampling. Our main idea is to construct an efficient, local “approximate oracle” for deciding if A∗,a · B∗,b ≥ τ . This is achieved by adapting the well-known SimHash projection scheme of Charikar [10]. For every vector ~v in our input, we construct a compact logarithmic sized hash h(~v ). By the properties of SimHash, it is (approximately) possible to determine if ~ u · ~v ≥ τ only given the hashes h(~ u) and h(~v ). These hashes can be constructed by random projections using near-linear communication. Now, each machine that processes dimension r (of the wedge sampling algorithm) collects every hash h(A∗,a ) for each a such that Ar,a 6= 0 (similarly for B). This adds an extra near-linear communication step, but all these hashes can now be stored locally in the machine computing wedge samples for dimension r. This machines runs the same wedge sampling procedure as before, but now when it generates a candidate (a, b), it first checks if A∗,a · B∗,b ≥ τ using the SimHash oracle. And this pair is emitted iff this condition passes. Thus, the communication of this step is just the desired output, since very few low similarity pairs are emitted. The total CPU/computation cost remains the same as the Cohen-Lewis algorithm. 4. THE SIGNIFICANCE OF THE MAIN THEOREM Before describing the actual algorithm, we state the main theorem and briefly describe its significance. Theorem 4.1. Given input matrices A, B and threshold τ , denote the set of index pairs output by WHIMP algorithm by S. Then, fixing parameters ` = dcτ −2 log ne, s = (c(log n)/τ ), and σ = τ /2 for a sufficiently large constant c, the WHIMP algorithm has the following properties with probability at least 1 − 1/n2 : • [Recall:] If (AT B)a,b ≥ τ , (a, b) is output. • [Precision:] If (a, b) is output, (AT B)a,b ≥ τ /4. • The total computation cost is O(τ −1 kAT Bk1 log n +τ −2 (nnz(A) +nnz(B)) log n). • The total communication cost is O((τ −1 log n)k[AT B]≥τ /4 k1 +nnz(A) + nnz(B) + τ −2 (m + n) log n). As labeled above, the first two items above are recall and precision. The first term in the total computation cost is exactly that of vanilla wedge sampling, τ −1 kAT Bk1 log n, while the second is an extra near-linear term. The total communication of wedge sampling is also τ −1 kAT Bk1 log n. Note that WHIMP has a communication of τ −1 k[AT B]≥τ /4 k1 log n. Since all entries in AT B are at most 1, k[AT B]≥τ /4 k1 ≤ nnz([AT B]≥τ /4 ). Thus, the communication of WHIMP is at most (τ −1 log n)nnz([AT B]≥τ /4 plus an additional linear term. The former is (up to the τ −1 log n term) simply the size of the output, and must be paid by any algorithm that outputs all entries above τ /4. Finally, we emphasize that the constant of 4 is merely a matter of convenience, and can be replaced with any constant (1 + δ). In summary, Theorem 4.1 asserts that WHIMP has (barring additional near-linear terms) the same computation cost as wedge sampling, with nearly optimal communication cost. 5. THE WHIMP ALGORITHM The WHIMP algorithm goes through three rounds of communication, each of which are described in detail in Figure 2. The output of WHIMP is a list of triples ((a, b), esta,b ), where esta,b is an estimate for (AT B)a,b . Abusing notation, we say a pair (a, b) is output, if it is part of some triple that is output. In each round, we have a step “Gather”. The last round has an output operation. These are the communication operation. All other steps are compute operations that are local to the processor involved. Lemma 5.1. With probability at least 1 − 1/n6 over the randomness of WHIMP, for all pairs (a, b), |esta,b − A∗,a · B∗,b | ≤ τ /4. Proof. First fix a pair (a, b). We have esta,b = kA∗,a k2 kB∗,b k2 cos(π∆/`), where ∆ is the Hamming distance between ha P and hb . Note that ha [i] = sgn( r∈[d] g(hr, ii)Ar,a ). Let ~v be the d-dimension unit vector with rth entry proportional to g(hr, ii). Thus, the rth component is a random (scaled) Gaussian, and ~v is a uniform (Gaussian) random vector in the unit sphere. We can write ha [i] = sgn(~v · A∗,a ) and hb [i] = sgn(~v · B∗,b ). The probability that ha [i] 6= hb [i] is exactly the probability that the vectors A∗,a and B∗,b are on different sides of a randomly chosen hyperplane. By a standard geometric argument [10], if θa,b is the angle between the vectors A∗,a and B∗,b , then this probability is θa,b /π. Define Xi to be the indicator random variable P for ha [i] 6= hb [i]. Note that the Hamming distance ∆ = i≤` Xi and E[∆] = `θa,b /π. Applying Hoeffding’s inequality, Pr[|∆ − E[∆]| ≥ `τ /(4πkA∗,a k2 kB∗,b k2 )] < exp[−(`2 τ 2 /16π 2 kA∗,a k22 kB∗,b k22 )/2`] = exp(−(c/τ 2 )(log n)τ 2 /(32π 2 kA∗,a k22 kB∗,b k22 )) < n−8 Thus, with probability > 1 − n−8 , |π∆/` − θa,b | ≤ τ /(4kA∗,a k2 kB∗,b k2 ). By the Mean Value Theorem, | cos(π∆/`) − cos(θa,b )| ≤ τ /(4kA∗,a k2 kB∗,b k2 ). WHIMP Round 1 (Hash Computation): 1. For each a ∈ CA : (a) Gather column A∗,a . (b) Compute kA∗,a k2 . (c) Compute bit array ha of length ` as follows: P ha [i] = sgn r∈[d] g(hr, ii)Ar,a . 2. Perform all the above operations for all b ∈ CB . WHIMP Round 2 (Weight Computation): 1. For all r ∈ [d]: (a) Gather rows Ar,∗ and Br,∗ . (b) Compute kAr,∗ k1 and construct a data structure that samples a ∈ CA proportional to Ar,a /kAr,∗ k1 . Call this distribution Ar . (c) Similarly compute kBr,∗ k1 and sampling data structure for Br . WHIMP Round 3 (Candidate Generation): 1. For all r ∈ [d]: (a) Gather: For all a, b ∈ N (r), ha , hb , kA∗,a k2 , kB∗,b k2 . (b) Repeat skAr,∗ k1 kBr,∗ k1 / (s set to c(log n)/τ ) times: i. Generate a ∼ Ar . ii. Generate b ∼ Br . iii. Denote the Hamming distance between bit arrays ha and hb by ∆. iv. Compute esta,b = kA∗,a k2 kB∗,b k2 cos(π∆/`). v. If est ≥ σ, emit ((a, b), esta,b ). Figure 2: The WHIMP (Wedges And Hashes In Matrix Product) algorithm Multiplying by kA∗,a k2 kB∗,b k2 , we get |esta,b −A∗,a ·B∗,b | ≤ τ /4. We take a union bound over all Θ(mn) pairs (a, b) to complete the proof. We denote a pair (a, b) as generated if it is generated in Steps 1(b)i and 1(b)ii during some iteration. Note that such a pair is actually output iff esta,b is sufficiently large. Note that the random choices in creating the hashes is independent of those generating the candidates. By Lemma 5.1, with probability > 1 − n−6 , the following event (call it E) holds: ∀(a, b), |esta,b − A∗,a · B∗,b | ≤ τ /4. Conditioned on E, if A∗,a · B∗,b < τ /4, then esta,b < τ /2 and (a, b) is not output. Let S = {(a, b)|A∗,a · B∗,b ≥ τ /4}. LetP the number of triples output be Y . Conditioned in E, Y ≥ (a,b)∈S [Xa,b ]. Denote the latter random variable as Z. By linearity of expectation and independence of Xa,b from E, X EE [Z] = EE [Xa,b ] (a,b)∈S = cτ −1 log n X A∗,a · B∗,b (a,b)∈S = cτ −1 log nk[AT B]≥τ /4 k1 Furthermore, Z is the sum of Bernoulli random variables. Thus, we can apply a standard upper-Chernoff bound to the sum above, and deduce that Pr[Z ≥ 4cτ −1 log n max(k[AT B]≥τ /4 k1 , 1)] E ≤ exp(−4cτ −1 log n) ≤ n−10 Thus, conditioned on E, the probability that Y is greater than 4cτ −1 log n max(k[AT B]≥τ /4 k1 , 1) is at most n−10 . Since Pr[E] ≤ n−6 , with probability at least 1 − n−5 , the number of triples output is O((τ −1 log n) max(k[ATB ]≥τ /4 k1 , 1)). This proves the first part. For the second part now. Fix a pair (a, b) such that A∗,a · B∗,b ≥ τ . We have E[Xa,b ] ≥ c log n. By a standard lower tail Chernoff bound, Pr[Xa,b ≥ (c/2) log n] ≤ n−10 . Thus, (a, b) is guaranteed to be generated. If event E happens, then esta,b ≥ 3τ /4. By a union bound over the complement events, with probability at least 1 − n−5 , (a, b) will be generated and output. We complete the proof by taking a union bound over all mn pairs (a, b). The first two statements of Theorem 4.1 hold by Lemma 5.1 and Lemma 5.2, and the remaining two statements follow by a straightforward calculation. Hence we skip the remainder of the proof. 6. IMPLEMENTING WHIMP We implement and deploy WHIMP in Hadoop [40], which Lemma 5.2. With probability at least 1 − 1/n over the is an open source implementation of MapReduce [14]. Our randomness of WHIMP, the following hold. The total numexperiments were run on Twitter’s production Hadoop clusber of triples output is O((τ −1 log n) max(k[ATB ]≥τ /4 k1 , 1)). ter, aspects of which have been described before in [31, 27, Furthermore, if A∗,a · B∗,b ≥ τ , (a, b) is output. 20]. In this section, we discuss our WHIMP parameter Proof. Let Xa,b,r,i be the indicator random variable for choices and some engineering details. As explained earlier, (a, b) being output in the i iteration for dimension r. The all our experiments have A = B. total It is helpful to discuss the quality measures. Suppose we P number of times that (a, b) is output is exactly Xa,b = wish to find all entries above some threshold τ > 0. Typical r,i Xa,b,r,i . By the definition of the distributions Ar and B Ar,a Br , E[Xa,b,r,i ] = kAr,∗ · r,b . Denote c(log n)kAr,∗ k1 kBr,∗ k1 /τchoices are in the range [0.1, 0.5] (cosine values are rarely k1 kBr,∗ k1 higher in our applications). The support of [AT A]≥τ is deby kr , the number of samples at dimension r. By linearity noted by Hτ , and this is the set of pairs that we wish to of expectation, find. Let the output of WHIMP be S. The natural aim is XX Ar,a Br,b to maximize both precision and recall. E[Xa,b ] = kAr,∗ k1 kBr,∗ k1 • Precision: the fraction of output that is “correct”, |Hτ ∩ r≤d i≤kr S|/|S|. X c(log n)kAr,∗ k1 kBr,∗ k1 Ar,a Br,b • Recall: the fraction of Hτ that is output, |Hτ ∩ S|/|Hτ |. = · τ kAr,∗ k1 kBr,∗ k1 r≤d There are three parameter choices in WHIMP, as described X in Theorem 4.1. We show practical settings for these param= cτ −1 log n Ar,a Br,b = cA∗,a · B∗,b τ −1 log n eters. r≤d 3 Figure 3: Precision-recall curves `, the sketch length: This appears in Step 1c of Round 1. Larger ` implies better accuracy for the SimHash sketch, and thereby leads to higher precision and recall. On the other hand, the communication in Round 3 requires emitting all sketches, and thus, it is linear in `. A rough rule of thumb is as follows: we wish to distinguish A∗,a · A∗,b = 0 from A∗,a · A∗,b > τ . (Of course, we wish for more, but this argument suffices to give reasonable values for `.) Consider a single bit of SimHash. In the former case, Pr[h(A∗,a ) = h(A∗,b ) = 1/2, while in the latter case Pr[h(A∗,a ) = h(A∗,b) ] = 1 − θa,b /π = cos−1 (A∗,a · A∗,b )/π ≥ 1 − cos−1 (τ )/π. It is convenient to express the latter as Pr[h(A∗,a ) = h(A∗,b )] ≥ 1/2 + δ, where δ = 1/2 − cos−1 (τ )/π. Standard binomial tail bounds tells us that 1/δ 2 independent SimHash bits are necessary to distinguish the two cases. For convergence, at least one order of magnitude more samples are required, so ` should be around 10/δ 2 . Plugging in some values, for τ = 0.1, δ = 0.03, and ` should be 11, 000. For τ = 0.2, we get ` to be 2, 400. In general, the size of ` is around 1 kilobyte. s, the oversampling factor: This parameter appears in Step 1b of Round 3, and determines the number of wedge samples generated. The easiest way to think about s is in terms of vanilla wedge sampling. Going through the calculations, the total numberP of wedge samples (over the entire procedure) is exactly s r kAr,∗ k1 kAr,∗ k1 = skAT Ak1 . Fix a pair (a, b) ∈ Hτ , with dot product exactly τ . The probability that a single wedge sample produces (a, b) is A∗,a · A∗,b /kAT Ak1 = τ /kAT Ak1 . Thus, WHIMP generates this pair (expected) τ /kAT Ak1 × skAT Ak1 = τ s times. The more samples we choose, the higher likelihood of finding a pair (a, b) ∈ Sτ . On the other hand, observe that pairs in Hτ are generated τ s times, and increasing s increases the communication in Round 3. Thus, we require s to be at least 1/τ , and our rule of thumb is 10/τ to get convergence. σ, the filtering value: This is used in the final operation, Step 1(b)v, and decides which pairs are actually output. The effect of σ is coupled with the accuracy of the SimHash sketch. If the SimHash estimate is perfect, then σ should just be τ . In practice, we modify σ to account for SimHash error. Higher σ imposes a stricter filer and improves precision at the cost of recall. And the opposite happens for lower σ. In most runs, we simply set σ = τ . We vary σ to generate precision-recall curves. 7. EXPERIMENTAL SETUP As mentioned earlier, we run all experiments on Twitter’s Hadoop cluster. All the code for this work was written in Scalding, which is Twitter’s Scala API to Cascading, an open-source framework for building dataflows that can be executed on Hadoop. These are all mature production systems, aspects of which have been discussed in detail elsewhere [31, 27, 20]. Datasets: We choose four large datasets. Two of them, clueweb and eu are webgraphs. The dataset friendster is a social network, and is available from the Stanford Large Network Dataset Collection [28]. The two webgraphs were obtained from the LAW graph repository [8, 9]. Apart from these public datasets, we also report results on our proprietary dataset, flock, which is the Twitter follow graph. We interpret the graph as vectors in the following way. For each vertex, we take the incidence vector of the inneighborhood. Thus, two vertices are similar if they are followed by a similar set of other vertices. This is an extremely important signal for Twitter’s recommendation system [21], our main motivating problem. For consistency, we apply the same viewpoint to all the datasets. We apply a standard cleaning procedure (for similarity) and remove high out-degrees. In other words, if some vertex v has more than 10K followers (outdegree > 10K), we remove all these edges. (We do not remove the vertex, but rather only its out-edges.) Intuitively, the fact that two vertices are followed by v is not a useful signal for similarity. In flock and friendster, such vertices are typically spammers and should be ignored. For webgraphs, a page linking to more than 10K other pages is probably not useful for similarity measurement. Dataset friendster clueweb eu flock Dimensions n = d 65M 978M 1.1B - Size (nnz) 1.6B 42B 84B O(100B) |AT A|1 7.2E9 6.8E10 1.9E11 5.1E12 Table 1: Details on Datasets We give the size of the datasets in Tab. 1. (This is after cleaning, which removes at most 5% of the edges. Exact sizes for flock cannot be revealed but we do report aggregate results where possible.) Since the underlying matrix A is square, n = d. All instances have at least a billion non-zeros. To give a sense of scale, the raw storage of 40B Figure 4: Per-user precision-recall histograms for τ = 0.4 non-zeros (as a list of edges/pairs, each of which is two longs) is roughly half a terrabyte. This is beyond the memory of most commodity machines or nodes in a small cluster, underscoring the challenge in designing distributed algorithms. Parameters: We set the parameters of WHIMP as follows. Our focus is typically on τ > 0.1, though we shall present results for varying τ ∈ [0.1, 0.5]. The sketch length ` is 8192 (1KB sketch size); the oversampling factor s is 150; σ is just τ . For getting precision-recall curves, we vary σ, as discussed in §6. Evaluation: Computing AT A exactly is infeasible at these sizes. A natural evaluation would be pick a random sample of vertices and determine all similar vertices for each vertex in the sample. (In terms of matrices, this involves sampling columns of A to get a thinner matrix B, and then computing AT B explicitly). Then, we look at the output of WHIMP and measure the number of similar pairs (among this sample) it found. An issue with pure uniform sampling is that most vertices tend to be low degree (the columns have high sparsity). In recommendation applications, we care for accurate behavior at all scales. We perform a stratified sampling of columns to generate ground truth. For integer i, we create a bucket with all vertices whose indegree (vector sparsity) is in the range [10i , 10i+1 ). We then uniformly sample 1000 vertices from each bucket to get a stratified sample of vertices/columns. All evaluation is performed with respect to the exact results for this stratified sample. 8. EXPERIMENTAL RESULTS Precision-recall curves: We use threshold τ of 0.2, 0.4, 0.6. We compute precision-recall curves for WHIMP on all the datasets, and present the results in Fig. 3. Observe the high quality results on clueweb, eu, and friendster: for τ ≥ 0.4, the results are near perfect. The worst behavior is that of flock, which still dominates a precision and recall of 0.7 in all cases. Thus, WHIMP is near perfect when nnz(A) has substantially fewer than 100B entries (as our theory predicts). The extreme size of flock probably requires even larger parameter settings to get near perfect results. Per-vertex results: In recommendation applications, global precision/recall is less relevant that per-user results. Can we find similar neighbors for most users, or alternately, for how many users can we provide accurate results? This is more stringent quality metric than just the number of entries in [AT A]≥τ obtained. Figure 5: Split-up of shuffle over various rounds for WHIMP Dataset friendster clueweb eu flock WHIMP (TB) 4.9 90.1 225.0 287.0 DISCO est. (TB) 26.2 247.4 691.2 18553.7 kAT Ak1 7.2e+09 6.8e+10 1.9e+11 5.1e+12 Table 2: Total communication/shuffle cost of WHIMP In the following experiment, we simply set the filtering value σ to be τ . We vary τ in 0.2, 0.4, etc. For each dataset and each vertex in the evaluation sample, (generation described in §7) we compute the precision and recall for WHIMP just for the similar vertices of the sample vertex. We just focus on the minimum of the precision and recall (this is a lower bound on any Fβ score, and is a conservative measure). The cumulative (over the sample) histogram of the minimum of the precision and recall is plotted in Fig. 4. Just for clarity, we give an equivalent description in terms of matrices. We compute the (minimum of) precision and recall of entries above τ in a specific (sampled) column of AT A. We plot the cumulative histogram over sampled columns. For space reasons, we only show the results for τ = 0.4 and ignore the smallest dataset, friendster. The results for clueweb and eu are incredibly accurate: for more than 90% of the sample, both precision and recall are above 0.8, regardless of τ . The results for flock are extremely good, but not nearly as accurate. WHIMP gets a precision and recall above 0.7 for at least 75% of the sample. We stress the low values of cosine similarities here: a similarity of 0.2 is well-below the values studied in recent LSH-based results [37, 39, 38]. It is well-known that low similarity values are harder to detect, yet WHIMP gets accurate results for an overwhelming majority of the vertices/users. Shuffle cost of WHIMP: The main impetus behind WHIMP was to get an algorithm with low shuffle cost. Rounds 1 and 2 only shuffle the input data (and a small factor over it), and do not pose a bottleneck. Round 3 has two major shuffling steps. • Shuffling the sketches: In Step 1a, the sketches are communicated. The total cost is the sum of sizes of all sketches, which is `nnz(A). • Shuffling the candidates that are output: In Step 1(b)v, the candidates large entries are output. There is an important point here that is irrelevant in the theoretical description. We perform a deduplication step to output entries only once. This requires a shuffle step after which the final output is generated. We split communication into three parts: the sketch shuffle, the candidate shuffle, and the final (deduped) output. The total of all these is presented in Tab. 2. (We stress that this is not shuffled together.) The split-up between the various parts is show in in Fig. 5. Observe that the sketch and candidate shuffle are roughly equal. For friendster and flock, the (deduped) output is itself more than 10% of the total shuffle. This (weakly) justifies the optimality Theorem 4.1 in these cases, since the total communication is at most an order of magnitude more than the desired output. For the other cases, the output is between 3-5% of the total shuffle. Comparisons with existing art: No other algorithm works at this scale, and we were not able to deploy anything else for such large datasets. Nonetheless, given the parameters of the datasets, we can mathematically argue against other approaches. • Wedge sampling of Cohen-Lewis [11], DISCO [43]: Distributed version of wedge sampling were given by Zadeh and Goel in their DISCO algorithm [43]. But it cannot scale to these sizes. DISCO is equivalent to using Round 2 of WHIMPto set up weights, and then running Round 3 without any filtering step (Step 1(b)v). Then, we would look for all pairs (a, b) that have been emitted sufficiently many times, and make those the final output. In this case, CPU and shuffle costs are basically identical, since any candidate generated is emitted. Consider (a, b) such that A∗,a · A∗,b = τ . By the wedge sampling calculations, skAT Ak1 wedge samples would generate (a, b) an expected sτ times. We would need to ensure that this is concentrated well, since we finally output pairs generated often enough. In our experience, setting s = 50/τ is the bare minimum to get precision/recall more than 0.8. Note that WHIMP only needs to generate such a wedge sample once, since Step 1(b)v is then guaranteed to output it (assuming SimHash is accurate). But vanilla wedge sampling must generate (a, b) with a frequency close to its expectation. Thus, WHIMP can set s closer to (say) 10/τ , but this is not enough for the convergence of wedge sampling. But all the wedges have to be shuffled, and this leads to 10kAT Ak1 /τ wedges being shuffled. Each wedge is two longs (using standard representations), and that gives a ballpark estimate of 160kAT Ak1 /τ . We definitely care about τ = 0.2, and WHIMP generates results for this setting (Fig. 3). We compute this value for the various datasets in Tab. 2, and present it as the estimated shuffle cost for DISCO. Observe that it is significantly large than the total shuffle cost of WHIMP, which is actually split roughly equally into two parts (Fig. 5). The wedge shuffles discussed above are most naturally done in a single round. To shuffle more than Table 3: Top similar results for a few Twitter accounts, generated from WHIMP on flock. Users similar to @www2016ca Rank Twitter @handle Score 1 @WSDMSocial 0.268 2 @WWWfirenze 0.213 3 @SIGIR2016 0.190 4 @ecir2016 0.175 5 @WSDM2015 0.155 Users similar to @duncanjwatts Rank Twitter @handle Score 1 @ladamic 0.287 2 @davidlazer 0.286 3 @barabasi 0.284 4 @jure 0.218 5 @net science 0.200 Users similar to @POTUS Rank Twitter @handle Score 1 @FLOTUS 0.387 2 @HillaryClinton 0.368 3 @billclinton 0.308 4 @BernieSanders 0.280 5 @WhiteHouse 0.267 200TB would require a more complex algorithm that splits the wedge samples into various rounds. For eu and flock, the numbers are more than 1000TB, and completely beyond the possibility of engineering. We note that friendster can probably be handled by the DISCO algorithm. • Locality-Sensitive Hashing [24, 37]: LSH is an important method for nearest neighbor search. Unfortunately, it does not perform well when similarities are low but still significant (say τ = 0.2). Furthermore, it is well-known to require large memory overhead. The basic idea is to hash every vector into a “bucket” using, say, a small (like 8-bit) SimHash sketch. The similarity is explicitly computed on all pairs of vectors in a bucket, i.e. those with the same sketch value. This process is repeated with a large number of hash functions to ensure that most similar pairs are found. Using SimHash, the mathematics says roughly the following. (We refer the reader to important LSH papers for more details [24, 18, 3, 37].) Let the probability of two similar vectors (with cosine similarity above 0.2) having the same SimHash value be denoted P1 . Let the corresponding probability for two vectors with similarity zero by P2 . By the SimHash calculations of §6, P1 = 1/2−cos−1 (0.2)/π ≈ 0.56, while P2 = 0.5. This difference measures the “gap” obtained by the SimHash function. The LSH formula basically tells us that the total storage of all the hashes is (at least) n1+(log P1 )/(log P2 ) bytes. This comes out to be n1.83 . Assuming that n is around 1 billion, the total storage is 26K TB. This is astronomically large, and even reducing this by a factor of hundred is insufficient for feasibility. Case Study: In addition to the demonstration of the algorithm’s performance in terms of raw precision and recall, we also showcase some examples to illustrate the practical effectiveness of the approach. Some of these results are presented in Table 3. First, note that the cosine score values that generate the results are around 0.2, which provides justification for our focus on generating results with these values. Furthermore, note that even at these values, the results are quite interpretable and clearly find similar users: for the @www2016ca account, it finds accounts for other related social networks and data mining conferences. For @duncanjwatts, who is a network science researcher, the algorithm finds other network science researchers. And finally, an example of a very popular user is @POTUS, for whom the algorithm finds clearly very related accounts. 9. [16] REFERENCES [1] L. Adamic and E. Adar. Friends and neighbors on the web. Social Networks, 25(3):211–230, 2003. [2] R. R. Amossen and R. Pagh. Faster join-projects and sparse matrix multiplications. In ICDT ’09: Proc. 12th Intl. Conf. on Database Theory, pages 121–126, 2009. [3] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Comm. of the ACM, 1:117–122, 2008. [4] A. Andoni, P. Indyk, T. Laarhoven, I. P. Razenshteyn, and L. Schmidt. Practical and optimal LSH for angular distance. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1225–1233, 2015. [5] F. Angiulli and C. Pizzuti. An approximate algorithm for top-k closest pairs join query in large high dimensional data. Data & Knowledge Engineering, 53(3):263–281, June 2005. [6] G. Ballard, T. G. Kolda, A. Pinar, and C. Seshadhri. Diamond sampling for approximate maximum all-pairs dot-product (MAD) search. In International Conference on Data Mining, pages 11–20, 2015. [7] M.-A. Belabbas and P. Wolfe. On sparse representations of linear operators and the approximation of matrix products. In CISS 2008: 42nd Annual Conf. on Information Sciences and Systems, pages 258–263, Mar. 2008. [8] P. Boldi, M. Rosa, M. Santini, and S. Vigna. Layered label propagation: A multiresolution coordinate-free ordering for compressing social networks. In S. Srinivasan, K. Ramamritham, A. Kumar, M. P. Ravindra, E. Bertino, and R. Kumar, editors, Conference on World Wide Web (WWW), pages 587–596. ACM Press, 2011. [9] P. Boldi and S. Vigna. The WebGraph framework I: Compression techniques. In Conference on World Wide Web, pages 595–601, Manhattan, USA, 2004. ACM Press. [10] M. Charikar. Similarity estimation techniques from rounding algorithms. In Symposium on Theory of Computing, pages 380–388, 2002. [11] E. Cohen and D. D. Lewis. Approximating matrix multiplication for pattern recognition tasks. J. Algorithms, 30(2):211–252, 1999. [12] A. S. Das, M. Datar, A. Garg, and S. Rajaram. Google news personalization: scalable online collaborative filtering. In Proceedings of World Wide Web, pages 271–280, 2007. [13] T. Davis. Direct Methods for Sparse Linear Systems. SIAM, 2006. [14] J. Dean and S. Ghemawat. Mapreduce: simplified data processing on large clusters. Communications of the ACM, 51(1):107–113, 2008. [15] P. Drineas and R. Kannan. Fast monte-carlo algorithms for approximate matrix multiplication. In [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] FoCS’01: Proc. 42nd IEEE Symposium on Foundations of Computer Science, pages 452–459, Oct. 2001. P. Drineas, R. Kannan, and M. W. Mahoney. Fast Monte Carlo algorithms for matrices I: Approximating matrix multiplication. SIAM Journal on Computing, 36(1):132–157, Jan. 2006. P. Drineas and M. W. Mahoney. On the Nyström method for approximating a gram matrix for improved kernel-based learning. J. Mach. Learn. Res., 6:2153–2175, Dec. 2005. A. Gionis, P. Indyk, and R. Motwani. Similarity search in high dimensions via hashing. In Proceedings of VLDB, pages 518–529, 1999. A. Goel and K. Munagala. Complexity measures for map-reduce, and comparison to parallel computing. arXiv preprint arXiv:1211.6526, 2012. A. Goel, A. Sharma, D. Wang, and Z. Yin. Discovering similar users on twitter. In 11th Workshop on Mining and Learning with Graphs, 2013. P. Gupta, A. Goel, J. J. Lin, A. Sharma, D. Wang, and R. Zadeh. WTF: the who to follow service at twitter. In Conference on World Wide Web, pages 505–514, 2013. F. G. Gustavson. Two fast algorithms for sparse matrices: Multiplication and permuted transposition. ACM Transactions on Mathematical Software, 4(3):250–269, Sept. 1978. J. T. Holodnak and I. C. F. Ipsen. Randomized approximation of the gram matrix: Exact computation and probabilistic bounds. SIAM Journal on Matrix Analysis and Applications, 36(1):110–137, 2015. P. Indyk and R. Motwani. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proceedings of STOC, pages 604–613, 1998. Intel. Math kernel library reference manual, 2014. Version 11.2. D. V. Kalashnikov, S. Mehrotra, and Z. Chen. Exploiting relationships for domain-independent data cleaning. In SDM’05: Proc. 2005 SIAM Intl. Conf. on Data Mining, pages 262–273, Apr. 2005. G. Lee, J. Lin, C. Liu, A. Lorek, and D. Ryaboy. The unified logging infrastructure for data analytics at twitter. Proceedings of the VLDB Endowment, 5(12):1771–1780, 2012. J. Leskovec and A. Krevl. SNAP Datasets: Stanford large network dataset collection. http://snap.stanford.edu/data, June 2014. J. Leskovec, A. Rajaraman, and J. D. Ullman. Mining of massive datasets. Cambridge University Press, 2014. D. Liben-Nowell and J. Kleinberg. The link prediction problem for social networks. Journal of the American Society for Information Science and Technology, 58(7):1019–1031, 2007. J. Lin and D. Ryaboy. Scaling big data mining infrastructure: the twitter experience. ACM SIGKDD Explorations Newsletter, 14(2):6–19, 2013. A. Magen and A. Zouzias. Low rank matrix-valued Chernoff bounds and approximate matrix [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] multiplication. In Proc. Symposium on Discrete Algorithms (SODA), pages 1422–1436, 2011. M. McPherson, L. Smith-Lovin, and J. M. Cook. Birds of a feather: Homophily in social networks. Annual review of sociology, pages 415–444, 2001. R. Pagh. Compressed matrix multiplication. ACM Transactions on Computation Theory (TOCT), 5(3):1–17, Aug. 2013. F. Ricci, L. Rokach, and B. Shapira. Introduction to recommender systems handbook. Springer, 2011. T. Sarlós. Improved approximation algorithms for large matrices via random projections. In Proceedings of Foundations of Computer Science, pages 143–152, Oct. 2006. A. Shrivastava and P. Li. Asymmetric LSH (ALSH) for sublinear time maximum inner product search (MIPS). In NIPS 2014: Advances in Neural Information Processing Systems 27, pages 2321–2329, 2014. A. Shrivastava and P. Li. Asymmetric minwise hashing for indexing binary inner products and set containment. In Conference on World Wide Web (WWW), pages 981–991, 2015. A. Shrivastava and P. Li. Improved asymmetric locality sensitive hashing (ALSH) for maximum inner product search (MIPS). In Conference on Uncertainty in Artificial Intelligence (UAI), pages 812–821, 2015. K. Shvachko, H. Kuang, S. Radia, and R. Chansler. The hadoop distributed file system. In 2010 IEEE 26th symposium on mass storage systems and technologies (MSST), pages 1–10. IEEE, 2010. R. Xiang, J. Neville, and M. Rogati. Modeling relationship strength in online social networks. In Proceedings of the 19th international conference on World wide web, pages 981–990. ACM, 2010. X. Yan, P. S. Yu, and J. Han. Substructure similarity search in graph databases. In Proceedings of the 2005 ACM SIGMOD international conference on Management of data, pages 766–777. ACM, 2005. R. B. Zadeh and A. Goel. Dimension independent similarity computation. Journal of Machine Learning Research, 14(1):1605–1626, 2013.
8cs.DS
A note about irreducibility of a resultant Beata Hejmej∗ arXiv:1801.05714v1 [math.AC] 17 Jan 2018 January 18, 2018 Abstract We present a theorem about irreducibility of a polynomial that is the resultant of two others polynomials. The proof of this fact is based on the field theory. We also consider the converse theorem and some examples. Keywords: Galois theory, separable extension, embedding, polynomial, irreducibility, resultant. AMS Subject Classification: 12F10, 12E05, 13P15 1 Preliminaries At the beginning, we recall some basic definitions and facts from the field theory. Every nonzero homomorphism of fields is called an embedding. For a field extension F < E and an embedding σ : F ֒→ L, an embedding σ̄ : E ֒→ L such that σ̄|F = σ is called an extension of σ. An extension of the identity map F ֒→ F < L is called an F –embedding. If σ : F ֒→ E is an embedding and f = an X n + · · · + a0 ∈ F [X], then we set f σ := σ(an )X n + · · · + σ(a0 ) ∈ E[X]. We say that E is a splitting field over F of a family F ⊂ F [X] if every polynomial f ∈ F splits over E and E = F (S), where S is the set of all roots of polynomials from the family F (we assume that S ⊂ F̄ , the algebraic closure of F ). An algebraic extension F < E, where E < F̄ , is said to be normal if E is a splitting field of some family F ⊂ F [X]. In this situation we also say that E is normal over F . Consider a field extension F < E. The set Gal(E/F ) of all F –automorphisms of E is a group under the composition of mappings, which we call the Galois group of the extension F < E. Let f be a polynomial over a field F . We define the Galois group of the polynomial f as the Galois group of the extension F < Lf , where Lf is the splitting field of f . We denote this group by Gal(f ). It acts on the set Zf of all roots of f by an obvious way. The following theorem collects some well known properties of extension of fields, all of which can be found in [3]. Theorem 1.1. Assume that F < E is an algebraic field extension and L is an algebraically closed field. Then: e-mail: [email protected], Department of Mathematics, Pedagogical University of Cracow, Podchorążych 2, PL-30-084 Kraków, POLAND ∗ 1 (i) Let α ∈ E and mα,F be the minimal polynomial of α over F . If σ : F ֒→ L is an embedding and β ∈ L is a root of mσα,F , then σ can be extended to an embedding σ̄ : E ֒→ L such that σ̄(α) = β. (ii) If E < F̄ , then F < E is normal if and only if every F –embedding E ֒→ F̄ is an automorphism of E. We need a slight generalization of a well known property of the Galois group. Theorem 1.2. Let f be a monic polynomial over a field F , deg f > 0. Then Gal(f ) acts transitively on the set of all roots of the polynomial f if and only if f is a power of some monic irreducible polynomial. Proof. Assume that Gal(f ) acts transitively on the set Zf of all roots of the polynomial f . Let f1 , . . . , fs ∈ F [X] be all distinct irreducible factors of f (all of them are monic). Take ri ∈ Zfi , rj ∈ Zfj . Then ri , rj ∈ Zf and according to our assumption there exists an automorphism σ ∈ Gal(f ) such that σ(ri ) = rj . Thus 0 = σ(fi (ri )) = fi (rj ). It follows that fj |fi , so fi = fj . This implies that f is a power of a monic irreducible polynomial. Conversely, assume that f is a power of a monic irreducible polynomial g ∈ F [X]. Then Zf = Zg and g is the minimal polynomial of every element of Zf . Take ri , rj ∈ Zf . Since the extension F < Lf is algebraic, the identity F ֒→ F can be extended to an F – embedding σ : Lf ֒→ F such that σ(ri ) = rj (Theorem 1.1(i)). According to the normality of the extension F < Lf , the F –embedding σ must be an element of the group Gal(f ) (Theorem 1.1(ii)). Therefore Gal(f ) acts transitively on the set Zf . 2 Main theorem Let k be a field and ResY (f, g) denote the resultant of polynomials f, g ∈ k[Y, T ] with respect to the variable Y . Theorem 2.1. Let f, g ∈ k[Y ] be monic. If g is irreducible in the ring k[Y ] then the polynomial h = (−1)deg g ResY (g, f − T ) ∈ k[T ] is a power of some irreducible polynomial. Q Proof. Let Zg = {y1 , . . . , ym }. Observe that h = m i=1 (T − f (yi )), so Zh = {f (yi ) : i = 1, . . . , m}. Set Lg := k(y1 , . . . , ym ) and Lh := k(f (y1 ), . . . , f (ym)). It is obvious that k ⊂ Lh ⊂ Lg ⊂ k̄. Take i, j ∈ {1, . . . , m}. Since the polynomial g is irreducible, Theorem 1.2 implies that the action of Gal(g) on the set Zg is transitive. It follows that σ(yi ) = yj for some σ ∈ Gal(g). Therefore σ|Lh : Lh ֒→ k is a k–embedding. The extension k < Lh is normal, so according to Theorem 1.1(ii), we have that σ|Lh is a k–automorphism of Lh . Thus τ := σ|Lh ∈ Gal(h) and τ (f (yi )) = σ(f (yi )) = f (σ(yi )) = f (yj ). It means that Gal(h) acts transitively on the set Zh and by Theorem 1.2 the statement follows. Now, we present some examples connected with the converse theorem. The first example shows that, in general, the converse to Theorem 2.1 does not hold. Example 2.2. Let f = Y 2 − X 3 ∈ C((X))[Y ] and g = (Y 2 − X 3 )2 − X 7 ∈ C((X))[Y ]. Then h = (T 2 − X 7 )2 ∈ C((X))[T ] is the square of the irreducible polynomial, but g has two irreducible factors in C((X))[Y ] (see [1]). (Here C((X)) denotes the quotient field of the ring C[[X]] of formal power series.) 2 If we assume that h is irreducible, then the converse to Theorem 2.1 holds. Corollary 2.3. Let f, g ∈ k[Y ] be monic. If h = (−1)deg g ResY (g, f − T ) ∈ k[T ] is irreducible, then g is also irreducible. Proof. Assume that g = g1 · · · gs , where k > 1 and g1 , . . . , gs ∈ k[Y ] are monic and irreducible. Then h = (−1)deg g ResY (g1 , f − T ) · · · ResY (gs , f − T ). Since g1 , . . . , gs are monic and irreducible over k, Theorem 2.1 implies that each ResY (gi , f − T ) is a power of some irreducible polynomial. This means that h is reducible in k[T ]. Consider the following example. Example 2.4. Let f = Y 2 −X 3 and g = (Y 2 −X 3 )2 −X 5 Y be polynomials over the field C((X)). Let w(i, j) := 4i + 13j be a weight. Then the initial quasi-homogeneous part of h = T 4 − X 10 T − X 13 ∈ C[[X, T ]] is equal to T 4 − X 13 . Since the integers 4 and 13 are coprime, the polynomial T 4 − X 13 is irreducible in the ring C[X, T ]. Therefore Hensel’s Lemma (see [2, Lemma A1]) implies that h is irreducible in the ring C((X))[T ]. By Corollary 2.3 the polynomial g is irreducible over C((X)). Remark 2.5. Polynomials g1 = (Y 2 − X 3 )2 − X 7 and g2 = (Y 2 − X 3 )2 − X 5 Y are taken from [1]. Both were proposed by Tzee-Char Kuo. Acknowledgements. The author would like to thank Professors Evelia Rosa García Barroso, Janusz Gwoździewicz and Kamil Rusek for useful comments and helpful suggestions concerning this paper. References [1] S. S. Abhyankar, Irreducibility criterion for germs of analytic functions of two complex variables, Adv. Math. 74 (1989), 190–257. [2] E. Artal Bartolo, I. Luengo, A. Melle-Hernández, High-school algebra of the theory of dicritical divisors: atypical fibers for special pencils and polynomials, J. Algebra Appl. 14 (2015), no. 9, 1–26 p. [3] S. Roman, Field Theory, Springer, New York, 2005. 3
0math.AC
Understanding Human Behaviors in Crowds by Imitating the Decision-Making Process Haosheng Zou, Hang Su, Shihong Song, Jun Zhu∗ arXiv:1801.08391v1 [cs.CV] 25 Jan 2018 Dept. of Comp. Sci. & Tech., State Key Lab of Intell. Tech. & Sys., TNList Lab, CBICR Center Tsinghua University, Beijing, China {zouhs16@mails, suhangss@mail, songsh15@mails, dcszj@mail}.tsinghua.edu.cn Abstract Crowd behavior understanding is crucial yet challenging across a wide range of applications, since crowd behavior is inherently determined by a sequential decision-making process based on various factors, such as the pedestrians’ own destinations, interaction with nearby pedestrians and anticipation of upcoming events. In this paper, we propose a novel framework of Social-Aware Generative Adversarial Imitation Learning (SA-GAIL) to mimic the underlying decisionmaking process of pedestrians in crowds. Specifically, we infer the latent factors of human decision-making process in an unsupervised manner by extending the Generative Adversarial Imitation Learning framework to anticipate future paths of pedestrians. Different factors of human decision making are disentangled with mutual information maximization, with the process modeled by collision avoidance regularization and Social-Aware LSTMs. Experimental results demonstrate the potential of our framework in disentangling the latent decision-making factors of pedestrians and stronger abilities in predicting future trajectories. 1 Introduction With the increase of population and diversity of human activities, accurate analysis of human behaviors in crowds becomes an essential requirement across a wide range of domains, e.g., visual surveillance (Shao, Loy, and Wang 2014; Shao et al. 2015), robot navigation in crowds (Robicquet et al. 2016), etc. Recently, there has been a growing interest in developing computational methodologies for modeling crowd behaviors, including visual representations (Zhou, Wang, and Tang 2011; Luber et al. 2010; Zhou, Wang, and Tang 2012; Rodriguez, Ali, and Kanade 2009), detection of abnormal behaviors (Mehran, Oyama, and Shah 2009) and modeling interaction among pedestrians (Andriluka and Sigal 2012). Despite these strong needs, the complexities of crowded scenes such as frequent occlusions among pedestrians and large variations of human behaviors across spacetime severely impede the implementation of conventional algorithms. A lot of efforts have been made to address these ∗ Corresponding author. The work was supported by the National NSF of China Projects (Nos. 61571261, 61620106010, 61621136008). Copyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. SocialAware Intention Exit Figure 1: Left: Illustration of an imitating decision-making process. The dashed white rectangle indicates the pedestrian of interest. The black segment is her observed trajectory. Controlled by a latent code, the process generates different future trajectories in red, green and blue. Right: Data of sufficient pedestrians reveal the local approximate motion trend (yellow arrows) towards the exit in the bottom left corner. We infer this exit to be the intention of this pedestrian (denoted white disc). However, to accommodate for nearby pedestrians (purple discs), other assignments of the latent code generate more social-aware trajectories. issues by leveraging the recent advances in deep learning (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016; Lee et al. 2017). However, these methods only learn the general historical motion statistics of a scene, without deeper investigation into humans in crowds. Without more thorough modeling, learning crowd behaviors from videos remains difficult partly because the individual motion is affected by many factors that are not directly captured by videos. Human behaviors in crowds are inherently determined by a sequential decision-making process according to the persons of interest, environments and social rules (Ali 2008; Xie et al. 2017). In general, pedestrians first decide their destinations, pick paths by considering the neighboring crowd state, and constantly make minor modifications to follow the majority or avoid collision (see Fig. 1 (Right) for example). This cognitively-based method was popularly used in crowd simulation previously (Yu and Terzopoulos 2007; Pellegrini et al. 2009). Nevertheless, only a few attempts have been made on vision-based analysis, which resort to simplified rules, energy functions (Pellegrini et al. 2009; Xie et al. 2017) and grid-based planning (Ziebart et al. 2009), with large amounts of hand-crafted design and specification of dynamics and features. Admittedly, inferring the aforementioned decisionmaking process of pedestrians is challenging since it is complex and determined by various factors, including personal intentions, neighboring pedestrians, and physical obstacles (Pellegrini et al. 2009). The interaction with neighboring pedestrians has been modeled by social pooling layers (Alahi et al. 2016; Lee et al. 2017) and coherently regularized RNNs (Zhou, Tang, and Wang 2012; Su et al. 2016). However, the pedestrian’s own intention, though plays a key role as the internal driving force of human behaviors (Ziebart et al. 2009; Monfort, Liu, and Ziebart 2015; Xie et al. 2017), remains to be better modeled. In addition to the quantities of the decision-making factors, the way that humans consider these factors before making decisions is also not well exploited. Humans do not simply act responsively to them. They also anticipate future states and induce the current action backwards. One typical example is when two people travel in orthogonal directions, they constantly locate each other to forecast whether they will collide. This innate ability of humans to simulate what is about to happen before taking actions is missing in almost all recent works. 1.1 Our proposal Different from previous algorithms based on the statistics of visual appearance, we propose a novel Social-Aware Generative Adversarial Imitation Learning (SA-GAIL) framework to understand crowd behaviors by inferring the decisionmaking process of pedestrians in crowds. Specifically, we infer the humans’ decision-making process by anticipating their future paths as illustrated in Fig. 1, which requires a deeper understanding of the behaviors in determining not only what the activity is but also how the activity should be unfolded. To this end, we imitate human behaviors from the observed trajectories by extending the recent framework of Generative Adversarial Imitation Learning (GAIL) (Ho and Ermon 2016), which is capable of training generic neural network policies to produce expert-like movement patterns from limited demonstrations. Compared with existing supervised learning methods (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016; Lee et al. 2017), Imitation Learning (IL), especially GAIL, fits in more naturally for the human decision-making process (Li, Song, and Ermon 2017) since it enjoys both a sound theoretical analysis and efficient training. In particular, the numerous human trajectories in the training set are regarded as expert demonstrations, which reflect the human decision-making process in a crowded scenario. Following GAIL, we devise a generator (policy) based on the recurrent encoder-decoder framework which tries to generate behaviors matching the expert demonstrations, and a discriminator which tries to distinguish the generated trajectories from expert demonstrations. The generator and discriminator are jointly optimized as playing an adversarial minimax game. To properly model the pedestrians’ latent intentions, it is natural to first disentangle the latent intention from other social factors. To address this, we propose to learn semantically meaningful latent codes that reflect different factors of the decision-making process. Specifically, the objective function of GAIL (Ho and Ermon 2016) is further augmented with a mutual information term between the latent codes and the generated paths (Chen et al. 2016; Li, Song, and Ermon 2017). This modification is based on the observation that pedestrians with the same entrance and destination may still behave differently, because they face different neighborhood conditions. The latent codes thus provide an elegant way to represent such diversity, with one setting expectedly corresponding to the policy to walk straight to the destination, and others corresponding to the influence of neighbors, as illustrated by the outputs in Fig. 1 (Left). It’s noteworthy that the disentangled latent representations are learned in an unsupervised manner without any human labeling of the different factors. This is different from the traditional physics-inspired Social Force model (Helbing, Farkas, and Vicsek 2000; Mehran, Oyama, and Shah 2009), where different forces driving pedestrians moving are defined in a hand-crafted fashion. We further imitate the human decision-making process by introducing human’s ability of world simulation into SAGAIL. Here, we mainly consider the instinct of collision avoidance. Inspired by the ORCA framework (Van Den Berg et al. 2011) in crowd simulation, we propose an original communication-simulation mechanism across pedestrians. Each pedestrian propagates his/her desired candidate action to nearby pedestrians, and only executes it when no collision is detected. The pedestrians will make an efficient move to avoid pending collisions in advance with minimal effort. In this paper, we assume that pedestrians choose the paths with a minimal amount of movement and turning effort upon interacting with each other, which behaves like people observing neighbors and acting accordingly. Extensive experiments demonstrate that SA-GAIL can not only understand the present crowd behaviors but also predict their future paths after penetrating into the underlying decision-making process. To summarize, our main contributions are: 1. We present a first attempt to apply a novel data-driven Imitation Learning framework to model the sequential decision-making process of pedestrian behaviors. With the imitation process, we reason about and model crowd motion from a perspective more similar to human decision-making. 2. The different factors of pedestrian decision-making are disentangled in an unsupervised manner with mutual information maximization. We specifically infer the human intentions apart from human-human interactions, endowing the policy with certain interpretability. 3. We bring the idea of world simulation into behavior understanding by introducing a collision avoidance regularization which does not jeopardize neural network training. Our model behaves more human-like and avoids predicting intuitively unreasonable paths. social aware Generator ht A xt Fusion RNN Encoder Observed Trajectories Discriminator ht A xt Ground-truth Trajectories RNN RNN Decoder Generated Trajectories Fully Connected collision avoidance RNN Loss Posterior Estimator Latent Control Code: c Figure 2: Overview of our proposed SA-GAIL. Observed trajectories are fed into the policy to generate future paths. The policy/generator adopts an encoder-decoder architecture where latent codes could be fused with the decoder, augmented with a collision avoidance regularization and social awareness. The generated paths, concatenated with the observed ones, are then fed into the discriminator to guide the generator training and into the posterior to recover the latent code. 2 Methodology To model the decision-making process of pedestrian behaviors, we propose SA-GAIL for crowd behavior understanding. In this section, we first formulate the problem and overview the general framework of SA-GAIL; then, we describe each component of the architectures; finally we introduce the optimization techniques for trajectory prediction and intention inference, respectively. eterize as a Recurrent Neural Network (RNN). It generates actions in an auto-regressive manner: ŷt = G(x1 , ..., xT1 , ŷT1 +1 , ..., ŷt−1 ), ∀T1 < t ≤ T1 + T2 . When trained to perform intention inference, we also inject a latent code c to the policy to control its output: ŷt = G(c; x1 , ..., xT1 , ŷT1 +1 , ..., ŷt−1 ), ∀T1 < t ≤ T1 + T2 . We design three Social-Aware components into G: 2.1 Problem Formulation We implement behavior understanding via motion prediction, i.e., given an observed trajectory of length T1 , forecast the future trajectory of length T2 . The trajectories are already obtained from tracking in the format of sequences of coordinates, with the observed trajectory of pedestrian i being Xi = {x1 , x2 , ..., xT1 } and his/her ground-truth future trajectory being Yi = {yT1 +1 , yT1 +2 , ..., yT1 +T2 }. Each xi and yi is a two-dimensional coordinate in the video image. Instead of treating trajectory prediction as sequence-tosequence mapping (Su et al. 2016; 2017; Alahi et al. 2016; Lee et al. 2017), we tackle it from a decision-making perspective. Borrowing the notion of states and actions in MDP (Markov Decision Process), we have a policy generating actions Ŷi conditioned on previous states, where states correspond to previous coordinates of the trajectory and actions correspond to the pedestrian’s next position. In addition to generating one trajectory per person as existing works do (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016), we also generate multiple trajectories to visualize intention inference. 2.2 System Overview As shown in Figure 2, SA-GAIL has three constituent networks, namely the policy/generator G, the discriminator D and the variational posterior estimator Q. The three networks are jointly optimized with Imitation Learning (IL) to deconstruct the underlying decision-making process. Specifically, the policy G takes as input the observed trajectories and generates future trajectories, which we param- • Intention inference with latent code • Collision avoidance regularization with simulation • Social-Aware LSTMs for human-human interaction The obtained full trajectories from G, merging the observed and generated parts, are then fed to 1) the discriminator D to output a score and 2) the posterior Q to try to recover the latent code injected to the generator before policy execution. The generator and discriminator are jointly optimized with GAIL (Ho and Ermon 2016) in the form of an adversarial minimax game as GAN (Goodfellow et al. 2014):     min max E log D([Xi , Yi ]) + E log(1 − D([Xi , Ŷi ])) . G D The posterior estimator is further optimized together with the generator to maximize the mutual information (Chen et al. 2016) between the generated paths and the injected code: I([Xi , Ŷi ]; c) = H(c) − H(c|[Xi , Ŷi ]), where H(·) is entropy. The policy will then be controlled by the latent code to generate interpretable trajectories to some extent as performing intention inference. 2.3 Generator/Policy Design The generator, acting as the policy for the decision-making process, should intuitively grasp a fair understanding of the previous states to decide its next action. However, the sequential nature of pedestrian trajectories poses practical challenges for conventional feed-forward neural policies (Ho and Ermon 2016; Li, Song, and Ermon 2017) to reason about the status of each individual as well as the dynamic interaction between them. Towards this end, we propose the generator G with an architecture inspired by the encoder-decoder model (Cho et al. 2014; Sutskever, Vinyals, and Le 2014) to account for the sequential nature, as depicted by the Generator part in Figure 2. To capture the individual status from the observed trajectory, we input the observed part to the encoder RNN one coordinate per timestep, which progresses as Fullyconnected 2 units Fullyconnected 2 units Fullyconnected 2 units Fullyconnected 64 units Fullyconnected 64 units Fullyconnected 64 units RNN Decoder RNN Decoder RNN Decoder Element-wise add Fullyconnected 64 units Latent Control Code: c ht = RN Nenc (xt , ht−1 ), ∀1 ≤ t ≤ T1 . The last hidden state, hT1 , is treated as the fixed-length descriptor of the observed part of the trajectory to initialize the decoder RNN. Useful information about the pedestrian status such as his/her own navigation style and desired destination is extracted in this fixed-length vector. The decoder RNN then takes hT1 as its initial hidden state and xT1 as its first input. By recursively inputting its last generated action to itself, the decoder RNN evolves as ŷT1 +1 , hT1 +1 ŷt , ht = = RN Ndec (xT1 , hT1 ) RN Ndec (ŷt−1 , ht−1 ), ∀T1 + 1 < t ≤ T1 + T2 . We then build the three Social-Aware components into this encoder-decoder architecture. We keep the encoder RNN simple to capture only the individual status, and augment the decoder RNN with the Social-Aware extensions. Intention Inference: In this work, for simplicity we consider the two most critical factors underlying the pedestrian decision-making process, namely the latent intention of the pedestrians themselves and the interaction with nearby pedestrians. As a result of the two factors, in a sparse environment with few people ahead people usually walk straight to their intented destinations, and in crowded scenarios where there are many people around travelling in different directions, people have to avoid collision, respect others’ personal space and thus take detours deviating from the ideal straight path. Therefore, two pedestrians sharing similar observed trajectories may still continue to navigate differently due to the different crowd states they face. The assumption that people sharing resembling observed paths would continue behaving similarly, upon which the recent deep learning methods are based (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016; Lee et al. 2017), is thus rather debatable, and a fairer assumption would be that they share similar latent intentions instead of similar future behavior. With sufficient data of pedestrian behavior, we assume that both types of future behavior (ideal straight and deviating detours) are of significant presence. Furthermore, even though deviating detours may exhibit wide diversity, the ideal straight trajectory is generally stable and direct to destination, forming a generalized “mode” conditioned on observed trajectories. This provides the possibility of learning the mode in a data-driven fashion to gain a deeper understanding of the decision-making process. To model and disentangle the latent intention apart from the diversity caused by the interaction factor, we propose to inject an additional code c into our policy so that the policy could act differently controlled by the code. More specifically, the code is Figure 3: An example of the decoder RNN with injected code. The code is first embedded to a higher dimension equal to one of the hidden layers, and is then element-wise added to the hidden layer activation. injected after the encoder RNN based on the intuition that similar observed trajectories should result in similar descriptive vectors hT1 from the encoder RNN. We fuse c with hT1 in a certain way so that different c causes the decoder RNN to generate different future paths, of which an example architecture is shown in Fig. 3. The relationship between c and genenrated Ŷi is discovered in an unsupervised manner without any further labeling, as will be detailed in Sec. 2.5. Collision Avoidance: A policy imitating ordinary pedestrians’ decision-making should naturally prevent itself from generating two crashing trajectories, as ordinary people simulate, foresee collision and then act accordingly. Recent deep learning methods achieve this only implicitly through mean squared error of each trajectory w.r.t. its groundtruth (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016; Lee et al. 2017). To explicitly incorporate collision avoidance into our generator, we draw inspiration from ORCA (Optimal Reciprocal Collision Avoidance) (Van Den Berg et al. 2011) and propose a novel regularization mechanism of instant simulation into our policy. In ORCA, each agent senses its nearby agents’ current velocities and maps its own to a velocity that’s guaranteed to be safe for a time window, indirectly simulating for that time. The mapping operation is implemented as an inner optimization loop of linear programming, thus not directly applicable with neural networks’ backpropagation. We accordingly propose a simplified differentiable operation in this regard. Each agent still senses all the other agents within the same mini-batch, but instead of performing velocity mapping, it will directly stop moving if its generated next action collides with one or more of the others. Therefore, the decoding RNN now performs the following recurrence: ŷt , ht = ŷt = RN Ndec (ŷt−1 , ht−1 )  ŷt−1 , if colliding ŷt , if safe The conditional selection of next actions is implemented in TensorFlow enabling backpropagation. Collision is determined if two actions lie closer than several pixels to each other. The decoder RNN will continue output the same action until its generated action becomes safe. This directly causes the generated trajectories to be much shorter than and deviating from the ground-truth, thus heavily penalizing collision during training. Compared to ORCA, our mechanism equivalently simulates for one timestep into the future (0.5 seconds at 2 fps), treats generated actions as simulated candidates and maps them directly to zero velocity if colliding. Social-Aware LSTM: In addition to coupling the LSTMs of each individual with collision avoidance, we further model the interaction between pedestrians inspired by (Alahi et al. 2016; Su et al. 2016). We employ an operation across RNNs similar to Social Pooling (Alahi et al. 2016), and construct a vicinity tensor Vti of size N ×N ×H in each RNN’s neighborhood of pixel range N × N . H is the dimension of the RNN hidden state. The tensor Vti for trajectory i at timestep t is computed as follows: Vti = X Algorithm 1 SA-GAIL Input: Tracked trajectories [Xi , Yi ]; initial policy G0 , discriminator D0 and variational posterior estimator Q0 Output: Learned policy G for i = 0, 1, 2, ... do † Sample a batch of latent codes from pre-specified distribution: ci ∼ P (c) Generate a batch of trajectories Ŷi conditioned on Xi † (and ci for intention inference, fixed in each rollout) Sample ground-truth trajectories [Xi , Yi ] Gradient descent on D to minimize Ê[Xi ,Ŷi ] [log D([Xi , Ŷi ])]+Ê[Xi ,Yi ] [log(1−D([Xi , Yi ]))] I[xjt − xit ]hjt−1 , † Gradient descent on Q to minimize j∈Ni where Ni is the neighboring pedestrians of person i, I[xjt − xit ] is an indicator function to locate the neighbor, and hjt−1 is the hidden state of the RNN of person j at timestep t − 1. This vicinity tensor is further embedded to a compact representation with the same dimension as the RNN hidden state, and added to the hidden state as (Su et al. 2016) does. 2.4 Update policy G with TRPO to maximize the following reward (without intention inference): Ê[Xi ,Ŷi ] [D([Xi , Ŷi ])] † or (for intention inference):∗ Discriminator and Posterior The distinction of our framework w.r.t. recent works (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016; Lee et al. 2017) lies in that with GAIL the supervision to the policy is provided by the discriminator. To feed the discriminator with necessary information, we devise the discriminator D to take as input the full generated trajectory, combining the observed and generated parts. D is also of a recurrent structure with RNNs first processing the whole trajectory, and the last hidden state is treated as trajectory descriptor to be passed to fully-connected layers. The fullyconnected layers are followed by LeakyReLU nonlinearity as suggested by (Radford, Metz, and Chintala 2015). The final fully-connected layer outputs the probability of the trajectory being real as in standard GAN. To establish the relationship between the code c and the policy G, a variational posterior estimator is further needed to lowerbound the mutual information (Chen et al. 2016). Similarly as the discriminator, we build the posterior taking the combined trajectories as input with output corresponding to the prior code distribution. 2.5 −λÊ[Xi ,Ŷi ] [log Q(c|[Xi , Ŷi ])] Optimization Algorithms In light of the sequential decision-making process of pedestrian behavior, we propose to apply Imitation Learning (IL) and corresponding optimization algorithms to let a policy imitate crowd motion from data. The data, tracked tracklets, serve as expert demonstrations in terms of IL. We advocate to apply GAIL (Ho and Ermon 2016), sustaining the efficiency of gradient-based learning while still formulating the problem as occupancy matching as Inverse RL does. GAIL introduces a discriminator to distinguish the generated state-action pairs from the expert-demonstration ones, and this discriminator guides the learning of the policy model, drawing inspirations from GANs (Goodfellow et al. 2014). The gradient is not directly backpropagated from D Ê[Xi ,Ŷi ] [D([Xi , Ŷi ])] + λÊ[Xi ,Ŷi ] [log Q(c|[Xi , Ŷi ])] end for to G, but through policy gradient algorithms such as TRPO (Schulman et al. 2015). Motion Prediction For pure motion prediction, we take away the intention inference part of our framework, leaving only G and D. The whole system, with Social-Aware LSTMs and collision avoidance, is trained with the GAIL algorithm (Ho and Ermon 2016), as outlined in Algorithm 1 without intention inference (the steps beginning with †). The algorithm optimizes min max Ê[Xi ,Ŷi ] [log D([Xi , G(Xi ))])] + Ê[Xi ,Yi ] [log(1 − D([Xi , Yi ]))] D G Intention Inference We employ the whole framework of SA-GAIL together with intention inference. The three networks, G, D and Q, given the sampled latent code c, are jointly optimized with the SA-GAIL algorithm as fully outlined in Algorithm 1, similar to (Li, Song, and Ermon 2017; Hausman et al. 2017). The algorithm optimizes∗ min max G,Q Ê[Xi ,Ŷi ] [log D([Xi , G(Xi ))])] + Ê[Xi ,Yi ] [log(1 − D([Xi , Yi ]))] +λ Ê[Xi ,G(Xi )] [log Q(c|[Xi , G(Xi )])] D 2.6 Characteristics of SA-GAIL • We propose the collision avoidance regularization with the idea of simulating the future. Instead of naively regularizing the objective function, it incorporates an intuitive ∗ We regret that these formulas have typos in the AAAI version. rule into the network architecture (thus a layer) and fits in gradient-based learning (still differentiable). • Our generator design is novel with non-trivial analysis. We found that a sequence generation model as (Alahi et al. 2016) didn’t perform well on our dataset. We deduce that it’s mainly because the same set of weights process both observed and generated paths, so we separate the roles of understanding pedestrian history and predicting future. With this principle, we add the three social-aware components all into the decoder, distinct from (Alahi et al. 2016; Su et al. 2016; 2017) where social-awareness is distributed all across the network. • Our SA-LSTM with an additive integration of vicinity and RNN states models more types of crowd motion than coherence (Su et al. 2016; 2017) and is more stable under empty vicinity than (Alahi et al. 2016). We also adopt the standard GAN discriminator because the recent WGAN discriminator exhibits more instability due to clipping on LSTM discriminator weights and unbounded output. 3 Experiments We demonstrate the effectiveness of SA-GAIL on two tasks of pedestrian behavior understanding: behavior prediction and intention inference. Behavior prediction is the task of interest in all recent works (Su et al. 2016; 2017; Alahi et al. 2016; Yi, Li, and Wang 2016; Lee et al. 2017), which we implement as a preliminary verification of SA-GAIL. We then conduct intention inference, delving deeper into the decision-making process and seeking generalized modes across individuals for disentanglement and interpretability. 3.1 Dataset and Experimental Settings We conducted all experiments on the publicly available Central Station dataset (Zhou, Wang, and Tang 2011), which is a surveillance video of 33 minutes long with more than 40,000 keypoint tracklets. The scene is shown in Fig. 4, with ten entrance/exit regions manually labeled. This dataset is a highly challenging one in pedestrian motion analysis with usually over 100 people simultaneously in the unstructured scene. 1 2 3 4 6 7 9 lengths T1 , T2 for simplicity, but our system is easily extended to variable-length sequences since the neural networks taking the trajectories as input are all of recurrent nature. We sample all trajectories at a frame rate of 2 fps. The video is 720 pixels in width and 480 pixels in height. We normalize the two dimensions of coordinates respectively w.r.t. the size so that all coordinates lie within [0, 1]. We specify the basic network design as follows: we use an LSTM with 128 units for the encoder of the policy, and an LSTM with 128 units followed at each timestep by one fully-connected layer with 64 units and a final output fullyconnected layer with 2 units. The hidden fully-connected layer employs ReLU nonlinearity as suggested by (Radford, Metz, and Chintala 2015) for generator. The 2-dimensional output is treated as Gaussian mean with pre-specified logstd to parameterize a stochastic policy for TRPO. We adopt a similar architecture for the discriminator and posterior, where we use an LSTM with 128 units to process the whole sequence and add a fully-connected output layer to the last output of the LSTM. For the discriminator the output layer has only one sigmoid unit for the probability of the trajectory being real, and for the posterior a softmax distribution. We train SA-GAIL following the training procedure in (Ho and Ermon 2016; Li, Song, and Ermon 2017). 3.2 5 10 Table 1: Error of generated trajectories. The ones marked with † are taken from (Yi, Li, and Wang 2016). normADE ADE FDE Constant velocity† 5.86% SFM† 4.45% LTA† 4.35% Behavior CNN† 2.52% Vanilla LSTM 2.39% 14.57 27.78 SA-LSTM 2.14% 12.82 25.51 Vanilla LSTM with 2.20% 13.11 26.19 collision avoidance full SA-GAIL (no code) 1.98% 11.98 23.05 SA-GAIL without 2.21% 13.17 26.55 SA-LSTM SA-GAIL without 2.09% 12.61 25.08 collision avoidance SA-GAIL without GAIL 2.17% 12.95 25.95 8 Figure 4: Ten entrance/exits regions labeled in the scene. As per Sec. 2.1, we fix T1 = 9 and T2 = 8 in all our experiments. In other words, the first 9 coordinates are treated as observed part of trajectories, and our system predicts the last 8 coordinates. Shorter tracklets are ignored. We fix the Behavior Prediction For this task, we take away the posterior and code input of the networks so our system directly imitates the decisionmaking process and emphasizes individual prediction. Comparison methods: To the best of our knowledge, only (Yi, Li, and Wang 2016) has done extensive experiments on the same crowd scene, though with different settings of T1 , T2 , sampling frame rate and trajectory labeling. We refer to some of their results as approximate baselines (entries with † in Table 1). We establish three baselines of our own, namely the vanilla LSTM without any further modification, the LSTM with only vicinity tensors (SA-LSTM) and the LSTM with only collision avoidance. These methods are all trained with supervised learning and are com- 4 1 6 6 (1) 9 9 (2) (3) (4) (5) (6) (10) (11) (12) 6 2 6 (7) (8) (9) Figure 5: Given observed (yellow) trajectories, our model generates different future trajectories (red, green, blue) controlled by the code, with intention orientations illustrated in dashed green. Ground-truth future paths are shown in white. (1-6): results with 3-dimensional code. (7-9): results with 2-dimensional code. (10-12): some failure cases. pared to our full system (excluding the intention inference part). The contribution of each part of our system, the SALSTM, the collision avoidance layer and GAIL training, is demonstrated with ablation tests by removing each module. Evaluation metrics: We evalutate prediction performance with three metrics, the normalized Avarage Displacement Error (normADE), the Avarage Displacement Error (ADE) in terms of pixels and the Final Displacement Error (FDE) also in terms of pixels. The normADE is the error between generated and ground-truth coordinates normalized with respect to the image width and height, as used in (Yi, Li, and Wang 2016). We scale the coordinates back to the image size of 720 × 480 to compute the other two metrics. Results: We select the first 80% of the tracklets as the training set, then 10% as validation and the last 10% as test, and report the test error. As can be seen from Table 1, our simple baseline, vanilla LSTM, is on par with Behavior CNN in (Yi, Li, and Wang 2016). Although our experimental settings are not identical to (Yi, Li, and Wang 2016), this rough comparison still verifies the effectiveness of our encoder-decoder architecture of the policy. Slight improvement is achieved with SA-LSTMs or collision avoidance respectively, preliminarily implying the effectiveness of the proposed social-aware components. Our full SA-GAIL without code performs the best, attributed to the better modeling of the decision-making process with collision avoidance and SA-LSTMs for interhuman interaction, as well as the suitable training algorithm, GAIL, for imitating the process. Ablation tests also demonstrate the necessity of each introduced module, though from the comparison between the ablation tests and baselines, not all network architectures benefit from adversarial training, presumably due to the difficulty of training recurrent neural network generators with GANs (Metz et al. 2017). The comparison also suggests that the effects of the collision avoidance regularization need further investigation. 3.3 Intention Inference We add the posterior and code for intention inference. We experimented with both a 2-dimensional one-hot code and a 3-dimensional one-hot code. We expect one code configuration discovers the latent intention, and the other configuration(s) approximately model behaviors under different crowd scenarios. We approximately treat the intentions in this scene to be ideal straight paths to one of the ten entrances/exits as shown in Fig. 4. After training with SAGAIL, we generate different future paths for each observed trajectory by iterating over all the code configurations. The results are shown in Fig. 5, where (1-6) are results of the 3dimensional code, and (7-9) are results of the 2-dimensional code. We managed to achieve that in both experiments one configuration of the latent code would make the policy exhibit a more exit-oriented behavior than the other configuration(s) directly towards the middle of the exits. We arrange the colors of the generated paths so that both such codes in the two experiments correspond to green trajectories, and use green dashed lines to illustrate the straight orientations. With information maximization the generated trajectories don’t (and don’t have to) mimic the ground-truth very accurately, but at least share similar trend. We also show some failure cases in (10-12) in Fig. 5. Sudden turns after the last observed coordinates inevitably cause large discrepancy as in (10). Occasional inability to recognize the scene (such as walls in (12)) is also present with no such labels in data. Our policy may also fail on some rare cases. Besides, it’s hard to evaluate this task fully objectively since it requires manual specification of intention and other criteria. Still, we demonstrate the potential of our method through direct visualization, a key test as in (Chen et al. 2016; Li, Song, and Ermon 2017). 4 Conclusions In this paper, we propose a novel framework for understanding human behaviors in crowds by inferring their underlying decision-making process, unlike recent advances through supervised deep learning. Our system, harnessing collision avoidance and other human interaction with recurrent architectures, models the decision-making process and disentangles the different decision factors by introducing modes to the policy. Experiments demonstrate that our algorithm can not only predict proper future paths of pedestrians but also infer their inner intentions. By understanding and imitating the human decision process, it provides a good opportunity to develop a system that could make safe and reasonable decisions in unconstrained crowded scenarios. Acknowledgements The first author would personally like to thank his beautiful and sweet wife, Jiamin Deng, for her incredible support during the whole process of this paper. References Alahi, A.; Goel, K.; Ramanathan, V.; Robicquet, A.; Fei-Fei, L.; and Savarese, S. 2016. Social lstm: Human trajectory prediction in crowded spaces. In CVPR. Ali, S. 2008. Taming crowded visual scenes. University of Central Florida. Andriluka, M., and Sigal, L. 2012. Human context: Modeling human-human interactions for monocular 3d pose estimation. Articulated Motion and Deformable Objects 260– 272. Chen, X.; Duan, Y.; Houthooft, R.; Schulman, J.; Sutskever, I.; and Abbeel, P. 2016. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In NIPS. Cho, K.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; and Bengio, Y. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078. Goodfellow, I. J.; Pougetabadie, J.; Mirza, M.; Xu, B.; Wardefarley, D.; Ozair, S.; Courville, A.; and Bengio, Y. 2014. Generative adversarial nets. In NIPS. Hausman, K.; Chebotar, Y.; Schaal, S.; Sukhatme, G. S.; and Lim, J. J. 2017. Multi-modal imitation learning from unstructured demonstrations using generative adversarial nets. In NIPS. Helbing, D.; Farkas, I.; and Vicsek, T. 2000. Simulating dynamical features of escape panic. Nature 407(6803):487– 490. Ho, J., and Ermon, S. 2016. Generative adversarial imitation learning. In NIPS. Lee, N.; Choi, W.; Vernaza, P.; Choy, C. B.; Torr, P. H. S.; and Chandraker, M. 2017. Desire: Distant future prediction in dynamic scenes with interacting agents. In CVPR. Li, Y.; Song, J.; and Ermon, S. 2017. Inferring the latent structure of human decision-making from raw visual inputs. In NIPS. Luber, M.; Stork, J. A.; Tipaldi, G. D.; and Arras, K. O. 2010. People tracking with human motion predictions from social forces. In Robotics and Automation (ICRA), 2010 IEEE International Conference on, 464–469. IEEE. Mehran, R.; Oyama, A.; and Shah, M. 2009. Abnormal crowd behavior detection using social force model. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, 935–942. IEEE. Metz, L.; Poole, B.; Pfau, D.; and Sohl-Dickstein, J. 2017. Unrolled generative adversarial networks. In ICLR. Monfort, M.; Liu, A.; and Ziebart, B. D. 2015. Intent prediction and trajectory forecasting via predictive inverse linearquadratic regulation. In The Twenty-Ninth AAAI Conference on Artificial Intelligence (AAAI), 3672–3678. Pellegrini, S.; Ess, A.; Schindler, K.; and Van Gool, L. 2009. You’ll never walk alone: Modeling social behavior for multitarget tracking. In Computer Vision, 2009 IEEE 12th International Conference on, 261–268. IEEE. Radford, A.; Metz, L.; and Chintala, S. 2015. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434. Robicquet, A.; Sadeghian, A.; Alahi, A.; and Savarese, S. 2016. Learning social etiquette: Human trajectory understanding in crowded scenes. In European conference on computer vision, 549–565. Springer. Rodriguez, M.; Ali, S.; and Kanade, T. 2009. Tracking in unstructured crowded scenes. In Computer Vision, IEEE 12th International Conference on (CVPR), 1389–1396. IEEE. Schulman, J.; Levine, S.; Abbeel, P.; Jordan, M.; and Moritz, P. 2015. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), 1889–1897. Shao, J.; Kang, K.; Loy, C. C.; and Wang, X. 2015. Deeply learned attributes for crowded scene understanding. In Computer Vision and Pattern Recognition (CVPR), IEEE Conference on, 1–9. Shao, J.; Loy, C. C.; and Wang, X. 2014. Scene-independent group profiling in crowd. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, 2227– 2234. Su, H.; Dong, Y.; Zhu, J.; Ling, H.; and Zhang, B. 2016. Crowd scene understanding with coherent recurrent neural networks. In IJCAI. Su, H.; Zhu, J.; Dong, Y.; and Zhang, B. 2017. Forecast the plausible paths in crowd scenes. In IJCAI. Sutskever, I.; Vinyals, O.; and Le, Q. V. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems (NIPS), 3104–3112. Van Den Berg, J.; Guy, S.; Lin, M.; and Manocha, D. 2011. Reciprocal n-body collision avoidance. Robotics research 3–19. Xie, D.; Shu, T.; Todorovic, S.; and Zhu, S. C. 2017. Learning and inferring ”dark matter” and predicting human intents and trajectories in videos. IEEE Transactions on Pattern Analysis and Machine Intelligence. Yi, S.; Li, H.; and Wang, X. 2016. Pedestrian behavior understanding and prediction with deep neural networks. In ECCV. Yu, Q., and Terzopoulos, D. 2007. A decision network framework for the behavioral animation of virtual humans. In Proceedings of the 2007 ACM SIGGRAPH/Eurographics symposium on Computer animation, 119–128. Eurographics Association. Zhou, B.; Tang, X.; and Wang, X. 2012. Coherent filtering: detecting coherent motions from crowd clutters. In European Conference on Computer Vision (ECCV), 857–871. Zhou, B.; Wang, X.; and Tang, X. 2011. Random field topic model for semantic region analysis in crowded scenes from tracklets. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, 3441–3448. IEEE. Zhou, B.; Wang, X.; and Tang, X. 2012. Understanding collective crowd behaviors: Learning a mixture model of dynamic pedestrian-agents. In Computer Vision and Pattern Recognition (CVPR), IEEE Conference on, 2871 –2878. Ziebart, B. D.; Ratliff, N. D.; Gallagher, G.; Mertz, C.; Peterson, K. M.; Bagnell, J. A.; Hebert, M.; Dey, A. K.; and Srinivasa, S. S. 2009. Planning-based prediction for pedestrians. 3931–3936.
1cs.CV
Binomial Checkpointing for Arbitrary Programs with No User Annotation∗ Jeffrey Mark Siskind† Barak A. Pearlmutter‡ arXiv:1611.03410v1 [cs.PL] 10 Nov 2016 April 2016 Heretofore, automatic checkpointing at procedure-call boundaries [1], to reduce the space complexity of reverse mode, has been provided by systems like Tapenade [2]. However, binomial checkpointing, or treeverse [3], has only been provided in AD systems in special cases, e.g., through user-provided pragmas on DO loops in Tapenade, or as the nested taping mechanism in adol-c for time integration processes, which requires that user code be refactored. We present a framework for applying binomial checkpointing to arbitrary code with no special annotation or refactoring required. This is accomplished by applying binomial checkpointing directly to a program trace. This trace is produced by a general-purpose checkpointing mechanism that is orthogonal to AD. Listing 1: Fortran example Consider the code fragment in Listing 1. This example, y = f (x), while subroutine f (x , y ) contrived, is a simple caricature of a situation that arises commonly in pracn = 100003 y = x tice, e.g., in adaptive grid methods. Here, the duration of the inner loop varies - ckp n +1 30 1 wildly as some function l(x, i) of the input and the outer loop index, perhaps c $ad binomial do i = 1 , n ⌊lg(n)⌋−⌊lg(1+(1007⌊3x ⌋i mod n))⌋ m = l (x , i ) 2 , that is small on most iterations of the outer loop do j = 1 , m but O(n) on a few iterations. Thus the optimality of the binomial schedule y = y*y y = sqrt ( y ) is violated. The issue is that the optimality of the binomial schedule holds at end do the level of primitive atomic computations but this is not reflected in the static end do end syntactic structure of the source code. Often, the user is unaware or even unconcerned with the micro-level structure of atomic computations and does not wish to break the modularity of the source code to expose such. Yet the user may still wish to reap the benefits of an optimal binomial checkpointing schedule [4]. Moreover, the relative duration of different paths through a program may vary from loop iteration to loop iteration in a fashion that is data dependent, as shown by the above example, and not even statically determinable. We present an implementation strategy for checkpointing that does not require user placement of checkpoints and does not constrain checkpoints to subroutine boundaries, DO loops, or other syntactic program constructs. Instead, it can automatically and dynamically introduce a checkpoint at an arbitrary point in the computation that need not correspond to a syntactic program unit. We have previously introduced vlad, A ⟨(λx.e), ρ⟩ v = E ρ[x ↦ v] e a pure functional language with builtin Ð → AD operators for both forward and reverse J v1 v2 v́3 = let (v4 ⊳ v́5 ) = A v1 (v2 ⊳ v́3 ) in (v4 , v́5 ) mode. Here, we adopt slight variants of ← Ð these operators with the following signaJ v1 v2 v̀3 = let (v4 ⊲ v̀5 ) = ((A v1 v2 ) ⊲ v̀3 ) in (v4 , v̀5 ) tures. E ρc=c Ð → J ∶ f x x́ ↦ y ý ← Ð J ∶ f x ỳ ↦ y x̀ E ρx=ρx E ρ (λx.e) = ⟨(λx.e), ρ⟩ Ð → The J operator calls a function f on a priE ρ (e1 e2 ) = A (E ρ e1 ) (E ρ e2 ) mal x with a tangent x́ to yield a primal y E ρ (if e1 then e2 else e3 ) = if (E ρ e1 ) then (E ρ e2 ) else (E ρ e3 ) ← Ð and a tangent ý. The J operator calls E ρ (◇e) = ◇(E ρ e) a function f on a primal x with a cotanE ρ (e1 ● e2 ) = (E ρ e1 ) ● (E ρ e2 ) gent ỳ to yield a primal y and a cotangent x́. Ð → Ð → Here, we restrict ourselves to the case where E ρ ( J e1 e2 e3 ) = J (E ρ e1 ) (E ρ e2 ) (E ρ e3 ) (co)tangents are ground data values, i.e., ← Ð ← Ð E ρ ( J e1 e2 e3 ) = J (E ρ e1 ) (E ρ e2 ) (E ρ e3 ) reals and (arbitrary) data structures containing reals and other scalar values, but Figure 1: Direct-style evaluator for vlad. not functions (i.e., closures). For our purposes, the crucial aspect of the design is that the AD operators are provided within the language, since these provide the portal to the checkpointing mechanism. In previous work, we introduced Stalin∇, a highly optimizing compiler for vlad. Here, we formulate a simple evaluator (interpreter) for vlad (Fig. 1) and extend such to perform binomial checkpointing. The operators ◇ and ● range over the unary and binary basis functions respectively. This evaluator is written in what is known in the programming-language community as direct style, where functions (in this case E, denoting ‘eval’, A, denoting ‘apply’, ∗ Extended abstract presented at the AD 2016 Conference, Sep 2016, Oxford UK. Author, School of Electrical and Computer Engineering, Purdue University, [email protected] ‡ Dept of Computer Science, National University of Ireland Maynooth, [email protected] † Corresponding Ð → ← Ð and the implementations of J and J in the host) take inputs as function-call arguments and yield outputs as functioncall return values [5]. AD is performed by overloading the basis functions in the host, in a fashion similar to fadbad++ [6], x ⊳ x́ denotes recursively bundling a data structure containing primals with a data structure containing tangents, or alternatively recursively unbundling such when used as a binder, and y ⊲ ỳ denotes running the reverse sweep on the tape y with the output cotangent ỳ, or alternatively extracting the primal y and input cotangent x̀ from the tape when used as a binder y ⊲ x̀. ✓ We introduce a new AD operator J to perform binomial checkpointing. The crucial aspect of the design is that the ← Ð ✓ signature (and semantics) of J is identical to J ; they are completely interchangeable, differing only in the space/time complexity tradeoffs. This means that code need not be modified to switch back and forth between ordinary reverse ← Ð ✓ mode and binomial checkpointing, save interchanging calls to J and J . ✓ Conceptually, the behavior of J is shown in Fig. 2. In this inductive definition, a function f is split into the composition of two functions g and h in step 1, the checkpoint u is computed by applying g to the input x in step 2, and the ✓ ✓ To compute (y, x̀) = J f x ỳ: ← Ð base case (f x fast): (y, x̀) = J f x ỳ inductive case: h○g =f u=gx (0) (1) (2) cotangent is computed by recursively applying J to h and g in ✓ (y, ù) = J h u ỳ (3) steps 3 and 4. This divide-and-conquer behavior is terminated ✓ in a base case, when the function f is small, at which point (u, x̀) = J g x ù (4) ← Ð the cotangent is computed with J , in step 0. If step 1 splits Figure 2: Algorithm for binomial checkpointing. a function f into two functions g and h that take the same number of computational steps, the recursive divide-and-conquer process yields the logarithmic asymptotic space/time complexity of binomial checkpointing. The central difficulty in implementing the above is performing step 1, namely splitting a function f into two functions g and h, ideally ones that take the same number of computational steps. A sophisticated user can manually rewrite a subroutine f into two subroutines g and h. A sufficiently powerful compiler or source transformation tool might also be able to, with access to nonlocal program text. But an overloading system, with access only to local information, would not be able to. We solve this problem by providing an interface to a general-purpose checkpointing mechanism orthogonal to AD. primops f x ↦ (y, n) checkpoint f x n ↦ u resume u ↦ y Return y = f (x) along with the number n of steps needed to compute y. Run the first n steps of the computation of f (x) and return a checkpoint u. If u = (checkpoint f x n), return y = f (x). This interface allows (a) determining the number of steps of a computation, (b) interrupting a computation after a specified number of steps, usually half the number of steps determined by the mechanism in (a), and (c) resuming an interrupted computation to completion. A variety of implementation strategies for this interface are possible. We present one in detail momentarily and briefly discuss others below. Irrespective of how one implements ✓ To compute (y, x̀) = J f x ỳ: the general-purpose checkpointing inter← Ð base case: (y, x̀) = J f x ỳ (0) ✓ face, one can use it to implement J as inductive case: (y, 2n) = primops f x (1) shown in Fig. 3. The function f is split into u = checkpoint f x n (2) the composition of two functions g and h by ✓ (y, ù) = J (λu.resume u) u ỳ (3) taking g as λx.checkpoint f x n, where n ✓ is half the number of steps determined by (u, x̀) = J (λx.checkpoint f x n) x ù (4) primops f x, and h as λu.resume u. Figure 3: Binomial checkpointing via general checkpointing interface. One way of implementing the generalpurpose checkpointing interface is to convert the evaluator from direct style to continuation-passing style (CPS, [7]), Ð → ← Ð where functions (in this case E, A, J , and J in the host) take an additional continuation input k and instead of yielding outputs via function-call return, do so by calling the continuation with said output as arguments (Fig. 5). In such a style, functions never return; they just call their continuation. With tail-call merging, such corresponds to a computed go to and does not incur stack growth. This crucially allows the interruption process to actually return a checkpoint data structure containing the saved state of the evaluator, including its continuation, allowing the evaluation to be resumed by calling the evaluator with this saved state. This ‘level shift’ of return to calling a continuation allowing an actual return to constitute checkpointing interruption is analogous to the way backtracking is classically implemented in Prolog, with success implemented as calling a continuation and failure implemented as actual return. In our case, we further instrument the evaluator to thread two values as inputs and outputs: the count n of the number of evaluation steps, which is incremented at each call to E, and the limit l of the number of steps, after which a checkpointing interrupt is triggered. With this CPS evaluator, it is possible to implement the primops f x = A (λn l v.(v, n))) 0 ∞ f x general-purpose checkpointing interface (Fig. 4), not for programs checkpoint f x n = A – 0 n f x in the host, but for programs in the target; hence our choice of forresume ⟦k, l, ρ, e⟧ = E k l ∞ ρ e mulating the implementation around an evaluator (interpreter). Figure 4: Implementation of the general-purpose checkpointing interface using the CPS evaluator. A k n l ⟨(λx.e), ρ⟩ v = E k n l ρ[x ↦ v] e Ð → J k n l v1 v2 v́3 = A (λn l (v4 ⊳ v́5 ).k n l (v4 , v́5 )) n l v1 (v2 ⊳ v́3 ) ← Ð J k n l v1 v2 v́3 = A (λn l v.let (v4 ⊲ v̀5 ) = v ⊲ v̀3 in k n l (v4 , v́5 )) n l v1 v2 E k l l ρ e = ⟦k, l, ρ, e⟧ E k n l ρ c = k (n + 1) l c E k n l ρ x = k (n + 1) l (ρ x) E k n l ρ (λx.e) = k (n + 1) l ⟨(λx.e), ρ⟩ E k n l ρ (e1 e2 ) = E (λn l v1 .(E (λn l v2 .(A k n l v1 v2 )) n l ρ e2 )) (n + 1) l ρ e1 E k n l ρ (if e1 then e2 else e3 ) = E (λn l v1 .(if v1 then (E k n l ρ e2 ) else (E k n l ρ e3 ))) (n + 1) l ρ e1 E k n l ρ (◇e) = E (λn l v.(k n l (◇v))) (n + 1) l ρ e E k n l ρ (e1 ● e2 ) = E (λn l v1 .(E (λn l v2 .(k n l (v1 ● v2 ))) n l ρ e2 )) (n + 1) l ρ e1 Ð → Ð → E k n l ρ ( J e1 e2 e3 ) = E (λn l v1 .(E (λn l v2 .(E (λn l v3 .( J k n l v1 v2 v3 )) n l ρ e3 )) n l ρ e2 ))(n + 1) l ρ e1 ← Ð ← Ð E k n l ρ ( J e1 e2 e3 ) = E (λn l v1 .(E (λn l v2 .(E (λn l v3 .( J k n l v1 v2 v3 )) n l ρ e3 )) n l ρ e2 ))(n + 1) l ρ e1 Figure 5: CPS evaluator for vlad. We remove this restriction below. The implementation of primops calls the evaluator with no limit and simply counts the number of steps to completion. The implementation of checkpoint calls the evaluator with a limit that must be smaller than that needed to complete so a checkpointing interrupt is forced and the checkpoint data structure ⟦k, l, ρ, e⟧ is returned. The implementation of resume calls the evaluator with arguments from the saved checkpoint data structure. Listing 2: vlad example With this, it is possible to reformulate the Fortran example from Listing 1 in vlad (List- ( define ( f x ) ( let (( n 100003)) ing 2). Then one achieves binomial checkpoint( let outer (( i 1) ( y x )) ( if ( > i n ) ✓ ing simply by calling (J f 3 1). y ( outer (+ i 1) The efficacy of our method can be seen in the ( let (( m ( l x i ))) plots (Fig. 5) of the space and time usage, rel( let inner (( j 1) ( y y )) ( if ( > j m ) ative to that for the leftmost datapoint, of the y above Fortran and vlad examples with vary( inner (+ j 1) ( sqrt (* y y ))))))))))) ing n. Tapenade was run without checkpointing, with manual checkpointing only around the body of the outer loop, with manual checkpointing only around the body of the inner loop, with manual checkpointing ← Ð ✓ around the bodies of both loops, and with binomial checkpointing. vlad was run with J and J . Note that Tape← Ð nade exhibits O(n) space and time usage for all cases, while vlad exhibits O(n) space and time usage with J , but ✓ ✓ O(1) space usage and O(n) time usage with J . The space complexity of J is the sum of the space required for the checkpoints and the space required for the tape. For a general computation of length t and maximal live storage w, the former is O(w log t) while the latter is O(w). For the code in our example, t = O(n) and w = O(1), leading to the former being O(log n) and the latter being O(1). We observe O(1) space usage since the constant factors of the ✓ latter overpower the former. The time complexity of J is the sum of the time required to (re)compute the primal and the time required to perform the reverse sweep. For a general computation, the former is O(t log t) while the latter is O(t). For the code in our example, the former is O(n log n) and the latter is O(n). We observe O(n) time usage since, again, the constant factors of the latter overpower the former. Other methods present themselves for implementing the general-purpose checkpointing interface. One can use posix fork() much in the same way that it has been used to implement the requisite nondeterminism in probabilistic programming languages like probabilistic c [8]. A copy-on-write implementation of fork(), as is typical, would make this reasonably efficient and allow it to apply in the host, rather than the target, and thus could be used to provide an overloaded implementation of binomial checkpointing in a fashion that was largely transparent to the user. Alternatively, direct-style code could be compiled into CPS using a CPS transformation. A compiler for a language like vlad can be constructed that generates target code in CPS that is instrumented with step counting, step limits, and ✓ checkpointing interruptions. A driver can be wrapped around such code to implement J . Existing high-performance compilers, like sml/nj [9], for functional languages like sml, already generate target code in CPS, so by adapting such to the purpose of AD with binomial checkpointing, it seems feasible to achieve high performance. In fact, the overhead of the requisite instrumentation for step counting, step limits, and checkpointing interruptions need not be onerous because the step counting, step limits, and checkpointing interruptions for basic blocks can be factored, and those for loops can be hoisted, much as is done for the instrumentation needed to support storage allocation and garbage collection in implementations like MLton [10], for languages like sml, that achieve very low overhead for automatic space time Tapenade no checkpointing Tapenade manual checkpointing outer loop Tapenade manual checkpointing inner loop Tapenade manual checkpointing both loops Tapenade binomial checkpointing VLAD no checkpointing VLAD binomial checkpointing 1e+08 1e+06 1e+06 10000 10000 100 100 1 1 0.01 10000 100000 1e+06 1e+07 1e+08 Tapenade no checkpointing Tapenade manual checkpointing outer loop Tapenade manual checkpointing inner loop Tapenade manual checkpointing both loops Tapenade binomial checkpointing VLAD no checkpointing VLAD binomial checkpointing 1e+08 1e+09 0.01 10000 100000 1e+06 1e+07 1e+08 1e+09 Figure 5: Space and time usage of reverse-mode AD with various checkpointing strategies, relative to the space and time for the first datapoint for each respective strategy. storage management. Acknowledgments This work was supported, in part, by NSF grant 1522954-IIS and by Science Foundation Ireland grant 09/IN.1/I2637. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the sponsors. References [1] Yu. M. Volin and G. M. Ostrovskii. Automatic computation of derivatives with the use of the multilevel differentiating technique — I: Algorithmic basis. Computers and Mathematics with Applications, 11:1099–1114, 1985. doi: 10.1016/ 0898-1221(85)90188-9. [2] Benjamin Dauvergne and Laurent Hascoët. The data-flow equations of checkpointing in reverse automatic differentiation. In Vassil N. Alexandrov, Geert Dick van Albada, Peter M. A. Sloot, and Jack Dongarra, editors, Computational Science – ICCS 2006, volume 3994 of Lecture Notes in Computer Science, pages 566–573, Heidelberg, 2006. Springer. ISBN 3-540-34385-7. doi: 10.1007/11758549 78. [3] Andreas Griewank. Achieving logarithmic growth of temporal and spatial complexity in reverse automatic differentiation. Optimization Methods and Software, 1:35–54, 1992. [4] Andreas Griewank and Andrea Walther. Algorithm 799: Revolve: An implementation of checkpoint for the reverse or adjoint mode of computational differentiation. ACM Transactions on Mathematical Software, 26(1):19–45, mar 2000. ISSN 0098-3500. doi: 10.1145/347837.347846. Also appeared as Technical University of Dresden, Technical Report IOKOMO04-1997. [5] John C Reynolds. The discoveries of continuations. Lisp and symbolic computation, 6(3-4):233–247, 1993. [6] C. Bendtsen and Ole Stauning. FADBAD, a flexible C++ package for automatic differentiation. Technical Report IMM– REP–1996–17, Department of Mathematical Modelling, Technical University of Denmark, Lyngby, Denmark, aug 1996. [7] Gerald Jay Sussman and Guy L. Steele, Jr. Scheme: An interpreter for extended lambda calculus. AI Memo 349, MIT, December 1975. [8] Brooks Paige and Frank Wood. A compilation target for probabilistic programming languages. In Proceedings of The 31st International Conference on Machine Learning, pages 1935–1943, 2014. [9] Andrew W Appel. Compiling with continuations. Cambridge University Press, 2006. [10] Stephen Weeks. Whole-program compilation in MLton, 2006. URL http://www.mlton.org/References.attachments/ 060916-mlton.pdf. Workshop on ML.
6cs.PL
Adaptive Clustering through Semidefinite Programming arXiv:1705.06615v1 [math.ST] 18 May 2017 Martin Royer Laboratoire de Mathématiques d’Orsay, Univ. Paris-Sud, CNRS, Université Paris-Saclay, 91405 Orsay, France. Abstract We analyze the clustering problem through a flexible probabilistic model that aims to identify an optimal partition on the sample X1 , ..., Xn . We perform exact clustering with high probability using a convex semidefinite estimator that interprets as a corrected, relaxed version of K-means. The estimator is analyzed through a non-asymptotic framework and showed to be optimal or near-optimal in recovering the partition. Furthermore, its performances are shown to be adaptive to the problem’s effective dimension, as well as to K the unknown number of groups in this partition. We illustrate the method’s performances in comparison to other classical clustering algorithms with numerical experiments on simulated data. 1 Introduction Clustering, a form of unsupervised learning, is the classical problem of assembling n observations X1 , ..., Xn from a p-dimensional space into K groups. Applied fields are craving for robust clustering techniques, such as computational biology with genome classification, data mining or image segmentation from computer vision. But the clustering problem has proven notoriously hard when the embedding dimension is large compared to the number of observations (see for instance the recent discussions from [2, 21]). A famous early approach to clustering is to solve for the geometrical estimator K-means [12, 13, 19]. The intuition behind its objective is that groups are to be determined in a way to minimize the total intra-group variance. It can be interpreted as an attempt to ”best” represent the observations by K points, a form of vector quantization. Although the method shows great performances when observations are homoscedastic, K-means is a NP-hard, ad-hoc method. Clustering with probabilistic frameworks are usually based on maximum likelihood approaches paired with a variant of the EM algorithm for model estimation, see for instance the works of Fraley & Raftery [10] and Dasgupta & Schulman [9]. These methods are widespread and popular, but they tend to be very sensitive to initialization and model misspecifications. Several recent developments establish a link between clustering and semidefinite programming. Peng & Wei [16] show that the K-means objective can be relaxed into a convex, semidefinite program, leading Mixon et al. [15] to use this relaxation under a subgaussian mixture model to estimate the cluster centers. Chrétien et al. [8] use a slightly different form of a semidefinite program, inspired by work on community detection by Guédon & Vershynin [11], to recover the adjacency matrix of the cluster graph with high probability. Lastly in the different context of variable clustering, Bunea et al. [5] present a semidefinite program with a correction step to produce non-asymptotic exact recovery results. 1 In this work, we introduce a semidefinite, penalized estimator for point clustering inspired by [16] and adapted from the work and context of [5]. We analyze it through a flexible probabilistic model inducing an optimal partition that we aim to recover. We investigate the optimal conditions of exact clustering recovery with high probability and show optimal performances – including in high dimensions, improving on [15], as well as adaptability to the effective dimension of the problem. We also show that our results continue to hold without knowledge of the number of groups K. Lastly we provide evidence of our method’s efficiency from simulated data and suggest a coherent alternative in case our estimator is too costly to compute. Notation. Throughout this work we use the convention 0/0 := 0 and [n] = {1, ..., n}. We take an . bn to mean that an is smaller than bn up to an absolute constant factor. Let Sd−1 denote 0 the unit sphere in Rd . For q ∈ N∗ ∪ {+∞}, ν ∈ Rd , |ν|q is the lq -norm and for M ∈ Rd×d , |M |q , |M |F , |M |∗ and |M |op are respectively the entry-wise lq -norm, the Frobenius norm associated with scalar product h., .i, the nuclear norm and the operator norm. |D|V is the variation semi-norm for a diagonal matrix D, the difference between its maximum and minimum element. Let A < B mean that A − B is symmetric, positive semidefinite. 2 Probabilistic modeling of point clustering Consider X1 , ..., Xn and let νa = E [Xa ]. The variable Xa can be decomposed into Xa = νa + Ea , a = 1, ..., n, (2.1) with Ea stochastic centered variables in Rp . Definition 1. For K > 1, µ = (µ1 , ..., µK ) ∈ (Rp )K , δ > 0 and G = {G1 , ..., GK } a partition of [n], we say X1 , ..., Xn are (G, µ, δ)-clustered if ∀k ∈ [K], ∀a ∈ Gk , |νa − µk |2 6 δ. We then call ∆(µ) := min |µk − µl |2 k<l (2.2) the separation between the cluster means, and ρ(G, µ, δ) := ∆(µ)/δ (2.3) the discriminating capacity of (G, µ, δ). In this work we assume that X1 , ..., Xn are (G, µ, δ)-clustered. Notice that this definition does not impose any constraint on the data: for any given G, there exists a choice of µ, means and radius δ important enough so that X1 , ..., Xn are (G, µ, δ)-clustered. But we are interested in partitions with greater discriminating capacity, i.e. that make more sense in terms of group separation. Indeed remark that if ρ(G, µ, δ) < 2, the population clusters {νa }a∈G1 , ..., {νa }a∈GK are not linearly separable, but a high ρ(G, µ, δ) implies that they are well-separated from each other. Furthermore, we have the following result. ∗ , µ∗ , δ ∗ ) ∈ arg max ρ(G, µ, δ) for (G, µ, δ) such that X , ..., X are (G, µ, δ)Proposition 1. Let (GK 1 n ∗ , µ∗ , δ ∗ ) > 4 then G ∗ is the unique maximizer of ρ(G, µ, δ). clustered, and |G| = K. If ρ(GK K ∗ is the partition maximizing the discriminating capacity over partitions of size K. Therefore So GK in this work, we will assume that there is a K > 1 such that X1 , ..., Xn is (G, µ, δ)-clustered with |G| = K and ρ(G, µ, δ) > 4. By Proposition 1, G is then identifiable. It is the partition we aim to recover. We also assume that X1 , ..., Xn are independent observations with subgaussian behavior. Instead of the classical isotropic definition of a subgaussian random vector (see for example [20]), we use a more flexible definition that can account for anisotropy. 2 Definition 2. Let Y be a random vector in Rd , Y has a subgaussian distribution if there exist Σ ∈ Rd×d such that ∀x ∈ Rd , h T i T x (Y −E Y ) E e 6 ex Σx/2 . (2.4) We then call Σ a variance-bounding matrix of random vector Y , and write shorthand Y ∼ subg(Σ). Note that Y ∼ subg(Σ) implies Cov(Y ) 4 Σ in the semidefinite sense of the inequality. To sum-up our modeling assumptions in this work: Hypothesis 1. Let X1 , ..., Xn be independent, subgaussian, (G, µ, δ)-clustered with ρ(G, µ, δ) > 4. Remark that the modelization of Hypothesis 1 can be connected to another popular probabilistic model: if we further ask that X1 , ..., Xn are identically-distributed within a group (and hence δ = 0), the model becomes a realization of a mixture model. 3 Exact partition recovery with high probability Let G = {G1 , ..., GK } and m := mink∈[K] |Gk | denote the minimum cluster size. G can be represented by its caracteristic matrix B ∗ ∈ Rn×n defined as ∀k, l ∈ [K]2 , ∀(a, b) ∈ Gk × Gl ,  1/|Gk | if k = l ∗ Bab := 0 otherwise. In what follows, we will demonstrate the recovery of G through recovering its caracteristic matrix B ∗ . We introduce the sets of square matrices {0,1} CK := {B ∈ Rn×n : B T = B, tr(B) = K, B1n = 1n , B 2 = B} + Rn×n + CK := {B ∈ [ C := CK . T : B = B, tr(B) = K, B1n = 1n , B < 0} (3.1) (3.2) (3.3) K∈N {0,1} {0,1} We have: CK ⊂ CK ⊂ C and CK is convex. Notice that B ∗ ∈ CK [16] shows that the K-means estimator B̄ can be expressed as . A result by Peng, Wei (2007) b Bi B̄ = arg maxhΛ, (3.4) {0,1} B∈CK b := (hXa , Xb i)(a,b)∈[n]2 ∈ Rn×n , the observed Gram matrix. Therefore a natural relaxation is for Λ to consider the following estimator: b := arg maxhΛ, b Bi. B (3.5) B∈CK b = Λ + Γ for Λ := (hνa , νb i)(a,b)∈[n]2 ∈ Rn×n , and Γ := E [hEa , Eb i] Notice that E Λ (a,b)∈[n]2 = n×n diag (| Var(Ea )|∗ )16a6n ∈ R . The following two results demonstrate that Λ is the signal structure that lead the optimizations of (3.4) and (3.5) to recover B ∗ , whereas Γ is a bias term that can hurt the process of recovery. √ Proposition 2. There exist c0 > 1 absolute constant such that if ρ2 (G, µ, δ) > c0 (6 + n/m) and m∆2 (µ) > 8|Γ|V , then we have arg maxhΛ + Γ, Bi = B ∗ = arg maxhΛ + Γ, Bi. B∈CK {0,1} B∈CK 3 (3.6) b estimator, as well as the K-means estimator, would recover This proposition shows that the B partition G on the population Gram matrix if the variation semi-norm of Γ were sufficiently small compared to the cluster separation. Notice that to recover the partition on the population version, √ we require the discriminating capacity to grow as fast as 1 + ( n/m)1/2 instead of simply 1 from Hypothesis 1. The following proposition demonstrates that if the condition on the variation seminorm of Γ is not met, G may not even be recovered on the population version. Proposition 3. There exist G, µ, δ and Γ such that ρ2 (G, µ, δ) = +∞ but we have m∆2 (µ) < 2|Γ|V and B∗ ∈ / arg maxhΛ + Γ, Bi and B∗ ∈ / arg maxhΛ + Γ, Bi. (3.7) B∈CK {0,1} B∈CK So Proposition 3 shows that even if the population clusters are perfectly discriminated, there is a configuration for the variances of the noise that makes it impossible to recover the right clustering by K-means. This shows that K-means may fail when the random variable homoscedasticity assumption is violated, and that it is important to correct for Γ. The estimator from [5] can be adapted to our context. We introduce the following estimator, for −Xd (a, b) ∈ [n]2 let V (a, b) := max(c,d)∈([n]\{a,b})2 hXa − Xb , |XXcc−X i , b1 := arg minb∈[n]\{a} V (a, b) d |2 and b2 := arg minb∈[p]\{a,b1 } V (a, b). Then for a ∈ [n], let  b corr := diag hXa − Xb , Xa − Xb ia∈[n] . Γ 1 2 (3.8) b corr can be interpreted as a correcting term to de-bias Λ b as an estimator of Λ. The Computing Γ result from Proposition 2 demonstrates the interest of studying the following semi-definite estimator of the projection matrix B ∗ , let b −Γ b corr , Bi. b corr := arg maxhΛ B (3.9) B∈CK In order to demonstrate the recovery of B ∗ by this estimator, we introduce different quantitative measures of the ”spread” of our stochastic variables, that affect the quality of the recovery. By Hypothesis 1 there exist Σ1 , ..., Σn such that ∀a ∈ [n], Xa ∼ subg(Σa ). Let σ 2 := max |Σa |op , a∈[n] V 2 := max |Σa |F , a∈[n] γ 2 := max |Σa |∗ . (3.10) a∈[n] We are now ready to introduce this paper’s main result: a condition on the separation between the cluster means sufficient for ensuring recovery of B ∗ with high probability. Theorem 1. Assume that m > 2. For c1 , c2 > 0 absolute constants, if p p  √ m∆2 (µ) > c2 σ 2 (n + m log n) + V 2 ( n + m log n) + γ(σ log n + δ) + δ 2 ( n + m) , (3.11) b corr = B ∗ , and therefore Gbcorr = G. then with probability larger than 1 − c1 /n we have B We call the right hand side of (3.11) the separating rate. Notice that we can read two kinds of requirements coming from the separating rate: requirements on the radius δ, and√requirements can be on σ 2 , V 2 , γ dependent on the distributions of observations. It appears as if δ + σ log n √ interpreted as a geometrical width of our problem. If we ask that δ is of the same order as σ log n, a maximum gaussian deviation for n variables, then all conditions on δ from√(3.11) can be removed. Thus for convenience of the following discussion we will now assume δ . σ log n. 4 How optimal is the result from Theorem 1? Notice that our result is adapted to anisotropy in √ the noise, but to discuss optimality it is easier to look at the isotropic scenario: V 2 = pσ 2 and γ 2 = pσ 2 . Therefore ∆2 (µ)/σ 2 represents a signal-to-noise ratio. For simplicity let us also assume that all groups have equal size, that is |G1 | = ... = |GK | = m so that n = mK and the sufficient condition (3.11) becomes r  ∆2 (µ) pK & K + log n + (K + log n) . (3.12) 2 σ n Optimality. To discuss optimality, we distinguish between low and high dimensional setups. In the low-dimensional setup n ∨ m log n & p, we obtain the following condition:  ∆2 (µ) & K + log n . σ2 (3.13) Discriminating with high probability between n observations from two gaussians in dimension 1 would require a separating rate of at least σ 2 log n. This implies that when K . log n, our result is minimax. Otherwise, to our knowledge the best clustering result on approximating mixture center is from [15], and on the condition that ∆2 (µ)/σ 2 & K 2 . Furthermore, the K & log n regime is known in the stochastic-block-model community as a hard regime where a gap is surmised to exist between the minimal information-theoretic rate and the minimal achievable computational rate (see for example [7]). In the high-dimensional setup n ∨ m log n . p, condition (3.12) becomes: r ∆2 (µ) pK & (K + log n) . (3.14) 2 σ n There are few information-theoretic bounds for high-dimension clustering. Recently, Banks, Moore, Vershynin, Verzelen and Xu (2017) [3] proved a lower p bound for Gaussian mixture clustering detection, namely they require a separation of order K(log K)p/n. When K . log n, our condition is only different in that it replaces log(K) by log(n), a price to pay for going from detecting the clusters to exactly recovering the clusters. Otherwise when K grows faster than log n there might exist a gap between the minimal possible rate and the achievable, as discussed previously. Adaptation to effective dimension. We can analyse further the condition (3.11) by introducing an effective dimension r∗ , measuring the largest volume repartition for our variance-bounding matrices Σ1 , ..., Σn . Let r∗ := maxa∈[n] |Σa |∗ γ2 = , σ2 maxa∈[n] |Σa |op (3.15) r∗ can also be interpreted as a form of global effective rank of matrices Σa . Indeed, define Re(Σ) := |Σ|∗ /|Σ|op , then we have r∗ 6 maxa∈[n] Re(Σa ) 6 maxa∈[n] rank(Σa ) 6 p. √ √ Now using V 2 6 r∗ σ 2 and γ = r∗ σ, condition (3.11) can be written as r  ∆2 (µ) r∗ K & K + log n + (K + log n) . (3.16) σ2 n By comparing this equation to (3.12), notice that r∗ is in place of p, indeed playing the role of an effective dimension for the problem. This also shows that our estimator adapts to this effective dimension, without any dimension reduction step. In consequence, equation (3.16) distinguishes between an actual high-dimensional setup: n ∨ m log n . r∗ and a ”low” dimensional setup r∗ . 5 n ∨ m log n under which, regardless of the actual value of p, our estimators recovers under the near-minimax condition of (3.13). b corr in the theorem above when n+m log n . r∗ . The This informs on the effect of correcting term Γ un-corrected version of the semi-definite program (3.5) has a leading separating rate of γ 2 /m = b corr correction on the other hand, (3.16) has leading separating factor smaller σ 2 r∗ /m,p but with the Γ √ √ 2 than σ (K + log n)r∗ /m = σ 2 n + m log n × r∗ /m. This provesp that in a high-dimensional setup, our correction enhances the separating rate of at least a factor (n + m log n)/r∗ . 4 Adaptation to the unknown number of group K It is rarely the case that K is known, but we can proceed without it. We produce an estimator adaptive to the number of groups K: let κ b ∈ R+ , we now study the following adaptive estimator: e corr := arg maxhΛ b −Γ b corr , Bi − κ B b tr(B). (4.1) B∈C Theorem 2. Suppose that m > 2 and (3.11) is satisfied. For c3 , c4 , c5 > 0 absolute constants suppose that the following condition on κ b is satisfied  √ p √  c4 V 2 n + σ 2 n + γ(σ log n + δ) + δ 2 n < c5 κ b < m∆2 (µ), (4.2) e corr = B ∗ with probability larger than 1 − c3 /n then we have B Notice that condition (4.2) essentially requires κ b to be seated between m∆2 (µ) and some components of the right-hand side of (3.11). So under (4.2), the results from the previous section apply e corr as well and this shows that it is not necessary to know K in order to the adaptive estimator B to perform well for recovering G. Finding an optimized, data-driven parameter κ b using some form of cross-validation is outside of the scope of this paper. 5 Numerical experiments We illustrate our method on simulated Gaussian data in two challenging, high-dimensional setup experiments for comparing clustering estimators. Our sample are drawn from K = 3 identicallysized, identically distributed and perfectly discriminated clusters of non-isovolumic Gaussians. The distributions are chosen to be isotropic, and the ratio between the lowest and the highest standard deviation is of 1 to 10. We draw points of a Rp space in two different scenarii. In (S1 ), for a given dimension space p = 2000 and a fixed isotropic noise level, we report the algorithms’ compared performances as the signal-to-noise ratio ∆2 (µ)/σ 2 is increased from 1 to 20. In (S2 ) we impose a fixed signal to noise ratio, and observe the algorithm’s decay in performance as the space dimension p is increased from 100 to 400 000. All points of the simulated space are reported as a median value with asymmetric standard deviations in the form of errorbars over a hundred simulations. b corr is a hard problem as n grows. For this task we implemented an ADMM Solving for estimator B solver from the work of Boyd et al. [4] with multiple stopping criterions including a fixed number of iterations of T = 3000. The results we report use n = 30 samples. For reference, we compare the recovering capacities of Gbcorr , labeled ’pecok’ in Figure 1 with other classical clustering algorithm. We chose three different but standard clustering procedures: Lloyd’s K-means algorithm [12] with K-means++ initialization [1] (although in scenario (S2 ), it is too slow to converge as p grows so we do not report it), Ward’s method for Hierarchical Clustering [22] and the low-rank clustering 6   NPHDQV SHFRN ORZUDQNVSHFWUDO KLHUDUFKLFDO FRUG  SHFRN ORZUDQNVSHFWUDO KLHUDUFKLFDO FRUG  c c VSOLWMRLQ G, G  VSOLWMRLQ G, G              615∆ 2 (µ)/σ 2 Scenario (S1 )         GLPHQVLRQS Scenario (S2 ) Figure 1: Performance comparison for classical clustering estimators and ours Gbcorr , labeled ’pecok’ b = in reference to [5]. The lower split-join, the better the clustering performance and split-join(G, G) 0 implies Gb = G. algorithm applied to the Gram matrix, a spectral method appearing in McSherry [14]. Lastly we include the CORD algorithm from Bunea et al. [6]. We measure the performances of estimators by computing the split-join metric on the cluster graphs, counting the number of edges to remove or add to go from one graph to the other. In the two experiments, the results of Gbcorr are markedly better than that of other methods. Scenario (S1 ) shows it can achieve exact recovery with a lesser signal to noise ratio than its competitors, whereas scenario (S2 ) shows its performances are decaying at a much lower rate than the others when the space dimension is increased. Because of the slow convergence of ADMM, Gbcorr comes with important computation times. Of course all of the compared methods have a very hard time reaching high sample sizes n in the high dimensional context and to that regard, the low-rank clustering method is by far the most promising. 6 Conclusion In this paper we analyzed a new semidefinite positive algorithm for clustering within the context of a flexible probabilistic model and exhibit the key quantities that guarantee non-asymptotic exact recovery. It implies an essential bias-removing correction that significanty improves the recovering rate in the high-dimensional setup. Hence we showed the estimator to be near-minimax, adapted to an effective dimension of the problem. We demonstrated that our estimator can in theory be optimally adapted to a data-driven choice of K. Lastly we illustrated on high-dimensional experiments that our approach is empirically stronger than other classical clustering methods. b corr Our method is computationally intensive even though it is of polynomial order. As the Γ 7 correction step of the algorithm can be interpreted as an independent, denoising step for the Gram matrix, we suggest using it as such for other notably faster algorithm such as the spectral algorithms. Acknowledgements This work is supported by a public grant overseen by the French National research Agency (ANR) as part of the “Investissement d’Avenir” program, through the “IDI 2015” project funded by the IDEX Paris-Saclay, ANR-11-IDEX-0003-02. It is also supported by the CNRS PICS funding HighClust. We thank Christophe Giraud for a shrewd, unwavering thesis direction. References [1] David Arthur and Sergei Vassilvitskii. K-means++: The advantages of careful seeding. In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’07, pages 1027–1035, Philadelphia, PA, USA, 2007. Society for Industrial and Applied Mathematics. [2] Martin Azizyan, Aarti Singh, and Larry Wasserman. Efficient Sparse Clustering of HighDimensional Non-spherical Gaussian Mixtures. In Guy Lebanon and S. V. N. Vishwanathan, editors, Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38 of Proceedings of Machine Learning Research, pages 37–45, San Diego, California, USA, 09–12 May 2015. PMLR. [3] J. Banks, C. Moore, N. Verzelen, R. Vershynin, and J. Xu. Information-theoretic bounds and phase transitions in clustering, sparse PCA, and submatrix localization. ArXiv e-prints, July 2016. [4] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. Learn., 3(1):1–122, January 2011. [5] F. Bunea, C. Giraud, M. Royer, and N. Verzelen. PECOK: a convex optimization approach to variable clustering. ArXiv e-prints, June 2016. [6] Florentina Bunea, Christophe Giraud, and Xi Luo. Minimax optimal variable clustering in g-models via cord. arXiv preprint arXiv:1508.01939, 2015. [7] Yudong Chen and Jiaming Xu. Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and submatrices. J. Mach. Learn. Res., 17(1):882–938, January 2016. [8] Stéphane Chrétien, Clément Dombry, and Adrien Faivre. A semi-definite programming approach to low dimensional embedding for unsupervised clustering. CoRR, abs/1606.09190, 2016. [9] Sanjoy Dasgupta and Leonard Schulman. A probabilistic analysis of em for mixtures of separated, spherical gaussians. J. Mach. Learn. Res., 8:203–226, May 2007. [10] Chris Fraley and Adrian E. Raftery. Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association, 97(458):611–631, 2002. [11] Olivier Guédon and Roman Vershynin. Community detection in sparse networks via grothendieck’s inequality. CoRR, abs/1411.4686, 2014. [12] S. Lloyd. Least squares quantization in pcm. IEEE Trans. Inf. Theor., 28(2):129–137, September 1982. [13] J. MacQueen. Some methods for classification and analysis of multivariate observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Statistics, pages 281–297, Berkeley, Calif., 1967. University of California Press. 8 [14] F. McSherry. Spectral partitioning of random graphs. In Proceedings of the 42Nd IEEE Symposium on Foundations of Computer Science, FOCS ’01, pages 529–, Washington, DC, USA, 2001. IEEE Computer Society. [15] D. G. Mixon, S. Villar, and R. Ward. Clustering subgaussian mixtures with k-means. In 2016 IEEE Information Theory Workshop (ITW), pages 211–215, Sept 2016. [16] Jiming Peng and Yu Wei. Approximating k-means-type clustering via semidefinite programming. SIAM J. on Optimization, 18(1):186–205, February 2007. [17] Philippe Rigollet. High-Dimensional Statistics. Massachusetts Institute of Technology: MIT OpenCourseWare, Spring 2015. [18] Mark Rudelson and Roman Vershynin. Hanson-wright inequality and sub-gaussian concentration. Electron. Commun. Probab, 18(82):1–9, 2013. [19] H. Steinhaus. Sur la division des corp materiels en parties. Bull. Acad. Polon. Sci, 1:801–804, 1956. [20] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. Chapter 5 of: Compressed Sensing, Theory and Applications. Cambridge University Press, 2012. [21] N. Verzelen and E. Arias-Castro. Detection and Feature Selection in Sparse Mixture Models. ArXiv e-prints, May 2014. [22] Joe H. Ward. Hierarchical grouping to optimize an objective function. Journal of the American Statistical Association, 58(301):236–244, 1963. 9 Appendix A A.1 Intermediate results Generic controls for exact recovery b be any estimator of Γ and let B b := arg maxB∈C hΛ b − Γ, b Bi. Let Γ K b − Γ|V 6 γ̄n2 with probability 1 − c1 /n, Theorem 3. For c1 , c2 > 0 absolute constants suppose that |Γ and that   p √ m∆2 (µ) > c2 σ 2 (n + m log n) + V 2 ( n + m log n) + γ̄n2 + δ 2 ( n + m) , (A.1) b = B ∗ with probability larger than 1 − c1 /n then we have B e := arg maxB∈C hΛ b − Γ, b Bi − κ In the case where the number of groups is unknown we study B b tr(B) for κ b ∈ R. b − Γ|∞ 6 γ̄n2 with probability Theorem 4. For c3 , c4 , c5 > 0 absolute constants suppose that |Γ 1 − c3 /n. Suppose that (A.1) is satisfied and that the following condition on κ b is satisfied  √ √  c4 V 2 n + σ 2 n + γ̄n2 + δ 2 n < c5 κ b < m∆2 (µ), (A.2) e = B ∗ with probability larger than 1 − c3 /n then we have B A.2 On estimating Γ b = 0 hence a deterministic perturbation term γ̄ 2 = |Γ|∞ weighing on In the general case we have Γ n b corr , we have the following result. the separation requirements. For Γ Proposition 4. Assume that m > 2. For c6 , c7 > 0 absolute constants, with probability larger than 1 − c6 /n we have   p b corr − Γ|∞ 6 c7 σ 2 log n + (δ + σ log n)γ + δ 2 . |Γ A.3 (A.3) Concentration of random subgaussian Gram matrices A key result in our proof is the following concentration bound on the Gram matrix of centered, subgaussian, independent random variables. Lemma 1. For some absolute constant ch∗ > i0, for a ∈ [n] let Ea be centered, independent random ... vectors in Rd , Ea ∼ subg(Σa ). Let E := E...aT ∈ Rn×d then ∀t > 0  √   T P |EE − E EE |op > 2 max |Σa |F t + 2 max |Σa |op t 6 9n 2e−c∗ t .  T a∈[n] a∈[n] 10 (A.4) B Main proofs B.1 Proof of Proposition 1: identifiability Suppose that X1 , ..., Xn are (G, µ, δ)-clustered with |G| = K, and ρ(G, µ, δ) > 4. Then we remark G that for (a, b) ∈ [n]2 , a ∼ b is equivalent to |νa − νb |2 6 2δ because: G • if a ∼ b then there exist k ∈ [K] such that |νa − νb |2 6 |νa − µk |2 + |µk − νb |2 6 2δ G • if a 6∼ b then there exist (k, l) ∈ [K]2 such that |νa − νb |2 > |µk − µl |2 − |νa − µk |2 − |νb − µl |2 > 4δ − 2δ > 2δ. Now suppose there exist G 0 such that X1 , ..., Xn are (G 0 , µ0 , δ 0 )-clustered with |G 0 | = K and ρ(G 0 , µ0 , δ 0 ) > 4. By symmetry we can assume δ 0 6 δ, and the previous remark shows that G 0 is a sub-partition of G, ie G preserves the structure of G 0 . But since |G| = |G 0 | this implies G = G 0 . B.2 Exact recovery with high probability The proof for Theorem 1 (respectively Theorem 2) is a composition of Theorem 3 (respectively Theorem 4) and Proposition 4. In this section, under Hypothesis 1, we have ∀k ∈ [K], ∀a ∈ Gk : Xa ∼ subg(Σa ). For k ∈ [K], we define σk2 := maxa∈Gk |Σa |op 6 σ 2 , Vk2 := maxa∈Gk |Σa |F 6 V 2 , γk2 := maxa∈Gk |Σa |∗ 6 γ 2 . A number of proofs in this section are adapted from the proof ensemble of [5]. In it the authors use a latent model for variable clustering. A comparable model in this work would require to impose the following conditions on X1 , ..., Xn : identically distributed variables within a group (implying δ = 0) and isovolumic, Gaussian distributions. B.2.1 Proof of Theorem 3 In this theorem we only need to consider B ∈ CK , but the proof of Theorem 4 is similar to this one, hence we will start by considering the more general B ∈ C and use B ∈ CK at a later stage of the proof. Thus we want to prove that under some conditions, with high probability: b − Γ, b B ∗ − Bi > 0 for all B ∈ C \ {B ∗ } hΛ (B.1) For (a, b) ∈ Gk × Gl for (k, l) ∈ [K]2 , let: (S1 )ab := −|µk − µl |22 /2 (B.2) (W1 )ab := hνa − µk , νb − µl i (W2 )ab := hµk − νa + νb − µl + Eb − Ea , µk − µl i (W3 )ab := hEb − Ea , νa − µk + µl − νb i (W4 )ab := (hEa , Eb i − Γab ) b ab (W5 )ab := (Γ − Γ) Lemma 2. Proving (B.1) reduces to proving hS1 + W1 + W2 + W3 + W4 + W5 , B ∗ − Bi > 0 for all B ∈ C \ {B ∗ }. 11 (B.3) The proof for Lemma 2 is found in section B.2.3. So we need only concern ourselves with the quantities S1 , W1 , W2 , W3 , W4 , W5 . The term S1 contains our uncorrupted signal and since hS1 , B ∗ i = 0 it writes: X hS1 , B ∗ − Bi = 16k6=l6K 1 |µk − µl |22 |BGk Gl |1 2 (B.4) The other parts are noisy and must be controlled. The term W2 is a simple subgaussian form controlled through the following lemma, proved in section B.2.4: Lemma 3. For c02 > 0 absolute constant, with probability greater than 1 − 1/n: ∀B ∈ C, ∗ |hW2 , B − Bi| 6  X q  2δ + c02 (log n)(σk2 + σl2 ) |µk − µl |2 |BGk Gl |1 . (B.5) 16k6=l6K To control the other noisy terms we now introduce a deterministic result: Lemma 4. For any symmetric matrix W ∈ Rn×n we have: ∀B ∈ C, X |hW, B ∗ − Bi| 6 6|B ∗ W |∞ |BGk Gl |1 + |W |op 16k6=l6K h X i |BGk Gl |1 /m + (tr(B) − K) . 16k6=l6K (B.6) The proof for Lemma 4 will be found in [5], p.21-22 until eq. (58). As B ∗ 1 = 1 and B ∗ > 0, |B ∗ W |∞ 6 |W |∞ so we use the lemma on terms W1 and W3 by bounding √ |W |∞ and |W |op : for the term W1 we use |W1 |∞ 6 δ 2 so |W1 |op 6 δ 2 n. To control the term W3 , we use the subgaussian tail bound of (B.25) with |νa − µk + µl − νb |2 6 2δ and a union bound over (a, b) p ∈ [n]2 . We get that for c03 > 0 absolute constant, with probability greater than 1 − 1/n, p 0 √ 0 2 2 |W3 |∞ 6 c3 (log n)σ δ and |W3 |op 6 c3 (log n)σ 2 δ 2 × n therefore with probability greater than 1 − 1/n, ∀B ∈ C: √ i √ n |hW1 , B − Bi| 6 δ |BGk Gl |1 (6 + ) + n(tr(B) − K)+ m 16k6=l6K √ q h X i √ n |hW3 , B ∗ − Bi| 6 c03 (log n)σ 2 δ 2 |BGk Gl |1 (6 + ) + n(tr(B) − K)+ m ∗ 2 h X (B.7) (B.8) 16k6=l6K For the term W4 we introduce the following lemma, proved in section B.2.5: Lemma 5. For c04 , c004 > 0 absolute constants, with probability larger than 1 − 2/n: i h p √ √ ∀B ∈ C, |hW4 , B ∗ − Bi| 6 6c04 (V 2 log n + σ 2 log n)/ m + c004 (V 2 n + σ 2 n)/m √ + (tr(B) − K)+ c004 (V 2 n + σ 2 n). X |BGk Gl |1 16k6=l6K (B.9) Lastly as the term W5 is diagonal we have |W5 |op = |W5 |∞ and |B ∗ W5 |∞ 6 |W5 |∞ /m therefore: ∀B ∈ C, ∗ |hW5 , B − Bi| 6 |W5 |∞ h7 m X 16k6=l6K 12 |BGk Gl |1 + (tr(B) − K)+ i (B.10) Using those controls of W1 , W2 , W3 , W4 , W5 , in combination in a union bound in (B.3) we get for c01 > 0 absolute constant, with probability greater than 1 − c01 /n: ∀B ∈ C, q   X h1 hS1 + W1 + W2 + W3 + W4 + W5 , B ∗ − Bi > |µk − µl |22 − 2δ + 2c02 (log n)σ 2 |µk − µl |2 2 16k6=l6K √ √ √ q i 2 n + σ2n 2 log n + σ 2 log n n 2 7 00 V 0 V √ + c4 ) − |W5 |∞ − (6 + )(δ + c03 (log n)σ 2 δ 2 ) |BGk Gl |1 − (6c4 m m m m q √ √ − (tr(B) − K)+ [c004 (V 2 n + σ 2 n) + (δ 2 + c03 (log n)σ 2 δ 2 ) n + |W5 |∞ ] (B.11) We now use the fact that for this theorem we are only considering B ∈ CK , ie matrices such that tr(B) = K so we can discard the last line of (B.11). In this particular context we can improve the control provided by Lemma 4 for W5 : as tr(B ∗ ) = K, we have for α ∈ R : |hW5 , B ∗ − Bi| 6 |hW5 − αIn , B ∗ − Bi| + |α(tr(B) − K)|. So by choosing α = (maxa (W5 )aa + mina (W5 )aa )/2, we have |W5 − αIn |op = |W5 − αIn |∞ = |W5 |V /2 and therefore: X 7 ∀B ∈ CK |hW5 , B ∗ − Bi| 6 |W5 |V |BGk Gl |1 (B.12) 2m 16k6=l6K In consequence we can replace |W5 |∞ by |W5 |V /2 in the second line of (B.11), and with another union bound, by assumption we replace |W5 |V /2 by γ̄n2 /2. Lastly Lemma 3 p. 17 from [5] shows the only matrix in CK whose support is included in supp(B ∗ ) P is B ∗ , therefore B ∈ CK \{B ∗ } implies 16k6=l6K |BGk Gl |1 > 0. Hence for c2 > 0 absolute constant, the following condition on ∆(µ) is sufficient to ensure exact recovery with probability larger than 1 − c1 /n: p   √ √ 1 ∆2 (µ) > c2 σ 2 m log n + V 2 m log n + V 2 n + σ 2 n + γ̄n2 + δ 2 ( n + m) × (B.13) m This concludes the proof for Theorem 3. B.2.2 Proof of Theorem 4: adaptive exact recovery In this Theorem we need to take into account the additional penalization term κ b tr(B). Notice it is b b b b κIn , B ∗ −Bi = equivalent to a correction by κ bIn of our estimator Λ− Γ, therefore for B ∈ C, hΛ− Γ−b ∗ b − Γ, b B − Bi + κ hΛ b × (tr(B) − K). Therefore for Theorem 4 we can follow the same proof as in Theorem 3 until establishing (B.11), at which point we can use a union bound to use the assumption |W5 |∞ 6 γ̄n2 . Consequently we have with probability greater than 1 − c01 /n: ∀B ∈ C, q   X h1 hS1 + W1 + W2 + W3 + W4 + W5 , B ∗ − Bi > |µk − µl |22 − 2δ + 2c02 (log n)σ 2 |µk − µl |2 2 16k6=l6K √ √ √ q i 2 n + σ2n 2 log n + σ 2 log n 7 2 n 2 0 V 00 V √ − (6c4 + c4 ) − γ̄n − (6 + )(δ + c03 (log n)σ 2 δ 2 ) |BGk Gl |1 m m m m q √ √ − (tr(B) − K)+ [c004 (V 2 n + σ 2 n) + (δ 2 + c03 (log n)σ 2 δ 2 ) n + γ̄n2 ] + κ b(tr(B) − K) (B.14) Using the assumption (A.1) of Theorem 4 there exist c02 > 0 such that with probability greater than 1 − c01 /n: ∀B ∈ C, X hS1 + W1 + W2 + W3 + W4 , B ∗ − Bi > c02 ∆2 (µ) |BGk Gl |1 16k6=l6K − (tr(B) − K)+ [c004 (V 2√ q √ n + σ 2 n) + (δ 2 + c03 (log n)σ 2 δ 2 ) n + γ̄n2 ] + κ b(tr(B) − K) 13 (B.15) From here, when tr(B) > K, the left-hand P side of (A.2) is sufficient to ensure recovery. When tr(B) = K, we already established that 16k6=l6K |BGk Gl |1 > 0 for all matrices B ∈ CK \ {B ∗ } 1 P so (A.1) is sufficient in that case. Lastly note that K − tr(B) 6 m 16k6=l6K |BGk Gl |1 (see [5] eq. (57) p.21) so the right-hand side of (A.2) is sufficient condition for recovery when tr(B) − K < 0. This concludes the proof of Theorem 4. B.2.3 Proof of Lemma 2 b − Γ) b ab = hXa , Xb i − Γ b ab = hνa , νb i + hνa , Eb i + hνb , Ea i + hEa , Eb i − Γ b ab (Λ (B.16) = hνa , νb i + hνa − νb , Eb − Ea i + hνa , Ea i + hνb , Eb i + (W4 + W5 )ab (B.17) = hνa , νb i + hµk − µl , Eb − Ea i + (W3 )ab + hνa , Ea i + hνb , Eb i + (W4 + W5 )ab (B.18) = −hµk , µl i + hνa − µk , νb − µl i + hνa , µl i + hµk , νb i + hµk − µl , Eb − Ea i + (W3 )ab + hνa , Ea i + hνb , Eb i + (W4 + W5 )ab 1 = −(S1 )ab − (|µk |22 + |µl |22 ) + (W1 )ab + hνa , µl i + hµk , νb i 2 + hµk − µl , Eb − Ea i + (W3 )ab + hνa , Ea i + hνb , Eb i + (W4 + W5 )ab 1 = −(S1 )ab − (|µk |22 + |µl |22 ) + (W1 )ab + hνa , µk i + hµl , νb i 2 + hµk − µl , νb − νa + Eb − Ea i + (W3 )ab + hνa , Ea i + hνb , Eb i + (W4 + W5 )ab 1 = −(S1 )ab − (|µk |22 + |µl |22 ) + (W1 )ab + hνa , µk i + hµl , νb i 2 + 2(S1 )ab + (W2 )ab + (W3 )ab + hνa , Ea i + hνb , Eb i + (W4 + W5 )ab (B.19) (B.20) (B.21) (B.22) Now since (hνa , µk i)(a,b)∈[n]2 = (hνa , µk i)a∈[n] ×1Tn , (|µk |22 )(a,b)∈[n]2 = (|µk |22 )a∈[n] ×1Tn , (hνb , µl i)(a,b)∈[n]2 = 1n × (hνb , µl i)b∈[n] , (|µl |22 )(a,b)∈[n]2 = 1n × (|µl |22 )b∈[n] , (hνa , Ea i)(a,b)∈[n]2 = (hνa , Ea i)a∈[n] × 1Tn , (hνb , Eb i)(a,b)∈[n]2 = 1n × (hνb , Eb i)b∈[n] and since B1n = B ∗ 1n = (1Tn B)T = (1Tn B ∗ )T = 1n , we have: b − Γ, b B ∗ − Bi = hS1 + W1 + W2 + W3 + W4 + W5 , B ∗ − Bi hΛ B.2.4 (B.23) Proof of Lemma 3: control of |hW2 , B ∗ − Bi| By definition, P (W2 )ab = 0 when k = l and (B ∗ )ab = 0 when k 6= l so we have hW2 , B ∗ i = 0. Let hA, BiGk Gl = (a,b)∈Gk ×Gl Aab Bab , we have: hW2 , B ∗ − Bi = −hW2 , Bi = − X hW2 , BiGk Gl 6 16k6=l6K X |W2|Gk Gl |∞ |BGk Gl |1 (B.24) 16k6=l6K Let (a, b) ∈ Gk × Gl , we look at (W2 )ab = hEb − Ea − (νa − µk ) + (νb − µl ), µk − µl i = hEa − Eb , µk − µl i + h−(νa − µk ) + (νb − µl ), µk − µl i. The term on the right is a constant offset bounded by 2δ|µk − µl |2 . Let z := µk − µl , by Lemma 7 hEa − Eb , zi is a subgaussian variable with variance bounded by (σk2 + σl2 )|z|22 therefore its tails are characteristically bounded (see for example [20]), there exist c∗ > 0 absolute constant such that ∀t > 0:   q 2 2 2 (B.25) P |hEb − Ea , zi| > |z|2 σk + σl × t 6 e1−c∗ t 14 q h i 2 This implies that ∀t > 0, P |(W2 )ab | > |µk − µl |2 (2δ + σk2 + σl2 × t) 6 e1−c∗ t . We conclude with 2 a union p bound over all (a, b) ∈ Gk × Gl , a union bound over all (k, l) ∈ [K] , k 6= l and by taking t = (1 + 3 log n)/c∗ . B.2.5 Proof of Lemma 5: control of |hW4 , B ∗ − Bi| Recall (W4 )ab = hEa , Eb i − Γab . We will prove Lemma 5 by using the derivation of (B.6) combined with Lemma 1 for control of the operator norm and the following lemma for the remaining part. Lemma 6. For c04 > 0 absolute constant, with probability greater than 1 − 1/n: |B ∗ W4 |∞ 6 c04 × (V 2 p √ log n + σ 2 log n)/ m. (B.26) Proof. Let (a, b) ∈ Gk × Gl , we rewrite (B ∗ W4 )ab as the sum of the following two terms: ∗ (B W4 )ab ub ek , Eb i with × 1k=l + hE = |Gk | ( ub := |Eb |22 − Γbb ek := 1 P E c∈Gk ,c6=b Ec |Gk | (B.27) √   The bound for ub uses Lemma 9: ∀t > 0 P ||Eb |22 − E |Eb |22 | > Vl2 t + σl2 t 6 2e−c∗ t so only p ek is a centered the scalar product remains to be controlled. Notice that by Lemma 7, |Gk |E P 1 2 e e= e subgaussian with variance-bounding matrix Σ c∈Gk ,c6=b Σc , therefore |Σ|F 6 Vk and |Σ|op 6 |Gk | σk2 . So using Lemma 9 again we find ∀t > 0: h p i √ √ ek , Eb i| > 2hΣ, e Σb i1/2 t + |Σ e 1/2 Σ1/2 |op t 6 2e−c∗ t P 2| |Gk |hE b (B.28) e Σb i1/2 6 Vk Vl 6 V 2 (Cauchy-Schwarz) and applying Therefore using a union bound, then hΣ, 2 another union bound over all (a, b) ∈ [n] with t = (log 4 + 3 log n)/c∗ yields the result. We are ready to wrap-up the proof. From Lemma 1 applied to W4 , taking t = (log 2 + n log 9 + log n)/c∗ there exists c004 > 0 absolute constant such that we have with probability greater than √ 1 − 1/n: |W4 |op 6 c004 (V 2 n + σ 2 n). Now applying Lemma 4 to W4 : |hW4 , B ∗ − Bi| 6 6|B ∗ W4 |∞ X |BGk Gl |1 + |W4 |op 16k6=l6K h X i |BGk Gl |1 /m + (tr(B) − K) 16k6=l6K (B.29) Therefore combining the lemma with the derivations above and a union bound, we get with probability greater than 1 − 2/n: i h p √ √ |hW4 , B ∗ − Bi| 6 6c04 (V 2 log n + σ 2 log n)/ m + c004 (V 2 n + σ 2 n)/m √ + (tr(B) − K)+ c004 (V 2 n + σ 2 n) This concludes the proof for Lemma 5. 15 X |BGk Gl |1 16k6=l6K (B.30) B.3 bcorr Proof of Proposition 4, Gamma estimator Γ Let a ∈ Gk , b1 ∈ Gl1 , b2 ∈ Gl2 , using (2.1) and 2|xy| 6 x2 + y 2 we have for a ∈ [n]: b aa − Γaa | = |hXa − Xb , Xa − Xb i − Γaa | 6 U1 + 3 U2 + 2U3 + 3U4 |Γ 1 2 2 where: U1 := ||Ea |22 − Γaa | (B.31) U2 := |νa − νb1 |22 + |νa − νb2 |22 νa − νc , Eb i2 U3 := sup h |ν − ν | 2 a c 2 (b,c)∈[n] U4 := sup |hEb , Ec i| (b,c)∈[n]2 ,b6=c Control of U1 = ||Ea |22 − Γaa |: by using the first inequality from Lemma 9 with t = (2 log n + log 2)/c∗ there exists c01 > 0 such that with probability greater than 1 − 1/n2 : p (B.32) U1 6 c01 × (Vk2 log n + σk2 log n) −1/2 −νc Control of U3 = sup(b,c)∈[n]2 h |ννaa−ν , Eb i2 : write z = (νa − νc )/|νa − νc |2 and Y = Σb c |2 1/2 T Eb ∼ 1/2 subg(Ip ) and A = Σb (zz T )Σb , so that: hz, Eb i2 = EbT zz T Eb = Y T AY . Because |z|2 = 1 and zz T is symmetric of rank 1 we have |A|F = |A|op = tr(A) 6 σ 2 therefore we use Lemma 8 with t = (4 log n + log 2)/c∗ and then a union bound over all (b, c) ∈ [n]2 so that with probability greater than 1 − 1/n2 : U3 6 c03 × σ 2 log n (B.33) Control of U4 = sup(b,c)∈[n]2 ,b6=c |hEb , Ec i|: using the fact that Eb and Ec are independent and the second inequality of Lemma 9 with t = (4 log n + log 2)/c∗ , a union bound over all (b, c) ∈ [n]2 , there exists c04 > 0 such that we have with probability greater than 1 − 1/n2 : p U4 6 c04 × (σ 2 log n + V 2 log n) (B.34) Control of U2 = |νa − νb1 |22 + |νa − νb2 |22 : here we use the requirement that all groups are of length at least m > 3, there exist (a1 , a2 ) ∈ Gk \ {a}, (c, d) ∈ ([n] \ {a, a1 , a2 })2 , let Z = (Xc − Xd )/|Xc − Xd |2 . For au ∈ {a1 , a2 } we have hXa − Xau , Zi = hνa − νau , Zi + hEa − Eau , Zi. By independence and Lemma 7, hEa − Eau , Zi is subgaussian with variance bounded by 2σ 2 . Therefore using the subgaussian tail bounds of (B.25) and a union bound, there exists √ c02 > 0 absolute constant such 2 0 that with probability over 1 − 1/n : V (a, a1 ) ∨ V (a, a2 ) 6 2δ + c2 σ log n. Hence for bu ∈ {b1 , b2 } with probability over 1 − 1/n2 : p |hXa − Xbu , Xc − Xd i| 6 (2δ + c02 σ log n)|Xc − Xd |2 (B.35) Now suppose l1 6= k, choose c ∈ Gk \ {a}, d ∈ Gl1 \ {b1 }. We have |Xc − Xd |2 6 |µk − µl1 |2 + 2δ + |Ec − Ed |2 . We also have hXa − Xb1 , Xc − Xd i = hνa − νb1 + Ea − Eb1 , νc − νd + Ec − Ed i = hµk − µl1 + δab +Ea −Eb1 , µk −µl1 +δcd +Ec −Ed i for δab = (νa −νb1 )−(µk −µl1 ) and δcd = (νc −νd )−(µk −µl1 ). Therefore: (B.36) |hXa − Xb1 , Xc − Xd i| > |µk − µl1 |22 /2 − 4δ|µk − µl1 |2 1 µk − µl1 δcd − h , Ec + Ea − Ed − Eb1 i2 − 2 sup h , Eb i2 − 4U4 − 12δ 2 2 |µk − µl1 |2 (b,c,d)∈[n]3 |δcd |2 > |µk − µl1 |22 /2 − 4δ|µk − µl1 |2 − 8U30 − 2U300 − 4U4 − 12δ 2 16 (B.37) −µl where U30 = sup(b,l)∈[n]×[K] h |µµkk−µ , Eb i2 , U300 = sup(b,c,d)∈[n]3 h |δδcdcd|2 , Eb i2 . l |2 So combining the last derivations: |µk − µl1 |22 /2 − 4δ|µk − µl1 |2 6 (2δ + c02 σ p log n)(|µk − µl1 |2 + 2δ + |Ec − Ed |2 ) +8U30 + 2U300 + 4U4 + 12δ 2 (B.38) Notice that U30 , U300 can be controlled exactly as U3 was, and simultaneously: for c003 > 0 absolute constant, with probability greater than 1 − 1/n2 : 8U30 + 2U300 6 c003 σ 2 log n. We |Ec − Ed |2 : notice that by Lemma 7, Ec − Ed is subg(Σc + Σd ). We have  now control  2 E |Ec − Ed |2 6 |Σc + Σd |∗ 6 2γ 2 , |Σc + Σd |F 6 2V 2 6 2σγ and |Σc + Σd |op 6 2σ 2 . Therefore by the first inequality of Lemma 9 with t = (4 log n + log 2)/c∗ and a union bound over all (c, d) ∈ [n]2 , there exists c002 > 0 absolute constant such that we have simultaneously with probability greater than 1 − 1/n2 : sup (c,d)∈[n]2 |Ec − Ed |2 6 c002 q p p γ 2 + σγ log n + σ 2 log n 6 c002 (γ + σ log n) (B.39) Therefore with a union bound, with probability greater than 1 − 4/n2 : |µk − µl1 |22 /2 − (c02 σ p p p c00 4c0  log n + 6δ)|µk − µl1 |2 6(2δ + c02 σ log n) 2δ + (γ + σ log n)(c002 + 30 + 0 4 ) c2 c2 + 12δ 2 (B.40) 0 2 2 Hence for √ c5 > 0 absolute √ constant we have with probability greater than 1 − 4/n : |µk − µl1 |2 62 0 c5 (δ + σ log n)(δ + σ log n + γ). The same control can be derived simultaneously for |µk − µl2 |2 by replacing d ∈ Gl1 \ {b1 } by d0 ∈ Gl2 \ {b1 , b2 }. We conclude that for c005 > 0 absolute constant, we have with probability greater than 1 − 4/n2 : U2 6 2|µk − µl1 |22 + 2|µk − µl2 |22 + 16δ 2 6 c005 (δ + σ p log n)(δ + σ p log n + γ) (B.41) Therefore with a union bound over all four terms U1 , U2 , U3 , U4 and a ∈ [n], √ for c6 , c7 >√0 absolute b constants we have with probability greater than 1−c6 /n: |Γ−Γ|∞ 6 c7 (δ+σ log n)(δ+σ log n+γ). This concludes the proof of Proposition 4 B.4 Proof of Proposition 2 b = 0 so that W5 = Γ, notice that For this proof we rely heavily on the proof of Theorem 3: let Γ W3 and W4 are centered. We take expectation of (B.3), therefore proving hΛ + Γ, B ∗ − Bi > 0 for all B ∈ CK \ {B ∗ } is equivalent to proving: hS1 + W1 + E [W2 ] + Γ, B ∗ − Bi > 0 for all B ∈ CK \ {B ∗ } (B.42) Notice that for (a, b) ∈ Gk × Gl , E [(W2 )ab ] 6 2δ|µk − µl |2 . Using this in combination with other 17 arguments from the proof of Theorem 3, that is using (B.4), (B.7) and (B.12), we have ∀B ∈ CK : 1 |µk − µl |22 |BGk Gl |1 2 16k6=l6K √ X n |hW1 , B ∗ − Bi| 6 δ 2 (6 + )|BGk Gl |1 m 16k6=l6K X ∗ |hE [W2 ] , B − Bi| 6 2δ|µk − µl |2 |BGk Gl |1 X hS1 , B ∗ − Bi = (B.43) (B.44) (B.45) 16k6=l6K X |hW5 , B ∗ − Bi| 6 16k6=l6K 7|Γ|V |BGk Gl |1 2m (B.46) Thus we have: ∗ hS1 + W1 + E [W2 ] + W5 , B − Bi > X 16k6=l6K h1 2 √ |µk − µl |22 2 − 2δ|µk − µl |2 − δ (6 + n 7|Γ|V i )− |BGk Gl |1 m 2m (B.47) √ Hence we deduce that there exist c0 absolute constant such that if ρ2 (G, µ, δ) > c0 (6 + n/m) and {0,1} ⊂ CK , this m∆2 (µ) > 8|Γ|V , then we have arg maxB∈CK hΛ + Γ, Bi = B ∗ . Lastly as B ∗ is in CK concludes the proof. B.5 Proof of Proposition 3 Assume X1 , ..., Xn is (G, µ, δ)-clustered with caracterizing matrix B ∗ and define the following: • δ = 0 implying maximum discriminating capacity for G ie ρ(G, µ, δ) = +∞. • Let    ∗ B :=     1 m 1 m 1 m     ∈ C {0,1} K   and  2/m 2/m  B1 :=   1 2m   ∈ C {0,1} K  1 represents constant square blocks of size m and value 1/m, and the other values m in the matrices are zeros. √ √ √ • K = 3 and for some ∆ > 0, µ1 = (∆/ 2, 0, 0)T and µ2 = (0, ∆/ 2, 0)T , µ3 = (0, 0, ∆/ 2)T where G so that for (a, b) ∈ Gk × Gl : Λab = hµk , µl i = ∆2 /2 × 1{a ∼ b}. Then ∆2 (µ) = ∆2 and Λ = (∆2 /2)mB ∗ . • For γ+ > γ− > 0 let Γ = diag (γ+ , ..., γ+ , γ− , ..., γ− , γ− , ..., γ− ) | {z } | {z } | {z } m m m Then we have the following: hB ∗ , Γi = γ+ + 2γ− , hB1 , Γi = 2γ+ + γ− , hB ∗ , Λi = ∆2 /2 × 3m, hB1 , Λi = ∆2 /2 × 2m. Thus we have hB ∗ , Λ + Γi < hB1 , Λ + Γi as soon as m∆2 (µ) < 2(γ+ − γ− ). This concludes the proof. 18 C Subgaussian properties and controls Lemma 7. ∀a ∈ [n] let Ya ∼ subg(Σa ), independent, Σa ∈ Rd×d then Y = (Y1T , ..., YnT )T ∼ subg(diag (Σa )a∈[n] ), X X c2a Σa ). ca Ya ∼ subg( Z= (C.1) (C.2) a∈[n] a∈[n] Proof. By independence for z = {z1T , ..., znT }T ∈ Rnd , za ∈ Rd we have n n h T i Y i Y h T T T z (Y −E Y ) za (Ya −E Ya ) E e = 6 E e eza Σa za /2 = ez diag(Σa )a∈[n] z/2 a=1 a=1 n n h T i Y h T i Y P T 2 T 2 E ez1 (Z−E Z) = E ez1 ca (Ya −E Ya ) 6 ez1 ca Σa z1 /2 = ez1 ( a∈[n] ca Σa )z1 /2 a=1 a=1 Lemma 8. Hanson-Wright inequality for subgaussian variables Let Y be a centered random vector, Y ∼ subg(Id ), let A be a matrix of size d × d. There exists c∗ > 0 such that for any t > 0 h i √   P |Y T AY − E Y T AY | > |A|F t + |A|op t 6 2e−c∗ t . (C.3) Proof. A variation of the original Hanson-Wright inequality (Theorem 1.1 from [18]), it holds as σ = 1 bounds the subgaussian norm |Y |Ψ2 := supx∈Sd−1 supp>1 p−1/2 (E |xT Y |p )1/p , a consequence of Lemma 5.5 from [20]. Lemma 9. Subgaussian quadratic forms Let E, E 0 be centered, independent random vectors, E ∼ subg(Σ), E 0 ∼ subg(Σ0 ), then for t > 0 h i √ P ||E|22 − E |E|22 | > |Σ|F t + |Σ|op t 6 2e−c∗ t (C.4) h i √ √ P 2|hE, E 0 i| > 2hΣ, Σ0 i1/2 t + |Σ1/2 Σ01/2 |op t 6 2e−c∗ t . (C.5) Proof. For the first inequality, we use Lemma 8 with Y = Σ−1/2 E and A = Σ. As for the second inequality, by Lemma 7 we have Y = (E T Σ−1/2 , E 0T Σ0 −1/2T )T ∼ subg(I2d ). Then let us use Lemma 8 with ! 0 Σ1/2 Σ01/2 A= T T Σ01/2 Σ1/2 0 Notice that |A|2F = 2hΣ, Σ0 i and |A|op 6 |Σ1/2 Σ01/2 |op so the results follow. Proof of Lemma 1: concentration of random subgaussian Gram matrices. Let W := EET − E[EET ]. Using the epsilon-net method as in Lemma 4.2 from [17], let N be a 2 1/4-net for Sn−1 such that |N | 6 9n (see Lemma 5.2 [20]), we have for u, v ∈ Sn−1 : uT W v 6 1 1 T T T T maxx∈N x W v + 4 maxu∈Sn−1 u W v 6 maxx,y∈N 2 x W y + 2 maxu,v∈Sn−1 u W v hence 2 |W |op 6 2 max xT W y x,y∈N 2 and P [|W |op > t] 6 X x,y∈N 2 19   P xT W y > t/2 (C.6) P P P P Notice that this rewrites xT W y = na=1 nb=1 xa (EaT Eb − Γab )yb = ( na=1 EaT xa )( nb=1 EbT yb )T − P P 1/2 1/2 E( na=1 EaT xa )( nb=1 EbT yb )T . For x, y ∈ N 2 , let x ⊗ Σ1/2 := (x1 Σ1 , ..., xn Σn )T ∈ Rnp×p and −1/2 −1/2 Y = (E1T Σ1 , ..., EnT Σn )T ∈ Rnp×1 (by Lemma 7 we have Y ∼ subg(Inp )). We have xT W y = Y T (x ⊗ Σ1/2 )(y ⊗ Σ1/2 )T Y − E[Y T (x ⊗ Σ1/2 )(y ⊗ Σ1/2 )T Y ] (C.7) Now define A := (x ⊗ Σ1/2 )(y ⊗ Σ1/2 )T : we have |A|op 6 maxa∈[n] |Σa |op because for z ∈ Rp , P 1/2 |(x ⊗ Σ1/2 )z|22 = nb=1 x2b |Σb z|22 6 maxa∈[n] |Σa |op |z|22 . As for the Frobenius norm, by CauchyP P 1/2 1/2 Schwarz: |(x⊗Σ1/2 )(y⊗Σ1/2 )T |2F = na=1 nb=1 x2a yb2 |Σa Σb |2F 6 maxa∈[n] |Σa |2F . Therefore using √  T  T   Lemma 8 on Y we have ∀t > 0 : P |Y AY − E Y AY | > maxa∈[n] |Σa |F t + maxa∈[n] |Σa |op t 6 2e−ct . Hence in conjunction with (C.6) we conclude the proof. 20
10math.ST
Boundary knot method for Laplace and biharmonic problems W. Chen Department of Informatics, University of Oslo, P.O.Box 1080, Blindern, 0316 Oslo, Norway E-mail: [email protected] ABSTRACT Summary The boundary knot method (BKM) [1] is a meshless boundary-type radial basis function (RBF) collocation scheme, where the nonsingular general solution is used instead of fundamental solution to evaluate the homogeneous solution, while the dual reciprocity method (DRM) is employed to approximation of particular solution. Despite the fact that there are not nonsingular RBF general solutions available for Laplace and biharmonic problems, this study shows that the method can be successfully applied to these problems. The high-order general and fundamental solutions of Burger and Winkler equations are also first presented here. Introduction: As a boundary-type RBF scheme, the method of fundamental solution (MFS), also known as regular boundary elements, attains refresh attentions in recent years [2]. Because of the use of singular fundamental solution, the MFS requires a controversial fictitious boundary outside physical domain, which effectively blocks its practical use for complex geometry problems. Chen and Tanaka [1] recently developed a boundary knot method (BKM), where the perplexing artificial boundary is eliminated via the nonsingular general solution. Just like the MFS and dual reciprocity BEM (DR-BEM) [3], the BKM also applies the DRM to approximate the particular solution. The method is symmetric, spectral convergence, integration-free, meshfree and easy to learn and implement, and successfully applied to Helmholtz, convectiondiffusion, and Winkler plate problems. Unfortunately, the nonsingular RBF general solutions of Laplace and biharmonic operators are a constant rather than the RBF. Based on some physical investigations, this paper presented a few simple strategies to apply the BKM to these problems without losing its merits. BKM for Laplacian: For a complete description of the BKM see ref. 2. Here we begin with a Laplace problem ∇ 2 u = f (x ) , x∈Ω , (1) ∂u ( x ) u (x ) = R ( x ) , x ⊂ Su , = N (x ) , x ⊂ S T , (2a,b) ∂n where x means multi-dimensional independent variable, and n is the unit outward normal. The governing equation (1) can be restated as or (3a,b) ∇ 2 u + δ 2 u = f ( x ) + δu ∇ 2 u − δ 2 u = f ( x ) − δu , where δ is an artificial parameter. Eqs. (3a,b) are respectively Helmholtz and diffusion-reaction equations. Their zero and high order general solutions [3] are − n 2 +1+ m − n 2 +1+ m um# (r ) = Qm (γr ) J n 2 −1+ m (γr ) , and u m# (r ) = Q m (τr ) I n 2 −1+ m (τr ) , n≥2, (4) where n is the dimension of the problem; Qm=Qm-1/(2*m*γ2), Q0=1; m denotes the order of general solution; J and I represent the Bessel and modified Bessel function of the first kind. The solution of the problem can be split as the homogeneous and particular solutions u = uh + u p , (5) The latter satisfies the governing equation but not boundary conditions. To evaluate the particular solution, the inhomogeneous term is approximated by f (x ) ≅ N +L ÿ β ϕ (r ), j j =1 j (6) where β j are the unknown coefficients. N and L are respectively the numbers of knots on the domain and boundary. The use of interior points is usually necessary to guarantee the accuracy and convergence of the BKM solution. r j = x − x j represents the Euclidean distance norm, and ϕ is the radial basis function. By forcing approximation representation (5) to exactly satisfy governing equations at all nodes, we can uniquely determine β = Aϕ−1 { f (x i )} , (7) where Aϕ is nonsingular RBF interpolation matrix. Then we have up = ÿ β φ( x − x ), N +L j (8) j j =1 where the RBF φ is related to the RBF ϕ through governing equations. In this study, we chose the first and second order general solutions as the RBFs φ and ϕ. On the other hand, the homogeneous solution uh has to satisfy both governing equation and boundary conditions. By means of nonsingular general solution, the unsymmetric and symmetric BKM expressions are given respectively by L u h (x ) = ÿ α k u 0# (rk ) , uh ( x ) = k =1 Ld + L N Ld ÿ a u (r ) − ÿ # s 0 s s =1 s = Ld +1 as ∂u0# (rs ) , ∂n (9a,b) where k is the index of source points on boundary, αk are the desired coefficients; n is the unit outward normal as in boundary condition (2b), and Ld and LN are respectively the numbers of knots on the Dirichlet and Neumann boundary surfaces. The minus sign associated with the second term is due to the fact that the Neumann condition of the first order derivative is not selfadjoint. Hereafter we only consider the symmetric BKM for the brevity. In terms of representation (9b), the collocation analogue equations (3a) (or (3b)) and (2a,b) are written as Ls + L N Ld ÿ a u (r ) − ÿ a ∂u (r ) ÿ a ∂n − ÿ # s 0 is s s =1 s = Ld +1 Ld + L N # 0 Ld ∂u0# (ris ) = R(xi ) − u p (xi ) , ∂n js as s s =1 Ld ÿ s = Ld +1 asu0# (rls ) − s =1 Ld + L N ÿ as s = Ld +1 (10) ( ) = N (x ) − ∂u (x ) , ∂ 2u0# rjs p ∂n 2 j j ∂n ∂u0# (rls ) = ul − u p (xl ) . ∂n (11) (12) Note that i, s and j are reciprocal indices of Dirichlet ( Su ) and Neumann boundary ( SΓ ) nodes. l indicates response knots inside domain Ω. Then we can employ the obtained expansion coefficients α and inner knot solutions ul to calculate the BKM solution at any other knots. If the inhomogeneous solution up is simply ignored (i.e., let u=uh) when δ is reasonably small, the above procedure for particular solution is omitted. We only need to solve analog equations ∂u (r ) ÿ a u (r ) − ÿ a ∂n = R(x ) , ∂u (r ) ∂ u (r ) ÿ a ∂n − ÿ a ∂n = N (x ) , Ls + LN Ld s # 0 is # 0 s =1 i (13) s = Ld +1 # 0 Ld Ld + L N 2 # 0 js s s =1 is s s s = Ld +1 js 2 j (14) This strategy is called simplified BKM hereafter which can be understood that the use of nonsingular general solutions of Helmholtz-like operators with small characteristic parameter approximates the constant general solution of the Laplace and harmonic operators. I found that the simplified BKM is not stable for irregular geometry since the poor accuracy appears at very few nodes. However, it is noted that the strategy can produce very accurate solutions for regular geometry. For instance, the L2 relative error norm at 495 nodes of an ellipse for the following 2D Laplace problem (15) by the simplified BKM using 9 nodes is 5.3e-3. Numerical results and discussions: Figs. 1 and 2 show the tested 2D and 3D irregular geometries, where the 3D ellipsoid cavity locates at the center of the cube with the characteristic lengths 3/8, 1/8 and 1/8. Except Neumann boundary conditions on x=0 surface of 3D case, the otherwise boundary are all Dirichlet type. The tested 2D and 3D examples have accurate solutions u = x 3 y − xy 3 + 10 x + 10 , u = x 3 yz − 2 xy 3 z + xyz 3 + 10 x + 10 . (15a,b) The BKM L2 norms of relative errors are displayed in Table 1. Note that the BKM only uses 9 boundary knots (δ=0.1) for 2D case and 66 ones (δ=0.2) for 3D case. The corresponding L2 norms of relative errors are calculated at 492 sample nodes for 2D and 1000 sample nodes for 3D. The absolute error is taken as the relative error if the absolute value of the solution is less than 0.001. One can find that the present BKM methodology is very simple, accurate and efficient compared with other methods, especially for complicated geometry domain. Although we do not use inner knots in the present test, a few inner nodes are usually necessary in practical use to significantly improve the solution accuracy and stability (i.e., insensitive to artificial parameter δ). Fig. 1. A 2D irregular geometry Fig. 2. A cube with an ellipsoid cavity Table 1. L2 norm of relative errors for 2D and 3D Laplace problems with the general solution of Helmholtz (H) and modified Helmholtz (MH) operators. BKM (H) BKM (MH) BKM (H) BKM (MH) 1.1e-3 (2D) 1.5e-3 (2D) 5.2e-3 (3D) 1.3e-3 (3D) Biharmonic problems and high order general solutions of Berger and Winkler equations: We can use the general solutions of vibration plate, Winkler plate and Burger equation of finite deflection of plate to approximate the constant general solution of the biharmonic operator. We list these general solutions in Table 2, where ber and bei respectively represent the Kelvin and modified Kelvin functions of the first kind. Among them, it is believed that those of Winkler plate and Burger plate are first presented here. Table 2. M-order general solutions of vibration plate, Winkler equation and Burger equation, where n=2,3 denotes dimensionality. Operators General solutions (m=0,1,2…) − n 2 +1+ m 4 2 Vibration plate # L{u =}∇ u − λ u um (r ) = r λ Am J n 2 −1+ m λ r + Bm I n 2 −1+ m λ r − n 2 +1+ m Winkler plate L{u} = ∇ 4 u + κ 2 u u # (r ) = r κ C ber (r κ ) + D bei (r κ ) , ( ) ( ) m ( ) um# (r) = r κ Burger plate L{u} = ∇ u − µ ∇ u 4 2 2 −n 2+1+m u (r ) = E m r # m ( ( ( ) m n 2 (C ber m 2m −2 n 2−1 m n2 ( )) ) m odd ) (r κ ) + Dmbein 2−1 (r κ ) , + Fm (µr ) − n 2 +1+ m I n 2 −1+ m (µr ) m even Am to Fm are constant coefficients which will analyzed in a subsequent paper. It is worth pointing out that the formulas given in Table 2 for the zero order general solution of Winkler operator is effective for up to five dimensions. The same relations hold with ber, bei replaced by the Kelvin functions of the second kind ker, kei, respectively, for fundamental solutions. The higher order fundamental solution of Burger equation is alternations of the first and second terms of corresponding general solution by the higher order fundamental solutions of Laplace and Helmholtz operators. The fundamental solutions of Winkler plate and Burger plate are given respectively by [5,6]. For vibration plate, the small vibration frequency means the approximation to linear steady deflection described by a biharmonic equation. For a Winkler plate on an elastic foundation, the small elastic foundation coefficient indicates that the general solution is close to that of a plate no resting on an elastic foundation. Ref. 5 has actually applied a BEM strategy based on the fundamental solution of the Winkler plate to analyze the biharmonic system equation, where the inhomogeneous (particular) solution is simply omitted, similar to idea in the aforementioned simplified BKM. The solution accuracy is quite high for a regular rectangular plate. The Burger plate equation is a simplified model of von Karman equations for nonlinear deflection of plate under large loading, which assumes the plate has not in-plane movement at the boundary. By taking small Burger parameter, the nonsingular general solution of Burger plate approaches that of the biharmonic equation for the linear thin plate. Now it is obvious that the present approximate strategy is explicitly grounded on the physical connections between different partial differential equations. The numerical validations of the biharmonic equations will be presented in a subsequent paper. Remarks: It should be pointed out that we could greatly simplify the above-given standard form of general solutions involving some special functions. Thus, the computing effort for them is trivial. For Helmholtz-like problems, the BKM outperforms the DR-BEM and MFS significantly in terms of accuracy, symmetricity, efficiency, stability, and mathematical simplicity. The present study shows that the method is also very efficient for Laplace and biharmonic problems by a fairly good approximation via general solutions of Helmholtz-like operators with small system parameter to that of the corresponding non-Helmholtz-like operators. A mathematical analysis of this scheme will be given later. The major drawbacks of the BKM are severe ill-condition and costly full matrix for large system problems, which is a subject presently under investigation. REFERENCES 1. W. Chen and M. Tanaka, New Insights into Boundary-only and Domain-type RBF Methods. Int. J. Nonlinear Sci. & Numer. Simulation, 1(3), 145-151, (2000). 2. M.A Golberg and C.S. Chen, The method of fundamental solutions for potential, Helmholtz and diffusion problems. In Boundary Integral Methods - Numerical and Mathematical Aspects, (Ed. by M.A. Golberg), pp. 103-176, Comput. Mech. Publ., 1998. 3. P.W. Partridge, C.A. Brebbia and L.W. Wrobel, The Dual Reciprocity Boundary Element Method, Comput. Mech. Publ., 1992. 4. M. Itagaki, Higher order three-dimensional fundamental solutions to the Helmholtz and the modified Helmholtz equations, Engineering Analysis with Boundary elements, 15, 289-293, (1995). 5. J.T. Katsikadelis and A.E. Armenakas, Plates on elastic foundation by BIE method, J. Engng. Mech., 110(7), 1086-1105, 1984. 6. J. Sladek and V. Sladek, The BIE analysis of the Berger equation, Ingenieur-Archiv, 53, 385-397, 1983.
5cs.CE
On Collaborative Compressive Sensing Systems: The Framework, Design and Algorithm Zhihui Zhu, Gang Li, Jiajun Ding, Qiuwei Li, and Xiongxiong He ∗ arXiv:1709.06616v1 [cs.IT] 19 Sep 2017 September 21, 2017 Abstract We propose a collaborative compressive sensing (CCS) framework consisting of a bank of K compressive sensing (CS) systems that share the same sensing matrix but have different sparsifying dictionaries. This CCS system is guaranteed to yield better performance than each individual CS system in a statistical sense, while with the parallel computing strategy, it requires the same time as that needed for each individual CS system to conduct compression and signal recovery. We then provide an approach to designing optimal CCS systems by utilizing a measure that involves both the sensing matrix and dictionaries and hence allows us to simultaneously optimize the sensing matrix and all the K dictionaries under the same scheme. An alternating minimization-based algorithm is derived for solving the corresponding optimal design problem. We provide a rigorous convergence analysis to show that the proposed algorithm is convergent. Experiments with real images are carried out and show that the proposed CCS system significantly improves on existing CS systems in terms of the signal recovery accuracy. 1 Introduction Compressive (or compressed) sensing (CS), aiming to sample signals beyond Shannon-Nyquist limit [13, 14,16,19], is a mathematical framework that efficiently compresses a signal vector x ∈ <N by a measurement vector y ∈ <M of the form y = Φx (1) where Φ ∈ <M ×N (M  N ) is a carefully chosen sensing matrix capturing the information contained in the signal vector x. As M  N , we have to exploit additional constraints or structures on the signal vector x in order to recover it from the measurement y and sparsity is such a structure. In CS, it assumed that the original signal x can be expressed as a linear combination of few elements/atoms from a l2 -normalized set {ψ` }, i.e., ||ψ` ||2 = 1, ∀ `: x= L X ψ` s` = Ψs (2) `=1   where Ψ := ψ1 ψ2 · · · ψL ∈ <N ×L is called the dictionary and the entries of s ∈ <L are referred to as coefficients. x is said to be κ-sparse in Ψ if ksk0 = κ, where ksk0 is the number of non-zero elements of vector s. Under the framework of compressed sensing, the original signal x can be recovered from x = Ψb s with sb the solution of the following problem when the sparsity level κ is small: y = As s.t. ksk0 ≤ κ (3) ∗ This work was supported by the Grants of NSFCs 61273195, 61304124, & 61473262. Zhihui Zhu and Qiuwe Li (e-mail: {zzhu,qiuli}@mines.edu) are with the Department of Electrical Engineering at the Colorado School of Mines, 1500 Illinois St., Golden, CO 80401,USA. Gang Li (e-mail: [email protected]) is with the College of Automation & Electrical Engineering, Zhejiang University of Science & Technology, Hangzhou, 310023, Zhejiang, P.R. China. Jiajun Ding and Xiongxiong He are with the College of Information Engineering, Zhejiang University of Technology, Hangzhou, 310014, Zhejiang, P.R. China. 1 A := ΦΨ is called equivalent dictionary. A CS system is referred to equations (1) and (2) plus an algorithm used to solve (3) and its ultimate goal is to reconstruct the original signal x from the lowdimensional measurement y. The latter depends strongly on the properties of Ψ and Φ. In general, the choice of dictionary Ψ depends on the signal model. Based on whether the dictionary is given in a closed form or learned from data, the previous works on designing dictionary can be roughly classified into two categories. In the first one, one attempts to concisely capture the structure contained in the signals of interest by a well-designed dictionary, like the wavelet dictionary [30] for piecewise regular signals, the Fourier matrix for frequency-sparse signals, and a multiband modulated Discrete Prolate Spheroidal Sequences (DPSS’s) dictionary for sampled multiband signals [42]. The second category is to learn the dictionary in an adaptive way to sparsely represent a set of representative signals (called training data). Typical algorithms for solving this sparsifying dictionary learning problem include the method of optimal directions (MOD) [24], K-singular value decompostion (K-SVD) [3] based algorithms, and the method for designing incoherent sparsifying dictionary [28]. Learning a sparsifying dictionary has proved to be extremely useful and has achieved state-of-the-art performance in many signal and image processing applications, like image denoising, impainting, deblurring and compression [2, 23]. To recover the signal x from its low dimensional measurement y, another important factor in a CS system is to select an appropriate sensing matrix Φ that preserves the useful information contained in x. It has been shown that a sparse signal x can be exactly reconstructed from its measurement y with greedy algorithms such as those orthogonal matching pursuit (OMP)-based ones [11, 31, 32, 34, 37] or methods based on convex optimization [13, 17, 20], if the equivalent dictionary A = ΦΨ satisfies the restricted isometry property (RIP) [9, 13, 14], or the sensing matrix Φ satisfies the so-called Ψ-RIP [15]. However, despite the fact that a random matrix A (or Φ) with a specific distribution satisfies the RIP (or Ψ-RIP) with high probability [9], it is hard to certify the RIP (or Ψ-RIP) for a given sensing matrix that is utilized in practical applications [7]. Thus, Elad [22] proposed to design a sensing matrix via minimizing the mutual coherence, another property of the equivalent dictionary that is more tractable and much easier to verify. Since then, it has led to a class of approaches for designing CS systems [1, 6, 21, 25, 29, 39, 40]. When the signal is not exactly sparse, which is true for most natural signals such as image signals even with a learned dictionary, it is observed that the sensing matrix obtained via only minimizing the mutual coherence yields poor performance. Recently, a modified approach considering the sparse representation error was proposed in [27] where the designed sensing matrix is robust against the sparse representation error and achieves state-of-the-art performance for image compression. The ultimate objective of dictionary learning is to determine a Ψ ∈ <N ×L such that the signals of interest (like image patches extracted from natural images) can be well represented with a sparsity level κ given. To that end, a large L is preferred as increasing L can enrich the components/atoms that are used for sparse representation. One notes, however, that mutual coherence of Ψ, formally defined as µ(Ψ) = max i6=j |ψiT ψj | kψi k2 kψj k2 satisfies [38] s L−N ≤ µ(Ψ) ≤ 1 N (L − 1) (4) which implies that when L is very large, the dictionary Ψ will have large mutual coherence. Since the equivalent dictionary A = ΦΨ, where Φ is of dimension M × N with M << N , µ(A) gets in general larger than µ(Ψ). So, increasing L may affect sparse signal recovery dramatically. Besides, a large scale training data set is required in order to learn richer atoms (or features) and thus it needs a long time for the existing algorithms to learn a dictionary, though it is not a big issue for off-line design. These motivate us to develop an alternative CS framework that yields a high performance in terms of reconstruction accuracy as if a high dimensional dictionary were used in the traditional CS framework (see Fig. 1(a)), but gets rid of the drawbacks of a high dimensional dictionary as mentioned above. In particular, our main argument is that given different training data, we can learn different dictionaries containing different atoms or features for the signals of interest. The main contributions of this paper are stated as follows: • The first contribution is to propose a new framework named collaborative CS (CCS) system based on the maximum likelihood estimation (MLE) principle. Such a framework is actually a bank of K traditional CS systems that have an identical sensing matrix but different dictionaries of dimension 2 N × L0 . As shown in Fig. 1(b), the estimate of the original signal provided by the proposed collaborative CS system is to fuse those obtained by all the individual CS systems and can be interpreted as a linear κK-sparse representation in a huge dictionary of dimension N × (L0 K); • The second contribution is to provide an approach to simultaneously designing the sensing matrix and sparsifying dictionaries for the proposed CCS system. Unlike [6, 21], where the sensing matrix and dictionary are designed independently (though the sensing matrix is involved when the dictionary is updated), we use a measure that is a function of sensing matrix, dictionaries and sparse coefficients and hence allows us to consider both of the sensing matrix and dictionaries under the one and the same framework. By doing so, it is possible to enhance the system performance and to come up with an algorithm with guaranteed convergence for the optimal CCS design; • The third contribution is to provide an alternating minimization-based algorithm for optimal design of the proposed CCS system. An algorithm is proposed for updating the dictionaries column by column. Despite the sparse coding stage, the problems involving sensing matrix updating and dictionary updating are solved in such a way that ensures that the cost function decreases at each iteration. It should be pointed out that the alternating minimization-based approach has been popularly used in designing sensing matrix and sparsifying dictionary [3, 21, 22, 27, 29], in which the convergence of the algorithms is usually neither ensured nor seriously considered. As one of the important results in this paper, a rigorous convergence analysis is provided and hence the proposed algorithm is ensured to be convergent. Notations: Throughout this paper, finite-dimensional vectors and matrices are indicated by bold characters. The symbols I and 0 respectively represent the identity  and zero matrices with appropriate sizes. In particular, IN denotes the N × N identity matrix. UN := h ∈ <N : khk2 = 1 is the unit sphere. Also, OM,N := {R ∈ <M ×N : RRT = IM } with M ≤ N and when M = N , ON,N is simply denoted as ON . For any natural number N , we let [N ] denote the set {1, 2, ..., N }. We adopt MATLAB notations for matrix indexing; that is, for a matrix Q, its (i, j)-th element is denoted by Q(i, j), its i-th row (or column) is denoted by Q(i, :) (or Q(:, i)). When it is clear from the context, we also use qi , qi,j to denote the i-th column and (i, j)-th element of Q. Similarity, we use qi or q(i) to denote the i-th element of the vector q ∈ <N . The outline of this paper is given as follows. In Section 2, based on the MLE principle it is shown that a sensing matrix Φ ∈ OM,N is preferred, when dealing with sparse representation errors, and a collaborative estimator is derived, which leads to the CCS scheme. A framework is proposed for designing an optimal CCS system and an algorithm is derived for finding it in Section 3. Section 4 is devoted to convergence analysis for the proposed algorithm. To demonstrate the performance of the proposed CCS systems, experiments are carried out in Section 5. The paper is concluded in Section 6. 2 A collaborative compressive sensing scheme Consider the following more general signal model than (2): x = Ψs + e (5) where e is the sparse representation noise (a.k.a signal noise). The measurement y = Φx is then of form y = As + v where v := y − As = Φe and A = ΦΨ, as defined before, is the equivalent dictionary of the CS system. Suppose e is of normal distribution with a zero-mean and E[eeT ] = σe2 IN , where E[·] denotes the statistical averaging operator. Then, v has the multivariate normal distribution with N (0, σe2 ΦΦT ); that is its probability density function (PDF) is given by 1 fv (ξ) = T −1 e (− 2 ξ Σ v ξ ) p 2π|Σv | 3 (6) where | · | represents the determinant of a matrix and Σv := σe2 ΦΦT , where the sensing matrix Φ is assumed of full row rank. According to the MLE principle [26] along with the sparsity assumption on s, the best estimate sb of the sparse coefficient vector s using the measurement y is the one that maximizes the likelihood function in s; that is fv (ξ) with ξ = y − As. This leads to 4 sb = arg min k(ΦΦT )−1/2 (y − As)k22 s (7) s.t. ksk0 ≤ κ which is different from (3), where the signal noise e is assumed nil. 2.1 Structure of sensing matrices Note that the objective function in (7) can be rewritten as k(ΦΦT )−1/2 (y − As)k22 = ky − ΦΨsk22 (8) where y := (ΦΦT )−1/2 y and Φ := (ΦΦT )−1/2 Φ. This implies that the MLE estimator (7) is equivalent to solving the classical sparse recovery problem if we fold both the measurement y and the sensing matrix Φ by (ΦΦT )−1/2 . A matrix Q is said to be RIP of order κ if there exists a constant γ ∈ (0, 1) such that p p kQsk2 1−γ ≤ ≤ 1+γ ksk2 (9) for all ksk0 ≤ κ. It is shown in [18, Lemma 4.1] that the matrix Φ satisfies the RIP if so does the sensing matrix Φ. A generalization of the RIP is Ψ-RIP [15]: a matrix Φ is said to be Ψ-RIP of order κ if there exists a constant δ ∈ (0, 1) such that √ 1−δ ≤ √ kΦΨsk2 ≤ 1+δ kΨsk2 (10) holds for all s with ksk0 ≤ κ. We have the following interesting results. Lemma 1. Let (Φ, Ψ) be a CS system. Suppose that Ψ is RIP of order κ with constant γ ∈ (0, 1) and that Φ ∈ <M ×N satisfies the Ψ-RIP of order κ with constant δ < 1 and x = Φs with ksk ≤ κ. Denote Φ = (ΦΦT )−1/2 Φ, A = ΦΨ and A = ΦΨ. Then, p kAsk2 ≤ (1 + δ)(1 + γ) ksk2 (11) p p (1 − δ)(1 − α) (1 + δ)(1 + α) kAsk2 ≤ ≤ πmax (Φ) ksk2 πmin (Φ) (12) p and (1 − δ)(1 − γ) ≤ where πmax (Φ) and πmin (Φ) denotes the largest and smallest nonzero singular values of Φ respectively. Proof of Lemma 1. Since Ψ is RIP, (9) holds with Q = Ψ, combining which with (10) we have (11) straightly. Let Φ = T −1 Φ for any non-singular matrix T . Then, Φ = T Φ. It follows from matrix analysis that kΦxk2 ≤ kT −1 k2 kΦxk2 kΦxk2 ≤ kT k2 kΦxk2 which implies kT k−1 kΦxk2 ≤ kΦxk2 ≤ kT −1 k2 kΦxk2 With T = (ΦΦT )1/2 and Φ satisfying Ψ-RIP, 2 we have √ √ kΦxk2 1−δ 1+δ ≤ ≤ (13) πmax (Φ) kxk2 πmin (Φ) Thus (12) follows from (13) and (11). This completes the proof. 4 Remark 2.1: • It was shown in [15] that a random matrix Φ with a specific distribution satisfies (10) with high probability. The 2nd part of this lemma implies that the equivalent dictionaries A and A have RIP of order κ if so is the dictionary Ψ; • Both (11) and (12) imply that Φ severs as an isometric operator similar to Φ for all κ-sparse signal, but the constants on the left and right hand sides of them depend on the condition number of Φ. Specifically, for a given Ψ, Φ makes A achieve the tightest RIP constants if Φ is a tight frame;1 • More importantly, (7) and (8) imply that the CS system (Φ, Ψ) (with a sparse recovery procedure (7)) is totally equivalent to the one (Φ, Ψ) in terms of signal reconstruction accuracy. Note that for any full row rank sensing matrix Φ, Φ is a unit tight frame as T ΦΦ = (ΦΦT )−1/2 ΦΦT (ΦΦT )−1/2 = IM Also if the sensing matrix Φ has orthonormal rows (i.e., ΦΦT = IM ), then the folded sensing matrix Φ is equivalent to Φ. Based on the equivalence mentioned in the 2nd point of Remark 2.1, it is assumed in the sequel that the sensing matrix under consideration is constrained with ΦΦT = IM , that is Φ ∈ OM,N 2.2 (14) Collaborative compressed sensing Let us have a set of estimators, all used for estimating the identical signal x ∈ <N ×1 . Assume that the output of the ith estimator is given by xi = x + ei , i = 1, . . . , K (15) b = f (x1 , . . . , xK ) can be obtained where ei is the estimation error of the ith estimator. A better estimate x by choosing an appropriate function f to fuse all the estimates {xi }. In fact, Lemma 2 presented below yields such an estimate of x. Lemma 2. Let {ei } be the set of the estimation errors defined in ei in (15). Under the assumption that all the errors {ei } are statistically independent and that each ei obeys a normal distribution N (0, 2i IN ) b in the MLE sense of x which can be achieved from the observations {xi } is for all i, the best estimate x given by b= x K X ωi xi (16) ωi2 E[kxi − xk2 ] (17) i=1 where ωi := −2 i / PK −2 `=1 ` , ∀ i, and E[kb x − xk2 ] = K X i=1 Proof of Lemma PDF of (e1 , · · · , ei , · · · , eK ) Q 2. Under the assumptions made in the lemma, the joint 2 is given by K f (ξ ), where f (ξ ) is defined in (6) with Σ =  I and ξi = xi − x for all i. e i e i e N i i i i i=1 b of P According to the MLE principle, the best estimate x x from {xi } is the one that maximizes this joint −1 1 T PDF. This can be achieved by setting the derivative of K i=1 2 ξi Σei ξi w.r.t. x to zero, which leads to (16). Note P that all ei = xi − x, ∀ i are statistically independent, (17) follows directly from (16) and the fact K i=1 ωi = 1. 1 We say Φ ∈ <M ×N a frame of <M if there are positive constants c and c such that 0 < c ≤ c < ∞ and for any 1 2 1 2 y ∈ <M , c1 kyk22 ≤ kΦT yk22 ≤ c2 kyk22 . A frame is a ctight frame if c1 = c2 = c, which implies ΦΦT = cIM . A unit tight frame corresponds to c = 1. 5 The estimator given by (16) is called a collaborative estimator for x. Now, suppose E[kei k2 ] = 20 , ∀ i 1 with 20 a constant, independent of i. Then ωi = K , ∀ i and hence (16) becomes b= x K 1 X xi K i=1 (18) It is observed that by Cauchy-Schwartz inequality kb x − xk22 = k K K 1 X 1 X (xi − x)k22 ≤ kxi − xk22 K i=1 K i=1 which implies that the reconstruction error variance of the collaborative estimator is smaller than the averaged variance of the bank of K estimators. Furthermore, with E[kei k2 ] = 20 , ∀ i (17) yields 20 K E[kb x − xk2 ] = This implies that the collaborative estimator yields a better estimate than a single estimator under the assumption that the estimation errors of all the individual estimators are statistically independent with an identical 2nd moment. Now, we specify the K estimators with a bank of K CS systems {(Φ, Ψi )} and the corresponding collaborative estimator is then named collaborative compressive sensing - the CCS. For the same measurement y - the compressed version of x via (1), the ith estimate xi of x is given by the CS system (Φ, Ψi ) with xi = Ψi sbi , ∀ i (19) where Ψi ∈ <N ×L0 , ∀ i all are designed using different training samples and sbi is the solution of (7) with A = ΦΨi . The whole procedure of the proposed CCS system is depicted in Fig. 1(b) for image compression. Remark 2.2: • Combining (18) and (19) yields   b = Ψ1 x ···  sb1 /K 4 ..  = .  Ψc sc sbK /K  ΨK  (20) which can be viewed as a linear sparse approximation of x using a larger dictionary Ψc , having KL0 atoms, with a sparsity level of κK. A signal x can be represented in many different ways. In fact, in the proposed CCS system x is κ-sparsely represented in each of K different dictionaries and the collaborative estimator (18) is equivalent to a representation in a high dimensional dictionary Ψc ∈ <N ×KL0 and a constrained block sparse coefficient vector sc . It is due to this equivalent high dimensional dictionary that enriches the signal representation ability and hence makes the proposed CCS scheme yield an improved performance; • We finally note that the collaborative CS system has an identical compression stage as the classical CS system (as shown in Fig. 1). With respect to the signal recovery stage, in the collaborative CS system the estimators {xi } are independent to each other and can be obtained simultaneously by solving (19) in parallel. 3 Design of An Optimal CCS System In this section, we propose an approach to designing optimal CCS systems by jointly optimizing the sensing matrix Φ and the bank of sparsifying dictionaries {Ψi }. An alternating minimization strategy is then utilized to solve the corresponding problem. 6 (a) (b) Figure 1: Illustration of (a) classical CS system, and (b) collaborative CS system. In this paper, we simply PK 1 utilize f (x1 , . . . , xK ) = K i=1 xi . 3.1 Framework for designing optimal CCS systems Let  X = X1 ··· Xi ··· XK  be the matrix of training samples as defined before. Our objective here is to jointly design the sensing matrix and dictionaries for CCS systems with training samples X. To this end, a proper measure is needed. First of all, it follows from (5) that e iS ei + Ei Xi = Ψ (21) e i is the underlying dictionary and kS ei (:, j)k0 ≤ κ. A widely utilized objective function for where Ψ dictionary learning is 4 %1 (Ψi , Si , Xi ) = kXi − Ψi Si k2F (22) which represents the variance of the sparse representation error Ei and is utilized in state-of-the-art dictionary learning algorithms like MOD and K-SVD. Similarly, denote 4 %2 (Φ, Ψi , Si , Xi ) = kΦ(Xi − Ψi Si )k2F (23) as the variance of the projected signal noise ΦEi . e iS ei + ΦEi . Thus besides It follows from (21) that the measurements are of the form Yi = ΦXi = ΦΨ reducing the projected signal noise variance %2 , the sensing matrix Φ is expected to sense most of the key e iS ei . This can be done by choosing the sensing matrix Φ such that kΦΨ e iS ei k2F is maximized. ingredients Ψ T 2 As ΦΦ = IM is assumed (see (14)), maximizing kΦΨi Si kF in terms of Φ is equivalent to minimizing 4 %3 (Φ, Ψi , Si ) = k(I − ΦT Φ)Ψi Si k2F 7 (24) Therefore, the following measure is proposed for designing optimal CCS systems: %(Φ, Ψi , Si , Xi ) = %1 (Ψ, Si , Xi ) + α%2 (Φ, Ψi , Si , Xi ) +β%3 (Φ, Ψi , Si ) (25) where %1 (.), %2 (.) and %3 (.) are the measures defined in (22) - (24), respectively, and α and β are weighting factors to balance the importance of the three terms. The problem of designing optimal CCS systems is then formulated as e {Ψ e i, S ei }) (Φ, 4 = arg min Φ,{Ψi ,Si } K X %(Φ, Ψi , Si , Xi ) i=1 Φ ∈ OM,N ; kSi (:, j)k0 ≤ κ, ∀ j s.t. Ψi (:, l) ∈ UN , ∀ l (26) in which both the sensing matrix Φ and the bank of dictionaries {Ψi } are jointly optimized using the identical measure. 3.2 Algorithms for designing optimal CCS systems We now propose an algorithm based on alternating minimization for solving (26). The basic idea is to P construct a sequence {Φk , {Ψi,k }, {Si,k }} such that { K i=1 %(Φk , Ψi,k , Si,k , Xi )} is a descent sequence. First of all, note that %(Φ, Ψi , Si , Xi ) can be rewritten as %(Φ, Ψi , Si , Xi ) = kC(Φ, Xi ) − B(Φ)Ψi Si k2F where (27)     I X √N √ i 4  αΦ C(Φ, Xi ) =  αΦXi  , B(Φ) =  √ 0 β(IN − ΦT Φ) 4 (28) The proposed algorithm is then outlined as below: Algorithm 1 - To design an optimal CCS system Input: the training data {Xi }, the dimension of the projection space M , the number of atoms L0 , and the number of iterations Nite . Initialization: set initial dictionaries2 {Ψi,0 } and an initial sensing matrix3 Φ0 . Begin k = 1, 2, · · · , Nite • Update Si with Φ = Φk−1 , Ψi = Ψi,k−1 , ∀i: Note that (26) becomes Si,k = argmin kC(Φ, Xi ) − B(Φ)Ψi Sk2F S (29) s.t. ||S(:, j)||0 ≤ κ, ∀ j which can be addressed using an OMP-based algorithm. • Update Ψi with Φ = Φk−1 , Si = Si,k , ∀ i: (26) leads to Ψi,k = argmin kC(Φ, Xi ) − B(Φ)ΨSi k2F ψl ∈UN ,∀l i = 1, 2, · · · , K An algorithm will be given later for solving such a problem. 2 Each 3 It dictionary can be chosen as a DCT matrix or randomly selected from the data. can be chosen a random one. 8 (30) • Update Φ with Ψi = Ψi,k , Si = Si,k , ∀ i: The design problem (26) turns to 4 Φk = argmin Φ∈OM,N K X %(Φ, Ψi , Si ) (31) i=1 As to be seen later, this problem can be solved analytically. End e i = Ψi,N }. e = ΦN and {Ψ Output: Φ ite ite As seen from the outline of the algorithm proposed above, all the dictionaries {Ψi } (and the coefficients {Si }) can be updated concurrently. Thus, utilizing parallel computing strategy, it takes the same time to design a CCS system as that to design a traditional CS system. The proposed Algorithm 1 consists of three minimization problems, specified by (29), (30) and (31), respectively. The first one can be addressed using an OMP-based algorithm and an iterative algorithm, denoted as AlgΨ , for (30) is postponed to Section 3.4, while the solution to (31) is given by the following lemma: 4 PK e= G(Ψi , Si ), where Lemma 3. Define G i=1 G(Ψi , Si ) 4 = βΨi Si (ΨSi )T −α(Xi − Ψi Si )(Xi − Ψi Si )T (32) e = V ΠV T be an eigen-decomposition (ED) of N × N symmetric G, e where Π is diagonal and its Let G G̃ G̃ diagonal elements {πn } are assumed to satisfy π1 ≥ π2 ≥ · · · ≥ πN . Then the solution to (31) is given by4   (33) Φk = U IM 0 VG̃T with U ∈ ON arbitrary. The proof is given in Appendix A. 3.3 Quadratic programming on the unit sphere As to be seen in Section 3.4, the iterative algorithm AlgΨ for (30) requires to solve a set of constrained quadratic programmings of form 4 hopt = min {ξ(h) := hT Dh − 2dT h} h∈UN (34) where D ∈ <N ×N is a positive semi-definite (PSD) matrix and d ∈ <N , both are independent of h. Let D = U ΣU T be an ED of D where Σ is an N × N diagonal matrix with diagonals ordered as σ1 ≥ · · · σN ≥ 0, and U ∈ ON . Note that when d = 0, (34) is equivalent to finding the smallest eigenvector of D and hence the solution to (34) is h = U (:, N ). Thus d 6= 0 is assumed in the sequel. Unlike the unconstrained one, due to the unit-norm constraint, in general there is no closed-form solution to (34). Denote the Lagrange function L(h, λ) of problem (34) as L(h, λ) = ξ(h) − λ(hT h − 1) Then, it follows from the Karush-Kuhn-Tucker (KKT) conditions that any solution to (34) should satisfy ∇h L(h, λ) = 2((D − λIN )h − d) = 0 hT h − 1 = 0 (35) Note that the KKT condition in (35) is equivalent to (Σ − λIN )h = d T h h−1=0 4 Note that to simplify the notations, we omit the subscript k in Ψi,k and Si,k . 9 (36) where h = U h and d = U d. With some manipulations, one can show that for any solution (h, λ) to (36), the objective function of (34) is given by 2 N X dn 4 ˜ ξ(h) = + λ = ξ(λ) (37) λ − σ n n=1 for λ ∈ Sλ , where Sλ is the solution set of 4 g(λ) = khk22 = N X n=1 2 dn =1 (σn − λ)2 (38) Therefore, the optimal λ that corresponds to the solution of (34) is given by 4 ˜ λopt = argmin ξ(λ) (39) λ∈Sλ with which the solution of (34) can then be obtained from (D − λopt IN )hopt = d Some properties of the set Sλ are summarized in the following theorem, which are given in [41]. Theorem 1. Let g(λ) be defined in (38) for all λ ∈ < such that λ 6= σ` , ∀ ` unless d` = 0. Then • g(λ) is convex on each of the interval (−∞, σN ), (σN , σN −1 ), . . ., (σ2 , σ1 ), and (σ1 , ∞). • there exist N solutions {λn } for g(λ) = 1 with 2 ≤ N ≤ 2N . Suppose λ1 > λ2 > · · · > λN . Then v uN uX 2  4 4 d` λ1 = max σ` ± d` ≤ λ1 ≤ λ1 = σN + t ` `=1 and g(λ) is monotonically increasing within [λ1 , λ1 ]. ˜ • ξ(λ) (defined in (37)) is increasing on λn : ˜ 1 ) ≤ ξ(λ ˜ 2 ) ≤ · · · ≤ ξ(λ ˜ N) ξ(λ (40) which implies λopt = λ1 . As guaranteed by (40), λopt = λ1 . As g(λ) is monotonically increasing within [λ1 , λ1 ], we can find λ1 easily via a standard algorithm, say a bi-section-based algorithm. For convenience, the whole procedure for solving the unit-norm constrained quadratic programming (43) is denoted as AlgCQP . 3.4 An iterative algorithm for (30) With AlgCQP for solving the quadratic programming with unit-norm constraint (34), we now provide an iterative algorithm for (30). Note that (30) consists of a set of constrained minimizations of form e = argmin {f (Ψ) := kC − BΨSk2F } Ψ (41) ψl ∈UN ,∀ l where C, B and S are independent of Ψ. The idea behind the algorithm can be explained as follows. Assume that the first l − 1 columns of Ψ have been updated. Rewrite the objective function as X f (Ψ) = kC − B (ψj sTj ) − Bψl sTl k2F (42) j6=l Let El := C − B T j6=l (ψj sj P ). Then minimizing f in terms of ψl is equivalent to solving el = arg min kEl − BψsTl k2F ψ ψ∈UN 10 (43) With some manipulations, it can be shown that kEl − BψsTl k2F =ψ T sTl sl B T Bψ − 2sTl ElT Bψ + kEl k2F which implies (43) is equivalent to el = argmin{ψ T Dl ψ − 2dTl ψ} ψ (44) ψ∈UN where Dl = ksl k22 B T B is a PSD matrix and dl = B T El sl . Obviously, the above is exactly of the same form as (34). Based on the developments given above, the following iterative algorithm for addressing (30) is proposed: AlgΨ - To update dictionary Ψi via solving (30) Initialization: set C = C(Φk−1 , Xi ), B = B(Φk−1 ), S = Si,k , and Ψ = Ψi,k−1 . Begin l = 1, 2, · · · , L0 , update the l-th column of Ψ by • Compute the overall representation error by El = C − B X ψj sTj j6=l and Dl and dl as Dl = ksl k22 B T B, dl = B T El sl • Update the l-th column by solving (44) with AlgCQP illustrated in Section 3.3 and setting Ψ(: el . , l) = ψ End Output: Ψi,k = Ψ. Remark 3.1: Our proposed Algorithm 1 is based on the basic idea of alternating minimization that has led to a class of iterative algorithms for designing sensing matrices and dictionaries. The key difference that makes one algorithm different from another lies in the ways how the iterates are updated. It should be pointed out that though the alternating minimization-based algorithms practically work well for nonconvex problems, there is still lack of rigorous analysis for algorithm properties such as convergence. To the best of our knowledge, a few of results on this issue have been reported [35]. 4 Convergence Analysis In this section, we provide a rigorous convergence analysis for Algorithm 1. In particular, we show that the objective function monotonically decreases and more importantly, any accumulation point of the sequence (or iterates) is a stationary point of (26). Let Sκ denote the set of κ-sparse signals: n o Sκ = s ∈ <L0 : ksk0 ≤ κ . and Ψ = {Ψ1 , . . . , ΨK } and S = {S1 , . . . , SK }. We also replace %(Φ, Ψi , Si , Xi ) in (26) by %(Φ, Ψi , Si ) 4 since PK Xi is fixed during the learning process of the CCS system. With these notations, define %c (Φ, Ψ, S) = i=1 %(Φ, Ψi , Si ). Furthermore, let ψi,l be the l-th column of Ψi and Ψ \ ψi,l /ψ (or Ψi \ ψi,l /ψ) be the matrix whose columns equal to those of Ψ (or Ψi ) except the ψi,l that is replaced with ψ. Let {(Φk , Ψk , S k )} be the sequence generated by our proposed Algorithm 1. Roughly speaking, convergence analysis of Algorithm 1 is to study the behaviors of the sequence {(Φk , Ψk , S k )}. One notes that the cost function %c (Φ, Ψ, S) is nonnegative and both the dictionary update and the sensing matrix update can ensure the cost function decrease. Therefore, the proposed algorithm is 11 convergent in terms of cost function as limk→∞ %c (Φk , Ψk , S k ) exists as long as the sparse coding stage (see (29)) can be performed perfectly. The latter is not true in general if the sparse coding is carried out with the formulation (29) that is usually addressed using an OMP-based algorithm. One can get rid of this requirement if the k · k0 -based sparsity measure is replaced with `1 -norm-based one since the sparse coding stage then is convex and can be solved exactly. The OMP-based algorithms are widely utilized in spare coding problem due to its excellent computational efficiency. Simulations showed that this type of algorithms can provide solutions with a satisfying accuracy, especially when signals are very sparse [3, 21, 27]. In the sequel, it is assumed that the sparse coding stage can be performed perfectly. Theorem 2 yields more results on the convergence behaviors of Algorithm 1. Theorem 2. (Convergence of Algorithm 1) Suppose that the sparse coding stage can be performed perfectly such that the best κ-sparse approximations to the signals C(Φk−1 , Xi ) represented in the dictionary B(Φk−1 )Ψi,k−1 can be obtained. Let {(Φk , Ψk , S k )} be the sequence generated by Algorithm 1. 1. The sequence {(Φk , Ψk , S k )} is bounded, implying it has at least one accumulation point. L0 K 2. Every accumulation point lies in OM,N × UN × SκJ0 K . 3. Every accumulation point (Φ? , Ψ? , S ? ) satisfies %c (Φ? , Ψ? , S ? ) = lim %c (Φk , Ψk , S k ) k→∞ ? ? ? 4. Every accumulation point (Φ , Ψ , S ) satisfies %c (Φ? , Ψ? , S ? ) = = min Φ∈OM,N %c (Φ, Ψ? , S ? ) min %c (Φ? , Ψ? , S) J K S∈Sκ0 ? /ψ, S ? ) = min %c (Φ? , Ψ? \ ψi,l ψ∈UN for all l ∈ [L0 ] and i ∈ [K]. 5. Any accumulation point of {(Φk , Ψk , S k )} is a stationary point of %c (Φ, Ψ, S). Remark 4.1: • We note that Theorem 2 implies the sequence generated by Algorithm 1 has at lease one accumulation point and each accumulation point is a stationary point of (26). However, there is nothing to guarantee that the sequence itself is convergent. Recently, the convergence analysis of proximal methods for solving a class of non-smooth and non-convex problems are presented in [4, 5, 12]. In particular, by adding proximal terms, one can show that the sequence is a Cauchy sequence and converges to a stationary point. This technique has been utilized in [8] for analyzing the convergence of a particular algorithm for learning tight frame with orthogonality constraint. We defer this direction to future research; • Though the proposed Algorithm 1 is not guaranteed to make the sequence {(Φk , Ψk , S k )} convergent, the 3rd and 5th points in Theorem 2 imply that (Φk̃ , Ψk̃ , S k̃ ) with k̃ very big can yield the same performance as that by a stationary point of %c (Φ, Ψ, S) corresponding to the point (Φ? , Ψ? , S ? ). Also the 4th point in Theorem 2 ensures that every accumulation point is the minimum of %c with respect to one variable (like in terms of Φ when the dictionary Ψ? and sparse coefficients S ? are fixed). From a practical point of view, such {(Φk̃ , Ψk̃ , S k̃ )} is as good as (Φ? , Ψ? , S ? ) as the CCS system (Φk̃ , Ψk̃ ) yields the same performance as the CCS system (Φ? , Ψ? ) does according to the design criterion. It should be pointed out that our strategy for simultaneously learning the sensing matrix and dictionary for a CS system differs from the one in [21] in that we provide a unified and identical measure for jointly optimizing the sensing matrix and dictionary. This framework ensures that it is possible to provide an algorithm with guaranteed convergence. 12 5 Experiments In this section, we will present a series of experiments to examine the performance of the proposed CCS scheme and approach for designing optimal CCS systems. 5.1 Demonstration of the Collaborative CS Scheme In this section, we will demonstrate the performance of the notion of collaborative CS scheme (as shown in Fig. 1) and compare it with that of traditional ones. Through the experiments for this part, we set the number of dictionaries K = 5. Each training data Xi ∈ <N ×J0 (i ∈ [K]) is obtained by 1) randomly extracting 15 non-overlapping patches (the dimension of each patch is 8 × 8) from each of 400 images in the LabelMe [33] training data set, and 2) arranging each patch of 8×8 as a vector of 64×1. Such a setting implies N = 64 and J0 = 15×400 = 6000. For each training data set Xi , we apply the K-SVD algorithm to obtain a sparsifying dictionary ΨKSV Di ∈ <N ×L0 with L0 = 100  κ = 4. We also apply the K-SVD algorithm for the entire training  and a given sparsity level data X = X1 · · · Xi · · · XK to obtain a sparsifying dictionary ΨKSV D ∈ <N ×L with L = L0 N ×L0 and ΨKSV with L0 = 256. We then generate a random M × N sensing matrix Φ. The CS ^D ∈ < systems with (Φ, ΨKSV Di ), (Φ, ΨKSV D ) and (Φ, ΨKSV ^D ) are then respectively denoted by CSRdmi , CSRdm and CSRdm . For any image H, we apply CS system CSRdmi to compress it and use Hi to ^ denote the output of each CS system. The collaborative CS system (denoted by CCSRdm ) has the c = 1 PK Hi . For convenience, we utilize CCSRdmm to denote the collaborative CS system output H i=1 K cm = 1 Pm Hi . Clearly, that fuses the estimates from the first k CS systems, i.e., with the output H i=1 m c=H cK . H The reconstruction accuracy is evaluated in terms of peak signal-to-noise ratio (PSNR), defined as   r (2 − 1)2 4 σpsnr = 10 × log10 σmse c ∈ <N1 ×N2 (where H c is an estimate of H) defined where r = 8 bits per pixel and σmse for images H, H as N1 N2 X X 1 4 c 1 , n2 )|2 σmse = |H(n1 , n2 ) − H(n N1 × N2 n =1 n =1 1 2 Fig. 2 shows the PSNR σpsnr of the CS systems CSRdmi and CCSRdmi when applied to the image ‘Plane’. Table 1 provides σpsnr for the CS systems CSRdmi , CSRdm , CSRdm ^ and CCSRdm tested with the twelve images. Fig. 3 displays the visual effects of image ‘Plane’ for the CS systems CSRdmi and CCSRdm . Remark 5.1: • It is observed from Fig. 2 that the σpsnr increases when k increases for CCSRdmk . This implies that by fusing more estimators from the classical CS systems {CSRdmi }, the collaborative CS system has better performance. This coincides with Lemma 17 that σmse is expected to decrease as K increases for the collaborative CS systems; • Table 1 also demonstrates the advantages of CCSRdm . It is of great interest to note that CCSRdm has still much better performance than CSRdm whose dictionary is learned with all the training data X; • As observed from Fig. 3, different CS systems {CSRdmi } yield different estimates of the image ‘Plane’. As each dictionary has limited capacity of representation, the corresponding CS system may yield excellent performance for some of the patches (of the image), but very poor one for the others. As PSNR is evaluated over all the patches, from a statistical point of view the PSNR of a single CS system is around the averaged PSNR and hence most likely lower than the one by the proposed CCS scheme; • Finally, it is observed from Table 1 that CSRdm ^ , though with a higher dimensional dictionary ΨKSV ^D , does not outperform CSRdm . This, as conjectured before and one of the arguments for the proposed CCS framework, is due to the fact that the mutual coherence of the dictionary Ψ and hence the equivalent one A gets higher when the dimension increases and consequently, the signal reconstruction accuracy decreases. 13 PSNR(dB) 31 30 CS Rdm i CCS Rdm i 29 28 1 2 3 4 5 Figure 2: PSNR σpsnr of CS systems and collaborative CS systems for image ‘Plane’. (a) (b) (c) (d) Figure 3: The original ’Plane’ and reconstructed images from their CS samples with M = 20 and κ = 4. (a) The original; (b) CSRdm1 ; (c) CSRdm ; (d) CCSRdm ; 5.2 Performance of the Optimized Collaborative CS Systems With the obtained training data X, we now examine the performance of the collaborative CS system with sensing matrix and dictionaries simultaneously learned by solving (26) with5 α = 0.2, β = 1. We run the proposed Algorithm 1 with Nite = 30 iterations to solve (26). In this section, this learned collaborative CS system is simply denoted by CCS. Fig. 4 shows the 5 Though there is no systematic way to find the best α and β (which depend on specific applications and are also not the main focus of this paper), we provide a rough guide to choose these parameters. With respect to α which weights the importance of the projected signal noise, similar to what is suggested in [21], α < 1 is preferred since we need to highlight the sparse representation error E. In terms of β, β > α is suggested since in dictionary learning for image processing, the sparse representation error E is not very small and capturing most of the key information in ΨS is more important for a sensing matrix. 14 Table 1: Statistics of σpsnr (dB) for images processed with M = 20, N = 64, L0 = 100, κ = 4, and K = 5. CSRdm1 CSRdm2 CSRdm3 CSRdm4 CSRdm5 CSRdm CSRdm ] CCSRdm Baboon 22.11 22.06 22.03 22.21 22.10 22.39 22.30 23.78 Boat 26.79 26.63 26.73 26.81 26.67 27.24 27.18 28.86 Child 31.03 31.08 31.04 31.05 31.10 31.70 31.45 33.45 Couple 26.90 26.95 26.98 26.98 26.92 27.51 27.34 29.09 Crowd 27.51 27.55 27.45 27.53 27.59 28.31 27.97 30.04 Elanie 29.45 29.37 29.28 29.39 29.56 29.78 29.58 31.10 Finger 23.38 23.17 23.45 23.81 23.51 24.31 23.83 26.48 Lake 25.83 25.87 25.81 26.00 25.92 26.46 26.27 28.07 Lax 22.49 22.51 22.50 22.55 22.54 22.77 22.72 24.14 Lena 29.65 29.43 29.59 29.74 29.61 30.32 29.94 31.93 Man 27.36 27.37 27.28 27.45 27.41 27.89 27.63 29.41 Plane 27.91 28.49 28.24 28.54 28.02 29.22 29.02 30.89 convergence behavior of the objective function %c as iteration k goes. We now compare the CCS with other CS systems. The CS systems CSElad , CSClassic , CST KK , CSLZY CB , and CSf are the ones with the learned dictionary ΨKSV D and the sensing matrix Φ ∈ <M ×N designed via the method in [22], [39], [36], [29], and [27] (by minimizing the average coherence of the equivalent dictionary), respectively. The CS system CSDCS is the one with the sensing matrix and dictionary that are simultaneously designed with the training data X using the method6 in [21]. Table 2 provides the performance of these CS systems for the same twelve images. Fig. 5 displays the visual effects of image ‘Plane’ for these CS systems. 6000 5000 4000 3000 2000 1000 0 5 10 15 20 25 30 Figure 4: Evolution of the cost function %c (Φk , Ψk , S k ), and K = 5. Table 2: Statistics of σpsnr (dB) for images processed with M = 20, N = 64, L0 = 100, κ = 4, and K = 5. CSElad CSClassic CST KK CSLZY CB CSDCS CSf CCS CCS8 6 We Baboon 12.11 9.39 11.93 8.15 25.35 24.85 26.27 26.33 Boat 16.55 13.78 16.31 12.54 30.39 30.04 31.50 31.76 Child 25.38 22.79 25.03 21.64 34.74 34.70 36.41 36.70 Couple 19.40 16.69 19.02 15.52 30.58 30.16 31.89 32.04 Crowd 22.67 20.27 22.28 19.22 31.45 31.46 33.28 33.65 Elanie 14.51 11.83 14.32 10.73 32.62 32.18 33.36 33.45 set the coupling factor in CSDCS to 0.5, which is suggested in [21]. 15 Finger 20.94 18.91 20.39 17.98 27.39 27.44 29.96 30.40 Lake 14.98 12.26 14.60 11.08 29.59 29.42 31.08 31.25 Lax 10.86 8.11 10.68 6.90 25.74 25.27 26.43 26.56 Lena 21.52 18.78 21.19 17.67 33.38 33.01 34.70 35.03 Man 18.68 15.88 18.34 14.82 30.87 30.61 32.03 32.26 Plane 23.69 21.26 23.32 20.11 32.50 32.45 34.20 34.45 (a) (b) (c) (d) Figure 5: The reconstructed ’Plane’ images from their CS samples with M = 20 and κ = 4. (a) CSDCS ; (b) CSf ; (c) CSetf ; (d) CCS. Remark 5.2: • It is observed from Table 1 and Table 2 that the CS systems using a random sensing matrix outperform CSElad , CSClassic , CST KK , and CSLZY CB . This is due to the fact that the sensing matrix in each of those CS system is optimized with the assumption that the sparse representation error of signals is nil, which is not the case for images at all; • As the sensing matrices used in CSf and CSDCS are optimized with the sparse representation error taken into account, they perform much better than those using a random sensing matrix; • The superiority of our proposed CCS system is again demonstrated clearly. Compared with CSRdm , it is basically 2.5 dB better in terms of σpsnr . Also, it yields an improvement over CSDCS by more than 1 dB. The amount of improvement can be further increased if the number of CS systems in the CCS system gets bigger. With the 5 × 6000 = 30, 000 samples in the obtained training data matrix X, a CCS system with K = 8, denoted as CCS8 , is also obtained and its performance is better than the CCS (corresponding to K = 5) by a amount of 0.15 dB on average. See Table 2. 6 Conclusion Based on the MLE principle, a collaborative compressed sensing framework has been raised and analyzed. Such a system consists of a bank of K CS systems that share the same sensing matrix. It has been shown that the CCS system yields a better performance than a sub CS system in a statistical sense. A measure has been proposed, which allows us to simultaneously optimize the sensing matrix and all the K dictionaries under the same scheme. An algorithm has been derived for solving the corresponding optimal CCS system problem. Experiments were carried out using real images and confirmed our theoretical results. The superiority of the optimized CCS system over the traditional CS systems has been clearly demonstrated. 16 A Proof of Lemma 3 Proof of Lemma 3. First of all, let %(Φ, Ψi , Si , Xi ) and G(Ψi , Si ) be the same as defined before in (25) and (32), respectively. With Φ ∈ OM,N , that is ΦΦT = IM , it can be shown that   %(Φ, Ψi , Si , Xi ) = − trace ΦT ΦG(Ψi , Si ) + ct where ct is independent of Φ. Thus, (31) is equivalent to (K )  4 X T Φk = argmax trace Φ ΦG(Ψi , Si ) = η Φ∈OM,N It then follows from the ED of due to Φ ∈ OM,N that PK i=1 i=1 G(Ψi , Si ) = VG̃ ΠVG̃T and Φ = U   IM η = trace Ṽ T ΠṼ 0 4 0 0  = M X  IM 0  V T - an SVD of Φ Q(n, n) n=1 4 T where Ṽ = VG̃ V and Q = Ṽ T ΠṼ . Without loss of generality, assume that the diagonal elements {πn } of Π satisfy πn ≥ πn+1 , ∀ n. According to [29] (see the proof of Theorem 3 there), one has η= M X Q(n, n) ≤ n=1 M X πn n=1 Thus, η is maximized if Ṽ is of the following form  Ṽ11 Ṽ = 0 0 Ṽ22  (45) where both Ṽ11 ∈ OM and Ṽ22 ∈ ON −M are arbitrary. Consequently, the optimal sensing matrix is given by   Φk = U IM 0 Ṽ T VG̃T where Ṽ is of form given by (45) and U ∈ OM is arbitrary. Clearly, Ṽ = IN yields one of the solutions, that is (33). B Proof of Theorem 2 B.1 Supporting results: We list some definitions and important results here. A subsequence of {xk } is a sequence {xkm }, where k1 < k2 < · · · is an increasing sequence of indices. Suppose xk ∈ <N . Definition 1. The set of subsequence limits Ω of a sequence {xk } is the set of limits of convergent subsequences, i.e. n o Ω = x ∈ <N : ∃{xkm } s.t. xkm → x . Theorem 3 (Bolzano-Weiestrass Theorem [10]). The Bolzano-Weiestrass Theorem states that any bounded sequence in <N has a convergent subsequence. Definition 2. Let f : <N → < ∪ {∞} be a proper lower semi-continuous function. • The domain of f is defined by domf := {x ∈ <N : f (x) < ∞}. • For each x ∈ domf , x is called the coordinate-wise minimum of f if it satisfies f (x + [0, . . . , dn , . . . , 0]T ) ≤ f (x), ∀ dn , n ∈ [N ]. 17 • The Fréchet subdifferential ∂F f is defined by   f (y) − f (x) − hz, y − xi ≥0 ∂F f (x) = z : lim inf y→x kx − yk for any x ∈ domf and ∂F f (x) = ∅ if x ∈ / domf . • For each x ∈ domf , x is called the stationary point of f if it satisfies 0 ∈ ∂F f . • Other definition of stationary point includes: x is called the stationary point of f if it satisfies 0 ∈ ∂f , where ∂f is the limiting subdifferential given by ∂f = {z : ∃xk → x, f (xk ) → f (x), zk ∈ ∂F f (xk ) → z} B.2 Main proofs Define f (Φ, Ψ, S) 4 = %c (Φ, Ψ, S) + IOM,N (Φ) +IU L0 K (Ψ) + IS J0 K (S) κ N L0 K where IS (x) = 0, if x ∈ S and ∞ otherwise, for S = OM,N , UN , SκJ0 K with OM,N , UN and Sκ defined before. Then, the minimization (26) is equivalent to the following unconstrained problem min f (Φ, Ψ, S) Φ,Ψ,S 4 Lemma 4. The sequence {Zk = (Φk , Ψk , S k )} generated by Algorithm 1 is a bounded sequence. For any convergent sub-sequence {Zkm } with limit point Z ? = (Φ? , Ψ? , S ? ), we have L0 K , S ? ∈ SκJ0 K Φ? ∈ OM,N , Ψ? ∈ UN and lim f (Zkm ) = lim %c (Zkm ) = %c (Z ? ) km →∞ km →∞ Proof of Lemma 4. It is clear that Φk and Ψk are bounded for all k since both OM,N and UN are compact sets. This further implies C(Φk , Xi ) and B(Φk )Ψi,k are bounded and hence Si,k+1 is also bounded for L0 K all k and i ∈ [K]. Thus S k is also bonded. Since Φkm ∈ OM , Ψkm ∈ UN , S km ∈ SκJ0 K and all of them L0 K are bounded, we conclude Φ? ∈ OM,N , Ψ? ∈ UN , S ? ∈ SκJ0 K . Noting that %c is a continuous function, we have %c (Zkm ) → %c (Z ? ) as km → ∞. By the definition of Φk , Ψk and S k , we have f (Z0 ) ≥ · · · ≥ f (Zk−1 ) ≥ f (Φk−1 , Ψk−1 , S k ) ≥ f (Φk−1 , Ψk , S k ) ≥ f (Zk ) ≥ · · · (46) which implies that f (Zk ) is decreasing and also f (Zk ) ≥ 0 by its definition. Thus f (Zk ) is a convergent sequence (see Theorem 3). Consequently, we have lim f (Zkm ) km →∞ lim {%c (Zkm ) + IOM,N (Φkm ) = km →∞ +IU L0 K (Ψkm ) + IS J0 K (S km )} N κ lim %c (Zkm ) = %c (Z ? ) = km →∞ Lemma 5. Let {Zk = (Φk , Ψk , S k )} denote the sequence generated by Algorithm 1 and let Ω denote the set of subsequence limits. Then, Ω is not empty and f (Z ? ) = inf f (Zk ), k 18 ∀(Z ? ) ∈ Ω. Proof of Lemma 5. Lemma 4 establishes that {Zk } is a bounded sequence. Thus, Bolzano-Weiestrass Theorem (see Theorem 3) tells us that the set Ω is not empty. Notice that {f (Zk )} is a decreasing sequence and f (Zk ) ≥ 0. By monotone convergence theorem [10], there exists some constant c such that inf k f (Zk ) = c. For any Z ? ∈ Ω, assume Zkm → Z ? as km → ∞. We have that limkm →∞ f (Zkm ) = f (Z ? ) = c. Lemma 5 tells that the sequence {Zk } has at least one limit point. Consider any convergent subsequence {Zkm } with limit point Z ? = (Φ? , Ψ? , S ? ). Since by definition Φkm = arg minΦ∈OM,N %c (Φ, Ψkm , S km ), we have %c (Φkm , Ψkm , S km ) ≤ %c (Φ, Ψkm , S km ), ∀ Φ ∈ OM,N Taking km → ∞, we have %c (Z ? ) ≤ %c (Φ, Ψ? , S ? ), ∀ Φ ∈ OM,N which implies %c (Z ? ) + IOM,N (Φ? ) ≤ %c (Φ + Φ? , Ψ? , S ? ) + IOM,N (Φ + Φ? ), ∀ Φ ∈ <M ×N since IOM,N (Φ + Φ? ) = ∞ if Φ + Φ? ∈ / OM,N . Thus, we obtain f (Z ? ) ≤ f (Φ + Φ? , Ψ? , S ? ), ∀ Φ ∈ <M ×N (47) Let ψi,k,l denote the l-th column of Ψi,k . By the definition of Zkm+1 , we similarly have %(Φkm , ψi,km+1 ,1 , ψi,km ,2 , . . . , ψi,km ,L , Si,km+1 ) ≤ %(Φkm , ψ, ψi,km ,2 , . . . , ψi,km ,L , Si,km+1 ), ∀ψ ∈ UN .. . %(Φkm , ψi,km+1 ,1 , . . . , ψi,km+1 ,L , Si,km+1 ) ≤ %(Φkm , ψi,km+1 ,1 , . . . , ψi,km+1 ,L , ψ, Si,km+1 ), ∀ψ ∈ UN for all i ∈ [K]. The summation of the first inequality, the second inequality with ψ = ψi,km ,2 , . . . , and the last inequality with ψ = ψi,km ,L gives %(Φkm , Ψi,km+1 , Si,km+1 ) ≤ %(Φkm , Ψi,km \ ψi,km ,1 /ψ, Si,km+1 ), ∀ψ ∈ UN for all i ∈ [K]. Thus we have %c (Φkm , Ψkm+1 , S km+1 ) = K X %(Φkm , Ψi,km+1 , Si,km+1 ) i=1 ≤ %c (Φkm , Ψkm \ ψi,km ,1 /ψ, S km+1 ), ∀ψ ∈ UN for any i ∈ [K]. This along with %c (Φkm+1 , Ψkm+1 , S km+1 ) ≤ %c (Φ, Ψkm+1 , S km+1 ) for all Φ ∈ OM,N gives %c (Zkm+1 ) ≤ %c (Φkm , Ψkm \ ψi,km ,1 /ψ, S km+1 ), ∀ψ ∈ UN for any i ∈ [K]. Taking km → ∞, we have ? %c (Z ? ) ≤ %c (Φ? , Ψ? \ ψi,1 /ψ, S ? ), ∀ψ ∈ UN for any i ∈ [K]. 19 To simplify the notation, let Ξ(Z) = Ξ(Φ, Ψ, S) = IOM,N (Φ) + IU L0 K (Ψ) + IS J0 K (S) N κ L0 K Utilizing the fact that Φ? ∈ OM,N , Ψ? ∈ UN , S ? ∈ SκJ0 K , we have ? ? %c (Z ? ) + Ξ(Z ? ) ≤ %c (Φ? , Ψ? \ ψi,1 /(ψi,1 + ψ), S ? ) ? ? /(ψi,1 + ψ), S ? ) + Ξ(Φ? , Ψ? \ ψi,1 ? ? since IUN (ψi,1 + ψ) = ∞ if ψi,1 +ψ ∈ / UN . This implies ? ? /(ψi,1 + ψ), S ? ), ∀ψ ∈ <N f (Z ? ) ≤ f (Φ? , Ψ? \ ψi,1 for all i ∈ [K]. Similarly, we obtain ? ? /(ψi,l + ψ), S ? ), ∀ψ ∈ <N f (Z ? ) ≤ f (Φ? , Ψ? \ ψi,l (48) for all l ∈ [L], i ∈ [K]. With similar argument, we also have %c (Z ? ) ≤ %c (Φ? , Ψ? , S ? + S), ∀S ∈ <L0 ×J0 K (49) Thus, we have shown that the point (Φ? , Ψ? , S ? ) is a coordinate-wise minimum point. Now, for any δZ = (δΦ , δΨ , δS ), we have f (Z ? + δZ ) − f (Z ? ) kδZ kF →0 kδZ kF %c (Z ? + δZ ) − %c (Z ? ) + Ξ(Z ? + δZ ) − Ξ(Z ? ) = lim inf kδZ kF →0 kδZ kF ∗ − o(kδZ kF ) + Ξ(Z ? + δZ ) − Ξ(Z ? ) = lim inf kδZ kF →0 kδZ kF  ? ? f (Φ + δΦ , Ψ , S ? ) − f (Z ? ) − o(kδΦ kF ) = lim inf + kδZ kF →0 kδZ kF ? ? X f (Φ? , Ψ? \ ψi,l /(ψi,l + δψi,l ), S ? ) − f (Z ? ) − o(kδψi,l k) kδZ kF i,l  f (Φ? , Ψ? , S ? + δS ) − f (Z ? ) − o(kδS kF ) + kδZ kF P −o(kδΦ kF ) − o( i,l kδψi,l k) − o(kδS kF ) ≥ lim inf = 0. kδZ kF →0 kδZ kF lim inf = 0, while the second where ∗ = h∇%c (Z ? ), δZ i, the “little-o” notation o(c) is defined by limc→0 o(c) c equality follows from Taylor’s theorem expanding %c (Z ? + δZ ) at Z ? , and the inequality follows from (47) - (49). Thus, the point Z ? is a stationary point. This completes the proof of Theorem 2. References [1] V. Abolghasemi, S. Ferdowsi, and S. Sanei. A gradient-based alternating minimization approach for optimization of the measurement matrix in compressive sensing. Signal Process., 92(4):999–1009, 2012. [2] M. Aharon and M. Elad. Sparse and redundant modeling of image content using an image-signaturedictionary. SIAM J. Imag. Sci., 1(3):228–247, 2008. [3] M. Aharon, M. Elad, and A. Bruckstein. K-SVD: An algorithm for designing overcomplete dictionaries for sparse representation. IEEE Trans. Signal Process., 54(11):4311–4322, 2006. 20 [4] H. Attouch, J. Bolte, P. Redont, and A. Soubeyran. Proximal alternating minimization and projection methods for nonconvex problems: An approach based on the kurdyka-lojasiewicz inequality. Math. Operations Research, 35(2):438–457, 2010. [5] H. Attouch, J. Bolte, and B. F. Svaiter. Convergence of descent methods for semi-algebraic and tame problems: proximal algorithms, forward–backward splitting, and regularized gauss–seidel methods. Math. Program., 137(1-2):91–129, 2013. [6] H. Bai, G. Li, S. Li, Q. Li, Q. Jiang, and L. Chang. Alternating optimization of sensing matrix and sparsifying dictionary for compressed sensing. IEEE Trans. Signal Process., 63(6):1581–1594, 2015. [7] A. S. Bandeira, E. Dobriban, D. G. Mixon, and W. F. Sawin. Certifying the restricted isometry property is hard. IEEE Trans. Inf. Theory, 59(6):3448–3450, 2013. [8] C. Bao, H. Ji, and Z. Shen. Convergence analysis for iterative data-driven tight frame construction scheme. Appl. Comput. Harmon. Anal., 38(3):510–523, 2015. [9] R. Baraniuk, M. Davenport, R. DeVore, and M. Wakin. A simple proof of the restricted isometry property for random matrices. Constructive Approximation, 28(3):253–263, 2008. [10] R. G. Bartle and D. R. Sherbert. Introduction to Real Analysis, volume 2. Wiley New York, 2000. [11] T. Blumensath and M. E. Davies. Iterative thresholding for sparse approximations. J. Fourier Anal. Appl., 14(5-6):629–654, 2008. [12] J. Bolte, S. Sabach, and M. Teboulle. Proximal alternating linearized minimization for nonconvex and nonsmooth problems. Math. Program., 146(1-2):459–494, 2014. [13] E. Candès, J. Romberg, and T. Tao. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. Inf. Theory, 52(2):489–509, 2006. [14] E. Candès and M. B. Wakin. An introduction to compressive sampling. IEEE Signal Process. Mag., 25(2):21–30, 2008. [15] E. J. Candes, Y. C. Eldar, D. Needell, and P. Randall. Compressed sensing with coherent and redundant dictionaries. Appl. Comput. Harmon. Anal., 31(1):59–73, 2011. [16] E. J. Candès, J. K. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Commun. Pure Appl. Math., 59(8):1207–1223, 2006. [17] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM J. Sci. Comput., 20(1):33–61, 1998. [18] M. A. Davenport, J. N. Laska, J. R. Treichler, and R. G. Baraniuk. The pros and cons of compressive sensing for wideband signal acquisition: Noise folding versus dynamic range. IEEE Trans. Signal Process., 60(9):4628–4642, 2012. [19] D. L. Donoho. Compressed sensing. IEEE Trans. Inf. Theory, 52(4):1289–1306, 2006. [20] D. L. Donoho and M. Elad. Optimally sparse representation in general (nonorthogonal) dictionaries via l1 minimization. Proc. Natt. Acad. Sci., 100(5):2197–2202, 2003. [21] J. M. Duarte-Carvajalino and G. Sapiro. Learning to sense sparse signals: Simultaneous sensing matrix and sparsifying dictionary optimization. IEEE Trans. Image Process., 18(7):1395–1408, 2009. [22] M. Elad. Optimized projections for compressed sensing. IEEE Trans. Signal Process., 55(12):5695– 5702, 2007. [23] M. Elad. Sparse and Redundant Representations: From Theory to Applications in Signal and Image Processing. Springer Publishing Company, Incorporated, 1st edition, 2010. [24] K. Engan, S. O. Aase, and J. Hakon Husoy. Method of optimal directions for frame design. In Proc. IEEE Int. Conf. Acoust., Speech, and Signal Processing (ICASSP), volume 5, pages 2443–2446, 1999. [25] T. Hong, H. Bai, S. Li, and Z. Zhu. An efficient algorithm for designing projection matrix in compressive sensing based on alternating optimization. Signal Process., 125:9–20, 2016. [26] S. M. Kay. Fundamentals of Statistical Signal Processing. Prentice Hall PTR, 1993. [27] G. Li, X. Li, S. Li, H. Bai, Q. Jiang, and X. He. Designing robust sensing matrix for image compression. IEEE Trans. Image Processing, 24(12):5389–5400, 2015. 21 [28] G. Li, Z. Zhu, H. Bai, and A. Yu. A new framework for designing incoherent sparsifying dictionaries. In Proc. IEEE Int. Conf. Acoust., Speech, and Signal Processing (ICASSP), pages 4416–4420. IEEE, 2017. [29] G. Li, Z. Zhu, D. Yang, L. Chang, and H. Bai. On projection matrix optimization for compressive sensing systems. IEEE Trans. Signal Process., 61(11):2887–2898, 2013. [30] S. Mallat. A Wavelet Tour of Signal Processing. Academic Press, 1999. [31] S. G. Mallat and Z. Zhang. Matching pursuits with time-frequency dictionaries. IEEE Trans. Signal Process., 41(12):3397–3415, 1993. [32] D. Needell and J. A. Tropp. CoSaMP: Iterative signal recovery from incomplete and inaccurate samples. Appl. Comput. Harmonic Anal., 26(3):301–321, 2009. [33] B. C. Russell, A. Torralba, K. P. Murphy, and W. T. Freeman. Labelme: a database and web-based tool for image annotation. Int. J. Computer Vision, 77(1):157–173, 2008. [34] J. A. Tropp. Greed is good: Algorithmic results for sparse approximation. IEEE Trans. Inf. Theory, 50(10):2231–2242, 2004. [35] J. A. Tropp, I. S. Dhillon, R. W. Heath, and T. Strohmer. Designing structured tight frames via an alternating projection method. IEEE Trans. Inform. Theory, 51(1):188–209, 2005. [36] E. V. Tsiligianni, L. P. Kondi, and A. K. Katsaggelos. Construction of incoherent unit norm tight frames with application to compressed sensing. IEEE Trans. Inform. Theory, 60(4):2319–2330, 2014. [37] Y. Wang and W. Yin. Sparse signal reconstruction via iterative support detection. SIAM J. Imag. Sci., 3(3):462–491, 2010. [38] L. Welch. Lower bounds on the maximum cross correlation of signals (corresp.). IEEE Transactions on Information theory, 20(3):397–399, 1974. [39] J. Xu, Y. Pi, and Z. Cao. Optimized projection matrix for compressive sensing. EURASIP J. Adv. Signal Process., 2010(1):560349, 2010. [40] L. Zelnik-Manor, K. Rosenblum, and Y. C. Eldar. Sensing matrix optimization for block-sparse decoding. IEEE Trans. Signal Process., 59(9):4300–4312, 2011. [41] Z. Zhu, G. Li, T. Hong, and B. Hou. On designing incoherent unit norm frames and robust compressed sensing systems. submitted to IEEE Trans. Inf. Theory. [42] Z. Zhu and M. B. Wakin. Approximating sampled sinusoids and multiband signals using multiband modulated DPSS dictionaries. to appear in J. Fourier Anal. Appl. 22
7cs.IT
A new efficient hyperelastic finite element model for graphene and its application to carbon nanotubes and nanocones arXiv:1802.09825v1 [cs.CE] 27 Feb 2018 Reza Ghaffari1 and Roger A. Sauer2 Abstract A new hyperelastic material model is proposed for graphene-based structures, such as graphene, carbon nanotubes (CNTs) and carbon nanocones (CNC). The proposed model is based on a set of invariants obtained from the right surface Cauchy-Green strain tensor and a structural tensor. The model is fully nonlinear and can simulate buckling and postbuckling behavior. It is calibrated from existing quantum data. It is implemented within a rotation-free isogeometric shell formulation. The speedup of the model is 1.5 relative to the finite element model of Ghaffari et al. [1], which is based on the logarithmic strain formulation of Kumar and Parks [2]. The material behavior is verified by testing uniaxial tension and pure shear. The performance of the material model is illustrated by several numerical examples. The examples include bending, twisting, and wall contact of CNTs and CNCs. The wall contact is modeled with a coarse grained contact model based on the Lennard-Jones potential. The buckling and post-buckling behavior is captured in the examples. The results are compared with reference results from the literature and there is good agreement. Keywords: Anisotropic hyperelastic material models; buckling and post-buckling; carbon nanotubes and nanocones; isogeometric finite elements; Kirchhoff-Love shell theory. 1. Introduction Graphene and graphene-based structures such as carbon nanotubes (CNT) and carbon nanocones (CNC) [3, 4, 5, 6, 7, 8] have unique mechanical [9, 10, 11], thermal [12, 13, 14, 15] and electrical [16, 17, 18, 19] properties. They can be used in sensors [20], energy storage devices [21], healthcare [22] and as a coating against corrosion [23]. They are used to improve mechanical, thermal and electrical properties of composites [24, 25, 26, 27, 28]. CNTs and CNCs can be obtained by rolling of a graphene sheet [29, 30]. Robust and efficient analysis methods should be developed in order to reduce the time and cost of design and production. There are several different approaches in the literature for modeling graphene. One is based on the Cauchy-Born rule applied to intermolecular potentials. Arroyo and Belytschko [31] propose an exponential Cauchy-Born rule to simulate the mechanical behavior of CNTs. Guo et al. [32] and Wang et al. [33] use a higher order Cauchy-Born rule to model CNTs. Yan et al. [34] use a higher order gradient continuum theory3 and the Tersoff-Brenner potential to obtain the properties of single-walled CNCs. A second approach is based on the quasi-continuum method [35]. Yan et al. [36] apply the quasi-continuum to simulate buckling and post-buckling of CNCs. A temperature-related quasi-continuum model is proposed by Wang et al. [37] to model the behavior of CNCs under axial compression. A third approach is based on classical continuum material models. Those are popular for graphene in the context of isotropic linear material models. Firouz-Abadi et al. [38] obtain the natural frequencies of nanocones by using a nonlocal continuum theory and linear elasticity assumptions. Their work is extended to the stability 1 email: [email protected] Corresponding author, email: [email protected] 3 This method is similar to Cauchy-Born rule. 2 1 analysis under external pressure and axial loads by Firouz-Abadi et al. [39] and the stability analysis of CNCs conveying fluid by Gandomani et al. [40]. Lee and Lee [29] use the finite element (FE) method to obtain the natural frequencies of CNTs and CNCs. The interaction of carbon atoms is modeled as continuum frame elements. Graphene has an anisotropic behavior under large strains. There are several continuum material models for anisotropic behavior of graphene. Sfyris et al. [41] and Sfyris et al. [42] use Taylor expansion and a set of invariants to propose strain energy functionals for graphene based on its lattice structure. Delfani et al. [43] and Delfani and Shodja [44, 45] use a similar Taylor expansion for the strain energy and apply symmetry operators to the elasticity tensors in order to reduce the number of independent variables. Nonlinear membrane material models are proposed by Xu et al. [46] and Kumar and Parks [2]. They use ab-initio results to calibrate their models. The model of Kumar and Parks [2] is based on the logarithmic strain and the symmetry group of the graphene lattice [47, 48, 49]. This symmetry group reduces the number of parameters in the model of Xu et al. [46] by a half. The membrane model of Kumar and Parks [2] is extended by Ghaffari et al. [1] to a shell model by adding a bending energy term. Ghaffari and Sauer [50] conduct a modal analysis of graphene sheets and CNTs under various nonlinearities. A finite thickness for graphene is considered in the most of the mentioned works. Thus, an integration through the thickness needs be conducted to obtain the bending stiffness. The finite thickness assumption can be avoided by writing the strain energy density per unit area of the surface as in Xu et al. [46], Kumar and Parks [2], Ghaffari et al. [1] and Ghaffari and Sauer [50]. The material model of Ghaffari et al. [1] and the proposed new material model in the current paper are implemented in the rotation-free isogeometric finite shell element formulation of Sauer et al. [51], Sauer and Duong [52] and Duong et al. [53]. This formulation is based on displacement degree of freedoms (DOFs) and avoids rotation DOFs through the use of Kirchhoff-Love kinematics and NURBS discretization [54]. The avoidance of rotational DOFs increases efficiency and simplifies the formulation [55]. A material model based on continuum mechanics is necessary for the development of a shell formulation. The model of Ghaffari et al. [1] is quite complicated and computationally expensive. It is based on a logarithmic strain formulations, which requires using a chain rule and summation over fourth and sixth order tensors (see Sec. 2 for more details). This high computational cost is avoided in the new proposed material model. In summary, the novelties of the current work are: \bullet It can be used both in curvilinear and Cartesian shell formulations. \bullet It is simpler to implement and thus 1.5 faster than the model of Ghaffari et al. [1]. \bullet It is fully nonlinear and can capture buckling and post-buckling behavior. \bullet It is suitable to simulate and study carbon nanocones under large deformations. \bullet It is applied to simulate contact of CNTs and CNCs with a Lennard-Jones wall. \bullet The latter example demonstrates that CNCs are ideal candidates for AFM tips. The remainder of this paper is organized as follows: In Sec. 2 the finite element formulation is summarized and the development of a new material model is motivated. In Sec. 3, a new hyperelastic shell material model for graphene-based structures is proposed. In Sec. 4, the model is verified and compared with the model of Ghaffari et al. [1] considering various test cases. Sec. 5 presents several numerical examples involving buckling and contact of CNTs and CNCs. The behavior is compared with molecular dynamics and quasi-continuum results from the literature. The paper is concluded in Sec. 6. 2 2. Finite element formulation for Kirchhoff-Love shells It this section, the discretized weak form is summarized and the development of a new material model is motivated. The Cauchy stress tensor of Kirchhoff-Love shell theory can be written as4 [52] \bfitsigma \mathrm{K}\mathrm{L} = N \alpha \beta \bfita \alpha \otimes \bfita \beta + S \alpha \bfita \alpha \otimes \bfitn , (1) where N \alpha \beta = \sigma \alpha \beta + b\beta \gamma M \gamma \alpha (2) \beta \alpha S \alpha = - M;\beta (3) and are the components of the membrane stress and out-of-plane shear. Here, ``;"" denotes the covariant derivative, and \bfita \alpha and \bfitn are the tangent and normal vectors of the shell surface in the current configuration, see Appendix A. For hyperelastic materials, \sigma \alpha \beta and M \alpha \beta are given by \sigma \alpha \beta = \tau \alpha \beta /J , \tau \alpha \beta = M \alpha \beta = M0\alpha \beta /J , \partial W , \partial a\alpha \beta M0\alpha \beta = \partial W , \partial b\alpha \beta (4) (5) where W is the strain energy density per unit area of the initial configuration, and a\alpha \beta and b\alpha \beta are the covariant components of the metric and curvature tensor [52]. b\beta \alpha in Eq. (2) are the mixed components of the curvature tensor (see Appendix A). The discretized weak form for Kirchhoff-Love shells can be written as [53] n\mathrm{e}\mathrm{l} \sum (Ge\mathrm{i}\mathrm{n}\mathrm{t} + Ge\mathrm{c} - Ge\mathrm{e}\mathrm{x}\mathrm{t} ) = 0 , \forall \delta xe \in \scrV , (6) e=1 where \delta xe is the variation of the element nodes, n\mathrm{e}\mathrm{l} is the number of elements and \scrV is the space of admissible variations. Ge\mathrm{c} and Ge\mathrm{e}\mathrm{x}\mathrm{t} are related to contact and external forces [1]. Ge\mathrm{i}\mathrm{n}\mathrm{t} is the internal virtual work of element \Omega e0 defined as e e Ge\mathrm{i}\mathrm{n}\mathrm{t} := \delta x\mathrm{T} e (f\mathrm{i}\mathrm{n}\mathrm{t}\tau + f\mathrm{i}\mathrm{n}\mathrm{t}M ) , with f\mathrm{i}e\mathrm{n}\mathrm{t}\tau \int = f\mathrm{i}e\mathrm{n}\mathrm{t}M = e \Omega \int 0 (7) \tau \alpha \beta N\mathrm{T} ,\alpha \bfita \beta dA , \~ \mathrm{T} \bfitn dA , M0\alpha \beta N ;\alpha \beta (8) \Omega e0 \~ ;\alpha \beta are the shape function arrays of the element that are defined as where N , N,\alpha and N N := [N1 1, N2 1, . . . , Nne 1] , N,\alpha := [N1,\alpha 1, N2,\alpha 1, . . . , Nne ,\alpha 1] , \~ ;\alpha \beta := N,\alpha \beta - \Gamma \gamma N,\gamma , N \alpha \beta (9) N,\alpha \beta := [N1,\alpha \beta 1, N2,\alpha \beta 1, . . . , Nne ,\alpha \beta 1] . 4 Index KL is added here to distinguish the total Cauchy stress \bfitsigma \mathrm{K}\mathrm{L} from its in-plane contribution \bfitsigma := \sigma \alpha \beta \bfita \alpha \otimes \bfita \beta . 3 Here, ``\bullet , \alpha "" denotes the parametric derivative \partial \bullet /\partial \xi \alpha , and 1 and Ni are the three dimensional identity tensor and the NURBS shape functions [54]. \tau \alpha \beta and M0\alpha \beta need to be specified for the finite element implementation through Eq. (4) and (5). \tau \alpha \beta corresponds to the components of the in-plane Kirchhoff stress tensor \bfittau = J\bfitsigma . They are equal to the components S \alpha \beta of the in-plane second Piola-Kirchhoff (2.PK) stress \bfitS = S \alpha \beta \bfitA \alpha \otimes \bfitA \beta since \tau \alpha \beta = \bfita \alpha \cdot \bfittau \bfita \beta = \bfitA \alpha \cdot \bfitS \bfitA \beta = S \alpha \beta , (10) due to \bfittau = \bfitF \bfitS \bfitF \mathrm{T} and \bfita \alpha = \bfitF - \mathrm{T} \bfitA \alpha . Here \bfitF = \bfita \alpha \otimes \bfitA \alpha is the surface deformation gradient. \bfitA \alpha (\bfita \alpha ) and \bfitA \alpha (\bfita \alpha ) are the tangent and dual vectors in the reference (current) configuration (see Appendix A). Following Eq. (4), the 2.PK stress \bfitS can also be written as \bfitS = 2 \partial W , \partial \bfitC (11) where \bfitC = \bfitF \mathrm{T} \bfitF is the right surface Cauchy-Green deformation tensor. \bfitS can be computed by using Eq. (11). However, if the model is developed based on the logarithmic strain, \bfitS can not be directly computed and \bfitS needs to connected to the logarithmic strain \bfitE (0) := 1/2 ln(\bfitC ). Using Eq. (11), \bfitS can be then obtained as \bfitS = 2 \partial W \partial \bfitE (0) where \scrL 1 := : \scrL 1 , \partial \bfitE (0) . \partial \bfitC (12) (13) \scrL 1 and \scrL 2 := \partial 2 \bfitE (0) /\partial \bfitC \otimes \partial \bfitC are needed for the calculation of \bfitS and its corresponding elasticity tensor, which appears in the FE stiffness matrix5 . There is a high computational cost for the calculation of \scrL 1 and \scrL 2 [56, 57, 58, 2, 1] due to double and quadruple contraction with the logarithmic stress \bfitS (0) := \partial W/\partial \bfitE (0) and its tangent \partial \bfitS (0) /\partial \bfitE (0) (see Kumar and Parks [2]). This computational cost can be reduced for isotropic material models [59, 60] but this is not possible for anisotropic material models. It is convenient to use \bfitE (0) , since it simplifies the formulation of the strain energy density (see Appendix B). But \bfitS (0) and its corresponding elasticity tensor need to be transformed to the 2.PK6 stress tensor and its corresponding elasticity tensor to be used in a classical FE formulation. This approach is used by Ghaffari et al. [1]. The algebraic strain and deformation measures, like \bfitC and \bfitF , can directly be linearized, discretized and used in a classical FE formulation. So, the linearization and implementation are more efficient if the material model can be formulated based on \bfitC . The 2.PK stress tensor and its corresponding elasticity tensor can be obtained directly as the first and second partial derivative of W with respect to \bfitC . In the next section, the strain energy density W (\bfitE (0) ) of Kumar and Parks [2] is rewritten based on \bfitC and thus the performance of the model is increased by a factor of 1.5. 3. Material model In this section, a nonlinear constitutive law for graphene is proposed. Experimentally measured strains up to 12.5\% [61], 20\% [62] and even 25\% [63, 64] have been reported for graphene. This is consistent with atomistic simulations [65, 66, 67] and first principle simulations [68, 69, 2, 70]. 5 6 See Kumar and Parks [2] for \scrL 1 and \scrL 2 . The Cauchy stress tensor can also be used. 4 See also Galiotis et al. [71] and Akinwande et al. [72] for reviews on the matter. Up to those strains, the deformation is elastic and reversible, and so hyperelastic material models can be used. Those are based on the surface strain energy density W . It can be decomposed into the membrane and bending parts W\mathrm{m} and W\mathrm{b} as [1] W = W\mathrm{m} (\bfitC ) + W\mathrm{b} (\bfitC , b\alpha \beta ) . (14) Models based on a Taylor expansion of the elasticity tensor have many parameters. Many experiments, and multidimensional optimization should be conducted in order to calibrate these parameters [43, 44, 45]. On the other hand, models based on a set of invariants are more simple [2]. This is the case for the membrane model of Kumar and Parks [2] and the bending model of Canham [73], which are used here. A possible set of invariants for \bfitC and the structural tensor H are (see Appendix B) \sqrt{} \scrJ 1\bfitC := det(\bfitC ) = J , \biggl( \biggr) 1 \= \bot \= \bot 1 \Lambda 1 \Lambda 2 + - 2 , \scrJ 2\bfitC := \bfitC : \bfitC = 2 4 \Lambda 2 \Lambda 1 \biggr) \Bigr] 1 \biggl( \lambda 1 \= \= \= \lambda 2 3 1 \Bigl[ \^ \= 3 1 2 \^ \= \^ \= \scrJ 3\bfitC := H(\bfitC , \bfitC , \bfitC ) = - (\bfitM : \bfitC ) - 3(\bfitM : \bfitC )(\bfitN : \bfitC ) = cos(6\theta ) , 8 8 8 \lambda 2 \lambda 1 (15) \bot \= \= \= where J = det \bfitF , \bfitC is the deviatoric part of \bfitC , and \bfitC is traceless part of \bfitC . The latter are \= as defined based on the deviatoric surface deformation gradient \bfitF 1 \= \bfitF \= \bfitC \= \bot \bfitC := J - 2 \bfitF , \= \mathrm{T} \bfitF \= = 1 \bfitC , := \bfitF J \biggl( \biggr) 1 1 \bfitC - tr (\bfitC ) \bfitI . := J 2 (16) \^ and \bfitN \^ are two traceless matrices which are related to the lattice direction and H (see \bfitM Eqs. (B.3) and (B.3)). \lambda \alpha and \Lambda \alpha = \lambda 2\alpha (\alpha = 1, 2) are the two eigenvalues of the right surface stretch tensor \bfitU and \bfitC , respectively. \theta is the maximum stretch angle relative to the armchair \^ and defined as (see Fig. 1) direction \bfitx \^ ) , \theta = arccos (\bfitY 1 \cdot \bfitx (17) where \bfitY 1 is the direction of the maximum stretch. Using the spectral decomposition, \bfitU and \bfitC can be written as 2 \sum \bfitU = \lambda \alpha \bfitY \alpha \otimes \bfitY \alpha , \bfitC = \alpha =1 2 \sum (18) \Lambda \alpha \bfitY \alpha \otimes \bfitY \alpha . \alpha =1 The first and second invariants, \scrJ 1\bfitC and \scrJ 2\bfitC , model material behavior under pure dilatation and shear, the third one, \scrJ 3\bfitC , models anisotropic behavior. The derivative of these invariants with respect to \bfitC can be easily determined (see Eq. (C.1)) and used to obtain stress and elasticity tensors without any transformation. The material model can be developed based on additive or multiplicative combinations of the invariants. This can complicate the development of material models and many combinations should be tested to find the best choice in terms of model accuracy and computational efficiency. Kumar and Parks [2] show that the logarithmic surface strain \bfitE (0) and its invariants can model the nonlinear hyperelastic response of graphene very 5 y x \^ and \bfity \^ are the Figure 1: Anisotropy of the material: Orthonormal vectors characterize the graphene lattice. \bfitx armchair and zigzag directions [1]. e1 0.25 e2 0.0811 g1 0.125 g2 0.06057 Table 1: Constants for the Taylor expansion of the invariants of the logarithmic strain. well. The invariants of \bfitE (0) can be approximated by the invariants of \bfitC . This approximation is sufficient to model the material behavior in the full range of deformation for which the original material model is valid. So, the exact value of the logarithmic strain is not needed anymore. This ensures the accuracy and efficiency of the model. The second and third invariant of \bfitE (0) (see Appendix B) can be approximated as 2 , \scrJ 2\bfitE (0) \approx f1 = e1 \scrJ 2\bfitC - e2 \scrJ 2\bfitC \scrJ 3\bfitE (0) \approx f2 = \scrJ 3\bfitC (g1 - g2 \scrJ 2\bfitC ) , (19) where e\alpha and g\alpha are constants (see Tab. 1) that are independent of the material response and computed from the kinematics of the strains. f1 is based on the second order Taylor series expansion of \scrJ 2\bfitC , while f2 is based on the second order expansion of \scrJ 2\bfitC and \scrJ 3\bfitC omitting 2 and \scrJ 2 for the following reasons: \scrJ 2 results in cos(12 \theta ), which has the monomials \scrJ 2\bfitC , \scrJ 2\bfitC 3\bfitC 3\bfitC 2 do not have periodicity of 60\circ . too high periodicity, while \scrJ 2\bfitC and \scrJ 2\bfitC Using Eq. (19), the membrane energy of Kumar and Parks [2] can be modified into \bigl[ \bigr] W\mathrm{m} (\scrJ 1\bfitC , \scrJ 2\bfitC , \scrJ 3\bfitC ) = \varepsilon 1 - (1 + \alpha \^ ln(\scrJ 1\bfitC )) exp( - \^ \alpha ln(\scrJ 1\bfitC )) + 2 \mu f1 + \eta f2 , (20) where \mu and \eta are defined as [2] \^ \mu := \mu 0 - \mu 1 (\scrJ 1\bfitC )\beta , \eta := \eta 0 - \eta 1 (ln \scrJ 1\bfitC )2 . (21) The Canham bending strain energy density is [73] W\mathrm{b} := J \bigr) c \bigl( 2 \kappa 1 + \kappa 22 , 2 (22) where \kappa \alpha are the principal surface curvatures (see Appendix A). The membrane and bending material parameters are given in Tabs. 2 and 3. The second Piola-Kirchhoff stress tensor (related 6 GGA LDA \alpha \^ 1.53 1.38 \varepsilon [N/m] 93.84 116.43 \mu 0 [N/m] 172.18 164.17 \mu 1 [N/m] 27.03 17.31 \beta \^ 5.16 6.22 \eta 0 [N/m] 94.65 86.9\mathrm{a} \eta 1 [N/m] 4393.26 3611.5\mathrm{a} Table 2: Material constants of graphene [2]. GGA = generalized gradient approximation; LDA = local density approximation. GGA and LDA are two approximations in the density functional theory. \mathrm{a} See correction of Kumar and Parks [74]. c [nN\cdot nm] FGBP 0.133 SGBP 0.225 QM 0.238 Table 3: Bending stiffness according to various atomistic models [65, 75]. FGBP = first generation Brenner potential; SGBP = second generation Brenner potential; QM = quantum mechanics. The QM parameter is used in all simulations. to the membrane strain energy density) follows from Eq. (20) as \bfitS \mathrm{m} := 2 \partial W\mathrm{m} \partial W\mathrm{m} \partial \scrJ 1c \partial W\mathrm{m} \partial \scrJ 2c \partial W\mathrm{m} \partial \scrJ 3c =2 +2 +2 , \partial \bfitC \partial \scrJ 1c \partial \bfitC \partial \scrJ 2c \partial \bfitC \partial \scrJ 3c \partial \bfitC (23) which becomes H2 \= \bot H3 \^ + a \^ \bfitN \^ ) , (24) \bfitC + (a \^ \bfitM \bfitN J 4J \bfitM where \partial \scrJ i\bfitC /\partial \bfitC , Hi , a\bfitM \^ are given in Appendix C. The elasticity tensor (related to \^ and a\bfitN the membrane strain energy density) is defined as \bfitS \mathrm{m} = H1 \bfitC - 1 + C\mathrm{m} := \partial 2 W\mathrm{m} \partial 2 W\mathrm{m} = \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta , \partial \bfitC \otimes \partial \bfitC \partial C\alpha \beta \partial C\gamma \delta which, for the proposed membrane strain energy density, is (see Appendix C) \biggl\{ \biggl( \biggr) J \partial H1 \partial H1 3 \partial H1 1 \partial H2 \= \bot \= \bot C\mathrm{m} = 2 - \scrJ 2\bfitC - \scrJ 3\bfitC \bfitC - 1 \otimes \bfitC - 1 + 2 \bfitC \otimes \bfitC 2 \partial \scrJ 1\bfitC \partial \scrJ 2\bfitC 2 \partial \scrJ 3\bfitC J \partial \scrJ 2 \Bigr] \mathrm{S} \bigr] \mathrm{S} 2 \partial H1 \Bigl[ - 1 \= \bot \Bigr] \mathrm{S} 1 \partial H1 \bigl[ - 1 1 \partial H3 \Bigl[ \= \bot \bfitC \otimes \bfitC \bfitZ \otimes \bfitC + + \bfitC \otimes \bfitZ + 2 J \partial \scrJ 2 4J \partial \scrJ 3 2J \partial \scrJ 2 1 H2 - H1 (\bfitC - 1 \boxtimes \bfitC - 1 + \bfitC - 1 \oplus \bfitC - 1 ) + 2 (\bfitI \boxtimes \bfitI + \bfitI \oplus \bfitI - \bfitI \otimes \bfitI ) 2 2J \Bigr] \biggr\} 3H3 \Bigl[ \^ \= \^ \^ \^ \^ \^ \= \^ \^ \^ \^ + (\bfitM : \bfitC ) (\bfitM \otimes \bfitM - \bfitN \otimes \bfitN ) - (\bfitN : \bfitC )(\bfitM \otimes \bfitN + \bfitN \otimes \bfitM ) , 2J 2 (25) (26) with \^ \^ \bfitZ := a\bfitM \^ \bfitM + a\bfitN \^ \bfitN , (\bfitA \otimes \bfitB )\mathrm{S} := 1 (\bfitA \otimes \bfitB + \bfitB \otimes \bfitA ) . 2 (27) (28) The multiplication operators7 \otimes , \oplus and \boxtimes are defined for two second order tensors of \bfitA and \bfitB as \bfitA \otimes \bfitB = A\alpha \beta B \gamma \delta \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta , \bfitA \oplus \bfitB = A\alpha \beta B \gamma \delta \bfitA \alpha \otimes \bfitA \gamma \otimes \bfitA \delta \otimes \bfitA \beta = A\alpha \delta B \beta \gamma \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta , \bfitA \boxtimes \bfitB = A\alpha \beta B \gamma \delta \bfitA \alpha \otimes \bfitA \gamma \otimes \bfitA \beta \otimes \bfitA \delta = A\alpha \gamma B \beta \delta \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta . 7 Kintzel and Baar [76] and Kintzel [77] use \times instead of \oplus . 7 (29) The tensorial form of \bfitS and C\mathrm{m} in (24) and (26) can also be used in non-curvilinear, e.g. Cartesian, shell formulations. The constitutive law needs to be written in curvilinear coordinates \^ , \bfitN \^ and \bfitI can be written to be used in the shell formulation of Duong et al. [53]. \bfitC , \bfitC - 1 , \bfitM in the curvilinear coordinate basis as \bfitC \bfitC - 1 \bfitI \^ \bfitM \^ \bfitN = = = = = A\alpha \gamma a\gamma \delta A\delta \beta \bfitA \alpha \otimes \bfitA \beta , a\alpha \beta \bfitA \alpha \otimes \bfitA \beta , A\alpha \beta \bfitA \alpha \otimes \bfitA \beta , \^ \alpha \beta \bfitA \alpha \otimes \bfitA \beta = M \^ \alpha \beta \bfitA \alpha \otimes \bfitA \beta , M \^\alpha \beta \bfitA \alpha \otimes \bfitA \beta = N \^ \alpha \beta \bfitA \alpha \otimes \bfitA \beta , N (30) where A\alpha \beta (a\alpha \beta ) and A\alpha \beta (a\alpha \beta ) are the covariant and contra-variant components of the metric \^ \alpha \beta , tensors in the reference configuration (current configuration), see Appendix A. Here, M \^ \alpha \beta , N \^\alpha \beta and N \^ \alpha \beta are given by M \^ \cdot \bfitA \beta ; \^ \alpha \beta = \bfitA \alpha \cdot \bfitM M \^ \cdot \bfitA \beta ; \^\alpha \beta = \bfitA \alpha \cdot \bfitN N \^ \cdot \bfitA \beta , \^ \alpha \beta = \bfitA \alpha \cdot \bfitM M \^ \cdot \bfitA \beta . \^ \alpha \beta = \bfitA \alpha \cdot \bfitN N (31) In addition, C\mathrm{m} can be written as \alpha \beta \gamma \delta C\mathrm{m} := C\mathrm{m} \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta , (32) \alpha \beta \gamma \delta C\mathrm{m} = \bfitA \alpha \otimes \bfitA \beta : C\mathrm{m} : \bfitA \gamma \otimes \bfitA \delta . (33) \alpha \gamma \delta \beta where C\mathrm{m} is given by \alpha \beta \alpha \beta \gamma \delta S\mathrm{m} and C\mathrm{m} can be obtained analytically by substitution of Eq. (30) into Eqs. (24) and (26), and factorization of \bfitA \alpha \otimes \bfitA \beta and \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta . The 2.PK stress components S \alpha \beta are equal to the Kirchhoff stress components \tau \alpha \beta , as was shown in Sec. 2, Eq. (10). Likewise \alpha \beta \gamma \delta c\alpha \mathrm{m}\beta \gamma \delta = \bfita \alpha \otimes \bfita \beta : c\mathrm{m} : \bfita \gamma \otimes \bfita \delta = C\mathrm{m} , where c is the material tangent corresponding to \bfittau \alpha \beta and is used in the FE formulation of Duong et al. [53]. For \tau \mathrm{m} thus follows \biggl( \biggr) \Bigr) H2 1 H3 \Bigl( \alpha \beta \alpha \beta \alpha \gamma \delta \beta \alpha \beta \^ \alpha \beta , \^ \alpha \beta + a \^ N \tau \mathrm{m} = H1 a + 2 A a\gamma \delta A - tr (\bfitC )A (34) + a\bfitM \^ M \bfitN J 2 4J where tr (\bfitC ) can be written in curvilinear coordinates as tr (\bfitC ) = \bfitC : \bfitI = a\alpha \beta \bfitA \alpha \otimes \bfitA \beta : A\gamma \delta \bfitA \gamma \otimes \bfitA \delta = a\alpha \beta A\alpha \beta . (35) \alpha \beta The proposed relation for \tau \mathrm{m} is simpler and has lower computational cost then the one by Ghaffari et al. [1]. For the bending energy given in Eq. (22), the stress and moment components are derived in [1, 52], i.e. \tau \mathrm{b}\alpha \beta := 2 \Bigl[ \Bigr] \partial W\mathrm{b} = J c (2H 2 + \kappa )a\alpha \beta - 4c H b\alpha \beta , \partial a\alpha \beta (36) \partial W\mathrm{b} = c J b\alpha \beta . \partial b\alpha \beta (37) M0\alpha \beta := 8 Here, b\alpha \beta is the contra-variant components of the curvature tensor (see Appendix A). In addition, the elasticity tensors for bending are given as [52] \Bigl( \Bigr) \partial 2 W\mathrm{b} = caa a\alpha \beta a\gamma \delta + ca a\alpha \beta \gamma \delta + cbb b\alpha \beta b\gamma \delta + cab a\alpha \beta b\gamma \delta + b\alpha \beta a\gamma \delta , \partial a\alpha \beta \partial a\gamma \delta \partial 2 W\mathrm{b} := 2 = daa a\alpha \beta a\gamma \delta + da a\alpha \beta \gamma \delta + dab a\alpha \beta b\gamma \delta + dba b\alpha \beta a\gamma \delta , \partial a\alpha \beta \partial b\gamma \delta \partial 2 W\mathrm{b} := 2 = d\gamma \delta \alpha \beta , \partial b\alpha \beta \partial a\gamma \delta \partial 2 W\mathrm{b} := = fa a\alpha \beta \gamma \delta , \partial b\alpha \beta \partial b\gamma \delta c\alpha \mathrm{b} \beta \gamma \delta := 4 d\alpha \beta \gamma \delta e\alpha \beta \gamma \delta f \alpha \beta \gamma \delta with caa ca cbb cab daa da dab dba fa = = = = = = = = = \bigl( \bigr) - J\bigl( 14H 2 + c\kappa \bigr) , 2J - 6c H 2 + c \kappa , 4c J , cba = 4c J H , 4J c H , 4J c H , - J c , - 2J c , - J c . (38) (39) 4. Elementary model behavior In this section, the new material model and its FE implementation are verified by testing the behavior of a graphene sheet under uniaxial stretch and pure shear. The performance of the proposed metric model is investigated and compared with the logarithmic model (log model) of Ghaffari et al. [1]. For uniaxial stretch, the sheet is stretched in the armchair and zigzag direction and fixed in the perpendicular direction. The Cartesian components of the stresses in the pulled direction, \sigma 11 , and perpendicular direction, \sigma 22 , are presented in Figs. 2a and 2b for pulling along the armchair direction, and 3a and 3b for pulling in the zigzag direction. The new results are compared with Ghaffari et al. [1] for both parameter sets following from GGA and LDA, which are two approximations of density functional theory. The stresses are nonlinear and have a distinct maximum. The maximum stress is larger if it is stretched along the zigzag direction. Also the stiffness is higher in this direction. For pure shear, the sheet is pulled in one direction and compressed in the perpendicular direction. The Cartesian components of the stress in the pulled direction, \sigma 11 , and compressed direction, \sigma 22 , are presented in Figs. 4a and 4b for the GGA parameter set, and in Figs. 5a and 5b for the LDA parameter set. The stress in the pulled and compressed directions are monolithically increasing or decreasing. The boundary conditions and loads are discussed in more detail in Ghaffari et al. [1]. The results of the metric model for all tests in Figs. 2-5 are in excellent agreement with the log model of Ghaffari et al. [1]. The metric model has the same pure dilatation and bending strain energy density terms as the log model of Ghaffari et al. [1], so there is no need to verify pure dilatation and bending. 9 40 5 35 4 30 25 3 20 2 15 10 1 5 0 0 1 1.05 1.1 1.15 1.2 1.25 1 1.05 1.1 (\mathrm{a}) 1.15 1.2 1.25 (\mathrm{b}) Figure 2: Uniaxial stretch in the armchair direction: Comparison of the log model [1] and the metric model (proposed here): (a) Stress in the stretched direction; (b) stress in the perpendicular direction. The maximum relative error for \sigma 11 and \sigma 22 are 0.019 and 0.199 percent. 50 6 5 40 4 30 3 20 2 10 1 0 0 1 1.05 1.1 1.15 1.2 1.25 1 1.05 1.1 (\mathrm{a}) 1.15 1.2 1.25 (\mathrm{b}) Figure 3: Uniaxial stretch in the zigzag direction: Comparison of the log model [1] and the metric model (proposed here): (a) Stress in the stretched direction; (b) stress in the perpendicular direction. The maximum relative error for \sigma 11 and \sigma 22 are 0.019 and 0.194 percent. 35 0 30 -10 25 -20 20 15 -30 10 -40 5 0 -50 0 0.005 0.01 0.015 0 (\mathrm{a}) 0.005 0.01 0.015 (\mathrm{b}) Figure 4: Pure shear based on the GGA material parameters (see Tab. 2): Comparison of the log model [1] and the metric model (proposed here): (a) Stress in the pull direction; (b) stress in the compression direction. The maximum relative error for \sigma 11 and \sigma 22 are 0.35 and 0.42 percent. \theta denotes the direction of pulling relative to the armchair direction. 10 35 0 30 -10 25 -20 20 15 -30 10 -40 5 0 -50 0 0.005 0.01 0.015 0 (\mathrm{a}) 0.005 0.01 0.015 (\mathrm{b}) Figure 5: Pure shear based on the LDA material parameters (see Tab. 2): Comparison of the log model [1] and the metric model (proposed here): (a) Stress in the pull direction; (b) stress in the compression direction. The maximum relative error for \sigma 11 and \sigma 22 are 0.12 and 0.22 percent. \theta denotes the direction of pulling relative to the armchair direction. 5. Numerical examples In this section, the performance of the model is investigated by several examples. The examples are contact of a CNT and CNC with a Lennard-Jones wall and bending and twisting of CNTs and CNCs. Before applying these deformations, the CNT and CNC need to be relaxed, since they can contain residual stresses coming from the rolling of graphene. The strain energy and internal stresses of CNTs and CNCs are minimized initially, before applying the loading. In all examples, the buckling and post-buckling behavior of the structures is computed and the point of buckling can be either determined by examining the ratio of the membrane energy to the total energy or it can be determined from sharp variations in the reaction forces. The modified arc-length method of Ghaffari et al. [78] and a line-search [79, 59, 80, 81] are used to obtain convergence around the buckling point and capture the jump in the energy and force. The simulations will not converge without these methods even when using very small load steps. In the following examples the error is defined by error = \| q - q\mathrm{r}\mathrm{e}\mathrm{f} \| \| q\mathrm{r}\mathrm{e}\mathrm{f} \| (40) where q can be a force or an energy, and q\mathrm{r}\mathrm{e}\mathrm{f} is a corresponding reference value. For comparison of log and metric models, the log model is considered as q\mathrm{r}\mathrm{e}\mathrm{f} , and for other examples the metric model with the finest mesh is used as reference. 5.1. Carbon nanotubes CNT(n, m) can be generated by rolling a graphene sheet perpendicular to the lattice vector of (n, m), where n and m are the chirality parameters [29]. In this section, bending, twisting of CNTs and contact a CNT with a Lennard-Lones wall is considered, and their buckling and postbuckling behavior are simulated. The buckling point can be determined accurately by examining the ratio of the membrane energy to the total energy. At the bucking point membrane energy is converted to bending energy. These points have been obtained for bending and twisting of CNTs in Ghaffari et al. [1]. 11 5.1.1. CNT bending First, bending of a CNT is considered as shown in Fig. 6a. The end faces of the CNT are assumed to be rigid and remain planar, and the CNT is allowed to deform in the axial direction in order to avoid a net axial force. The bending angle \theta is applied at both faces of the CNT equally. The variation of the strain energy per atom with the bending angle is shown in Fig. 6b and compared with the results of the log model of Ghaffari et al. [1] for the perfect and imperfect structures. The imperfection is applied as a small torque8 in the middle of the CNT. The results of the metric and log models match perfectly. 0.06 0.05 0.04 0.03 0.02 0.01 0 0 5 10 15 20 25 30 35 (\mathrm{b}) (\mathrm{a}) Figure 6: CNT bending: (a) boundary conditions; (b) strain energy per atom. CNT(10,10) with the length 10 nm is selected. Using Eq. (40), the maximum error relative to the logarithmic model is 7.6500 \times 10 - 4 percent. 5.1.2. CNT twisting Next, twisting of a CNT is considered by applying a twisting angle at both faces of the CNT (Fig. 7a). The variation of the strain energy per atom with the twisting angle is shown in Fig. 7b and compared with the results of the log model. The results of the metric and log models match 0.3 0.25 0.2 0.15 0.1 0.05 0 0 (\mathrm{a}) 10 20 30 40 50 (\mathrm{b}) Figure 7: CNT twisting: (a) boundary conditions (length in the axially direction is fixed); (b) strain energy per atom. CNT(12,6) with the length 6.74 nm is used. The atomistic results are taken from Sun and Li [82]. Using Eq. (40), the maximum error relative to logarithmic model is 0.002 percent. 8 T = 2nN R where R is initial radius of the CNT. 12 100 10-2 102 (\mathrm{a}) 103 104 (\mathrm{b}) Figure 8: Contact of a CNT with a Lennard-Jones wall: (a) boundary conditions; (b) Error of the reaction force relative to the finest mesh (320 \times 120 quadratic NURBS elements). CNT(15,15) with the length 38.19 nm and the contact angle \theta \mathrm{w} = 17.45\circ is used. up to 0.002\%. 5.1.3. CNT contact Finally, the contact of a CNT with a Lennard-Jones wall is simulated. This is interesting, since a CNT can be used as a tip of an atomic force microscope (AFM). CNTs can have a set of discrete chiralities and radii so they can be mass-produced with a precise radius and length while silicon and silicon nitride tips can not be produced with an identical geometry [83]. This unique feature of CNT-based AFMs guarantees the reproducibility of measurements and experiments with different AFMs [84, 85, 86, 87, 88]. In addition, CNTs-based AFMs have a higher resolution relative to AFMs with silicon or silicon nitride tips [89]. However, the measurement with the AFM is not reliable after buckling and hence buckling should be avoided. A CNT with a larger radius is more stable, but the precision and resolution of the AFM decrease. Here we study contact and buckling of a CNT with a rigid wall using the setup shown in Fig. 8a. The wall is modeled with a coarse grained contact model (CGCM) [90, 91, 92, 93, 78]. Within this model, an equivalent half space potential is used at each contact point. This potential can be written as [1] \Biggl[ \biggl( \biggr) \biggl( \biggr) \Biggr] 3 h0 3 1 h0 9 \Psi (\mathrm{V}\mathrm{d}\mathrm{W})\mathrm{h} = - \Gamma - , (41) 2 r 2 r where h0 = 0.34 nm, \Gamma = 0.14 N/m and r are the equilibrium distance, the interfacial adhesion energy per unit area and the normal distance of a surface point to the wall. The wall is moved in the axial direction toward the CNT (during loading) and away from it (during unloading). The results converge with mesh refinement as the error plot based on Eq. (40) in Fig. 8b shows. Here q\mathrm{r}\mathrm{e}\mathrm{f} is the result from the finest mesh. The contact force is compared with the atomistic results of Schmidt et al. [94] in Fig. 9a. The reaction force is compared to an analytical solution (see Appendix D). The extremum of the axial and perpendicular forces are 1.21 nN and --0.38 nN, respectively. The CNT buckles during loading which leads to a sharp drop in the contact force. This discontinuity is captured by using the arc-length method of Ghaffari et al. [78] in conjugation with a line-search method. During unloading, the reaction force is different than during loading. Note that there are two instabilities 1. buckling / unbuckling (at point B \& C in Fig. 9b) 2. jump-to- / jump-off-contact (at point A \& D in Fig. 9b). The second is also common to other adhesive systems at small length scales [95, 96]. The deformed CNT is shown before and after buckling and jump-to / jump-off-contact in Fig. 10. 13 1.5 1.5 1 1 0.5 0.5 0 0 -0.5 -0.5 0 5 10 15 20 25 0 (\mathrm{a}) 5 10 15 20 25 (\mathrm{b}) Figure 9: Contact of a CNT with a the Lennard-Jones wall: Reaction force of the wall in the (a) undeformed axial direction of the CNT (b) normal direction of the wall. CNT(15,15) with the length 38.19 nm and the contact angle \theta \mathrm{w} = 17.45\circ is used. The atomistic results are taken from Schmidt et al. [94]\mathrm{a} . The atomistic simulation is conducted at finite temperature but thermal effects are not considered in the continuum model. The relation between axial force F\mathrm{A} and normal force F\mathrm{N} is F\mathrm{N} = F\mathrm{A} / cos(\theta \mathrm{w} ). The data between markers is continuous. \mathrm{a} The force unit in Schmidt et al. [94] should be nN instead of eV/\r A. Figure 10: Contact of a CNT with a Lennard-Jones wall: Deformed geometries during loading and unloading. 14 L θapex rtip (\mathrm{b}) (\mathrm{a}) (\mathrm{c}) Figure 11: CNC geometry and lattice: (a) CNC dimensions; (b) flat graphene sheet; (c) rolled graphene sheet. The armchair direction is shown by a blue line. 5.2. Carbon nanocones A CNC(\theta \mathrm{a}\mathrm{p}\mathrm{e}\mathrm{x} ) can be generated by rolling a sector of a graphene sheet. It is described with an apex angle \theta \mathrm{a}\mathrm{p}\mathrm{e}\mathrm{x} and length L (see Fig. 11a). A zigzag (or armchair) line can only be matched with another zigzag (or armchair) line to create a CNC (see Fig. 11b). A CNC can be generated from a sector of a graphene sheet which is cut with the declination angle d\theta 9 of 60\circ , 120\circ , 180\circ , 240\circ and 300\circ . Thus \theta \mathrm{a}\mathrm{p}\mathrm{e}\mathrm{x} can have the discrete values [29, 97] \theta \mathrm{a}\mathrm{p}\mathrm{e}\mathrm{x} = 2 arcsin(1 - d\theta /360) . (42) Similar to the preceding CNT examples, bending, twisting and wall contact of CNCs are considered in the following. It is seen that CNCs buckle without applying an imperfection due to the variation of the chirality along the different tangential coordinates. 5.2.1. CNC bending The first example considers CNC bending. The boundary conditions for CNC bending are shown in Fig. 12a. The end faces of the CNC are kept rigid and the bending angle is applied to them equally. The CNC can deform in the axial direction to avoid net axial loading. Fig. 12b demonstrates the FE convergence under mesh refinement by examining the error from Eq. (40), where q\mathrm{r}\mathrm{e}\mathrm{f} is the result from the finest mesh. The strain energy per atom and the ratio of the membrane energy to the total energy as a function of the bending angle are given in Figs. 13a and 13b. The structure buckles at two loading levels: At \theta = 3.48\circ the CNC buckles at the tip, and at \theta = 3.9\circ the CNC buckles at end. These buckling points can be precisely obtained from the ratio of the membrane energy to the total energy (see Fig. 13b). Fig. 14 shows the deformation and stress invariant tr (\bfitsigma \mathrm{K}\mathrm{L} ) = \bfitsigma \mathrm{K}\mathrm{L} : 1 following from Eq. (1) at different bending angles. 5.2.2. CNC twisting The second example considers CNC twisting. The boundary conditions of twisting are shown in Fig. 15a. The end faces of the CNC is kept rigid, the torsion angle is applied to them equally and its length is kept fix. Fig. 15b demonstrates the FE convergence under mesh refinement examining the error measure of Eq. (40). The strain energy per atom and the ratio of the 9 I.e. the angle of the removed sector. 15 Relative error of energy 101 100 10-1 10-2 10-3 3=2/ 3=6/ 3=12/ 10-4 102 103 104 Number of elements (\mathrm{b}) (\mathrm{a}) Figure 12: CNC bending: (a) boundary conditions; (b) Error of strain energy relative to the finest mesh (using 120 \times 120 quadratic NURBS elements). CNC(19.2\circ ) with the length and tip radius 12.04 nm and 1 nm is used. 0.014 1 0.012 0.9 0.01 0.8 0.008 0.7 0.006 0.6 0.004 0.5 0.002 0.4 0 0.3 0 2 4 6 8 10 0 12 (\mathrm{a}) 2 4 6 8 10 12 (\mathrm{b}) Figure 13: CNC bending: (a) Comparison of strain energy per atom with reference quasi-continuum results of Yan et al. [36]; (b) the ratio of the membrane energy to the total energy. CNC(19.2\circ ) with the length and tip radius 12.04 nm and 1 nm is used. (a) (b) (c) (d) (e) (f) Figure 14: CNC bending: Comparison of tr (\bfitsigma \mathrm{K}\mathrm{L} ) [N/m] at the bending angles (a) \theta = 2\circ , (b) \theta = 3.5\circ , (c) \theta = 4\circ and (d) \theta = 6\circ , (e) \theta = 8\circ , (f) \theta = 12\circ . CNC(19.2\circ ) with the length and tip radius 12.04 nm and 1 nm is used. 16 Relative error of energy 100 10-1 10-2 10-3 3=2/ 3=4/ 10-4 102 103 104 105 Number of elements (\mathrm{b}) (\mathrm{a}) Figure 15: CNC twisting: (a) boundary conditions; (b) Error of strain energy relative to the finest mesh (using 180 \times 180 quadratic NURBS elements). CNC(19.2\circ ) with the length and tip radius 12.04 nm and 1 nm is used. 0.07 1 0.06 0.9 0.05 0.8 0.04 0.03 0.7 0.02 0.6 0.01 0 0.5 0 5 10 15 20 25 30 0 (\mathrm{a}) 5 10 15 20 25 30 (\mathrm{b}) Figure 16: CNC twisting: (a) Strain energy per atom; (b) the ratio of the membrane energy to the total energy. CNC(19.2\circ ) with the length and tip radius 12.04 nm and 1 nm is used. membrane energy to the total energy as a function of the twisting angle are given in Figs. 16a and 16b. Two stable paths are shown after the second buckling point and the path with the lower level of energy is more favorable (see Wriggers [81] for a discussion of bifurcation). The deformation follows one of the two paths depending on the load step and arclength parameter. Thermal fluctuations at finite temperatures should be sufficient to provide the model with enough energy to overcome the energy barrier between the two paths and go from the higher energy level to the lower one. The structure buckles around \theta = 7\circ and \theta = 9.85\circ , and these points can be precisely obtained from the ratio of the membrane energy to the total energy (see Fig. 16b). tr (\bfitsigma \mathrm{K} ) is shown at different twisting angles in side and front views in Figs. 17 and 18, respectively. The buckling geometry has rotational symmetry of 180\circ at low twisting angle (below \theta = 10\circ ) and 120\circ at high twisting angle (above \theta = 10\circ ) (see Fig. 18c-d). 5.2.3. CNC contact CNTs are good candidates for AFM tips, but they buckle fast due to their high aspect ratio. Therefore, CNCs are better candidates for AFM tips [98, 99]. To illustrate this point, contact between a CNC and a rigid wall is considered here. In order to compare CNC and CNT, the length and tip radius r\mathrm{t}\mathrm{i}\mathrm{p} of the CNC are selected such that they are equal to the length and 17 (a) (b) (c) (d) (e) (f) Figure 17: CNC twisting: Comparison of tr(\bfitsigma \mathrm{K}\mathrm{L} ) [N/m] at the twisting angles (side view) (a) \theta = 4\circ , (b) \theta = 7.5\circ , (c) \theta = 9\circ and (d) \theta = 15\circ , (e) \theta = 20\circ , (f) \theta = 28.35\circ . CNC(19.2\circ ) with the length 12.04 nm is used. (a) (b) (c) (d) (e) (f) Figure 18: CNC twisting: Comparison of tr(\bfitsigma \mathrm{K}\mathrm{L} ) [N/m] at the twisting angles (front view) (a) \theta = 4\circ , (b) \theta = 7.5\circ , (c) \theta = 9\circ and (d) \theta = 15\circ , (e) \theta = 20\circ , (f) \theta = 28.35\circ . CNC(19.2\circ ) with the length and tip radius 12.04 nm and 1 nm is used. 18 (\mathrm{a}) (\mathrm{b}) Figure 19: Contact of a CNC with a Lennard-Jones wall: (a) boundary conditions; (b) deformed geometry colored with tr(\bfitsigma \mathrm{K}\mathrm{L} ) [N/m]. CNC(38.94\circ ) with the length 38.19 nm and the contact angle \theta \mathrm{w} = 17.45\circ are used. 25 20 15 10 5 0 -5 0 1 2 3 4 5 6 7 Figure 20: Contact of a CNC with a Lennard-Jones wall: Normal contact force of the wall. CNC(38.94\circ ) with the length 38.19 nm, \theta \mathrm{w} = 17.45\circ , and 250 \times 150 quadratic NURBS elements is used. The data between markers is continuous. radius of the CNT used before. In this case they would be able to measure with the same resolution. The boundary conditions and the deformed geometry of the CNC are shown in Figs. 19a and 19b, respectively. The CNC is simply supported and the wall is rigid and moves in the axial direction of the CNC. The normal contact force is given in Fig. 20. It reaches about 23.41 nN at the buckling point. The buckling force of the CNC is several times larger than the buckling force of the CNT (see Tab. 4). The contact force decreases sharply after the buckling point. Then, it decreases smoothly to a local minimum and begins to increase after that minimum. The buckling force of the CNC is 18.44 times larger than for the CNT. Normal contact force [nN] CNT 1.27 CNCs 23.40 Table 4: Comparison of the buckling force for the CNT and CNC considered in Secs. 5.1.3 and 5.2.3 (see Fig. 9 and Fig. 20), respectively. 6. Conclusion A new hyperelastic material model is proposed for graphene-based structures. The symmetry group and the structural tensor of graphene are used to obtain a set of invariants. These 19 invariants are directly based on the right surface Cauchy-Green deformation tensor \bfitC , so its derivatives with respect to \bfitC can be taken easily. The first and second invariants capture pure dilatation and shear, while the third one captures anisotropic behavior. This model is based on existing quantum data [75, 2]. The speedup of the model is 1.5 compared to the earlier model of Ghaffari et al. [1]. Further, it is simpler to implement than the model of Ghaffari et al. [1]. The material model is formulated such that it can be easily implemented within the rotation-free isogeometric shell formulation of Duong et al. [53]. The elementary behavior of the new model is validated by uniaxial tension and pure shear tests. The strain energy of CNTs and CNCs under bending and twisting are computed. The buckling points are calculated by examining the ratio of membrane energy to total energy. The postbuckling behavior of CNTs and CNCs are simulated. The modified arclength method of Ghaffari et al. [78] and a line search method are used to obtain convergence, and the finite element formulation fails to converge for some of the examples without these methods. CNCs buckle even without applying an imperfection due to inherent anisotropy along the different tangential coordinates. CNTs and CNCs can be used for an atomic force microscope (AFM) tip. Contact of a CNT and CNC with a Lennard-Jones wall is simulated. The reaction forces are computed and it is shown that loading and unloading paths are different for contact of the CNT with the Lennard-Jones wall. A CNT and CNC with the same tip radius are selected so they would have the same measurement precision. It is shown that the buckling force of the CNC is 18.44 times larger than the buckling force of the CNT. Hence, CNCs are much better candidates for AFM tips than CNTs. Acknowledgment Financial support from the German Research Foundation (DFG) through grant GSC 111 is gratefully acknowledged. Appendix A. Kinematics of deforming surfaces Here, the curvilinear description of deforming surfaces is summarized following [52]. The surface in the reference and the current configuration can be written as \bfitX = \bfitX (\xi \alpha ) , (A.1) \bfitx = \bfitx (\xi \alpha ) , (A.2) where \xi \alpha (\alpha = 1, 2) are the parametric coordinates. The tangent vectors of the reference and current configuration are \partial \bfitX \bfitA \alpha = \alpha , (A.3) \partial \xi \bfita \alpha = \partial \bfitx . \partial \xi \alpha (A.4) The co-variant components of the metric tensors are defined by using the inner product as A\alpha \beta = \bfitA \alpha \cdot \bfitA \beta , (A.5) a\alpha \beta = \bfita \alpha \cdot \bfita \beta . (A.6) The contra-variant components of the metric tensors are defined as [A\alpha \beta ] = [A\alpha \beta ] - 1 , 20 (A.7) [a\alpha \beta ] = [a\alpha \beta ] - 1 . (A.8) The dual tangent vectors can then be defined as \bfitA \alpha := A\alpha \beta \bfitA \beta , (A.9) \bfita \alpha := a\alpha \beta \bfita \beta . (A.10) The normal unit vector of the surface in the reference and current configuration can be obtained by using the cross product of the tangent vectors as \bfitN = \bfitA 1 \times \bfitA 2 , \| \bfitA 1 \times \bfitA 2 \| (A.11) \bfitn = \bfita 1 \times \bfita 2 . \| \bfita 1 \times \bfita 2 \| (A.12) The 3D identity tensor 1 can be then written as 1 = \bfitI + \bfitN \otimes \bfitN = \bfiti + \bfitn \otimes \bfitn , (A.13) where \bfitI and \bfiti are the surface identity tensor in the reference and current configuration. They are (A.14) \bfitI = \bfitA \alpha \otimes \bfitA \alpha = A\alpha \beta \bfitA \alpha \otimes \bfitA \beta = A\alpha \beta \bfitA \alpha \otimes \bfitA \beta , \bfiti = \bfita \alpha \otimes \bfita \alpha = a\alpha \beta \bfita \alpha \otimes \bfita \beta = a\alpha \beta \bfita \alpha \otimes \bfita \beta . (A.15) The co-variant components of the curvature tensor are defined as b\alpha \beta := \bfitn \cdot \bfita \alpha ,\beta = \bfitn \cdot \bfita \alpha ;\beta , (A.16) where \bfita \alpha ,\beta and \bfita \alpha ;\beta are the parametric and co-variant derivatives of the tangent vectors. They are connected by \bfita \alpha ;\beta = \bfita \alpha ,\beta - \Gamma \gamma \alpha \beta \bfita \gamma , (A.17) where \Gamma \gamma \alpha \beta is the Christoffel symbol of the second kind. It is defined as \Gamma \gamma \alpha \beta := \bfita \alpha ,\beta \cdot \bfita \gamma . (A.18) The mixed and contra-variant components of the curvature tensor, b\beta \alpha and b\alpha \beta , are defined as b\beta \alpha = b\alpha \gamma a\gamma \beta , (A.19) b\alpha \beta := a\alpha \gamma b\gamma \delta a\delta \beta . The mean and Gaussian curvatures are defined as 1 1 H := b\alpha \alpha = (\kappa 1 + \kappa 2 ) , 2 2 \kappa := det[b\alpha \beta ] = \kappa 1 \kappa 2 , det[a\gamma \delta ] \Bigl[ \Bigr] where \kappa \alpha are the principal curvatures that follow as the eigenvalues of matrix b\beta \alpha . 21 (A.20) (A.21) Appendix B. Symmetry group and material invariants In this section, the structural tensor for structures with n-fold rotational symmetry are reviewed. Two set of invariants are introduced by using the introduced structural tensor. They are based on the logarithmic strain tensor, which is proposed by Kumar and Parks [2], and a new set based on the right Cauchy-Green deformation tensor. B.1. Structural tensor of Cnv A 2D structure can be modeled based on its lattice structure and symmetry group. A symmetry group is a certain type of operations that leave the lattice indistinguishable from its initial configuration [100]. The usual operations are identity mapping, inversion, rotation and reflection. They can be used to formulate structural tensors for the modeling of anisotropic materials [47]. The structural tensor of a lattice with symmetry group of n-fold rotational symmetry and additional reflection plane Cnv are given as [47] \left\{ \biggl[ \Bigl( \Bigr) (m) \biggr] \^ \^ \Re \bfitM + i\bfitN ; n = 2m , \bigl[ \bigr] (n) Hn := \Re (\^ \bfitx + i\^ \bfity ) = (B.1) \biggl[ \Bigl( \Bigr) (m) \biggr] \^ \^ \Re (\^ \bfitx + i\^ \bfity ) \otimes \bfitM + i\bfitN ; n = 2m + 1 , \^ and \bfity \^ are two orthonormal vectors (see Fig. 1) and at least one of them is in the crystal where \bfitx symmetry plane, i is the imaginary unit number, (\bullet )(n) := (\bullet ) \otimes (\bullet )...(\bullet ) is the tensor product \^ and \bfitN \^ are of n times, m is a integer number, \Re indicates real part of its argument, and \bfitM defined as \^ := \bfitx \^ \otimes \bfitx \^ - \bfity \^ \otimes \bfity \^ , \bfitM (B.2) \^ := \bfitx \^ \otimes \bfity \^ + \bfity \^ \otimes \bfitx \^ . \bfitN Graphene has a hexagonal lattice and its structure repeats after 60\circ of rotation. This lattice relates to the symmetry group of Cnv and has 14 symmetry operations which are an identity \^ taken in the armchair direction mapping, an inversion, six mirror planes and six rotations. \bfitx \^ and \bfity \^ can be transformed to \bfitx \^ \diamond and \bfity \^ \diamond by (see Fig. 1) and n = 6 for graphene. Directions of \bfitx a rotation of \theta in the counter-clock-wise direction such that \^ \diamond + i \bfity \^ \diamond \bfitx \^ , = e - i \theta (\^ x + i y) \Bigl( \Bigr) \^ \diamond + i \bfitN \^ \diamond = e - 2 i \theta \bfitM \^ + i \bfitN \^ , \bfitM \Bigl[ \Bigl( \Bigr) \Bigr] \^ \^ \^ \^ \^ \^ \^ \^ \^ \^ \^ \^ Hn = \bfitM \otimes \bfitM \otimes \bfitM - \bfitM \otimes \bfitN \otimes \bfitN + \bfitN \otimes \bfitM \otimes \bfitN + \bfitN \otimes \bfitN \otimes \bfitM \Bigl[ \Bigr] = \Re ei n \theta (\^ \bfitx \diamond + i\^ \bfity \diamond )(n) . (B.3) 3 3 The invariants a symmetric surface tensor of rank 2 \bfitA \in R \times R can be written as [47, 48] \vdash = tr (\bfitA ) , \scrJ 1\bfitA 1 \bigl( \bigr) \vdash \scrJ \=2\bfitA = tr \bfitA 2 , 2 \bigr) 1 \bfitA 1 \bigl( \vdash \scrJ 3\bfitA = tr \Pi \bfitA n \bfitA = \Pi n : \bfitA , 8 8 where \Pi \bfitA n is defined as \Bigl( \diamond \Bigl[ \Bigr) \Bigr] m - 1 \Re ei n \theta +i (m - 1) \theta \bfitA \bfitM \^ + i \bfitN \^ \diamond \Pi \bfitA with n = 2m , m = 1, 2, 3, ... , n := A 22 (B.4) (B.5) and \theta \bfitA and A can be obtained from \Bigl[ \Bigr] \^ \diamond + sin(\theta \bfitA )\bfitN \^ \diamond . 2\bfitA = tr (\bfitA ) \bfitI + A cos(\theta \bfitA ) \bfitM (B.6) \theta \bfitA and A can be easily obtained by using the spectral decomposition of \bfitA , i.e \bfitA = 2 \sum \lambda \alpha \bfitA \bfitY \alpha \bfitA \otimes \bfitY \alpha \bfitA , (B.7) \alpha =1 \^ \diamond and where \lambda \alpha \bfitA and \bfitY \alpha \bfitA are the eigenvalues and eigenvectors of \bfitA . If \theta selected such that \bfitx \bfitY 1\bfitA are in the same direction, then A = \lambda 1\bfitA - \lambda 2\bfitA ; (\lambda 1\bfitA > \lambda 2\bfitA ) and \theta \bfitA = 0. B.2. Invariants based on the logarithmic strain The logarithmic strain is a good candidate for the development of material models. It can be used to additively decompose finite strains into volumetric/deviatoric and elastic/plastic strains. This additive decomposition simplifies the formulation of constitutive laws. In addition, it can capture micro-mechanical behavior of materials very good [101, 102, 103, 104]. Using Eq. (B.4), the invariant of the logarithmic strain \bfitE (0) = ln(\bfitU ) can be obtained by taking \bfitA = \bfitE (0) as \Bigl( \Bigr) \scrJ 1\bfitE (0) = tr \bfitE (0) = ln(\lambda 1 \lambda 2 ) = ln(J) , \biggl( \Bigl( \biggr) \biggl( \biggr) \Bigr) 2 \biggr) 1 \biggl( 1 1 1 (0) (0) \vdash (0) \scrJ 2\bfitE (0) = tr \bfitE = ln(J)\bfitI + \bfitE \mathrm{d}\mathrm{e}\mathrm{v} : ln(J)\bfitI + \bfitE \mathrm{d}\mathrm{e}\mathrm{v} 2 2 2 2 (B.8) 1 (0) 1 (0) = ln(J) + \bfitE \mathrm{d}\mathrm{e}\mathrm{v} : \bfitE \mathrm{d}\mathrm{e}\mathrm{v} , 4 2 \biggl( \biggl( \biggr) \biggr) 3 1 \Bigl( (0) (0) (0) \Bigr) \Bigl( (0) \Bigr) 3 \lambda 1 \scrJ 3\bfitE (0) = H \bfitE , \bfitE , \bfitE = E cos(6\theta ) = ln cos(6\theta ) , 8 \lambda 2 (0) where \lambda \alpha are the eigenvalues of the surface stretch tensor and \bfitE \mathrm{d}\mathrm{e}\mathrm{v} = \bfitE (0) - 1/2 ln(J)\bfitI is deviatoric part of the strain. These set of invariants can be simplified by eliminating the first invariant from the second invariant as \scrJ 1\bfitE (0) = ln(J) , 1 (0) (0) \scrJ 2\bfitE (0) = \bfitE \mathrm{d}\mathrm{e}\mathrm{v} : \bfitE \mathrm{d}\mathrm{e}\mathrm{v} = (ln(\lambda ))2 , 2 \Bigl( \Bigr) 1 \scrJ 3\bfitE (0) = H \bfitE (0) , \bfitE (0) , \bfitE (0) = (ln(\lambda ))3 cos(6\theta ) , 8 \sqrt{} with \lambda = (B.9) \lambda 1 ; \lambda 1 > \lambda 2 . \lambda 2 B.3. Invariant based on the right Cauchy-Green tensor The logarithmic strain facilitates the development of material models and strain energy densities. But for the classical numerical description and FE implementation, derivatives of the strain energy density with respect to \bfitC are needed. So, the chain rule should be utilized for material models based on \bfitE (0) . The first and second derivative are the stress and elasticity tensor. These tensors can be directly obtained for isotropic materials which are developed based on 23 \bfitE (0) without using the chain rule [59], but it is not the case for anisotropic materials. Using Eq. (B.4), a set of invariants based on \bfitC can be written as \vdash \scrJ 1\bfitC = tr (\bfitC ) , \bigr) 1 1 \bigl( 2 \Lambda 1 + \Lambda 22 , \bfitC : \bfitC = 2 2 1 1 = H(\bfitC , \bfitC , \bfitC ) = (\Lambda 1 - \Lambda 2 )3 cos(6\theta ) . 8 8 \vdash \scrJ 2\bfitC = \vdash \scrJ 3\bfitC (B.10) The material model will be simplified by using a set of invariants which correspond to volumetric and deviatoric deformations. So, J is assumed to be an additional invariant and the set of invariants will be \vdash \= , \scrJ \=1\bfitC = tr (\bfitC ) \biggl( \biggr) 1 \= \= 1 \Lambda 1 \Lambda 2 \vdash \scrJ \=2\bfitC = \bfitC + , : \bfitC = 2 2 \Lambda 2 \biggl( \Lambda 1 (B.11) \biggr) 3 1 \lambda \lambda 1 1 2 \vdash \= \bfitC , \= \bfitC ) \= = \scrJ \=3\bfitC = H(\bfitC , - cos(6\theta ) , 8 8 \lambda 2 \lambda 1 \vdash = J , \scrJ \=4\bfitC \= is deviatoric part of \bfitC which is defined based on the deviatoric deformation gradient where \bfitC \= \bfitF (see Eq. (16)). The material model will be more simple, if the set of the invariants are \vdash can be written based on \scrJ \=\vdash as irreducible. \scrJ \=1\bfitC 2\bfitC \vdash )2 = 1 \scrJ \=\vdash + 2 . (\scrJ \=1\bfitC 2 2\bfitC (B.12) \vdash is dependent on \scrJ \=\vdash and can be excluded from the list of invariants. In addition, \scrJ \= So, \scrJ \=1\bfitC 2\bfitC 2\bfitC can be written as \vdash = 2\scrJ \scrJ \=2\bfitC (B.13) 2\bfitC + 1 , where \scrJ 2\bfitC andthe final form of the other invariants are given in Eq. (15). B.4. Invariant based on the right Cauchy-Green and curvature tensors A surface can be described by the first and second fundamental forms of the surface which are the metric and curvature tensors. Hence, the curvature tensor \bfitkappa can be considered as the second tensorial object next to \bfitC . A set of nine invariants based on \bfitC and \bfitkappa can be obtained 24 as \scrJ 1\bfitC = \scrJ 2\bfitC = \scrJ 3\bfitC \scrJ 4\bfitkappa \scrJ 5\bfitkappa \scrJ 6\bfitkappa \sqrt{} det(\bfitC ) = J , 1 \= \bot \= \bot \bfitC : \bfitC , 2 \biggl( \biggr) 1 \bigl( \= \= \= \bigr) 1 \lambda 1 \lambda 2 3 - cos(6\varphi \bfitC ) , = H \bfitC , \bfitC , \bfitC = 8 8 \lambda 2 \lambda 1 1 = tr (\bfitkappa ) = H , 2 = \kappa , = \scrJ 7\bfitC \bfitkappa = \scrJ 8\bfitC \bfitkappa = \scrJ 9\bfitC \bfitkappa = (B.14) 1 1 H(\bfitkappa , \bfitkappa , \bfitkappa ) = (\kappa 1 - \kappa 2 )3 cos(6\varphi \bfitkappa ) , 8 8 1 \= \bfitC : \bfitkappa , 2 \biggl( \biggr) 1 \bigl( \= \= \bigr) 1 \lambda 1 \lambda 2 2 - H \bfitC , \bfitC , \bfitkappa = (\kappa 1 - \kappa 2 ) cos(4\varphi \bfitC + 2\varphi \bfitkappa ) , 8 8 \biggl( \lambda 2 \lambda 1\biggr) \bigr) 1 \bigl( \= = 1 \lambda 1 - \lambda 2 (\kappa 1 - \kappa 2 )2 cos(2\varphi \bfitC + 4\varphi \bfitkappa ) , H \bfitkappa , \bfitkappa , \bfitC 8 8 \lambda 2 \lambda 1 where H and \kappa are the mean and Gaussian curvatures and \kappa \alpha are the eigenvalues of the curvature tensor such that \kappa 1 > \kappa 2 . \varphi \bfitC and \varphi \bfitkappa are the angles between the eigenvectors of \bfitC and \bfitkappa \^ and are defined as relative to \bfitx \^ \cdot \bfitY 1\bfitkappa , cos(\varphi \bfitkappa ) := \bfitx \^ \cdot \bfitY 1\bfitC , cos(\varphi \bfitC ) := \bfitx (B.15) where \bfitY 1\bfitkappa and \bfitY 1\bfitC are the eigenvectors of \bfitC and \bfitkappa corresponding to the largest eigenvalue. In the current model, the bending energy is assumed to be isotropic. Appendix C. Various derivatives The derivatives of the invariants of \bfitC = \bfitF \mathrm{T} \bfitF can be written as \partial \scrJ 1\bfitC 1 = J \bfitC - 1 , \partial \bfitC 2 \partial \scrJ 2\bfitC 1 \= \bot \bot = \bfitC - \scrJ 2\bfitC \bfitC - 1 , \partial \bfitC J \Bigr] \partial \scrJ 3\bfitC 3 1 \Bigl[ \^ \^ = - \scrJ 3\bfitC \bfitC - 1 + a\bfitM \^ \bfitM + a\bfitN \^ \bfitN , \partial \bfitC 2 8J (C.1) and derivative of strain energy density as \partial W \varepsilon 2 = \alpha \^ ln(J)e - \alpha \^ \mathrm{l}\mathrm{n}(J) + 2\mu \prime f1 + \eta \prime f2 , \partial \scrJ 1\bfitC J \partial W = 2\mu (e1 - 2e2 \scrJ 2c ) - g2 \eta \scrJ 3c , \partial \scrJ 2\bfitC \partial W = \eta (g1 - g2 \scrJ 2c ) , \partial \scrJ 3\bfitC (C.2) where \mu \prime and \eta \prime are \^ \mu \prime := - \mu 1 \beta \^ J \beta - 1 , \eta 1 \eta \prime := - 2 ln(J) . J 25 (C.3) Hi are needed in the computation of the 2.PK stress and its corresponding elasticity tensor, see Eqs. (25) and (26). They are defined as \^ H1 := \varepsilon \alpha \^ 2 ln(J) e - \alpha \^ \mathrm{l}\mathrm{n}(J) - 2\mu 1 \beta \^ J \beta f1 - 2\eta 1 ln(J) f2 - H2 \scrJ 2\bfitC - 3H3 \scrJ 3\bfitC , H2 := 2 (2\mu (e1 - 2e2 \scrJ 2\bfitC ) - g2 \eta \scrJ 3\bfitC ) , (C.4) H3 := \eta (g1 - g2 \scrJ 2\bfitC ) , and their derivatives w.r.t. the invariants of \bfitC are \partial H1 \varepsilon \alpha \^ 2 \eta 1 \partial H2 \partial H3 \^ = (1 - \alpha \^ ln(J)) e - \alpha \^ \mathrm{l}\mathrm{n}(J) - 2\mu 1 \beta \^2 J \beta - 1 f1 - 2 f2 - \scrJ 2\bfitC - 3 \scrJ 3\bfitC , \partial \scrJ 1\bfitC J J \partial \scrJ 1\bfitC \partial \scrJ 1\bfitC \Bigl[ \Bigl( \Bigr] \Bigr) \partial H2 g2 \eta 1 \^ = 2 2 - \mu 1 \beta \^ J \beta - 1 (e1 - 2 e2 \scrJ 2\bfitC ) + 2 ln(J) \scrJ 3\bfitC , \partial \scrJ 1\bfitC J \partial H3 \eta 1 = - 2 ln(J) (g1 - g2 \scrJ 2\bfitC ) , \partial \scrJ 1\bfitC J (C.5) \partial H1 \partial H3 \partial H2 \^ = - 2\mu 1 \beta \^ J \beta (e1 - 2 e2 \scrJ 2\bfitC ) + 2g2 \eta 1 ln(J) \scrJ 3\bfitC - H2 - \scrJ 2\bfitC - 3\scrJ 3\bfitC , \partial \scrJ 2 \partial \scrJ 2\bfitC \partial \scrJ 2\bfitC \partial H2 = - 8\mu e2 , \partial \scrJ 2\bfitC \partial H3 = - \eta g2 , \partial \scrJ 2\bfitC (C.6) \partial H1 \partial H2 = - 2\eta 1 (g1 - g2 \scrJ 2\bfitC ) ln(J) - \scrJ 2\bfitC - 3 H3 , \partial \scrJ 3\bfitC \partial \scrJ 3\bfitC \partial H2 = - 2g2 \eta . \partial \scrJ 3\bfitC (C.7) - 1 \= \bot w.r.t \bfitC are and \bfitC Furthermore, a\bfitM \^ and their derivatives, and derivative of \bfitC \^ and a\bfitN needed in the computation of the 2.PK stress and its elasticity tensor. They are \biggl[ \Bigl( \Bigr) 2 \Bigl( \Bigr) 2 \biggr] \^ \= \^ \= a\bfitM \bfitM : \bfitC - \bfitN : \bfitC , \^ = 3 (C.8) \Bigl[ \Bigl( \Bigr) \Bigl( \Bigr) \Bigr] \^ \= \^ \= a\bfitN \bfitM : \bfitC \bfitN : \bfitC , \^ = - 6 and \Bigl( \Bigr) \Bigr] \partial a\bfitM 6 \Bigl[ \Bigl( \^ \= \Bigr) \^ \^ \^ : \bfitC \= \bfitN \^ - a \^ \bfitC - 1 , = \bfitM : \bfitC \bfitM - \bfitN \bfitM \partial \bfitC J \Bigl( \Bigr) \Bigr] \partial a\bfitN 6 \Bigl[ \Bigl( \^ \= \Bigr) \^ \^ \^ : \bfitC \= \bfitM \^ - a \^ \bfitC - 1 . = - \bfitM : \bfitC \bfitN + \bfitN \bfitN \partial \bfitC J (C.9) 1 \partial \bfitC - 1 = - (\bfitI \otimes \bfitI + \bfitI \boxtimes \bfitI ) , \oplus \partial \bfitC 2 \bot \= \partial \bfitC 1 \= \bot 1 = - \bfitC \oplus \bfitC - 1 + (\bfitI \otimes \bfitI + \bfitI \boxtimes \bfitI - \bfitI \oplus \bfitI ) , \oplus \partial \bfitC 2 2J (C.10) 26 where \partial \^ \bullet / \oplus \partial \^\bullet is defined as \partial \bfitA \partial A\alpha \beta := \bfitA \alpha \otimes \bfitA \gamma \otimes \bfitA \delta \otimes \bfitA \beta . \oplus \partial \bfitB \partial B\gamma \delta (C.11) The chain rule of Kintzel and Baar [76] and Kintzel [77] simplifies and expedites the derivation of elasticity tensors. They define the elasticity tensor (related to the membrane strain energy density) as \partial 2 W\mathrm{m} \partial 2 W\mathrm{m} (C.12) C\mathrm{L}\mathrm{m} := = \bfitA \alpha \otimes \bfitA \gamma \otimes \bfitA \delta \otimes \bfitA \beta , \partial \bfitC \oplus \partial \bfitC \partial C\alpha \beta \partial C\gamma \delta which, for the proposed membrane strain energy density, is \biggl\{ \biggl( \biggr) J \partial H1 \partial H1 1 \partial H2 \= \bot \partial H1 3 \mathrm{L} \= \bot C\mathrm{m} = 2 \bfitC - 1 \oplus \bfitC - 1 + 2 - \scrJ 2\bfitC - \scrJ 3\bfitC \bfitC \oplus \bfitC 2 \partial \scrJ 1\bfitC \partial \scrJ 2\bfitC 2 \partial \scrJ 3\bfitC J \partial \scrJ 2 \Bigr] \mathrm{S} \bigr] \mathrm{S} 1 \partial H1 \bigl[ - 1 1 \partial H3 \Bigl[ 2 \partial H1 \Bigl[ - 1 \= \bot \Bigr] \mathrm{S} \= \bot \bfitC \oplus \bfitC + \bfitC \oplus \bfitZ + 2 \bfitZ \oplus \bfitC + J \partial \scrJ 2 4J \partial \scrJ 3 2J \partial \scrJ 2 1 H2 - H1 (\bfitC - 1 \otimes \bfitC - 1 + \bfitC - 1 \boxtimes \bfitC - 1 ) + 2 (\bfitI \otimes \bfitI + \bfitI \boxtimes \bfitI - \bfitI \oplus \bfitI ) 2 2J \Bigl[ \Bigr] \biggr\} 3H3 \^ \= \^ \^ \^ \^ \^ \= \^ \^ \^ \^ + (\bfitM : \bfitC ) (\bfitM \oplus \bfitM - \bfitN \oplus \bfitN ) - (\bfitN : \bfitC )(\bfitM \oplus \bfitN + \bfitN \oplus \bfitM ) , 2J 2 (C.13) with \^ \^ \bfitZ := a\bfitM \^ \bfitM + a\bfitN \^ \bfitN , (\bfitA \oplus \bfitB )\mathrm{S} := 1 (\bfitA \oplus \bfitB + \bfitB \oplus \bfitA ) . 2 (C.14) (C.15) The components of C\mathrm{L}\mathrm{m} should be rearranged for a FE implementation (see Kintzel and Baar [76] and Kintzel [77]). This rearrangement can be written as \bigl( \bigr) \mathrm{R} \bigl( \mathrm{L} \alpha \beta \gamma \delta \bigr) \mathrm{R} \mathrm{L} \alpha \gamma \delta \beta C\mathrm{m} := C\mathrm{L}\mathrm{m} = C\mathrm{m} \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta = C\mathrm{m} \bfitA \alpha \otimes \bfitA \beta \otimes \bfitA \gamma \otimes \bfitA \delta , (C.16) \mathrm{L} \alpha \gamma \delta \beta can be written as where C\mathrm{m} \mathrm{L} \alpha \gamma \delta \beta C\mathrm{m} = \bfitA \alpha \otimes \bfitA \beta : C\mathrm{m} : \bfitA \gamma \otimes \bfitA \delta . (C.17) This rearrangement can be written for two second order tensors of \bfitA and \bfitB as (\bfitA \oplus \bfitB )\mathrm{R} = \bfitA \otimes \bfitB , (\bfitA \otimes \bfitB )\mathrm{R} = \bfitA \boxtimes \bfitB \mathrm{T} , (\bfitA \boxtimes \bfitB )\mathrm{R} = \bfitA \oplus \bfitB \mathrm{T} , \bigl[ \mathrm{R} \bigr] \mathrm{L} \bigl[ \mathrm{L} \bigr] \mathrm{R} (\bullet ) = (\bullet ) = (\bullet ) . (C.18) Appendix D. Analytical solution of a cylindrical thin beam An analytical solution based on linear Euler--Bernoulli beam theory of thin structures is given in this section. The considered beam is a hollow cylinder with inner and outer radii, thickness and length of r\mathrm{i} and r\mathrm{o} , t and L, respectively. The polar moment of inertia of a thin ring is 3 I\~\mathrm{p} = 2\pi r\mathrm{m} t, 27 (D.1) where r\mathrm{m} is r\mathrm{i} + r\mathrm{o} . 2 Exploiting the symmetry, the moment of inertia is r\mathrm{m} = I\~\mathrm{p} 3 I\~w = = \pi r\mathrm{m} t. 2 (D.2) (D.3) The analytical solution for a cantilever beam with a concentrate force Fw at its tip can be written as [105] \~ I\~w 3E (D.4) Fw = w, L3 \~ is 3D elastic modulus with unit of N/m2 . The current material model is formulated where E based on the unit of length and there is no thickness. The 2D elastic modulus E [2] and moment of inertia Iw can be written as \~ t , E = E (D.5) 3 I\mathrm{y} = \pi r\mathrm{m} . w and the axial displacement of the wall can be connected as \Bigl( \pi \Bigr) w = tan - \theta \mathrm{w} \Delta L\mathrm{a}\mathrm{x}\mathrm{i}\mathrm{a}\mathrm{l} , 2 (D.6) and the final force-displacement relation is Fw = \Bigl( \pi \Bigr) 3E Iw tan - \theta \mathrm{w} \Delta L\mathrm{a}\mathrm{x}\mathrm{i}\mathrm{a}\mathrm{l} . L3 2 (D.7) References [1] R. Ghaffari, T. X. Duong, R. A. Sauer, A new shell formulation for graphene structures based on existing ab-initio data, Int. J. Solids Struct. (2017). DOI: 10.1016/j.ijsolstr.2017.11.008. [2] S. Kumar, D. M. Parks, On the hyperelastic softening and elastic instabilities in graphene, Proc. Royal Soc. Lond. A: Math. Phys. Eng. Sci. 471 (2014). DOI: 10.1098/rspa.2014.0567. [3] V. I. Merkulov, M. A. Guillorn, D. H. Lowndes, M. L. Simpson, E. Voelkl, Shaping carbon nanostructures by controlling the synthesis process, Appl. Phys. Lett. 79 (2001) 1178--1180. [4] A. K. Geim, K. S. Novoselov, The rise of graphene, Nat. Mater. 6 (2007) 183--191. [5] M. Yudasaka, S. Iijima, V. H. Crespi, Single-Wall Carbon Nanohorns and Nanocones, Springer Berlin Heidelberg, Berlin, Heidelberg, 2008, pp. 605--629. [6] S. N. Naess, A. Elgsaeter, G. Helgesen, K. D. Knudsen, Carbon nanocones: Wall structure and morphology, Sci. Technol. Adv. Mater. 10 (2009) 065002. TSTA11660880[PII]. [7] I. Ovidko, Review on grain boundaries in graphene. Curved poly-and nanocrystalline graphene structures as new carbon allotropes, Rev. Adv. Mater. Sci 30 (2012) 201--224. [8] S. Alwarappan, A. Kumar, Graphene-Based Materials: Science and Technology, CRC Press, 2013. 28 [9] V. V. Mokashi, D. Qian, Y. Liu, A study on the tensile response and fracture in carbon nanotube-based composites using molecular mechanics, Compos. Sci. Technol. 67 (2007) 530--540. [10] B. Javvaji, P. Budarapu, V. Sutrakar, D. R. Mahapatra, M. Paggi, G. Zi, T. Rabczuk, Mechanical properties of graphene: Molecular dynamics simulations correlated to continuum based scaling laws, Comput. Mater. Sci. 125 (2016) 319--327. [11] A. R. Khoei, M. S. Khorrami, Mechanical properties of graphene oxide: A molecular dynamics study, Fuller. Nanotub. Car. N. 24 (2016) 594--603. [12] A. A. Balandin, Thermal properties of graphene and nanostructured carbon materials, Nat. Mater. 10 (2011) 569--581. [13] E. Pop, V. Varshney, A. K. Roy, Thermal properties of graphene: Fundamentals and applications, MRS Bulletin 37 (2012) 12731281. [14] T. Y. Kim, C.-H. Park, N. Marzari, The electronic thermal conductivity of graphene, Nano Lett. 16 (2016) 2439--2443. PMID: 26907524. [15] Z. Fan, L. F. C. Pereira, P. Hirvonen, M. M. Ervasti, K. R. Elder, D. Donadio, T. AlaNissila, A. Harju, Thermal conductivity decomposition in two-dimensional materials: Application to graphene, Phys. Rev. B 95 (2017) 144309. [16] A. H. Castro Neto, F. Guinea, N. M. R. Peres, K. S. Novoselov, A. K. Geim, The electronic properties of graphene, Rev. Mod. Phys. 81 (2009) 109--162. [17] P. Ulloa, A. Latg\'e, L. E. Oliveira, M. Pacheco, Cone-like graphene nanostructures: Electronic and optical properties, Nanoscale Res. Lett. 8 (2013) 384--384. 1556-276X8-384[PII]. [18] D. Qian, A multiscale approach to the influence of geometry and deformation on the electronic properties of carbon nanotubes, in: A. Cocks, J. Wang (Eds.), IUTAM Symposium on Surface Effects in the Mechanics of Nanomaterials and Heterostructures: Proceedings of the IUTAM Symposium held in Beijing, China, 8-12 August, 2010, Springer Netherlands, Dordrecht, 2013, pp. 247--255. [19] J. Baringhaus, M. Ruan, F. Edler, A. Tejeda, M. Sicot, A. Taleb-Ibrahimi, A.-P. Li, Z. Jiang, E. H. Conrad, C. Berger, C. Tegenkamp, W. A. de Heer, Exceptional ballistic transport in epitaxial graphene nanoribbons, Nature 506 (2014) 349--354. Letter. [20] T. Natsuki, Theoretical Analysis of Vibration Frequency of Graphene Sheets Used as Nanomechanical Mass Sensor, Electronics 4 (2015) 723--738. [21] J. Liu, Charging graphene for energy, Nat. Nanotechnol. 9 (2014) 739--741. Feature. [22] K. Kostarelos, K. S. Novoselov, Graphene devices for life, Nat. Nanotechnol. 9 (2014) 744--745. Feature. [23] S. Bohm, Graphene against corrosion, Nat. Nanotechnol. 9 (2014) 741--742. [24] B. Marinho, M. Ghislandi, E. Tkalya, C. E. Koning, G. de With, Electrical conductivity of compacts of graphene, multi-wall carbon nanotubes, carbon black, and graphite powder, Powder Technol. 221 (2012) 351--358. Selected papers from 2010 AIChE Annual Meeting. 29 [25] B. Galindo, S. G. Alcolea, J. G\' omez, A. Navas, A. O. Murguialday, M. P. Fernandez, R. C. Puelles, Effect of the number of layers of graphene on the electrical properties of tpu polymers, IOP Conf. Ser.: Mater. Sci. Eng. 64 (2014) 012008. [26] K. Spanos, S. Georgantzinos, N. Anifantis, Mechanical properties of graphene nanocomposites: A multiscale finite element prediction, Compos. Struct. 132 (2015) 536--544. [27] R. Atif, I. Shyha, F. Inam, Mechanical, thermal, and electrical properties of grapheneepoxy nanocompositesa review, Polymers 8 (2016). [28] X. Xia, J. Hao, Y. Wang, Z. Zhong, G. J. Weng, Theory of electrical conductivity and dielectric permittivity of highly aligned graphene-based nanocomposites, J. Phys.: Condens. Matter 29 (2017) 205702. [29] J. Lee, B. Lee, Modal analysis of carbon nanotubes and nanocones using FEM, Comput. Mater. Sci. 51 (2012) 30--42. [30] Z. Zhou, D. Qian, V. K. Vasudevan, R. S. Ruoff, Folding mechanics of bi--layer graphene sheet, Nano LIFE 02 (2012) 1240007. [31] M. Arroyo, T. Belytschko, Finite crystal elasticity of carbon nanotubes based on the exponential Cauchy-Born rule, Phys. Rev. B 69 (2004) 115415. [32] X. Guo, J. Wang, H. Zhang, Mechanical properties of single-walled carbon nanotubes based on higher order cauchyborn rule, Int. J. Solids Struct. 43 (2006) 1276--1290. [33] J. B. Wang, X. Guo, H. W. Zhang, L. Wang, J. B. Liao, Energy and mechanical properties of single-walled carbon nanotubes predicted using the higher order Cauchy-Born rule, Phys. Rev. B 73 (2006) 115428. [34] J. Yan, K. Liew, L. He, Predicting mechanical properties of single-walled carbon nanocones using a higher-order gradient continuum computational framework, Compos. Struct. 94 (2012) 3271--3277. [35] V. Shenoy, R. Miller, E. Tadmor, D. Rodney, R. Phillips, M. Ortiz, An adaptive finite element approach to atomic-scale mechanicsthe quasicontinuum method, J. Mech. Phys. Solids 47 (1999) 611 -- 642. [36] J. Yan, K. Liew, L. He, Buckling and post-buckling of single-wall carbon nanocones upon bending, Compos. Struct. 106 (2013) 793--798. [37] X. Wang, J. Wang, X. Guo, Finite deformation of single-walled carbon nanocones under axial compression using a temperature-related multiscale quasi-continuum model, Comput. Mater. Sci. 114 (2016) 244--253. [38] R. Firouz-Abadi, M. Fotouhi, H. Haddadpour, Free vibration analysis of nanocones using a nonlocal continuum model, Phys. Lett. A 375 (2011) 3593--3598. [39] R. Firouz-Abadi, M. Fotouhi, H. Haddadpour, Stability analysis of nanocones under external pressure and axial compression using a nonlocal shell model, Physica E 44 (2012) 1832--1837. [40] M. R. Gandomani, M. Noorian, H. Haddadpour, M. Fotouhi, Dynamic stability analysis of single walled carbon nanocone conveying fluid, Comput. Mater. Sci. 113 (2016) 123--132. 30 [41] D. Sfyris, G. Sfyris, C. Galiotis, Curvature dependent surface energy for free standing monolayer graphene: Geometrical and material linearization with closed form solutions, Int. J. Eng. Sci. 85 (2014) 224--233. [42] D. Sfyris, G. Sfyris, C. Galiotis, Curvature dependent surface energy for a free standing monolayer graphene: Some closed form solutions of the non-linear theory, Int. J. Non Linear Mech. 67 (2014) 186--197. [43] M. Delfani, H. Shodja, F. Ojaghnezhad, Mechanics and morphology of single-walled carbon nanotubes: from graphene to the elastica, Philos. Mag. 93 (2013) 2057--2088. [44] M. Delfani, H. Shodja, An exact analysis for the hoop elasticity and pressure-induced twist of CNT-nanovessels and CNT-nanopipes, Mech. Mater. 82 (2015) 47--62. [45] M. Delfani, H. Shodja, A large-deformation thin plate theory with application to oneatom-thick layers, J. Mech. Phys. Solids 87 (2016) 65--85. [46] M. Xu, J. T. Paci, J. Oswald, T. Belytschko, A constitutive equation for graphene based on density functional theory, Int. J. Solids Struct. 49 (2012) 2582--2589. [47] Q.-S. Zheng, Two-dimensional tensor function representation for all kinds of material symmetry, Proc. R. Soc. A 443 (1993) 127--138. [48] Q.-S. Zheng, Theory of Representations for Tensor Functions: A Unified Invariant Approach to Constitutive Equations, Appl. Mech. Rev. 47 (1994) 545--587. [49] Q. S. Zheng, J. P. Boehler, The description, classification, and reality of material and physical symmetries, Acta Mech. 102 (1994) 73--89. [50] R. Ghaffari, R. A. Sauer, Modal analysis of graphene-based structures for large deformations, contact and material nonlinearities, ArXiv e-prints (2018). 1801.00290. Accepted in Journal of Sound and Vibration. [51] R. A. Sauer, T. X. Duong, C. J. Corbett, A computational formulation for constrained solid and liquid membranes considering isogeometric finite elements, Comput. Methods in Appl. Mech. Eng. 271 (2014) 48--68. [52] R. A. Sauer, T. X. Duong, On the theoretical foundations of thin solid and liquid shells, Math. Mech. Solids 22 (2017) 343--371. [53] T. X. Duong, F. Roohbakhshan, R. A. Sauer, A new rotation-free isogeometric thin shell formulation and a corresponding continuity constraint for patch boundaries, Comput. Methods in Appl. Mech. Eng. 316 (2017) 43--83. Special Issue on Isogeometric Analysis: Progress and Challenges. [54] T. J. Hughes, J. A. Cottrell, Y. Bazilevs, Isogeometric analysis: Cad, finite elements, nurbs, exact geometry and mesh refinement, Comput. methods appl. mech. eng. bf 194 (2005) 4135--4195. [55] J. Simo, D. Fox, On a stress resultant geometrically exact shell model. part i: Formulation and optimal parametrization, Comput. Methods in Appl. Mech. Eng. 72 (1989) 267--304. [56] M. Asghari, R. Naghdabadi, Conjugate stresses to two-point deformation tensors, Int. J. Solids. Struct. 44 (2007) 7457--7467. [57] S. Germain, M. Scherer, P. Steinmann, On inverse form finding for anisotropic hyperelasticity in logarithmic strain space, Int. J. Struct. Changes Sol. 2 (2010) 1--16. 31 [58] C. Miehe, J. M. Diez, S. G\"oktepe, L.-M. Sch\" anzel, Coupled thermoviscoplasticity of glassy polymers in the logarithmic strain space based on the free volume theory, Int. J. Solids. Struct. 48 (2011) 1799--1817. [59] J. Bonet, R. Wood, Nonlinear Continuum Mechanics for Finite Element Analysis, second ed., Cambridge University Press, 2008. [60] J. Arghavani, F. Auricchio, R. Naghdabadi, A finite strain kinematic hardening constitutive model based on hencky strain: General framework, solution algorithm and application to shape memory alloys, Int. J. Plast. 27 (2011) 940--961. [61] H. H. P\'erez-Garza, E. W. Kievit, G. F. Schneider, U. Staufer, Highly strained graphene samples of varying thickness and comparison of their behaviour, Nanotechnology 25 (2014) 465708. [62] H. Tomori, A. Kanda, H. Goto, Y. Ootuka, K. Tsukagoshi, S. Moriyama, E. Watanabe, D. Tsuya, Introducing nonuniform strain to graphene using dielectric nanopillars, Appl. Phys. Express 4 (2011) 075102. [63] C. Lee, X. Wei, J. W. Kysar, J. Hone, Measurement of the elastic properties and intrinsic strength of monolayer graphene, Science 321 (2008) 385--388. [64] K. S. Kim, Y. Zhao, H. Jang, S. Y. Lee, J. M. Kim, K. S. Kim, J.-H. Ahn, P. Kim, J.-Y. Choi, B. H. Hong, Large-scale pattern growth of graphene films for stretchable transparent electrodes, nature 457 (2009) 706--710. [65] Q. Lu, M. Arroyo, R. Huang, Elastic bending modulus of monolayer graphene, J. Phys. D: Appl. Phys. 42 (2009) 102002. [66] Q. Lu, W. Gao, R. Huang, Atomistic simulation and continuum modeling of graphene nanoribbons under uniaxial tension, Model. Simul. Mater. Sci. Eng. 19 (2011) 054006. [67] G. Cao, Atomistic studies of mechanical properties of graphene, Polymers 6 (2014) 2404. [68] X. Wei, B. Fragneaud, C. A. Marianetti, J. W. Kysar, Nonlinear elastic behavior of graphene: Ab initio calculations to continuum description, Phys. Rev. B 80 (2009) 205407. [69] M. Xu, J. T. Paci, J. Oswald, T. Belytschko, A constitutive equation for graphene based on density functional theory, Int. J. Solids Struct. 49 (2012) 2582--2589. [70] H. M. Shodja, F. Ojaghnezhad, A. Etehadieh, M. Tabatabaei, Elastic moduli tensors, ideal strength, and morphology of stanene based on an enhanced continuum model and first principles, Mech. Mater. 110 (2017) 1--15. [71] C. Galiotis, O. Frank, E. N. Koukaras, D. Sfyris, Graphene mechanics: Current status and perspectives, Annu. Rev. Chem. Biomol. Eng. 6 (2015) 121--140. PMID: 25898069. [72] D. Akinwande, C. J. Brennan, J. S. Bunch, P. Egberts, J. R. Felts, H. Gao, R. Huang, J.-S. Kim, T. Li, Y. Li, K. M. Liechti, N. Lu, H. S. Park, E. J. Reed, P. Wang, B. I. Yakobson, T. Zhang, Y.-W. Zhang, Y. Zhou, Y. Zhu, A review on mechanics and mechanical properties of 2D materials--Graphene and beyond, Extreme Mech. Lett. 13 (2017) 42--77. [73] P. Canham, The minimum energy of bending as a possible explanation of the biconcave shape of the human red blood cell, J. Theor. Biol. 26 (1970) 61--81. 32 [74] S. Kumar, D. M. Parks, Correction to `on the hyperelastic softening and elastic instabilities in graphene', Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences 472 (2016). [75] K. N. Kudin, G. E. Scuseria, B. I. Yakobson, C2 F, BN, and C nanoshell elasticity from ab initio computations, Phys. Rev. B 64 (2001) 235406. [76] O. Kintzel, Y. Baar, Fourth-order tensors tensor differentiation with applications to continuum mechanics. Part I: Classical tensor analysis, ZAMM - J. Appl. Math. Mech. / Zeitschrift fur Angewandte Math. Mech. 86 (2006) 291--311. [77] O. Kintzel, Fourth-order tensors tensor differentiation with applications to continuum mechanics. Part II: Tensor analysis on manifolds, ZAMM - J. Appl. Math. Mech. / Zeitschrift fur Angewandte Math. Mech. 86 (2006) 312--334. [78] R. Ghaffari, K. Alipour, S. Solgi, S. Irani, H. Haddadpour, Investigation of surface stress effect in 3D complex nano parts using FEM and modified boundary CauchyBorn method, J. Comput. Sci. 10 (2015) 1--12. [79] A. Rodr\'{\i}guez Ferran, Arbitrary lagrangian-eulerian formulation of quasistatic nonlinear problems, Ph.D. thesis, Universitat Polit\'ecnica de Catalunya. Departament de Matem\'atica Aplicada III, 1996. [80] E. A. de Souza Neto, D. Peri\è, D. R. J. Owen, Computational Methods for Plasticity: Theory and Applications, Wiley, 2008. [81] P. Wriggers, Nonlinear Finite Element Methods, Springer Berlin Heidelberg, 2008. [82] F. Sun, H. Li, Torsional strain energy evolution of carbon nanotubes and their stability with encapsulated helical copper nanowires, Carbon 49 (2011) 1408--1415. [83] C. L. Cheung, J. H. Hafner, C. M. Lieber, Carbon nanotube atomic force microscopy tips: Direct growth by chemical vapor deposition and application to high-resolution imaging, Proceedings of the National Academy of Sciences 97 (2000) 3809--3813. [84] H. Dai, J. H. Hafner, A. G. Rinzler, D. T. Colbert, R. E. Smalley, nanoprobes in scanning probe microscopy, Nature 384 (1996) 147--150. Nanotubes as [85] J. Hafner, C.-L. Cheung, A. Woolley, C. Lieber, Structural and functional imaging with carbon nanotube afm probes, Prog. Biophys. Mol. Biol. 77 (2001) 73--110. Single Molecule Biochemistry and Molecular Biology, Part II. [86] J. H. Hafner, C.-L. Cheung, T. H. Oosterkamp, C. M. Lieber, High-yield assembly of individual single-walled carbon nanotube tips for scanning probe microscopies, J. Phys. Chem. B 105 (2001) 743--746. [87] R. M. Stevens, New carbon nanotube afm probe technology, Mater. Today 12 (2009) 42--45. [88] N. R. Wilson, J. V. Macpherson, Carbon nanotube tips for atomic force microscopy, Nat. Nanotechnol. 4 (2009) 483--491. [89] J. Choi, B. C. Park, S. J. Ahn, D.-H. Kim, J. Lyou, R. G. Dixson, N. G. Orji, J. Fu, T. V. Vorburger, Evaluation of carbon nanotube probes in critical dimension atomic force microscopes, J. Micro. Nanolithogr. MEMS MOEMS 15 (2016) 034005. 27840664[pmid]. 33 [90] R. A. Sauer, An atomic interaction based continuum model for computational multiscale contact mechanics., Ph.D. thesis, University of California at Berkeley, 2006. [91] R. A. Sauer, S. Li, A contact mechanics model for quasi-continua, Int. J. Numer. Methods Eng. 71 (2007) 931--962. [92] R. A. Sauer, S. Li, An atomic interaction-based continuum model for adhesive contact mechanics, Finite Elem. Anal. Des. 43 (2007) 384--396. The Eighteenth Robert J. Melosh Competition. [93] R. A. Sauer, P. Wriggers, Formulation and analysis of a three-dimensional finite element implementation for adhesive contact at the nanoscale, Comput. Methods in Appl. Mech. Eng. 198 (2009) 3871--3883. [94] M. G. Schmidt, A. E. Ismail, R. A. Sauer, A continuum mechanical surrogate model for atomic beam structures, Int. J. Multiscale Comput. Eng. 13 (2015) 413--442. [95] R. A. Sauer, Multiscale modelling and simulation of the deformation and adhesion of a single gecko seta, Comput. Methods Biomech. Biomed. Engin. 12 (2009) 627--640. PMID: 19319703. [96] A. Raj, A. Mokhalingam, S. S. Gupta, Instabilities in carbon nanocone stacks, Carbon 127 (2018) 404--411. [97] R. Ansari, A. Momen, S. Rouhi, S. Ajori, On the vibration of single-walled carbon nanocones: molecular mechanics approach versus molecular dynamics simulations, Shock and Vibration 2014 (2014). [98] I.-C. Chen, L.-H. Chen, X.-R. Ye, C. Daraio, S. Jin, C. A. Orme, A. Quist, R. Lal, Extremely sharp carbon nanocone probes for atomic force microscopy imaging, Appl. Phys. Lett. 88 (2006) 153102. [99] W. Huang, J. Xu, X. Lu, Tapered carbon nanocone tips obtained by dynamic oxidation in air, RSC Adv. 6 (2016) 25541--25548. [100] E. Tadmor, R. Miller, Modeling Materials: Continuum, Atomistic and Multiscale Techniques, Cambridge University Press, 2011. [101] P. Neff, B. Eidel, F. Osterbrink, R. Martin, The Hencky strain energy \| log \bfitU \| 2 measures the geodesic distance of the deformation gradient to SO(n) in the canonical left-invariant riemannian metric on GL (n), PAMM 13 (2013) 369--370. [102] P. Neff, I.-D. Ghiba, J. Lankeit, The exponentiated Hencky-logarithmic strain energy. part I: constitutive issues and rank-one convexity, J. Elast. 121 (2015) 143--234. [103] P. Neff, J. Lankeit, I.-D. Ghiba, R. Martin, D. Steigmann, The exponentiated Henckylogarithmic strain energy. part II: Coercivity, planar polyconvexity and existence of minimizers, Zeitschrift angewandte Math. Physik 66 (2015) 1671--1693. [104] P. Neff, I.-D. Ghiba, The exponentiated Hencky-logarithmic strain energy: Part III coupling with idealized multiplicative isotropic finite strain plasticity, Continuum Mech. Thermodyn. 28 (2016) 477--487. [105] F. Beer, E. Johnston, J. DeWolf, D. Mazurek, Mechanics of Materials, Mechanics of Materials, seven ed., McGraw-Hill Education, 2014. 34
5cs.CE
Real-Coded Chemical Reaction Optimization with Different Perturbation Functions arXiv:1502.00194v1 [cs.NE] 1 Feb 2015 James J.Q. Yu, Student Member, IEEE Albert Y.S. Lam, Member, IEEE Victor O.K. Li, Fellow, IEEE Department of Electrical and Department of Electrical Engineering Department of Electrical and Electronic Engineering and Computer Sciences Electronic Engineering The University of Hong Kong University of California, Berkeley The University of Hong Kong Email: [email protected] Email: [email protected] Email: [email protected] Abstract—Chemical Reaction Optimization (CRO) is a powerful metaheuristic which mimics the interactions of molecules in chemical reactions to search for the global optimum. The perturbation function greatly influences the performance of CRO on solving different continuous problems. In this paper, we study four different probability distributions, namely, the Gaussian distribution, the Cauchy distribution, the exponential distribution, and a modified Rayleigh distribution, for the perturbation function of CRO. Different distributions have different impacts on the solutions. The distributions are tested by a set of wellknown benchmark functions and simulation results show that problems with different characteristics have different preference on the distribution function. Our study gives guidelines to design CRO for different types of optimization problems. Index Terms—Chemical Reaction Optimization, Gaussian distribution, Cauchy distribution, exponential distribution, Rayleigh distribution, evolutionary algorithm. I. I NTRODUCTION Reaction Optimization (CRO) [1] is a simple and powerful metaheuristic optimization method which mimics the interactions of molecules in chemical reactions to search for the global optimum. CRO was designed as an optimization framework and it was initially targeted to solve discrete optimization problems [2][3][4]. It has been applied to solve many practical problems, e.g. population transition problem in peer-to-peer streaming [5], network coding optimization problem [6], etc. Lam et al. then proposed a variant of CRO in 2011, named Real-Coded Chemical Reaction Optimization (RCCRO) [7], to solve continuous optimization problems. RCCRO utilizes the Gaussian distribution function as the perturbation function and some real-coded-based mechanisms were designed to implement RCCRO. RCCRO has been shown to be efficient in solving continuous optimization problems [7][8]. There are four major operations (i.e., elementary reactions) in CRO: on-wall ineffective collision, decomposition, intermolecular ineffective collision, and synthesis. In CRO, onwall ineffective collision and inter-molecular ineffective collision correspond to local search, while decomposition and synthesis correspond to remote search. In the conventional RCCRO [7], the Gaussian distribution is deployed in the neighborhood search operator in all reactions except synthesis. C HEMICAL In these elementary reactions, with the Gaussian distribution, the molecules are perturbed via the Gaussian mutation and the energy state of the molecules are checked to decide whether the reaction shall be accepted or rejected. The Gaussian perturbation in RCCRO is accomplished by adding a zeromean Gaussian-random number to the existing molecular structures (i.e., solutions) to generate new solutions in the neighborhoods. For other optimization methods like Evolutionary Programming (EP) and Particle Swarm Optimization (PSO), researchers have also proposed other perturbation functions other than the Gaussian distribution. Mutation operations in EP based on the Cauchy distribution [9] and the Levy distribution [10] have been propose. Krohling et al. has made contributions in integrating PSO with the exponential [11], the Gaussian, and the Cauchy distribution [12]. However, the impacts of different perturbation distributions on the performance of RCCRO need further study. Such research is necessary for a better understanding of the performance of RCCRO. In this paper, we propose to apply four different probability distribution functions as the perturbation function for RCCRO, namely, the Gaussian distribution, the Cauchy distribution, the exponential distribution, and a modified Rayleigh distribution. These distributions have drawn much attention from different research communities [10][13]. These four distributions are tested on a suite of well-known benchmark functions classified into three categories of optimization functions. The simulation results demonstrate that different categories of functions have different preferences on the perturbation distribution function. The rest of the paper is organized as follows: Section II presents an overview of CRO. In Section III, the four tested distribution functions are described. Section IV provides the simulation results. The paper is concluded in Section V with suggestions for further research. II. C HEMICAL R EACTION O PTIMIZATION In this section we will first introduce the manipulated agents of CRO, i.e., molecules. Then the definitions of elementary reactions are presented. The section ends with the overall algorithm of RCCRO (or simply referred to CRO hereafter). A. Molecules CRO is a kind of population-based metaheuristics [1]. There is a population of molecules in a container, with an energy buffer attached. Each molecule is characterized by its molecular structure (ω), potential energy (PE), kinetic energy (KE), and some other attributes. ω stands for a feasible solution of the optimization problem, corresponding to this molecule. PE represents the the objective function value of ω while KE represents the tolerance of the molecule to hold a worse solution with larger objective function value than the existing one. Other attributes can be used to control the flow of CRO to ensure CRO meet the characteristics of the optimization problem. Users can add, change, or remove the optimal attributes to build different versions of CRO. B. Elementary Reactions In CRO, changes to the molecules are made through different elementary reactions. There are four kinds of elementary reactions, namely, on-wall ineffective collision, decomposition, inter-molecular ineffective collision, and synthesis. The former two reactions belong to the uni-molecular reactions and the latter two are classified as class of inter-molecular reactions. These elementary reactions change the molecular structures of the molecules and accept molecules with new structures according to the conservation of energy. CRO makes use of these changes to explore the solution space and locates the global optimum [1]. We basically follow [7] to define the elementary reactions and they are described briefly as follows: 1) On-wall Ineffective Collision: An on-wall ineffective collision happens when a molecule collides with a wall of the container and then bounces away. This reaction has one molecule as input and returns another modified molecule. This reaction is mainly used for performing local search, thus the changes made on the molecular structure shall be small. We commonly generate a neighborhood structure ω 0 from ω. If we define the neighbor function as neighbor(ω) = ω + , (1) where  is called the perturbation factor and is generated from a pre-defined probability distribution function, which will be elaborated in Section IV-E. We obtain a new solution ω 0 by ω 0 = neighbor(ω) (2) and its new PE is fiven by PEω0 = f (ω 0 ), (3) where f is the objective function. During this procedure, a part of the KE held by the molecule will be transfered to the system energy buffer (EnBuff ). We have a parameter LossRate to control this energy loss process. The new KE of the molecule will be updated according to KEω0 = (PEω − PEω0 + KEω ) × t, where t ∈ [LossRate, 1] is a randomly generated number. (4) 2) Decomposition: A decomposition happens when a molecule collides with a wall of the container and breaks into two molecules. This reaction is mainly used for jumping out of the local minimums, and thus the changes made on the molecular structures are larger than an on-wall ineffective collision. During this procedure, there is no KE transferred to EnBuff, but the energy conservation law shall hold [7]. 3) Inter-molecular Ineffective Collision: An intermolecular ineffective collision happens when two molecules collide with each other and then separate. The purpose and characteristics of this reaction is similar with an on-wall ineffective collision. In general, we perform two neighbor searches on the two molecular structures ω1 and ω2 , i.e., ω10 = neighbor(ω1 ) and ω20 = neighbor(ω2 ). (5) 4) Synthesis: A synthesis happens when two molecules collide and merge into one. Generally, the change is severe and can help the molecule jump out of local minimums. Its objective is to maintain the population diversity. In this operator, the new molecule is derived from the two given original molecules and each element of the solution is equally likely to be selected from each of the original molecules at the same position. C. The Overall Algorithm CRO operates in a closed container with an initial population of randomly generated molecules. The algorithm contains three phases: initialization, iterations, and finalization. When CRO starts, the molecules as well as some system parameters, such as EnBuff, CollRate, LossRate, DecThres, and SynThres [7][17] are set. In each iteration, the system will first randomly select one reaction type according to some criteria. The system will then use this decision to randomly select one or multiple molecules from the existing ones in the container depending on whether it is a uni-molecular or an inter-molecular reaction and check its/their energy state(s). If the decomposition criterion (for uni-molecular collision) or the synthesis criterion (for inter-molecular collision) described in [1] is satisfied, the corresponding reaction takes place. Otherwise an on-wall ineffective collision or an inter-molecular ineffective collision will take place. At the end of each iteration is the energy check. The newly generated or transformed molecule(s) have their objective functions evaluated and compared with the original molecules. If the new value(s) can satisfy the energy conservation conditions [1], the new molecules are accepted and put into the container while the original molecules are discarded. Otherwise, the new molecules are discarded and this indicates a failed reaction. After the pre-defined certain number of function evaluations is reached or one of some specific stopping criteria is met, the algorithm proceeds to finalization and outputs the best-so-far global optimum. Since in this problem we focus on studying the performance of CRO with different probability distributions used in the neighborhood search operator and decomposition stated in Section II-B, interested readers can refer to [1] and [7] for detailed description of the algorithm and its pseudocode. 0.7 0.7 x0=0 =1 =0 2=1 =0 2=2 =0 2=0.5 0.6 x0=0 =2 0.6 x0=0 =0.5 =1 2=1 x0=1 =1 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 −5 −4 −3 Fig. 1. −2 −1 0 1 2 3 4 0 −5 5 −4 PDF of Gaussian Distribution Fig. 2. B. Cauchy Distribution The Cauchy distribution shares a similar bell shape with the Gaussian distribution and it has important applications to physics. We can utilize its characteristics to perform detailed local search. Its density function is given as: 1 γ ]. [ π (x − x0 )2 + γ 2 5 PDF of Cauchy Distribution x =0 =2 0 x0=1 =1 1 0.4 0.2 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 (6) where µ is the expectation and σ 2 is the variance. The plots of the PDF with some different µ and σ 2 are given in Fig. 1. We can control the shape by modifying the value of σ 2 . A larger σ 2 will result in a flatter bell. f (x; x0 , γ) = 4 1.2 0 2πσ 2 3 1.4 0.6 , 2 1.6 The Gaussian distribution has a bell-shaped probability density function (PDF) and is also known as the normal distribution or informally the bell curve [14]. Its density function is given as: e 1 x0=0 =0.5 0.8 f (x; µ, σ) = √ 0 1.8 A. Gaussian Distribution (x−µ)2 2σ 2 −1 x0=0 =1 In this paper, we consider four different types of probability distributions, namely, the Gaussian distribution, the Cauchy distribution, the exponential distribution, and the Rayleigh distribution. In this section, we will first introduce the four distributions. Then the integration of CRO with these distributions is presented. − −2 2 III. P ROBABILITY D ISTRIBUTION 1 −3 (7) In this PDF, x0 is the location parameter, or mean of the distribution. It is similar to µ in the Gaussian distribution. γ is the scale parameter which can specify the half-width at halfmaximum (HWHM). The plots of the Cauchy distribution with different x0 and γ are given in Fig. 2. Fig. 3. PDF of Exponential Distribution C. Exponential Distribution The exponential distribution describes the time between events in a Poisson process. Different from the previous two distributions, the exponential distribution does not have a bellshape. Its density function is given as: ( γe−γ(x−x0 ) , x ≥ 0 f (x; x0 , γ) = (8) 0, x<0 The parameter x0 defines the starting point of the distribution and the parameter γ defines the steepness of the PDF curve. The plots of the distribution with different x0 and γ are given in Fig. 3. Note that the normal exponential distribution only has a positive side, which does not satisfy our requirement as a perturbation function. Similar to [11], we mirror this curve 0.9 0.9 2=1 2=1 2=2 0.8 2=0.5 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0 0.5 1 Fig. 4. 1.5 2 2.5 3 3.5 4 4.5 0 −5 5 PDF of Rayleigh Distribution D. Rayleigh Distribution The Rayleigh PDF is given below: x − x22 e 2σ , x ≥ 0. σ2 (9) As with the Gaussian distribution, the only parameter, σ 2 controls the flatness of the shape. A larger σ 2 results in a flatter PDF. Moreover, the highest point of the curve occurs at x = σ. The plots of the Rayleigh distribution with different σ 2 are given in Fig. 4. Like the exponential distribution, the Rayleigh distribution is only continuous on (0, ∞). So we introduce a new way to make the distribution function continuous on (−∞, ∞) and apply it to the perturbation function. The modified PDF is given below: 2 σ + x − (σ+x) 2σ 2 × step(x, −σ)+ e σ2 2 σ − x − (σ−x) e 2σ2 × (1 − step(x, σ))]/2 σ2 (10) where step(x, σ) = 1, x≥σ 0, x<σ −4 −3 −2 −1 0 1 2 3 4 5 PDF of Modified Rayleigh Distribution E. Integration of Distributions with CRO The perturbation function mainly operates in the on-wall ineffective collision, inter-molecular ineffective collision, and decomposition [7]. In the above three elementary reactions, new molecular structures are generated from the original structures. Although in synthesis there is also a new structure generated, the new structure is composed of different parts of the original structures. To generate new molecular structures, one can add a perturbation factor to one random element of the original structure for a small change (on-wall ineffective collision and inter-molecular ineffective collision), or add different perturbation factors to some of the elements for a dramatic change (decomposition) [7]. The perturbation factors are generated from the perturbation function, which can be one of the pre-defined probability distributions discussed before. So different probability distribution functions shall generate perturbation factors with different characteristics, and this will result in different performances of the algorithm. IV. S IMULATION R ESULTS A. Benchmark Functions f 0 (x; σ 2 ) =[ ( 2=0.5 Fig. 5. to the negative side of the x-axis to make this distribution a continuous function on the range (−∞, ∞). f (x; σ 2 ) = 2=2 0.8 (11) This modified PDF is composed of two parts: We first shift the original PDF to the left by σ units, which makes x = σ as the y-axis. Then this new curve is copied and mirrored at the y-axis. The two curves are then summed and averaged. The plots of this modified PDF with different σ 2 values are given in Fig. 5. In order to evaluate the performance of different perturbation distribution functions, we perform simulations on the standard benchmark functions used in [15]. The benchmark functions are listed in [7] with the dimension sizes, feasible solution spaces and the known global optimums. This set of functions has been widely used or partially used as metaheuristic performance evaluation benchmark functions [7][15][16]. This benchmark set can be divided into three categories according to their characteristics. The first group consists of unimodal functions, each of which has only one global optimum. So it is relatively easy to solve. The second group contains high-dimensional multimodal functions. Functions in this group have multiple local optimums and it is more likely for algorithms to get “stuck” in the local optimums. TABLE I PARAMETER S ETTINGS Category PopSize StepSize I 10 0.1 II 20 1∗ III 100 0.5 * 300 for f8 and 15 for f11 EnBuff 106 105 0 IniKE 103 107 103 The last group is a collection of low-dimensional multimodal functions. These functions have lower dimensions and fewer local optimums than the second group. B. Experiment Environment All the simulations are performed on the same computer with Intel Core i5-2400 @ 3.1GHz CPU and 4.00GB RAM. CRO and distribution functions are implemented using C++ and compiled with MingGW g++ compiler under the Windows 7 64bit environment. C. Parameter Selection Different parameter settings can affect the performance of CRO dramatically [7]. A suitable combination of parameters, including PopSize, StepSize, EnBuff, IniKE, CollRate, LossRate, DecThres, and SynThres [17], may result in good simulation results. Since the combinations of parameters exist in an eight-dimensional space and are continuous, it is impractical to test all possible combinations. Instead, the parameters are tuned in an ad hoc manner. In our simulations presented in the next subsection, we adopt the three different parameter combinations for the three function categories presented and discussed in [7]. The details of the combinations are listed in Table I and interested readers can refer to [7] and [17] for elaboration of the functionality of each parameter. D. Comparisons among Different Distributions In this paper we presented four different distribution functions as CRO’s perturbation function, namely the Gaussian distribution, the Cauchy distribution, the exponential distribution, and a modified Rayleigh distribution. For simplicity, we denote the CRO algorithms with distributions as CRO G, CRO C, CRO E, and CRO R, respectively. We evaluate the performance of the four CRO variants with the benchmark functions with the parameter combinations discussed in the previous subsection. We repeat the simulations for each function 100 times and the function evaluation limits for different functions are listed in Table II which are the same as those used in [7]. The simulation results for the four algorithms on the 23 benchmark functions are presented in Table III, Table IV, and Table V, and the best results are bolded. Since the three categories of benchmark functions have different characteristics on the solution space, we will discuss them separately. From these tables we can see the Cauchy distribution performs best in Category I as its averaged rank is the highest. Recall that Category I is uni-modal and thus algorithms CollRate 0.2 0.2 0.2 LossRate 0.9 0.1 0.1 DecThres 1.55 1.55 500 SynThres 0 10 10 TABLE II F UNCTION E VALUATION L IMITS Function f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 FELimit 150 000 150 000 250 000 150 000 150 000 150 000 150 000 150 000 250 000 150 000 150 000 150 000 Function f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 FELimit 150 000 7 500 250 000 1 250 5 000 10 000 4 000 7 500 10 000 10 000 10 000 performing local search are good enough for these functions. Comparing Figs. 1, 2, 3, and 5, the Cauchy distribution has the most of its probabilities around the mean (x = 0), which helps CRO perform local search more efficiently for uni-modal problems. For Category II, the exponential distribution and the Rayleigh distribution perform equally but their advantage over the Gaussian and the Cauchy distributions is not very significant. Since the solution space of problems in Category II is high dimensional with a large number of local optimums, it is reasonable that different distributions will give a best performance on different problems. For problems with relatively less local optimums, the Gaussian and the Cauchy distribution can perform better because these problems are similar with problems in Category I. However, for problems with a large number of local optimums, a flatter distribution can probably perform well since it can maintain the population diversity better. So for this category of problems different distributions can perform well on different problems and there is no significant preference. The Gaussian distribution performs best in Category III but the Cauchy distribution also performs relatively well in this category. A possible reason to this phenomena is that since the difference between Category II and III is that Category III has lower dimensions, which reduce the number of potential local optimums, the exponential and the Rayleigh distributions lose their advantage on maintaining population diversity. However, although the number of local optimums is smaller, it is still easy for the Cauchy distribution to get stuck due to the shape of its PDF. The Gaussian distribution with shallower bell shape can maintain a better population diversity than the Cauchy TABLE III S IMULATION R ESULTS AND C OMPARISONS FOR C ATEGORY I Function f1 f2 f3 f4 f5 f6 f7 Avg. Function f1 f2 f3 f4 f5 f6 f7 Avg. Mean 2.8023E-06 5.2742E-03 4.0448E-07 1.5898E+00 7.9995E+01 0.0000E+00 1.0101E-02 CRO G Std. Div. 9.5462E-06 8.6993E-03 1.7591E-06 4.9408E+01 1.3336E+03 0.0000E+00 6.0951E-02 Best 1.1729E-06 3.1498E-03 1.3886E-07 3.7482E-03 1.7200E-02 0.0000E+00 2.6305E-03 Rank 1 1 1 3 4 1 2 1.86 Mean 3.6134E-06 6.5312E-03 5.9970E-07 2.1603E-02 4.9454E+01 0.0000E+00 9.0633E-03 CRO C Std. Div. 1.0076E-05 1.0253E-02 2.2993E-06 3.2341E-01 3.5096E+02 0.0000E+0 4.4733E-02 Best 1.5009E-06 4.2567E-03 1.8863E-07 3.4985E-03 6.5425E-01 0.0000E+00 1.9008E-03 Rank 2 2 2 1 1 1 1 1.43 Mean 2.3209E-05 1.6889E-02 3.7256E-06 4.6047E-02 6.2050E+01 0.0000E+00 1.3602E-02 CRO E Std. Div. 8.6462E-05 2.6210E-02 1.4036E-05 6.6140E-01 3.0865E+02 0.0000E+00 7.1639E-02 Best 8.9015E-06 1.0355E-02 1.0769E-06 1.0012E-02 1.2512E+00 0.0000E+00 4.5453E-03 Rank 4 4 3 2 2 1 4 2.86 Mean 5.8125E-06 7.7805E-03 8.7830E-07 2.4322E+00 7.3270E+01 0.0000E+00 1.0531E-02 CRO R Std. Div. 1.8736E-05 1.0789E-02 3.4124E-06 7.1027E+01 9.0927E+02 0.0000E+0 4.6002E-02 Best 2.2348E-06 4.7191E-03 3.6419E-07 4.4672E-03 2.2321E+00 0.0000E+00 4.1566E-03 Rank 3 3 4 4 3 1 3 3.00 TABLE IV S IMULATION R ESULTS AND C OMPARISONS FOR C ATEGORY II Function f8 f9 f10 f11 f12 f13 Avg. Function f8 f9 f10 f11 f12 f13 Avg. Mean -6.6941E+03 7.3239E-04 2.3286E-03 6.3738E+00 8.9318E-02 2.5472E-06 CRO G Std. Div. 7.0479E+03 5.1246E-03 7.6100E-03 4.4097E+01 1.7332E+00 3.4365E-05 Best -8.8963E+03 2.8899E-04 1.6035E-03 3.9130E-01 4.7978E-08 5.7443E-07 Rank 3 3 3 3 3 3 3.00 Mean -1.1584E+04 9.6594E-04 3.0142E-03 6.9692E-02 2.2222E-07 3.1977E-06 CRO C Std. Div. 2.7988E+03 2.9687E-03 1.1784E-02 5.0228E-01 1.6140E-06 3.2292E-05 Best -1.2451E+04 4.8051E-04 1.6159E-03 6.6663E-07 6.2396E-08 5.6288E-07 Rank 1 4 4 1 2 4 2.67 Mean -6.6816E+03 4.0876E-04 1.8143E-03 4.8161E+00 1.0936E-07 1.4290E-06 CRO E Std. Div. 6.8112E+03 1.5659E-03 2.7791E-03 2.6975E+01 9.0059E-07 1.3039E-05 Best -8.6168E+03 1.2755E-04 1.1840E-03 6.3374E-01 3.1753E-08 3.9950E-07 Rank 4 2 2 2 1 2 2.17 Mean -6.7458E+03 3.4566E-04 1.6536E-03 8.7394E+00 2.1104E+00 1.0141E-06 CRO R Std. Div. 6.7677E+03 4.6215E-03 5.5241E-03 5.1116E+01 2.6246E+01 1.0198E-05 Best -8.1446E+03 1.3204E-04 1.1178E-03 6.9625E-01 3.1908E-08 2.2801E-07 Rank 2 1 1 4 4 1 2.17 while performing local search more efficiently than the other two distributions. The average computational time consumed in a simulation run of these four CRO variants are listed in Table VI for reference. Generally the computational speed of the Gaussian distribution is the fastest, but all computational times are comparable. To summarize, the Cauchy distribution is suitable for solving uni-modal optimization problems. The Gaussian distribution is suitable for solving low-dimensional multimodal problem. For high-dimensional multi-modal problems, the exponential and the Rayleigh distribution generally perform better, but for different problems there are different preferences. V. C ONCLUSION AND F UTURE W ORK In this paper, we compare four kinds of distribution functions, namely the Gaussian distribution, the Cauchy distribution, the exponential distribution, and the modified Rayleigh distribution, as the perturbation function for CRO. Since these distributions have different characteristics, they may be suitable to solve different kinds of problems with different solution space characteristics. We integrate these four distribution functions into CRO. The four CRO variants are evaluated with 23 benchmark functions, divided into three categories. The simulation results show that different categories of problems have different preference on the perturbation function. The Cauchy distribution fits Category I functions best and the Gaussian distribution fits Category III functions best, while the exponential and the modified Rayleigh distribution perform TABLE V S IMULATION R ESULTS AND C OMPARISONS FOR C ATEGORY III Function f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 Avg. Function f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 Avg. Mean 3.3089E+00 5.9906E-04 -1.0305E+00 3.9795E-01 3.0009E+00 -3.8615E+00 -3.3125E+00 -1.0126E+01 -1.0308E+01 -1.0076E+01 CRO G Std. Div. 2.8636E+01 1.4234E-03 2.1115E-02 9.2041E-04 1.7177E-02 1.1619E-02 6.7953E-02 2.3876E-01 6.6218E+00 1.5155E+01 Best 9.9800E-01 3.5413E-04 -1.0316E+00 3.9789E-01 3.0000E+00 -3.8628E+00 -3.3217E+00 -1.0153E+01 -1.0402E+01 -1.0536E+01 Rank 3 1 1 2 1 1 1 1 2 4 1.70 Mean 1.1893E+00 6.1532E-04 -1.0305E+00 3.9795E-01 3.0013E+00 -3.8612E+00 -3.3107E+00 -1.0117E+01 -1.0350E+01 -1.0269E+01 CRO C Std. Div. 6.5107E+00 1.3869E-03 2.1463E-02 6.8579E-04 1.9859E-02 1.4214E-02 7.8734E-02 2.6175E-01 6.7161E-01 1.0470E+01 Best 9.9800E-01 3.2870E-04 -1.0316E+00 3.9789E-01 3.0000E+00 -3.8628E+00 -3.3214E+00 -1.0151E+01 -1.0401E+01 -1.0536E+01 Rank 1 2 2 1 2 2 2 2 1 3 1.80 Mean 2.2217E+00 6.5008E-04 -1.0275E+00 3.9833E-01 3.0043E+00 -3.8606E+00 -3.3086E+00 -9.9484E+00 -1.0045E+01 -1.0305E+01 CRO E Std. Div. 2.0650E+01 1.0962E-03 1.2423E-01 6.0664E-03 6.2059E-02 2.5016E-02 9.0811E-02 2.2520E+00 7.5628E+00 2.3769E+00 Best 9.9800E-01 3.6644E-04 -1.0316E+00 3.9789E-01 3.0000E+00 -3.8627E+00 -3.3218E+00 -1.0141E+01 -1.0383E+01 -1.0531E+01 Rank 2 4 3 4 4 4 3 4 4 2 3.40 Mean 3.7510E+00 6.4918E-04 -1.0183E+00 3.9802E-01 3.0014E+00 -3.8606E+00 -3.3073E+00 -1.0057E+01 -1.0188E+01 -1.0465E+01 CRO R Std. Div. 3.6642E+01 1.4605E-03 4.3638E-01 1.7142E-03 2.0636E-02 2.1030E-02 9.8572E-02 5.0092E+00 8.9541E+00 8.0594E-01 Best 9.9800E-01 3.2389E-04 -1.0316E+00 3.9789E-01 3.0000E+00 -3.8627E+00 -3.3215E+00 -1.0153E+01 -1.0401E+01 -1.0534E+01 Rank 4 3 4 3 3 3 4 3 3 1 3.10 TABLE VI C OMPUTATIONAL T IME ( S ) Function f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 CRO G 0.03281 0.03346 0.14172 0.04294 0.03841 0.26363 0.44546 0.77906 0.61241 0.40227 0.77743 0.35557 0.37318 0.03674 0.0631 0.00058 0.00131 0.00174 0.00211 0.00444 0.00202 0.00221 0.00248 CRO C 0.03812 0.03992 0.15247 0.04648 0.04318 0.26166 0.45033 0.76936 0.59982 0.39936 0.79861 0.37177 0.38145 0.03799 0.07312 0.0006 0.00144 0.00212 0.00233 0.00461 0.00234 0.00266 0.00281 CRO E 0.04027 0.04295 0.15339 0.04752 0.0421 0.26285 0.45933 0.80069 0.61947 0.40278 0.80926 0.3812 0.38168 0.03733 0.07215 0.00059 0.00141 0.00206 0.00229 0.00441 0.00233 0.00245 0.0028 CRO R 0.04674 0.04835 0.16701 0.05661 0.05111 0.26445 0.44639 0.76243 0.61142 0.40402 0.8098 0.38371 0.39597 0.03802 0.08616 0.00066 0.0017 0.0026 0.00245 0.00485 0.00297 0.00312 0.00336 similarly for the Category II functions and outperform the other two distributions. Our study gives guidelines to design CRO for different types of optimization problems. In the future we will conduct a systematic analysis on the impact of different parameters on perturbation function selection. We will also perform an analysis on the convergence speed of the four different distribution functions. Other distribution functions, e.g. the Levy distribution, will also be implemented on CRO to have a more general study of the overall performance. ACKNOWLEDGEMENT This work is supported in part by the Strategic Research Theme of Information Technology of The University of Hong Kong. A.Y.S. Lam is also supported in part by the Croucher Foundation Research Fellowship. R EFERENCES [1] A. Y.S. Lam and V. O.K. Li, “Chemical-reaction-inspired metaheuristic for optimization,” IEEE Trans. Evol. Comput., vol. 14, no. 3, pp. 381399, Jun. 2010. [2] J. Xu, A. Y.S. Lam, and V. O.K. Li, “Chemical reaction optimization for task scheduling in grid computing,” IEEE Trans. Parallel Distrib. Syst., vol.22, no. 10, pp. 1624-1631, Oct. 2011. [3] A. Y.S. Lam and V. O.K. Li, “Chemical reaction optimization for cognitive radio spectrum allocation,” in Proc. IEEE GLOBECOM, Dec. 2010, pp. 1-5. [4] A. Y.S. Lam and V. O.K. Li, “Chemical reaction optimization: A tutorial,” Memetic Computing, vol. 14, no. 1, pp. 3-17, Mar. 2012. [5] A. Y.S. Lam, J. Xu, and V. O.K. Li, “Chemical Reaction Optimization for population transition in peer-to-peer live streaming,” in Proc. IEEE CEC’10, Jul. 2010, pp. 1-8. [6] B. Pan, A. Y.S. Lam, and V. O.K. Li, “Network Coding Optimization Based on Chemical Reaction Optimization,” in Proc. GLOBECOM, Dec. 2011, pp. 1-5. [7] A. Y.S. Lam, V. O.K. Li, and J. J.Q. Yu, “Real-Coded Chemical Reaction Optimization,” IEEE Trans. Evol. Comput., in press. [8] J. J.Q. Yu, A. Y.S. Lam, and V. O.K. Li, “Evolutionary artificial neural network based on chemical reaction optimization,” in Proc. IEEE CEC’11, Jun. 2011, pp. 2083-2090. [9] X. Yao and Y. Liu, “Fast evolutionary programming,” in Evolutionary Programming V: Proceedings of the 5th Annual Conference on Evolutionary Programming. Cambridge, MA: MIT Press, 1996 [10] C. Lee and X. Yao, “Evolutionary Programming Using Mutations Based on the Levy Probability Distribution,” IEEE Trans. Evol. Comput., vol.8, no.1, pp.1-13, Feb. 2004. [11] R. A. Krohling and L. S. Coelho, “PSO-E: Particle Swarm with Exponential Distribution,” in Proc. IEEE CEC’06, Jul. 2006, pp. 14281433. [12] R. A. Krohling and E. Mendel, “Bare Bones Particle Swarm Optimization with Gaussian or Cauchy Jumps,” in Proc. IEEE CEC’09, May. 2009, pp. 3285-3291. [13] B. Mandelbrot, The Fractal Geometry of Nature. San Francisco, CA:Freeman, 1982. [14] G. Casella and R. L. Berger, Statistical inference. Duxbury Press, 2001. [15] X. Yao, Y. Liu, and G. Lin, “Evolutionary programming made faster,” IEEE Trans. Evol. Comput., vol. 3, no. 2, pp. 82-102, Aug. 1999. [16] H. Dong, J. He, H. Huang, and W. Hou, “Evolutionary Programming Using a Mixed Mutation Strategy,” Information Sciences, vol. 177, no. 1, pp. 312-327, Jan. 2007. [17] J. J.Q. Yu, V. O.K. Li, and A. Y.S. Lam, “Sensor Deployment for Air Pollution Monitoring Using Public Transportation System”, submitted for publication.
9cs.NE
Multi-Oriented Text Detection and Verification in Video Frames and Scene Images a Aneeshan Sain, bAyan Kumar Bhunia, cPartha Pratim Roy*, dUmapada Pal a. Dept. of EE, Institute of Engineering & Management, Kolkata, India b. Dept. of ECE, Institute of Engineering & Management, Kolkata, India c. Dept. of CSE, Indian Institute of Technology Roorkee, India d. CVPR Unit, Indian Statistical Institute, Kolkata, India *email: [email protected], TEL: +91-1332-284816 Abstract In this paper, we bring forth a novel approach of video text detection using Fourier-Laplacian filtering in the frequency domain that includes a verification technique using Hidden Markov Model (HMM). The proposed approach deals with the text region appearing not only in horizontal or vertical directions, but also in any other oblique or curved orientation in the image. Until now only a few methods have been proposed that look into curved text detection in video frames, wherein lies our novelty. In our approach, we first apply Fourier-Laplacian transform on the image followed by an ideal Laplacian-Gaussian filtering. Thereafter K-means clustering is employed to obtain the asserted text areas depending on a maximum difference map. Next, the obtained connected components (CC) are skeletonized to distinguish various text strings. Complex components are disintegrated into simpler ones according to a junction removal algorithm followed by a concatenation performed on possible combination of the disjoint skeletons to obtain the corresponding text area. Finally these text hypotheses are verified using HMM-based text/non-text classification system. False positives are thus eliminated giving us a robust text detection performance. We have tested our framework in multi-oriented text lines in four scripts, namely, English, Chinese, Devanagari and Bengali, in video frames and scene texts. The results obtained show that proposed approach surpasses existing methods on text detection. Key Words: Scene text and Video text retrieval, Text extraction, Fouier-Laplacian, Hidden Markov Model, Skeletonization.1 1 Submitted to Neurocomputing, Elsevier 1 1. Introduction With the advancement in technology, video-text detection and recognition has gained prime importance as real time applications, for instance, the systems that help blind people to travel on roads, or the ones that track license plates of automobiles, often require recognition accuracies greater than 90% [2, 3] for security and surveillance purposes. Due to motion-blur, non-uniform illumination, text movements and complex back-grounds [8] video images suffer significant loss in quality. Lighting conditions and perspective distortions [10], affects scene texts negatively as well. Thus, attaining such high accuracies is too idealistic an aim for researchers. Retrieval of textual information [31] from scene images or video frames has gained attention among the researchers because of text being one of the important medium of communication. Textual information retrieval system requires a robust text detection framework to localize the text accurately in scene images and video frames. In spite of many methods being proposed earlier, text detection remains a challenging problem owing to the unrestricted colors, fonts, and orientations of the characters. Text detection methods may be categorized into three main approaches: connected componentbased, edge-based, and texture-based [10, 12, 20]. The first method uses color quantization and region expansion (or splitting) to group adjacent pixels of similar colors into connected components (CC) [12]. As, these CCs may not retain the complete shape of the characters due to color bleeding and the low contrast of the text lines, these approaches do not hold good for video images. To mitigate this issue of low contrast, edge-based techniques are proposed. These methods [20] analyze horizontal and vertical profiles of the edge map. Albeit fast, these methods produce numerous false-positives for images having a complex background. To fix such problems, texture-based approach is applied which considers the text region as a unique contour or texture. These techniques employ Fast Fourier Transform, discrete cosine transform, wavelet decomposition, and Gabor filters for extracting features. Such methods usually apply classifiers, for instance SVM and neural networks. Hence they need to be trained for different databases. But, these classifiers need an enormous training set of text and non-text samples for higher accuracy [10]. 2 Multi-oriented detection of text without any restrictions on background, alignment, and contrast, with high precision, and recall still remains a difficult task. Most existing methods [5, 9, 19] depending highly on the horizontal text-orientation fail in cases of multi-oriented text fields. Research on curved-text-line detection is even rarer because not only edge-focused methods fail but also due to most of the above mentioned reasons. Hence, in this paper, we introduce a method which can handle linear texts of arbitrary orientation, as well as curved text lines. In this paper we further propose HMM-based text verification for higher accuracy. The proposed text detection method moves forward from baseline approach [1] with improved performance. We have used Laplacian of Gaussian filter for better filtering. The proposed system takes care of curved texts as well as texts in any orientation. One of the novelties lies in using skeletal features extensively in detection of curved texts which may be in any orientation. In addition, HMM based verification has been included to enhance the efficiency and accuracy of the framework. The contributions of the paper are as follows – 1. An efficient approach is proposed which is able to detect horizontal, non-horizontal and curvedly oriented texts in videos. 2. The concept of skeletonization is extensively used to improve the detection process of text region. 3. HMM verification is applied to improve accuracy of results. 4. Finally, the framework has been tested with 4 different scripts to show the efficiency. The rest of the paper is organized as follows. In Section 2 we discuss related work developed for scene/video image text detection. In Section 3, the proposed framework for text detection and verification has been described. In Section 4 we detail the experimental setup and discuss about the results. Finally, conclusions and future directions are given in Section 5. 2. Related Work Text detection has been an appealing topic of exploration to most researchers. A considerable amount of work has been done in text detection in scene and video images [2-6]. Two recent survey papers on text detection and recognition in scene images and video frames can be found in [2, 47]. Edge based methods are common in application. Cai et al. [20] designs two filters for enhancing the edges in text regions using different threshold values to decide whether or not to do so in a specific region. Hence it does not generalize well for various data sets. Liu et al. [9] 3 uses the Sobel edge maps of four directions, extracting statistical features from them and classifies pixels into text and non-text clusters applying K-means algorithm. Although robust against complex backgrounds, this method cannot locate low contrast text. Moreover it is computationally expensive owing to the enormous feature set. Rong et al. [26] proposed a two-level algorithm to detect text regions in natural scene images based on the characteristics of character components. Chen et al. [27] proposed a method for robust text detection in natural scene images using Maximally Stable Extremal Regions (MSER) and stroke width distance based features. Yin et al. [24] suggested robust text detection in natural scene images based on MSER, clustering and character classifier. The method studies the characteristics of character components for the output of MSER to classify them as text candidates. Single link clustering and character classifiers are used for detecting true text candidates. Since the above discussed methods assumes that a given image has high contrast, the methods like MSER outputs character components. However, if the same methods deployed on video image, the performance of the method degrades severely due to low contrast and low resolution. Therefore, these methods are sensitive to complex back ground, distortions and low contrast. In video images, the performance of MSER falls severely owing to its low contrast and low resolution. Texture based approaches were also used by many researchers. Shivakumara et al. [1, 21] proposed wavelet, color features, Fourier with color spaces and Fourier with Laplacian for text detection in video. These three methods are good for low contrast images but are computationally expensive since they use expensive transformation. In addition, the performances of the methods degrade when an input image contains distortion caused by operations and motions. Lee et al. [6] used support vector machines (SVM) to categorize each pixel into text and non-text classes. But again, texture-based methods tend to use large training sets which are computationally exhausting. Other mechanisms and methods implement gradient and edge information in various ways to improvise their performance. Epshtein et al. [5] proposed canny edge images and stroke width transform (SWT) to detect text in natural scene images. Roy et al. [4] suggested an approach for identifying texts using binarization which is based on the concept of fusion. A blind 4 deconvolutional model [50] was used for text detection by enhancing the edge information of the text regions. Here, classification between blurred and deblurred images was performed and it was followed by a deblurring operation which used Gaussian weighted-L1 for restoring sharpness of the edges in blurred images. Recently, deep learning based methods are being explored in various scene and video text detection and recognition works [7, 48, 49, 55]. A TextAttentional Convolutional Neural Network (Text-CNN) has been used in [48]. In this work, the authors used rich supervised information related to text region mask, character label, and binary text/non-text information to train the network which increases the robustness against complicated background component. Cho et al. [53] proposed a text detection system, called Canny Text Detector which takes advantage of the similarity between image edge and text regions for robust text localization. Although this method works satisfactorily for video texts, arbitrary orientations are not dealt with. Other works associated with scene text detection in camera-based images can be noticed in [22, 23] (that focus majorly on text orientation). Although, these methods perform well for camera-based images, they are not efficient for video images as high resolution text is required for clear shape detection and extraction of each character [15]. In [43] text localization in natural scene images is performed by edge recombining, edge filtering and multi-channel processing sequentially. Confidence map and context information have been explored in [44] for text detection in scene images. A multistage clustering algorithm for grouping MSER components to detect multi-oriented text was proposed in [51]. Liang et al. [52] proposed a method based on multiple-spectral fusion for arbitrarily-oriented text detection in video images. They introduced an idea of convolving Laplacian with wavelet sub-bands in the frequency domain to enhance the low resolution text pixels. Very recently, a Ring Radius Transform (RRT) based text detection method [54] has been proposed for in multi-oriented and multi-script environment. A Fully Convolutional Network (FCN) model based multi-oriented text detection framework was introduced in [55] which considered both local and global cues into account in a course-to-fine procedure. FCN model was trained to predict the salient map of the text which was combined with the character components. Finally, another FCN classifier was used in order to remove the false hypothesis. In [60], Histogram of Oriented Moment feature is used for text/non text classification using Support Vector Machine (SVM). Authors used a sub pixel mapping based super resolution approach to enhance the image before text detection. Shivakumara et al. [29] fractal properties have been used in the gradient domain to enhance low resolution mobile video, which has been further explored into the wavelet domain in a pyramid 5 structure for text components in text clusters to make the method font size independent. Related works in curve text detection [13] are less due to its complexity. In this proposed work we have explored skeletonization on differently oriented texts of varying sizes and shapes, along with HMM based verification for robust multi-oriented text detection system. 3. Proposed Framework The approach followed in this paper can be broadly divided into two processes; text detection, and text verification. The text detection process consists of two major steps. First, we identify candidate text regions using Fourier-Laplacian filtering; thereafter applying a maximumdifference map to segregate the image into text and non-text regions. Secondly, the text regions obtained from the first step are reduced to their skeletons. These skeletal figures are analyzed and their branch-points are separated to provide individual branchless continuous skeletons. For extraction of curved text regions we have used curve-fitting methods that use polynomial equations as described later. The chosen text hypotheses are verified through HMM and the wrongly chosen text areas are neglected thus eliminating false positives. Finally after verification from HMM the output is obtained. The flowchart in Fig.1 shows the system in a nutshell. These steps are detailed as follows. Fig.1. Flowchart of our proposed approach 6 3.1. Text Area Detection In this section we describe the processes involved for detection of the candidate text regions in the image. Firstly, Fourier-Laplacian filtering pre-processes the image for text detection. It highlights the probable text regions which is further processed and skeletonized thereafter. The skeletons of the possible text portions of the image are meticulously nurtured and processed to perfect the accuracy of the chosen candidate text regions. Then the corresponding text region is extracted from the image and sent for verification. The block-diagram below (In Fig 2) shows the steps involved in this process, and the processes are described in detail thereafter. Fig.2. Block-diagram describing the text detection processes 3.1.1 Fourier-Laplacian Approach to Text Detection Video texts can have very low contrast against complex local backgrounds. It is necessary to preprocess the input image to distinguish between text and non-text areas. Here we apply Fourier-Laplacian filtering to smoothen noise and detect probable text regions as discussed in Shivakumara et al. [1]. Firstly, Fast Fourier-Transform is applied on the greyscale version of the input image to bring it into the frequency domain. Then an ideal low-pass filter is used in the frequency domain to smoothen noise. The motivation behind this step is to remove the highfrequency components of the Fourier transform, which contains information about noise. Thereafter we use Laplacian of Gaussian (LoG) mask in the frequency domain to detect probable text areas (Fig. 3(a) and Fig. 3(b)). It is observed that, text regions contain many positive and negative peaks in intensity values, while non-text regions do not. It is also noted that the zero crossings refer to the transitions between text and background. Ideally, there will be equal number of text-to-background and background-to-text transitions. However, this case does not hold true for low contrast text on complex background, which is why we apply weaker conditions to make sure that low contrast text is captured as well. 7 Here, we have stressed on Fourier-Laplacian filtering, as it is more efficient than Laplacian filtering alone, owing to the fact that the former method of filtering aids in smoothening noise in video images thus decreasing the undesired noise sensitivity issue of the Laplacian operator. Fig.3(a) shows an input image and its Fourier-Laplacian filtered version in Fig 3(b). It is noteworthy that, LoG filtered image (Fig. 3(d)) contains more text pixels than the Laplacian filtered one (Fig. 3(c)). So, it can be concluded that the LoG filter takes into consideration low contrast text information which is beneficial at a later stage for text extraction and thus we use LoG mask in frequency domain for subsequent processing of the image. The next step uses a Maximum Difference (MD) map [14] on the output of Fourier LoG filtered image. The MD map of Fig 3(e) is obtained by using a non-overlapping sliding window of 1xN pixel units to scan through the image shown in Fig 3(e), where N is calculated as: ……….. (1) For every window placed on the image, the intensity values of all the pixels in that particular window are replaced by the difference of the maximum and the minimum pixel intensity values in that window of the image. The MD map thus obtained can be seen in Fig. 3(e). Thereafter, based on the Euclidean distance of MD values, K-means clustering method is applied to segregate all the pixels from the MD map into two clusters, „text‟ and „non-text‟. The pixels having lower intensity value are clustered as non-text and those pixels having higher intensity values are clustered as text. The morphological operation of „opening‟ clears away small artifacts (see Fig. 3(f)). This results a reduced scope for search of actual text regions by eliminating non-text regions. After obtaining these refined areas for probable text regions, the processes involved in text extraction are applied which are discussed in details in the next section. 8 Fig.3. (a) Original Image (b) Fourier-Laplacian filtered (c) Applying Laplacian filtering in Fourier domain (d) Applying Laplacian of Gaussian(LoG) filter in Fourier domain. (e) MD map of image of (d). (f) Text cluster after morphological opening of (e). 3.1.2. Text Extraction This section deals with the processes that would extract the candidate text region from the original image and send it for HMM-based verification (explained in next section). The objective 9 behind these processes is the proper skeleton analysis of the probable text patches obtained from the previous steps. The features of skeletons; such as, shape, length, branching etc. play a crucial role in our text-detection process. The connected components (mostly text regions) that are obtained after clustering the MD map information are analyzed next to remove false positives. Usually, bounding boxes can be employed to detect these text blocks [34]. This shows satisfactory results for horizontal text lines. However for curved text, or for text-lines in any other orientation, rectangular boxes will also enclose excess background pixels. Text lines that lie in close vicinity, might also be included, thus leading to overlapped bounding boxes. Hence we use „skeletonization‟ to reduce every CC into its skeletal form (see Fig. 4(a)). Skeletonization [35] has been applied as a coarse method of classifying image regions as text regions or non-text regions. It provides an approximated region of text along with the direction alignment of probable candidate text region after the Fourier-LOG filtering process. Another reason for skeletonisation is to avoid the usage of bounding boxes, which would yield many false positives, when the text regions are curved. Junction points are a fundamental part of skeleton analysis [35]. They refer to the points on a skeleton where branching takes place. The junction point is calculated as follows. Considering a pixel 'P' on the skeleton we count the number of connecting pixels surrounding it in a 3x3 window, centering the pixel 'P'. If there is only 1 connecting pixel, we conclude it to be an „endpoint‟. If there are two such connecting pixels, it is just another point on the skeletal path, no branching occurs. If there are more than 2 connecting points we conclude the point to be a junction or branch-point. While dealing with a skeleton component, the co-ordinates of all the points corresponding to it are stored, and thereafter the points of each skeleton-branch are traced to calculate distance. The skeletal segment having longest distance (the distance between the two farthest placed endpoints) is considered as the main axis. The large skeleton branches having length greater than 1/3rd of the length of the main skeleton are separated by removing those junction points from the main skeleton. Remaining branches are having short length and hence their junction points were not removed. Those small branches are required for width calculation of image patches later on. 10 Fig.4. [Color-inverted for better visibility] (a) Skeletonized results of Fig(3f). (b) Junction points are removed and joints are separated. (c) Small artifacts from (b) are cleared away. Red circle shows an area possible for curve text. (d) Same as (c). Red ellipse shows the primary skeleton in focus and the two blue ones indicate the allowed vicinity to search for other skeletal segments to join. (e) Skeletal segment obtained after joining the two skeletons. The green circle shows the area where each of the individual skeletal segments has been extended to join. The image thus obtained is now scanned and every encountered skeleton is considered. Note that this image may have more skeletal segments, but the skeletons are simpler and do not have long branches as they have already been separated. Thereafter a threshold value (T) is set based on the average length of all newly formed skeletons (Here, T = 1/7th of the average length of all skeletons) and remove all such spurious fragments having length less than T. Thus unwanted tiny artifacts that might wrongly interfere with the successive operations are cleared away (Fig. 4(c)). 11 Now, for each skeletal segment encountered, we search for another end-point of other skeletal segment in its vicinity (which is equal to a radial distance of 1/10th the length of that skeletal segment), to join with it (Fig. 4(d) and Fig. 4(e)). It is due to the fact that longer text-lines provide better information for text/non-text verification through HMM process. The newly found skeleton in that scope is joined with the skeleton under consideration by extending both towards each other. Next, the skeleton component is thickened to a certain width. To find the width up to which the skeleton should be thickened, the endpoints of the skeleton are considered. To explain this thickening method, we show an example in Fig. 5(a) that represents a simple text patch. A rectangular block is considered for simplicity. Looking at the endpoints of the branches that arose from the main vertical skeleton (denoted as XY in Fig. 5(b)), we observe that the distance between the endpoints, that are symmetrically placed about the main skeleton, (e.g. A and B) would give us the approximate width of the text patch. The width of each branch (of skeleton) may be different and is calculated as the distance between endpoints placed symmetrically about the main axis of the skeleton. Note that, symmetrically placed endpoints refer to the endpoints of the short side branches which lie approximately in equal distance on opposite sides of the main axis. To find this symmetric behavior, first, on encountering a skeletal segment, co-ordinates of the skeleton points are stored. Next we choose the main skeletal axis, as defined above. Thereafter we note the distances of the end-points of the branches calculated from the main skeleton axis. Two points are considered symmetric if (a) their distances from the main skeleton are approximately equal, and (b) the sum of distances of those points from the main axis is equal to the distance between those two points. Let two points be „a‟ and „b‟; their distance from the main axis be da and db respectively; and the distance between them be dab. Here „da‟ is calculated as the Euclidean distance between the endpoint „a‟ and the junction point on the main axis from where the branch starts. Similarly, „db‟ is calculated. The Euclidean distance (d) between two points having co-ordinates (x1, y1) and (x2, y2) is given by: ……….. (2) √ Now these two points „a‟ and „b‟ will be symmetrical if, 12 ( ) && ( ) == TRUE ……….. (3) The maximum of all such „dab‟ distances is chosen as the width (W) of the skeletal segment. During symmetric end point computation, it may happen that some branches do not have a symmetrical component, such as in Fig. 6(b). In this case, „dab‟ is calculated as twice the distance of that endpoint of that branch from the main skeletal axis. Also, in the case where there are no branches in the skeletal segment, we set the value of width (W) to 1/3rd the length of the skeletal segment. Thereafter we thicken the candidate text skeleton to a width of W units, thus creating a white patch signifying the indicated text region (like the text patch in Fig. 5a). Next, from the main grayscale image, we extract the text area corresponding to the white patch obtained, to get the required text line, which is thereafter passed to HMM-based verification. Fig.5. (a) An example of simple white patch. (b) Its skeleton (in white). 13 Fig.6. Text extraction show for only 1 such skeletal segment. (a)Skeletonized image of Fig 3(b). (b) One particular skeleton is considered. (c) That segment is thickened to a width W. (d) same as (c). (e) Input image. (f) Text region having the shape of the white patch in (c) extracted out. If it is verified as text-region, the extracted text position is used as a mask to get the region from grayscale of the original image; else the skeleton is discarded permanently. The process discussed so far has been described pictorially in Fig. 6. It may happen that there will be a situation like the one shown in Fig. 7, i.e. a detached junction point in the complex connected segment where there are more than multiple skeletal segments in the vicinity of our selected skeleton‟s end-point, all suitable for joining, (junctions shown in red circles). For this purpose we apply the following procedure. We remove only those junction points whose branches have a length greater than 1/3rd of the length of the main skeleton. Note that, all available junction points are not removed as mentioned earlier in Section 3.1.2. As is evident from Fig.7(c), all the other junction points apart from the ones shown in red, have branches shorter than the specified length. Those small branches are required for width calculation of image patches later on. So, in this case, we observe, that all the other skeletons are of considerably similar lengths, thus determining it to be a skeleton of a curved text. In Fig 8, the three skeletons marked „1‟, „2‟, and „3‟ are in close vicinity about their junction point (shown as a blue circle). 14 Fig.7. (a) Original Image. (b) Image is skeletonized and small artifacts removed. (c) Junction points removed. The red circles indicate the junction points that have multiple skeletal segments starting in close vicinity. Each of these skeletons is thickened in the same way as described earlier, with respect to Fig. 5. These thickened regions are added to a blank image as a white patch separately (Fig. 8). Thereafter the text area corresponding to the white text patch is extracted from the grayscale version of the main image and sent for HMM-based verification (explained in the next section). The same process is followed for the other skeletal segments in the junction scope (i.e. skeletons marked „2‟ and „3‟). We discuss HMM-based text verification in the following section. 15 Fig.8. Text extraction process for a curved text. (a),(b),(c) : Different possible text-lines out of which 2 when joined, will represent the curved text (focusing on the junction marked in blue). In this case, they are skeletal segments (2) and (3). 3.2. HMM based Text-Verification From the experiments performed, we have observed that there are cases where previous false positive elimination methods fail to identify non-text regions in the image. To handle these kinds of scenarios, we propose a HMM–based text verification approach to retrieve the proper text region. For this purpose, first, we use log-likelihood score estimation based on HMM to get the 16 properly oriented skeleton of multi-oriented text region as well as to handle the case of curved text regions. Next, we verify the segmented text line using HMM based classification. The following flow chart (see Fig. 9) describes the chronological order of the steps involved. Fig.9. Flowchart describing the text verification process 3.2.1. Feature for HMM We have used sliding window based PHOG feature for feature extraction purpose. A sliding window of width 40×8 is being shifted from left to right with 50% overlapping between two sliding window positions and gradient feature is calculated for each sliding window position. To take care of multi oriented text, this movement of sliding window should follow the polynomial equation fitted for the multi-oriented word image as mentioned in [18]. A general polynomial equation is given by: ……….. (4) Where and ... are positive real numbers which are to be evaluated from the curve fitting algorithm. We use a fourth degree polynomial, using n = 4. The height of the imagepatch is found taking the average of the height from each point of the polynomial equation. PHOG [16] is the spatial shape descriptor which gives the feature of the image by spatial layout and local shape, comprising of gradient orientation at each pyramid resolution level. To extract the feature from each sliding window, we have divided it into cells at several pyramid level. The grid has 4N individual cells at N resolution level (i.e. N=0, 1, 2..). Histogram of gradient orientation of each pixel is calculated from these individual cells and is quantized into L bins. Each bin indicates a particular octant in the angular radian space. The concatenation of all feature 17 vectors at each pyramid resolution level provides the final PHOG descriptor. In our implementation, we have limited the level (N) to 2 and we considered no of bins (L) to 8. As a result we obtained (1×8) + (4×8) + (16×8) = (8+32+128) = 168 dimensional feature vectors for individual sliding window position. For multi-oriented text this movement of sliding window should follow the polynomial equation fitted for the multi-oriented word image as mentioned in [18, 28]. The feature extracted from a sliding frame is shown in Fig. 10. Fig.10. (a) PHOG feature extraction from curved image following a polynomial equation. (b) PHOG feature at different pyramid levels for sliding window position marked in red. 3.2.2. Hidden Markov Model-based Text Verification HMM is a sequential classifier. An HMM may be defined by its initial state probabilities, state transition matrix and output probability matrix. Each state of model is associated with a separate Gaussian Mixture Model (GMM). For a classifier of C categories, we choose the model which best matches the observation from C HMMs: 18 } ……….. (5) { where m = 1….C, and ∑ . This means when a unknown sequence of unknown category is given, we calculate P for each HMM and select , where = arg ……….. (6) where, is the density function for x irrespective of the category and is computed by: ……….. (7) ∑ The term is called the likelihood function for O given, marginal or prior probability of computes probability . is called the .The standard solution, performed by the Viterbi algorithm, of that sequence generated by and finds the best likelihood of a class for a given feature vector sequence. The HMM verification gives us a probability score for each text/non-text skeletons. The skeletons which give a probability score lesser than a threshold Tv, are removed from future processing. After conducting various tests over a significantly huge number of images varying over a large range of complex backgrounds, font sizes and orientation of text regions, we have set the value of Tv as 0.44. Now, a situation may so arise, where more than one skeletal segment is found at the considered endpoint, all suitable for joining. In that case, the HMM probability score of each of the skeletal component, surrounding that particular junction point is obtained. From all the respective probability scores obtained, the skeletons whose scores are less than the set threshold value are eliminated permanently. Out of the remaining probability scores, the top 2 scores are chosen and the two skeletons corresponding to them are joined linearly and appended to the output-file image. The process discussed above is briefly described in Fig.11. 19 Fig.11. Selection of the best possible combination using HMM probability score. The text-line images are taken from Fig.8. The above steps reduce the number of possible skeletons that might be encountered at the next junction point. Hence the number of skeletons to be checked again for the presence of text, at that junction point, is reduced. These above factors combined makes this proposed approach an efficient system of searching for candidate text regions via existing skeletons. 4. Experimental Results and Analysis In this section we discuss in detail the performance analysis of our method on various datasets. We have also compared our method‟s performance with other existing methods to demonstrate the efficiency of the proposed algorithm. The following sub-sections deal with information regarding the various datasets that has been used for the experiments, qualitative analysis on those image sets that showcase our performances, quantitative analysis shown in tabulated form, a comparative study on the performances of the methods involved and lastly error analysis. 20 4.1. Description of Datasets Our method focuses on locating the text region in a given image or a video frame and extracting the found text region, irrespective of the language of the script or its orientation. To depict these features we have chosen datasets that contain texts of various languages like Chinese, Japanese, Devanagari and Bengali, which shows the portability of the proposed framework in different scripts. Secondly, we have chosen datasets which contain images having the text area in any arbitrary orientation. Horizontal and non-horizontal texts to some extent are usually seen in most day to day images, but adding to that we have also included images of curved texts in our dataset which showcases the orientation-independent text-detection feature of our method. We name it as IITR-Text dataset. This dataset is made publicly available for further research in this direction [46]. We have performed the experiments on broadly three types of text datasets namely, horizontal texts, non-horizontal but linear texts and curvilinear texts. Initially we have performed the tests on a set of images gathered as frames from news-videos available on YouTube, and other scene texts from various sources which constitute our own dataset. Horizontal text images are also widely available and we have selected a number of images to contribute to our own data set. Non-horizontal and curved text datasets are not very readily available, which is why we had to gather images containing such text from YouTube videos, news videos, sport-videos, movie clips and from other sources. Qualitative analysis further down would showcase the performances of our algorithm on such images. The components of our in-house dataset are shown in the Table I. Some examples of different scripts are shown in Fig.12. Table I: Overview of IITR-Text detection dataset Scripts English Chinese Devanagari Bangla Horizontal 500 220 56 74 Linear Non-Horizontal 250 80 43 32 Curved 123 83 32 21 Shape of Text 21 Fig.12. Examples of non-Latin text image from IITR-Text dataset. (a) Devanagari (b) Bangla (c) Chinese. We have also used public datasets to have a common platform for comparison of efficiencies of various methods in this endeavor along with ours.The natural scene databases used were ICDAR 2013 [39] which has 462 images, SVT [41] which has 350 and MSRA-TD500 [42] which has 500 images. These datasets contain a large number of scene texts on which our algorithm has been tested and the results have been compared with other existing methods. The ICDAR 2013 scene-images include high resolution, complex backgrounds with mostly horizontal texts. The Street View Text (SVT) dataset focuses on street view images where complex backgrounds comprising of greenery and buildings can be seen. In this dataset, most of the text is in a horizontal direction. The MSRA-TD500 dataset covers a variety of scene text recorded in indoor and outdoor environments and the text is in multi-oriented directions. Along with these datasets we have also included a recent USTB-SV1K dataset [24, 51] for comparison purpose. Recently, this dataset has drawn attention of many researchers owing to its practical challenging and diverse range of images. This dataset contains 1000 (500 for training and 500 for testing) street view (patch) multi-oriented images from 6 USA cities. This dataset, USTBSV1K [24, 51] has a general open and challenging situation for natural (street view) scene text detection and recognition. To test our algorithm on videos we have used the ICDAR 2015 [38] database which has 24 videos, 12–15s long, resulting in 10,800 frames, ICDAR-2013 videos database [39] which has 15 videos, 10–15s long, giving 7000 frames and YVT [40] videos which have 30 videos, 12–16s long, resulting in 13,500 frames. The ICDAR-2015 video dataset, which is basically an extension of ICDAR 2013 video database, has much more diversified text images. The ICDAR 2013 video dataset showcases a large variety of texts in terms of font-type, font-size, resolution alterations, complexity of backgrounds and difference in orientations. Graphics and scene-texts are provided 22 by both ICDAR-2015 and ICDAR-2013 videos. The YVT dataset consists of high resolution videos carrying a large variety of scene text with multi-faceted backgrounds. The objective behind choosing the above diverse dataset is to demonstrate that the proposed algorithm works effectively in different situations. Some examples of these images are shown in Fig. 13. Fig 13: Examples showing images from IITR-Text datasets (a) Horizontal text image (b) Linear Non-horizontal text image. (c) Curved text image. 4.2. Evaluation protocol To evaluate our performance, the following protocol has been chosen. Three classes are defined for each detected block: (i) „Truly Detected Block (TDB)‟ – The truly detected text block (TDB) is a detected block that contains text partially or fully; (ii) „Falsely Detected Block (FDB)‟ – The falsely detected text block (FDB) is a block that does not contain any text; and (iii) „Missing Data Block (MDB)‟, a text block that misses more than 20% of the characters in a text line. Also „Actual Text Blocks (ATB)‟ is counted for each image. The performance measures are defined as follows: 23  Recall (R) = TDB/ATB  Precision (P) = TDB (TDB + FDB)  F-measure (F) = 2×P×R/(P + R) To make a fair comparison with other existing approaches, we have followed the standard evaluation scheme given in the ICDAR 2013 robust reading competition [39]. For comparison, we have used the four existing methods described in (i) Liu et al. [9] which extracts six statistical features from four Sobel edge maps, (ii) Cai et al. [20], which performs Sobel edge detection in the YUV color space and applies two text area enhancement filters, (iii) Wong et al.[14], marked as the gradient-based method, that finds the maximum gradient difference to locate text regions and lastly (iv) Shivakumara et al. [1] which performs text detection as explained in that paper. The same parameter values are used for all of the experiments. ICDAR 1 and ICDAR 2 are the top two winners of ICDAR 2005 competitions. Along with these papers, a comparative study is performed with recent state of the art methods in publicly available datasets to justify the competency of our proposed method. 4.3. Experiment on IITR-Text Dataset 4.3.1. Results on Horizontal text A total of 850 images have been selected in our experiment. The English sub-data set contains 500 images (363 graphic-text images and 137 scene-text images), and the Chinese sub-data set contains 220 images (135 graphic-text and 85 scene text). Some examples in Fig.14 show the better performance of our method on horizontal text than the previous method mentioned in [1]. We have also selected 74 Bengali and 56 Devanagari scripted video frames to test the method on various linguistic scripts. Results are shown in Table II. 24 Table II: Results on horizontal text detection on IITR-Text dataset Method Liu et al. [9] Cai et al. [20] Wong et al. [14] Shivakumara et. al.[1] Neumann et al. [37] Proposed Method Liu et al. [9] Cai et al. [20] Wong et al. [14] Shivakumara et al.[1] Neumann et al.[37] Proposed R 0.62 0.53 0.62 0.77 0.79 0.81 R 0.59 0.49 0.65 0.75 0.78 0.82 English P 0.65 0.42 0.81 0.82 0.89 0.88 Bangla P 0.62 0.42 0.83 0.83 0.86 0.86 F 0.64 0.46 0.70 0.80 0.84 0.85 F 0.61 0.42 0.72 0.79 0.82 0.84 Chinese P 0.67 0.39 0.78 0.79 0.87 0.85 Devanagari R P 0.52 0.65 0.42 0.35 0.59 0.72 0.73 0.81 0.77 0.85 0.80 0.85 R 0.72 0.58 0.62 0.75 0.78 0.79 F 0.69 0.47 0.69 0.77 0.83 0.82 F 0.58 0.38 0.64 0.77 0.81 0.82 4.3.2. Results on Linear non-horizontal text Here, we have selected a total of 405 images from our own dataset. The English set contains 250 images (175 for scene-text images and 75 graphic-text images), Chinese sub-data set contains 80 images (47 for graphics text and 33 for scene text). The images for Bengali (32 images) and Devanagari (43 images) scripts have been selected from you-tube and other video sources. As we see from Fig.15, our algorithm successfully depicts the text in the oblique direction quite effectively. The results are compared in Table III, along with the results on curve text detection as well which is described in the next section. 25 Fig 14: Qualitative results on horizontal text. (a) Original image (b) Shivakumara et al. [1] (c) Our Method. 4.3.3. Results on curved text In this case, not many curved texts are available to test the method upon, hence custom datasets acquired from various videos and other scene texts have been used for testing. The English dataset contains 123 images, Chinese dataset contains 83 images, Bengali set contains 21 images and Devanagari contains 32 images. As is evident from Fig. 15, other methods cannot detect the curved areas properly which our method can, with certain accuracy. The HMM verification is responsible for a higher accuracy rate here. The corresponding results are compared in Table III. 26 Table III: Result on linear non-horizontal and curved text detection on IITR-text dataset Linear Non-horizontal Text English Method R P F Shivakumara et al.[1] 0.72 0.77 0.74 Neumann et al. [37] 0.75 0.83 0.79 Proposed 0.79 0.85 0.82 Bangla Method R P F Shivakumara et al.[1] 0.74 0.78 0.76 Neumann et al. [37] 0.70 0.76 0.73 Proposed 0.80 0.82 0.81 Curved Text English Method R P F Shivakumara et al. [1] 0.52 0.59 0.55 Neumann et al.[37] 0.59 0.63 0.61 Proposed 0.74 0.81 0.77 Chinese R P F 0.69 0.73 0.71 0.72 0.82 0.77 0.75 0.83 0.79 Devanagari R P F 0.73 0.79 0.76 0.72 0.77 0.75 0.79 0.83 0.81 R 0.53 0.59 0.71 Chinese P F 0.61 0.57 0.64 0.62 0.77 0.74 4.3.4. Improvement of Text Detection Result by HMM-Verification HMM verification of detected text areas increases the accuracy or the detection rate. It compares the given probable text segment with the text and non-text models and thus verifies the region as a text part or non-text part. HMM verification scheme has been found highly essential for the curve text detection, as, in this case we are not assuming that the text appears in straight lines only unlike the method in Shivakumara et al.[1]. In such a case, without HMM based verification the method would yield unsatisfactory results. Here, a total of 4,326 image patches were considered to train the HMM model for text verification. A total of 2,345 image patches are used from text regions whereas, rest 1981 image patches are considered from non-text region. During HMM-based verification, we have noted that state number 6 and Gaussian number 32 provide best results in the validation dataset. 27 Fig 15: Qualitative results on linear non-horizontal text and Curved Text (a) Original image (b) Shivakumara et al. [1]. (c) Our system. 28 Also in cases of horizontal or linear-non-horizontal text detection, without the use of HMMbased verification step, there is a chance of including false positives. Such false positives might include parts of logo or other complex linear features as shown in Fig 13(b) and Fig 14(b). But on using HMM-based verification chances of including such false positives are minimized significantly. As we can see from the Table IV, the recall value in the case of text detection without HMMbased verification is significantly higher than the one with HMM verification (the method that we have applied), but its precision values are quite low. This can be understood simply if we note the fact that without HMM verification we are considering all the encountered skeletons which are produced after skeletonization of candidate text regions. Along with all possible text fields the candidate text regions contain a huge number of non-text areas as well. This explains why the precision value comes out to be so low. But when we use HMM verification, the chance of including non-text areas reduce significantly. Table IV: Comparison of Text/Non-text classification efficiency using HMM verification on IITR-text dataset (English only) Our system With HMM Without HMM Horizontal Text R 0.81 0.92 P 0.88 0.73 F 0.85 0.81 Linear non-horizontal Text R P F 0.79 0.85 0.82 0.87 0.67 0.75 Curved Text R 0.74 0.85 P 0.81 0.54 F 0.77 0.66 A confusion matrix has been shown (see Fig.16) that denotes the text/non-text classification results of our algorithm used. Note that, in spite of a few anomalies, our text detection rates are quite high. 29 Fig 16: Confusion Matrix between Text and Non-Text classification using HMM In this section we have taken mainly three methods, namely the ones described in (1) Shivakumara et. al. [1] which uses skeletonization to detect probable text regions but does not use HMM based verification techniques, (2) Neumann et. al. [37] which uses an end-to-end text localization and recognition method, and (3) our proposed algorithm. Our algorithm has been broken into 2 processes. One that uses HMM-based verification and another one that doesn‟t. Fig.17 shows their comparative performances, the respective F-measure values of their performance on our own IITR English text dataset for horizontal, linear non-horizontal and curved texts. Fig 17: Graphical Representation of performances of 4 methods in Shivakumara et. al. [1], Neumann et al. [37], and ours, with HMM verification and without it, on IITR-Text dataset. 30 4.3.5 Comparison between LoG and Laplacian filtering We have compared the performance of our Laplacian of Gaussian (LoG) filtering with Laplacian filtering alone. In images with texture or contour distortions, or in low contrast images with complex components, applying only Laplacian filter generates a lot of noise. Filtering such noise in the subsequent steps also removes some text information which is necessary for recovering the text region boundary. It is due to the fact that significant edge information could not be retrieved from the noisy or low contrast images. The LoG filter in the Fourier domain helps in retaining most of the text pixels. As mentioned earlier, if some background noises are included in that filtering step, they are gradually eliminated in the subsequent processes. For instance, isolated skeletal segments of those tiny patches, resulting from such noise, will be small enough to be neglected in further processing. Moreover, verification step in later stage will eliminate such noise-induced false positives. Qualitative results obtained using these two different filtering techniques are shown in Fig. 18. Note that, the boundaries of the images in columns of Fig.18(b) are not well preserved with the Laplacian filtering. But with LoG filtering, the boundaries of the text regions (see images in columns of Fig.18(c)) obtained are maintained and are more acceptable. Thus LoG filter has been used for better performance in text detection. On using LoG filter instead of Laplacian filter, we have achieved an increment in the F-measure, by an amount of 0.09, 0.12 and 0.15 on the horizontal, linear non-horizontal and curved text data sets (IIT-R) respectively. Fig. 18: Comparison between two types of filtering used. (a) Original Image. (b) Laplacian Filtered (c) LoG filtered. 31 Fig 19: Qualitative analysis: (a) Original image (b) Shivakumara et al. [1] (c) Our System 4.3.6. Experiment on Multiple Scripts Along with the experiments on English texted datasets we have also used our algorithm on various other non-Latin scripts, for instance Chinese, Japanese and Devanagari scripts. Fig.19 shows that our algorithm works equally well on non-Latin texts as it does on English ones. 32 4.4. Experiment on Public Datasets To compare the efficiency of our method with the other existing methods of text detection we have performed experiments on a few public datasets. This provides us with a common platform for the other methods involved to showcase their effectiveness as well. The results of these methods that have been used for comparison purposes are tabulated below, in terms of their precision-recall rating. From the information given below we can understand that our method provides a better accuracy than the methods we have compared it with. This is due to the fact that our algorithm uses Hidden Markov Model for text verification. 4.4.1 Performance on Video datasets We have tested our algorithm on a few other datasets as well. This time we have compared our method‟s performance with a few more algorithms of different other papers, as detailed earlier. The highest performance results have been marked in bold. It is evident that our method scores higher than the methods mentioned above. This is because our method not only relies on contrast details but also has a dedicated focus on the orientation and direction of the text region present. Skeletonization and proper curve fitting ensures that the text region is correctly mapped and HMM verification adds a certain accuracy level to our results as is evident from the table (Table V) below. Table V: Comparative study on public video datasets Methods Epshtein et al. [5] Liu et al. [9] Shivakumara et al. [21] Zhao et al. [30] Mi et al. [32] Mosley et al.[57] Wu et al. [56] Roy et al. [58] Wu et al.[59] Shivakumara et al. [29] Proposed ICDAR 2013 R P F 37.05 32.7 34.91 33.1 28.6 30.68 47.3 44.92 46.07 50.7 48.99 49.83 42.7 36.4 32.29 49.0 50.0 49.0 68.0 63.0 65.0 57.27 64.3 60.58 75.0 51.0 61.0 71.0 79.0 65.0 74.2 87.4 80.26 R 41.35 38.6 59.8 52.6 49.6 79.0 73.0 76.0 79.2 33 Datasets YVT P F 36.9 38.99 34.1 36.2 57.4 58.57 51.4 51.99 38.3 43.22 72.0 75.0 81.0 77.0 79.0 76.0 85.7 82.3 ICDAR 2015 R P F 35.78 34.5 35.12 33.17 31.8 32.47 55.7 52.3 53.9 48.3 47.7 47.99 37.9 35.2 36.5 72.0 48.0 58.0 80.6 84.5 82.5 4.4.2. Performance on Scene-Image datasets In the following table (Table VI) we show the Precision Recall and F-measure ratings of our performances on horizontal text images of the ICDAR 2003 dataset. As we can observe from the table above, that although Shivakumara et al. [1] shows a good accuracy, based on its precisionrecall values, but our method has better accuracy. This is again owing to the involvement of HMM verification technique that we have implemented into our algorithm. Similar results are also inferred from the observation table (Table VII) below, where our algorithm along with the other previous methods are tested on the MSRA-TD500 public datasets, along with a few other datasets. USTB-SV1K being a difficult dataset, we did not obtain high performance values in Table VIII, as observed in the results of other such datasets. However, amongst the methods that have been compared the proposed method shows the highest Fmeasure value. Table VI: Performance of horizontal text detection on ICDAR 2003 Dataset Methods Liu et al. [9] Cai et al. [20] Wong et al. [14] Shivakumara et al.[1] ICDAR 1 ICDAR 2 Proposed R 0.48 0.60 0.56 0.85 0.63 0.58 0.86 34 P 0.65 0.39 0.79 0.79 0.63 0.58 0.83 F 0.55 0.48 0.66 0.82 0.60 0.56 0.85 Table VII: Comparative study of Horizontal text detection on public scene-text datasets. Methods Epshtein et al. [5] Liu et al. [9] Shivakumara et al. [21] Zhao et al. [30] Mi et al. [32] Neumann et al. [37] Liu et al[36] Zhang et al. [34] Text_Flow[33] Dey et al.[54] Zhang et al.[55] Yin et al. [51] Cho et al. [53] Tian et al.[25] Proposed MSRA TD500 R P F 61.3 60.2 60.74 59.2 57.6 58.38 71.3 69.2 70.23 70.8 66.9 68.79 63.1 61.4 62.23 85.0 67.0 63.0 79.2 52.0 83.0 81.0 85.7 65.0 74.0 71.0 82.3 Datasets ICDAR 2013 R P F 51.7 47.88 49.35 53.63 48.3 50.82 55.9 52.0 53.87 63.7 62.1 62.88 54.2 51.7 52.92 72.4 82.3 77.03 70.4 79.06 89.1 74.5 88.6 80.94 75.89 85.15 80.25 67.0 75.0 87.0 78.0 88.0 83.0 65.11 83.98 73.35 78.45 86.26 79.02 83.98 83.69 83.84 74.2 87.4 80.26 R 55.8 56.71 66.8 58.3 53.8 - SVT P 53.46 54.9 64.9 57.2 52.1 - F 54.6 55.79 65.83 57.74 52.3 - 68.0 67.68 55.0 81.65 61.0 74.01 Table VIII: Performance of text detection on USTB-SV1K Database Methods Yin et al.[51] Yin et al. [24] Tian et al.[25] Proposed R 45.41 45.18 48.75 47.32 P 49.85 45.00 53.82 57.88 F 47.53 45.09 51.15 52.14 4.4.3. Qualitative Results on Public Datasets Experiments on a few images from the public datasets mentioned above have been shown below in Fig. 20, which depicts the operation of our method along with Shivakumara et al. [1]. As we can observe, the performance results on these public data sets are in coherence with the results obtained earlier from our own dataset. Looking at the overall scenario, it can be observed from the results that our proposed method performs fairly well in detecting horizontally oriented texts from images as compared to other methods, and very efficiently in detecting linear but nonhorizontally oriented texts or texts oriented in curvilinear fashion from images. 35 4.5. Comparative study with other classifiers In this paper, we have considered HMM for text verification purpose because of its ability to handle the sequential dependency. We have performed a comparative study of text verification performance with other existing classifiers [17], like Support Vector Machine (SVM), AdaBoost, Random Forest, and Conditional Random Field (CRF). The performance of various classifiers is evaluated in our IITR-text dataset which is tabulated in Table IX. Note that the average precision value is found to be highest in case of HMM. The improvement using HMM is mainly due to its better modeling of text information in a word. Table IX: Performance comparison using different classifiers on IITR-text dataset Classifiers SVM AdaBoost Random Forest CRF[11] Proposed Horizontal Text R 0.79 0.80 0.83 0.80 0.81 P 0.80 0.78 0.82 0.85 0.88 F 0.79 0.79 0.82 0.82 0.85 Linear Non-Horizontal Text R P F 0.76 0.77 0.76 0.75 0.79 0.77 0.78 0.79 0.82 0.79 0.81 0.80 0.79 0.85 0.82 36 Curved Text R 0.69 0.72 0.75 0.71 0.74 P 0.71 0.70 0.76 0.78 0.81 F 0.70 0.71 0.76 0.74 0.77 Fig 20: Curved Text detection results on ICDAR 2015 dataset (a) Original image (b) Shivakumara et al. [1] (c) Proposed system. 37 4.6. Parameter Evaluation A comprehensive study is performed to find the optimum value of parameters and thresholds used in our experiments. During text identification stage, the parameter sliding window length in the Maximum Difference map, (mentioned in Section 3.1.1) measured in pixel units. From experimental study the lower limit of threshold was set to 7 pixels. The comparisons are shown in Fig 21(a). Secondly, a threshold value was considered for elimination of unnecessary skeletal fragments as discussed in Section 3.1.2. A skeletal segment of length below that certain value would be considered as noise. Experimentally it was found that a length of 15 pixels (See Fig. 21(b) removes the irrelevant small skeletal remnants in our framework. In text verification purposes using HMM, continuous density HMMs with diagonal covariance matrices of GMMs are used in each state. Our text detection performance in IITR-text dataset with different Gaussian numbers is shown in Fig.21(c). It was observed that 32 Gaussian Mixtures provided best results in our text detection framework. A comparative study with varying state numbers is shown in Fig. 21(d). The best state number was found to be 6. Fig.21. Parameter evaluation based on our IITR text dataset (a) Length of Sliding Window (b) Threshold for elimination of irrelevant skeletal fragments (c) Gaussian number (d) State number. 38 4.7. Experiment on Run-time Processing Average processing time of the various methods (mentioned earlier) for a 256x256 image on a Core 2 Duo 2.0 GHz computer, implemented using MATLAB is shown in Table X. Our method being HMM based takes little more computational time for detecting the curved texts and then verifying those. The other methods of Lie et al. [9], Cai et al. [20] and Wong et al. [14] do not perform well for detecting non-horizontal or curved text regions. To give an idea about the runtime comparison, they have been run on such type of image datasets as well. Average processing time of different methods on IIT-R text dataset is given in Table X. A comparative study of average run-time performance among different classifiers (mentioned in Table IX) is also provided in Table XI. Table X: Average Processing Time of different methods on IIT-R text dataset Method Liu et al. [9] Cai et al. [20] Wong et al. [14] Neumann et. al [37] Shivakumara et al. [1] Proposed(using HMM) Horizontal Text (in Seconds) 20.1 6.3 1.8 1.4 7.5 9.2 Linear Non-Horizontal Text (in Seconds) 24.3 7.2 1.5 1.7 9.1 10.9 Curved Text (in Seconds) 19.8 6.7 1.6 1.6 10.4 12.2 Table XI: Average Processing Time of our proposed method using different classifiers on IITR text dataset Method SVM AdaBoost Random Forest CRF HMM Horizontal Text (in Seconds) 8.4 8.8 8.2 9.1 9.2 Linear Non-Horizontal Text (in Seconds) 10.2 10.5 9.9 11.2 10.9 39 Curved Text (in Seconds) 11.5 11.9 11.3 12.4 12.2 4.8. Error Analysis Although our method performs quite well in a large diversity of images with varying fonts, textsizes or complex backgrounds, there are a few cases where our method fails to perform up to our degree of satisfaction. The proposed method might give contradictory results if there is a large difference among font sizes in the same image. Such a situation would make the value needed for the thickening of the resultant skeletons before they are sent for HMM verification, difficult, thus lowering the accuracy of the method. Such cases (Fig.22) are rare in general situations, as the font size difference in the same image is usually not extremely large. Fig.22. False text detection (a) Original image (b) Text detection results by our system. 5. Conclusion and Future Work We have put forward a technique for text detection which is capable of handling text in video frames as well as scene images. In this paper, text orientation and text-shape are our main concern for the detection purpose. The Laplacian filtering in the frequency domain helps us in identifying the probable text regions, which are then skeletonized and segmented into disjoint connected components (CCs). These disjoint CCs are recombined into probable text shapes based on different possible combinations, which upon HMM verification, identifies horizontal, linear non-horizontal as well as curvilinear texts efficiently. In future we intend to deal with the shapes of the skeletal segments in further details, thus hoping to improve further on the efficiency and accuracy of our method. There are not many efficient methods that perform well on detection of curvilinear texts. Most methods detect horizontally aligned texts. Some researchers have looked into linear nonhorizontal orientation of texts, but curved text detection has not been efficiently explored into yet. Our method has shown promising results in detection of such curvedly oriented texts. From 40 the results, it was noted that the proposed method performs well over a large range of images, for horizontal, linear non-horizontal and curved texts. Also, it performs better than the existing methods as far as non-horizontal or curvilinear text orientations are concerned. In the future, we plan to deal with the problems of false positives, and partially detected text lines, especially those belonging to curved text areas. References [1] P. Shivakumara, T. Q. Phan, and C. L. Tan, “A Laplacian Approach to Multi-Oriented Text Detection in Video”, IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), vol. 33, pp. 412-418, 2011. [2] Q. Ye, and D. Doermann, “Text detection and recognition in imagery: a survey”, IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), vol. 37, pp.1480– 1500, 2015. [3] J. Zhang, and R. Kasturi, “A novel text detection system based on character and link energies”, IEEE Transactions on Image Processing, vol. 23, pp.4187–4198, 2014. [4] S. Roy, P. Shivakumara, P. P. Roy, and C. L. Tan, “Wavelet–gradient–fusion for video text binarization”, In Proceedings of International Conference of Pattern Recognition (ICPR), pp 3300–3303, 2012. [5] B. Epshtein, E. Ofek, and Y. Wexler, “Detecting text in natural scenes with stroke width transform”, In Proceedings of Computer Vision and Pattern Recognition (CVPR), pp. 2963–2970, 2010. [6] C.W. Lee, K. Jung, and H.J. Kim, “Automatic Text Detection and Removal in Video Sequences,” Pattern Recognition Letters, vol. 24, pp. 2607-2623, 2003. [7] Y. Zheng, Q. Li, J. Liu, H. Liu, G. Li, and S. Zhang, “A cascaded method for text detection in natural scene images”, Neurocomputing, vol. 238, pp.307-315, 2017. [8] C.M. Gracia, M. Mirmehid, and J. L. G. Mora, “Fast perspective recovery of text in natural scenes”, Image Vision and Computing, vol. 31 pp.714–724, 2013. [9] C. Liu, C. Wang, and R. Dai, “Text Detection in Images Based on Unsupervised Classification of Edge-Based Features,” In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), pp. 610-614, 2005. 41 [10] J. Zang and R. Kasturi, “Extraction of Text Objects in Video Documents: Recent Progress,” In Proceedings of Document Analysis Systems (DAS), pp. 5-17, 2008. [11] C. Sutton, and A. McCallum, “An introduction to Conditional Random Fields”, Foundations and Trends in Machine Learning, vol. 4(4), pp.267-373, 2012. [12] Y. Zhong, K. Karu, and A.K. Jain, “Locating Text in Complex Color Images,” In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), pp. 146, 1995. [13] S. Chowdhury, T. Pramanik, B. Kumar “Curved Text Detection Techniques - A Survey”. International Journal of Engineering and Innovative Technology, vol. 2(7), pp 341-343, 2013. [14] E.K. Wong, and M. Chen, “A New Robust Algorithm for Video Text Extraction,” Pattern Recognition, vol. 36, pp. 1397-1406, 2003. [15] X. Tang, X. Gao, J. Liu, and H. Zhang, “A Spatial-Temporal Approach for Video Caption Detection and Recognition,” IEEE Transactions on Neural Networks, vol. 13(4), pp. 961-971, 2002. [16] A. K. Bhunia, A. Das, P. P. Roy, and U. Pal, “A Comparative Study of Features of Handwritten Bangla Text Recognition”, In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), pp.636-640, 2015. [17] M. Fernández-Delgado, E. Cernadas, S. Barro, and D. Amorim, “Do we need hundreds of classifiers to solve real world classification problems?”, Journal of Machine Learning Research, 15(1), pp.3133-3181, 2014. [18] S. Roy, P. P. Roy, P. Shivakumara, G. Louloudis, C. L. Tan and U. Pal, “HMM-Based Multi Oriented Text Recognition in Natural Scene Image”, Asian Conference on Pattern Recognition (ACPR), pp. 288 – 292, 2013. [19] M. R. Lyu, J. Song, and M. Cai, “A Comprehensive Method for Multilingual Video Text Detection, Localization, and Extraction,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 15(2), pp 243-255, 2005. [20] M. Cai, J. Song, and M.R. Lyu, “A New Approach for Video Text Detection,” In Proceedings of International Conference on Image Processing (ICIP), pp. 117-120, 2002. [21] P. Shivakumara, R.P. Sreedhar, T.Q. Phan, S.Lu, and C.L.Tan, “Multi-oriented video scene text detection through Bayesian classification and boundary growing”, IEEE Transactions on Circuits and Systems for Video Technology, pp. 1227–1235, 2012. 42 [22] P.P. Roy, U. Pal, J. Llados, and F. Kimura, “Convex Hull Based Approach for MultiOriented Character Recognition from Graphical Documents,” In Proceedings of International Conference on Pattern Recognition (ICPR), pp. 1-4, 2008. [23] P.P Roy, U. Pal, J. Llados, and M. Delalandre, “Multi-Oriented and Multi-Sized Touching Character Segmentation Using Dynamic Programming,” In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), pp. 11-15, 2009. [24] X.C. Yin, X. Yin, K. Huang, and H. W. Hao, “Robust text detection in natural scene images”, IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), vol. 36, pp.970–983, 2014. [25] C. Tian, Y. Xia, X. Zhang, and X. Gao, X. “Natural Scene Text Detection with MC-MR Candidate Extraction and Coarse-to-Fine Filtering”, Neurocomputing, 2017. (In Press) [26] L. Rong, W. Suyu, Z.X. Shi, “A two level algorithm for text detection in natural scene images”, In Proceedings of Document Analysis Systems, pp. 329–333, 2014. [27] H. Chen, S. S. Tsai, G. Schorth, D. M. Chen, R. Grzeszczuk, and B. Girod, “Robust text detection in natural scene images with edge-enhanced maximally stable extremal regions”, In Proceedings of International Conference on Image Processing (ICIP), pp. 2609–2612, 2011. [28] A. K. Bhunia, G. Kumar, P. P. Roy, R. Balasubramanian, and U. Pal, “Text Recognition in Scene Image and Video Frames using Color Channel Selection”, Multimedia Tools and Applications, 2017. (In Press) [29] P. Shivakumara, L. Wu, T. Lu, C. L. Tan, M. Blumenstein, and B. S. Anami, “Fractals based multi-oriented text detection system for recognition in mobile video images”, Pattern Recognition, Vol. 68, pp.158-174, 2017. [30] X. Zhao, K.H. Lin, Y. Fu, Y. Hu, Y. Liu, and T.S. Huang, “Text from corners: a novel approach to detect text and caption in videos”, IEEE Transactions on Image Processing, pp. 790–799, 2011. [31] P. P. Roy, A. K. Bhunia, and U. Pal, “Date-Field Retrieval in Scene Image and Video Frames using Text Enhancement and Shape Coding”, Neurocomputing, 2017. (In Press) [32] C. Mi, Y. Xu, H. Lu, X. Xue, “A novel video text extraction approach based on multiple frames”, In Proceedings of International Conference on Image and Signal Processing (ICISP), pp.678–682, 2005. 43 [33] S. Tian, Y. Pan, C. Huang, S. Lu, K. Yu, and C. L. Tan, “Text flow: A unified text detection system in natural scene images”, In Proceedings of International Conference on Computer Vision (ICCV), pp.4651-4659, 2015. [34] Z. Zhang, W. Shen, C. Yao, and X. Bai. “Symmetry-based text line detection in natural scenes”, In Proceedings of Computer Vision and Pattern Recognition (CVPR), pp. 25582567, 2015. [35] L. Lam, S. W. Lee, and C. Y. Suen, “Thinning methodologies-a comprehensive survey”. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 14(9), pp.869-885, 1992. [36] S. Lu, T. Chen, S. Tian, J. Lim, and C. Tan. “Scene text extraction based on edges and support vector regression”, International Journal on Document Analysis and Recognition, pp.125–135, 2015. [37] L. Neumann and J. Matas. “Efficient scene text localization and recognition with local character refinement”, In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), 2015. [38] D. Karatzas, L. Gomez-Bigorda, A. Nicolaou, S. Ghosh, A. Bagdanow, M. Iwamura, J. Matas, L. Neumann, and V.R. Chandrsekhar, “ICDAR-2015 competition on robust reading”, In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), pp.1156–1160, 2015. [39] D. Karatzas, F. Shafait, S. Uchida, M. Iwamura, L.G.I. Boorda, S.R. Mestre, J. Mas, D.F. Mota, J.A. Almazan, and L.P. Delas Heras, “ICDAR-2013 robust reading competition”, In Proceedings of International Conference on Document Analysis and Recognition (ICDAR), pp.1115–1124, 2013. [40] P. Nguyen, K. Wang, S. Belongie, “Video text detection and recognition: dataset and benchmark”, In Proceedings of Winter Conference on Applications of Computer Vision (WACV), pp.776–783, 2014. [41] K. Wang, S. Belongie, “Word spotting in the wild”, In Proceedings of European Conference on Computer Vision (ECCV), pp. 591–604,2010. [42] C. Yao, X. Bai, W. Liu, Y. Ma, Z. Tu, “Detecting texts of arbitrary orientations in natural images”, In Proceedings of Computer Vision and Pattern Recognition (CVPR), pp. 1083–1090, 2012. 44 [43] C. Yu, Y. Song and Y. Zhang, "Scene text localization using edge analysis and feature pool", Neurocomputing, Vol. 175, pp. 652-661, 2016. [44] R. Wang, N. Sang and C. Gao, "Text detection approach based on confidence map and context information", Neurocomputing, Vol. 157, pp. 153-165, 2015. [45] H. Zhang, K. Zhao, Y.-Z. Song and J. Guo, "Text extraction from natural scene image: A survey", Neurocomputing, Vol. 122, pp. 310-323, 2013. [46] https://sites.google.com/site/2partharoy/dataset-1 [47] X.-C. Yin, Z.-Y. Zuo, S. Tian and C.-L. Liu, “Text detection, tracking and recognition in video: A comprehensive survey”, IEEE Transaction on Image Processing, Vol. 25(6), pp. 2752-2773, 2016. [48] T. He, W. Huang, Y. Qiao and J. Yao, “Text-attentional convolutional neural network for scene text detection”, IEEE Transactions on Image Processing, Vol. 25(6), pp.2529-2541, 2016. [49] M. Jaderberg, K. Simonyan, A. Vedaldi and A. Zisserman, “Reading text in the wild with convolutional neural networks”, International Journal of Computer Vision, Vol. 116(1), pp.1-20, 2016. [50] V. Khare, P. Shivakumara, P. Raveendran and M. Blumemstein, “A blind deconvolution model for scene text detection and recognition in video”, Pattern Recognition, Vol. 54, pp. 128-148, 2016 [51] X. C. Yin, W. Y. Pei, J. Zhang and H.-W. Hao, “Multi-orientation scene text detection with adaptive clustering”, IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), Vol. 37(9), pp. 1930-1937, 2015. [52] G. Liang, P. Shivakumara, T. Lu,and C. L. Tan, “Multi-spectral fusion based approach for arbitrarily oriented scene text detection in video images”, IEEE Transactions on Image Processing, Vol. 24(11), pp. 4488-4501, 2015. [53] H. Cho, M. Sung, and B. Jun, “Canny Text Detector: Fast and Robust Scene Text Localization Algorithm”, In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3566-3573, 2016. [54] S. Dey, P. Shivakumara, K. S. Raghunandan, U. Pal, T. Lu, G. H. Kumar, and C. S. Chan, “Script independent approach for multi-oriented text detection in scene image”, Neurocomputing, Vol. 242, pp. 96-112, 2017. 45 [55] Z. Zhang, C. Zhang, W. Shen, C. Yao, W. Liu, and X. Bai, “Multi-oriented text detection with fully convolutional networks”, In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4159-4167, 2016. [56] L. Wu, P. Shivakumara, T. Lu, and C. L. Tan, C.L., “A new technique for multioriented scene text line detection and tracking in video”, IEEE Transactions on Multimedia, Vol. 17(8), pp.1137-1152, 2015. [57] A. Mosleh, N. Bouguila, and A. B. Hamza, “Automatic inpainting scheme for video text detection and removal”, IEEE Transaction on Image Processing, Vol. 22(11), pp. 4460– 4472, 2013. [58] S. Roy, P. Shivakumara, H. A. Jalab, R. W. Ibrahim, U. Pal, U. and T. Lu, “ Fractional poisson enhancement model for text detection and recognition in video frames”, Pattern Recognition, 52, pp.433-447, 2016. [59] Y. Wu, P. Shivakumara, T. Lu, C. L. Tan, M. Blumenstein, and G. H. Kumar, “Contour Restoration of Text Components for Recognition in Video/Scene Images”, IEEE Transactions on Image Processing, Vol. 25(12), pp.5622-5634, 2016. [60] A. Mittal, P. P. Roy, P. Singh and R. Balasubramanian, "Rotation and Script Independent Text Detection from Video Frames using Sub Pixel Mapping", Journal of Visual Communication and Image Representation, vol. 46, pp. 187-198, 2017. 46
1cs.CV
International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 Classification of Diabetes Mellitus using Modified Particle Swarm Optimization and Least Squares Support Vector Machine . , 1,2 Faculty of Computers and Information, Cairo University, 5 Ahmed Zewail Street, Orman, Giza, Egypt ABSTRACT: Diabetes Mellitus is a major health problem all over the world. Many classification algorithms have been applied for its diagnoses and treatment. In this paper, a hybrid algorithm of Modified-Particle Swarm Optimization and Least SquaresSupport Vector Machine is proposed for the classification of type II DM patients. LS-SVM algorithm is used for classification by finding optimal hyper-plane which separates various classes. Since LS-SVM is so sensitive to the changes of its parameter values, Modified-PSO algorithm is used as an optimization technique for LS-SVM parameters. This will Guarantee the robustness of the hybrid algorithm by searching for the optimal values for LS-SVM parameters. The pro-posed Algorithm is implemented and evaluated using Pima Indians Diabetes Data set from UCI repository of machine learning databases. It is also compared with different classifier algorithms which were applied on the same database. The experimental results showed the superiority of the proposed algorithm which could achieve an average classification accuracy of 97.833%. Keywords: Diabetes Mellitus (DM), Particle Swarm Optimization (PSO), Least Squares Support Vector Machine (LS-SVM). 1. INTRODUCTION Diabetes Mellitus, or simply Diabetes, is a group of metabolic diseases in which a person has high blood sugar, either because the pancreas does not produce enough insulin, or because cells don’t respond to the insulin that is produced. This high blood sugar produces the classical symptoms of polyuria (frequent urination), polydipsia (increased thirst) and polyphagia (increased hunger). There are 3 major types of DM, ”Type I DM”, which results from the body’s failure to produce insulin, and currently requires the person to inject insulin or wear an insulin pump. This form was previously referred to as ”insulin-dependent diabetes mellitus” (IDDM). The second type of DM is called ”Type II DM” which results from insulin resistance, a condition in which cells fail to use insulin properly, sometimes combined with an absolute insulin deficiency. This type also named as ”Non insulindependent diabetes mellitus” (NIDDM) or ”adult-onset diabetes”. Finally, ”gestational diabetes” occurs when pregnant women without a previous diagnosis of diabetes develop a high blood glucose level, It may precede development of type I DM. Other forms of DM include congenital diabetes, which is due to genetic defects of insulin secretion, cystic fibrosis-related diabetes, ISSN: 2231-2803 steroid diabetes induced by high doses of glucocorticoids, and several forms of monogenic diabetes [1], [2], [4]. All types of DM have something in common. Normally, your body breaks down the sugars and carbohydrates you eat into a special sugar called glucose. Glucose fuels the cells in your body. But the cells need insulin, a hormone, in your bloodstream in order to take in the glucose and use it for energy. All types of DM have been treatable since insulin became available in 1921. Both type I & II are chronic conditions that cannot be cured. pancreas transplants have been tried with limited success in type I DM, gastric bypass surgery has been successful in many with morbid obesity and type II DM. Gestational DM usually resolves after delivery [10]. Untreated DM can cause many complications. Acute complications include diabetic ketoacidosis and non ketotic hyperosmolarcoma. Series long term complications include cardiocascular disease, chronic renal failure, and diabetic retinopathy. Adequate treatment of the disease is very important, as well as blood pressure control and lifestyle factors such as stopping smoking and maintaining a healthy body weight. Since the cells can’t take in the glucose, it builds up in your blood. High levels of blood glucose can damage the tiny blood vessels in your kidneys, heart, eyes or nervous system. that’s why diabetes can eventually cause heart disease, stroke, kidney disease, blindness and nerve damage to nerves in the feet (especially if left untreated) [8], [26]. The aim of this paper is to develop a classification algorithm for DM diagnosis and treatment using a hybrid algorithm consists of Modified-PSO algorithm and LS-SVM classifier. Least Squares-Support Vector Machine (LS-SVM) classifier is one particular sample of Support Vector Machine (SVM) [24]. LSSVM is used for finding an optimal hyper plane, which separates various classes. It obtains this optimal hyper-plane by using maximum Euclidean distance to the nearest point. It is a parametric algorithm that is popular with its sensitivity to the changes in the values of its parameters. Particle Swarm Optimization (PSO) is a heuristic algorithm inspired from the nature social behavior of birds. The main strength of PSO is its fast convergence, compared with other global optimization algorithms [6]. The rest of this paper is organized as follows. Section 2 describes the problem background and related work. The proposed hybrid algorithm is introduced in section 3 while http://www.ijcttjournal.org Page38 International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 experimental results are presented in section 4. The last section is devoted to the conclusion and further research. 2. BACKGROUND AND RELATED WORK Diabetes Mellitus (DM) is a major health problem in both industrial and developing countries and its incidence is rising [1], [2]. Many classification algorithms have been applied on this area trying to classify the patients or predict their future state. This section will introduce some of these works. A brief review and discussion of the philosophy, capabilities, and limitations of Artificial Neural Network (ANN) in medical diagnosis through selected examples including DM was introduced in [3]. A hybrid binary classification model using the basic concepts of soft computing and ANN was proposed in [5]. A novel machine learning algorithm termed ”mixture of expert” was used for the determination of a patient’s diabetic state [7]. A model using ANN with RBF kernel and one hidden layer was proposed in [27]. The artificial metaplasticity on multilayer perceptron (AMMLP) was used as prediction model for diabetes. The best result obtained from AMMLP algorithm was 89.93% [12]. In [30] evaluation for the efficacy and safety of canagliflozin in subjects with T2DM and stage 3 chronic kidney disease was made using different classification techniques. ANN and multivariate logistic regression (MLR) models was proposed in [28]. A multilayer perception NN and a conditional logistic regression were used to predict albuminuria in type II DM [14]. Two statistical models were used to predict albuminuria in type II DM in [15]. A survey of more than one supervised and unsupervised algorithms was introduced in [20]. SVM technique was proposed for classification of DM patients. The results showed a sensitivity of 99.45% for the classifier and specificity of 100% [18]. A classification Algorithm based on Fuzzy systems, Evolutionary Algorithms (ACO) and ANN techniques was proposed [13]. In [7], Six different neural networks (Probabilistic Neural Network (PNN), Learning Vector Quantization (LVQ), FeedForward Networks (FFN), Cascade-Forward Networks (CFN),Distributed Time Delay Net-works (DTDN), Time Delay Networks (TDN)), artificial immune system and Gini algorithm from decision tree were used for DM patients classification. A comparative study of different classification techniques had been done in [19]. A study which worked on 1506 participants was held. The main outcome measures were age specific mortality rates due to cardiovascular disease and all causes [16]. In [25] A robust version of Support Vector Machine (SVM) based on Valueat-Risk (VaR) measure referred to as VaR-SVM was proposed. A hybrid model that integrates Genetic Algorithm and Back Propagation network (BPN) was proposed in [9]. A hybrid binary classification model was proposed for diabetes type II classification, based on the basic concepts of soft computing and artificial intelligence techniques [11] . ISSN: 2231-2803 2.1 Modified Particle Swarm Optimization Particle Swarm Optimization (PSO) is an algorithm Inspired from the nature social behavior and dynamic movements and communications of insects, birds and fish [6], [23]. The main strength of PSO is its fast convergence, comparing with many global optimization algorithms like Genetic Algorithms (GA), Simulated Annealing (SA) and other global optimization algorithms. The key concept is dealing with changes in velocity. In general, the main idea of PSO is as follows. For the particle in d dimension, it could update its velocity and position using, (1) and,(2). Where and are two random numbers in the range[0, 1], is the momentum, is the interia weight, is the cognitive learning parameter and is the social collaboration parameter. = ( , , … , ) is the position of the particle, = ( , , … , ) represents the best previous position (i.e. the position with the highest fitness value). = = ( + − )+ − + (1) (2) Inertia Weight plays an important role in the process of providing balance between exploration and exploitation. It determines the contribution rate of a particles previous velocity to its velocity at the current time step. In [5] different types of inertia weights were mentioned like Constant, Random, Adaptive inertia weight and many other types. In [29] a modified version of PSO was proposed, The main idea of this modified version is as in the following equations. For the particle in dimention, it could update its velocity and position using,(3) and,(4) = [ = where (5) = + ( ) − )+ − ] (3) (4) is a convergence factor, which can be calculated using, | Where ( + | = (5) + In the proposed Algorithm could be calculated using,(6) where t is the iterator over all iterations and is the maximum number of iterations. With the increasing of , parameter will be decreased linearly from 0.9 to 0.4 [5]. = . − ∗ . (6) The Modified-PSO algorithm steps is illustrated in Algorithm-1 with random inertia weight [29]. ____________________________________________________ http://www.ijcttjournal.org Page39 International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 Algorithm-1: Modified-PSO Step 1: Initialize population of particles ( ) which consists of random positions , , … , and velocities ( ) are made up of the particle’s initial velocity , , … , on n dimensions. Step 2: Evaluate the fitness for each particle. Step 3: For each particle, find the maximum fitness and compare ), then it to the best found so far (pbest), if ( ) < ( ( )= Step 4: Set equals to the location of the maximum fitness value Step 5: Compare fitness evaluation with the population’s overall previous best. If current value is better than , then reset to the current particle’s array index and value. Step 6: Calculate the convergence factor using,(5) Step 7: Calculate the Inertia weight using,(6) Step 8: Update the position of the particle according to, (3) and, (4) and the new population ( + 1) will be generated. Step 9: Adjust the acceleration of the particles using, (7) > = (7) − < − Step 10: Loop to step (2) until stopping criterion is satisfied (Reach a maximum number of iterations ) ____________________________________________________ 2.2 Least Squares Support Vector Machine Least Squares-Support Vector Machine (LS-SVM ) classifier is one particular sample of Support Vector Machine (SVM) [31], [24]. One could finds the solution in LS-SVM by solving a set of linear equations instead of a convex quadratic programming problem for classical SVMs, The main target of LS-SVM is finding an optimal hyper plane, which separates various classes. It obtains this optimal hyper-plane by using maximum Euclidean distance to the nearest point. The LS-SVM classifier maps the input vectors into a high dimensional feature space for non-separable data. Then, the LS-SVM classifier finds an optimal separating hyper-plane in this higher dimensional space [22]. Given a training dataset of points { , } with input data and output , we consider the following optimization problem in primal weight space: ∑ ( , ) , , = + (8) such that −( + )= , = , ,… (9) Where is a regularization factor, the difference between the desired output and the actual output, and (. )is a nonlinear function mapping the data points into a high dimensional Hilbert space; in addition, the dot product in the high-dimensional space is equivalent to a positive definite kernel function , = ( ) ( ). In primal weight space, a linear classifier in the new space takes the following form Where is the weight vector and which called as the bias term. ( )= ( . ( )+ ) (10) ISSN: 2231-2803 The dual space of this primal space was found by solving the Lagrangian function in, (11) ( , , ∝) = ( , ) − ∑ ( )+ ∝ ( − ) (11) Where ∝ are Lagrangian multipliers and are called Support Vectors. The optimal solution for objective function in, (11) must satisfy the following Karush-Kuhn Tucker (KKT) conditions [22]. =∑ = → = →∝ = = → ( ( , = ,…, )+ − ) = , (12) = ,… The linear system in, (13) will results after elimination of w and e which generates the Support Vector ∝ + = (13) Where = [ , , … , ] , ∝= [∝, ∝ , … , ∝ ] and is the kernel matrix. The resulting LS-SVM model for function estimation is as in, (14) where (. , . ) is the kernel function. ( )= ∑ ∝ ( , ) (14) LS-SVM (Algorithm-2) was implemented using Ra-dial Basis Function (RBF), (15) [22]. | | ( , )= (− ) (15) ___________________________________________________ Algorithm-2: LS-SVM: Step 1: Load the training data set of n data points, { , } where is the input vector and is the corresponding target with values {−1, +1}. Step 2: Generate random weights for each input data point. Step 3: Determine the value of the bias term b and initialize the error e for each point randomly. Step 4: Initialize and using random values. Step 5: Search for values of e, w and b that minimize the objective function, (8) and, (9). Step 6: Construct the Lagrangian function in, (11) with the solution that must satisfy the KKT conditions in the set of, (12). Step 7: Calculate number of support vectors( ∝) using, (13). Step 8: Training data for LS-SVM model could be classified using, (14) with RBF kernel function, (15). Step 9: Classify any new point by, (10) using RBF kernel function, (15) . Step 10: Loop until stopping criteria is met, usually until reach the maximum number of iterations. ____________________________________________________ The proposed algorithm worked on 768 record from Pima Indians Diabetes Data set which contains 8 features as shown in http://www.ijcttjournal.org Page40 International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 TABLE (I). Among those 768 cases, there are 500 healthy case and 268 suffered from DM. TABLE І. PIMA INDIANSDIABETESDATA SET Feature Number Feature Name 1 Number of times pregnant. 2 Plasma glucose concentration a 2 h in an oral glucose tolerance test. 3 Diastolic blood pressure. 4 Triceps skin fold thickness. 5 2-h serum insulin. 6 Body mass index. 7 Diabetes pedigree function 8 Age Class Label 0 if patient and 1 if healthy 3. PROPOSED ALGORITHM In light of the previous literature review and background, A hybrid classification algorithm which integrates Modified- PSO algorithm as a parameters optimization technique and LS-SVM for classification was proposed. The proposed algorithm for DM diagnosis and treatment is composed of two main phases, Parameters Optimization and Classification. Modified-PSO algorithm was used as a parameters optimization technique aiming to improve the sitting of the parameter values of LS-SVM. Hence, overcoming it’s sensitivity to the parameter values changes. Classification phase using LS-SVM technique consists of two main phases, Training phase followed by a Testing phase. A block diagram of the algorithm is Depicted in Fig(1). Fig. 1. Block diagram of the proposed algorithm The aim of parameters optimization phase using Modified-PSO (Section 2.1) is to find the optimal values for the parameters of the LS-SVM classifier (The regularization factor ( ) and Gaussian Kernel function ( ). The second phase utilizes LS-SVM to classify the DM patients into one of two classes (Live/Die) using the ISSN: 2231-2803 optimized parameters. Algorithm-3 illustrates the proposed algorithm in details. _____________________________________________ Algorithm-3: Proposed Algorithm: Step 1: Load the data set of n data points, { , } where is the input vector and is the corresponding target with values {−1, +1}. Step 2: Generate random weights for each input data point. Step 3:Initialize the bias term b and the error e for each point randomly. Step 4: Find the optimal values for and using algorithm 1. Step 5: Find optimal values of ( , ) for the objective function in, (8) and, (9). Step 6: Calculate number of support vectors (∝)using, (13) Step 7: Classify any new point by, (10) using RBF kernel function, (15) Step 8: Loop until stopping criteria is met, usually until reach the maximum number of iterations. _______________________________________________ 4. EXPERIMENTAL RESULTS As mentioned before, the proposed algorithm worked on Pima Indians Diabetes Data Set. Some of the records in this data set contains zeros in some features. Cells with zero entry were kept unchanged (neither deleted nor filled) [13]. The input for the Modified-PSO algorithm is total of 768 records. About 768 random individuals are generated in the search space for 100 Iterations. The output from the Modified-PSO is the optimal values for and , which are 100 and 0.5 respectively. LS-SVM classifier is run with the optimized parameters and RBF kernel function, (15), seeking to find the optimal hyperplan that separates the search space into 2 classes (Live, Die) by finding the optimal values for (w, e and b) in the objective function, (8) and, (9) In order to evaluate the performance of the proposed Algorithm, the classification accuracy was calculated using, (16). Where TP and TN stand for True Positive and True Negative which are the proportion of positive and negative cases that were correctly identified respectively. Positive cases are the records with Live label and negative ones are with Die label. FP and FN stand for False Positive and False Negative which are the proportion of negative cases that were incorrectly classified as positive and the proportion of positive cases that were incorrectly classified as negative respectively [13]. = http://www.ijcttjournal.org (16) Page41 International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 The training phase was implemented using 10-fold Cross Validation (CV) method which breaks the data set into 10 sets of size n/10, train on 9 data sets and test on 1, then repeat this process 10 times and take a mean accuracy [17]. The mean classification accuracy for LS-SVM is 97.833%, which obtained from the RBF kernel function, (15). TABLE (II) shows the accuracy for every fold while applying 10-fold CV, It’s obvious that the average accuracy over all folds is 97.833%. Fold 1 2 3 4 5 6 7 8 9 10 TABLE II. ACCURACY OF 10-FOLD CV Accuracy 93.993% 95.973% 96.889% 99.9769% 97.991% 98.698% 96.999% 99.988% 99.99% 97.83% Fig. 2. Average Classification Accuracy of DM using the proposed algorithm and other classification algorithms The proposed Algorithm is compared with different recently classifier Algorithms which were applied on the same database, as shown in TABLE (III). These techniques are multilayer perceptron (AMMLP) [12], Fuzzy, Decision Tree, ACS and ANN [13], 6 different ANN types and AIS technique [7], Also, GA and ANN [9], MLP and other techniques [11] and Different Evolutionary algorithms with different tools [19]. TABLE III. AVERAGECLASSIFICATIONACCURACY OF THE PROPOSED ALGORITHM AND OTHER CLASSIFCATION ALGORITHMS WITH THE NUMBER OF USED RECORDS CI Technique ANN and AIS [7] MLP/BN/J48graft/JRip and FLR [19] MLP, SVM, KNN,QDA and LDA [11] GA and ANN [9] AMMLP [12] Fuzzy, DT, ACS and ANN [13] The Proposed Algorithm maximum average classification accuracy of 97.833% over other algorithms. TABLE(III) also articulates the average classification accuracy obtained from all algorithms in addition to the number of records used from Pima Indians Diabetes Data set in each algorithm. Accuracy 76% 81.33% Diagnosed Patients 768 Patients 768 Patients 82.4% 768 Patients 84.713% 89.93% 95.852% 97.833% 392 Patients 768 Patients 247 Patients 768 Patients 5. CONCLUSION AND FUTURE WORK This paper introduced a hybrid classification Algorithm for DM patients. The proposed Algorithm integrates modified version of PSO and LS-SVM algorithm. The proposed algorithm was composed of two main phases which are Parameters Optimization and Classification. Classification had two main phases, Training phase followed by a phase of Testing the algorithm. The input parameters for LS-SVM were optimized using modified version of PSO algorithm. The LS-SVM algorithm was used to classify DM patients into one of two classes (Live/Die). Modified-PSO could guarantee the robustness of the hybrid algorithm by searching for the optimal values for LS-SVM parameters. Optimizing the parameters could minimize the classification time by avoiding making trial and error while targeting the optimal values for LS-SVM parameters. The proposed algorithm was implemented on Pima Indians Diabetes Data set from UCI repository of machine learning databases. The average classification accuracy of LS-SVM method with RBF kernel was 97.833% which is the best while compared with other algorithms which worked on the same data set. As a future work, Ant Colony System (ACS) could be used as an optimization technique. Also, other kernel functions could be applied in the classification phase. Fig(2) demonstrates the results of the average classification accuracy of the proposed algorithm against the accuracy of other classification algorithms applied on the same data set. Results show the effectiveness of the proposed Algorithm, which has the ISSN: 2231-2803 http://www.ijcttjournal.org Page42 International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 REFERENCES [1] Centers for disease control and prevention, national diabetes, fact sheet, www.cdc.gov/diabetes (2011). [2] World health organization, diabetes center, fact sheet n312,www.who.int/mediacentre/factsheets/fs312/en (2011). [3] Qeethara Kadhim Al-Shayea. Artificial neural networks in medical diagnosis. International Journal of Computer Science, 8(2):150–154, 2011. [4] Kurt George Matthew Mayer Alberti and PZ Zimmet. Definition, diagnosis and classification of diabetes mellitus and its complications. part 1: diagnosis and classification of diabetes mellitus. provisional report of a who consultation. Diabetic medicine, 15(7):539–553, 1998. [5] JC Bansal, PK Singh, Mukesh Saraswat, Abhishek Verma, Shimpi Singh Jadon, and Ajith Abraham. Inertia weight strategies in particle swarm optimization. In Nature and Biologically Inspired Computing (NaBIC), 2011 Third World Congress on, pages 633– 640. IEEE, 2011. [6] James Blondin. Particle swarm optimization: A tutorial. from site: http://cs. armstrong. edu/saad/csci8100/pso tutorial. pdf, 2009. [7] Mehmet Recep Bozkurt, Nil¨ufer Yurtay, Ziynet Yılmaz, and Cengiz Sertkaya. Comparison of different methods for determining diabetes disease, 2013. [8] SETTING IN DIABETES MELLITUS CARE. Guidelines for improving the care of the older person with diabetes mellitus. Hypertension, 16:2, 2003. [9] Asha Gowda Karegowda, AS Manjunath, and MA Jayaram. Application of genetic algorithm optimized neural network connection weights for medical diagnosis of pima indians diabetes. International Journal on Soft Computing, 2(2):15– 23, 2011. [12] Alexis Marcano-Cede˜no, Joaqu´ın Torres, and Diego Andina. A prediction model to diabetes using artificial metaplasticity. In New Challenges on Bioinspired Applications, pages 418– 425. Springer, 2011. [13] Javad Haddadnia Hadi Varharam Mohammad Fiuzy, Azam Qarehkhani. Introduction of a method to diabetes diagnosis according to optimum rules in fuzzy systems based on combination of data mining algorithm (d-t), evolutionary algorithms (aco) and artificial neural networks (nn). The Journal of Mathematics and Computer Science (JMCS), 6(4):272–285, 2013. [14] Afsaneh Morteza, Manouchehr Nakhjavani, Firouzeh Asgarani, Filipe LF Carvalho, Reza Karimi, and Alireza Es-teghamati. Inconsistency in albuminuria predictors in type2 diabetes: a comparison between neural network and conditional logistic regression. Translational Research, 2013. [15] KJ Mukamal, JR Kizer, L Djouss´e, JH Ix, S Zieman, DS Siscovick, CT Sibley, RP Tracy, and AM Arnold. Prediction and classification of cardiovascular disease risk in older adults with diabetes. Diabetologia, 56(2):275–283, 2013. [16] Elin Olafsdottir, Thor Aspelund, Gunnar Sigurdsson, Rafn Benediktsson, Bolli Thorsson, Tamara B Harris, Lenore J Launer, Gudny Eiriksdottir, and Vilmundur Gudnason. Sim-ilar decline in mortality rate of older persons with and without type 2 diabetes between 1993 and 2004 the icelandic population-based reykjavik and ages-reykjavik cohort studies. BMC public health, 13(1):36, 2013. [17] Rachel O’Reilly. Cross-validation for model selection in model-based clustering. 2012. [18] R Priya and P Aruna. Review of automated diagnosis of diabetic retinopathy using the support vector machine. International Journal of Applied Engineering Research, Dindigul, 1(4):844–863, 2011. [19] Rashedur M Rahman and Farhana Afroz. Comparison of various classification techniques using different data mining tools for diabetes diagnosis. 2013. [10] A Keech, RJ Simes, P Barter, J Best, R Scott, Marja-Riitta Taskinen, P Forder, A Pillai, T Davis, P Glasziou, et al. Effects of long-term fenofibrate therapy on cardiovascular events in 9795 people with type 2 diabetes mellitus (the field study): randomised controlled trial.Lancet, 366(9500):1849– 1861, 2005. [20] Devang Odedra Shankaracharya, Subir Samanta, and Ambar-ish S Vidyarthi. Computational intelligence in early diabetes diagnosis: a review. The review of diabetic studies: RDS, 7(4):252, 2010. [11] Mehdi Khashei, Saeede Eftekhari, and Jamshid Parvizian. Diagnosing diabetes type ii using a soft intelligent binary classification model. Review of Bioinformatics and Biomet-rics, 1(1), 2012. [21] Devang Odedra Shankaracharya, Subir Samanta, and Ambar-ish S Vidyarthi. Computational intelligence-based diagnosis tool for the detection of prediabetes and type 2 diabetes in india. The review of diabetic studies: RDS, 9(1):55, 2012. ISSN: 2231-2803 http://www.ijcttjournal.org Page43 International Journal of Computer Trends and Technology (IJCTT) – volume 8 number 1– Feb 2014 [22] Xigao Shao, Kun Wu, and Bifeng Liao. Single directional smo algorithm for least squares support vector machines. Computational intelligence and neuroscience, 2013, 2013. [23] Yuhui Shi et al. Particle swarm optimization: developments, applications and resources. In Evolutionary Computation, 2001. Proceedings of the 2001 Congress on, volume 1, pages 81–86. IEEE, 2001. [24] Johan AK Suykens and Joos Vandewalle. Least squares support vector machine classifiers. Neural processing letters, 9(3):293–300, 1999. [25] Peter Tsyurmasto, Michael Zabarankin, and Stan Uryasev. Value-at-risk support vector machine: Stability to outliers. 2013. [26] Jaakko Tuomilehto, Jaana Lindstr¨om, Johan G Eriks-son, Timo T Valle, Helena H¨am¨al¨ainen, Pirjo Ilanne-Parikka, Sirkka Kein¨anen-Kiukaanniemi, Mauri Laakso, Anne Louheranta, Merja Rastas, et al. Prevention of type 2 diabetes mellitus by changes in lifestyle among subjects with impaired glucose tolerance. New England Journal of Medicine, 344(18):1343–1350, 2001. [27] P Venkatesan and S Anitha. Application of a radial basis function neural network for diagnosis of diabetes mellitus. CURRENT SCIENCE-BANGALORE-, 91(9):1195, 2006. [28] Chongjian Wang, Linlin Li, Ling Wang, Zhiguang Ping, Muanda Tsobo Flory, Gaoshuai Wang, Yuanlin Xi, and Wenjie Li. Evaluating the risk of type 2 diabetes mellitus using artificial neural network: An effective classification approach. Diabetes research and clinical practice, 2013. [29] Weiwei Wang, Jie Cao, Hongke Lu, and Jian Wang. A default discrimination method for manufacturing companies by improved pso-based ls-svm. [30] J-F Yale, George Bakris, Bertrand Cariou, Dennis Yue, Elias David-Neto, Liwen Xi, Katherine Figueroa, Ewa Wajs, Keith Usiskin, and Gary Meininger. Efficacy and safety of canagliflozin in subjects with type 2 diabetes and chronic kidney disease. Diabetes, Obesity and Metabolism, 2013. [31] Jieping Ye and Tao Xiong. Svm versus least squares svm. In International Conference on Artificial Intelligence and Statistics, pages 644–651, 2007. ISSN: 2231-2803 http://www.ijcttjournal.org Page44
9cs.NE
On the Value and Limits of Multi-level Energy Consumption Static Analysis for Deeply Embedded Single and Multi-threaded Programs Kyriakos Georgiou, Steve Kerrison, Kerstin Eder arXiv:1510.07095v1 [cs.PL] 24 Oct 2015 University of Bristol Abstract. There is growing interest in lowering the energy consumption of computation. Energy transparency is a concept that makes a program’s energy consumption visible from software to hardware through the different system layers. Such transparency can enable energy optimizations at each layer and between layers, and help both programmers and operating systems make energy aware decisions. The common methodology of extracting the energy consumption of a program is through direct measurement of the target hardware. This usually involves specialized equipment and knowledge most programmers do not have. In this paper, we examine how existing methods for static resource analysis and energy modeling can be utilized to perform Energy Consumption Static Analysis (ECSA) for deeply embedded programs. To investigate this, we have developed ECSA techniques that work at the instruction set level and at a higher level, the LLVM IR, through a novel mapping technique. We apply our ECSA to a comprehensive set of mainly industrial benchmarks, including single-threaded and also multi-threaded embedded programs from two commonly used concurrency patterns, task farms and pipelines. We compare our ECSA results to hardware measurements and predictions obtained based on simulation traces. We discuss a number of application scenarios for which ECSA results can provide energy transparency and conclude with a set of new research questions for future work. 1 Introduction A substantial amount of effort has been invested into predicting the execution time of a program. However, there is little in the complementary area of energy consumption. Such information can be of significant value during the development and life time of critical systems. For example, energy consumption information can be crucial for devices that depend on unreliable, limited sources of power such as energy harvesters. Giving consideration to the energy consumption of a system at development time can avoid potential system failures due to inadequate energy supply at runtime. For systems that operate on a battery, this can provide a good approximation of the time frame in which the battery needs replacement. 2 K. Georgiou et al. The energy consumption of a program on specific hardware can always be determined through physical measurements. Although this is potentially the most accurate method, it is often not easily accessible. Measuring energy consumption can involve sophisticated equipment and special hardware knowledge. Custom modifications may be needed to probe the power supply. These conditions make it very difficult for the majority of software developers to assess a program’s energy consumption. Static Resource Analysis (SRA) provides an alternative to measurement. Significant progress has been made in the area of Worst Case Execution Time (WCET) prediction using static techniques that determine safe upper bounds for the execution time of programs. This naturally leads to the question of whether similar techniques can be used to bound the energy consumption of programs, and, if so, how effective they can be. A popular approach used for WCET is the Implicit Path Enumeration Technique (IPET), which retrieves the worst case control flow path of programs based on a timing cost model. Instead, in [1], an energy model that assigns energy values to blocks of Instruction Set Architecture (ISA) code is used, and the authors claim to statically estimate Worst Case Energy Consumption (WCEC). However, in contrast to timing, energy consumption is data sensitive, i.e. the energy cost of executing an instruction varies depending on (the circuit switching activity caused by) the operands used. This effect is not captured in non data sensitive energy models, i.e. models that assign a single energy consumption value to each entity, e.g. to each instruction. Such models typically are characterized based on averages obtained from measuring the energy consumed when random data is being processed [2]. Alternatively, the highest energy consumption measured could be used for model characterization. As a consequence, when a non data sensitive energy model is used, the safety of the bounds retrieved from a worst case path static analysis might be undermined by worst case data scenarios for models that provide average energy consumption costs. On the other hand, the use of worst case models is known to lead to over-estimations [3] affecting the tightness of the retrieved bounds, because it is unlikely that the data that triggers the worst case energy consumption for one instruction also does this for all subsequent instructions in a program. This problem applies to all previous works that perform static analysis for energy consumption, as they combine non data sensitive bound analysis techniques with non data sensitive energy models. In [1] static analysis for WCEC is claimed by maximising the switching activity factor for each simulated component. However, the model abstraction level used does not guarantee that a physical implementation would behave in this way. We use a model with a similar constraint, where the data input that would trigger the worst case per instruction is not known, and so cannot assert the results to be WCEC. In this paper we thoroughly investigate the value and limitations of using IPET in combination with non data sensitive energy models to perform Energy Consumption Static Analysis (ECSA) in the context of deeply embedded hardware, in our case the XMOS XS1-L “Xcore” [4]. The Xcore is a multi-threaded Energy Consumption Static Analysis 3 deeply embedded processor with time-deterministic instruction execution. Such systems are simpler than general purpose processors and favor predictability and low energy consumption over maximizing performance. The absence of performance enhancing complexity at the hardware level, such as caches, provides us with an ideal setting to evaluate ECSA. We base our investigation on an ISA-level multi-threaded energy model for the Xcore [5]. This model was characterized using constrained pseudorandom input data and associates a single averaged energy cost with each instruction in the XMOS ISA. We refined this model to one that is well suited for ECSA as it represents both static and dynamic power contributions to better reflect inter-instruction and inter-thread overheads; this improved model accuracy by an average of 4%. In addition to using this model for ECSA, we also used it to compare ECSA results with predictions based on statistics obtained from simulation traces. For our study we have developed an IPET-based ECSA, which we use together with the non data sensitive ISA-level energy model described above, to predict the energy consumption of single and multi-threaded programs. With respect to the latter we focus on two commonly used concurrency patterns in embedded programs, task farms and pipelined programs with evenly distributed workloads across threads. In addition, we have developed a novel mapping technique to lift our ISA-level energy model to a higher level, the intermediate representation of the compiler, namely LLVM IR [6], implemented within the LLVM tool chain [7]. This enables ECSA to be performed at a higher level than ISA, thus introducing energy transparency into the compiler tool chain by making energy consumption information accessible directly to the optimizer. Performing ECSA on multi-threaded programs and at the LLVM IR allows a comprehensive analysis of the energy consumption predictions that can be obtained using this technique. Our ECSA technique is evaluated using a set of single- and multi-threaded benchmarks, mainly selected from a number of industrial embedded applications. Our results show that accurate energy estimations can be retrieved at the ISA level. The mapping technique allowed for energy consumption transparency at the LLVM IR level, with accuracy keeping within 1% of ISA-level estimations in most cases. The main contributions of this paper are: 1. Modeling the target architecture to capture its behavior statically, including refinement of an existing ISA-level energy model, improving its accuracy by around 4% (Section 3.1); 2. Formalization and implementation of a novel mapping technique that lifts an ISA-level energy model to a higher level, the intermediate representation of the LLVM compiler, which allows ECSA of programs at the LLVM IR level (Section 3.2); 3. ECSA on a set of multi-threaded programs (Section 3.5), focusing on task farms and pipelines, two commonly used concurrency patterns in embedded computing; 4 K. Georgiou et al. 4. Comprehensive evaluation of our ECSA on a set of industrial benchmarks and detailed analysis of results (Section 4.2); 5. Discussion of the practical value and limitations of how such analysis can be useful for software developers, compiler engineers, development tools and Real Time Operating Systems (RTOS) (Section 4.3). The rest of the paper is organized as follows. Section 2 critically reviews previous work on energy modeling and SRA, with a focus on SRA for energy consumption and the effects of combining non data sensitive bound analysis techniques with non data sensitive energy models. Section 3 introduces in detail the components of our analysis, in particular the formalization and implementation of our mapping technique, and how ECSA can be applied to multi-threaded programs. Our experimental evaluation methodology, benchmarks and results are presented and discussed in Section 4. Section 5 concludes the paper, outlines opportunities for future work and raises a number of research questions to stimulate further research in ECSA. 2 Background The work presented in this paper builds upon two areas: processor energy modeling and SRA. This section establishes the background work of both. 2.1 Energy modeling of embedded processors Energy modeling can be performed at various levels of abstraction, from gateor transistor-level in detailed hardware simulation [8], up to high-level modeling of whole applications. Although the hardware components are responsible for power dissipation and thus consumption of energy, the behavior of that hardware is largely controlled by the software running upon it. As such, writing software that makes efficient use of the underlying hardware has been identified as the most important step in energy efficient software development [9]. For energy modeling to be useful to a software developer, models must convey information that can be related to the code the developer is writing. The ISA is a practical level of abstraction for energy modeling of software, because it expresses the underlying operations performed by the hardware and its relationship with the intent of the software. In [2] an ISA-level energy model is proposed that obtained energy consumption data through hardware measurements of large loops of individual instructions. The total cost of a program is composed of instruction costs, inter-instruction costs (the effects of switching from one instruction to the next), and externally modeled behaviour such as activity in the memory hierarchy. This work was initially applied to x86 and SPARC architecture processors, operating with an accuracy of within 10% of the hardware. It was extended to form a framework for architecture-level power analysis, Wattch [10]. The Sim-Panalyser [11] uses a similar approach, built on top of the SimpleScalar architecture simulation framework [12]. Energy Consumption Static Analysis 5 If additional characteristics of processor activity are considered, such as bitflips in the data-path, a more accurate data-dependent model can be produced, such as that of [13, 14]. This requires more detailed information from simulation in order to supply additional model parameters, but has been demonstrated to bring accuracy to within 1.7% of the hardware. It is still an abstraction away from the internal switching activity of functional units, however. Observing the results in [15], some functional units may be more dependent on their internal structure than input/output Hamming weight with respect to data-dependent power. Using similar approaches to Steinke and Tiwari, additional processor architectures such as VLIW DSPs have also been modeled, with 4.8% [16] and 1.05% [17] accuracy. Alternative approaches to modeling include representing activity in terms of the processor’s functional blocks [17], energy profiling of the most commonly used software library functions [18], and construction of model parameters through linear regression [19]. In [1], a micro-architectural energy model was created, considering functional units activity, clock gating and pipeline progression for a simulated processor. This model was used for WCEC static analysis. To retrieve safe bounds, the switching activity factor was set to the maximum, 1.0, for each component. This led to significant energy consumption over-estimations in some cases, up to 33%, and assumes that the model accurately reflects a physical implementation. In architectures where performance counters are available, these can be used to characterize the processor energy consumption based on the conditions affecting these counters, such as cache misses and pre-fetches. Simulations that model these performance events can then be used to predict the energy consumption of an application. This has been applied to processors of various levels, from embedded XScale [20] to Xeon Phi accelerators [21]. The discussed approaches achieve varying levels of accuracy, all within a 10% error margin. The comparison points vary between methods, so the accuracies are not necessarily directly comparable. However, the prior work motivates new models to achieve a similar margin. In many of the above examples, the models target a ‘typical’ energy characterization, where the modeled energy consumption is based on random or non-exhaustive input data sets. For a given application, some additional error margin will be introduced based on the particular characteristics of its dataset. This forms a part of the model error, in addition to the errors arising from the abstractions applied in each model type. The work presented in this paper, which examines multiple abstraction levels, seeks to identify each point at which inaccuracies may be introduced into the estimation process. This is important to assesses usefulness of estimations produced by static analysis, and will be discussed in Section 4.2 2.2 Static Resource Analysis SRA is a methodology to determine the usage of a resource (usually time or energy or both) for a specific task when executed on a piece of hardware, without actually executing the task. This requires accurate modeling of the hardware’s 6 K. Georgiou et al. behavior in order to capture the dynamic functional and non-functional properties of task execution. Determining these properties accurately is known to be undecidable in general. Therefore, to extract safe values for the resource usage of a task, a sound approximation is needed [22, 23]. SRA has been mainly driven by the timing analysis community. Static cost analysis techniques based on setting up and solving recurrence equations date back to Wegbreit’s [24] seminal paper, and have been developed significantly in subsequent work [25, 26, 27, 28, 29, 30]. Other classes of approaches to cost analysis use dependent types [31], SMT solvers [32], or size change abstraction [33]. For performing an accurate WCET static analysis, there are four essential components [22]: 1. Value analysis: mainly used to analyze the behavior of the data cache. 2. Control flow analysis: used to identify the dynamic behavior of a program. 3. Low level or processor behavior analysis: attempts to retrieve timing costs for each atomic unit on a given hardware platform, such as an instruction or a basic block (BB) in a Control Flow Graph (CFG) for a processor. 4. Calculation: uses the results from the two previous components to estimate the WCET. Most common techniques used for calculation of the WCET are the IPET, the path-based techniques and the tree-based methods [34]. Three of the above components, namely the control flow analysis, low level analysis and calculation, are adopted in our work and will be further explained in Section 3. IPET is one of the most popular methods used for WCET analysis [35, 36, 37, 34, 38]. In this approach, the CFG of a program is expressed as an Integer Linear Programming (ILP) system, where the objective function represents the execution time of the program. The problem then becomes a search for the WCET by maximizing the retrieved objective function under some constraints on the execution counts of the CFG’s basic blocks. The main advantage of this technique is the ability to determine the basic blocks in the worst case execution path and their respective execution counts without the need to extract the explicit worst execution path (ordered list of the executed basic blocks). This is more efficient than path based techniques for retrieving WCET bounds [34]. In the presence of caches or a complex processor pipeline, the ILP solving complexity can increase dramatically, making IPET not practical for WCET. Abstract interpretation [39], a technique used to facilitate data flow analysis, can then be used in conjunction with IPET to allow WCET in such cases [36]. Although significant research has been conducted in static analysis for the execution time estimation of a program, there is little on energy consumption. One of the few approaches [40] seeks to statically infer the energy consumption of Java programs as functions of input data sizes, by specializing a generic resource analyzer [29, 41] to Java bytecode analysis [42]. However, a comparison of the results to actual measurements was not performed. Later, in [43], the same generic resource analyzer was instantiated to perform energy analysis of XC programs [44] at the ISA level based on ISA-level energy models and including a comparison to actual hardware measurements. However, the scope of this Energy Consumption Static Analysis 7 particular analysis approach was limited to a small set of simple benchmarks because information required for the analysis of more complex programs, such as program structure and types, is not available at the ISA level. The analysis presented in this paper does not rely on such information. A similar approach, using cost functions, was used in [45]. The analysis was performed at the LLVM IR level, using the mapping technique that we formalise and describe in full detail for the first time in this paper. Although the range of programs that could be analyzed was improved compared to [43], the complexity of solving recurrence equations for analysing larger programs proved a limiting factor. In [1] the WCEC for a program was inferred by using the IPET first introduced in [35]. They claim WCEC analysis, and experimental results indicate that all energy estimations over-approximate the energy consumptions retrieved from simulation. However, infeasible paths were not excluded from analysis, and there is no guarantee that the comparison test cases used in simulation were the actual worst cases. Similarly, in [46] the authors attempt to perform static worst case energy consumption analysis for a simple embedded processor, the Cortex M0+. This analysis is also based on IPET combined with a so called absolute energy model, an energy model that is said to provide the “maximum energy consumption of each instruction”. The authors argue that they can retrieve a safe bound. However, this is demonstrated on a single benchmark, bubblesort, only. The bound is 19% above a single hardware measurement; the authors acknowledge that this approach leads to over-approximations. Furthermore, the hardware measurement used as a base line to evaluate the prediction obtained from static analysis only captures the algorithm’s worst case complexity scenario, no information is given on the actual data to provide insight into the effect of data switching activity on energy consumption. This can be misleading, since two sets of different input data might have the same algorithmic worst case behavior, but can be very different with respect to their total energy consumption. In practice, this gives rise to a range of energy consumption measurements for different input data all triggering the algorithmic worst case path. For instance, for the Xcore architecture the energy consumption of the MatMult 4 threads benchmark [47] for the same size of matrices, ranges from 4.1 to 4.9 nJ depending on the used data. We have closely investigated this and discuss our findings in Figure 5. All of the reviewed previous works for static energy consumption analysis used worst case path analysis methods combined with non input patterndepended energy models. Currently, there is no practical method to perform average case static analysis [48]. One of the most recent works towards average case SRA, demonstrates that compositionality combined with the capacity for tracking data distributions unlocks the average case analysis, but novel language features and hardware designs are required to support these properties [49]. Furthermore, developing a data sensitive energy model requires detailed knowledge of and access to the RTL, since the power dissipation is highly depended on the switching activity inside the circuits [50]; this is a challenge in itself. This situation has motivated us to conduct a comprehensive study to fully understand the 8 K. Georgiou et al. value and limitations of ECSA, using IPET-based analysis in combination with a single cost energy model, for both single and multi-threaded code at the ISA and LLVM IR levels of abstraction. 3 Energy Consumption Static Analysis Fig. 1: Overview of our energy consumption static analysis. Figure 1 shows the ECSA process for both, analysis at ISA and LLVM IR level. The source code together with any user annotations (e.g. to provide loop bounds) is sent to the compiler which emits the LLVM IR and the ISA code. Low level analysis, analysis of program control flow and computation of the energy consumption estimations is then applied on both levels. For the LLVM IR analysis an extra step is required at the compilation phase for the energy characterization of the LLVM IR instructions as detailed in Section 3.2. In the rest of this section we briefly introduce each ECSA stage. 3.1 Low Level Analysis This stage aims to model the micro-architecture dynamic behavior of the processor based on an ISA-level energy model. XMOS Xcore ISA level Energy Modeling The Xcore processor is hardware multi-threaded, providing inter-thread communication and I/O port control directly in the ISA. It is event-driven; busy waiting is avoided in favor of hardware scheduled idle periods. This makes the Xcore well suited to embedded applications requiring multiple hardware interfaces with real-time responsiveness. The underlying energy model for this work is captured at the ISA level. Individual instructions from the ISA are assigned a single cost each. These can then be used to compute power or energy for sequences of instructions. The model also captures the cost of thread scheduling performed by the hardware, in accordance with a series of profiling tests and measurements, because it influences the energy consumption of program execution. Instructions from runnable threads are scheduled round-robin by the hardware. To avoid data hazards, the processor’s four stage pipeline may only contain one instruction from each thread. If the number of runnable threads is less than four, there will be empty pipeline stages. Energy Consumption Static Analysis 9 The modeling technique is built upon [2], as discussed in Section 2.1, which is adapted and extended to consider the scheduling behavior and pipeline characteristics of the Xcore [5]. A new version of this model that is well suited for static analysis has been developed. It represents energy in terms of static and dynamic power components to better reflect inter-instruction and inter-thread overheads. This has improved model accuracy by an average of 4%. Eprg = (Ps + Pdi )·Tidl +  X  Ps + Pi M N p O · 4 · Tclk , where Np = min(Nt , 4) Np i∈prg (1) In Equation (1), Eprg is the energy of a program, formed by adding the energy consumed at idle to the energy consumed by every instruction, i, executed in the program. At idle, only a base processor power, the sum of its static, Ps , and dynamic idle power, Pdi , is dissipated for the total idle time, Tidl . For each instruction, static power is again considered, with additional dynamic power for each particular instruction, Pi . The dynamic power contribution is then multiplied by a constant inter-instruction overhead, O, that has been established as the average overhead of instruction interleaving. This is then multiplied by a scaling factor to account for the number of threads in the pipeline, MNp . The result is divided by the number of instructions in the pipeline, which is at most four and is dependent upon the number of active threads, Nt . Each instruction completes in four cycles, so 4 · Tclk gives the energy contribution of the given instruction, based on the calculated power. When more than four threads are active, the issue rate of instructions per thread will be reduced. The energy model accounts for this with the min term in Equation (1). From a purely timing perspective, the latency between instruction issues for a thread is max (Nt , 4) · Tclk . This property means that instructions are time-deterministic, provided the number of active threads is known. A thread may stall in order to fetch the next instruction. This is also deterministic and can be statically identified [51, pp. 8–10]. These instruction timing rules have been used in simulation based energy estimation, and are also utilized in the multithreaded static analysis performed in this paper. Both simulation and static analysis must be able to determine Nt , the number of active threads, in order to accurately estimate energy consumption. A limited number of instructions can be exceptions to these timing rules. The divide and remainder instructions are bit-serial and take up to 32 cycles to complete. Resource instructions may block if a condition of their execution is not met, e.g. waiting on inbound communication causes the instruction’s thread to be de-scheduled until the condition becomes satisfied. This paper focuses its contributions on fully predictable instructions, with timing disturbances from communication forming future work. The cost associated with an instruction represents the average energy consumption obtained from measuring the energy consumed during instruction execution based on constrained pseudo-randomly generated operands using the setup described in [5]. Thus, this model does not explicitly consider the range of 10 K. Georgiou et al. input data values and how this may affect consumption. Empirical evidence indicates that such factors can contribute to the dynamic energy consumption [3]. The implications of using a random data constructed single value energy model with a bound SRA for ECSA are discussed in Section 4.2. Utilizing the Xcore energy model in static analysis To determine the energy consumption of a program based on Equation (1) the program’s instruction sequence, hi1 , . . . , in i, the idle time Tidl , and the number of active threads Np during instruction execution must be known. In [5] Instruction Set Simulation (ISS) was used to gather full trace data or execution statistics to obtain these parameters. In this work we use ISS only as a reference for comparison of ECSA results, with a second reference being direct hardware measurement. ECSA thus needs to extract the CFGs for each thread and identify the interleavings between them. This allows for each instruction in the program to identify the Np component in Equation (1). It also allows to estimate the total idle time, Tidl of the program. For single-threaded programs the energy characterization of the CFG is straightforward as there is no thread interleaving. The IPET can be directly applied on the energy characterized CFG to extract a path that bounds the energy consumption of the program, as described in Section 3.4. For arbitrary multi-threaded programs, energy characterizing the CFGs of each thread using static analysis is challenging. We have therefore concentrated on two commonly used concurrency patterns, task farms and pipelines, which we use with evenly distributed workloads across threads. In addition to the instructions defined in the ISA, a Fetch No-Op (FNOP) can also be issued by the processor. These occur deterministically [51, pp. 8–10]. FNOPs can have a significant impact on energy consumption, particularly within loops. To account for FNOPs in static analysis, the program’s CFG at ISA level is analyzed. An instruction buffer model is used to determine where FNOPs will occur in a basic block. However, one particular FNOP case is dependent on the dynamic branching behavior of the program, in which case we overestimate FNOPs. Further implementation details on FNOPs modeling can be found in [52]. 3.2 Mapping an ISA Energy Model to LLVM IR Although substantial effort has been devoted to ISA energy modeling, there is little research into modeling at higher levels of program representation, where precision can decrease. In [53], statistical analysis and characterization of LLVM IR code is performed. This is combined with instrumentation and execution on a target host machine to estimate the performance and energy requirements in embedded software. Transferring the LLVM IR energy model to a new platform requires performing the statistical analysis again. The mapping technique we present here is fully portable. It requires only the adjustment of the LLVM mapping pass to the new architecture. Furthermore, our LLVM IR mapping technique provides on-the-fly energy characterization that allows to take into Energy Consumption Static Analysis 11 consideration the compiler behavior, CFG structure, types and other aspects of instructions. Formal specification of the mapping Our mapping technique determines the energy characteristics of LLVM IR instructions. Thus, mapping links LLVM IR instructions with machine specific ISA instructions. ISA level energy models can then be propagated up to LLVM IR level, allowing energy consumption estimation of programs at that level. We formalize the mapping as follows. For a program P , let IRprogL = {1, 2, ..., n} (2) be the ID numbers of P ’s LLVM IR instructions and therefore IRprog = hir1 , ir2 , ..., irn i (3) is the sequence of LLVM IR instructions for P . Tarch (IRprog) = ISAprog (4) is an architecture specific compiler back end that can translate the IRprog to ISAprog = h(isa1 , m1 ), (isa2 , m2 ), ..., (isak , ml )i where m1 , m2 , ..., ml ∈ IRprogL (5) which is the sequence of ISA instructions for P , together with the ID of the LLVMIR instruction from which each isak originated. If an isak comes from more than one LLVM IR instructions, then Tarch chooses the ID of one of them to assign to isak . M(iri ) = {isaj |iri ∈ IRprog ∧ ISAprog = Tarch (IRprog) ∧ (isaj , i) ∈ ISAprog} and ∀ irn , irk ∈ IRprog ∧ irn 6= irk then M(irn ) ∩ M(irk ) = ∅ (6) is a mapping function that captures a 1:m relation from IRprog to ISAprog instructions. Therefore, X E(iri ) = E(isaj ) where iri ∈ IRprog ∧ isaj ∈ ISAprog ∧ S = M(iri ) (7) isaj ∈S represents the energy consumption of an LLVM IR instruction as the sum of the energy consumed by all ISA instructions associated with that LLVM IR instruction. By instantiating the above mapping to a specific architecture, LLVM IR energy characterization can be retrieved. The accuracy of this characterization can vary for different architectures. If the accuracy is not adequate, then a tunning phase can be introduced to account for any specific compiler or architecture behavior. An example of such tunning is given in the next section, which accounts for phi-nodes and FNOPs. 12 K. Georgiou et al. Xcore mapping instantiation and tuning In our case, the Tarch function is the XMOS tool chain lowering phase that translates the LLVM IR to Xcore specific ISA. Our mapping implementation leverages the debug mechanism in the XMOS compiler tool chain, in order to enable Tarch to assign to each ISA instruction the ID of the LLVM IR instruction it originated from. This is typically used by the programmer to identify and fix problems in application code. Debug symbols are created during compilation to assist with this. These symbols are propagated to all intermediate code layers and down to the ISA code. Debug symbols can express which programming language constructs generated a specific piece of machine code in a given executable module. In our case, these symbols are generated by the front end of the XMOS compiler in standard DWARF format [54]. These are transformed to LLVM metadata [55] and attached to the LLVM IR. During the lowering phase of compilation, LLVM IR code is transformed to a target ISA by the back end of the compiler, with debug information stored alongside it as LLVM metadata. Naturally, the accuracy of debug information in the output executable is reduced if the number of optimization passes is increased. This is due to portions of the initial LLVM IR either being discarded or merged during these passes. Tracking this information gives an n : m relationship between instructions at the different layers, because source code instructions can be translated to many LLVM IR instructions, and these again into many ISA instructions. This n : m relation prevents ECSA from providing accurate energy values and therefore the mapping introduced in Section 3.2, requires Equation (6) to create an 1:m relation between the LLVM IR and ISA code. To address this issue, we created an LLVM pass that traverses the LLVM IR and replaces source location information with LLVM IR location information. The location information represents the IRprogL in Equation (2). The LLVM pass runs after all optimization passes, just before emitting ISA code. The optimized LLVM IR is closer in structure to the ISA code than the unoptimized version. Using this method a 1 : m mapping between LLVM IR instructions and ISA instructions can be extracted by Equation (6). Once the mapping has been performed for a program, the energy values for groups of ISA instructions are aggregated and then associated with their single corresponding LLVM IR instruction using Equation (7). An example mapping is given in Figure 2. On the left hand side is a part of the LLVM IR CFG of a program, which represents the IRprog in Equation (3), along with the debug location, LLVMIRL in Equation (2), for each LLVM IR instruction. The right hand side shows the corresponding ISA CFG, together with the debug locations for each ISA instruction, given by Tarch . The coloring of the instructions demonstrates the mapping between the two CFGs’ instructions using Equation (6). Now, one LLVM IR instruction is matched to many ISA instructions, but each ISA instruction is mapped to only one LLVM IR instruction. Some LLVM IR instructions are not mapped, because they are removed during the lowering phase of the compiler. This mapping also guarantees that all 71 72 73 74 75 76 77 78 79 80 CFG edge LLVM IR to ISA Lowering ISA BB1 %i.0 = phi i32 [ %postinc, %LoopBody ], [ 0, %allocas ] %ic.0 = phi i32 [ %postdec, %LoopBody ], [ %2, %allocas ] %subscript3 = getelementptr [51 x [51 x i32]]* %d, i32 0, i32 %i.0 store i32 %i.0, i32* %subscript3, align 4 %postdec = add i32 %ic.0, -1 call void @llvm.dbg.value(metadata !{i32 %postdec}, i64 0, metadata !29) %postinc = add i32 %i.0, 1, !dbg !43 : 16 call void @llvm.dbg.value(metadata !{i32 %postinc}, i64 0, metadata !26) %zerocmp8 = icmp eq i32 %postdec, 0 br i1 %zerocmp8, label %ifdone, label %LoopBody 0x000102ee: ldw (ru6) r0, sp[0x1] 0x000102f0: bf (lru6) r0, 0x43 <.label16> 13 13 ISA BB2 10 11 12 13 13 0x000102f4: ldc (ru6) r0, 0x0 0x000102f6: ldaw (ru6) r11, sp[0x8] 0x000102f8: ldw (ru6) r1, sp[0x1] 13 13 72 ISA BB3 LLVM BB1 call void @llvm.dbg.value(metadata !2, i64 0, metadata !28) call void @llvm.dbg.value(metadata !{i32 %3}, i64 0, metadata !30) %zerocmp13 = icmp eq i32 %3, 0 br i1 %zerocmp13, label %ifdone30, label %LoopBody15 LLVM BB2 Energy Consumption Static Analysis 0x000102fa: fnop 0x000102fe: 0x00010300: 0x00010302: stw (l3r) r0, r11[r0] add (2rus) r0, r0, 0x1 sub (2rus) r1, r1, 0x1 bt (ru6) r1, -0x5 <.label17> 74 74 77 75 80 Phi-node adjustment Fig. 2: Fine grained 1:m mapping including our LLVM mapping pass. ISA instructions are mapped to LLVM IR, so there is no loss of recorded energy between the two levels. Additional optimizations are performed during the lowering phase from LLVM IR to ISA, such as peephole optimizations and target specific optimizations. These can affect the mapping, but not to the same degree as the LLVM optimizations. A tuning phase can be introduced after the mapping, to account for them. The mapping instantiation for the Xcore architecture was able to provide an average energy estimation deviation of 6% from the predictions on the ISA level. An additional tuning phase is introduced after the mapping, to account for specific compiler and architecture behavior. This improved the mapping accuracy, narrowing the gap between ISA and LLVM IR energy predictions to an average of 1% as discussed in 4.3. LLVM IR phi-nodes are an example of such tuning. Phi-nodes can be introduced at the start of a BB as a side effect of the Single Static Assignment (SSA) used for variables in the LLVM IR. A phi-node takes a list of pairs, where each pair contains a reference to the predecessor block together with the variable that is propagated from there to the current block. The number of pairs is equal to the number of predecessor blocks to the current block. A phi-node can create inaccuracies in the mapping when LLVM IR is lowered to ISA code that no longer supports SSA, because it can be hoisted out from its current block to the corresponding predecessor block. For blocks in loops this can lead to a significant analysis error. Whenever the tuning phase is able to track these cases, it can adjust the energy figures for each LLVM IR BB accordingly. An example of this is given in Figure 2 at debug location number 72. Its corresponding ISA instruction is hoisted out from the loop BB ISA BB3 and into ISA BB2. This is tracked by the mapping, and the equivalent hoisting is done at LLVM IR level, thus correctly assigning energy values to each LLVM IR block. Similar errors can be introduced by branching LLVM IR instructions with multiple targets, since in the Xcore 14 K. Georgiou et al. ISA only single target branches are supported. This is also handled during the mapping phase. As discussed in Equation (1), FNOPs can be issued by the processor and this can be statically determined at the ISA level. LLVM IR has no way to represent this. Ignoring them can therefore lead to a significant underestimation of energy at LLVM IR level. To address this, FNOPs in the lowered ISA code are assigned the debug location of an adjacent ISA instruction in the same BB by the tuning phase, thus they are accounted for in the mapped LLVM IR block. LLVM IR instructions can be combined into a single ISA instruction. An example of such instructions are the add and multiplication ones which can be translated to the Xcore macc (multiply-accumulate) ISA instruction. The Tarch will assign the energy cost to only one of the LLVM IR instructions. Although, this is adequate for the energy characterization of LLVM IR basic blocks, if needed the tuning phase allows to associate the cost with both instructions. Fig. 3: Overview of the mapping process. An overview of the mapping technique is given in Figure 3. Our mapping pass is introduced into the compilation process after LLVM optimizations. The pass also includes tuning. The mapping phase implements Relations 6 and 7. It runs after the LLVM lowering phase and maps LLVM IR instructions with the new debug locations to the emitted ISA instructions. The ISA energy model is then used to accumulate the energy value of each LLVM IR instruction based on its mapped ISA instructions. 3.3 Control Flow Analysis This component aims to capture the dynamic behavior of the program and associates CFG BBs with the information needed for the computation step of analysis. IPET requires the CFG and call graph of a program to be constructed at the same level as the analysis. At LLVM IR level, the compiler can generate them. At ISA level a tool was created to construct them. To detect BBs that belong to a loop or recursion, we adopted and extended the algorithm in [56]. The CFGs are annotated according to the needs of the IPET described in Section 3.4. Finally, the annotated CFGs are used in the computation step to produce ILP formulations and constraints. Energy Consumption Static Analysis 3.4 15 Computation The IPET adopted in our work to estimate the energy consumption of a program is based on [57]. To construct the ILP system needed for IPET, we use information produced from the previous two components. The method of ILP formulation along with the constraints needed to bound the problem and optimize it’s solution can be found in the seminal paper [57]. To infer the energy consumption, instead of using the time cost of a CFG basic block we are using its energy cost, as provided by the respective energy model. Constraints are used to capture information that can affect a program’s dynamic behavior, such as bounded loop iterations, or path information, such as infeasible paths. Usually, this information can only be specified by the programmer, as it depends on the program semantics and cannot be extracted by the static analysis. The minimum required user input to enable bounding of the problem is the declaration of loop bounds. This is also standard practice in timing analysis [22]. Providing this kind of information is usually easy, as the loop bounds are typically known by programmers of timing critical embedded programs. Further constraints, such as denoting infeasible paths in a CFG, can be provided to extract more accurate estimations. The user provides this information as source code annotations. The annotation language used in this work can be found in [58]. 3.5 Analysis of multi-threaded programs In this paper we present the first steps towards ECSA of multi-threaded programs. Two concurrency patterns are considered: replicated threads with no inter-thread communication, working on different sets of data (task farms), and pipelines of communicating threads. For both cases, we consider evenly distributed, balanced work loads. In the former case, an example use is simultaneously processing multiple independent data. In the latter case, pipelining enables parallelism to be used to improve performance when processing a single data stream. There is a fundamental difference when statically predicting the case of interest (worst, best, average case) for time and for energy for multi-threaded programs. Generally, for time only the computations that contribute to the path forming the case of interest must be considered. For energy, all computations taking place during the case of interest must be considered. For instance, in an unbalanced task farm, the WCET will be equivalent to the longest running thread. To bound energy, the energy consumption of each thread needs to be aggregated. This is harder since the static analysis needs to determine the number of active threads at each point in time in order to apply the energy model from Equation (1) and characterize the CFG of each thread. Then, IPET can be applied to each thread’s CFG, extracting energy consumption bounds. Aggregating these together will give a loose upper bound on the program’s energy consumption, meaning that the safety of the bound cannot be guaranteed. 16 K. Georgiou et al. In our balanced task farm examples, all task threads are active in parallel for the duration of the test. Thus, the number of active threads is constant, giving a constant Nt , used to determine the pipeline occupancy scaling factor, M , in Equation (1). For balanced pipelined programs, we consider the continuous, streaming data use case, so the same constant thread count property holds. In both cases IPET can be performed on each thread’s CFG and the results aggregated to retrieve the total energy consumption. In this work, core-local communication is considered, which uses the same instructions as off-core communication, but no external link energy needs to be accounted for. Therefore the core energy model provides sufficient data. For multi-threaded programs with synchronous communications, to retrieve a WCET, IPET can be applied on a global graph, connecting the CFGs of all threads along communication edges. The communication edges can be treated by the IPET as normal CFG edges and WCET can be extracted by solving the formulated problem [38]. This will return a single worst case path across the global graph. Bounding energy in this way is not possible, as parallel thread activity over time needs to be considered. Here the task is even harder in comparison to programs without communication, as activity can be blocked if the threads’ workloads are unbalanced. In this case, statically determining the number of active threads at each point in time is a hard challenge. Although the concurrency patterns addressed here can be considered as easy targets for the ECSA, they are typical embedded use cases, and as is explained in Table 1, ECSA can provide sufficiently accurate information to enable energy aware decision making. Building on this, more complex programs will be analyzed in future work, such as unique non-communicating threads rather than replicated threads, unbalanced farm and pipeline workloads and other concurrency patterns. Such programs will feature varying numbers of active threads over the course of execution. In these cases the ECSA must be extended to perform analysis that extracts all the possible combinations of thread interleaving. This work focuses on multi-threaded communication on a single core. However, for communicating threads, the channel communication paradigms that are used by the programs at the source code level and within the ISA can also be used in a multi-core environment, creating scope for the analysis of larger systems. 4 Experimental Evaluation To evaluate our ECSA, a series of mainly industrial benchmarks were selected with representative test cases. Both our ECSA results and estimations from ISS using the same energy model are compared to hardware measurements. The benchmarks, evaluation methodology, results and further observations are discussed in this section. Energy Consumption Static Analysis 4.1 17 Benchmarks Our objective is to demonstrate the value of our ECSA for common industrial, deeply embedded applications. A complete list of all the 21 benchmarks’ code and summary of their attributes, can be found in [47]. Benchmarks were compiled with xcc version 12 [59] at optimization level O2; the default for most compilers. Deeply embedded processors do not typically have hardware support for division or floating point operations, using software libraries instead. Software implementations are usually far less efficient than their hardware equivalent, both in terms of execution time and energy consumption. The effect of these software implementations on energy consumption should be known by developers, therefore we include soft division and soft float benchmarks. A radix-4 software divider, Radix4Div [60], is used. A less efficient version, B.Radix4Div, is added for comparison. This version omits an early return when the dividend is greater than 255. A consequence of excluding this optimization is that CFG paths become more balanced, with less variation between the possible execution paths. The effect of this on the energy consumption is discussed later in this section. For software floating point, single precision SFloatAdd32bit and SFloatSub32bit operations from [61] are analyzed. To represent common signal processing tasks, FIR and Biquad benchmarks written for the Xcore processor [62], are analyzed. In addition, a series of open source benchmarks of core algorithmic functions were selected from the MDH WCET benchmark suite [63]. They were modified to work with our test harness and, in some cases, to make them more parametric to function input arguments. Some were extended to be multi-threaded task farms, where the same code runs on two or four threads. To extend our analysis to multi-threaded communication programs, we analyze pipelined versions of FIR and Biquad, each formed of seven threads. These programs are the preferred form for Xcore, as spreading the computation across threads allows the voltage and frequency of the core to be lowered, significantly reducing energy consumption with the same performance as the single threaded version. 4.2 Results Analysis The experimental results show several features, influenced by the level of multithreading, the properties of the benchmarks, and the levels at which ECSA and modeling are performed. In this section we examine all of these in order to determine what influences ECSA accuracy at each level, highlighting both strengths and limitations. Figure 4a presents the error margin of using our energy model with three energy estimation techniques compared to hardware energy measurements for our benchmarks. Trace Sim produces instruction traces from ISS, ISA ECSA uses the model for static analysis at the ISA level and LLVM IR ECSA uses our mapping technique to apply the model and analysis at LLVM IR level. For all benchmarks with multiple test parameters, the geometric mean of the errors K. Georgiou et al. 4t 2t dc t jp eg t dc jp eg eg jp dc t 7t 4t ad qu p. bi bi qu ad 2t d bi qu ad 4t qu a bi m ul at m ul at m m 7t m ul at m p. tis 2t LLVM IR SA fir tic s cn t ISA SA st a ba lev ma en c sh te in 64 Trace sim fir 8 6 4 2 0 −2 −4 −6 se % Error vs. hardware 18 (a) All benchmarks. MatMul, 1 thread Energy (Joules) 4 2.0 1 3 2 30 0 5 1.5 1.0 0.5 1 15 20 25 Matrix size (NxN) Base64 4 2 10 −5 5 3 0 5 2.5 ×10 Energy (Joules) 5 MatMul, 4 threads ×10−4 Hardware measurement ISA ECSA LLVM-IR ECSA Simulation Energy (Joules) ×10 −4 10 15 20 25 Matrix size (NxN) 30 0.0 0 50 100 150 200 250 300 350 Input length (b) Parametric benchmarks. Fig. 4: Hardware measurements compared to ECSA and ISA trace estimation. is used. Figure 4b compares energy estimates to hardware measurements for a range of parameters in three parametric benchmarks. For Levenshtein, MatMult 1,2,4, Mac, Cnt and Base64 parametric energy consumption estimations can be determined, as discussed in Section 4.3. These are expressed in terms of a function over the number of loop iterations. The parametric benchmarks are also more data sensitive, due to the use of matrices. The hardware energy measurements for all the benchmarks using matrices were obtained by using random data to initialize them. In order to investigate the effect of different random data, the measurements were repeated 500 times for each benchmark using a different seed each time for data generation. The maximum variation observed was in the range of the measurement error, less than 0.5%, and therefore the average of these measurements was used to compare against the predicted results. The effect of using non random data will be investigated in Figure 5. For the more industry oriented benchmarks (all the FIR, Biquad and Jpegdct versions) real sample data where used for the hardware measurements. For the software division and floating point benchmarks, ECSA provides a constant energy consumption upper bound across all test cases, as they con- Energy Consumption Static Analysis 2.5 −7 Radix4Div 3.0 ×10 Worst case 2.0 1.5 1.0 0.5 Energy (Joules) Energy (Joules) 3.0 ×10 Balanced Radix4Div 2.5 Worst case 2.0 1.5 1.0 Collection of sample runs (dividend, divisor) −7 19 0.5 HW meas. ISA WCEC LLVM-IR WCEC Simulation ISA BCEC Collection of sample runs (dividend, divisor) Fig. 5: Results for benchmarks with constant ECSA estimations across all test cases. tain no loops that are directly affected by the functions’ arguments. Figure 5 demonstrates this for Radix4Div and B.Radix4Div. Considering that IPET is intended to provide bounds based on a given cost model, in our case it tries to select the worst case execution paths in terms of the energy consumption. Therefore, the ECSA estimations seen in Figure 5 represent a loose upper bound on the benchmarks’ energy consumption. Similar figures were also retrieved for the two SoftFloat benchmarks. These bounds, in most cases cannot be considered safe, as they might be undermined by the use of a non data sensitive energy model and analysis. However, they can still give the application programmer valuable guidance towards energy aware software development, as discussed in Section 4.3. For the benchmarks in Figure 5, we sought test cases that exercise the average, best- and worst-case scenarios of each benchmark’s algorithm, to compare the resultant range of energy consumption with our ECSA predictions. A good understanding of the underlying algorithms and information collected from the ISS traces was necessary to identify tests covering each scenario with certainty. This poses a challenge in guaranteeing that the cases of interest, such as worst case, have been exercised. For example, the Radix4Div benchmark takes two 16-bit parameters, forming a search-space of 232 test cases. This was suitably small to perform an exhaustive search in order to capture the worst case empirically. However, the time cost of an exhaustive search precludes doing the same for many other benchmarks. For both Radix4Div variants, the upper bounds inferred by the IPET analysis are not only very close to the worst case retrieved by exhaustively searching the possible test cases, but are also safe. Generally, for all results shown, a proportion of error is present in both forms of static analysis as well as simulation based energy estimation. The error in the ISS based estimation is a baseline for the best achievable error in static analysis, as ISS produces more accurate execution information. For all the benchmarks, the ISA ECSA results are over-approximating the trace based energy estimations. This applies also to the LLVM IR ECSA results with exception of the statistics benchmark. This over-approximation is a product of the bound analysis used which is trying to select the most energy costly CFG path based 20 K. Georgiou et al. on the provided cost model. A smaller difference between the ECSA results and the trace based energy estimations indicates that the execution path selected by the IPET fits better the actual execution path of a benchmark. Measurement error analysis To assess the accuracy of ECSA predictions, reliable hardware measurements are required. We use a shunt resistor current sense circuit and data sampling hardware to obtain power dissipation with submilliwatt accuracy. The data capture process is explained in more detail in [5]. Measurements are subject to errors introduced through environmental factors. In particular, temperature and electrical noise can result in variations of the measured energy consumption for multiple runs of the same test. To measure the effect of these factors on our platform, we executed the MatMult 4 thread benchmark 100,000 times. This benchmark was selected because it is particularly power intensive and likely to affect the device temperature the most. The variation observed on our hardware was less than 0.7% which we consider negligible and close to the error margin of our measurement equipment. These factors could have a more significant impact on other platforms. It is therefore important to examine them when performing ECSA. The test harness introduces a small error by repeatedly calling the benchmark function within a loop. This is necessary to ensure an adequate number of power samples are taken during the test. However, the loop surrounding the call to the benchmark, together with the function call itself, introduce an overhead. This overhead can be significant, especially when the amount of computation in the loop body is low. To mitigate this overhead, we ensure that the loop is as efficient as possible and each benchmark sufficiently large in size. Finally, measurements were taken several times to ensure that results obtained were consistent, with less than 0.5% variation. LLVM IR analysis accuracy This form of analysis is solely dependent on the accuracy of the mapping techniques presented in Section 3.2. As shown in Figures 4a and 5, for all benchmarks the LLVM IR ECSA results are within one percentage point error of ISA ECSA results, except for the Base64 benchmark with a further 5.3 percentage points error. In this case the CFGs of the two levels were significantly different due to BBs introduced from branches in the ISA level CFG. This is one of the few cases where the mapper was unable to accurately track the differences between the two CFGs. Multi-threading accuracy Three benchmarks, MatMul, Biquad and JpegDCT, were extended to multi-threaded versions, where each thread executes the same program and processes its own data stream. The computation performed and the energy consumption increases with the number of active threads, with a negligible change in execution time. The underlying energy model is parametric to the occupancy of the execution pipeline, which is determined by the number of running threads. As such, the estimations from the model and their relative Energy Consumption Static Analysis 21 errors can differ when the number of threads is changed. For any given number of threads, the accuracy of the ECSA is influenced by the accuracy of the ISA level energy model. In the case of pipelined benchmarks, p.fir 7t and p.biquad 7t, the energy model underestimates energy consumption by approximately 5%. This error is inherited by the ECSA. Further calibration of the model is required to achieve better accuracy for multi-threaded programs with communications. Data effect Since a non data sensitive ECSA will provide a single energy estimation regardless of input data values, comparing this to hardware measurements may give a different error for each input data. To examine this, we used one of our most data sensitive benchmarks, MatMul 4. The smallest overestimation when compared with the hardware measurements was 5.96% for both the ISA ECSA and trace based energy estimations. This was obtained for matrices that were initialized with randomly generated data. Since our energy model was characterized using pseudo-randomly generated data, it provides a good fit to the data used for measurement, thus this result meets our expectations. The maximum over-estimation found was 25%, by initiating both matrices with zero data, minimizing the processor’s switching activity. By using the same random data in the two matrices, the over-estimation was between the two previous cases, approximately 15%. This is because the processor switching activity is less than in the case of different random data initialized matrices, and more than the case with the zero initialized matrices. Thus, users must be cautious when using ECSA with data sensitive benchmarks, as we will discuss in Section 4.3. These findings lead to two new research questions. Firstly, for convenience, many energy models are constructed from random input data. However, as we demonstrated, the closer the data used to characterize the energy model fits the data of the use case, the more accurate the ECSA estimation. For example, MatMul and fdct are heavily used in video processing applications with highly correlated data between frames in the video stream. Therefore, a random data constructed energy model for these applications may not be suitable. How can we construct energy models that are more fit for purpose? Secondly, if a data sensitive energy model were to be constructed, how would this model be composed to be useful for ECSA? These two research questions motivate future work in this area. Static analysis limitations ECSA suffers from all the static analysis limitations that the timing analysis faces [64]. Many of the techniques used by the timing analysis community to tackle these limitations can also be adopted in ECSA. For example, infeasible paths can lead to unrealistic estimations in both cases, energy and time. Techniques such as symbolic execution [46] used in timing analysis to exclude infeasible paths, can be also used for ECSA. For this paper, source code annotations were translated to ILP constraints, in order to exclude infeasible paths from ECSA. 22 K. Georgiou et al. As already identified, ECSA can be more complicated than timing analysis. In Figure 5, we discussed that energy consumption is sensitive to the data related switching activity in the processor, which time is not affected from. In Section 3.5 we discussed, that for multi-threaded programs, timing analysis is considered only with a single path across all the threads, but ECSA has to consider all computations active during the case of interest. In summary, the results show that static analysis, both at ISA and LLVMIR level, can deliver practical energy consumption estimates for a good range of single and multi-threaded programs. The estimation error for both static and simulation based techniques can be reduced if the accuracy of the underlying energy model is improved. 4.3 ECSA applications Precise energy measurements are often not easily accessible, requiring extra equipment and hardware knowledge as well as modifications to the target hardware. This makes it very difficult for most programmers to assess a program’s energy consumption. ECSA overcomes these obstacles by providing energy transparency to users and systems with a useful level of accuracy. Trace based energy estimation allows for a very precise estimation of energy consumption for a particular program run. The program is executed in simulation with a given set of input parameters. The exact sequence of instructions can be recorded during simulation and then used to estimate energy consumption. However, a change to the input may produce a new execution path, requiring a new simulation run to extract the correct instruction sequence. Simulation is typically several orders of magnitude slower than hardware execution, making repeated simulations undesirable as a means for tuning or optimizing a program. ECSA does not depend on repeated simulation. It does not require trace data in order to provide an energy estimation. This allows for much faster estimation of a program’s energy consumption. The main difference between energy measurements, trace simulation based energy predictions and ECSA, is that the first two methods estimate the cost of the actual executed path. ECSA, however, gives an upper bound based on the cost model used. Both ECSA and trace estimations rely on the accuracy of the energy model. Further, they cannot accurately account for energy due to data-sensitive switching activity. In the rest of this section we will provide a set of guidelines on how the ECSA results should be interpreted, and how they can influence energy aware decisions that can be made by software developers, compiler engineers, development tools and RTOS. LLVM IR level ECSA The LLVM optimizer and code emitter are the natural place for compiler optimizations. Our LLVM IR analysis results demonstrate a high accuracy with a deviation in the range of 1% from the ISA ECSA. Some LLVM IR estimations may not always be as accurate as at ISA level, but they are still of value to developers. Transparency of energy consumption Energy Consumption Static Analysis 23 at this level enables programmers to investigate how optimizations affect their program’s energy consumption [65], or even help introduce new low energy optimizations [66, 67]. This is more applicable at the LLVM IR than at the ISA level, because more program information exists at that level, such as types and loop structures. Our mapping techniques and analysis framework at the LLVM IR level are applicable to any compiler that uses the LLVM common optimizer, provided that an energy model for the target architecture is available. For some programs, indirect jumps that are introduced at the ISA level can make it impossible to extract a CFG. While this prevents ISA level ECSA, the analysis can still be performed for these programs at LLVM IR, allowing programmers to gain energy consumption insight even when ISA level analysis is not feasible. ECSA bound use cases Given that we are using bound analysis with an energy model characterized with random input data, we must consider the ECSA estimations as loose upper bounds of the WCEC. Although, these bounds are not safe, in most cases they can provide useful information to the programmer, e.g. to determine whether or not an application is likely to exceed an available energy budget. The modified B.Radix4Div benchmark avoids an early return when the dividend is greater than 255. Omitting this optimization is less efficient, but balances the CFG paths. The effect of this modification can be seen in Figure 5. The ISA level energy consumption lower bounds (the best case retrieved by IPET) are shown. In the optimized version, the energy consumption across different test cases varies significantly, creating a large range between the upper and lower energy consumption bounds. Conversely, the unoptimized version shows a lower variation, thus narrowing the margin between the upper and lower bounds, but has a higher average energy consumption. Knowledge of such energy consumption behavior can be of value for applications like cryptography, where the power profile of systems can be monitored to reveal sensitive information in side channel attacks [68]. In these situations, ECSA analysis can help code developers to design code with low energy consumption variation, so that any potential leak of information that could be obtained from power monitoring can be obfuscated. Parametric resource usage equations Regression analysis was applied to the ISA level static analysis results of the benchmarks MatMult 1,2,4, Mac, Cnt and Base64. The resultant upper bound equations are shown in Table 1. The second column shows the retrieved equations which return the energy consumption predictions in nano-Joules (nJ) as a function over x, as defined in the third column. Levenshtein is a multi-parametric energy consumption benchmark. However, the regression analysis was unable to determine a good parametric equation for it. Parametric resource usage equations can be valuable for a programmer or user to predict energy consumption with specific parameter values. Moreover, 24 K. Georgiou et al. embedding such equations into an operating system can enable energy aware decisions for either scheduling tasks, or checking if the remaining energy budget is adequate to complete a task. If the application permits, the operating system may also downgrade the quality of service to complete the task within a lower energy budget. Benchmark Base64 Mac Cnt MatMul MatMul 2T MatMul 4T f (x) f (x) f (x) f (x) f (x) f (x) Regression Analysis (nJ) = 19x + 94.2 = 15x + 21.1 = 19.9x2 + 5.7x + 34.6 = 12.2x3 + 17.5x2 + 4.7x + 33 = 19.3x3 + 21.4x2 + 5.9x + 96.8 = 22.7x3 + 25x2 + 6.5x + 157.7 x string length length of two vectors matrix size size of square matrices size of square matrices size of square matrices Table 1: Benchmarks with parametric energy consumption. Multi-threaded ECSA The first class of parallel programs to which ECSA was applied is replicated non-communicating threads. The user can make energy aware decisions on the number of threads to use, with respect to time and energy estimations retrieved by our analysis. For example, take four independent matrix multiplications on four pairs of equally sized matrices (28×28). Our analysis will show that a single thread will have an execution time of 4x the time needed to execute one matrix multiplication. However, two threads will half the execution time and decrease the energy by 54%. Four threads which will half the execution time again, and decrease the energy by 41% compared to the two-thread version. Using more threads increases the power dissipation, but the reduction in execution time saves energy on the platform under investigation. Although there is a different estimation error between different numbers of active threads, the error range of 6% is small enough to allow comparison between these different versions. The comparison can be also done by RTOS using the cost functions from Table 1 to make real time energy aware scheduling decisions. The second class of parallel programs that our ECSA was applied to was streaming pipelines of communicating threads. There is a choice in how to spread the computation across threads to maximize throughput and therefore minimize execution time or lower the necessary device operating frequency. Having a number of available threads, a number of cores and the ability to apply voltage and frequency scaling, provides a wide range of configuration options in the design phase, with multiple optimization targets. This can range from optimizing for quality of service, time and energy, or a combination of all three. Our ECSA can take advantage of the fact that the energy model used can be parametric to voltage and frequency, to statically identify the most energy efficient configuration of the same program, among a number of different options that deliver the same required performance. The first step of analyzing the pipelined versions of industrial filter applications has been made in this paper. We are currently Energy Consumption Static Analysis 25 working on extending our ECSA to automatically exploit the possible different configurations and provide the optimal solution, within the user’s constraints. Finally, the user needs to be aware of the potential effect of input data. When highly data sensitive applications are analyzed, the user can make some assumptions, based on the possible input data range, about the accuracy of the ECSA analysis. As explained in Figure 5, data that is close to random will lead to a smaller estimation error, when random data was used to build the energy model. From our findings, this variation can be up to 25%, but this has only been shown in short, contrived cases and is unlikely to be large in realistic programs. 5 Conclusion and Future Work This work has given critical review of ECSA existing works that have overlooked the effect of using non data sensitive energy models and SRA bound techniques, on the retrieved energy estimations. In the absence of average case SRA and data sensitive energy models, we establish this effect in our experimental evaluation of ECSA on a set of mainly industrial benchmarks. We also demonstrate that such an analysis can still have a significant value for software developers, compiler engineers, development tools and RTOS, by establishing a number of ECSA applications in Section 4.3. A technique was introduced to allow energy characterization of LLVM IR. It enables ECSA at this level with a small loss of accuracy, typically 1%, compared to ECSA at ISA level. ECSA is applied to a set of multi-threaded programs for the first time to our knowledge. This is a significant step beyond existing work that examines single-thread programs, because such an analysis can provide significant guidance for time-energy design space exploration between different numbers of threads and cores. This work has generated new research questions. There is a clear need for non bounding SRA techniques that focus on average cases. Data sensitive energy models and SRA techniques are needed for ECSA to account for data sensitive switching activity in the processor. The majority of existing energy models are usually generated using random data. As we have discussed in Figure 5, alternative data energy models might be better for specific applications. Future work aims to analyze more complex concurrent programs, such as distinct non-communicating threads rather than replicated threads, pipelines of threads with unbalanced workloads and other concurrency patterns. The ECSA can be combined with some more dynamic techniques such as abstract simulation to account for all the possible threads interleaving. Extending such analysis beyond deeply embedded systems, with more architectural performance enhancing features, might be done by exploiting more techniques from the WCET community, such as abstract interpretation and data cache analysis. References 1. R. Jayaseelan, T. Mitra, and X. Li, “Estimating the worst-case energy consumption of embedded software,” in Real-Time and Embedded Technology and Applications 26 K. Georgiou et al. Symposium, 2006. Proceedings of the 12th IEEE, pp. 81–90, April 2006. 2. V. Tiwari, S. Malik, A. Wolfe, and M. Tien-Chien Lee, “Instruction level power analysis and optimization of software,” Journal of VLSI Signal Processing Systems for Signal, Image, and Video Technology, vol. 13, no. 2-3, pp. 223–238, 1996. 3. J. Pallister, S. Kerrison, J. Morse, and K. Eder, “Data dependent energy modelling: A worst case perspective,” CoRR, vol. abs/1505.03374, 2015. 4. D. May, “XMOS XS1 Instruction Set Architecture,” 2009. 5. S. Kerrison and K. Eder, “Energy Modeling of Software for a Hardware Multithreaded Embedded Microprocessor,” ACM Transactions on Embedded Computing Systems, vol. 14, pp. 56:1–56:25, Apr. 2015. 6. C. Lattner and V. Adve, “LLVM: A compilation framework for lifelong program analysis and transformation,” in CGO, pp. 75–88, 2004. 7. LLVMorg, “The LLVM Compiler Infrastructure,” November 2014. 8. A. Bogliolo, L. Benini, G. Micheli, and B. Ricc, “Gate-Level Power and Current Simulation of CMOS Integrated Circuits,” IEEE Transactions on Very Large Scale Integration (VLSI) Systems, vol. 5, no. 4, pp. 473–488, 1997. 9. K. Roy and M. Johnson, “Software design for low power,” in Low power design in deep submicron electronics, ch. 6, pp. 433–460, Kluwer Academic Publishers, 1997. 10. D. Brooks, V. Tiwari, and M. Martonosi, “Wattch: A Framework for ArchitecturalLevel Power Analysis and Optimizations,” ACM SIGARCH Computer Architecture News, vol. 28, pp. 83–94, May 2000. 11. Sim-Panalyser, Sim-Panalyser 2.0 Reference Manual. 2004. 12. T. Austin, “SimpleScalar: An Infrastructure for computer system modeling,” IEEE Computer, no. February, pp. 59–67, 2002. 13. S. Steinke, M. Knauer, L. Wehmeyer, and P. Marwedel, “An accurate and fine grain instruction-level energy model supporting software optimizations,” in Proc. of PATMOS, Citeseer, 2001. 14. D. Sarta, D. Trifone, and G. Ascia, “A data dependent approach to instruction level power estimation,” in Low-Power Design, 1999. Proceedings. IEEE Alessandro Volta Memorial Workshop on, pp. 182–190, Mar 1999. 15. H. Kojima, D. Gorny, K. Nitta, and K. Sasaki, “Power analysis of a programmable dsp for architecture/program optimization,” in Low Power Electronics, 1995., IEEE Symposium on, pp. 26–27, Oct 1995. 16. M. Sami, D. Sciuto, C. Silvano, and V. Zaccaria, “An instruction-level energy model for embedded VLIW architectures,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 21, pp. 998–1010, Sept. 2002. 17. M. a. Ibrahim, M. Rupp, and H. Fahmy, “Power estimation methodology for VLIW Digital Signal Processors,” in 2008 42nd Asilomar Conference on Signals, Systems and Computers, no. 1, pp. 1840–1844, IEEE, Oct. 2008. 18. G. Qu, N. Kawabe, K. Usami, and M. Potkonjak, “Function-level power estimation methodology for microprocessors,” Proceedings of the 37th conference on Design automation - DAC ’00, pp. 810–813, 2000. 19. S. Lee, A. Ermedahl, and S. Min, “An Accurate Instruction-Level Energy Consumption Model for Embedded RISC Processors,” ACM SIGPLAN Notices, vol. 36, pp. 1–10, Aug. 2001. 20. G. Contreras and M. Martonosi, “Power prediction for Intel XScale processors using performance monitoring unit events,” in ISLPED ’05. Proceedings of the 2005 International Symposium on Low Power Electronics and Design, pp. 221– 226, IEEE, 2005. Energy Consumption Static Analysis 27 21. Y. Shao and D. Brooks, “Energy characterization and instruction-level energy model of Intel’s Xeon Phi processor,” in International Symposium on Low Power Electronics and Design (ISLPED), no. November, pp. 389–394, IEEE, Sept. 2013. 22. R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Thesing, D. Whalley, G. Bernat, C. Ferdinand, R. Heckmann, T. Mitra, F. Mueller, I. Puaut, P. Puschner, J. Staschulat, and P. Stenström, “The worst-case execution-time problem&mdash;overview of methods and survey of tools,” ACM Trans. Embed. Comput. Syst., vol. 7, pp. 36:1–36:53, May 2008. 23. G. Brat, J. Navas, N. Shi, and A. Venet, “Ikos: A framework for static analysis based on abstract interpretation,” in Software Engineering and Formal Methods, pp. 271–277, Springer, 2014. 24. B. Wegbreit, “Mechanical program analysis,” Commun. ACM, vol. 18, no. 9, pp. 528–539, 1975. 25. M. Rosendahl, “Automatic complexity analysis,” in Proceedings of the Fourth International Conference on Functional Programming Languages and Computer Architecture, FPCA ’89, (New York, NY, USA), pp. 144–156, ACM, 1989. 26. S. K. Debray, N.-W. Lin, and M. Hermenegildo, “Task Granularity Analysis in Logic Programs,” in Proc. of the 1990 ACM Conf. on Programming Language Design and Implementation, pp. 174–188, ACM Press, June 1990. 27. S. K. Debray, P. López-Garcı́a, M. Hermenegildo, and N.-W. Lin, “Lower Bound Cost Estimation for Logic Programs,” in 1997 International Logic Programming Symposium, pp. 291–305, MIT Press, Cambridge, MA, October 1997. 28. P. Vasconcelos and K. Hammond, “Inferring Cost Equations for Recursive, Polymorphic and Higher-Order Functional Programs,” in Proceedings of the Workshop on Implementation of Functional Languages, vol. 3145 of Lecture Notes in Computer Science, pp. 86–101, Springer-Verlag, September 2003. 29. J. Navas, E. Mera, P. López-Garcı́a, and M. Hermenegildo, “User-Definable Resource Bounds Analysis for Logic Programs,” in International Conference on Logic Programming (ICLP’07), Lecture Notes in Computer Science, Springer, 2007. 30. E. Albert, P. Arenas, S. Genaim, and G. Puebla, “Closed-Form Upper Bounds in Static Cost Analysis,” Journal of Automated Reasoning, vol. 46, pp. 161–203, February 2011. 31. J. Hoffmann, K. Aehlig, and M. Hofmann, “Multivariate amortized resource analysis,” ACM Trans. Program. Lang. Syst., vol. 34, no. 3, p. 14, 2012. 32. D. Alonso-Blas and S. Genaim, “On the limits of the classical approach to cost analysis,” vol. 7460, pp. 405–421, 2012. 33. F. Zuleger, S. Gulwani, M. Sinn, and H. Veith, “Bound analysis of imperative programs with the size-change abstraction (extended version),” CoRR, vol. abs/1203.5303, 2012. 34. J. Engblom, A. Ermedahl, and F. Stappert, “Comparing different worst-case execution time analysis methods,” in The Work-in-Progress session of the 21st IEEE Real-Time Systems Symposium (RTSS 2000), November 2000. 35. Y.-T. Li and S. Malik, “Performance analysis of embedded software using implicit path enumeration,” in Proceedings of the 32Nd Annual ACM/IEEE Design Automation Conference, DAC ’95, (New York, NY, USA), pp. 456–461, ACM, 1995. 36. H. Theiling and C. Ferdinand, “Combining abstract interpretation and ilp for microarchitecture modelling and program path analysis,” in Real-Time Systems Symposium, 1998. Proceedings., The 19th IEEE, pp. 144–153, Dec 1998. 37. G. Ottosson and M. Sjodin, “Worst-case execution time analysis for modern hardware architectures,” in In Proc. ACM SIGPLAN Workshop on Languages, Compilers and Tools for Real-Time Systems (LCT-RTS’97, pp. 47–55, 1997. 28 K. Georgiou et al. 38. D. Potop-Butucaru and I. Puaut, “Integrated Worst-Case Execution Time Estimation of Multicore Applications,” in 13th International Workshop on Worst-Case Execution Time Analysis (C. Maiza, ed.), vol. 30 of OpenAccess Series in Informatics (OASIcs), (Dagstuhl, Germany), pp. 21–31, Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2013. 39. P. Cousot and R. Cousot, “Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints,” in Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, (Los Angeles, California), pp. 238–252, ACM Press, New York, NY, 1977. 40. J. Navas, M. Méndez-Lojo, and M. Hermenegildo, “Safe Upper-bounds Inference of Energy Consumption for Java Bytecode Applications,” in The Sixth NASA Langley Formal Methods Workshop (LFM 08), April 2008. Extended Abstract. 41. M. Hermenegildo, G. Puebla, F. Bueno, and P. López-Garcı́a, “Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation (and The Ciao System Preprocessor),” Science of Computer Programming, vol. 58, no. 1–2, 2005. 42. J. Navas, M. Méndez-Lojo, and M. Hermenegildo, “User-Definable Resource Usage Bounds Analysis for Java Bytecode,” in Proceedings of BYTECODE, vol. 253 of Electronic Notes in Theoretical Computer Science, pp. 65–82, Elsevier - North Holland, March 2009. 43. U. Liqat, S. Kerrison, A. Serrano, K. Georgiou, P. Lopez-Garcia, N. Grech, M. Hermenegildo, and K. Eder, “Energy Consumption Analysis of Programs based on XMOS ISA-level Models,” in Proceedings of the 23rd International Symposium on Logic-Based Program Synthesis and Transformation (LOPSTR’13), 2014. 44. D. Watt, Programming XC on XMOS Devices. XMOS Limited, 2009. 45. N. Grech, K. Georgiou, J. Pallister, S. Kerrison, J. Morse, and K. Eder, “Static analysis of energy consumption for llvm ir programs,” in Proceedings of the 18th International Workshop on Software and Compilers for Embedded Systems, SCOPES ’15, (New York, NY, USA), ACM, 2015. 46. P. Wägemann, T. Distler, T. Hönig, H. Janker, R. Kapitza, and W. SchröderPreikschat, “Worst-case energy consumption analysis for energy-constrained embedded systems,” July 2015. 47. K. Georgiou, “On the value and limits of multi-level energy consumption static analysis for deeply embedded single and multi-threaded programs - benchmarks.” https://www.cs.bris.ac.uk/home/kg8280/benchmarks.html, 2015. 48. J. M. Townley, “Practical programming for static average-case analysis: the moqa investigation,” 2013. 49. M. Schellekens, “Moqa; unlocking the potential of compositional static averagecase analysis,” The Journal of Logic and Algebraic Programming, vol. 79, no. 1, pp. 61 – 83, 2010. Speical Issue: Logic, Computability and Topology in Computer Science: A New Perspective for Old Disciplines. 50. F. Najm, “A survey of power estimation techniques in vlsi circuits,” Very Large Scale Integration (VLSI) Systems, IEEE Transactions on, vol. 2, pp. 446–455, Dec 1994. 51. D. May, The XMOS XS1 Architecture. 2009. 52. K. Georgiou, “On the value and limits of multi-level energy consumption static analysis for deeply embedded single and multi-threaded programs - fnop modeling.” https://www.cs.bris.ac.uk/home/kg8280/fnops.html, 2015. Energy Consumption Static Analysis 29 53. C. Brandolese, S. Corbetta, and W. Fornaciari, “Software energy estimation based on statistical characterization of intermediate compilation code,” in Low Power Electronics and Design (ISLPED) 2011 International Symposium on, pp. 333–338, Aug 2011. 54. “The dwarf debugging standard,” Oct. 2013. http://dwarfstd.org/. 55. C. Lattner and D. Patel, “Extensible metadata in llvm ir,” Apr 2014. 56. T. Wei, J. Mao, W. Zou, and Y. Chen, “A new algorithm for identifying loops in decompilation,” in Static Analysis (H. Nielson and G. Fil, eds.), vol. 4634 of Lecture Notes in Computer Science, pp. 170–183, Springer Berlin Heidelberg, 2007. 57. Y.-S. Li and S. Malik, “Performance analysis of embedded software using implicit path enumeration,” Computer-Aided Design of Integrated Circuits and Systems, IEEE Transactions on, vol. 16, pp. 1477–1487, Dec 1997. 58. K. Eder, K. Georgiou, and N. Grech, eds., Common Assertion Language. ENTRA Project: Whole-Systems Energy Transparency (FET project 318337), November 2013. Deliverable 2.1, http://entraproject.eu. 59. XMOS, “xTimecomposer,” November 2014. 60. M. Field, “Binary division,” November 2014. 61. J. Hauser, “SoftFloat,” November 2014. 62. XMOS, “Application Note: DSP performance on XS1-L device,” November 2014. 63. J. Gustafsson, A. Betts, A. Ermedahl, and B. Lisper, “The mälardalen wcet benchmarks - past, present and future,” in Proceedings of the 10th International Workshop on Worst-Case Execution Time Analysis, July 2010. 64. R. Wilhelm and D. Grund, “Computation takes time, but how much?,” Commun. ACM, vol. 57, pp. 94–103, Feb. 2014. 65. C. Blackmore, O. Ray, and K. Eder, “A logic programming approach to predict effective compiler settings for embedded software,” Theory and Practice of Logic Programming, vol. 15, pp. 481–494, 7 2015. 66. J. Pallister, K. Eder, and S. Hollis, “Optimizing the flash-ram energy trade-off in deeply embedded systems,” in Code Generation and Optimization (CGO), 2015 IEEE/ACM International Symposium on, pp. 115–124, Feb 2015. 67. J. Pallister, K. Eder, S. J. Hollis, and J. Bennett, “A high-level model of embedded flash energy consumption,” in Proceedings of the 2014 International Conference on Compilers, Architecture and Synthesis for Embedded Systems, CASES ’14, (New York, NY, USA), pp. 20:1–20:9, ACM, 2014. 68. P. C. Kocher, J. Jaffe, and B. Jun, “Differential power analysis,” in Proceedings of the 19th Annual International Cryptology Conference on Advances in Cryptology, CRYPTO ’99, (London, UK, UK), pp. 388–397, Springer-Verlag, 1999. Acknowledgments The research leading to these results has received funding from the European Union 7th Framework Programme (FP7/2007-2013) under grant agreement no 318337, ENTRA - Whole-Systems Energy Transparency. Special thanks to Intel for providing us with the equipment used for our power monitoring setup.
6cs.PL
Fixing an error in Caponnetto and de Vito (2007) Dougal J. Sutherland Gatsby unit, University College London [email protected] arXiv:1702.02982v1 [stat.ML] 9 Feb 2017 February 2017 Abstract The seminal paper of Caponnetto and de Vito (2007) provides minimax-optimal rates for kernel ridge regression in a very general setting. Its proof, however, contains an error in its bound on the effective dimensionality. In this note, we explain the mistake, provide a correct bound, and show that the main theorem remains true. The mistake lies in Proposition 3’s bound on the effective dimensionality N (λ), particularly its dependence on the parameters of the family of distributions b and β. We discuss the mistake and provide a correct bound in Section 1. Its dependence on the regularization parameter λ, however, was correct, so the proof of Theorem 1 carries through with the exact same strategy. The proof was written in such a way, though, that it is not immediately obvious that it still holds for the corrected bound; we thus provide a more detailed explication of the proof, showing it is still valid. This note will make little sense without a copy of the original paper at hand. Numbered theorems and equation references always refer to those of Caponnetto and de Vito (2007); equations in this document are labeled alphabetically. A trivial correction First, we note a tiny mistake: Theorem 4 needs Cη = 96 log2 η6 , rather than 32 log2 η6 , because the last line of its proof dropped the constant 3 in front of S1 (λ, z) and S2 (λ, z) in (36). 1 Bound on the effective dimensionality Part of Proposition 3 is the claim that for p ∈ P(b, c), with c ∈ [1, 2] and b ∈ (1, ∞), N (λ) ≤ βb − 1 λ b. b−1 (a) The argument starts like this:   N (λ) = Tr (T + λI)−1 T ∞ X tn = t +λ n=1 n ∞ X β/nb β = b+λ β/n β + λnb n=1 n=1 Z ∞ β ≤ dx b 0 β + λx Z ∞ 1 β dτ, = λ− b β + τb 0 ≤ ∞ X 1 (b) (c) β with (b) following from Definition 1 (iii), the next line’s upper bound by an integral true since x 7→ β+λx b b b is decreasing, and then doing a change of variables to τ = λx . But then the paper claims without further justification that Z ∞ b 1 dτ ≤ . (d) b β + τ b − 1 0 R∞ b In fact, (d) is incorrect: as β → 0, the integral approaches the divergent integral 0 τ −b dτ , but b−1 clearly does not depend on β. We can instead compute the true value of the integral: Z ∞ Z ∞ 1/β 1 dτ = b dτ  b 1 β + τ 0 0 1 + τ β− b Z ∞ 1 1 −1 β b du =β b 1 + u 0 1−b π/b =β b . (e) sin(π/b) Using (e) in (c), we get a correct lower bound: 1 N (λ) ≤ β b 1 π/b λ− b . sin(π/b) (f) (f) has the same dependence on λ as (a), but the dependence on β and b differs. To demonstrate, we now plot the sum (b) (green, middle), the correct upper bound (f) (blue, top), and the purported upper bound (a) obtained via (d) (orange, bottom) for β = 0.1, λ = 10−3 . N(λ) 1000 100 integral bound claimed bound 10 actual sum 1 b 2 2 4 6 8 10 Consequences in Theorem 1 Though it isn’t obvious at first, the proof of Theorem 1 depends on the N (λ) bound only in its rate on λ, which was indeed correct: thus the proof of Theorem 1 remains valid. We now restate the relevant parts of the proof of Theorem 1 in a way that makes this lack of dependence more explicit. 2 Theorem 4 gives us that for any any η ∈ (0, 1), with probability greater than 1 − η we have   κ2 κ κM 2 Σ2 E[fzλ ] − E[fH ] ≤ Cη A(λ) + 2 B(λ) + A(λ) + 2 + N (λ) , ` λ `λ ` λ ` provided that `≥ Define Q as 2Cη κ N (λ) and λ ( 1 π/b β b sin(π/b) Q= β λ ≤ kT kL(H) . b<∞ b=∞ , so that, from Proposition 3 and (f), A(λ) ≤ λc kT 1−c 2 fH k2H Plugging in these rates and kT 1−c 2 B(λ) ≤ λc−1 kT 1−c 2 1 N (λ) ≤ Qλ− b . fH k2H fH k2H ≤ R from Definition 1 (ii), we have that 1 E[fzλ ] − E[fH ] ≤ Cη λc−1 λ−1 λ− b λc−2 + κM 2 2 + Σ2 Q Rλ + κ R 2 + κR ` ` ` ` c ! 2 ` ≥ 2Cη κQλ− as long as b+1 b (g) (h) λ ≤ kT kL(H) . and Note that for b = ∞, nothing has changed from the paper. Thus the proofs (which were not written explicitly in the paper) remain the same. We thus assume b < ∞. 2.1 c>1 When c > 1, let bc+1 `η ≥ (2Cη κQ) b(c−1) , so that for any ` ≥ `η we have ` Define λ` = ` b − bc+1 b(c−1) bc+1 ≥ 2Cη κQ. . Then − b+1 b 2Cη κQλ` − b+1  b b = 2Cη κQ `− bc+1 b+1 = 2Cη κQ` bc+1 = 2Cη κQ`− b+1 b(c−1) bc+1 b+1 ` bc+1 + b(c−1) bc+1 bc−b ≤ ` bc+1 + bc+1 = `, so that (h) holds for λ = λ` , and therefore (g) holds with probability at least 1 − η as long as λ` ≤ kT kL(H) . By Definition 1 (iii), the latter is at least α; thus this condition is met as long as b λ` = `− bc+1 ≤ α i.e. ` ≥ α− bc+1 b . We thus don’t have to worry about it in the asymptotics. Plugging λ` into (g), we get ! − 1b c−2 −1 λc−1 λ c 2 λ` 2 λ` 2 λ` ` + κM 2 + Σ Q E[fz ] − E[fH ] ≤ Cη Rλ` + κ R 2 + κR ` ` ` `   b(c−2) b(c−1) b bc b = Cη R`− bc+1 + κ2 R`− bc+1 −2 + κR`− bc+1 −1 + κM 2 ` bc+1 −2 + Σ2 Q` b(bc+1) −1   3bc−2b+2 2bc−b+1 b−2bc−2 bc bc = Cη R`− bc+1 + κ2 R`− bc+1 + κR`− bc+1 + κM 2 ` bc+1 + Σ2 Q`− bc+1 . 3 Note that 3bc − 2b + 2 = bc + 2b(c − 1) + 2 > bc 2bc − b + 1 = bc + b(c − 1) + 1 > bc 2bc − b + 2 = bc + b(c − 1) + 2 > bc. bc − bc+1 Thus for large ` the ` terms dominate, and so we have that bc E[fzλ ] − E[fH ] ≤ 2Cη D`− bc+1 ∀` ≥ `η , where D is some complex function of R, κ, M , Σ, β, b, and c. Letting τ = 2Cη D = 192D log2 √ τ for η, we get ητ = 6e− 192D . Thus i h bc ∀` ≤ `ητ , Pr E[fzλ` ] − E[fH ] > τ `− bc+1 ≤ ητ 6 η and solving z∼ρ` and so lim sup sup `→∞ h i bc Pr E[fzλ` ] − E[fH ] > τ `− bc+1 ≤ ητ , ` ρ∈P(b,c) z∼ρ and since limτ →∞ ητ = limτ →∞ 6e− √ τ 192D = 0, we have as desired that h i bc lim lim sup sup Pr E[fzλ` ] − E[fH ] > τ `− bc+1 = 0. τ →∞ 2.1.1 `→∞ ` ρ∈P(b,c) z∼ρ c=1 Here we define λ` =  log ` ` b  b+1 , so that the ` requirement of (h) is ` ≥ 2Cη κQ ` , log ` that is, ` ≥ exp (2Cη κQ) , so choosing `η = exp (2Cη κQ) suffices. As in the c > 1 case, plugging λ` into (g) obtains that as long as ` ≥ `η (and λ` ≤ α), ! − 1b −1 −1 λ λ λ 1 E[fzλ ] − E[fH ] ≤ Cη Rλ` + κ2 R `2 + κR + κM 2 `2 + Σ2 Q ` ` ` ` ` !   b −b b b b 1 1 log ` b+1 −2 − −2 − −1 −1 2 2 2 = Cη R + κ R(log `) b+1 ` b+1 + κR` + κM (log `) b+1 ` b+1 + Σ Q(log `) b+1 ` b+1 ` !   b −b b 1 b log ` b+1 − b+2 − b+1 − b+2 − b+1 − b+1 2 −1 2 2 b+1 b+1 b+1 = Cη R + κ R(log `) ` + κR` + κM (log `) ` + Σ Q(log `) ` . ` b The `− b+1 terms dominate, and so we can find a value D0 such that b E[fzλ ] − E[fH ] ≤ 2Cη D0 `− b+1 ∀` ≥ `η , and the result follows by the same reasoning. References Caponnetto, A. and E. de Vito (2007). “Optimal Rates for the Regularized Least-Squares Algorithm”. In: Foundations of Computational Mathematics 7.3, pp. 331–368. doi: 10.1007/s10208-006-0196-8. 4
10math.ST
1 Generalized optimal sub-pattern assignment metric arXiv:1601.05585v6 [cs.SY] 11 Aug 2017 Abu Sajana Rahmathullah, Ángel F. García-Fernández, Lennart Svensson Abstract—This paper presents the generalized optimal subpattern assignment (GOSPA) metric on the space of finite sets of targets. Compared to the well-established optimal sub-pattern assignment (OSPA) metric, GOSPA is not normalised by the cardinality of the largest set and it penalizes cardinality errors differently, which enables us to express it as an optimisation over assignments instead of permutations. An important consequence of this is that GOSPA allows us to penalize localization errors for detected targets and the errors due to missed and false targets, as indicated by traditional multiple target tracking (MTT) performance measures, in a sound manner. In addition, we extend the GOSPA metric to the space of random finite sets, which is important to evaluate MTT algorithms via simulations in a rigorous way. Index Terms—Multiple target tracking, metric, random finite sets, optimal sub-pattern assignment metric. I. Introduction Multiple target tracking (MTT) algorithms sequentially estimate a set of targets, which appear, move and disappear from a scene, given noisy sensor observations [1]. In order to assess and compare the performance of MTT algorithms, one needs to compute the similarity between the ground truth and the estimated set. Traditionally, MTT performance assessment has been based on intuitive concepts such as localization error for properly detected targets and costs for missed targets and false targets [2, Sec. 13.6], [3]–[6]. These concepts are appealing and practical for radar operators but the way they have been quantified to measure error has been ad-hoc. With the advent of the random finite set (RFS) framework for MTT [1], it has been possible to design and define the errors in a mathematically sound way, without ad-hoc mechanisms. In this framework, at any given time, the ground truth is a set that contains the true target states and the estimate is a set that contains the estimated target states. The error is then the distance between these two sets according to a metric, which satisfies the properties of non-negativity, definiteness, symmetry and triangle inequality [7, Sec. 1], [8, Sec. 6.2.1]. The Hausdorff metric [9] and the Wasserstein metric [9] (also referred to as optimal mass transfer metric in [10]) were the first metrics on the space of finite sets of targets for MTT. However, the former has been shown to be insensitive to cardinality mismatches and the latter lacks a consistent physical interpretation when the states have different cardinalities [10]. In [10], the optimal sub-pattern assignment (OSPA) metric was proposed to address these issues. OSPA optimally assigns A.S. Rahmathullah is with Zenuity AB, Gothenburg, Sweden (email: [email protected]). Á. F. García-Fernández is with the Department of Electrical Engineering and Automation, Aalto University, 02150 Espoo, Finland (email: [email protected]). L. Svensson is with the Department of Signals and Systems, Chalmers University of Technology, SE-412 96 Gothenburg, Sweden (email: [email protected]). all targets in the smallest set to targets in the other set and computes a localization cost based on this assignment. The rest of the targets are accounted for by a cardinality mismatch penalty. The OSPA metric has also been adapted to handle sets of labelled targets [11]. We argue that it is more desirable to have a metric that accounts for the costs mentioned in traditional MTT performance assessment methods (localization error for properly detected targets and false and missed targets) rather than localization error for the targets in the smallest set and cardinality mismatch, which is a mathematical concept that is more related to the RFS formulation of MTT problem than the original MTT problem itself. For example, OSPA does not encourage trackers to have as few false and missed targets as possible. In this paper, we propose such a metric: the generalized OSPA (GOSPA) metric, which is able to penalize localization errors for properly detected targets, missed targets and false targets. In order to obtain this metric, we first generalize the unnormalized OSPA by including an additional parameter that enables us to select the cardinality mismatch cost from a range of values. Then, we show that for a specific selection of this parameter, the GOSPA metric is a sum of localization errors for the properly detected targets and a penalty for missed and false targets, as in traditional MTT performance assessment algorithms. Importantly, this implies that we now have a metric that satisfies the fundamental properties of metrics and the intuitive, classical notions of how MTT algorithms should be evaluated [2, 13.6]. After we derived the GOSPA metric, it has been used in a separate performance evaluation [21], which illustrates the usefulness of GOSPA for analysing how the number of missed and false targets contribute to the total loss. We also extend the metric to random sets of targets. This extension has received less attention in the MTT literature despite its significance for performance evaluation. All the above-mentioned metrics assume that the ground truth and the estimates are known. However, in the RFS framework, the ground truth is not known but is modelled as a random finite set [1]. Also, algorithm evaluation is usually performed by averaging the error of the estimates for different measurements obtained by Monte Carlo simulation. This implies that the estimates are also RFSs, so it is important to have a metric that considers RFSs rather than finite sets. In the literature, there is no formal treatment of this problem to our knowledge. In this paper, we fill this gap by showing that the mean GOSPA and root mean square GOSPA are metrics for RFSs of targets. The outline of the rest of the paper is as follows. In Section II, we present the GOSPA and its most appropriate form for MTT. In Section III, we extend it to RFS of targets. In Section IV, we illustrate that the proposed choice of GOSPA provides expected results compared to OSPA and unnormal- 2 ized OSPA. Finally, conclusions are drawn in Section V. B. Motivation for setting α = 2 in MTT II. Generalized OSPA metric In this section, we present the generalized OSPA (GOSPA) metric to measure the distance between finite sets of targets. Definition 1. Let c > 0, 0 < α ≤ 2 and 1 ≤ p < ∞. Let d(x, y) denote a metric for any x, y ∈ RN and let d(c) (x, y) = min(d(x, y), c) be its cut-off metric [8, Sec. 6.2.1]. Let Πn be the set of all permutations of {1, . . . , n} for any n ∈ N and any element π ∈ Πn be a sequence (π(1), . . . , π(n)). Let X = {x1 , . . . , x|X| } and Y = {y1 , . . . , y|Y | } be finite subsets of RN . For |X| ≤ |Y |, the GOSPA metric is defined as d(c,α) (X, Y ) p  p1  |X| p X c d(c) (xi , yπ(i) )p + (|Y | − |X|) . ,  min π∈Π|Y | α i=1 (c,α) If |X| > |Y |, dp (c,α) (X, Y ) , dp (Y, X). (1)  It can be seen from the definition that the non-negativity, symmetry and definiteness properties of a metric hold for GOSPA. The proof of the triangle inequality is provided in Appendix A. We briefly discuss the roles of the parameters p, c and α. The role of the exponent p in GOSPA is similar to that in OSPA [10]. The larger the value of p is, the more the outliers are penalized. The parameter c in GOSPA determines the maximum allowable localization error and, along with α, it also determines the error due to cardinality mismatch. By setting the parameter α = 1, we get the OSPA metric without  normalization, which divides the metric by max |X|, |Y | . In Section II-A, we first discuss why the normalization in OSPA should be removed. In Section II-B, we indicate the most suitable choice of α for evaluating MTT algorithms.. A. On the removal of normalization In this section, we illustrate that the normalization in OSPA provides counterinutitive results using the below example. Example 1. Let us say the ground truth is X = ⊘ and we have estimates Yj = {y1 , , . . . , yj } indexed with j ∈ N. Intuitively, for increasing values of j, there is a higher number of false targets, so the distance from X to Yj should also increase. However, the OSPA metric is c for any j ≥ 1. That is, according to the OSPA metric, all these estimates are equally accurate, which is not the desired evaluation in MTT.  This undesirable property of the OSPA metric is due to the normalization. If1 we remove this normalization from OSPA, the distance is j p c, which increases with j. This example is a clear motivation as to why the normalization should be removed from the OSPA metric to evaluate MTT algorithms. We refer to the OSPA metric without normalization, i.e., GOSPA with α = 1, as ‘unnormalized OSPA’. The OSPA metric without the normalization has been used in [12, Sec. IV] to obtain minimum mean OSPA estimate. Even though [12] makes use of the unnormalized OSPA as a cost function, it has not been previously proved that it is a metric. In this section, we argue that the choice of α = 2 in GOSPA is the most appropriate one for MTT algorithm evaluations. We show that with this choice, the distance metric can be broken down into localization errors for properly detected targets, which are assigned to target estimates, and the error due to missed and false targets, which are left unassigned as there is no correspondence in the other set. This is in accordance with classical performance evaluation methods for MTT [2, Sec. 13.6], [3]–[6]. For the sake of this discussion, we assume that X is the set of true targets and Y is the estimate, though the metric is of course symmetric. Let us consider x ∈ X and y ∈ Y , such that all the points in Y are far from x and all the points in X are far from y. In this case, the target x has been missed and the estimator has presented a false target y. Following [6], we refer to these two targets as unassigned targets, even though they may or may not be associated to another target in the permutation in (1). If one of these unassigned targets is not associated to another target in the permutation in (1), it contributes with a cost cp /α. On the other hand, if two unassigned targets x and y are associated to each other in the permutation in (1), the cost contribution of the pair is d(c) (x, y) = cp . The basic idea behind selecting α = 2 is that the cost for a single unassigned (missed or false) target should be the same whether or not it is associated to another target in the permutation in (1). Therefore, given that a pair of unassigned targets costs cp and an unassigned target costs cp /α, we argue that α = 2 is the most appropriate choice. Due to the importance of choosing α = 2, from this point on, whenever we write GOSPA, we refer to GOSPA with α = 2, unless stated otherwise. In GOSPA, any unassigned (missed or false) target always costs cp /2, and, as we will see next, GOSPA contains localization errors for properly detected targets and a cost cp /2 for unassigned targets. In fact, GOSPA can be written in an alternative form, which further highlights the difference with OSPA and clarifies the resemblance with classical MTT evaluation methods. To show this, we make the assignment/unassignment of targets explicit by reformulating the GOSPA metric in terms of 2D assignment functions [2, Sec. 6.5] [13, Chap. 17] instead of permutations. An assignment set γ between the sets {1, . . . , |X|} and {1, . . . , |Y |} is a set that has the following properties: γ ⊆ {1, . . . , |X|} × {1, . . . , |Y |}, (i, j), (i, j ′ ) ∈ γ =⇒ j = j ′ and (i, j), (i′ , j) ∈ γ =⇒ i = i′ , where the last two properties ensure that every i and j gets at most one assignment. Let Γ denote the set of all possible assignment sets γ. Then, we can formulate the following proposition. Proposition 1. The GOSPA metric, for α = 2, can be expressed as an optimisation over assignment sets d(c,2) (X, Y ) p  1  X   p cp d(xi , yj )p + |X| + |Y | − 2|γ| = min . γ∈Γ 2 (i,j)∈γ 3 y2 • d(c) y1 • =∆ × x1 d(c) = c d(c) × x2 (a) Ya = {y1 , y2 }. y1 • =∆ × x1 × x2 (b) Yb = {y1 }. Figure 1: בs are the points in set X and •‘s are the points in Y . The permutation associations are shown using the dashed lines and the cut-off distances are shown on top of them. In this illustration, ∆ < c. Proof. See Appendix B.  This proposition confirms that GOSPA penalizes unassigned targets and localization errors for properly detected targets. The properly detected targets and their estimates are assigned according to the set γ so the first term represents their localization errors. Missed and false targets are left unassigned, as done in [6], and each of them is penalized by cp /2. To understand this, we first note that |γ| is the number of properly detected targets. Hence, |X| − |γ| and |Y | − |γ| represent the number of missed and false targets, respectively, and the term cp (|X|+|Y |−2|γ|)/2 therefore implies that any missed or false target yields a cost cp /2. It should also be noted that the notion of cut-off metric d(c) (·, ·) is not needed in this representation and there is not a cardinality mismatch term. Also, we remark that this representation cannot be used for OSPA or GOSPA with α 6= 2. We illustrate the choice of α = 2 in GOSPA and compare it with OSPA in the following example. Example 2. Consider the case where the ground truth is X = {x1 , x2 } and there are two estimates Ya = {y1 , y2 } and Yb = {y1 }, as illustrated in Figures 1(a) and 1(b). Targets x2 and y2 are very far away so that it is obvious that y2 is not an estimate of x2 . Clearly, besides the localization error between x1 and y1 , the estimate Ya has missed target x2 and reported a false target y2 , whereas Yb has only missed target x2 . OSPA and unnormalized OSPA provide the same distance to the ground and ∆ + c, respectively. As a truth for both estimates, ∆+c 2 result, according to these metrics, both estimates are equally accurate, which does not agree with intuition and classical MTT evaluation methods. On the contrary, the GOSPA metric (c,2) shows a desirable trend since d1 (X, Ya ) = ∆ + c is larger (c,2) c than d1 (X, Yb ) = ∆ + 2 .  III. Performance evaluation of MTT algorithms In the previous section, we studied metrics between finite sets of targets. It was then implicitly assumed that the ground truth and the estimates are deterministic. However, MTT is often formulated as a Bayesian filtering problem where the ground truth is an RFS and the estimates are sets, which depend deterministically on the observed data [1]. For performance evaluation, in many cases, we average over several realizations of the data, so estimates are RFSs as well. Therefore, evaluating the performance of several algorithms is in fact a comparison between the RFS of the ground truth and the RFSs of the estimates. As in the case of deterministic sets [8, pp. 142], it is highly desirable to establish metrics for RFSs for performance evaluation, which is the objective of this section. We begin with a discussion on the metrics for vectors and random vectors case, and then show how we use these concepts to extend the GOSPA metric to RFSs. There are several metrics in the literature for random vectors x, y ∈ RN . If we have a metric in RN , we have a metric on random vectors in RN by taking the expected value [14, Sec. 2.2]. Then, a natural choice ´is´to compute the average Euclidean distance, E[kx − yk2 ] , kx − yk2 f (x, y) dx dy, as a metric on random vectors, where kx−yk2 is the Euclidean distance and f (x, y) is the joint density of x and y. Another popular metric forprandom vectors is the root mean square error (RMSE) metric, E[kx − yk22 ] [14, Sec. 2.2]. An advantage with the RMSE, compared to the average Euclidean error, is that it is easier to use it to construct optimal estimators, since it is equivalent to minimizing the mean square error (MSE); note that the MSE, E[kx − yk22 ], and the squared Euclidean distance kx − yk22 are not metrics. Similar to the Euclidean metric for vectors, one can use the GOSPA metric defined over finite sets to define metrics over RFSs. Following the approaches in the random vector case, root mean square GOSPA and mean GOSPA seem like natural extensions to RFSs. Below, we establish a more general metric for RFS based on GOSPA for arbitrary α. Proposition 2. For 1 ≤ p, p′ < ∞, c > 0 and 0 < α ≤ 2, r h i (c,α) p′ E dp (X, Y )p′ is a metric for RFSs X and Y .  Proof. See Appendix C. ′ For the GOSPA analogue of RMSE, one can set p = p = 2 and use Euclidean distance for d(·, ·). Similar to the minimum MSE estimators in random vectors, one can i equivalently h (c,2) 2 use the mean square GOSPA E d2 (X, Y ) for obtaining sound RFS estimators based on metrics. In the RFS case, there are estimators that are obtained by minimizing the mean square OSPA [15]–[18] with p = 2 (or equivalently root mean square OSPA) and Euclidean distance as base metric. One can extend the proof of the proposition to show that the root mean square OSPA is also a metric, which has not been previously established in the literature. IV. Illustrations In this section, we show how GOSPA with α = 2 presents values that agree with the intuition and the guidelines of classical MTT performance evaluation algorithms [4], while OSPA and unnormalized OSPA metrics do not. We illustrate these results for several examples with varying number of missed and false targets in the estimates. As mentioned in Section III, in a Bayesian setting, both the ground truth and estimates are RFSs and we want to determine which estimate is closest to the ground truth. Rather than providing a full MTT simulation, we assume that the ground truth and estimates are specific RFSs, which are easy 4 Table I: Table capturing the trends shown by mean metric and root mean square metric for varying number of missed and false targets. p′ = p = 1 # misses → # false ↓ Unnormali-zed OSPA OSPA GOSPA α=2 0 1 3 10 0 1 3 10 0 1 3 10 0 4.55 8.62 16.52 44.49 2.27 4.20 5.70 7.04 4.55 12.62 28.52 84.49 1 6.05 10.04 18.07 46.05 5.02 5.02 6.51 7.45 10.04 10.04 26.07 82.05 20 2 0 1 -20 -20 0 20 40 60 (a) 5 40 7 11 8 20 3 1012 4 2 0 6 1 9 -20 -20 0 20 40 2 8 12 20 48 8 8 8 8 16 16 24 80 0 3.60 6.72 10.42 18.23 2.55 5.07 6.39 7.37 3.60 8.79 14.30 25.54 1 6.10 8.32 11.54 18.90 5.88 5.88 7.02 7.65 8.32 8.32 14.04 25.40 2 8 9.79 12.64 19.59 8 8 8 8 11.31 11.31 13.85 25.29 of the vector v. Therefore, there are always two targets present, which are distributed independently with their corresponding densities. X points Cut-off circle 40 p′ = p = 2 60 (b) Figure 2: The samples of the ground truth X and estimate Y are illustrated in Figure 2(a) and 2(b). The estimate Y has 10 false targets with indexes from 3 to 12 and 2 properly detected targets with indexes 1 and 2 corresponding to the two true targets in Figure 2(a). to visualize and are useful to illustrate the major aspects of the proposed metrics. We consider a ground truth X (see Figure 2(a)) which is a multi-Bernoulli RFS [8, Sec. 4.3.4] composed of two independent Bernoulli RFSs, each with existence probability 1. The probability densities of the individual RFSs are Gaussian densities N ([−6, −6]t , I) and N ([0, 3]t , I) where I denotes the identity matrix and the notation v t denotes the transpose We consider scenarios with different estimates Y for this ground truth. By varying Y , the number of missed and false targets in each scenario is chosen from {0, 1, 2} and {0, 1, 3, 10}, respectively. In all the cases, the estimate Y is also a multi-Bernoulli RFS, that contains the Bernoulli sets depicted in Figure 2(b). The components with indexes 1 and 2 are Gaussian components with densities N ([−6.7, −5.1]t , I) and N ([−1.8, 2.9]t , I) and correspond to estimates of the targets in the ground truth in Figure 2(a). The remaining components, with indexes 3 to 12, are false targets. In scenarios where there is one missed target, we consider that component 1 has existence probability 1 but component 2 has 0 probability. In scenarios where there are not any missed targets, we consider that both components have existence probability 1. In the scenarios where the estimate reports n false targets, the existence probability takes the value 1 for the components 3 to n+2 and the value 0 for the remaining false target components. We compute the GOSPA and OSPA metrics for RFSs in Proposition 2 for the above scenarios and average the metric values over 1000 Monte Carlo points. We set c = 8 and the value of p′ = p is chosen from {1, 2}. The Euclidean metric is used as the base distance d(·, ·). The estimation errors of these scenarios are tabulated in Table I. The table has estimates with increasing number of missed targets when traversed across columns and increasing number of false targets when traversed across rows. Let us first analyze the behavior of the different metrics for varying number of missed targets. Intuitively, as one traverses across columns, the distance between the RFSs should increase with increasing number of missed targets. This trend is observed with GOSPA and the OSPA metric for both p′ = p = 1 and p′ = p = 2, but the unnormalized OSPA metric shows undesired behaviors when there are false targets in the scenarios (the entries with red text in Table I). To explain this, we look at the expression for the unnormalized OSPA in these scenarios. If n and m are the number of false and missed targets, and d1 < c and d2 < c are the cut-off distances for the properly detected targets, then the unnormalized OSPA when 5 n ≥ 2 is Case 1: |X| ≤ |Y | ≤ |Z| d(c,1) p  p 1  (nc ) p 1 = (dp1 + ncp ) p  1  p (d1 + dp2 + ncp ) p For any π ∈ Π|Y | , m=2 m=1. m=0 (2) 1 (c,1) For n = 1, dp takes the values c, (dp1 + cp ) p and 1 (c,1) p p (d1 + d2 + cp ) p respectively. Clearly, for fixed n ≥ 2, dp decreases with increasing number of missed targets m, which is not desirable. Let us now analyze the behavior of the metrics for varying number of false targets. As the number of false targets increases, the metric should increase [6]. This trend is displayed by GOSPA for α = 2 again. On the other hand, the unnormalized OSPA shows a non-decreasing behavior (the entries with blue text in Table I), which is not desirable. The OSPA metric also shows counter intuitive behavior as we discussed in Example 1 in Section II-A. When both targets are missed, the OSPA metric is constant for varying number of false targets. Also, for the case with one missed target, OSPA and unnormalized OSPA have the same metric values when there are no false targets and when there is one false target. This trend is similar to the behavior we observed in Example 2. V. Conclusions In this paper, we have presented the GOSPA metric. It is a metric for sets of targets that penalizes localization errors for properly detected targets and missed and false targets, in accordance with the classical MTT performance evaluation methods. In difference to the OSPA metric, the GOSPA metric therefore encourages trackers to have as few false and missed targets as possible. In addition, we have extended the GOSPA metric to the space of random finite sets of targets. This is important for performance evaluation of MTT algorithms. Appendix A Proof of the triangle inequality of GOSPA In the proof, an extension of Minkowski’s inequality [19, pp. 165] to sequences of different lengths by appending zeros to the shorter sequence is used. Let us say we have two sequences n (ai )m i=1 and (bi )i=1 such that m ≤ n. We extend the sequence (ai ) such that ai = 0 for i = m + 1, . . . , n. Then, using Minkowski’s inequality on this extended sequence we get that ! p1 n m X X |bi |p |ai + bi |p + i=m+1 i=1 ≤ m X i=1 |ai | p ! p1 + n X i=1 |bi | p ! p1 (3) for 1 ≤ p < ∞. We use this result several times in our proof. We would like to prove the triangle inequality: d(c,α) (X, Y ) ≤ d(c,α) (X, Z) + d(c,α) (Y, Z) p p p (4) for any three RFSs X, Y and Z. The proof is dealt in three cases based on the values of |X|, |Y | and |Z|. Without loss of generality, we assume |Y | ≥ |X| in all the three cases, since GOSPA is symmetric in X and Y .  p1 p c d(c) (xi , yπ(i) )p + (|Y | − |X|) . d(c,α) (X, Y ) ≤  p α i=1  |X| X (5) Using the triangle inequality on the cut-off metric d(c) (·, ·), we get that for any π ∈ Π|Y | and for any σ ∈ Π|Z| ,  |X| h ip X (c,α)  d(c) (xi , zσ(i) ) + d(c) (zσ(i) , yπ(i) ) dp (X, Y ) ≤ i=1  p1 c + (|Y | − |X|) α p (6)  |X| h ip X d(c) (xi , zσ(i) ) + d(c) (zσ(i) , yπ(i) ) ≤ i=1 cp cp (|Y | − |X|) + 2 (|Z| − |Y |) α α  p1 |Y | X d(c) (zσ(i) , yπ(i) )p  + + (7) i=|X|+1  |X| h ip X d(c) (xi , zσ(i) ) + d(c) (zσ(i) , yπ(i) ) = i=1 + cp (|Z| − |X|) + α  p1 c + (|Z| − |Y |) α |Y | X d(c) (zσ(i) , yπ(i) )p i=|X|+1 p (8)  p1  |X| p X c d(c) (xi , zσ(i) )p + (|Z| − |X|) ≤ α i=1  p1 p c d(c) (zσ(i) , yπ(i) )p + (|Z| − |Y |) . + α i=1  |Y | X (9) To arrive at the last inequality, Minkowski’s inequality in (3) is used. Since π is a bijection, we can invert π to arrive at  p1 p c d(c) (xi , zσ(i) )p + (|Z| − |X|) d(c,α) (X, Y ) ≤  p α i=1   + |Y | X |X| X d(c) (zπ−1 (σ(i)) , yi )p + i=1  p1 p c (|Z| − |Y |) . α (10) The composition π −1 ◦ σ will be a permutation on {1, . . . , |Z|}. Lets denote this as τ . So, for any τ, σ ∈ Π|Z| ,  d(c,α) (X, Y ) ≤  p |X| X i=1 d(c) (xi , zσ(i) )p + p  p1 c (|Z| − |X|) α 6  p1  |Y | p X c d(c) (zτ (i) , yi )p + (|Z| − |Y |) , + α i=1 Appendix B Proof of Proposition 1 (11) which also holds for the σ and τ that minimizes the first and the second term in the right hand side. This proves the triangle inequality for this case. Case 2: |X| ≤ |Z| ≤ |Y | As before, for any π ∈ Π|Y | and σ ∈ Π|Z| ,  |X| h ip X  d(c) (xi , zσ(i) ) + d(c) (zσ(i) , yπ(i) ) d(c,α) (X, Y ) ≤ p We proceed to prove Proposition 1. Given X and Y , each possible permutation π ∈ Π|Y | in (1) has a corresponding assignment set γπ = {(i, j) : j = π (i) and d (xi , yj ) < c} such that we can write  X p d(c,2) (X, Y ) = minπ∈Π|Y | d (xi , yj ) p (i,j)∈γπ +cp (|X| − |γ π |) + i=1  p1 cp + (|Y | − |X|) α (12)  |X| h ip X  d(c) (xi , zσ(i) ) + d(c) (zσ(i) , yπ(i) ) ≤ i=1 |Z| X + d(c) (zσ(i) , yπ(i) )p + i=|X|+1 cp (|Z| − |X|) α  p1 cp + (|Y | − |Z|) α (13)  p1  |X| p X c d(c) (xi , zσ(i) )p + (|Z| − |X|) ≤ α i=1 (14) From here, we can argue similar to the Case 1 and show that the triangle inequality holds. Case 3: |Z| ≤ |X| ≤ |Y | d(c,α) (X, Y ) ≤  p |Z| ≤ X |X| X d(c) (xi , yπ(i) )p + i=1 d(c) (xi , yπ(i) )p + i=1 p  p1 c (|Y | − |X|) α (15) i=1  p1 cp cp (|Y | − |Z|) + (|Y | − |X|) . α α (i,j)∈γπ p c + (|Y | + |X| − 2 |γ π |) 2 d(c,2) (X, Y ) p  ≥ minγ∈Γ 1/p . (16) From here, the arguments are similar to the ones in the last two cases.  X d (xi , yj )p + (i,j)∈γ 1/p p c (|Y | + |X| − 2 |γ|) 2 . (18) We have not yet finished the proof as we have obtained an inequality. Let us consider γ ⋆ to be the value of the assignment set that minimises the distance in Proposition 1. First,  X  = p d (xi , yj ) + (i,j)∈γ ⋆ To get the above inequality, for i = |Z| + 1, . . . , |X|, we used p the fact that d(c) (xi , yπ(i) )p ≤ cp ≤ 2 cα when 0 ≤ α ≤ 2.  |Z| h ip X  d(c) (xi , zσ(i) ) + d(c) (zσ(i) , yπ(i) ) d(c,α) (X, Y ) ≤ p + p where we have written d (xi , yj )p instead of d(c) xi , yπ(i) as the distance between the assigned points in γπ is smaller  than c. Also, |X| − |γ π | is the number of pairs xi , yπ(i) for which d(c) (·, ·) = c, and the second term compensates for the fact that these pairs are not accounted for when we sum over (i, j) ∈ γπ . Rearranging terms we obtain  X d(c,2) (X, Y ) = minπ∈Π|Y | d (xi , yj )p p  2cp (|X| − |Z|) α ! p1 cp + (|Y | − |X|) . α (17) As the space of assignment sets Γ is bigger than the set of assignment sets induced by permutations π ∈ Π|Y | , we have  p1  |Z| p X c d(c) (zσ(i) , yπ(i) )p + (|Y | − |Z|) . + α i=1  1/p cp (|Y | − |X|) 2 X (i,j)∈γ p 1/p c (|Y | + |X| − 2 |γ ⋆ |) 2 1/p p c p (|Y | + |X| − 2 |γ ⋆ |) d(c) (xi , yj ) + 2 ⋆ (19) due to the fact that otherwise we could construct a better assignment set γ̃ = γ ⋆ \ γ c where γ c = {(i, j) ∈ γ ⋆ : d(xi , yj ) > c}. That is, we know that γ ⋆ does not contain pairs (i, j) for which d (·, ·) > c. On the other hand, if two pairs are unassigned in the optimal assignment, their distance must be d (·, ·) > c so d(c) (·, ·) = c, as, otherwise, there would be an assignment that returns a lower value than the optimal one by assigning them. We can now construct a corresponding permutation πγ ⋆ ∈ Π|Y | as follows: πγ ⋆ (i) = j if (i, j) ∈ γ ⋆ and the rest of the 7 components of πγ ⋆ can be filled out arbitrarily as any selection does not change the value of the previous equation. Then,  1/p p X c p  d(c) (xi , yj ) + (|Y | + |X| − 2 |γ ⋆ |) 2 (i,j)∈γ ⋆  1/p |X|   p cp X = (|Y | − |X|) d(c) xi , yπγ ⋆ (i) + 2 i=1 ≤ d(c,2) (X, Y ) . p ∞ ˆ X ≤ n=0 + ˆ + (20) which together with (18) proves Proposition 1.  Appendix C Proof of the average GOSPA metric For RFS X with the multi object density function f (·) and for a real valued function of RFS g(·), using the set integral, the expectation of g(X) [20, pp. 177] is: ˆ E[g(X)] = f (X)g(X)δX (21) ˆ ∞ X 1 f ({x1 , . . . , xn })g({x1 , . . . , xn })d(x1 , . . . , xn ). = n! n=0 Similarly, we have that for random finite sets X, Y with joint density f (·, ·) q p′ (c,α) E[dp (X, Y )p′ ] sˆ ˆ (c,α) p′ = dp (X, Y )p′ f (X, Y )δXδY . (22) Since X and Y are random finite sets, f (X, Y ) is non-zero (c,α) only when X and Y are finite, and in this case dp (X, Y ) is ′ (c,α) finite. These conditions imply that E[dp (X, Y )p ] < ∞ is satisfied. Definiteness, non-negativity and symmetry properties of (22) are observed directly from the definition. Note that, for metrics in the probability space, the definiteness between random variables is in the almost sure sense [14, Sec. 2.2]. The proof of the triangle inequality is sketched below. In the proof, we use Minkowski’s inequality for infinite sums and for integrals [19, pp. 165]. Using these Minkowski’s inequalities, we can show that the inequality also extends to cases that have both infinite sums and integrals as it appears in the set integrals. For real valued functions ψn (x1:n ) ´ p′ and φn (x1:n ) such that |ψn (x1:n )| dx1:n < ∞ and ´ ′ |φn (x1:n )|p dx1:n < ∞ for n = 1, . . . , ∞ and p′ ≥ 1, ∞ ˆ X n=0 ′ |ψn (x1:n ) + φn (x1:n )|p dx1:n ! 1′ p |φn (x1:n )| dx1:n (23) . The inequality in (23) can be proved by first using Minkowski’s inequality for integrals on the LHS: ˆ ′ |ψn (x1:n ) + φn (x1:n )|p dx1:n (i,j)∈γ ≤ d(c,2) (X, Y ) p ! 1′ p p′ n=0 ≤ Therefore, we now have proved that  1/p p X c p minγ∈Γ d (xi , yj ) + (|Y | + |X| − 2 |γ|) 2 p |ψn (x1:n )| dx1:n ∞ ˆ X ! 1′ p ′ ˆ p′ p |ψn (x1:n )| dx1:n p′  1′  1′ !p′ p |φn (x1:n )| dx1:n (24) . And then using Minkowski’s inequality for infinite sums on this, we get the RHS of (23). Now, we use the above results for the triangle inequality of (22). Let us consider RFS X, Y and Z with joint distribution f (X, Y, Z): q p′ (c,α) E[dp (X, Y )p′ ] s   p′  (c,α) (c,α) p′ ≤ E dp (X, Z) + dp (Z, Y ) (25) ˆ ˆ ˆ  p′ (c,α) d(c,α) (X, Z) + d (Z, Y ) = p p  1′ p × f (X, Y, Z)δXδY δZ ˆ ˆ ˆ  1 = d(c,α) (X, Z)f (X, Y, Z) p′ p +d(c,α) (Z, Y p )f (X, Y, Z) 1 p′ p′ δXδY δZ (26)  p1′ . (27) If we expand the set integrals, they are of the form X q ∞ X ∞ X ∞ ˆ ˆ ˆ p′ (c,α) ′ p E[dp (X, Y ) ] ≤ i=0 j=0 k=0  f1 ({x1 , . . . , xi }, {y1 , . . . , yj }, {z1 , . . . , zk }) p′ + f2 ({x1 , . . . , xi }, {y1 , . . . , yj }, {z1 , . . . , zk })  1′ p × d(x1 , . . . , xi ) d(y1 , . . . , yj ) d(z1 , . . . , zk ) , (28) where f1 ({x1 , . . . , xi }, {y1 , . . . , yj }, {z1 , . . . , zk }) = d(c,α) ({x1 , . . . , xi }, {z1 , . . . , zk }) p 1  f ({x1 , . . . , xi }, {y1 , . . . , yj }, {z1 , . . . , zk }) p′ × i! j! k! and f2 ({x1 , . . . , xi }, {y1 , . . . , yj }, {z1 , . . . , zk }) (29) 8 = d(c,α) ({y1 , . . . , yj }, {z1 , . . . , zk }) p  1 f ({x1 , . . . , xi }, {y1 , . . . , yj }, {z1 , . . . , zk }) p′ . × i! j! k! (30) The multiple integrals and sums in (28) can be considered as one major integral and sum. Using Minkowski’s inequality in (23) for infinite sums and integrals on (28), we get q p′ (c,α) E[dp (X, Y )p′ ] ˆ ˆ ˆ  1′ p (c,α) p′ ≤ dp (X, Z) f (X, Y, Z)δXδY δZ + = ˆ ˆ ˆ ˆ ˆ + ′ d(c,α) (Y, Z)p f (X, Y, Z)δXδY δZ p ′ d(c,α) (X, Z)p f (X, Z)δXδZ p ˆ ˆ ′  1′  1′ p (31) p d(c,α) (Y, Z)p f (Y, Z)δY δZ p  1′ p , which finishes the proof of the triangle inequality. (32)  References [1] R. P. Mahler, Statistical multisource-multitarget information fusion. Artech House, 2007. [2] S. Blackman and A. House, “Design and analysis of modern tracking systems,” Boston, MA: Artech House, 1999. [3] B. E. Fridling and O. E. Drummond, “Performance evaluation methods for multiple-target-tracking algorithms,” in Proceedings of the SPIE Conference Signal and data processing of small targets, vol. 1481, 1991, pp. 371–383. [4] R. L. Rothrock and O. E. Drummond, “Performance metrics for multiplesensor multiple-target tracking,” in Proceedings of the SPIE conference Signal and data processing of small targets, vol. 4048, 2000, pp. 521– 531. [5] S. Mabbs, “A performance assessment environment for radar signal processing and tracking algorithms,” in Proceedings of the IEEE Pacific Rim Conference on Computers, Communications and Signal Processing, vol. 1. IEEE, 1993, pp. 9–12. [6] O. E. Drummond and B. E. Fridling, “Ambiguities in evaluating performance of multiple target tracking algorithms,” in Proceedings of the SPIE conference, 1992, pp. 326–337. [7] B. Ristic, B.-N. Vo, and D. Clark, “Performance evaluation of multitarget tracking using the OSPA metric,” in Proceedings of the 13th International Conference on Information Fusion, 2010. [8] R. P. Mahler, Advances in statistical multisource-multitarget information fusion. Artech House, 2014. [9] J. R. Hoffman and R. P. Mahler, “Multitarget miss distance via optimal assignment,” IEEE Transactions on Systems, Man and Cybernetics Part A: Systems and Humans,, vol. 34, no. 3, pp. 327–336, 2004. [10] D. Schuhmacher, B.-T. Vo, and B.-N. Vo, “A consistent metric for performance evaluation of multi-object filters,” IEEE Transactions on Signal Processing, vol. 56, no. 8, pp. 3447–3457, 2008. [11] B. Ristic, B.-N. Vo, D. Clark, and B.-T. Vo, “A metric for performance evaluation of multi-target tracking algorithms,” IEEE Transactions on Signal Processing, vol. 59, no. 7, pp. 3452–3457, 2011. [12] J. L. Williams, “An efficient, variational approximation of the best fitting multi-Bernoulli filter,” IEEE Transactions on Signal Processing, vol. 63, no. 1, pp. 258–273, 2015. [13] A. Schrijver, Combinatorial optimization: Polyhedra and efficiency. Springer Science & Business Media, 2003, vol. 24. [14] S. T. Rachev, L. Klebanov, S. V. Stoyanov, and F. Fabozzi, The methods of distances in the theory of probability and statistics. Springer Science & Business Media, 2013. [15] D. F. Crouse, P. Willett, M. Guerriero, and L. Svensson, “An approximate minimum MOSPA estimator,” in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing, 2011. [16] M. Baum, P. Willett, and U. D. Hanebeck, “Calculating some exact MMOSPA estimates for particle distributions,” in Proceedings of the 15th International Conference on Information Fusion, 2012. [17] M. Guerriero, L. Svensson, D. Svensson, and P. Willett, “Shooting two birds with two bullets: How to find minimum mean OSPA estimates,” in Proceedings of the 13th International Conference on Information Fusion, 2010. [18] Á. F. García-Fernández, M. R. Morelande, and J. Grajal, “Particle filter for extracting target label information when targets move in close proximity,” in Proceedings of the 14th International Conference on Information Fusion, 2011. [19] C. S. Kubrusly, Elements of operator theory. Springer, 2013. [20] I. R. Goodman, R. P. Mahler, and H. T. Nguyen, Mathematics of data fusion. Springer Science & Business Media, 2013, vol. 37. [21] Y.Xia, K. Granström, L. Svensson, Á. F. García-Fernández, “Performance evaluation of multi-Bernoulli conjugate priors for multi-target filtering”, accepted for publication in Proceedings of the 20th International Conference on Information Fusion, July 2017.
3cs.SY
A Family of Quasisymmetry Models arXiv:1403.0547v2 [math.ST] 9 Jun 2014 Maria Kateri, Fatemeh Mohammadi and Bernd Sturmfels Abstract We present a one-parameter family of models for square contingency tables that interpolates between the classical quasisymmetry model and its Pearsonian analogue. Algebraically, this corresponds to deformations of toric ideals associated with graphs. Our discussion of the statistical issues centers around maximum likelihood estimation. Keywords: square contingency tables; algebraic statistics; toric models; linear models; maximum likelihood estimation; φ-divergence. 1 Introduction Consider a square contingency table with commensurable row and column classification variables X and Y . Such tables can arise from cross-classifying repeated measurements of a categorical response variable. They are common in panel and social mobility studies. One of the most cited examples, taken from Stuart (1953), is shown in Table 1. It cross-classifies 7477 female subjects according to the distance vision levels of their right and left eyes. Right Eye Grade best second third worst best 1520 234 117 36 Left Eye second 266 1512 362 82 Grade third worst 124 66 432 78 1772 205 179 492 Table 1: Cross classification of 7477 women by unaided distance vision of right and left eyes. The most parsimonious model for such tables is the symmetry (S) model, due to Bowker (1948). While the S model is easy to interpret, it is too restrictive and rarely fits well. An important model that is often of adequate fit is the quasi-symmetry (QS) model of Caussinus (1965). Kateri and Papaioannou (1997) studied the QS model from the information-theoretic point of view and generalized it to a family of models based on the φ-divergence (Pardo, 2006). In their framework, classical QS is closest to the S model under the Kullback-Leibler divergence. However, by changing the divergence used to measure proximity of distributions, alternative QS models are found. For instance, the Pearsonian divergence yields the Pearsonian QS model. For the data in Table 1, Bishop et al. (1975) applied the QS model, while Kateri and Papaioannou (1997) applied the Pearsonian QS model, and here these two lead to estimates of similar fit. However, there are other data sets where only one of them performs well. Our goal is to link these two models. We shall construct a one-parameter family of QS models that connects these two. In this way, more options for data analysis are available. In case of a single square contingency table, the optimal choice of 1 this model parameter would be of interest. However, the more interesting practical application lies in analyzing and comparing independent square tables of the same set-up, when they cannot be modeled adequately all by the same (classical or Pearsonian) QS model. For example, consider the same panel study carried out at two independent centers, with one of them being modeled only by the classical QS and the other only by the Pearsonian QS. In this scenario, the two fitted models are not as comparable as we would like. Our approach furnishes in-between compromise models. Our family exhibits interesting properties when viewed from the perspective of algebraic statistics (Drton et al., 2009). It interpolates between two fundamental classes of discrete variable models, namely, toric models and linear models (Pachter and Sturmfels, 2005, §1.2). Indeed, the QS model is toric, and its Markov basis is well-known, by work of Rapallo (2003) and LatunszynskiTrenado (Drton et al., 2009, §6.2). The Pearsonian QS model reduces to a linear model, specified by the second factors in (3). Its ML degree is the number of bounded regions in the arrangement of hyperplanes {ai − aj = 1}, by Varchenko’s formula (Pachter and Sturmfels, 2005, Theorem 1.5). This paper is organized as follows. Our parametric family of QS models is introduced in Section 2. In Section 3 we derive the implicit representation of our model by polynomial equations in the cell entries. That section is written in the algebraic language of ideals and varieties. It will be of independent interest to scholars in combinatorial commutative algebra (Miller and Sturmfels, 2005; Sturmfels, 1996). Maximum likelihood estimation (MLE) and the fit of the model are discussed in Section 4. Section 5 examines a natural submodel given by independence constraints. Section 6 discusses statistical applications and presents computations with concrete data sets. Section 7 offers an information-theoretic characterization in terms of φ-divergence, following Kateri and Papaioannou (1997) and Pardo (2006). 2 Quasisymmetry Models We consider models for square contingency tables of format I × I. Probability tables p = (pij ) are points in the simplex ∆I 2 −1 . Here pij is the probability that an observation falls in the (i, j) cell. We write n = (nij ) for the table of observed frequencies. The model of symmetry (S) is pij = sij with parameters sij = sji for 1 ≤ i ≤ j ≤ I. (1) Here, and in what follows, the table (sij ) is  non-negative and its entries sum to 1. Geometrically, the S model is a simplex of dimension I+1 − 1 inside the ambient probability simplex ∆I 2 −1 . The 2 classical QS model can be defined, as a model of divergence from S, by pij = sij 2ci , ci + cj i, j = 1, . . . , I. (2) The Pearsonian QS model is defined by the parametrization pij = sij (1 + ai − aj ) , i, j = 1, . . . , I. (3)  Both models are semialgebraic subsets of dimension I+1 + I − 2 in the simplex ∆I 2 −1 . The S 2 model is the subset obtained respectively for c1 = · · · = cI in (2) or a1 = · · · = aI in (3). We here study the following quasisymmetry model (QSt ), where t ∈ [0, 1] is a parameter:   (1 + t)(ai − aj ) , i 6= j, i, j = 1, . . . , I. (4) pij = sij 1 + 2 + (1 − t)(ai + aj ) 2 In all three models, the matrix entries on the diagonal are set to pii = sii for i = 1, . . . , I. For t = 1, the model (4) specializes to the Pearsonian QS model (3). For t = 0, it specializes to the QS model (2), if we set ai = ci − 1. The parameters ai will be assumed to satisfy the restriction t · maxi ai − mini ai ≤ 1. (5) Since we had assumed 0 ≤ sij ≤ 1/2, the constraint (5) on the ai ensures that the pij are probabilities (i.e. lie in the interval [0, 1]). Furthermore, if we change the parameters via   ai + aj for i 6= j, sii = xii for i = j, and sij = xij 1 + (1 − t) 2 then the model (QSt ), defined in (4), is rewritten in the simpler form pij = xij (1 + ai − taj ) , i 6= j, i, j = 1, . . . , I. (6) P P Note that xi+ = Ij=1 xij = Ij=1 xji = x+i , since the table (xij ) is also symmetric. For t = 1, the P P probabilities defined by (6) satisfy Ii=1 pij = 1 for all j. In order to ensure that Ii=1 pij = 1 for t 6= 1 as well, we use the ‘weighted sum to zero’ constraint I X (xi+ − xii )ai = 0. (7) i=1 The expressions (4) and (6) are equivalent. Whether one or the other is preferred is a matter of convenience. Maximum likelihood estimation is easier with (4), since the MLEs of the sij are rational functions of the observed frequencies nij . The estimates of the ai depend algebraically on n, and they generally have to be computed by an iterative method. In the formulation (6), none of the parameters have estimates that are rational in n. We shall see this in Section 4. On the other hand, for our algebraic analysis of the QSt model, it is more convenient to use (6). Example 2.1. Fix I = 3. For any fixed t, the model (6) is a hypersurface in the simplex ∆8 of all 3 × 3 probability tables. This hypersurface is the zero set of the cubic polynomial (1 + t + t2 )(p12 p23 p31 − p21 p32 p13 ) + t(p12 p23 p13 + p12 p32 p31 + p21 p23 p31 − p12 p32 p13 − p21 p23 p13 − p21 p32 p31 ). (8) For t = 0, we recover the familiar binomial relation that encodes the cycle of length three (Drton et al., 2009, §6.2). Thus, our family of QSt models represents a deformation of that Markov basis: p12 p23 p31 − p21 p32 p13 + O(t). The generalization of the relation (8) to higher values of I will be presented in Section 3. ♦ Another characteristic model for square tables with commensurable classification variables is the model of marginal homogeneity (MH). This is specified by the equations pi+ = p+i for i = 1, . . . , I. (9) The model of symmetry S implies MH and QS, i.e. (2) with c1 = · · · = cI . By Bishop et al. (1975, §8.2.3), if the models MH and QS hold simultaneously, then S is implied. In symbols, S = MH∩QS. This identity is important in that it underlines the role of the parameters ci in the QS model. These express the contribution of the classification category i to marginal inhomogeneity. We shall prove next that the same identity holds for our generalized QSt model. 3 Proposition 2.2. For any t ∈ [0, 1], we have S = MH ∩ QSt . Proof. It is straightforward to verify that S implies MH and QSt with ai = 0, for all i, which leads to pij = xij = sij , for all i, j. On the other hand, under QSt as defined by (6), we have   X pi+ − p+i = (1 + t) ai (xi+ − xii ) − aj xij for i = 1, . . . , I. (10) j6=i Combining this with MH as in (9), and setting yi := xii − xi+ , the equation (10) implies X aj xij + ai yi = 0 for i = 1, . . . , I. (11) j6=i This can be written in the matrix form Ba = 0, where a = (a1 , . . . , aI )T , x = (xij ), and   x1I  ..   .  B̃ B = x − diag(x1) =  .  xI−1,I  xI1 xI2 . . . yI P The matrix B̃ is strictly diagonally dominant, provided |yi | = xi+ − xii > I−1 j6=i xij . This is ensured if all xil are positive, as in Remark 2.3; otherwise a separate argument is needed. By the Levy-Desplanques Theorem, the matrix B̃ is invertible and rank(B̃) = I − 1. Hence rank(B) = I − 1, since B1 = 0. Therefore, all solutions of Ba = 0 have the form a = a1 for some a ∈ R. For t = 1, equation (6) now implies pij = xij = sij , for all i, j. For t 6= 1, combining (7) with the positivity of xi+ − xii , we get a = 0. Hence symmetry S holds and the proof is complete. Remark 2.3. Contingency tables with structural zeros, i.e., cells of zero probability, are rare. If they exist, they usually have a specific pattern (zero diagonal, triangular table). In our set-up it is realistic to assume that there exists an index j such that pij > 0 for all i = 1, . . . , I. Thus, without loss of generality, we can assume that piI > 0 and therefore xiI > 0 for all i = 1, . . . , I. Example 2.4. (I = 3) Marginal homogeneity defines a linear space of codimension 2, via p11 + p12 + p13 = p11 + p21 + p31 , p21 + p22 + p23 = p12 + p22 + p32 , p31 + p32 + p33 = p13 + p23 + p33 . Inside that linear subspace, the cubic (8) factors into a hyperplane, which is the S model {p12 = p21 , p13 = p31 , p23 = p32 }, and a quadric, which has no points with positive coordinates. ♦ In the light of Proposition 2.2, the parameter ai of the QSt model can be interpreted as the contribution of each category i to the marginal inhomogeneity. By this we mean the difference of ai minus the weighted average of all ai ’s. This is the parenthesized expression in the identity   X xij pi+ − p+i = (1 + t)xi+ ai − aj  , i, j = 1, . . . , I. (12) xi+ j 4 3 Implicit Equations We now examine the quasisymmetry models QSt through the lens of algebraic statistics (Drton et al., 2009; Pachter and Sturmfels, 2005; Rapallo, 2003). To achieve more generality and flexibility, we fix an undirected simple graph G with vertex set {1, 2, . . . , I}. Let IG denote the prime ideal of algebraic relations among the quantities pij = xij (1 + ai − taj ) in (6), where {i, j} runs over the edge set E(G) of the graph G. The ideal IG lives in the polynomial ring K[ pij , pji : {i, j} ∈ E(G) ]. Here we take K = Q[[t]] to be the local ring of formal Laurent series in one unknown t. Our main result in this section is the derivation of a generating set for the ideal IG . One motivation for studying this ideal is the constrained formulation of the MLE problem in Section 4. The model in Section 2 corresponds to the complete graph on I nodes, denoted G = KI . In particular, for I = 3, the ideal IK3 is the principal ideal generated by the cubic in (8). Here we work with arbitrary graphs G, not just KI , so as to allow for sparseness in the models. We disregard the ‘weighted sum to 0’ constraint (7), as this does not affect the homogeneous relations in IG . Let E(G) denote the set of oriented edges of G. For each edge {i, j} in E(G) there are two edges ij and ji in E(G). So we have |E(G)| = 2|E(G)|. An orientation of G is the choice of a subset O ⊂ E(G) such that, for each edge {i, j} in E(G), either ij or ji belongs to O. An orientation of G is called acyclic if it contains no directed cycle. Let C denote the undirected n-cycle, with E(C) = {{1, 2}, {2, 3}, . . . , {n, 1}}. Then C has 2n orientations, shown in Figure 1 for n = 3. Precisely two of these orientations are cyclic. These two directed cycles are denoted by oC and ōC . Their edge sets are E(oC ) = {12, 23, . . . , n1} and E(ōC ) = {21, 32, . . . , 1n}. Any orientation δC of C defines a monomial of degree n via Y pδC = pij . ij∈E(δC ) We also define the integer c(δC ) = 2|E(oC ) ∩ E(δC )| − n. Note that c(oC ) = n and c(ōC ) = −n. We associate with the n-cycle C the following polynomial of degree n with 2n terms: X PC = coeff(δC ) · pδC . (13) δC The sum is over all orientations δC of C, and the coefficients are the scalars in K defined by  |c(δ )| |c(δ )| |c(δ )|   c(δC ) · tr− 2C + tr+2− 2C + · · · + tr+ 2C −2 if n = 2r, |c(δC )| coeff(δC ) = |c(δC )|−1 |c(δC )|−1  |c(δC )|−1  c(δC ) · tr− 2 + tr+1− 2 + · · · + tr+ 2 −1 if n = 2r − 1. |c(δC )| 1 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 3 Figure 1: The eight orientations δ1 , δ2 , . . . , δ8 of C = K3 . Example 3.1. We consider the cycle C = K3 of length n = 3. It has eight orientations, depicted in Figure 1. The corresponding monomials and their coefficients are as follows: 5 pδ1 pδ2 pδ3 pδ4 pδ5 pδ6 pδ7 pδ8 = p12 p23 p13 = p12 p23 p31 = p12 p32 p13 = p12 p32 p31 = p21 p23 p13 = p21 p23 p31 = p21 p32 p13 = p21 p32 p31 c(δ1 ) = 1 c(δ2 ) = 3 c(δ3 ) = −1 c(δ4 ) = 1 c(δ5 ) = −1 c(δ6 ) = 1 c(δ7 ) = −3 c(δ8 ) = −1 coeff(δ1 ) = t coeff(δ2 ) = 1 + t + t2 coeff(δ3 ) = −t coeff(δ4 ) = t coeff(δ5 ) = −t coeff(δ6 ) = t coeff(δ7 ) = −1 − t − t2 coeff(δ8 ) = −t Thus, the polynomial P C defined in (13) is the cubic (8) seen in Example 2.1. ♦ We define the classical QS model on the graph G by the parametrization (2) where {i, j} runs over the set E(G) of edges of G. We write TG for the ideal of this model. This is a toric ideal whose Markov basis is obtained from the cycle polynomials P C by setting t = 0: Lemma 3.2. The ideal TG has a universal Gröbner basis consisting of the binomials P C |t=0 = po(C) − pō(C) for all cycles C in G. (14) Proof. The identity in (14) is straightforward from the definition of c(δC ) and coeff(δC ). It was shown in Drton et al. (2009, §6.2) that the binomials po(C) − pō(C) form a Markov basis for QS. Since the underlying model matrix is totally unimodular, the Markov basis is also a Graver basis, and hence it is a universal Gröbner basis, by Sturmfels (1996, Propositions 4.11 and 8.11). Example 3.3. For I = 4, the model QSt corresponds to the complete graph K4 . This graph has seven undirected cycles C, four of length 3 and three of length 4. Its defining prime ideal IK4 is generated by four cubics and three quartics, all of the form P C . For t = 0, we recover the binomials ♦ corresponding to the seven moves that are listed in Rapallo (2003, §5.4, page 395). This example is explained by the following theorem, which is our main result in Section 3. Theorem 3.4. The prime ideal IG of the quasisymmetry model associated with an undirected graph G is generated by the cycle polynomials P C where C runs over all cycles in G. C Proof. We begin by proving that P C lies Q in IG . The image of CP under the substitution pij 7→ C xij (1 + ai − taj ) can be written as Q × {i,j}∈E(C) xij , where Q is a polynomial in K[a1 , . . . , an ]. Since each term pδC of P C is divisible by either p1n or pn1 , we can write QC = (1 + a1 − tan )T1n + (1 + an − ta1 )Tn1 . We need to show that QC is zero. To do this, we shall establish the following identities: and Qn−1 n−1 (1 + ai − tai ) T1n = (−1)[ 2 ]+1 (t + 1)2r−2 (1 + an − ta1 ) i=2 Qn−1 [ n−1 ] 2r−2 2 Tn1 = (−1) (t + 1) (1 + a1 − tan ) i=2 (1 + ai − tai ). To prove these, we shall use the decompositions and T1n = (1 + a1 − ta2 )T1n,12 + (1 + a2 − ta1 )T1n,21 Tn1 = (1 + a1 − ta2 )Tn1,12 + (1 + a2 − ta1 )Tn1,21 . With this notation, we claim that the following holds for a suitable integer r: 6 (15) (i) T1n,12 = (−1)[ (ii) T1n,21 n−2 ] 2 t(t + 1)2r−3 (a2 − an ) Qn−1 (1 + ai − tai ), Qn−1 n−2 (1 + ai − tai ). = (−1)[ 2 ] (t + 1)2r−3 (t2 a2 − t − an − 1) i=3 i=3 Let C ′ be the cycle 2 − 3 − · · · − n − 2. In analogy to (15), we write ′ QC = (1 + a2 − tan )S2n + (1 + an − ta2 )Sn2 . Note that for any orientation δC of C in which 1n and 12 belong to E(δC ), we have ( if n2 ∈ E(δC ′ ), c(δC ′ ) − 1 c(δC ) = if 2n ∈ E(δC ′ ). c(δC ′ ) + 1 Also note that c(δC ) |c(δC )| = c(δC ′ ) |c(δC ′ )| . In order to prove (i) we consider the following two cases: Case 1. n = 2r − 1 is an odd number: We claim that T1n,12 = t(Sn2 + S2n ). Note that C ′ is an even cycle with n − 1 = 2(r − 1). The coefficient for δC can be written as t× |c(δC )|−1 |c(δC )|−1 |c(δC )|−1 c(δC ) (tr−1− 2 + tr+1− 2 + · · · + tr+ 2 −2 ) + |c(δC )| |c(δC )|−1 |c(δC )|−1 |c(δC )|−1  (tr− 2 + tr+2− 2 + · · · + tr+ 2 −3 ) . The first summand corresponds to the orientation δC ′ with n2 ∈ E(δC ′ ). The second summand corresponds to the orientation δC ′ with 2n ∈ E(δC ′ ). By induction on n, we have and Qn−1 n−2 (1 + ai − tai ), S2n = (−1)[ 2 ]+1 (t + 1)2r−4 (1 + an − ta2 ) i=3 Qn−1 [ n−2 ] 2r−4 2 (t + 1) (1 + a2 − tan ) i=3 (1 + ai − tai ). Sn2 = (−1) Since −(1 + an − ta2 ) + (1 + a2 − tan ) = (1 + t)(a2 − an ), the claim (i) holds for n odd. Case 2. n = 2r is an even number: We will first show that T1n,12 = t(Sn2 + S2n )/(1 + t)2 . Here C ′ is an odd cycle on n − 1 = 2r − 1 vertices. The coefficient for δC equals |c(δC )| |c(δC )| |c(δC )|  c(δC ) r− |c(δC )| −1 t 2 × t + 2tr− 2 + · · · + 2tr+ 2 −2 + tr+ 2 −1 . 2 (1 + t) |c(δC )| This sum can be decomposed as (tr− |c(δC )| −1 2 + tr− |c(δC )| 2 + · · · + tr+ |c(δC )| −1 2 ) + (tr− |c(δC )| 2 + tr− |c(δC )| +1 2 + · · · + tr+ |c(δC )| −2 2 ), where the first summand corresponds to the orientation δC ′ with n2 ∈ E(δC ′ ), and the second n2 +S2n ) . By summand corresponds to the orientation δC ′ with 2n ∈ E(δC ′ ). Therefore T1n,12 = t(S(1+t) 2 induction on n, we have and Qn−1 n−2 (1 + ai − tai ) S2n = (−1)[ 2 ]+1 (t + 1)2r−2 (1 + an − ta2 ) i=3 Q n−1 ] [ n−2 2r−2 2 (t + 1) (1 + a2 − tan ) i=3 (1 + ai − tai ) Sn2 = (−1) Since −(1 + an − ta2 ) + (1 + a2 − tan ) = (1 + t)(a2 − an ), the result holds for even n as well. By a similar argument one can prove (ii). Now applying (i) and (ii) and the equality −(1 + a2 − ta2 )(1 + an − ta1 )(1 + t) = (1 + a1 − ta2 )(a2 − an )t + (1 + a2 − ta1 )(t2 a2 − t − an − 1), 7 we obtain T1n = (−1)[ n−2 ]+1 2 (t + 1)2r−2 (1 + an − ta1 ) n−1 Y (1 + ai − tai ) . i=2 PC The identity for Tn1 is analogous. It follows that ∈ IG for all cycles of G. C It remains to be shown that the P generate the homogeneous ideal IG . Recall that, by Lemma 3.2, the images of the P C generate this ideal after we tensor, over the local ring K, with the residue field Q = K/hti. Hence, by Nakayama’s Lemma, the P C generate IG . Remark 3.5. In Theorem 3.4 we can replace the local ring K = Q[[t]] with the polynomial ring Q[t] because no t appears in the leading forms (P C )|t=0 . This ensures that Q[t][pij ] modulo the ideal hP C : C cycle in Gi is torsion-free, hence free, and therefore flat over Q[t]. In statistical applications, the quantity t will always take on a particular real value. In the remainder of this paper, we assume t ∈ R, and we identify IG with its image in R[pij ]. Corollary 3.6. For any t ∈ R, the cycle polynomials P C generate the ideal IG in R[pij ]. Theorem 3.4 furnishes a (flat) degeneration from IG to the toric ideal TG . Geometrically, we view this as a degeneration of varieties (or semialgebraic sets) from t > 0 to t = 0. Lemma 3.2 concerns further degenerations from the toric ideal TG to its initial monomial ideals MG . Any such MG is squarefree and serves as a combinatorial model for both TG and IG . We describe one particular choice and draw some combinatorial conclusions. Fix a term order on R[pij ] with the property that pij ≻ pkℓ whenever i < k, or i = k and j < ℓ. For any cycle C, we label the two directed orientations oC and ōC so that po(C) ≻ pō(C) . Fix a spanning tree T of G. Let PT denote the monomial prime ideal generated by all unknowns pij where {i, j} ∈ E(G)\E(T ) and pij divides poC , where C is the unique cycle in E(T ) ∪ {{i, j}}. The squarefree monomial ideal \ PT , (16) MG = in≻ (TG ) = poC : C cycle in G = T is obtained by taking the intersection over all spanning trees T of G. The simplicial complex with Stanley-Reisner ideal MG is a regular triangulation of the Lawrence polytope of the graph G. This triangulation is shellable and hence our ideals are Cohen-Macaulay. We record the following fact. Proposition 3.7. The ideals MG , TG and IG define varieties of dimension |E(G)| + I − 1 in affine space, and their common degree is the number of spanning trees of the graph G. Proof. Each of the components PT in (16) has codimension |E(G)\E(T )| = |E(G)|−I+1. 2 3 4 1 Figure 2: A graph G on I = 4 nodes and its eight spanning trees T 8 Example 3.8. Consider the graph G depicted in Figure 2. The associated toric ideal equals TG = h p12 p23 p31 − p21 p32 p13 , p12 p24 p41 − p21 p42 p14 , p13 p32 p24 p41 − p31 p23 p42 p14 i. This has codimension 2 and degree 8. Its (underlined) initial monomial ideal MG equals hp12 , p13 i ∩ hp12 , p32 i ∩ hp12 , p24 i ∩ hp12 , p41 i ∩ hp23 , p41 i ∩ hp23 , p24 i ∩ hp24 , p31 i ∩ hp31 , p41 i. These eight monomial prime ideals correspond to the eight spanning trees in Figure 2. The ideal IG has three generators, two cubics with 8 terms and one quartic with 16 terms, as in (13). These are obtained from the Markov basis of TG by adding additional terms that are divisible by t. ♦ 4 Maximum Likelihood Estimation A data table n = (nij ) of format I × I can arise either by multinomial sampling or by sampling from I 2 independent Poisson distributions, one for each of its cells. In both cases, the log-likelihood function, up to an additive constant, is equal to ℓn (p) = I I X X nij · log(pij ). (17) i=1 j=1 Maximum likelihood estimation (MLE) is the problem of maximizing ℓn over all probability tables p = (pij ) in the model of interest. For us, that model is the quasisymmetry model (QSt ), where t is a fixed constant in the interval [0, 1]. This optimization problem can be expressed in either constrained form or in unconstrained form. The constrained MLE problem is written as Maximize ℓn (p) subject to p ∈ V (IG ) ∩ ∆I 2 −1 , (18) where G = KI is the complete graph on I nodes, and V (IG ) is the zero set of the cycle polynomials P C constructed in Section 3. The unconstrained MLE problem is written as Maximize ℓn (a, s). (19) The decision variables in (19) are the vector a = (a1 , . . . , aI ) and the symmetric probability matrix s = (sij ). The objective function in (19) is obtained by substituting (4) into (17). We shall discuss both formulations, starting with a simple numerical example for the formulation (18). Example 4.1. Let I = 3, t = 2/3 and consider the data table   2 3 5 n = 11 13 17 with sample size n++ = 122. 19 23 29 Our aim is to maximize ℓn (p) subject to the cubic equation (8) and p11 + p12 + · · · + p33 = 1. Using Lagrange multipliers for these two constraints, we derive the likelihood equations by way of Drton et al. (2009, Algorithm 2.29). These polynomial equations in the nine unknowns pij have 15 complex solutions. Two of the complex solutions are non-real. Of the 13 real solutions, 12 have at least one negative coordinate. Only one solution lies in the probability simplex ∆8 : p̂11 = 1/61, p̂21 = 0.0861247, p̂31 = 0.1590924, p̂12 = 0.0286294, p̂22 = 13/122, p̂32 = 0.1832569, p̂13 = 0.0376289, p̂23 = 0.1446119, p̂33 = 29/122. This is the global maximum of the constrained MLE problem for this instance. 9 (20) ♦ The benefit of the constrained formulation is that we can take advantage of the combinatorial results in Section 3, and we do not have to deal with issues of identifiability and singularities arising from the map (4). On the other hand, most statisticians would prefer the unconstrained formulation because this corresponds more directly to the fitting of model parameters to data. To solve the unconstrained MLE problem (19), we take the partial derivations of the objective function ℓn (a, s) with respect to all model parameters ai and sij . The resulting system of equations decouples into a system for a and a system for s. The latter is trivial to solve. Using the requirement that the entries of s sum to 1, it has the closed form solution ŝij = nij + nji , 2n++ i, j = 1, . . . , I. (21) After dividing by 1 + t, the partial derivatives of ℓn (a, s) with respect to a1 , a2 , . . . , aI are I X (1 + aj − taj )[nij (1 + aj − tai ) − nji (1 + ai − taj )] (1 + ai − taj )(1 + aj − tai )[2 + (1 − t)(ai + aj )] j=1 for i = 1, 2, . . . , I. (22) j6=i This system of equations has infinitely many solutions, because the model QSt is not identifiable. The general fiber of the map (4) is a line in a-space. Hence only I − 1 of the I parameters ai can be estimated. One way to fix this is to simply add the constraint âI = 0. Example 4.2. Let us return to the numerical instance in Example 4.1. Here we have ŝ11 = 1/61, ŝ12 = 7/122, ŝ13 = 6/61, ŝ22 = 13/122, ŝ23 = 10/61, ŝ33 = 29/122. (23) The equations (22) can be solved in a computer algebra system by clearing denominators and then saturating the ideal of numerators with respect to those denominators. As before, there are precisely 15 complex solutions, of which 13 are real. The MLE is given by â1 = −0.65948848999731861332, â2 = −0.13818331109451658084, â3 = 0. (24) These are floating point approximations to algebraic numbers of degree 15 over Q. An exact representation is given by their minimal polynomials. For the first coordinate, this is 14 13 12 11 62031304a15 1 + 2201861910a1 + 30829909776a1 + 206135547000a1 + 528436383696a1 10 9 8 7 −1126661553720a1 − 9740892273264a1 − 4305524252579a1 + 26533957305582a1 +88281552626154a61 + 44254830057030a51 − 76332701171853a41 − 83490498412056a31 +1857597611688a21 + 29825005557312a1 + 9354112703280 = 0. With this, the second coordinate â2 is a certain rational expression in Q(â1 ). By plugging (23) and ♦ (24) into (4) with t = 2/3, we recover the estimated probability table in (20). For larger cases, solutions to the likelihood equations (22) are computed by iterative numerical methods, such as the unidimensional Newton’s method. The updating equations at the q-th step of this iterative method are (q) ai (q−1) = ai − ∂ℓn (a)/∂ai ∂ 2 ℓn (a)/∂a2i a=a(q−1) for i = 1, . . . , I − 1, q = 1, 2, . . . . (25) We find it convenient to rewrite the first derivatives (22) as I X sij ∂ℓn (a) = (1 + t) ∂ai 2 + (1 − t)(ai + aj ) j=1 10  1−t cij 1− 1+t   nij nji − . pij pji (26) The second derivative equals ∂ 2 ℓn (a) ∂a2i = −(1 + t) I X j=1 −(1 + t) X j6=i 2(1 − t)sij [2 + (1 − t)(ai + aj )]2  1−t cij 1− 1+t  (1 + t)s2ij [2 + (1 − t)(ai + aj )]2  1−t cij 1− 1+t 2 nji nij − pij pji  (27) ! nji nij + 2 . p2ij pji Here i = 1, . . . , I − 1, the pij are the expressions in (4), and cij = (1 + t)(ai − aj ) . 2 + (1 − t)(ai + aj ) We believe that the numerical solution found by this iteration is always the global maximum in (19). This would be implied by the following conjecture, which holds for t = 0 and t = 1.   2 (a) is negative definite for all a ∈ RI with (5). Conjecture 4.3. The Hessian H(a) = ∂∂aℓin∂a j We verified this conjecture for many examples with t ∈ (0, 1). In each case, we also ran our iterative algorithm for many starting values, and it always converged to the same solution. The diagonal entries of the Hessian matrix are given in (27), while the non-diagonal are   ∂ 2 ℓn (a) nij 2(1 − t)2 sij cij nji = − (28) ∂ai ∂aj [2 + (1 − t)(ai + aj )]2 pij pji ! "  2 # (1 + t)2 s2ij nji 1−t nij + 2 . + cij 1− [2 + (1 − t)(ai + aj )]2 1+t p2ij pji In the iterative algorithm described above, we had fixed the last parameter aI at zero. This ensures identifiability, and it is done for simplicity. The constraint aI = 0 defines a reference point for the other parameters a1 , . . . , aI−1 . Under this constraint, (12) leads to   pi+ − p+i pI+ − p+I 1 − for i = 1, . . . , I − 1. ai = 1+t xi+ xI+ This means that the contribution of category i to marginal inhomogeneity is compared to the last category’s contribution. Hence, in view of (12), a reasonable alternative constraint could be P xij I j=1 xi+ aj = 0. This constraint calibrates each category’s contribution to marginal inhomogeneity relative to the weighted average of all I categories. Remark 4.4. The iterative procedure described above for fitting the QSt models was implemented by us in R. The algorithm works regardless of whether we impose the restriction aI = 0 or not. We noticed that when imposing this constraint, the algorithm requires more iterations to converge. The convergence is also affected by the initial values a(0) we used. A classical choice would be ai = 0 for all i, as this corresponds to complete symmetry. However, we observed that for a(0) with −n+i , i = 1, . . . , I, the convergence is faster. coordinates nni+ i+ +n+i Remark 4.5. Here we consider the model parameter t as fixed. Alternatively, it could be estimated from the data, as for the power-divergence logistic regression model in Kateri and Agresti (2010). 11 5 Quasisymmetric Independence A natural submodel of (1) is the symmetric independence model (SI), which is given by pij = si sj , i, j = 1, . . . , I. (29) The I parameters si are non-negative and sum to 1. The corresponding probability tables p = (pij ) are symmetric and have rank 1. The models of quasisymmetric independence (QSIt ) can be defined analogously to the QSt models, by measuring departure from (29). Namely, replacing the symmetric probabilities sij in (4) by the factored form in (29), we get   (1 + t)(ai − aj ) pij = si sj 1 + , i 6= j, i, j = 1, . . . , I. (30) 2 + (1 − t)(ai + aj ) The MLEs of the parameters of the SI model in (29) are ŝi = ni+ + n+i 2n for i = 1, . . . , I. (31) These are also the MLEs of the si parameters in the QSIt model. The likelihood equations for a are as before, but with pij ’s in (26) as defined in (29) and (30). Their numerical solution can be computed with the iterative procedure described in Section 4, adjusted accordingly. Remark 5.1. In Proposition 2.2, if we replace the models S and QSt by SI and QSIt , then an analogous statement holds. Thus, we have SI = MH ∩ QSIt for each t ∈ [0, 1]. Following the discussion in Section 3, it would be interesting to derive the implicit equations for the model QSIt . At present, we have a complete solution only for the special case t = 1. The quasisymmetric independence model QSI1 is defined by the parametrization pij = si sj · (1 + ai − aj ), 1 ≤ i, j ≤ I. (32) Alternatively, {i, j} could range over the edges of a graph G, as in Section 3. In the following result, whose proof we omit, we restrict ourselves to the case of the complete graph KI . Proposition 5.2. The prime ideal of the QSI1 model in (32) is generated by the following homogeneous quadratic polynomials (for any choices of indices i, j, k, ℓ among 1, . . . , I): • (pij + pji )2 − 4pii pjj , • pkk (pij − pji ) + pki pjk − pik pkj , • (pij − pji )(pjk − pkj ) + 4(pjj pki − pji pkj ), • pℓi (pjk − pkj ) + pℓj (pki − pik ) + pℓk (pij − pji ), • piℓ (pjk − pkj ) + pjℓ (pki − pik ) + pkℓ (pij − pji ). The general case where t < 1 differs from the t = 1 case in that the prime ideal of QSI1 is no longer generated by quadrics. Even for I = 3, a minimal generator of degree 3 is needed: Example 5.3. Fix I = 3. For general t ∈ R, we consider the model (30) with pii = si si for i = 1, 2, 3. Its ideal is minimally generated by 7 polynomials: 6 quadrics and one cubic. ♦ 12 6 Fitting the Models to Data −9.799e+02 log.likelhood −9.803e+02 −9.801e+02 −1.6388112e+04 −1.6388114e+04 log.likelhood −1.6388110e+04 We next illustrate the new models and their features on some characteristic data sets. The goodnessof-fit of a model is tested asymptotically by the likelihood ratio statistic. The associated degrees of freedom for QSt and QSIt are df (QSt ) = (I − 1)(I − 2)/2 and df (QSIt ) = (I − 1)2 , respectively. As we shell see, the models in each family can perform either quite similar or differ significantly, depending on the specific data under consideration. A case of similar behavior is the classical vision example of Table 1. The model of QS (t = 0) has been applied on this data often in the literature, while Kateri and Papaioannou (1997) applied Pearsonian QS. Both models provide a quite similar fit, namely (G2 = 7.27076, p-value = 0.06375) for QS0 and (G2 = 7.26199, p-value = 0.06400) for QS1 . Here, df = 3. The behavior of the QSt models for t ∈ (0, 1) is similar. The log-likelihood values vary from −16388.11444 (t = 0) to −16388.11006 (t = 1) while the saturated log-likelihood is −16384.47906 (see Figure 3, left). Table 2 gives the MLEs of the expected cell frequencies under the models QS0 , QS1 and QS2/3 . For t = 2/3 we get G2 = 7.26234, with p-value = 0.06399. 0.0 0.2 0.4 0.6 0.8 1.0 0.0 t 0.2 0.4 0.6 0.8 1.0 t Figure 3: Log-likelihood values of QSt for t in [0, 1] for data in Tables 1 (left) and 3(c) (right). Left Eye Grade Right Eye Grade best second third worst best second third worst 1520 266 124 66 – (263.38a / 263.38b / 263.39c ) (133.58/ 133.59/ 133.60) (59.04/ 59.09/ 59.09) 234 1512 432 78 (236.62/ 236.62/ 236.61) – (418.99/ 418.90/ 418.90) (88.39/ 88.40/ 88.40) 117 362 1772 205 (107.42/ 107.40/ 107.40) (375.01/ 375.10/ 375.10) – (201.57/ 201.58/ 201.58) 36 82 179 492 (42.96/ 42.91/ 42.91) (71.61/ 71.60/ 71.60) (182.43/ 182.42/ 182.42) – Table 2: Unaided distance vision of right and left eyes for 7477 women. Parenthesized values are ML estimates of the expected frequencies under models (a) QS0 , (b) QS2/3 , and (c) QS1 . Examples for which the members of the QSt family are not of similar performance are the two 3 × 3 tables of Kateri and Papaioannou (1997, Tables 3 and 4), displayed in Table 3 (a) and (b). Here, the models QS0 and QS1 differ considerably in their fit. In particular, the data in Table 3 (a) are modeled well by QS0 but not by QS1 (G20 = 0.18572 and G21 = 5.29006), while the opposite holds for Table 3 (b), since G20 = 6.29035 and G21 = 0.29215. In such situations, the question arises whether some t is appropriate for both data sets. Finding t such that QSt works for two or more I × I tables of the same set-up is of special interest in the 13 (a) 1 1 1 (b) 1 28 122 49 2 10 126 22 3 15 102 26 (c) 1 38 5 12 1 1 1 2 128 119 88 3 36 43 31 1 1 1 1 28 122 49 2 12 126 22 3 25 102 26 0.0 0.0 0.1 0.2 0.4 p.value 0.3 0.2 p.value 0.4 0.6 0.5 0.6 0.8 Table 3: Simulated 3 × 3 examples of Kateri and Papaioannou (1997), generated by the models (a) QS0 and (b) QS1 (their Tables 3 and 4, respectively). A toy example in (c). 0.0 0.2 0.4 0.6 0.8 0.0 1.0 0.2 0.4 0.6 0.8 1.0 t t Figure 4: p-values for the G2 goodness-of-fit test of QSt (left) and QSIt (right) for t ∈ [0, 1], along with the significance level α = 0.05. Data are from Table 3: (a) solid and (b) dashed. study of stratified tables. Using the same model on all strata makes parameter estimates among models comparable. This is a major advantage of the proposed family. Models that lie ‘in-between’ the two extreme cases (t = 0 and t = 1) may lead to a consensus. Even if that consensus model does not perform as well as QS0 and QS1 on each table separately, it can provide a reasonable fit for both tables. To visualize this, Figure 4 (left) shows the p-values of the fit of the QSt models with t ∈ [0, 1], for Tables 3 (a) and (b), by solid and dashed curves, respectively, along with the significance level of α = 0.05. The consensus model QSt would have t ∈ (0.061, 0.302). Among these models, we propose QS0.14 , since the intersection of the two curves happens around t = 0.137. The fit of this model for Table 3 (a) is G2 = 2.27614 (p-value=0.1314) while for (b) it is G2 = 2.16744 (p-value=0.1409). The vector of MLEs for parameters ai is (−0.5458, 1.8555, 0) and (2.1247, −0.5406, 0), respectively. We note that, in deriving the consensus model, the G2 values could have been used as an alternative to the p-values in Figure 4. In all examples treated so far, the log-likelihood under QSt was monotone in t (see Figure 3, left, and Figure 5, upper), suggesting that the ‘best’ model will be achieved at either t = 0 or t = 1. This is not always the case. For example, for the data in Table 3 (c), the best fit occurs for t = 0.036 (see also Figure 3, right), giving G2 = 1.742943 · 10−6 (p-value=0.9989) while for t = 0 and t = 1, it is G2 = 0.0610 (p-value= 0.8049) and G2 = 1.1131 (p-value=0.2914), respectively. Furthermore, even when the best model is for t = 0 or t = 1, we may still want to use some t ∈ (0, 1), e.g. for stratified tables with different optimal model at each level of the stratifying variable, as explained above. Applying the quasisymmetric independence models to Tables 3 (a) and (b), we observe that QSI0 fits well on Table 3 (a) but not on (b), while model QS1 is of acceptable fit for both data sets. 14 −950.5 LLb −952.5 −952.0 −951.5 −951.0 −940.0 −940.5 LLa −941.0 −941.5 −953.0 −942.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 t −953 LLb −954 −941.5 −943.0 −956 −942.5 −955 −942.0 LLa −941.0 −952 −940.5 −951 −940.0 −950 t 0.0 0.2 0.4 0.6 0.8 1.0 0.0 t 0.2 0.4 0.6 0.8 1.0 t Figure 5: Log-likelihood values of QSt (upper) and QSIt (lower) with t ∈ [0, 1] for the data in Table 3 (a, left) and (b, right). The straight line marks the saturated log-likelihood value. Indeed, we have G2a (QSI0 ) = 1.3600 (p-value=0.8511), G2b (QSI0 ) = 11.8622 (p-value=0.0184), G2a (QSI1 ) = 6.4643 (p-value=0.1671) and G2b (QSI1 ) = 5.8640 (p-value=0.2095). For the performance of the QSIt model for t ∈ [0, 1], see Figure 4 (right) and Figure 5 (lower). For t = 0.532, the p-value of the fit of the model is equal to 0.1983 for both data sets. All the examples of this section were worked out with R functions we developed for fitting the QSt and QSIt models via the unidimensional Newton’s method. The adopted inferential approach is asymptotic. In cases of small sample size, exact inference can be carried out via algebraic computations along the lines described in Section 3, and demonstrated in Examples 4.1 and 4.2. 7 Divergence Measures The one-parameter family of QS models we proposed, QSt , t ∈ [0, 1], connects the classical QS model (t = 0) and the Pearsonian QS model (t = 1). These two belong both to a broader class of generalized QS models that are derived using the concept of φ–divergence (Kateri and Papaioannou, 1997; Pardo, 2006). Measures of divergence quantify the distance between two probability distributions and play an important role in information theory and statistical inference. A well known divergence measure is the Kullback-Leibler (KL) divergence. However there exist broader classes of divergences. Such a class, including the KL as a special case, is the φ-divergence. In the framework of two-dimensional contingency tables, this class is defined as follows. 15 Let p = (pij ) and q = (qij ) be two discrete bivariate probability distributions. The φ–divergence between p and q (or Csiszar’s measure of information in q about p) is defined by X Dφ (p, q) = qij φ(pij /qij ). (33) i,j Here φ : [0, ∞) → R+ is a convex function such that φ(1) = φ′ (1) = 0, 0 · φ(0/0) = 0, and 0 · φ(x/0) = x · limu→∞ φ(u)/u. For φ(u) = u log(u) − u + 1 and φ(u) = (u − 1)2 /2, the divergence (33) becomes the KL and the Pearson’s divergence, respectively. We adopt the notation in Pardo (2006). For properties of φ-divergence, as well as a list of well-known divergences belonging to this family, we refer to (Pardo, 2006, Section 1.2). The differential geometric structure of the Riemannian metric induced by such a divergence function is studied by Amari and Cichocki (2010). The generalized QS models introduced by Kateri and Papaioannou (1997) are based on the φ-divergence and are characterized by the fact that each model in this class is the closest model to symmetry S, when the distance is measured by the corresponding divergence measure. The classical QS model corresponds to the KL divergence, while the Pearsonian QS corresponds to Pearson’s distance. We shall prove in Theorem 7.1 that the other members of the QSt family, i.e. for t ∈ (0, 1), are φ-divergence QS models as well, and we identify the corresponding φ function. Theorem 7.1. Fix t ∈ (0, 1) and consider the class of models that preserve the given row (or column) marginals pi+ (or p+i ) for i = 1, . . . , I, and also preserve the given sums pij + pji = 2sij for i, j = 1, . . . , I. In this class, the QSt model (4) is the closest model to the complete symmetry model S in (1), where ‘closest’ refers the φ-divergence defined by φ(u) = ft (u) − ft (1) − ft′ (1)(u − 1), where ft (u) = (u + 2t 1−t ) log(u + (34) 2t 1−t ). 2t 2t Proof. We set Ft (u) = φ′ (u) = log(u + 1−t ) − ℓt , where ℓt = log(1 + 1−t ) is just a constant for given ′ t. This choice of constant ensures φ (1) = 0. Then the inverse function to Ft is Ft−1 (x) = ( With this, we can write pij = sij Ft−1 (αi + γij ) = sij ( where αi +ℓt βi = e −2t ) + ex+ℓt . 1−t βi ( 2(1+t) −2t −2t 1−t )  + eαi +γij +ℓt ) = sij + , 1−t 1−t βi + βj γij and e = 2(1+t) 1−t eαi +ℓt + eαj +ℓt . We next rewrite pij as pij = sij 2(1+t) −(1 + t) βi ( 1−t )  + = sij 1 + 1+ 1−t βi + βj (1+t) 1−t (βi − βj )  βi + βj . Setting βi = 1 + (1 − t)ai and βj = 1 + (1 − t)aj , this translates into our parametrization (4). Now the result follows from Kateri and Papaioannou (1997, Theorem 1). For a probability table s with symmetry S, the quantity Dφ (p, s) is minimized when p is the probability table satisfying QSt . The fact that the QSt models are φ-divergence QS models implies that they share all the desirable properties of the φ-divergence QS models (Kateri and Papaioannou, 1997). This includes the properties that highlight the physical interpretation issues of these models. As far as we know, 16 the φ-divergence for the parametric φt function (34) has not been considered so far. Its study can be the subject of further research. Such a future project has the potential to build a bridge between information geometry (Amari and Cichocki, 2010) and algebraic statistics (Drton et al., 2009). Acknowledgements. Fatemeh Mohammadi was supported by the Alexander von Humboldt Foundation. Bernd Sturmfels was supported by the NSF (DMS-0968882) and DARPA (HR0011-12-1-0011). References Amari, S. & Cichocki, A. (2010). Information geometry of divergence functions. Bulletin of the Polish Academy of Sciences, Technical Sciences 58, 183–195. Bishop, Y.M.M., Fienberg, S.E. & Holland, P.W. (1975). Discrete Multivariate Analysis: Theory and Practice, MIT Press, Cambridge, Mass. Bowker, A.H. (1948). A test for symmetry in contingency tables. Journal of the American Statistical Association 43, 572–574. Caussinus, H. (1965). Contribution à l’ analyse statistique des tableaux de corrélation. Ann. Fac. Sci. Univ. Toulouse 29, 77–182. Drton, M., Sturmfels, B. & Sullivant, S. (2009). Lectures on Algebraic Statistics, Oberwolfach Seminars, Vol 39, Birkhäuser, Basel. Kateri, M. & Agresti, A. (2010). A generalized regression model for a binary response. Statistics and Probability Letters 80, 89–95. Kateri, M. & Papaioannou, T. (1997). Asymmetry models for contingency tables. Journal of the American Statistical Association 92, 1124–1131. Miller, E. & Sturmfels, B. (2005). Combinatorial Commutative Algebra, Graduate Texts in Mathematics, 227, Springer-Verlag, New York. Pachter, L. & Sturmfels, B. (2005). Algebraic Statistics for Computational Biology, Cambridge University Press. Pardo, L. (2006). Statistical Inference Based on Divergence Measures, Chapman & Hall, Boca Raton, FL. Rapallo, F. (2003). Algebraic Markov bases and MCMC for contingency tables. Scandinavian Journal of Statistics 30, 385–397. Stuart, A. (1953). The estimation and computation of strengths of association in contingency tables. Biometrika 40, 105–110. Sturmfels, B. (1996). Gröbner Bases and Convex Polytopes, University Lecture Series, vol. 8, American Mathematical Society, Providence, RI. Authors’ addresses: Maria Kateri, Institute of Statistics, RWTH Aachen University, 52056 Aachen, Germany, [email protected] Fatemeh Mohammadi, Institut für Mathematik, Universität Osnabrück, 49069 Osnabrück, Germany, [email protected] Bernd Sturmfels, University of California, Berkeley, CA 94720, USA, [email protected] 17
0math.AC
arXiv:1307.2108v4 [math.GR] 19 Jul 2016 On suspensions, and conjugacy of hyperbolic automorphisms and of a few more. François Dahmani∗ February 15, 2018 Abstract The two parts of this work have been through different publishing processes. The main reason of this is that part 2, and only part 2, relies at the time of writing on unpublished material. The two parts are shown here in a single arXiv document because it did not make much sense to separate them for other purposes than the one explained above. Please notice that numbering has been chosen to match the published versions. Therefore there are two sections called 1, etc. There are also inherently some repetitions (e.g. in both introductions), I apologise for that. The first part (page 3) proposes a solution to the conjugacy problem for hyperbolic automorphisms of finitely presented groups. The second part (page 20) proposes a solution to the conjugacy problem for some relatively hyperbolic automorphisms of free groups. ∗ Partially supported by the ANR 2011-BS01-013 and the Institut Universitaire de France 1 Contents I On suspensions, and conjugacy of hyperbolic automorphisms. 3 1 Preliminary on automorphisms of graphs-of-groups 1.1 Trees and splittings . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Automorphisms, and the small modular group M odX . . . . . 6 6 7 Aut(G)-orbit of the fiber of a suspension An orbit problem for the small modular group . . . . . . . . No surface vertex group in splittings of suspensions . . . . . . The Aut(G)-orbit of the fiber in the hyperbolic case. . . . . . 9 9 11 14 2 The 2.1 2.2 2.3 3 Conjugacy and suspensions 16 II On suspensions, and conjugacy of a few more automorphisms of free groups. 20 1 Preliminary 22 1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.2 On polynomial growth . . . . . . . . . . . . . . . . . . . . . . 24 2 Conjugacy problems 27 2.1 Conjugacy of two relatively hyperbolic automorphisms without elementary splitting . . . . . . . . . . . . . . . . . . . . . 27 2.2 Conjugacy of two relatively hyperbolic automorphisms without parabolic splitting . . . . . . . . . . . . . . . . . . . . . . 33 2.3 A lemma on Dehn fillings . . . . . . . . . . . . . . . . . . . . 40 2 Part I On suspensions, and conjugacy of hyperbolic automorphisms. Abstract We remark that the conjugacy problem for pairs of hyperbolic automorphisms of a finitely presented group (typically a free group) is decidable. The solution that we propose uses the isomorphism problem for the suspensions, and the study of their automorphism group. Introduction Let F be a finitely presented group, Aut(F ) be its automorphism group, and Out(F ) = Aut(F )/Inn(F ) be its outer automorphism group. A way to consider the conjugacy problem in Aut(F ), or Out(F ), is to relate it to an isomorphism problem on semi-direct products of F with Z. Given two semi-direct products, F ⋊α hti and F ⋊β ht′ i, their structural automorphisms α and β are conjugated in Aut(F ) if and only if there is an isomorphism F ⋊α hti → F ⋊β ht′ i sending F on F , and t on t′ . They are conjugated in Out(F ) if and only if there is an isomorphism sending F on F , and t in t′ F (though it is a well known fact with a standard proof, we refer to Lemma 1.1 for the version that we’ll use). By analogy with topology and dynamical systems, we wish to call such semi-direct products suspensions of F , in which F is the fiber and t is the choice of a transverse direction, and tF is the choice of a transverse orientation. The conjugacy problem in Out(F ) can be expressed as the problem of determining whether suspensions are fiber-and-orientation-preserving isomorphic. We carry out this approach for automorphisms of finitely presented groups producing word-hyperbolic suspensions. Consider for instance F = Fn a free group of finite rank n. In that case, a solution to the conjugacy problem in Out(Fn ) was announced by Lustig [Lu-00, Lu-01]. However, it might still be desirable to find short1 complete solutions for specific classes of elements in Out(Fn ). For instance, consider the class of atoroidal automorphisms: those whose powers do not preserve 1 In the sense that the exposition is short; in this paper we ostensibly ignore algorithmic complexity, and to some extend conceptual complexity hidden in the tools that are used. 3 any conjugacy class beside {1}. Since Brinkmann proved in [B] that an automorphism produces a hyperbolic suspension if and only if it is atoroidal, there is a conceptually simple (slightly brutal) way to algorithmically check whether a given automorphism is indeed atoroidal. It consists in two parallel procedures. The first one looks for a preserved conjugacy class, by enumerating elements, and their images by powers of the given automorphism; it halts when a non trivial element is found such that its image by a non-trivial power of the automorphism are found to be conjugated in Fn . The second is Papasoglu’s procedure [P] applied on the semi-direct product of Fn by Z (with given structural automorphism), that halts if and only if the semidirect product is word-hyperbolic. Brinkmann’s results says that exactly one of these two procedures will halt, and depending which one halts, we deduce whether or not the automorphism is atoroidal. If two given automorphisms are found to be atoroidal with this procedure, our main result will allow to decide whether they are conjugate in OutFn . For hyperbolic groups, the isomorphism problem is solved [Se, DGr, DG-11]. In several examples, the solution available can settle the conjugacy problem. Take two pseudo-Anosov diffeomorphisms of a hyperbolic surface. The mapping tori are closed hyperbolic 3-manifold, hence hyperbolic and rigid (in the sense that their outer-automorphism groups are finite). Sela’s solution to the isomorphism problem of their fundamental groups [Se, 0.3, 7.3] provides all conjugacy classes of isomorphisms (there are finitely many), and from that point, it is possible to check whether one of them preserves the fiber and the orientation. For automorphisms of a free group, the analogous situation is when the two automorphisms are atoroidal, fully irreducible (with irreducible powers), and for their conjugacy problem, see [Lo, Lu3, Se], the later (in Coro. 0.6 loc. cit.), using the same strategy as above. However, there are atoroidal automorphisms for which the suspension, though hyperbolic, is not rigid. In [Br2] Brinkmann gave several examples with different behaviors. In particular, the solution to the isomorphism problem of hyperbolic groups will not reveal all isomorphisms between suspensions, and since the fibers are exponentially distorted in the suspensions, the usual rational tools (see [D, DGu1]) do not work for solving the isomorphism problem with such a preservation constraint. One can thus merely detect the existence of one isomorphism (say ι), but for investigating the existence of an isomorphism with the aforementioned properties, one is led to consider an orbit problem of the automorphism group of F ⋊ hti: decide whether an automorphism sends ι(F ) on F and ι(t) in t′ F . 4 Orbits problems are not necessarily easier, especially if the group acting is large and complicated. In [BMV], for instance, Bogopolski, Martino and Ventura propose a subgroup of GL(4, Z) whose orbit problem on Z4 is undecidable. In this paper we prove that, if F is finitely generated and F ⋊ hti hyperbolic, then Out(F ⋊ hti) contains a finite index abelian subgroup, whose action on H1 (F ⋊ hti) is generated by transvections. This allows us to prove that the specific orbit problem above is solvable in that case, by reducing it to a system of linear Diophantine equations, read in H1 (F ⋊ hti). This is explained in 2.1. These are thus the key steps to produce what we see as a picturesque way of solving the conjugacy problem for automorphisms of finitely presented groups with hyperbolic suspension (Theorem 3.2). The proof that Out(F ⋊ hti) is virtually abelian is the conjunction of Proposition 2.1 (together with the remark 2.2, which is not actually needed in the rest of the proof) and Proposition 2.14. The proof of the later is is done by considering the canonical JSJ decomposition of the hyperbolic group F ⋊ hti, and by proving that this graph-of-groups decomposition does not contain any surface vertex group. We cannot resist to sketch the proof of this key fact (that will be detailed in 2.2, and that takes roots in the way Brinkmann produces his examples in [Br2]). Consider the tree of the JSJ decomposition T , and X the graph of group quotient of T by G = F ⋊ hti. Since F is normal in G, T is a minimal tree for F , and Y = F \T is a graphof-groups decomposition of F whose underlying graph is its own core, and since its genus is bounded by the rank of F , it is finite. It follows that every vertex group (resp. edge group) in X is the suspension of a vertex group (resp. edge group) in Y: lift the vertex in T , where its hti-orbit passes twice on a pre-image of a vertex in Y, thus yielding the suspension (see Lemma 2.6 for more details). Since edge groups in X are cyclic, edge groups in Y must be trivial. Therefore Y is a free decomposition of F , and its vertex groups are of finite type. Going back to X again, vertex groups of X are suspensions of infinite, finitely generated groups, hence cannot be free nor surface groups, because finitely generated normal subgroups of free groups (or surface groups) are of finite index or trivial. To present these arguments, the formalism of automorphisms of graph of groups is to be recalled, in a rather precise way in order to be useful. The confident reader may skip this part (section 1), and only retain that the small modular group is the group of automorphisms generated by Dehn twists on edges of a graph of groups. I am grateful to the referee for useful comments. 5 1 1.1 Preliminary on automorphisms of graphs-of-groups Trees and splittings We fix our formalism for graphs and graph of groups. This material is classical, and can be found in Serre’s book [Ser]. A graph is a tuple X = (V, E,¯, o, t) where V is a set (of vertices), E is a set (of oriented edges) and ¯ : E → E, o : E → V , t : E → V verify (¯◦¯) = IdE and (o ◦¯) = t. A graph-of-groups X consists of a graph X, for each vertex v of X, a group Γv , for each unoriented edge {e, ē} of X, a group Γ{e,ē} (but we will write Γe = Γē for it), and for each oriented edge e of X, a injective homomorphism ie : Γe → Γo(e) , where o(e) is the origin vertex of the oriented edge e. The Bass group B(X) is [ B(X) = h( Γv ) ∪ E | ∀e ∈ E, ∀g ∈ Γe , ē = e−1 , e−1 iē (g)e = ie (g)i. v∈V An element g0 e1 g1 e2 . . . gn en gn+1 is a path element from o(e1 ) to t(en ) if gi−1 ∈ o(ei ) and gi ∈ t(ei ) for all i. The fundamental group π1 (X, v0 ) of the graph-of-groups X at the vertex v0 , is the subgroup of the Bass group consisting of path elements from v0 to v0 . Choose a maximal subtree τ of the graph X, and consider π1 (X, τ ) = B(X)/hhe ∈ τ ii. Then the quotient map B(X) → π1 (X, τ ) is, in restriction to π1 (X, v0 ), an isomorphism. A G-tree is a simplicial tree with a simplicial action of G without inversion. It is minimal if there is no proper invariant subtree. It is reduced if the stabilizer of any edge is a proper subgroup of the stabilizer of any adjacent vertex. The quotient of a G-tree by G is naturally marked by the family of conjugacy classes of stabilizers of vertices and edges, and inherits a structure of a graph-of-groups (whose fundamental group is isomorphic to G). The Bass-Serre tree of a graph-of-groups is its universal covering in the sense of graphs of groups. It is a π1 (X, v0 )-tree. A collapse of a G-tree T is a G-tree S with an equivariant map from T to S that sends each edge on an edge or a vertex and no pair of edges of T in different orbits are sent in the same edge (but they may be sent on the same vertex). A collapse of an edge e in a graph-of-groups decomposition is a collapse of the corresponding Bass-Serre tree in which only the edges in the orbit of a preimage of e are mapped to a vertex. 6 Given a group G, and a class of groups C, a splitting of G over groups in C is an isomorphism between G and the fundamental group of a graph of groups whose edge groups are in C. Equivalently, a splitting of G can be though of as an action of G on a tree, with edge stabilizers in C. A splitting is called reduced if, in the tree, there is no edge whose stabilizer equals that of an adjacent vertex. 1.2 Automorphisms, and the small modular group ModX Let X and X′ be two graphs-of-groups. An isomorphism of graphs-of-groups Φ : X → X′ is a tuple (ΦX , (φv ), (φe ), (γe )) such that • ΦX : X → X ′ is an isomorphism of the underlying graphs, • for all vertex v, φv : Γv → ΓΦX (v) is an isomorphism, for all edge e, φe = φē : Γe → ΓΦX (e) is an isomorphism, • and for each edge e, γe ∈ ΓΦX (t(e)) satisfying, for v = t(e), φv ◦ ie = adγe ◦ iΦX (e) ◦ φe , for (adγe : x 7→ γe−1 xγe ) the inner automorphism of ΓΦX (t(e)) defined by the conjugacy by γe . The last point is the commutation of the following diagram (for each edge e): adγe φv Γv → ΓΦX (v) ← ↑ Γe φe −→ ΓΦX (v) ↑ (1) ΓΦX (e) When X = X′ the isomorphisms can be composed in a natural way (see [Ba, 2.11]: (ΦX , (φv ), (φe ), (γe ))◦(ΨX , (ψv ), (ψe ), (ηe )) = (ΦX ◦ΨX , (φΨX (v) ◦ ψv ), (φΨX (e) ◦ ψe ), (φΨX (t(e)) (ηe )γΨX (e) )) ), thus providing the automorphism group of the graph-of-groups X, denote by δAut(X). This group δAut(X) naturally maps into the automorphism group of the Bass group B(X) in the following way: for all edge ǫ, and all automorphism Φ = (ΦX , (φv ), (φe ), (γe )) ∈ δAut(X), one has Φ(ǫ) = γǭ−1 ΦX (ǫ)γǫ , and Φ|Γv = φv . One can check that, for any Φ, the relations of the Bass group are preserved, and that the thus induced morphism is bijective. Remark 1.1. For this argument, see [Ba, 2.1, 2.2], but notice that Bass chose to let conjugations act on the left, while we chose to let them act on 7 the right (as in [DG-11]). This difference yields a few harmless inversions in the formulae, (actually the attentive reader may have spotted them already in the relations of the Bass group, [Ba, 1.5 (1.2) ]). and the only risk here is to mix both (incompatible) choices. Each automorphism in δAut(X) sends path elements to path elements, hence naturally provides an outer-automorphism of π1 (X, v0 ) (and a genuine automorphism if ΦX (v0 ) = v0 ), and we will often implicitly make this identification. Let us define the small modular group of X, denoted by M odX , to be the subgroup of δAut(X) consisting of elements of the form (IdX , (φv ), (IdΓe ), (γe )), for φv ∈ InnΓv inner automorphisms. One can check, using the composition rule, that this forms a subgroup of δAut(X). If we note φv = adγv , then the compatibility condition (1) imposes that −1 γv γe ∈ ZΓt(e) (ie (Γe )) for all edge e (where ZΓt(e) (ie (Γe )) denotes the centralizer of the attached edge group ie (Γe ) in the vertex group Γt(e) ). If one chooses a generating set Se for each group ZΓt(e) (ie (Γe )), then the small modular group is generated by the union of two collections of elements. First, the collection of oriented Dehn twists {Dǫ,γ , ǫ ∈ E, γ ∈ Sǫ }, defined by De,γ = (IdX , (Idv ), (Ide ), (xe )) for xǫ = γ and xe = 1 for all e 6= ǫ. Second, the collection of inert twists, {(IdX , (adγv )), (Ide ), (γe = γt(e) ))} (note that it is the same family of elements involved as (γe ) and in defining the (φv ), and that this defines an element of M odX ). The inert twists are not so interesting. They correspond to changing some choice of fundamental domain in the Bass-Serre tree. In particular: Lemma 1.2. Any inert twist vanishes in Out(π1 (X, v0 )). Proof. Consider an inert twist Φ. After conjugation over the whole group, we may assume that φv0 = IdΓv0 . Then take a path element in the Bass group, g0 e1 . . . gn en gn+1 that is a loop from v0 to v0 . Each gi is in Γt(ei ) = −1 ei γi . Concatenation makes Γt(ei+1 ) . Thus, Φ(gi ) = adγi (gi ), and Φ(ei ) = γi−1 everything collapse, and Φ(w) = w. We record how oriented Dehn twists are realized as automorphisms of π1 (X, v0 ). The following is an immediate consequence of the definitions. Lemma 1.3. Let ǫ ∈ E be an oriented edge of X, and γ ∈ ZΓt(ǫ) (i(Γǫ )). Let e be an oriented edge different from ǫ and ǭ. The oriented Dehn twist Dǫ,γ , seen as an automorphism of B(X), is such that Dǫ,γ (ǫ) = ǫγ, Dǫ,γ (ǭ) = γ −1 ǭ and Dǫ,γ (e) = e. Moreover, for all vertex v in X, and γv ∈ Γv , Dǫ,γ (γv ) = γv . 8 One should be nonetheless cautious with the interpretation of Dǫ,γ as an automorphism of π1 (X, v0 ), since the identification of a preferred copy of Γv in π1 (X, v0 ) is subject to a choice of path from v0 to v. If this path contains a (or several) copy of the edge ǫ, then Dǫ,γ is actually conjugating, on the right, Γv by γ −1 (or a power of it). 2 2.1 The Aut(G)-orbit of the fiber of a suspension An orbit problem for the small modular group In this section, we discuss an orbit problem for M odX in H1 (G), the abelianisation of G. For that, we note that M odX naturally maps into Aut(H1 (G)) ≃ GL(H1 (G)). We will denote by¯ : G → H1 (G) the abelianisation map. Let us also choose E + ⊂ E a set of representatives of unoriented edges. Proposition 2.1. Let G = π1 (X, v0 ). The image of M odX in GL(H1 (G)) is abelian, generated by transvections. Proof. Since inert twists vanish in Out(G), the images of oriented Dehn twists, generate the image of M odX in GL(H1 (G). It suffice to show that oriented Dehn twists induce transvections on H1 (G) that commute. Any element γ of π1 (X, v0 ) has an expression as a normal form coming from the ambient Bass group: γ = g0 e0 g1 e1 . . . em gm+1 where for all i, ei ∈ E and gi+1 ∈ Γt(ei ) , g0 , gm+1 ∈ Γv0 . Q The normal form of γ turns, in H1 (G), into γ̄ = g0 . . . gm+1 × e∈E + en(γ,e) where n(γ, e) is the number of occurrences of e in (e0 , . . . , em ) minus the number of occurrences of ē. If Dǫ,h is the Dehn twist of h on ǫ, the induced automorphism on H1 (G) is denoted by Dǫ,h . From the expression of Dǫ,h (e) in 1.3, Dǫ,h is the following transvection   Y Dǫ,h (γ̄) = (g0 g1 . . . gm+1 ) ×  en(γ,e)  × h̄n(γ,ǫ) = γ̄ × h̄n(γ,ǫ) . (∗) e∈E + Since h ∈ Γt(ǫ) , the element hn(γ,ǫ) is in a vertex group, and it is fixed (if seen in the Bass group) or conjugated (if seen in G) by all oriented Dehn twists on edges, thus oriented Dehn twists on edges commute in the abelianisation. Remark 2.2. In fact, if ZΓt(e) (ie (Γe )) is abelian (which is the case if G torsion free hyperbolic), then M odX is abelian itself. 9 We keep the same notations. Note that the group H1 (G)/F̄ is infinite cyclic, by assumption, and is generated by the image of t̄. Define ¯ : G → H1 (G)/F̄ and for all γ ∈ G, define δ(γ) to be the unique integer such that γ̄¯ = t̄¯δ(γ) . Proposition 2.3. Let G be a finitely generated group that can be expressed as a semi-direct product F ⋊ hti. Given a splitting X of G, and for each e ∈ E, a generating set Se ⊂ Γt(e) for ZΓt(e) (ie (Γe )) and a family (γj )0≤j≤j0 of elements of G, one can decide whether there is an element η ∈ M odX whose image η̄ in Aut(H1 (G)) sends γ̄j in F̄ for all j < j0 and γ̄j0 inside t̄F̄ . More precisely, there is such an element η if and only if the explicit Diophantine linear system of equations X rse n(γj , e)δ(se ) = −δ(γj ) + diracj=j0 (2) ∀j, e∈E + se ∈Se (with unknowns rse ) has a solution. Proof. By (∗) (from the proof of Proposition 2.1), δ(Dǫ,h (γ)) = δ(γ) + n(γ, ǫ)δ(h) and by induction, and the fact that h̄ is fixed by all Dehn twists, δ(Dǫ1 ,h1 Dǫ2 ,h2 . . . Dǫk ,hk (γ)) = δ(γ) + k X n(γ, ǫi )δ(hi ). i=1 Assume that there exists η ∈ M odX such that δ(η(γj )) = 0 for j < j0 and = 1 for j = j0 . Since oriented Dehn twists generate the image of M odX in GL(H1 (G)), this element η can be chosen as a product of oriented Dehn twists Dǫ1 ,h1 Dǫ2 ,h2 . . . Dǫk ,hk , which by commutation in Aut(H1 (G)) can be chosen to be Y rse De,s . e e∈E + ,se ∈Se Therefore by the previous equation, ∀e ∈ E, ∀se ∈ Se , ∃rse ∈ Z X rse n(γj , e)δ(se ) = −δ(γj ) + dirac(j=j0 ) ∀j, e∈E + se ∈Se (in which diracj=j0 yields 0 if j 6= j0 and 1 otherwise). Conversely, if the system of equations X ∀j, rse n(γj , e)δ(se ) = −δ(γj ) + diracj=j0 e∈E + se ∈Se 10 Q rse has a solution (in unknowns rse ), then δ( e∈E + ,se ∈Se De,s e (γj )) = 0 for j < j0 and = 1 for j = j0 . We have thus reduced the orbit problem to an equivalent problem of satisfaction of a system of linear Diophantine equations, that are explicitly computable. The problem is therefore solvable, by classical technics of linear algebra. If we had the same statement with Aut(G) replacing M odX , we would be very close to our conclusion. What we will show is that M odX has finite index image in Out(G). 2.2 No surface vertex group in splittings of suspensions Our aim is Proposition 2.11, that states that in any splitting of a suspension, there is no vertex whose group which is a surface group with boundary, where the boundary subgroups are the adjacent edge groups. More precisely, if T is a G-tree, we say that a vertex stabilizer H is a hanging surface group if it is the fundamental group of a non-elementary compact surface with boundary components, and the adjacent edge groups are exactly the subgroups of the boundary components. We say that it is a hanging bounded Fuchsian group if there is a finite normal subgroup K ⊳ H such that H/K is isomorphic to the fundamental group of a non-elementary hyperbolic compact 2-orbifold with boundary, by an isomorphism sending the images of the adjacent edge stabilizers on the boundary subgroups of the orbifold group. We will need the following well known fact about bounded Fuchsian groups, that we give for completeness. Lemma 2.4. Any hanging bounded Fuchsian group is virtually free. Proof. Let H be a hanging bounded Fuchsian group, and K a finite subgroup of H as above. Because H/K is the fundamental group of a hyperbolic compact 2-orbifold, it is a subgroup of P SL(2, R) ⋊ Z/2Z, and by Selberg’s lemma, it is residually finite, and it has a finite index subgroup H̄0 without torsion. This subgroup is the fundamental group of a finite cover of the orbifold, which is therefore a surface, with boundary, since the orbifold has boundary. Thus, H̄0 is free. It lifts as a free subgroup of H, whose index in H is the product of indices |K| × [H/K : H̄0 ] . We will show (Proposition 2.11) that a splitting of a suspension of a finitely generated group has no hanging bounded Fuchsian vertex group. 11 Let T be the Bass-Serre G-tree of a reduced splitting of G. Let us introduce Y = F \T and X = G\T . Both graphs provide respectively graphof-groups decompositions Y and X of F and of G. Lemma 2.5. Y is a finite graph, and the G-action on T induces, by factorisation, a ht̄i-action on Y . Proof. The second part of the statement is obvious since F is normal in G. Also, since F is normal in G, its minimal subtree in T is G-invariant, therefore it is T itself. In other words, Y is its own core. As for its genus, it it is finite, since it bounds from below the rank of F (the fundamental group of Y at a vertex v0 projects on the fundamental group of the underlying graph Y at v0 ). It follows that Y is a finite graph, and it is endowed with an action of ht̄i = G/F for which the quotient is X. Lemma 2.6. Given any vertex in T , its stabilizer in G is a suspension of its stabilizer in F . Proof. Let ν be such a vertex, and consider v its image in X and ṽ its image in Y . Because Y is finite, there is a smallest n > 0 such that t̄n ṽ is ṽ. Lifting in T , we obtain the existence of γ ∈ F such that γtn ν = ν. Therefore, if (F )ν is the stabilizer of ν in F , then it is normalized by γtn and (F )ν ⋊ hγtn i fixes ν. We claim that (F )ν ⋊ hγtn i is the stabilizer in G of ν. If there is another element in it, it is not in F by definition of (F )ν , and therefore it is some ηtm , η ∈ F, m 6= 0. By minimality of n, n divides m, and if γ ′ tm = (γtn )k , then γ ′ tm ν = ηtm ν, and t−m γ ′−1 ηtm fixes ν and is in F by normality of F . Thus it is in (F )ν , and ηtm ∈ (F )ν ⋊ hγtn i. This ensures the claim. Lemma 2.7. For any edge in T , its stabilizer in G is a suspension of its stabilizer in F . Proof. Subdivide such an edge (and all edges in its orbit, equivariantly) by inserting a vertex on its midpoint, and apply the previous lemma to this vertex. Up to now we have not used any assumption on the nature of edge groups. But now two remarks are of interest, and directly follow from the previous lemmas. 12 Lemma 2.8. A reduced G-tree T never has a finite edge stabilizer. If T has cyclic edge stabilizers in G, then Y is a free splitting of F . If T has virtually cyclic edge stabilizers in G, then Y is a splitting of F over finite subgroups. Lemma 2.9. Let X be a graph-of-groups decomposition of F ⋊ hti with virtually cyclic edge groups. Then no vertex group of X is free non-abelian, or even infinitely many ended. Proof. By Lemma 2.8, T , as an F -tree, is the tree of a virtually free splitting of F . In particular, since F is finitely generated, each vertex stabilizer in F is finitely generated. It follows from Lemma 2.6 that a vertex stabilizer of T in G contains an infinite index normal subgroup, which is as we saw, of finite type. Such a group cannot be free. It cannot be infinitely many ended neither (for the same reason actually, that we recall in the following lemma). Lemma 2.10. Let H be a finitely generated group with infinitely many ends, then H has no finitely generated infinite-index normal subgroup. Proof. By Stallings’ theorem [Sta, Thm. 4.A.6.5, Thm. 5.A.9], H is the fundamental group of a reduced finite graph-of-groups with finite edge groups (with at least one edge). Let T be the associated Bass-Serre tree, and N be a normal subgroup of H. Then, the tree T is minimal for N , hence T /N equals its own core. If N is finitely generated, T /N is finite. Moreover, the action of H on T factorizes through T /N , and if N has infinite index in H, there is an edge ẽ in T /N fixed by infinitely many different elements of H, {hi , i ∈ I}, all in different N -coset. Let e its image in T /H and ẽ˜ a choice of lift in T . There are ni ∈ N such that for all i, hi ni fix e. By finiteness of edge stabilizers, infinitely many of the elements hi ni are equal, contradicting that the hi were in different N -cosets. Proposition 2.11. Let F be a finitely generated group, and G = F ⋊ hti a suspension. Given any graph-of-groups decomposition X of G, no vertex group of X is a hanging surface group, or a hanging bounded Fuchsian group. Proof. Assume the contrary: let Γv0 be an alleged hanging bounded Fuchsian group or hanging surface group, which is, in particular, virtually free (Lemma 2.4), hence infinitely-many ended because it is non-elementary. Because it is hanging, all the neighboring edges of v0 carry virtually cyclic 13 groups. Collapse all other edges in X in order to get X′ , whose edges are virtually cyclic. The image v0′ of v0 carries the same group, since no adjacent edge has been collapsed, and this group is infinitely-many ended, as we noticed. Apply Lemma 2.9 to X′ to get the contradiction. 2.3 The Aut(G)-orbit of the fiber in the hyperbolic case. Let us recall that the canonical Zmax -JSJ decomposition of a one-ended hyperbolic group is a certain finite splitting X of G over certain virtually cyclic subgroups (maximal with infinite center), such that every automorphism of G induces an automorphism of graph of groups of X (see [DG-11, section 4.4]). In other word, the natural map δAut(X) → Out(G) is surjective. Remark 2.12. The choice to use the rather technical Zmax -JSJ splitting instead of the more natural “virtually-cyclic” JSJ-splitting, is only suggested by our ability to algorithmically compute this decomposition. In principle, we could work with the classical JSJ splitting as well in the same way. Let X be a graph-of-groups, v a vertex therein, and Γv the vertex group. The choice of an order on the oriented edges adjacent to v, and of a generating set of the edge groups, endows Γv with a marked peripheral structure, that is the tuple of conjugacy classes of the images of these generating sets by the attaching maps. We denote by T this tuple, and Outm (Γv , T ) the subgroup of Out(Γv ) preserving T (see also [DG-11]). In the following, the choices of order and generating sets are implicit, and done a priori. The following is a typical feature of a JSJ decomposition of a hyperbolic group, whose proof, in this specific setting, is essentially contained in [DG-11]. Lemma 2.13. Let G be a one-ended hyperbolic group. Let (Γv , T ) be a vertex group of the Zmax -JSJ decomposition X of G, with the marked peripheral structure induced by X (and some choice of finite generating sets of edge groups). If Outm (Γv , T ) is infinite, then G admits a splitting with a hanging bounded Fuchsian vertex group. Proof. By [DG-11, Prop. 3.1], such a vertex group Γv must have a further compatible splitting over a maximal virtually cyclic group with infinite center, which allows to use [DG-11, Prop 4.17] to ensure that (Γv , T ) is a so-called hanging orbisocket, which by definition [DG-11, Def. 4.15] allows to refine X in order to get a splitting of G whose one vertex group is a hanging bounded Fuchsian group. 14 Proposition 2.14. Let F a finitely presented group, and G = F ⋊ hti a suspension that is assumed to be hyperbolic. Then, the image in Out(G) of the small modular group of the Zmax JSJ decomposition of G has finite index in Out(G). Moreover, one can compute a set of right-coset representatives of M odX in Out(G) (in the form of automorphisms of G). Proof. Since δAut(X) surjects on Out(G) in the case of the Zmax -JSJ decomposition, it suffices to show that the small modular group has finite index in δAutX and that coset representatives can be computed in δAutX. Once again, this is essentially done in [DG-11] (and probably in other places). First, the splitting X can be effectively computed [DG-11, Prop. 6.3]. Consider the following three maps. First qX : δAut(X) → Aut(X) where Aut(X) is the automorphism group of the Q underlying finite graph X. Second, the natural map q : ker q → X e∈E Aut(Γe ). Third, the natural Q E map qV : ker qE → v∈V Outm (Γv , T ), where T is the marked peripheral structure induced by the ambient graph-of-groups X. The group ker qV is the small modular group. The two first maps have finite image. By Lemma 2.13 and Proposition 2.11, the map qV also has finite image. Therefore the small modular group has finite index in δAut(X). In order to reconstruct coset representatives of the small modular group in δAut(X), it is enough to find coset representatives for the kernel of each of these maps. In order to compute coset representatives of ker qE in δAut(X), we can make the finite list of all graph automorphisms of X for which ΓΦX (e) ≃ Γe . Let ΦX be any of them. We can make the list of all isomorphisms ΓΦX (e) ≃ Γe (there are finitely many such isomorphisms since these groups are virtually cyclic). Then we can apply [DG-11, Prop. 2.28] in order to reveal whether this automorphism ΦX has a preimage by qX . In order to compute coset representatives of ker qE in ker qX , we consider a collection of automorphisms of edge groups, and apply [DG-11, Prop. 2.28] in order to reveal whether this collection has a preimage by qE . Finally, in order to compute coset representatives of ker qV in ker qE , one can make the list of all elements in Out(Γv , T ) expressed as automorphisms (by [DG-11, Coro. 3.5], we can enumerate all of them) and for each choice of them (for each v), check whether the collection defines a graph-of-groups automorphism by solving the simultaneous conjugacy problem that allows the diagram 1 to commute. 15 Corollary 2.15. Let F be finitely presented, and G = F ⋊ hti a suspension that is assumed to be hyperbolic. Given a splitting X of G, generating sets for the centralizers of adjacent edge groups in vertex groups, and a family (γj )0≤j≤j0 of elements of G, one can decide whether there is an element η ∈ Aut(G) whose image η̄ in Aut(H1 (G)) sends γ̄j in F̄ for all j < j0 and γ̄j0 inside t̄F̄ . Proof. First we take note that η ∈ Aut(G) satisfies the conclusion if and only if any other automorphism in the same class in Out(F ) satisfies it. Thus, let α1 , . . . , αk be the right-coset representatives of M odX in Out(G) computed by Proposition 2.14, in the form of automorphisms. For each i, we compute, for each j, αi (γj ), and we use Proposition 1.2 in order to decide whether there is η0 ∈ M odX such that η¯0 (αi (γj )) ∈ F̄ for all j < j0 and η¯0 (αi (γj0 )) ∈ t̄F̄ . If there exists an index i such that the answer is positive, then η0 ◦ αi sends γ̄j in F̄ for all j < j0 and γ̄j0 inside t̄F̄ . If for all i the answer is negative, then no automorphism of G satisfies this property. 3 Conjugacy and suspensions The following observations elaborate on some well known point of view (see for instance [Se], [ALM]...), and, as stated in the introduction, is our angle of attack of the conjugacy problem. Lemma 3.1. Let φ1 and φ2 be two automorphisms of F . The following assertions are equivalent. 1. φ1 and φ2 are conjugate in Out(F ); 2. there is an isomorphism between their suspensions that preserves the fiber (in both directions) and the orientation; 3. there is an isomorphism between their suspensions that preserves the orientation and sends the fiber inside the fiber; 4. there is an isomorphism between their suspensions whose factorization through the abelianisations preserves the orientation, and sends the image of the fiber inside the image of the fiber. 16 Proof. Of course, 2 implies 3, which implies 4. Assuming 4 we now show 3. If the given isomorphism ψ : F ⋊φ1 hti → F ⋊φ2 hti does not preserve the fiber, it sends some f ∈ F on some f ′ tk , f ′ ∈ F, k 6= 0. Since the fibers are kernels of some cyclic quotient, the derived subgroups of the suspensions are contained in the fibers. Thus the image of f ′ tk in the abelianisation of F ⋊φ2 hti is not in the image of F . thus, the factorisation through abelianisations of ψ does not send the image of the fiber inside the image of the fiber. If ψ does not preserve the orientation, it sends t to some f ′ tk , f ′ ∈ F, k 6= 1, and the same argument shows that the factorisation through abelianisations of ψ does not preserve the orientation. Thus we obtain that 4 implies 3. Let us prove that 3 implies 2. Let α the isomorphism given by 3. Then α(F ) is normal in (F ⋊φ2 hti) and the quotient is infinite cyclic. Thus the image of the fiber F is trivial in this quotient (because the further quotient by this image is also infinite cyclic). It follows that α(F ) = F . Let us prove that 1 is equivalent to 2. Assume that Ψ : F ⋊φ1 hti → F ⋊φ2 ht′ i sends F to F , and t to f0 t′ . Then write ψ for the restriction of Ψ to F . In F ⋊φ1 hti, for all f ∈ F , one has t−1 f t = φ1 (f ). Passing through Ψ, one gets (in F ⋊φ2 ht′ i) t′−1 f0−1 ψ(f )f0 t′ = ψ(φ1 (f )), that is φ2 ◦adf0 ◦ψ = ψ ◦φ1 . Thus, the classes of φ1 and φ2 are conjugate in Out(F ) and furthermore, if f0 = 1, φ1 and φ2 are conjugate in Aut(F ). Conversely, if φ1 = ψ −1 ◦ adf0 ◦ φ2 ◦ ψ for some ψ in Aut(F ), one can extend ψ to Ψ̃ : F ∗ hti → F ⋊φ2 hti by setting Ψ(t) = f0 t ∈ F ⋊φ2 hti. The relation of the semi-direct product by φ1 vanishes in the image, thus Ψ̃ factorizes through F ⋊φ1 hti producing a bijective morphism. Theorem 3.2. There is an algorithm that, given F a finitely presented group, and two automorphisms φ, φ′ of F such that the suspensions are wordhyperbolic, decides whether φ and φ′ are conjugated in Out(F ). Proof. By Lemma 1.1, it suffices to decide whether the associated semidirect products of F with Z with structural automorphisms φ and φ′ are isomorphic by an isomorphism satisfying characterization 4 in Lemma 1.1. Let F ′ be another copy of F , with same presentation. We read φ′ as an automorphism of F ′ . Let us denote by G and G′ the groups of the suspensions of F and F ′ by the given φ and φ′ respectively. Provided with a presentation of F , we have presentations of G and G′ . By the main result of [DG-11], we can decide whether there is an isomorphism between G and G′ . If there is none, we are done. If there is one, 17 say ψ : G → G′ , any other isomorphism is in the orbit of ψ by Aut(G′ ). Let {fi , i = 1, . . . , j0 − 1} be a generating set of F . We apply our solution to the orbit problem 2.15 to the elements γi = ψ(fi ) for i < j0 , and γj0 = ψ(t). By definition, the answer to this orbit problem is positive if and only if there is an automorphism η such that η ◦ ψ satisfies characterization 4 in Lemma 1.1. Since all isomorphisms G → G′ are of this form (i.e. η ◦ ψ for some automorphism η), this decides whether there is an isomorphism satisfying the assertion (4) of Lemma 1.1, hence, whether φ and φ′ are conjugated in Out(F ). Theorem 3.2 covers the case of atoroidal automorphisms of free groups, by [B]. Corollary 3.3. Let F be a free group. The conjugacy problem in Out(F ) restricted to atoroidal automorphisms is solvable. References [ALM] G. Arzhantseva, J.-F. Lafont, A. Minasyan, Isomorphism versus commensurability for a class of finitely presented groups. J. Group Theory 17 (2014), no. 2, 361-378 [BMV] O. Bogopolski, A. Martino, E. Ventura, Orbit decidability and the conjugacy problem for some extensions of groups. Trans. Am. Math. Soc. 362, No. 4, 2003-2036 (2010). [Ba] H. Bass, Covering theory for graph of groups, J. Pure Appl. Algebra 89 (1993), 3–47. [Br1] P. Brinkmann, Hyperbolic automorphisms of free groups. Geom. Funct. Anal. 10 (2000), no. 5, 1071–1089. [Br2] P. Brinkmann, Splittings of mapping tori of free group automorphisms. Geom. Dedicata 93 (2002), 191–203. [D] F. Dahmani, Existential questions in (relatively) hyperbolic groups. Israel J. Math. 173 (2009), 91–124. [DGu1] F. Dahmani, V. Guirardel, Foliations for solving equations in groups: free, virtually free and hyperbolic groups, J. of Topology, 3, no. 2 (2010) 343–404. [DGu2] F. Dahmani, V. Guirardel, The isomorphism problem for all hyperbolic groups. Geom. Funct. Anal. 21 (2011), no. 2, 223–300. [DGr] F. Dahmani, D. Groves, The isomorphism problem for toral relatively hyperbolic groups. Publ. Math. Inst. Hautes Études Sci. No. 107 (2008), 211–290. [Lo] J. Los, On the conjugacy problem for automorphisms of free groups. Topology 35 (1996), no. 3, 779–808. [Lu1] M. Lustig. Structure and conjugacy for automorphisms of free groups I. MPI-Bonn preprint series 2000, No. 241; http://www.mpim-bonn.mpg.de/preprints 18 [Lu2] M. Lustig. Structure and conjugacy for automorphisms of free groups II. MPI-Bonn preprint series 2001, No. 4; http://www.mpim-bonn.mpg.de/preprints [Lu3] M. Lustig, Conjugacy and centralizers for iwip automorphisms of free groups, in “Geometric Group Theory”, Trends in Mathematics, 197–224. Birkhäuser Verlag, Basel, 2007 [P] P. Papasoglu, An algorithm detecting hyperbolicity. Geometric and computational perspectives on infinite groups (Minneapolis, MN and New Brunswick, NJ, 1994), 193–200, DIMACS Ser. Discrete Math. Theoret. Comput. Sci., 25, Amer. Math. Soc., Providence, RI, 1996. [Sel] Z. Sela, The isomorphism problem for hyperbolic groups, Ann. Math., 141 (1995), 217–283. [Ser] J.-P. Serre, Arbres, Amalgames, SL2 , Société Mathématique de France, Asterisque no. 46 (1977). [Sta] J. Stallings, Group theory and three-dimensional manifolds. Yale Math., Monographs. no.4, Yale University Press (1971). François Dahmani, Univ. Grenoble Alpes, Institut Fourier UMR5582, F-38402 Grenoble, France. e-mail: [email protected] 19 Part II On suspensions, and conjugacy of a few more automorphisms of free groups. Abstract In a previous work, we remarked that the conjugacy problem for pairs of atoroidal automorphisms of a free group was solvable by mean of the isomorphism problem for hyperbolic groups and an orbit problem for the automorphism group of their suspensions (i.e. their semidirect product with Z for the relevant structural automorphism). We consider the same problem a few more automorphisms of free groups, those that produce relatively hyperbolic suspensions that do not split over a parabolic subgroup. Introduction Let F be a finitely presented group (we will soon assume that it is free), Aut(F ) be its automorphism group, and Out(F ) = Aut(F )/Inn(F ) be its outer automorphism group. Given two semi-direct products, F ⋊α hti and F ⋊β ht′ i, their structural automorphisms α and β are conjugated in Out(F ) if and only if there is an isomorphism F ⋊β hti → F ⋊α ht′ i that preserves the fiber (which is F ) and the orientation (i.e. sends tF on t′ F ). This suggests a way of analysing the conjugacy problem in a class of elements of Out(F ) through an isomorphism problem in a class of semidirect products of F . A motivating case is that of a free group. Though a solution to the conjugacy problem of automorphisms of free groups was announced by Lustig [Lu-00, Lu-01], it might still be desirable to find short complete solutions for specific classes of elements in Out(Fn ). In [D] we considered the case of atoroidal automorphisms. In that case, the semi-direct product F ⋊α hti is a hyperbolic group [B], and since the isomorphism problem for hyperbolic groups is solvable [Se, DGr, DG-11], the conjugacy problem for atoroidal automorphisms of free groups was reduced to an orbit problem for Out(F ⋊α hti) in H1 (F ⋊α hti, Z) (this orbit problem was an interpretation of the condition that there is an isomorphism F ⋊β hti → F ⋊α ht′ i that preserves the fiber and the orientation, once is given an 20 abstract isomorphism F ⋊β hti → F ⋊α ht′ i). We solved this orbit problem by showing that Out(F ⋊α hti) is a virtually abelian group, and by interpreting the orbit problem as a system of linear Diophantine equations. In view of [DGr], [DG-15], it is natural to ask whether one can approach the conjugacy problem of larger classes of automorphisms, namely those producing proper relatively hyperbolic suspensions. Definition 0.4. Let φ ∈ Aut(F ), and F1 , . . . , Fk finitely generated proper subgroups of F . We say that the automorphism φ is hyperbolic relative to {F1 , . . . , Fk } if there exists integers m1 , . . . , mk > 0 and elements f1 , . . . , fk ∈ F such that, for all i, tmi fi normalises Fi , and such that the group (F ⋊φ hti) is hyperbolic relative to {(Fi ⋊ htmi fi i), i = 1, . . . , k}. The case of automorphism of free groups is once again particularly interesting, since according to [GLu], all non-polynomial automorphisms of free groups should produce interesting relatively hyperbolic suspensions (of course it could be interesting to consider also a free product of nice groups). Thus from now on F is a free group. One says that a subgroup F0 of F is polynomial for a given automorphism φ if every conjugacy class of elements in F0 has polynomial growth under iterates of φ (more explicitly, that means that for all γ ∈ F0 , the length of a cyclically reduced representative of φn (γ) is bounded above by a polynomial in n). We say that an automorphism is polynomial if F itself is polynomial. For an outer automorphism Φ of F , we say that a subgroup F0 of F is polynomial for Φ if there is an automorphism φ in the class of Φ for which F0 is polynomial. In [L, Prop 1.4] Levitt proves that for any outer automorphism Φ of a free group F , there is a finite family of finitely generated subgroups of F , polynomial for Φ, such that all polynomial subgroups of Φ are conjugated into one of them (see also [GLu, Prop. 3.2]). The aim of this note is thus to explore to what extend the method used in [D] can be extended to larger classes of automorphisms of free groups, and in particular to (some) non-polynomial automorphisms. However, I ultimately had to restrict the study to those automorphisms whose suspension does not split over a parabolic subgroup. I also have to concede that this attempt uses three results unpublished at the time of writing (this issue will be made clear in a few lines). The main result of this attempt is the following. Theorem 0.5. There is an (explicit) algorithm that, given two automorphisms φ1 , φ2 of a finitely generated free group F , terminates if both produce 21 proper relatively hyperbolic suspensions, relative to suspensions of polynomial subgroups, without parabolic splitting, and it indicates whether φ1 and φ2 are conjugated in Out(F ). The arguments presented below involve other tools than in [D], in particular Dehn fillings, and growth of conjugacy classes under iterations of automorphisms. They rely on a certain number of currently unpublished results, so I would like to make this reliance clear. First, there is the main result of Gautero and Lustig paper [GLu]. This is used twice; to produce examples to which the results might apply (so, in some sense, as a motivation), and to compute explicitly the polynomial subgroups (actually, this is to certify that an exponentially growing automorphism is indeed exponentially growing). Then there is the splitting computation of Touikan [T]. And finally, there is the solution ot the isomorphism problem of some rigid relatively hyperbolic groups, by Guirardel and myself, [DG-15]. The authors wants to say merci to the referee, for useful comments and corrections. 1 Preliminary 1.1 General Since this note is a sequel to [D], we assume that the reader has access to that previous paper, and we will freely use its content. For readability, though, we briefly introduce now a few items that we need from that paper. First is a variation on some classical fact. As in [D] we will call a semidirect product with Z, F ⋊φ Z a suspension of F by φ, whose fiber is F and whose orientation is defined by F t (this is to distinguish it from the suspension by φ−1 which is the same group, but with reverse orientation). Lemma 1.1. (see for instance [D, Lemma 2.3]) Let φ1 and φ2 be two automorphisms of F . The following assertions are equivalent. 1. φ1 and φ2 are conjugate in Out(F ); 2. there is an isomorphism between their suspensions (F ⋊φ1 hti) and (F ⋊φ2 ht′ i) that preserves the fiber F (in both directions) and the orientation (i.e sends t in F t′ ); 3. there is an isomorphism between their suspensions that preserves the orientation and sends the fiber inside the fiber; 22 4. there is an isomorphism between their suspensions whose factorization through the abelianisations preserves the orientation, and sends the image of the fiber inside the image of the fiber. When talking about a splitting of a group, we mean a graph-of-group decomposition (often noted X) as defined in Bass-Serre theory. This is presented in many places, beginning with Serre’s famous book. We recall very briefly our conventions for defining a splitting, and its automorphisms. One is given an underlying graph (unoriented, with possible double edges, and loops) X whose set of vertices and set and oriented edges we denote respectively by V and E, and whose involution on the oriented edges (reversion of orientation) we denote by : e 7→ e, and terminaison map t : E → V . One is given groups for each vertices, denoted Γv , v ∈ V , and for each edge e ∈ E, another group Γe , with Γe = Γē , and an injective morphism ie : Γe ֒→ Γt(e) . The Bass group is the group generated by all vertex groups and all edges with the relations that ē = e−1 and that ēiē (g)e = ie (g) everywhere it is defined. The fundamental group of the graph of group at a vertex v0 is the subgroup of the Bass group of all elements of the form e1 γ1 e2 γ2 . . . er γr where ei ∈ E, γi ∈ Γt(ei ) for all i, and such that consecutive ei define a loop at v0 in the graph X (that is, for all i, t(ei+1 ) = t(ei ), and t(er ) = t(e1 ) = v0 ). If this fundamental group (of the graph of group X) is isomorphic to a certain group G we say that X is a splitting of G. We call a splitting non-trivial if the action of its fundamental group on the Bass-Serre tree has no global fixed point. An automorphism of the graph of groups X is a tuple (ΦX , (φv ), (φe ), (γe )) where ΦX is a automorphism of the underlying graph X, for all vertices v, φv : Γv → ΓΦX (v) is an isomorphism, for all edges e, φe : Γe → ΓΦX (e) is also an isomorphism, and γe ∈ ΓΦX (t(e)) satisfies Bass Diagram: φt(e) ◦ ie = adγe ◦ iΦX (e) ◦ φe , (3) for adγe : x 7→ γe−1 xγe . One might like to read the condition as: “each attaching map ie , e ∈ E commute with the isomorphisms φv , φe , v ∈ V, e ∈ E up to conjugation in the target vertex group”. The small modular group of a splitting was used in [D]. We suggest reading [D, §1] and more precisely §1.2 loc. cit. for a slightly broader discussion about it. The small modular group of a splitting X of a group G, denoted by M odX is a subgroup of the automorphism group of X consisting of those for which ΦX = IdX , φv ∈ Inn(Γv ) and φe = IdΓe for all v, e. It is generated by the union of two families of automorphisms, the oriented Dehn twists (for which the φv are all the identity, and only one element 23 γe ∈ ZΓt(e) (ie (Γe )) is non trivial), and the inert twists (for which φv = adγv and γe is the same γv if t(e) = v). The image of the small modular group in the outer automorphism group of G consists of the group generated by Dehn twists over edges of the splitting X. Its image in the automorphism group of the abelianisation of G is generated by Dehn twists over non separating edges of X. Given a suspension F ⋊ hti, we define the map δ : F ⋊ hti → Z to be the quotient by F . Of course, it factorises through the abelianisation of F ⋊ hti. We insist in seeing the targer of δ as Z to be able to interpret δ(γ) as an integer. Given a splitting X of F ⋊ hti, and a choice of base point in X, we can realise each element γ of F ⋊ hti as its expression in the Bass group, and for each (oriented) edge e of X we may define n(γ, e) as the number of occurences of e in the reduced form of this expression, minus the number of occurences of e. We obtained the following result. Proposition 1.2. (See [D, 2.3]) Let G be a finitely generated group that can be expressed as a semi-direct product F ⋊ hti. Given a splitting X of G, and for each e ∈ E, a generating set Se ⊂ Γt(e) for ZΓt(e) (ie (Γe )) and a family (γj )0≤j≤j0 of elements of G, one can decide whether there is an element η ∈ M odX whose image η̄ in Aut(H1 (G)) sends γ̄j in F̄ for all j < j0 and γ̄j0 inside t̄F̄ . More precisely, there is such an element η if and only if the explicit Diophantine linear system of equations X rse n(γj , e)δ(se ) = −δ(γj ) + diracj=j0 (4) ∀j, e∈E + se ∈Se (with unknowns rse ) has a solution. 1.2 On polynomial growth The following preliminary result is useful. It follows from the recent algorithmic construction of relative train tracks, by Feighn and Handel [FH, Theorem 2.1]. We give a different proof below (certainly not of the same scope as the mentioned reference) for the curiosity of the reader. Proposition 1.3. There is an algorithm that, provided with a free group F and an automorphism φ, terminates and indicates whether F is polynomial for φ. 24 Proof. First, we will give a procedure certifying that an automorphism is polynomial, and then a procedure certifying that an automorphism is of exponential growth on some conjugacy class. By [BFH-00, Coro 5.7.6], if φ is a polynomially growing automorphism, then there is n such that φn is unipotent in GL(H1 (F )). It is then sufficient to devise a procedure certifying whether a unipotent automorphism is polynomially growing. Then we use (a weak aspect of) Theorem [BFH-05, 3.11]: if the automorphism is polynomially growing, there exists a topological representative τ : G → G of φ on a graph G, and a filtration of G, {v} = G0 ⊂ · · · ⊂ Gn = G such that any edge e in Gi \ Gi−1 is sent on a path ec where c is a path in Gi−1 . Also, if such a representative exists, then, for every edge e ∈ Gi , the length of φn (e) can be bounded by a polynomial in n depending only on i (this can be seen by induction; it is obvious for i = 0 or 1 since G0 contains no edge, and if it is true for i − 1, let P(i−1) the corresponding polynomial, and for e ∈ Gi , n 2 . . . φ(c)n−1 , and the total with φ(e) = ec, we can Pwrite φ (e) = eφ(c)φ(c) P |c| length is bounded by k≤n−1 P(i−1) (k) , hence by k≤n−1 P(i−1) (k)M for M = max{|φ(e)|, e ∈ Gi }, which is polynomial in n). Thus, φ is polynomial if and only if there is such a topological representative. This can be certified by enumeration of topological representatives, since the condition used is easily algorithmically checked. We now need a procedure that produces a certificate that φ is not polynomialy growing when it is the case. For that, we’ll use that φ is not polynomially growing if and only if the suspension has a proper relative hyperbolic structure. One direction of this equivalence ( =⇒ ) is the content of [GLu] (actually [GLu] describes the relative hyperbolic structure). We present now an argument for the other direction. If the suspension is a proper relatively hyperbolic group (with at least one hyperbolic element), then there are hyperbolic elements in each coset of the fiber: this follows from [O-06b, Lemma 4.4] (I also find rather pleasant the following proof: a simple random walk on the relatively hyperbolic group F ⋊ Z will a.s. walk on only finitely many non-hyperbolic elements (apply Borel-Cantelli Lemma, with the exponentially decreasing probability to walk on a parabolic element, e.g. [Si]), and, by recurrence on Z, it will walk infinitely many times on the preimage of any chosen coset). Thus, there is a hyperbolic element fh in the fiber F , and another t′ = tf0 in the coset tF . The relative distance of F and t′k F grows therefore linarly in k, and by exponential divergence (in the hyperbolic coned-off graph), the shortest path, in t′k F , from t′k to fh t′k has exponential relative length in k, hence ex25 ponential absolute length. This makes fh an exponentially growing element for the automorphism φ ◦ adf0 . This means that this automorphism cannot be polynomialy growing (as it is visible on the topological representative τ of a polynomially growing automorphism that no element can be exponentially growing). Therefore φ has an exponentially growing conjugacy class in F . By [DG-13], and enumeration of the proper subgroups of F , if there exists a proper relative hyperbolic structure, one can eventually find it and thus a certificate that the automorphism is not polynomially growing (here a certificate is the data of an exponentially growing conjugacy class, with a proof that it is exponentially growing). Proposition 1.4. Let F be a free group. There is an explicit algorithm that, given φ ∈ Aut(F ) expressed on a basis of F , terminates and produces a basis for each group of a collection F1 , . . . , Fk of maximal polynomial subgroups of F for Φ the class of φ in Out(F ), and computes minimal exponents mi > 0 and elements fi so that tmi fi normalises Fi (see definition 0.4). Proof. Note that there is a unique relative hyperbolic structure for F ⋊φ hti whose parabolic groups are suspensions of polynomial subgroups. Indeed, the polynomial subgroups must be parabolic, by the observation made in the proof of 1.3. Moreover, by [GLu], F ⋊φ hti is indeed relatively hyperbolic to the subgroups that we need to compute. We enumerate the tuples (S, m, f ), where S is a finite subset of F , m is an integer, and f ∈ F . For each of them, by the usual Stallings’ folding process, we may find a basis of hSi, and we may check whether hSi is stable by conjugation by tm f and f −1 t−m . If so, hSi is normalized by tm f ; in that case, using Proposition 1.3, we may certify whether, the product hSi⋊htm f i is a suspension of a polynomial automorphism on hSi. For any collection of such subgroups, we may use [DG-13] in order to certify that F ⋊φ hti is relatively hyperbolic. When this happens, the algorithm is done. Recall that a splitting of a relatively hyperbolic group is peripheral if, in the Bass-Serre tree, all parabolic subgroups are elliptic. Let us say that φ ∈ Aut(F ) is relatively hyperbolic with no parabolic splitting (RH-noPS for short) if it is properly hyperbolic relative to a collection of polynomial subgroups of F , and the suspension F ⋊φ hti has no non-trivial peripheral splitting over a subgroup of a parabolic subgroup. Let us say that φ ∈ Aut(F ) is relatively hyperbolic with no elementary splitting (RH-noES for short) if it is properly hyperbolic relative to a col26 lection of polynomial subgroups of F , and the suspension F ⋊φ hti has no peripheral splitting over a cyclic or parabolic subgroup, except the trivial one. An unsatisfying aspect of this work is that I am unable to provide an algorithm certifying whether an element of Aut(F ) is RH-noPS. But if it is, then we can do something. 2 Conjugacy problems 2.1 Conjugacy of two relatively hyperbolic automorphisms without elementary splitting Proposition 2.1. Let F be a free group. There is an (explicit) algorithm that, given two automorphisms, φ1 , φ2 , terminates if both φi are RH-noPS, and provides • either an isomorphism F ⋊φ1 hti → F ⋊φ2 hti preserving fiber, and orientation; • or a certificate that F ⋊φ1 hti and F ⋊φ2 hti are not isomorphic by an isomorphism preserving fiber, orientation; • or a non-trivial peripheral splitting of either F ⋊φi hti over a cyclic subgroup, which is either maximal cyclic or parabolic. The algorithm in question may terminate even if one of the φi is not RH-noPS. It never lies though. The following application is immediate, given Lemma 1.1. Corollary 2.2. The conjugacy problem for RH-noES elements of Out(F ) is solvable: there is an algorithm that given two automorphisms that are RH-noES, decides whether or not they are conjugated. Let us now prove Proposition 2.1 Proof. First, by Proposition 1.4, we may assume that we know explicitly both relative hyperbolic structures of Gi = F ⋊φi hti with presentations, as suspensions of subgroups of F , of the parabolic subgroups (that are nonvirtually cyclic). Let us write P1,j = F1,j ⋊ hrj i, j = 1, . . . , k conjugacy representatives of maximal parabolic subgroups of G1 , with P1,j ∩ F = F1,j (recall that we have explicit presentations of the groups P1,j as such suspensions). Similarily, we have P2,j = F2,j ⋊ hrj′ i, j = 1, . . . , k ′ conjugacy 27 representatives of maximal parabolic subgroups of G2 . If k 6= k′ , G1 and G2 cannot be isomorphic, hence we can assume that k = k′ . In parallel, we then perform the three following searchs (so-called procedures, below). The first procedure is the enumeration of morphisms G1 → G2 → G1 . It stops when mutually inverse isomorphisms preserving orientation and sending the fiber into the fiber are found. The second procedure is as follows. For incrementing integers m, we (m) compute N1,j the intersection of all subgroups of F1,j of index ≤ m. Note (m) that for each j, N1,j is a sequence of normal subgroups of P1,j , with trivial (m) intersection (as m goes to infinity). Denote by hh∪j N1,j ii the normal closure in G1 of their union (over j for a fixed m). Then we try to certify, using [P], (m) (m) that Ḡ1 = G1 /hh∪j N1,j ii is hyperbolic. (m) (m) We will denote by K1 the kernel hh∪j N1,j ii in G1 of the previous quotient. (m) Similarily, we compute Ḡ2 and check that it is hyperbolic. Since (m) P1,j /N1,j is virtually cyclic, by virtue of the Dehn Filling theorem [O-07, Thm. 1.1], for m large enough these groups are indeed hyperbolic. So this (m) step of the second procedure will eventually provide groups Ḡi , (i = 1, 2, (m) m sufficiently large), that are certified hyperbolic. For all m, ∪j N1,j is (m) contained in F which is normal in G1 . Hence the whole group K1 is con(m) (m) (m) tained in F , and Ḡ1 is naturally a suspension Ḡ1 = (F/K1 ) ⋊ ht̄i. The second procedure then calls the algorithm of Theorem [D, 3.2] in order (m) (m) to decide whether Ḡ1 and Ḡ2 are isomorphic by a fiber and orientation preserving isomorphism. This is done in parallel for all incrementing m for which the groups are certified hyperbolic. The second procedure stops if an (m) (m) integer m is found so that Ḡ1 and Ḡ2 are not isomorphic by a fiber and orientation preserving isomorphism. The third procedure is as follows. For both i = 1, 2, one enumerates presentations of Gi = F ⋊φi hti by Tietze transformations, and, for each one exhibiting a splitting of Gi over a cyclic subgroup as an amalgamation, we check whether the splitting is non-trivial (it suffices to check that both factors have a generator that does not commute with the cyclic subgroup) and, for each one of the form of an HNN extension, hH, t | tct−1 = c′ , RH i we check whether the stable letter t is non trivial (so the presentation is genuinely that of an HNN-extension over a cyclic group). If we discover a non-trivial cyclic splitting, we may check whether its cyclic edge subgroup 28 is maximal cyclic or parabolic, using [O-06a, Thms 5.6 and 5.17]. We then enumerate the conjugates of the parabolic subgroups, and if we find that each parabolic subgroup has a conjugate contained in a vertex group, this third procedure stops, and outputs the splitting, with the relevant conjugations of parabolic subgroups. Now that we described the three procedures, we discuss the implication of their termination. If the first procedure terminates, then by Lemma 1.1, there exists a fiberand-orientation preserving isomorphism, and the two given automorphisms of F are conjugated in Out(F ). If the second procedure terminates, there cannot exist any isomorphism G1 → G2 preserving fiber and orientation (it would preserve the class of parabolic subgroups, characterised by being polynomial, and hence pass to the characteristic quotients). If the third procedure terminates, we have found a non-trivial splitting of either F ⋊φi hti over a cyclic subgroup. Now we need to show that there is always at least one procedure that terminates, i.e. the following lemma. Lemma 2.3. Assume that G1 and G2 are RH-noPS. If the third procedure and the second procedure never terminate, then the first procedure terminates. This Lemma is actually a consequence of a result obtained in a collaboration of Vincent Guirardel and the author. (m) (m) Proof. We assume that for all m large enough, φm : Ḡ1 → Ḡ2 is a fiber and orientation preserving isomorphism. (m) Observe that eventually, P1,j /N1,j contains a large finite subgroup and (m) an infinite order element normalizing it. In G2 (for large m), all finite sub(m) groups lie in conjugates of P2,ℓ /N2,ℓ (by [DG-15, Lemma 4.3]), and since (m) G2 is eventually hyperbolic relative to this collection of subgroups, any infinite order element normalizing a finite subgroup is in the same conjugate (m) of P2,ℓ /N2,ℓ . Thus, eventually each φm must send, for each j, the group (m) (m) P1,j /N1,j on some conjugate of some P2,ℓ /N2,ℓ , (ℓ ≤ k). Then, Theorem [DG-15, Thm. 5.2] states that either G1 or G2 has a peripheral splitting over a maximal cyclic, or a parabolic subgroup (which must be parabolic if we assume that the third procedure does not terminate, hence in contradiction with the assumption of the lemma), or there is an isomorphism φ : G1 → G2 that commutes with infinitely many φm , up to composition with a conju- 29 gation in (m) Ḡ2 (in other words, it makes a diagram G1 ↓ (m) φ∞ → adḡ ◦φm G2 ↓ (m) → Ḡ2 Ḡ1 commute, where adḡ is a conjugation). In this second circumstance, φ has to preserve the fiber and orientation, since the φm do, and the kernels are co-final. There is a slightly stronger version of Proposition 2.1 that we will need for the next part. Given a suspension F ⋊ hti, a transverse cyclic peripheral structure is a tuple of elements of the form (tkj fj )j=1,...r , for kj 6= 0 and fj ∈ F . A fiber-and-orientation preserving isomorphism between suspensions equipped with such structures is said to preserve the structure if it sends the conjugacy classes of the first exactly on the conjugacy classes of the second. Let us amend our definition of RH-noPS, and say that a suspension with a transverse cyclic peripheral structure is RH-noPS relative to the transverse peripheral structure if it is properly hyperbolic relative to a collection of polynomial subgroups of F , and the suspension F ⋊φ hti has no non-trivial peripheral splitting over a subgroup of a parabolic subgroup, in which each element of the transverse peripheral structure (which is a group) is conjugated to a factor. The following Proposition is, as we said, similar to Proposition 2.1. The difference is in the presence of the transverse cyclic peripheral structure (a minor difference) but also in the fact that we had ambitionned to get the full list of fiber-and-orientation preserving isomorphisms. This ambition is not realized unfortunately, but enough is granted for the application in the next part. (m) (m) We keep the notation K1 , K2 for the normal subgroups introduced in the proof of Proposition 2.1. Proposition 2.4. Let F be a free group. There is an (explicit) algorithm that, given two automorphisms, φ1 , φ2 , and two transverse cyclic peripheral structures P1 , P2 of F ⋊φ1 hti and F ⋊φ2 hti respectively, terminates if both φi are RH-noPS relative to their transverse peripheral structures, and provides 1. either a list of isomorphisms F ⋊φ1 hti → F ⋊φ2 hti preserving fiber, orientation, and transverse cyclic peripheral structure, and an integer (m) (m) = G2 /K2 m such that for each p ∈ P2 , the centralizer of p̄ in G2 30 is the image of the centralizer of p in G2 and such that, for any other such isomorphism ψ, there is one, φ, in the list, an element g ∈ G2 , such that for all h ∈ G1 , there is zh ∈ Km for which ψ(h)g = φ(h)zh . 2. or a certificate that F ⋊φ1 hti and F ⋊φ2 hti are not isomorphic by an isomorphism preserving fiber, orientation, and transverse cyclic peripheral structure; 3. or a non-trivial peripheral splitting of either F ⋊φi hti over a cyclic subgroup, in which each element of the transverse peripheral structure is elliptic. The first point means that the list contains all isomorphisms up to conjugacy in G2 and multiplication by a large element of F . Proof. As in the proof of Proposition 2.1, we use three procedures. The first procedure is the enumeration of morphisms G1 → G2 → G1 . This procedure has an incrementing list L, which is empty at the beginning. Every time mutually inverse isomorphisms preserving the transverse peripheral structure, the orientation and sending the fiber into the fiber are found, such that the isomorphism G1 → G2 is not conjugated to any item of the list L, the procedure stores G1 → G2 into L. We precise below when this first procedure is set to stop. The second one slightly differs from Proposition 2.1. We still compute (m) (m) Ḡ1 and Ḡ2 (and the images of the transversal peripheral structure in them), and try to certify that they are hyperbolic and that the assumption of point 1, on the centralizers, is satisfied (which happens if m is large enough, by Lemma 2.12). Let us call this “certification α for m”. When this is the case, using [DG-11, Coro. 3.4], we check whether these groups are rigid (in the sense that they have no peripheral splitting over a virually cyclic group with infinite center, in which each element of the transverse peripheral structure is conjugated in a vertex group) and if they are we proceed and (m) compute by [DG-11, Coro. 3.5] the complete list of isomorphisms Ḡ1 → (m) (m) Ḡ2 up to conjugacy in Ḡ2 . Once this is done, we check which one of them are fiber-and-orientation preserving, and preserve the transverse peripheral structure, and we record them in a list Lm . The second procedure is set to stop if an m is found so that there is no (m) (m) fiber-and-orientation preserving isomorphisms Ḡ1 → Ḡ2 that preserves the transversal peripheral structure. The first procedure (which was run in parallel with the second) is set to stop if a list L is found and an integer m is found so that the following three 31 conditions are satisfied. First, “certification α” for m is done. Second, Lm is completely computed, and third, the currently computed list L surjects on Lm , by the natural quotient map. The third procedure looks for a non-trivial peripheral splitting over a cyclic subgroup which is maximal cyclic or parabolic, in which each element of the transverse peripheral structure is conjugated to a vertex group (it is similar to that of Proposition 2.1). Observe that, if the first procedure stops, we have in L a list of isomorphisms F ⋊φ1 hti → F ⋊φ2 hti preserving fiber (by Lemma 1.1 (3 =⇒ 2)), orientation, and transverse cyclic peripheral structure, such that any other such isomorphism differs from one in the list by a conjugation, and the multiplication by elements in the fiber (in the sense of 2.4-(1)). Observe also that if the second procedure stops, we have (as in 2.1) a certificate that F ⋊φ1 hti and F ⋊φ2 hti are not isomorphic by an isomorphism preserving fiber, orientation, and transverse cyclic peripheral structure. Again, we can conclude by the following lemma. Lemma 2.5. Assume that G1 and G2 are RH-noPS relative to their transverse cyclic peripheral structures. If the third procedure and the second procedure never terminate, then the first procedure terminates (i.e there is a finite list of isomorphisms (preserving the transverse peripheral structure, the orientation and sending the fiber into the fiber) from G1 to G2 , and an integer m as in (2.4-(1)) such that any isomorphism preserving fiber, (m) (m) orientation, and peripheral structure Ḡ1 → Ḡ2 is the image of an isomorphism G1 → G2 in the list). Proof. We endow G1 and G2 with the relatively hyperbolic structure consisting of their parabolic subgroups, and for each hyperbolic element in the transverse peripheral structure, the conjugates of the maximal cyclic subgroup containing it. This still makes a relatively hyperbolic group (see [O-06b, 1.7] for instance). In this context, the assumption that the third procedure does not stops says that the groups G1 and G2 have no splitting which is peripheral (for this extended peripheral structure), over an elementary subgroup. (m) (m) Observe that, eventually, the groups Ḡ1 and Ḡ2 are rigid (in the sense of the second procedure). Indeed, if it is not the case for the sequence (m) (Ḡ1 ) for instance, then after passing to a subsequence, for each m in the (m) subsequence, there are infinitely many automorphisms of Ḡ1 preserving the transverse peripheral structure, the orientation and the fiber (namely the iterates of a Dehn twist over an edge group of a splitting falsifying 32 rigidity). From there, by [DG-15, Corolary 5.10], one gets that G1 must have a splitting of a type contradicting the previous paragraph. Therefore, for sufficiently large m, the second procedure can compute the list Lm of isomorphisms preserving fiber orientation, and peripheral (m) (m) structure between Ḡ1 and Ḡ2 . Since the second procedure does not stop, for all sufficiently large m, this list is not empty. Assume that the first procedure does not stop. Then, for all finite list L of isomorphisms G1 → G2 (preserving transverse peripheral structure, fiber (m) (m) and orientation), and all n there exists m > n and ψm : Ḡ1 → Ḡ2 , an isomorphism preserving fiber orientation, and peripheral structure, that does not commute with any element of the list L, even after conjugation by (m) an element of Ḡ2 . Choosing a sequence of lists L exhausting the set of isomorphisms G1 → G2 (with the prescribed preservation property), and a increasing sequence of integers n, one gets a sequence of ψm as above, for a sequence of integers m going to infinity. We may use Theorem [DG-15, 5.2] to extract a subsequence of the isomorphisms ψm , and to find an isomorphism ψ∞ : G1 → G2 commuting with the composition of ψm with a conjugation (for all m in the extracted sequence), as our previous use of it in Lemma 2.3. By cofinality, such a ψ∞ has to preserve the fiber and the orientation. Since the transverse peripheral structure consists exactly of the cyclic groups among the parabolic groups of the relatively hyperbolic structures under consideration, we deduce that ψ∞ globally preserves the transverse cyclic structure. By [DG-15, Lemma 3.13], we know that, for sufficiently large m, non conjugate parabolic subgroups in (m) G2 map on non conjugate subgroups in Ḡ2 . Since each ψm preserves the transverse peripheral structure, and (after extraction of subsequence) commute with ψ∞ , it follows that ψ∞ sends the transverse peripheral structures of G1 to that of G2 . Therefore ψ∞ is eligible for being recorded in the list of the first procedure, and thus eventually appears in the sequence of our lists that served to define the ψm . But that is a contradiction, by definition of the ψm . 2.2 Conjugacy of two relatively hyperbolic automorphisms without parabolic splitting The class of RH-noPS automorphisms, is larger than that of RH-noES. We can treat it as well, but it requires a little care. 33 Recall that if F ⋊φ1 hti splits as a graph of groups, then vertex groups and edge groups are suspension of subgroups of F that are vertex groups and edge groups (respectively) of a graph of group decomposition of F (see [D, Lemma 2.6]). Proposition 2.6. Let X1 , X2 be graph-of-groups decompositions of F ⋊φ1 hti and F ⋊φ2 hti respectively, over cyclic subgroups. Assume that ΦX : X1 → X2 is an isomorphism of the underlying graphs (0) of the decompositions, and that m is an integer, and, for all vertex v ∈ X1 , Lv is a list of isomorphisms from Γ1,v the vertex group of v in X1 to Γ2,ΦX (v) the group of ΦX (v) in X2 , that are all as in (2.4-(1)) (for Gi = Γi,v ) for the transverse peripheral structure consisting of the adjacent edge subgroups, and the fiber and orientation defined by [D, Lemma 2.6]. The following are equivalent. 1. There is an isomorphism Φ : π1 (X1 , τ ) → π1 (X2 , ΦX (τ )) that is fiber and orientation preserving, that induces a graph-of-groups isomorphism, and that induces ΦX at the level of graphs. 2. There is Φ0 = (ΦX , (φv ), (φe ), (γe )) an isomorphism of graphs of groups, such that φv is fiber-and-orientation preserving, and such that the linear diophantine equation (4) for the γi being the images of a fixed basis of F , and of t, by Φ0 , has a solution. 3. There is Φ′0 = (ΦX , (φ′v ), (φe ), (γe′ )) an isomorphism of graphs of groups, such that φ′v ∈ Lv , and such that the linear diophantine equation (4) for the γi being the images of a fixed basis of F , and of t, by Φ′0 , has a solution. Proof. The first point implies the second: by Lemma [D, 2.6], all vertex groups are suspensions of their intersections with F , therefore if Φ preserves the fiber and orientation, so do all φv , and the equation (4) admits an obvious solution (the null solution). The second point implies the first, because, by Proposition 1.2, the system (4) has a solution if and only if there is a modular graph-of-group automorphism of π1 (X2 , ΦX (τ )) that sends Φ0 (F ) exactly on F , and preserves orientation. The third point obviously implies the second one. We need to show that the second point implies the third one. This is a more subtle part. It basically says that if there is an isomorphism of graph of groups whose orbit under the small modular group intersects the 34 set of fiber-preserving isomorphisms, then there is one that is accessible to us, which might not quite be in the same orbit for the action of the small modular group, but that share the property that its orbit intersects the set of fiber-preserving isomorphisms. The key is in the assertions, in Lemma 2.7 that the different products are in F , and this is ensured by the (a priori non immediate) assumption (2.4-(1)). So, we have Φ0 = (ΦX , (φv ), (φe ), (γe )) an isomorphism of graphs of groups, as in the second point. By assumption on Lv , the given isomorphisms φv differ from isomorphisms in Lv by conjugation (in the target), and multiplication by elements of F that are also in the vertex group Gv . By composing with inert twists (vanishing in Out(F ⋊φ2 hti)), we can assume that each φv has same image as an element of Lv in the Dehn Filling reduction Γv (m) → ΓφX (v) (m) . Lemma 2.7. There is an isomorphism of graphs of groups Φ′0 = (ΦX , (φ′v ), (φe ), (γe′ )) such that φ′v ∈ Lv has same image as φv in the Dehn Filling reduction (m) (m) Γv → ΓφX (v) , and such that for all edge e, (γe′ )−1 γe ∈ F , and also γe (γe′ )−1 ∈ F , and (γe′ )γe−1 ∈ F . Proof. We thus construct Φ′0 using these elements φ′v ∈ Lv . The morphisms φe are given by the marking of the cyclic edge groups. We need that there exists elements γe′ completing the collection into an isomorphism of graphof-groups, but this is actually the condition that, for v = o(e), φ′v preserve the peripheral structure of the adjacent cyclic edge groups. Note that one can choose the γe′ up to a multiplication on the left by an element of Γo(e) centralising ie (Γe ). Once such elements γe′ are chosen, Φ′0 is defined. Recall that on a Bass generator e ∈ X (1) \ τ , Φ′0 (e) = (γē′ )−1 ΦX (e)(γe′ ). We need to compute how Φ′0 differs from Φ0 on Bass generators. Let us call ce the marked generator of the edge group Γe . To make notations readable, we will still write ce for ie (ce ). One has cΦX (e) = φv (ce )γe by Bass diagram 3. By virtue of φ′v preserving the peripheral structure (for v = o(e)) this is also = (φ′v (ce ))he )γe , for some he ∈ ΓφX (v) which can be chosen up to left multiplication by an element ′ −1 centralising φ′v (ce ). By Bass diagram 3 (for φ′v ) this is = ((cΦX (e) )(γe ) )he )γe . It follows that (γe′ )−1 he γe centralises cΦX (e) , and lies in ΓφX (v) , for v = o(e). Recall that γe′ can be chosen up to a multiplication on the left by an element of Γo(e) centralising ie (Γe ). By a right choice of the collection of 35 γe′ (or, in different words, by the right application of Dehn twists), we may assume that (γe′ )−1 he γe = 1. (m) By virtue of φ′v coinciding with φv in the Dehn filling Γv , the image h̄e of he actually centralises φ′v (ce ). By assumption on m (see 2.4 -(1)), the m centralizers of the transverse peripheral structure in Ḡ2 are the images of the centralizers in G2 , so this makes he = ze fe for ze centralising φ′v (ce ) and fe in F . Thus, we may choose it so that ze = 1, hence he ∈ F . Finally, since F is normal, and (γe′ )−1 he γe = 1, it follows that (γe′ )−1 γe ∈ F . The two other relations are obtained respectively by conjugating by γe−1 (F is normal) and taking the inverse of the later. We can resume the proof of the Proposition (second point implies the third one). Finally, we need to check that the automorphism Φ′0 provided by the Lemma is suitable. We can compare the images of the Bass generator e, namely Φ0 (e) to Φ′0 (e). Lemma 2.8. For all edge e, Φ′0 (e)−1 Φ0 (e) ∈ F , and for all edge e′ , the number n(Φ′0 (e)−1 Φ0 (e), e′ ) that counts the number of occurences of e′ in the normal form of Φ′0 (e)−1 Φ0 (e), minus the number of occurences of e′ (see §1.1), is 0. Proof. Recall that Φ0 (e) = γē−1 φX (e)γe and Φ′0 (e) = (γē′ )−1 φX (e)γe′ . The difference is therefore Φ′0 (e)−1 Φ0 (e) = (γe′ )−1 φX (e)−1 (γē′ γē−1 )φX (e)γe which can also be written Φ′0 (e)−1 Φ0 (e) = (γe′ )−1 (γē′ γē−1 )φX (e) γe and slightly less naturally, Φ′0 (e)−1 Φ0 (e) = (γe (γe′ )−1 (γē′ γē−1 )φX (e) )γe . Since we established that γe (γe′ )−1 ∈ F , γē′ γē−1 ∈ F and F is normal, ′ Φ0 (e)−1 Φ0 (e) ∈ F . Moreover, since all factors in the product (γe (γe′ )−1 (γē′ γē−1 )φX (e) )γe are in vertex groups, except φX (e) and φX (e)−1 (which both appear once). Therefore, for all edge e′ , the quantity n(γē′ γē−1 , e′ ) is 0. We may now finish the argument and show that the system of equations (4) for the γi being the images by Φ′0 of a basis of F , and of t, has a solution. Consider an element f of the given basis of F . Write the normal form in π1 (X1 , τ ) as f = g0 e1 g1 e2 . . . en gn+1 . The normal form of its image by Φ0 in π1 (X2 , ΦX (τ )) is thus Φ0 (f ) = φv0 (g0 ) Φ0 (e0 ) . . . Φ0 (en ) φvn+1 (gn+1 ). 36 By assumption (2.4-(1)), each φvi (gi ) differs from φ′vi by a conjugation (say by ξi ), and the multiplication on the right by an element (say fi,ℓ ) of F , that lies in a vertex group (hence n(fi,ℓ , e′ ) = 0 for all e′ ). We also established in the lemma that Φ′0 (ei )−1 Φ0 (ei ) ∈ F (call it fi,r ), and that n(fi,r , e′ ) = 0 for all e′ ). We thus get Φ0 (f ) = (φ′v0 (g0 ))ξ0 f0,ℓ Φ′0 (e0 )f0,r . . . . . . (φ′vn (gn ))ξn fn,ℓ Φ′0 (en ) fn,r (φ′vn+1 (gn+1 ))ξn+1 fn+1,ℓ . We first observe that for all e, n(Φ0 (f ), e) = n(Φ′0 (f ), e) since all n(fi,ℓ , e) = 0 and all n(fi,r , e) = 0. In H1 (F ⋊φ2 hti) this normal form turns into Φ0 (f ) = n+1 Y ! φ′vi (gi ) i=0 where ftot is the image of Of course, Φ′0 (f ) = Q i fi,ℓ fi,r n+1 Y i=0 × n Y ! Φ′0 (ei ) i=0 × (ftot ), in H1 , hence is in the image of F . φ′vi (gi ) ! × n Y i=0 ! Φ′0 (ei ) . In the notations of equation (4), δ(Φ′0 (f )) = δ(Φ0 (f )) because δ(ftot ) = 0 as ftot is in F . Moreover, we noticed that for all edge e, n(Φ′0 (f ), e) = n(Φ0 (f ), e). Therefore the two systems of Diophantine equations (4) for the γi being the images of a fixed basis of F by Φ0 and for the γi being the images of a fixed basis of F by Φ′0 , are syntaxically the same system of equations. Tautologically, if one has a solution, the other aslo. For the last (and main) result, we’ll need the theory of JSJ decompositions for relatively hyperbolic groups. The theory initiated by Rips and Sela is developed by Guirardel and Levitt in a very stable and useful formulation. We refer to [GL-10, GL-11], from which we recall the following existence and characteristic result. Proposition 2.9. [GL-10, Thm. 13.1, Coro. 13.2] Let (G, P) be a torsion free relatively freely indecomposable, relatively hyperbolic group. The canonical JSJ splitting of (G, P) is a finite graph-of-groups decomposition 37 of (G, P) with edge groups elementary (cyclic or parabolic), bipartite, such that the groups of a vertex of one color (black) are elementary, and those of the other color (white) are either fundamental groups of surfaces with boundary, the adjacent edge groups being associated to the boundary components, or groups that inherit a relatively hyperbolic structure for which there is no non-trivial elementary splitting in which the adjacent edge groups are conjugated into factors (the later are called rigid). The canonical JSJ splitting is such that any automorphism of (G, P) induces an automorphism of the splitting, and is also such that any other elementary splitting of (G, P) has a common refinement with it. Here, a refinement is an equivariant blow-up of vertices in the Bass-Serre tree. Recall that in the case of a suspension of a finitely generated group, no vertex group can be a surface group (see [D, 2.11]). Moreover, in the case of a suspension of a free group by an automorphism that is RH-noPS, then all black vertex groups are cyclic, non-parabolic, by definition of RH-noPS. Proposition 2.10. Given a finitely generated free group and an automorphism φ of F that is RH-noPS, one can compute the canonical JSJ splitting of F ⋊φ Z. Proof. Let (G, P) be the relatively hyperbolic structure for F ⋊φ Z. The computation of the relative hyperbolicity structure was done in 1.4. We can thus enumerate the non-trivial bipartite peripheral cyclic splitting of (G, P). Assume that we are proposed such a bipartite cyclic splitting of (G, P). We need to decide whether or not this proposed splitting is the JSJ splitting. Recall that vertex groups are suspensions of finitely generated subgroups of F , and we may find a presentation of the semidirect product for each of them, by enumeration. We use a result of Touikan here, specifically, [T, Thm C.] that allows to check whether or not, the white vertex groups are rigid (in the sense of Proposition 2.9). Note that since we assume the absence of parabolic splitting, we do not need to satisfy the assumption of [T] on algorithmic tractabiliy of parabolic subgroups. One can also easily check whether the black vertex groups are cyclic, and edge groups are maximal cyclic in their white adjacent vertex group. If all these conditions are verified for a splitting X, the splitting has, by the previous proposition, a common refinement with the JSJ splitting X0 . However, because of lack of surface groups in X and X0 , for all vertex group Gv in either of them, equipped with the peripheral structure of its adjacent edge groups, all splittings of Gv over cyclic groups in which the peripheral structure is elliptic, are trivial. 38 Thus considering T the Bass-Serre tree of a common refinement of X and X0 , it is apparant that the edges to be collaped to obtain the tree of X and the tree of X0 are exactly those with an end of valence 1, and after them, those with an end of valence 2 with same stabilizer (i.e. the redundant vertices; note that there is a choice, but either choice lead to the same tree). Since the two collapses toward X and X0 can be made by the same choices od edges to collapse, it follows that X and X0 coincide. Proposition 2.11. Let F be a finitely generated free group. There is an (explicit) algorithm that given two automorphisms φ1 , φ2 of F terminates if both are RH-noPS, and indicates whether they are conjugated in Out(F ). Proof. One can compute the JSJ decomposition of both suspensions, by the previous proposition. The situation reduces to the case where an isomorphism of underlying graphs of the JSJ splittings is chosen, and we need to decide whether there is an isomorphism of graph of groups (inducing that isomorphism of underlying graphs) that preserve the fiber, and the orientation. We also choose a maximal subtree τ of the underlying graph X so that all edges outside this subtree correspond to Bass generators in the fundamental group of the graph of group. Let us write X1 , X2 the JSJ splittings of G1 = F ⋊φ1 hti and G2 = F ⋊φ2 hti, and we identify the underlying graphs, according to the choice of isomorphism above (the algorithm has to treat all possible such isomorphisms of graphs in parallel). We write Γv,i for the vertex group of v in Xi . We remark that any elementary vertex group (or edge group) is cyclic, and transveral to the fiber (Lemma [D, 2.7]), hence the orientation of the suspension provides a canonical marking of each edge group. For each nonelementary vertex group, Lemma [D, 2.6] indicates that it is a suspension, and it is equiped with the thus marked cyclic transverse peripheral structure of its adjacent edge groups. Since, by [D, 2.11], it is not a surface nor a free group, by property of the JSJ decomposition, it is RH-noPS relative to the peripheral structure, and it is possible, thanks to Proposition 2.4 to decide whether there is an isomorphism Γv,1 → Γv,2 , preserving fiber, orientation, and the (cyclic, transverse) peripheral structure of its adjacent edge groups, thus marked. If for some vertex there is no such isomorphism, then there cannot be any fiber-and-orientation preserving isomorphism between G1 and G2 , inducing this graph isomorphism (hence φ1 and φ2 are not conjugated, in view of 39 Lemma 1.1). If, on the contrary, for all such vertices, there exists such an isomorphism, then Proposition 2.4 actually provides a list Lv of such isomorphisms, that satisfies (2.4-(1)), for all vertex v ∈ X (0) . Then, for Q any choice (Φv , v ∈ X (0) ) in v Lv , one can extend this collection into an isomorphism of graph-of-groups Φ, by chosing appropriately the images of the Bass generators to be be , e ∈ X \ τ (so that they conjugate the edge group in their origin Q vertex to the edge dgroup in their target vertex). Let us write (Φs , s ∈ v Lv ) the collection thus obtained. Q Using 1.2 we can decide whether, given Φs for some s ∈ v Lv , there is an automorphism of graph-of-groups, in the orbit of Φs under the small modular group of G2 , that is fiber-and-orientation preserving. If there is one, then we may stop and declare, in view of Lemma 1.1 that φ1 and φ2 are conjugated. Assume then that there is none such fiber-and-orientation preserving Q automorphism in the orbits of all Φs , s ∈ L . By Proposition 2.6 v v (“2 =⇒ 3”), there is no isomorphism of graph-of-groups preserving fiber and orientation. We are done. 2.3 A lemma on Dehn fillings In this paragraph we prove a Lemma that we used above. We refer the reader to the setting of [DGO, §7.]. In particular we will use the parabolic cone-off construction, which is a specific way to cone off horosheres of a system of horoballs of a space associated to a relatively hyperbolic group. Using this specific way allows to get quantitative hyperbolicity estimates, and rotating families, while preserving, almost without distortion, most of what occurs (locally) in a thick part of that space. Lemma 2.12. Let (G, P) be a relatively hyperbolic group, and γ ∈ G, a hyperbolic element. There exists m0 such that for all m > m0 , if h is such that h̄ centralises γ̄ in Ḡ(m) , then, there is z ∈ Km , and h′ centralizing γ such that h = h′ z. The bound on m will be explicit (but we do not need this particular aspect), though probably not optimal. Proof. Consider a hyperbolic space X associated to (G, P), upon which G acts as a geometrically finite group, and for convenience, let us choose it to be a cusped-space as defined by Groves and Manning (see [GM, §3]). Let δ be a hyperbolicity constant for X. 40 After rescaling, we may assume that the hyperbolicity constant is actually less than a specific constant δc furnished by [C, 3.5.2], (that will allow, as we did in [DGO, §7] to satisfy [DGO, 5.38], to ensure quantitatively that the parabolic cone-off construction over a separated system of horoballs is hyperbolic). By assumption γ is hyperbolic in X, so let ρ0 be a quasi-axis, and kγk the translation lenght of γ on this axis. We choose m0 such that Nj,m0 \ {1} does not intersect the ball of Pj of radius 10 sinh(rU ) × 2100δ+kγk , for rU fixed as in [DGO, §5.3], namely rU = 5 × 1012 . We choose L0 such that in a δ-hyperbolic space, all L0 -local geodesic is a quasigeodesic (for some constants). And we choose L1 so that any quasigeodesic with these constants is at distance ≤ L1 from a geodesic with same end points. The constant L3 is set to be ≥ 50 × 16 × 900. Consider H0 the 2-separated invariant system of horoballs of X (associated to P), and in this system, consider the system of horoballs at depth (50δ + 20kγk + L0 + L1 + L3 ), which we call H. This way, ρ0 , which has a fundamental domain for γ of length kγk, and which intersects X \ H0 , does not get (L0 + L1 + L3 )-close to an horoball of H. We then consider the parabolic cone-off C(X, H), as defined in [DGO, §7, Def. 7.2], for this pair, and for a radius of cone rU = 5 × 1012 . By [DGO, Lem. 7.4], this parabolic cone-off is δp -hyperbolic, (for a value of δp estimated to be 16 × 900 in [DGO, §5.3]) and moreover the image of ρ0 is a L0 -local geodesic. By our choices of constants it follows that a quasiaxis ρ of γ in the parabolic cone-off does not approach any of the cones by a distance 50δp . We now work only in the parabolic cone-off. Observe also that, for the chosen m, any (non-trivial) element of Nj,m translate on the corresponding horosphere of H by a distance of at least 10 sinh(rU ) (measured in the graph distance of the horosphere). Therefore, for the chosen m, Km is the group of a very rotating family at the apices of the parabolic cone-off, in the sense of [DGO, §5.1]. Let x0 ∈ ρ. The segment [x0 , γx0 ] is contained in ρ, and thus does not get 50δp close to an apex. Consider the segment [x0 , hx0 ] and for all apex a on it, define the two points a− and a+ on [x0 , a] and [a, hx0 ] (subsegments of [x0 , hx0 ]) at distance 27δp from a (they exist since the cones have much larger radius than 27δp , and x0 is not in a cone). By multiplying h by elements of Km , we may assume that d(a− , a+ ) = d(a− , (Fix(a) ∩ Km )a+ ), for every apex a in the segment [x0 , hx0 ]. By assumption, hγh−1 γ −1 ∈ Km , and we can assume that it is non 41 trivial (otherwise there is nothing to prove). By [DGO, Lemma 5.10 (pointed Greendlinger lemma)], the segment [hγx0 , γhx0 ] contains an apex a0 and a 5δp -shortening pair: a pair of points at distance 27δp from the same apex, such that the image of one by an element fixing the apex and in the rotating group is at distance ≤ 5δp from the other. Hyperbolicity in the pentagon (x0 , hx0 , hγx0 , γhx0 , γx0 ), together with the absence of apices in [x0 , γx0 ], and in its image after translation by h, [hx0 , hγx0 ], shows that at least one segment among [x0 , hx0 ] and [γx0 , γhx0 ] must get at distance δp from a0 and 5δp -follows two arcs of [a0 , γhx0 ] and [a0 , hγx0 ] (both subsegments of [hγx0 , γhx0 ]) for at least 50δp . By properties of rotating families, we see that one of the two segments [x0 , hx0 ], [γx0 , γhx0 ] must contain the apex a0 . Assume that only one of them contains a0 , and let us say that it is [x0 , hx0 ] (if it is the other, the argument is identical). Hyperbolicity forces the 5δp -shortening pair of [hγx0 , γhx0 ] at a0 to be 5δp close to a− and a+ . Therefore some element of Km ∩ Fix(a0 ) takes a+ to a point at distance at most 20δp from a− , thus contradicting the above minimality condition. It follows that both [x0 , hx0 ] and [γx0 , γhx0 ] (which is its image by γ) must contain a0 . But then, the image of a0 by γ is at distance at most kγk from a0 . By separation of apices, it must then be a0 , and γ fixes an apex, contrarily to our assumption. References [BFH-00] M. Bestvina, M. Feighn, M. Handel, The Tits alternative for Out(Fn). I. Dynamics of exponentially-growing automorphisms. Ann. of Math. (2) 151 (2000), no. 2, 517–623. [BFH-05] The Tits alternative for Out(Fn). II. A Kolchin type theorem. Ann. of Math. (2) 161 (2005), no. 1, 1–59. [B] P. Brinkmann, Hyperbolic automorphisms of free groups. Geom. Funct. Anal. 10 (2000), no. 5, 1071–1089. [C] R. Coulon, Asphericity and small cancellation theory for rotation families of groups, Groups Geom. Dyn. 5, (2011), no.4 729–765. [DG-11] F. Dahmani, V. Guirardel, The isomorphism problem for all hyperbolic groups. Geom. Funct. Anal. 21 (2011), no. 2, 223–300. [DG-13] F. Dahmani, V. Guirardel, Presenting parabolic subgroups, Alg. Geom. Top. 13 (2013) 3203-3222. [DG-15] F. Dahmani, V. Guirardel, recognizing a relatively hyperbolic group by its Dehn Fillings, arXiv:1506.03233 42 [DGO] F. Dahmani, V. Guirardel, D. Osin, Hyperbolically embedded subgroups and rotating families in groups acting on hyperbolic spaces, arXiv:1111.7048. [DGr] F. Dahmani, D. Groves, The isomorphism problem for toral relatively hyperbolic groups. Publ. Math. Inst. Hautes Études Sci. No. 107 (2008), 211–290. [D] F. Dahmani, On suspensions, and conjugacy of hyperbolic automorphisms, Trans. Amer. Math. Soc. to appear. [FH] M. Feighn, M. Handel, Algorithmic constructions of relative train track maps and CTs, arXiv:1411.6302 [GLu] F. Gautero, M. Lustig, The mapping torus of a free group automorphism is hyperbolic relative to the canonical subgroups of polynomial growth. Preprint 2007 [GM] D. Groves, J. Manning, Dehn filling in relatively hyperbolic groups, Israel J. Math., 168 (2008), 317-429. [GL-10] V. Guirardel, G. Levitt, JSJ decompositions: definitions, existence, uniqueness II. Compatibility and acylindricity. arXiv:1002.4564. [GL-11] V. Guirardel, G. Levitt, Trees of cylinders and canonical splittings. Geom. Topol., 15(2) (2011) 977–1012. [L] G. Levitt, Counting growth types of automorphisms of free groups. Geom. Funct. Anal. 19, no.4, 1119-1146 (2009). [Lu-00] M. Lustig. Structure and conjugacy for automorphisms of free groups I. MPI-Bonn preprint series 2000, No. 241; http://www.mpim-bonn.mpg.de/preprints [Lu-01] M. Lustig. Structure and conjugacy for automorphisms of free groups II. MPIBonn preprint series 2001, No. 4; http://www.mpim-bonn.mpg.de/preprints [O-06a] D. Osin Relatively hyperbolic groups, Intrinsic geometry, algebraic properties, and algorithmic problems, Mem. Amer. Math. Soc. 179 (2006) no. 843. vi+100pp. [O-06b] D. Osin, Elementary subgroups of relatively hyperbolic groups, and bounded generation, Internat. J. Algebra Comput. 16 (2006) no.1 99-118. [O-07] D. Osin, Peripheral fillings of relatively hyperbolic groups. Invent. Math. 167 (2007), no. 2, 295–326. [P] P. Papasoglu, An algorithm detecting hyperbolicity. Geometric and computational perspectives on infinite groups (Minneapolis, MN and New Brunswick, NJ, 1994), 193–200, DIMACS Ser. Discrete Math. Theoret. Comput. Sci., 25, Amer. Math. Soc., Providence, RI, 1996. [Se] Z. Sela, The isomorphism problem for hyperbolic groups, Ann. Math., 141 (1995), 217–283. [Si] A. Sisto, Contracting elements and random walks, arXiv:1112.2666. [T] N. Touikan, Finding tracks in 2-complexes, arXiv:0906.3902. François Dahmani, Université Grenoble Alpes, Institut Fourier, F-38000 Grenoble, France. e-mail: [email protected] 43
4math.GR
C ONTRIBUTED 1 RESEARCH ARTICLE A Simple Guide to S3 Methods by Nicholas Tierney Abstract Writing functions in R is an important skill for anyone using R. S3 methods allow for functions to be generalised across different classes and are easy to implement. Whilst many R users are be adept at creating their own functions, it seems that there is room for many more to take advantage of R’s S3 methods. This paper provides a simple and targeted guide to explain what S3 methods are, why people should them, and how they can do it. arXiv:1608.07161v1 [cs.PL] 23 Aug 2016 Introduction A standard principle of programming is DRY - Don’t Repeat Yourself. Under this axiom, the copying and pasting of the same or similar code (copypasta), is avoided and instead replaced with a function, macro, or similar. Having one function to replace several of the same or similar coded sections simplifies code maintenance as it means that only one section of code needs to be maintained, instead of several. This means that if the code breaks, then one simply needs to update the function, rather than finding all of the coded sections that are now broken. S3 methods in the R programming language are a way of writing functions in R that do different things for objects of different classes. S3 methods are so named as the methods shipped with the release of the third version of the “S” programming language, which R was heavily based upon (Chambers and Hastie 1992, Team (2016), R Core Team (2012)). Hence, methods for S 3.0 = S3 Methods. The function summary() is an S3 method. When applied to an object of class data.frame, summary shows descriptive statistics (Mean, SD, etc.) for each variable. For example, iris is of class data.frame: class(iris) #> [1] "data.frame" So applying summary to iris gives us summary information relevant to a dataframe summary(iris) #> #> #> #> #> #> #> #> #> #> #> #> #> #> Sepal.Length Min. :4.300 1st Qu.:5.100 Median :5.800 Mean :5.843 3rd Qu.:6.400 Max. :7.900 Species setosa :50 versicolor:50 virginica :50 Sepal.Width Min. :2.000 1st Qu.:2.800 Median :3.000 Mean :3.057 3rd Qu.:3.300 Max. :4.400 Petal.Length Min. :1.000 1st Qu.:1.600 Median :4.350 Mean :3.758 3rd Qu.:5.100 Max. :6.900 Petal.Width Min. :0.100 1st Qu.:0.300 Median :1.300 Mean :1.199 3rd Qu.:1.800 Max. :2.500 summary also performs differently when applied to different object. In fact, you can find all the classes that work with an S3 method by typing the following: methods(summary) #> #> #> #> #> #> #> #> #> #> [1] [3] [5] [7] [9] [11] [13] [15] [17] [19] summary.aov summary.aspell* summary.connection summary.Date summary.ecdf* summary.glm summary.lm summary.manova summary.mlm* summary.packageStatus* The R Journal Vol. XX/YY, AAAA summary.aovlist* summary.check_packages_in_dir* summary.data.frame summary.default summary.factor summary.infl* summary.loess* summary.matrix summary.nls* summary.PDF_Dictionary* ISSN 2073-4859 C ONTRIBUTED #> #> #> #> #> #> #> #> 2 RESEARCH ARTICLE [21] summary.PDF_Stream* summary.POSIXct [23] summary.POSIXlt summary.ppr* [25] summary.prcomp* summary.princomp* [27] summary.proc_time summary.srcfile [29] summary.srcref summary.stepfun [31] summary.stl* summary.table [33] summary.tukeysmooth* see ’?methods’ for accessing help and source code There’s over 30 different methods! We can use summary on a linear model, for example: lm_iris <- lm(Sepal.Length ~ Sepal.Width, data = iris) summary(lm_iris) #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> Call: lm(formula = Sepal.Length ~ Sepal.Width, data = iris) Residuals: Min 1Q Median -1.5561 -0.6333 -0.1120 3Q 0.5579 Max 2.2226 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.5262 0.4789 13.63 <2e-16 *** Sepal.Width -0.2234 0.1551 -1.44 0.152 --Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1 Residual standard error: 0.8251 on 148 degrees of freedom Multiple R-squared: 0.01382, Adjusted R-squared: 0.007159 F-statistic: 2.074 on 1 and 148 DF, p-value: 0.1519 summary produces a description of the linear model, describing how it was called (call), as well as the residuals, coefficients, t-values, p-values, R2 , and more. This output is completely different to the information output from summary used for the iris dataframe. So how does the same function, summary perform differently for different objects? The answer is that R is helpful, and hides this information. There are in fact, many different summary functions. For example: • • • • summary.lm summary.data.frame summary.Date summary.matrix Being an S3 method, summary calls the appropriate function based upon the class of the object it operates on. So using summary on an object of class “Date” will evoke the function, summary.Date. But all you need to do is type summary, and the S3 method does the rest. By abstracting away this detail (the object class), the intent becomes clearer. To further illustrate, using summary on the iris data will actually call the function summary.data.frame, since iris is of class data.frame. We can find the class of an object using class class(iris) #> [1] "data.frame" summary.data.frame(iris) #> #> #> #> #> #> Sepal.Length Min. :4.300 1st Qu.:5.100 Median :5.800 Mean :5.843 3rd Qu.:6.400 Sepal.Width Min. :2.000 1st Qu.:2.800 Median :3.000 Mean :3.057 3rd Qu.:3.300 The R Journal Vol. XX/YY, AAAA Petal.Length Min. :1.000 1st Qu.:1.600 Median :4.350 Mean :3.758 3rd Qu.:5.100 Petal.Width Min. :0.100 1st Qu.:0.300 Median :1.300 Mean :1.199 3rd Qu.:1.800 ISSN 2073-4859 C ONTRIBUTED #> #> #> #> #> #> #> #> 3 RESEARCH ARTICLE Max. :7.900 Species setosa :50 versicolor:50 virginica :50 Max. :4.400 Max. :6.900 Max. :2.500 which is the same as summary(iris) sum1_df <- summary.data.frame(iris) sum2_df <- summary(iris) all.equal(sum1_df, sum2_df) #> [1] TRUE And using summary on the linear model object, lm_iris performs: summary.lm(lm_iris) #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> Call: lm(formula = Sepal.Length ~ Sepal.Width, data = iris) Residuals: Min 1Q Median -1.5561 -0.6333 -0.1120 3Q 0.5579 Max 2.2226 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.5262 0.4789 13.63 <2e-16 *** Sepal.Width -0.2234 0.1551 -1.44 0.152 --Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1 Residual standard error: 0.8251 on 148 degrees of freedom Multiple R-squared: 0.01382, Adjusted R-squared: 0.007159 F-statistic: 2.074 on 1 and 148 DF, p-value: 0.1519 the same as summary(lm_iris) sum1_lm <- summary.lm(lm_iris) sum2_lm <- summary(lm_iris) all.equal(sum1_lm, sum2_lm) #> [1] TRUE One could coerce a different method upon a different class, for example using summary.data.frame on an “lm” object: summary.data.frame(lm_iris) #> #> #> #> #> #> #> #> #> #> coefficients residuals effects rank Min. :-0.2234 Min. :-1.5561 Min. :-71.56593 Min. :2 1st Qu.: 1.4640 1st Qu.:-0.6333 1st Qu.: -0.65192 1st Qu.:2 Median : 3.1514 Median :-0.1120 Median : -0.00897 Median :2 Mean : 3.1514 Mean : 0.0000 Mean : -0.42040 Mean :2 3rd Qu.: 4.8388 3rd Qu.: 0.5579 3rd Qu.: 0.61051 3rd Qu.:2 Max. : 6.5262 Max. : 2.2225 Max. : 2.15225 Max. :2 fitted.values assign qr.Length qr.Class qr.Mode df.residual Min. :5.543 Min. :0.00 300 -nonenumeric Min. :148 1st Qu.:5.789 1st Qu.:0.25 2 -nonenumeric 1st Qu.:148 The R Journal Vol. XX/YY, AAAA ISSN 2073-4859 C ONTRIBUTED #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> 4 RESEARCH ARTICLE Median :5.856 Median :0.50 2 -noneMean :5.843 Mean :0.50 1 -none3rd Qu.:5.901 3rd Qu.:0.75 1 -noneMax. :6.080 Max. :1.00 xlevels call terms Length:0 Length:3 Length:3 Class :list Class :call Class1:terms Mode :list Mode :call Class2:formula Mode :call model.Sepal.Length Min. :4.300000 1st Qu.:5.100000 Median :5.800000 Mean :5.843333 3rd Qu.:6.400000 Max. :7.900000 numeric numeric numeric Median :148 Mean :148 3rd Qu.:148 Max. :148 model.Sepal.Width Min. :2.000000 1st Qu.:2.800000 Median :3.000000 Mean :3.057333 3rd Qu.:3.300000 Max. :4.400000 However the output may be a bit confusing. To summarize, the important feature of S3 methods worth noting is that only the first part, summary, is required to be used on these objects of different classes. Why hide the text? Hiding the trailing text after the . avoids the need to use a different summary function for every class. This means that one does not need to remember to use summary.lm for linear models, or summary.data.frame for data frames, or summary.aProposterousClassOfObject. By using S3 methods, cognitive load is reduced - you don’t have to think as much to remember what class an object is - and the commands are more intuitive. To get a summary of most objects, use summary, to plot most objects, use plot. Perhaps the most nifty feature of all is that a user can create their own S3 methods using the same functions such as summary and plot. This means a user can create their own special class of object test_class <- 1:10 class(test_class) <- "myclass" class(test_class) #> [1] "myclass" and then write their own S3 method for it - e.g., summary.myclass or plot.myclass, each proiding appropriate summary information, or nice plots, for that object. How to make your own S3 method? Creating your own S3 method is not particularly difficult and is usually highly practical. A use case scenario for creating an S3 method is now discussed. The Residual Sums of Squares (RSS), ∑(Yi − Ŷ)2 is a useful metric for determining model accuracy for continuous outcomes. For example, for a Classification and Regression Tree library(rpart) fit.rpart <- rpart(Sepal.Width ~ Sepal.Length + Petal.Length + Petal.Width + Species, data = iris) The RSS is calculated as print_rss <- sum(residuals(fit.rpart)**2) One might be inclined to write a function to perform this task The R Journal Vol. XX/YY, AAAA ISSN 2073-4859 C ONTRIBUTED 5 RESEARCH ARTICLE rss <- function(x){ sum(residuals(x)**2) } rss(fit.rpart) #> [1] 10.17245 However, there are many different decision tree models that one would like to compare, say boosted regression trees (BRT), and random forests (RF). The same code will not work: library(randomForest) set.seed(71) fit.rf <- randomForest(Sepal.Length ~ ., data=iris, importance=TRUE, proximity=TRUE) rss(fit.rf) #> [1] 0 In this case, one could write three functions, one for each decision tree method: “rss_rpart”, “rss_brt”, and “rss_rf”. But to avoid having three functions and instead use just one, one could place all three functions inside of one function, using an if-then-else clause to direct the object of the appropriate class to the appropriate method. This shall be referred to as a “Poor man’s S3 method”. dt_rss <- function (x){ if ("rpart" %in% class(x)) { result <- sum((residuals(x)**2)) return(result) } else if ("gbm" %in% class(x)) { result <- sum(x$residuals**n2) return(result) } else if ("randomForest" %in% class(x)) { temp <- x$y - x$predicted result <- sum(temp**2) return(result) } else warning(paste(class(x), "is not of an rpart, gbm, or randomForest object")) } Here it is in action dt_rss(fit.rpart) #> [1] 10.17245 The R Journal Vol. XX/YY, AAAA ISSN 2073-4859 C ONTRIBUTED 6 RESEARCH ARTICLE The RSS method works, and if it is applied to a class that is not known, a special message is provided fit.lm <- lm(Sepal.Width ~ Species, data = iris) dt_rss(fit.lm) #> Warning in dt_rss(fit.lm): lm is not of an rpart, gbm, or randomForest #> object The “poor man’s S3 method” does what it needs to do. However, one must ask how sustainable this would be for an entire programming language? Imagine if a colleague creates a new tree method that needs it’s own rss(). He will need to convince the maintainer to add his class into your ifelse() chain. Failing this, he could just overwrite the function rss(), with predictably disastrous results. In reality, it’s probably better to do all of these things with one method. R’s S3 methods mean that R developers can utilise a common interface without having to update it when new classes come along. It also means overloading clashes are less likely. So let us create an S3 method to demonstrate. First define the S3 method with UseMethod() rss <- function(x) UseMethod("rss") This creates the building block of an S3 method, the “root”, if you will. Here we have specified that our method will be called rss. Now we need to create the special cases of rss - the methods rss.rpart, rss.gbm, and rss.randomForest, where the sections of code after rss. are the classes of object we want them to work on. rss.rpart <- function(x){ sum((residuals(x)**2)) } rss.gbm <- function(x){ sum(x$residuals**2) } rss.randomForest <- function(x){ res <- x$y - x$predicted sum(res**2) } A default method can also be created - rss.default - which, as the name suggests, is the default method when the argument x is not a class that has a specific version of the method defined. rss.default <- function(x, ...){ warning(paste("RSS does not know how to handle object of class ", class(x), "and can only be used on classes rpart, gbm, and randomForest")) } In this case a warning is issued, to let the user know that the object class they were using was not appropriate. We can now apply the rss method to an rpart model rss(fit.rpart) The R Journal Vol. XX/YY, AAAA ISSN 2073-4859 C ONTRIBUTED 7 RESEARCH ARTICLE #> [1] 10.17245 Also observe what happens when the object used is not of the decision tree classes rss(lm.fit) #> Warning in rss.default(lm.fit): RSS does not know how to handle object of #> class function and can only be used on classes rpart, gbm, and randomForest This guide to S3 methods was written to provide R users with the minimal amount of information to start building their own S3 methods. For a more complete treatment on S3 methods, see AdvancedR (Wickham 2014), R Packages (Wickham, Hadley 2015), and the official S3 documentation (Team 2016, R Core Team (2012)). References Chambers, John M, and Trevor J Hastie. 1992. Statistical Models in S. CRC Press, Inc. R Core Team. 2012. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. http://www.R-project.org/ . Team, R Core. 2016. R: Class Methods. R Foundation for Statistical Computing. https://stat.ethz.ch/R-manual/R-devel/l Wickham, Hadley. 2014. Advanced R. CRC Press. Wickham, Hadley. 2015. R Packages. O’Reilly Media, Inc. Nicholas Tierney Queensland University of Technology Level 8, Y Block, Main Drive, QUT, Brisbane, Australia [email protected] The R Journal Vol. XX/YY, AAAA ISSN 2073-4859 This figure "Rlogo.png" is available in "png" format from: http://arxiv.org/ps/1608.07161v1
6cs.PL
arXiv:1606.00828v1 [math.AC] 2 Jun 2016 FINITELY GENERATED AND NOT FINITELY GENERATED RINGS MELVYN B. NATHANSON Abstract. Let R1 be a commutative ring, let R2 be a finitely generated extension ring of R1 , and let S be a ring that is intermediate between R1 and R2 . For R1 = R[x] and R2 = R[x, y], there are simple combinatorial constructions of intermediate rings that are not finitely generated over R[x]. Let R1 and R2 be commutative rings with R1 ⊆ R2 . The ring R2 is finitely generated as a ring over R1 if there is a finite subset X of R2 such that every element of R2 can be represented as a linear combination of monomials in X with coefficients in R1 . The ring R2 is finitely generated as a module over R1 if there is a finite subset X of R2 such that every element of R2 can be represented as a linear combination of elements of X with coefficients in R1 . Let R2 be finitely generated as a ring over R1 . By Hilbert’s basis theorem, if R1 is Noetherian, then R2 is also Noetherian. Let S be a ring that is intermediate between R1 and R2 , that is, R1 ⊆ S ⊆ R2 . Artin and Tate [1] proved that if R1 is Noetherian and if R2 is finitely generated as a module over S, then S is finitely generated as a ring over R1 . They used this to prove Hilbert’s Nullstellensatz (cf. Zariski [3], Kunz [2, Lemma 3.3]). It is natural to ask if every intermediate ring S is finitely generated as a ring over R1 . The answer is “no,” and the purpose of this note is to give simple combinatorial constructions of intermediate rings S that are not finitely generated over R1 . Let N denote the set of positive integers and N0 the set of nonnegative integers. Theorem 1. Let λ be a positive real number or λ = ∞. Let Λ be a subset of N × N0 with (1, 0) ∈ Λ such that   b : (a, b) ∈ Λ = λ (1) sup a and b (2) <λ for all (a, b) ∈ Λ. a Consider the set of monomials  M (Λ) = xa y b : (a, b) ∈ Λ . Let R be a commutative ring, and let R[M (Λ)] be the subring of R[x, y] generated by M (Λ). Then R[x] ⊆ R[M (Λ)] ⊆ R[x, y] 2010 Mathematics Subject Classification. 13E15, 13B02, 13E05, 13F20. Key words and phrases. Polynomial ring, Noetherian ring, intermediate ring, finitely generated ring. 1 2 MELVYN B. NATHANSON and R[M (Λ)] is not finitely generated as a ring over R[x]. For example, the set Λ1 = {(1, n) : n ∈ N0 } satisfies conditions (1) and (2) with λ = ∞, the corresponding set of monomials is  M (Λ1 ) = x, xy, xy 2 , xy 3 , . . . , and the ring R[M (Λ2 )] = R[x, xy, xy 2 , xy 3 , . . .] is intermediate between R[x] and R[x, y]. Similarly, if (fn )∞ n=−1 is the sequence of Fibonacci numbers with f−1 = 1, f0 = 0, and f1 = 1, then the√set Λ2 = {(f2n−1 , f2n ) : n ∈ N0 } satisfies conditions (1) and (2) with λ = ( 5 + 1)/2. By Theorem 1, the intermediate rings R[M (Λ1 )] and R[M (Λ2 )] are not finitely generated over R[x]. Note that inequalities (1) and (2) imply that the sets Λ and M (Λ) are infinite. If λ = ∞, then (1) implies (2) Proof. Because (1, 0) ∈ Λ, we have x ∈ M (Λ) and R[x] ⊆ R[M (Λ)] ⊆ R[x, y]. Let F be a finite subset of R[M (Λ)]. For every polynomial f in F , there is a finite set M ∗ (f ) of monomials in M (Λ) such that f is a linear combination of products of monomials in M ∗ (f ). This set of monomials is not necessarily unique (for example, (xy)(xy 4 ) = (xy 2 )(xy 3 )), but we choose, for each polynomial f in F , one set M ∗ (f ) of monomials in M (Λ) that generate f . Because F is a finite set of polynomials, the set [ M ∗ (F ) = M ∗ (f ) f ∈F is a finite set of monomials in M (Λ). Moreover, f ∈ R[M ∗ (F )] for all f ∈ F , and so R[F ] ⊆ R[M ∗ (F )] ⊆ R[M (Λ)]. We shall prove that R[M ∗ (F )] 6= R[M (Λ)]. Let   b : xa y b ∈ M ∗ (F ) . β = max a Applying inequality (2) to the finite set M ∗ (F ), we obtain β < λ. If (A, B) ∈ N × N0 and xA y B ∈ R[M ∗ (F )], then xA y B is an R-linear combination of products of monomials in M ∗ (F ). This implies that xA y B is a product of monomials in M ∗ (F ). Thus, there is a finite sequence ((ai , bi ))ni=1 of ordered pairs in N × N0 such that xai y bi ∈ M ∗ (F ) for all i = 1, . . . , n and xA y B = n Y Pn xai y bi = x i=1 ai y Pn i=1 bi . i=1 It follows that Pn Pn ai β bi B = Pni=1 ≤ Pni=1 = β. A a a i i=1 i=1 i Condition (1) implies that the ring R[M (Λ)] contains monomials xA y B with β < B/A < λ. It follows that xA y B ∈ / R[M ∗ (F )] and so R[M ∗ (F )] 6= R[M (Λ)]. Therefore, R[F ] 6= R[M (Λ)], and the ring R[M (Λ)] is not finitely generated. This completes the proof.  FINITELY GENERATED AND NOT FINITELY GENERATED RINGS 3 Theorem 1 suggests the following open problems. Classify the sets M of monomials of the form xa y b such that R[x] ⊆ R[M ] ⊆ R[x, y] and the ring R[M ] is not finitely generated over R[x]. More generally, describe all rings S that are intermediate between R[x] and R[x, y] and are not finitely generated over R. I thank Ryan Alweiss for very helpful discussions on this topic at CANT 2016. References [1] E. Artin and J. T. Tate, A note on finite ring extensions, J. Math. Soc. Japan 3 (1951), 74–77. [2] E. Kunz, Introduction to Commutative Algebra and Algebraic Geometry, Modern Birkhäuser Classics, Birkhäuser/Springer, New York, 2013, Translated from the 1980 German original by Michael Ackerman, With a preface by David Mumford, Reprint of the 1985 edition. [3] O. Zariski, A new proof of Hilbert’s Nullstellensatz, Bull. Amer. Math. Soc. 53 (1947), 362–368. Department of Mathematics, Lehman College (CUNY), Bronx, NY 10468 E-mail address: [email protected]
0math.AC
ZETA FUNCTIONS ASSOCIATED TO ADMISSIBLE REPRESENTATIONS OF COMPACT p-ADIC LIE GROUPS arXiv:1707.08485v1 [math.GR] 26 Jul 2017 STEFFEN KIONKE AND BENJAMIN KLOPSCH Abstract. Let G be a profinite group. A strongly admissible smooth repL resentation ̺ of G over C decomposes as a direct sum ̺ ∼ = π∈Irr(G) mπ (̺) π of irreducible representations with finite multiplicities mπ (̺) such that for every positive integer n the number rn (̺) of irreducible constituents of dimension n is finite. Examples arise naturally in the representation theory of reductive groups over non-archimedean local fields. In this article we initiate an investigation of the Dirichlet generating function X X∞ mπ (̺) rn (̺)n−s = ζ̺ (s) = n=1 π∈Irr(G) (dim π)s associated to such a representation ̺. Our primary focus is on representations ̺ = IndG H (σ) of compact p-adic Lie groups G that arise from finite dimensional representations σ of closed subgroups H via the induction functor. In addition to a series of foundational results – including a description in terms of p-adic integrals – we establish rationality results and functional equations for zeta functions of globally defined families of induced representations of potent pro-p groups. A key ingredient of our proof is Hironaka’s resolution of singularities, which yields formulae of Denef-type for the relevant zeta functions. In some detail, we consider representations of open compact subgroups of reductive p-adic groups that are induced from parabolic subgroups. Explicit computations are carried out by means of complementing techniques: (i) geometric methods that are applicable via distance-transitive actions on spherically homogeneous rooted trees and (ii) the p-adic Kirillov orbit method. Approach (i) is closely related to the notion of Gelfand pairs and works equally well in positive defining characteristic. Contents 1. Introduction 2. Basic concepts and preliminaries 3. Twist similarity classes and admissibility properties 4. Induced representations of potent pro-p groups via the orbit method 5. A Denef-type formula for globally induced representations 6. Groups acting on rooted trees and multiplicity-free representations 7. Examples of induced representations of potent pro-p groups References 2010 Mathematics Subject Classification. 20E18; 20C15, 20G25, 22E50, 11M41. We acknowledge support by DFG grant KL 2162/1-1. 2 10 14 20 26 40 44 57 2 STEFFEN KIONKE AND BENJAMIN KLOPSCH 1. Introduction In recent years the subject of representation growth has advanced with a primary focus on zeta functions enumerating (i) irreducible representations of arithmetic lattices and compact p-adic Lie groups, (ii) twist isoclasses of irreducible representations of finitely generated nilpotent groups; for instance, see [38, 3, 4, 5, 1] and [52, 46, 21], or the relevant surveys [35, 55]. The aim of this paper is to introduce and study a new, more general zeta function that can be associated to any ‘suitably tame’ infinite dimensional representation of a group. Our focus is on admissible smooth representations of compact p-adic Lie groups that arise from finite dimensional representations of closed subgroups via the induction functor. In addition to a series of foundational results that include a description in terms of p-adic integrals and provide a springboard for further investigations, we establish in Theorem D rationality results and functional equations for zeta functions of globally defined families of induced representations of potent pro-p groups. 1.1. Background on representations zeta functions. A group G is said to be representation rigid if, for each positive integer n, its number of (isomorphism classes of) irreducible complex representations of degree n, denoted rn (G), is finite. In the spirit of [27] theP sequence rn (G), n ∈ N, is encoded in a Dirichlet −s generating function ζG (s) = ∞ n=1 rn (G)n , yielding the conventional representation zeta function of G. If G has polynomially bounded representation growth, then ζG (s) converges and defines a holomorphic function on a right half-plane {s ∈ C | Re(s) > α(G)}, where the abscissa of convergence α(G) reflects the polynomial degree of representation growth. In favourable circumstances the function extends meromorphically to a larger domain, possibly the entire complex plane. For a semisimple complex algebraic group G = G(C) the representation zeta function ζG (s), encoding irreducible rational representations, is also known as the Witten zeta function; see [57]. The analytic properties of such zeta functions have been studied thoroughly, using the available classification of irreducible representations in terms of highest weights; e.g., see [37, 38]. We are concerned with groups where a similar classification is either impracticable or way out of reach. Recent advances in [3, 4, 5] concern the representation zeta functions of arithmetic lattices in semisimple locally compact groups (mostly in characteristic 0) and their local Euler factors. The latter are, de facto, representation zeta functions enumerating irreducible continuous representations of compact p-adic Lie groups. The main focus has been on the following aspects: abscissae of convergence, possible meromorphic continuations and pole spectra. There are fundamental connections to Margulis super-rigidity and the classical Congruence Subgroup Problem; for instance, a quantitative refinement of the Congruence Subgroup Conjecture, due to Larsen and Lubotzky [38], has been reduced to the original conjecture in [5]. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 3 In these investigations the main tools are: Lie-theoretic techniques, the Kirillov orbit method, the character theory of finite groups and Clifford theory, all in parallel with algebro-geometric, model-theoretic and combinatorial methods from p-adic integration. This includes, among others, Deligne–Lusztig theory for representations of finite groups of Lie type, Hironaka’s resolution of singularities in characteristic 0 and aspects of the Weil conjectures regarding zeta functions of smooth projective varieties over finite fields. Most relevant for our purposes are the results of Avni, Klopsch, Onn and Voll in [2, 3], including a ‘Denef formula’ for the representation zeta functions of principal congruence subgroups of compact p-adic Lie groups that arise from a global Lie lattice over the ring of integers of a number field; compare [18]. 1.2. Zeta functions associated to admissible representations. Our motivation is to analyse more general enumeration problems than the one underlying past research on representation growth. Let G be a profinite group; in due course we specialise to the case, where G is a compact p-adic Lie group. \ Key examples are the completions G = G(O S ) and G = G(Op ) of arithmetic groups G(OS ) with respect to the profinite topology or the p-adic topology associated to a non-archimedean prime p; here G denotes a semisimple affine group scheme over the ring of S-integers OS of a number field. In addition we are interested in the principal congruence subgroups of the groups G(Op ). In order to develop flexible methods for enumerating irreducible representations by their degrees according to natural weights, we shift emphasis and attach a zeta function to every ‘well behaved’ infinite dimensional representation of G. This point of view is motivated also by geometric applications, for instance, in the context of cohomology growth, where such representations are supported on direct limits of cohomology groups arising from systems of finite coverings of a fixed topological space; see [47]. In particular, in the realm of number theory the relevant profinite groups acting on such direct limits are completions of arithmetic groups as described above; e.g., see [28]. Technically, we consider admissible smooth representations of G over C, a concept which arises in number theory mainly through the study of automorphic representations, e.g., in the context of the Langlands program. Admissible smooth representations of reductive groups over p-adic fields have been studied thoroughly since the 1970s, starting from the work of Casselman as well as Bernstein and Zelevinsky; compare [12, 45]. Let Irr(G) denote the set of all irreducible smooth representations of the profinite group G, up to isomorphism, and note that each π ∈ Irr(G) is finite dimensional. AnLadmissible smooth representation ̺ of G decomposes as a direct sum ̺ ∼ = π∈Irr(G) mπ (̺) π of irreducible representations with finite multiplicities mπ (̺). We say that ̺ is strongly admissible if, in addition, for every positive integer n the number rn (̺) of irreducible constituents of dimension n is finite; in this case we define the zeta function of the representation ̺ as the Dirichlet generating function (1.1) ζ̺ (s) = ∞ X n=1 rn (̺)n−s = X π∈Irr(G) mπ (̺) (dim π)s (s ∈ C). 4 STEFFEN KIONKE AND BENJAMIN KLOPSCH This raises the fundamental question which infinite dimensional ̺ are moreover polynomially strongly admissible, i.e., for which ̺ the zeta function ζ̺ has finite abscissa of convergence α(̺) and thus converges in the non-empty right half-plane {z ∈ C | Re(z) > α(̺)}. Of course, the property can easily be formulated in terms of conditions on the multiplicities mπ (̺); however, the latter are typically difficult to access. We remark that the definition gives a natural generalisation of the conventional representation zeta function of a profinite group G: indeed, ζG (s) = ζ̺reg (s + 1) for the regular representation ̺reg = IndG 1 (1) of G; see Example 2.5. Generally, we are interested in relations between the algebraic properties of a polynomially strongly admissible representation ̺ of the profinite group G and the analytic properties of the associated zeta function ζ̺ . Depending on the context, different types of properties become relevant. Analytic properties of ζ̺ comprise, for instance: its abscissa of convergence, meromorphic extension, the location of zeros and poles, and possibly functional equations. Regarding algebraic properties of ̺, the emphasis lies on conditions which do not refer directly to the multiplicities mπ (̺) of the irreducible constituents. The new zeta function defined in (1.1) transforms well with respect to basic operations on admissible representations, e.g., passing to the smooth dual, forming direct sums and tensor products. This suggests that other standard, but more sophisticated operations on representations transform the zeta functions in a controllable way. In this paper we study in detail representations ̺ = IndG H (σ) of G that are obtained by induction from representations σ of a closed subgroup H ≤c G. The induction functor is a central tool for producing infinite dimensional representations from finite dimensional ones. 1.3. Summary of main results. In dealing with profinite groups, it is often convenient to pass to open subgroups. In Section 3 we establish that various admissibility properties for a smooth representation ̺ of a profinite group G are common properties of the twist similarity class of ̺ defined there. In particular, if ̺ is polynomially strongly admissible, the abscissa of convergence α(̺) is an invariant of the corresponding twist similarity class. We recall that a finitely generated profinite group G is representation rigid if and only if it is FAb, i.e., if every open subgroup K ≤o G has finite abelianisation K/[K, K]; see [7, Prop. 2]. We introduce the following refined notion: G is FAb relative to a closed subgroup H ≤c G if K/(H ∩ K)[K, K] is finite for every open subgroup K ≤o G. In Theorem 3.8 we establish the following natural characterisation. Theorem A. Let H ≤c G be a closed subgroup of a finitely generated profinite group G. The following statements are equivalent. (a) The group G is FAb relative to H. (b) The functor IndG H preserves strong admissibility. (c) The induced representation IndG H (1H ) is strongly admissible. It is an open problem to characterise finitely generated profinite groups with polynomial representation growth. Theorem A leads to the following refined ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 5 question: Under what conditions on H ≤c G does the induction functor IndG H preserve polynomially strong admissibility? In Proposition 3.10, we provide a partial answer in the special setting, where G is a compact p-adic Lie group for some prime p; our result can be regarded as a generalisation of [39, Prop. 2.7]. Proposition B. Let H ≤c G be a closed subgroup of a compact p-adic Lie group G. If G is FAb relative to H then IndG H (σ) is polynomially strongly admissible for every finite dimensional smooth representation σ of H. For uniformly powerful – more generally, for finitely generated torsion-free potent – pro-p groups the Kirillov orbit method provides a powerful tool for handling the characters of smooth irreducible representations; see [23]. In Section 4 we generalise the approach used, for instance, in [2, 3, 4] to describe zeta functions of induced representations for potent pro-p groups. One of our key results is Proposition 4.4; it provides a formula for the relevant zeta function in terms of a p-adic integral. We refer to Sections 4.2 and 5.1 for an explanation of the notation k·kp appearing in the integrands; the canonical p-adic measure is recalled in Remark 5.4. Proposition C. Let o be a compact discrete valuation ring of characteristic 0 and residue characteristic p, with uniformiser π. Put p = πo and q = |o/p|. Let g be an o-Lie lattice and h an o-Lie sublattice of g. Write m + 1 = dimo g − dimo h. Let r ∈ N0 be such that G = exp(π r g) is a potent pro-p group with potent subgroup H = exp(π r h) ≤c G. Then the zeta function of ̺ = IndG H (1H ) is given by the following integral formulae. (1) Writing W = {w ∈ Homo (g, f) | w(h) ⊆ o}, where f is the fraction field of o, we have −1−s  [ Z r(m+1) {Pfaff k (w) | 0 ≤ k ≤ ⌊n/2⌋} dµ(w), ζ̺ (s) = q p w∈W where µ denotes the normalised Haar measure satisfying µ(Homo (g, o)) = 1 (2) For simplicity, suppose further that the o-module g decomposes as a direct sum g = k ⊕ h. Interpreting Homo (k, o) as the o-points V(o) of the m + 1dimensional affine space V over Spec(o), let X denote the projectivisation PV over Spec(o). For 0 ≤ k ≤ ⌊n/2⌋, the map w 7→ Pfaff k (w) induces a sheaf of ideals Ik on X, and −1−s  Z X kℓ −ℓ(m+1) −1 r(m+1) max π Ik p q ζ̺ (s) = (1 − q )q dµX,p , ℓ∈Z X(o) 0≤k≤⌊n/2⌋ where µX,p denotes the canonical p-adic measure on X(o). In Proposition 4.6 we obtain a concrete version of this formula, based on a particular choice of coordinates. We illustrate the usefulness of the explicit formula in Section 7 by computing the zeta functions of various representations induced from Borel or parabolic subgroups. In Theorem 5.1 we obtain results on the rationality of globally induced representations, their abscissae of convergence and local functional equations. This 6 STEFFEN KIONKE AND BENJAMIN KLOPSCH generalises similar results for conventional representation zeta functions, for instance, in [33] and [3]. Our result is a consequence of a general discussion of certain zeta functions which are obtained as an infinite series of Igusa integrals, similar to the one appearing in part (2) of Proposition C. We think that this approach is of independent interest, since it is very flexible and provides a new perspective on the abscissa of convergence. Let K0 be a number field with ring of integers OK0 . Fix a finite set S of maximal ideals of OK0 and let OK0 ,S = {a ∈ K0 | |a|p ≤ 1 for p 6∈ S} denote the ring of S-integers in K0 . We consider number fields K that arise as finite extensions of K0 . Let OS = OK,S denote the integral closure of OK0 ,S in K. For a maximal ideal p E OS we write κp = OS /p for the residue field and denote its cardinality by qp . Furthermore, Op = OK,S,p denotes the completion of OS with respect to p and we fix a uniformiser πp so that Op has the valuation ideal πp Op . Let g be an OK0,S -Lie lattice. For every finite extension K of K0 and every maximal ideal p E OS we consider the Op -Lie lattice gp = Op ⊗OK0 ,S g and, for r ∈ N0 , its principal congruence sublattices gp,r = πpr gp . For any given K and p, the Lie lattice gp,r is potent for all sufficiently large integers r so that Gp,r = exp(gp,r ) is a potent pro-p group; we say that such r are permissible for gp . Theorem D. As in the set-up described above, let g be an OK0 ,S -Lie lattice and let h ⊆ g be a Lie sublattice of codimension m + 1 = dimOK0 ,S g − dimOK0 ,S h. Suppose that h is a direct summand as a submodule of the OK0,S -module g. For maximal ideals p E OK,S , where K ranges over finite extensions of K0 , and for positive integers r that are permissible for gp and hp , we consider the induced representation G (1Hp,r ) ̺p,r = IndHp,r p,r associated to the pro-p groups Gp,r = exp(gp,r ) and Hp,r = exp(hp,r ). (1) For each p there is a complex-valued function Zp of a complex variable s that is rational in qp−s with integer coefficients so that for all permissible r, r(m+1) ζ̺p,r (s) = (1 − qp−1 )qp Zp (s). (2) The real parts of the poles of the functions Zp , for all p, form a finite subset Pg,h ⊆ Q. (3) There is a finite extension K1 of K0 such that, for all maximal ideals p E OK,S , arising for extensions K1 ⊆ K, and for all permissible r, the abscissa of convergence of the zeta function ζ̺p,r satisfies α(ζ̺p,r ) = max Pg,h . (4) There are a rational function F ∈ Q(Y1 , Y2 , X1 , . . . , Xg ) and a finite set T of maximal ideals of OK0 with S ⊆ T such that the following holds: For every maximal ideal p0 E OK0 not contained in T there are algebraic integers λ1 = λ1 (p0 ), . . . , λg = λg (p0 ) ∈ C× so that for every finite extension K of K0 and every maximal ideal p dividing p0 , Zp (s) = F (q −f , q −f s , λ1f , . . . , λgf ), ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 7 where q = qp0 and f = [κp : κp0 ] denotes the inertia degree of p over K0 . Furthermore the following functional equation holds: ζ̺p,r (s)| q→q−1 = q f (m+1)(1−2r) ζ̺p,r (s). λj →λ−1 j The theorem is a consequence of our general discussion of certain zeta functions in Section 5; these functions are defined as infinite series of Igusa integrals, similar to the one in part (2) of Proposition C. This class of zeta functions is comparatively general and it is well suited to our applications. The proof of the rationality relies on Hironaka’s resolution of singularities, which yields a formula of Denef-type. Moreover, the functional equation is obtained along the lines of Denef and Meuser [18] and Voll [54]. The zeta functions treated here differ slightly from the ones considered before and our account provides a simplification of the still more general discussion in [54]. Concerning the abscissa of convergence we include a new approach which relies on the specific shape the zeta functions considered here. In Corollary 5.9 we deduce from statement (3) in Theorem D that the abscissa of convergence is attained on a set of primes with positive Dirichlet density; indeed, statement (3) can be seen as a strengthening of [3, Theorem B]. In Theorem 6.3 we record an interesting class of examples, arising geometrically from distance-transitive actions of profinite groups on spherically homogeneous rooted trees. This result is based on ideas of Bekka, de la Harpe and Grigorchuk discussed in the appendix of [9]. Theorem E. Let Tm be a spherically homogeneous rooted tree with branching sequence m = (mn )n∈N in N≥2 . Let G ≤c Aut(Tm ) act distance transitively on the boundary ∂Tm , and let P = Pξ ≤c G be the stabiliser of a point ξ ∈ ∂Tm . Then (G, P ) is a Gelfand pair; more precisely, the induced representation ̺∂ = IndG representation and a P (1P ) decomposes as a direct sum of the trivial Qn−1 mj for each n ≥ 1. unique irreducible constituent πn of dimension (mn −1) j=1 In particular, the zeta function of ̺∂ is ζ̺∂ (s) = 1 + ∞ X (mi − 1)−s i=1 with abscissa of convergence α(̺∂ ) = 0. i−1 Y mj−s j=1 Recall that (G, P ) is a Gelfand pair if the induced representation IndG P (1P ) is multiplicity-free; for an introduction to Gelfand pairs we refer the reader to [26]. The zeta function of an induced representation of a Gelfand pair (G, P ) enumerates a subset of all irreducible representations of G, which suggests that Gelfand pairs are of special interest in our setting. As an application of these new methods we obtain in Proposition 6.5 an explicit formula for the zeta functions associated to representations induced from maximal (1, n)-parabolic subgroups to GLn+1 (o), where o is a compact discrete valuation ring. This approach works in arbitrary characteristic and complements the Kirillov orbit method described above. 8 STEFFEN KIONKE AND BENJAMIN KLOPSCH 1.4. Further discussion and open problems. 1.4.1. Our investigations are naturally related to the representation theory of reductive groups over p-adic fields or non-archimedean local fields in general; compare Remark 2.3. For simplicity, consider the reductive group G = GLn (Qp ). We would like to gain a detailed understanding of the smooth irreducible representations of G, which match via the local Langlands correspondence, established by Harris–Taylor [29] and Henniart [31], with certain representations of the Weil–Deligne group of Qp . Consider a smooth irreducible representation ̺ of G and its restriction ̺|K to the maximal compact subgroup K = GLn (Zp ). The following question is fundamental: describe the decomposition of ̺|K into irreducible components. For n = 2, Casselman [14] obtain detailed results, but for larger degrees an answer seems to be unknown. Already specific cases are of interest. For instance, the unramified principal series representations constitute a large class of smooth irreducible representations of G. These representations are induced to G from 1-dimensional representations on a Borel subgroup B. As KB = G, the restriction of such a representation to K is induced from K ∩ B. The study of zeta functions of induced representations thus provides a quantitative approach to the decomposition problem for unramified principal series representations. The decomposition into irreducible GL3 (Zp )-constituents of unramified principal series representations of GL3 (Qp ) was determined by Onn and Singla [43], completing results of Campbell and Nevins [13]. They used direct representation-theoretic considerations and, as a consequence, deduced a formula for the associated zeta function. It is interesting to conduct similar investigations for supercuspidal representations of G; Nevins [42] has made steps in this direction. 1.4.2. In this article we consider, for simplicity, only smooth representations of profinite groups G over the complex field C. More generally, one could derive many of our results also for representations over fields F that are not necessarily algebraically closed and possibly have positive characteristic. Indeed, if the base field F is not algebraically closed, one can incorporate without much trouble the action of the absolute Galois group into the treatment; it is not so clear how to deal with Schur indices, but there is no extra complication in the important case, where G is a pro-p group for an odd prime p. Furthermore, if F has positive characteristic ℓ > 0, there is no problem provided that G has trivial pro-ℓ-Sylow subgroup. 1.4.3. Dirichlet generating functions have also been employed to study the distribution of finite dimensional irreducible representations of finitely generated nilpotent groups. For such a group Γ one defines and studies the zeta function enumerating twist-isoclasses of irreducible representations of Γ; for instance, see [52, 46, 21]. Many theorems on representation zeta functions, e.g., regarding rationality, pole spectra and functional equations, have analogues in the twist-isoclass setting; the Kirillov orbit method can be adjusted to take into ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 9 account twist-isoclasses and thus yields a basic tool. It is natural to investigate – in analogy to our approach in this paper – zeta functions ζ̺ associated to infinite dimensional twist-invariant representations ̺ of a finitely generated nilpotent group Γ that are completely reducible into finite dimensional irreducible constituents: the Dirichlet series ζ̺ encodes the finite multiplicities of entire twist-isoclasses rather than individual constituents. Natural examples occur again in the form of arithmetic groups: the representation ̺ spanned by all finite dimensional subrepresentations of the (co-)induced representation IndΓ∆ (1∆ ), where Γ = G(O) for a unipotent affine group scheme G over the ring of integers O of a number field, and ∆ = H(O) for a subgroup H ⊆ [G, G]. 1.4.4. Our results on induced representations of compact p-adic Lie groups can be seen as a starting point for further investigations. In particular, the general setting of induced representations provides many new tractable examples and significantly more flexibility to vary input parameters. To indicate possible future directions we formulate the following concrete open questions. Problem 1.1. Jaikin-Zapirain [33, Section 7] computed the conventional representation zeta function of SL2 (R), where R is a compact discrete valuation ring of odd residue characteristic, and observed that it only depends on the residue field cardinality and not on the characteristic or isomorphism type of R itself. The same phenomenon occurs in our setting, for zeta functions associated to induced representations; see [43, Theorem 6.5] and Proposition 6.5 below. Find further examples or, possibly, counter-examples of this phenomenon in the context of induced representations. Give an explanation of the invariance of the zeta function where it holds. Problem 1.2. One of the key invariants of a representation zeta function is its abscissa of convergence. The abscissa of the conventional representation zeta function is explicitly known for FAb compact p-adic Lie groups of small dimension and fully understood for norm-1 groups of p-adic division algebras; see [33, 3, 58] and [38, Theorem 7.1]. However, there is no general interpretation, even at the conjectural level. In our new setting, Propositions 7.1, 7.2 and Theorem 7.3 provide the abscissae of convergence of zeta functions associated to some families of induced representations. Determine the abscissae for further families of induced representations. For instance, consider representations of open compact subgroups of reductive padic groups that are induced from (maximal) parabolic subgroups. Can the results be explained in terms of the root systems? Problem 1.3. The conventional representation zeta functions of SL3 (o) and SU3 (o) over a compact discrete valuation ring o of characteristic 0 display an Ennola-type duality; see [3, 4]. The examples of induced representations in Propositions 7.1 and 7.2 do not suggest a similar form of duality, but form merely the beginning of a comprehensive analysis. 10 STEFFEN KIONKE AND BENJAMIN KLOPSCH Study systematically the zeta functions of induced representations in groups of Type A2 and determine when an Ennola-type duality holds. Find an explanation for this duality. 1.5. Organisation. In Section 2 we recall some standard notions from the representation theory of totally disconnected locally compact groups. Based on suitable refinements, we introduce zeta functions associated to strongly admissible smooth representations. In Section 3 we study the robustness of strong admissibility under the induction functor and introduce in this context the notion of relative FAb-ness. In Section 4 we develop a p-adic formalism to compute the zeta functions of induced representations between uniform pro-p groups. Our main tool is the Kirillov orbit method, with special care taken for p = 2. In Section 5 we establish the rationality of the local factors of globally defined families of induced representations; we also study their abscissae of convergence and prove functional equations. In Section 6 we produce, with surprisingly little effort, instructive examples of zeta functions of induced representations, arising geometrically for groups acting on rooted trees. In Section 7 we give many concrete examples of zeta functions of induced representations of potent pro-p groups. 2. Basic concepts and preliminaries In this section we recall some standard notions from the representation theory of totally disconnected locally compact groups; see [12, 45]. Based on suitable refinements, we introduce zeta functions associated to strongly admissible smooth representations. 2.1. Admissible smooth representations. Let G be a totally disconnected locally compact topological group; for instance, G could be a reductive p-adic group such as G = GLn (Qp ). Observe that G is automatically Hausdorff, as {1} ≤c G. A complex representation of G is given by a homomorphism ̺ : G → GL(V̺ ), where V̺ is a vector space over C. All representations we consider are over C, and we usually drop the specification ‘complex’; compare Section 1.4.2. Depending on the situation, it is convenient to denote a representation of G either by the vector space V̺ acted upon, or by the homomorphism ̺ : G → GL(V̺ ), or by the pair (̺, V̺ ). A vector v ∈ V̺ is said to be smooth with respect to ̺ if its stabiliser StabG (v) = {g ∈ G | ̺(g).v = v} is open in G. The vector subspace V̺∞ = {v ∈ V̺ | v is smooth with respect to ̺} is ̺-invariant and gives rise to a sub-representation ̺∞ = (̺∞ , V̺∞ ). The representation ̺ is said to be smooth if V̺ = V̺∞ ; equivalently, ̺ is smooth if the map G × V̺ → V̺ is continuous when G is equipped with its natural topology and V̺ is equipped with the discrete topology. We recall that the totally disconnected compact topological groups are precisely the profinite groups. The assertions of the following lemma are easy to prove and well known; see [12, Sec. 2.2]. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 11 Lemma 2.1. Let G be a profinite group. (1) Every smooth representation of G is semisimple, i.e., it decomposes as a direct sum of (smooth) irreducible constituents. (2) The smooth irreducible representations of G are precisely the finite dimensional irreducible continuous representations of G; in particular, each of these factors through a finite continuous quotient of G. Remark 2.2. The lemma has the following consequence for a totally disconnected locally compact topological group G. If (̺, V̺ ) is a smooth representation of G and if K ≤o G is a compact open subgroup of G then the restriction ̺|K is semisimple and all its irreducible constituents are finite dimensional. If, in addition, (̺, V̺ ) is irreducible and |G : K| countable then dim V̺ is countable. A typical example of this situation is: G = GLn (Qp ) and K = GLn (Zp ). A smooth representation (̺, V̺ ) of a totally disconnected locally compact topological group G is said to be admissible if for every compact open subgroup K ≤o G the space of fixed vectors V̺K = {v ∈ V̺ | ∀g ∈ K : ̺(g).v = v} has finite dimension. Remark 2.3. According to a classical result in the representation theory of reductive p-adic groups, every smooth irreducible representation of a reductive p-adic group G is admissible; see [53, Ch. II, 2.8]. It is worth noting that this result holds in great generality. Firstly, it applies to irreducible representations over any – not necessarily algebraically closed [10, Prop. 2] – field of characteristic different from p. Secondly, the statement remains valid, when G is the group of rational points of a reductive group over a local field of positive characteristic. In view of Remark 2.2, this provides a wide range of interesting admissible smooth representations of profinite groups, where it is natural to study the multiplicities of irreducible components. 2.2. Polynomially strongly admissible representations. Let G be a profinite group. We denote by Irr(G) the set of (isomorphism classes of) smooth irreducible – i.e. finite dimensional irreducible continuous – representations of G. For simplicity, we usually do not distinguish notationally between representations and isomorphism classes of representations. It is easy to see that a representation (̺, V̺ ) of G is admissible smooth if and only if it decomposes as a direct sum M m(π, ̺) · Vπ , (2.1) V̺ ∼ = π∈Irr(G) where the multiplicity m(π, ̺) of π in ̺ is finite for each π ∈ Irr(G). We say that an admissible smooth representation (̺, V̺ ) of G is strongly admissible if, for every d ∈ N, the number X m(π, ̺) Rd (̺) = π∈Irr(G) dim π≤d 12 STEFFEN KIONKE AND BENJAMIN KLOPSCH of its irreducible constituents of dimension at most d is finite. Furthermore, we define the zeta function of a strongly admissible smooth representation (̺, V̺ ) of G to be the formal Dirichlet series X ζ̺ (s) = m(π, ̺)(dim π)−s , π∈Irr(G) where s denotes a complex variable. Remark 2.4. If G is finitely generated as a profinite group, it is known that G has only finitely many irreducible representations of any given finite dimension if and only if G is FAb, meaning that every open subgroup H ≤o G has finite abelianisation H/[H, H]; compare [7]. Consequently, for a FAb finitely generated profinite group every admissible smooth representation is strongly admissible. We say that (̺, V̺ ) is polynomially strongly admissible if there exists r ∈ R>0 such that Rd (̺) = O(dr ), i.e., if there are r, C ∈ R>0 such that for every d ∈ N, X m(π, ̺) = Rd (̺) ≤ Cdr . π∈Irr(G) dim π≤d Equivalently, (̺, V̺ ) is polynomially strongly admissible if its (polynomial) degree of irreducible constituent growth, defined as deg(̺) = inf{r ∈ R>0 | Rd (̺) = O(dr )} ∈ R≥0 ∪ {∞}, is finite. For a polynomially strongly admissible smooth representation (̺, V̺ ) of G the formal Dirichlet series ζ̺ (s) converges (absolutely) and defines an analytic function on a right half-plane {s ∈ C | Re(s) > α(̺)}, where α(̺) ∈ R ∪ {−∞} denotes the abscissa of convergence. In fact, if ̺ is infinite dimensional then α(̺) = deg(̺). Example 2.5. The profinite group G acts via right translations on the space V = C ∞ (G, C) of all locally constant functions, i.e. continuous functions when C is equipped with the discrete topology, from G to C: (g f )(x) = f (xg) for g ∈ G, f ∈ C ∞ (G, C), x ∈ G. The resulting ‘regular’ representation ̺reg is admissible smooth if G has only finitely many irreducible representations of any given finite dimension. As remarked above, this is for instance the case if G is finitely generated and FAb. In this case the formal Dirichlet series X (dim π)1−s ζ̺reg (s) = π∈Irr(G) is equal to ζG (s − 1), a shift of the conventional representation zeta function ζG (s) of G that enumerates irreducible complex representations of G and has been the sole focus of study until now; compare Section 1. ⋄ ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 13 Finally, we take interest in yet another finiteness condition. An admissible smooth representation ̺ of the profinite group G is said to have bounded multiplicities, if there exists M ∈ N such that m(π, ̺) ≤ M for all π ∈ Irr(G). Remark 2.6. This concept arises naturally in two ways. Firstly, there are prominent examples, such as multiplicity-free representations associated to Gelfand pairs; compare Section 6. Secondly, the abscissa of convergence of the zeta function associated to any smooth representation ̺ of G with bounded multiplicities yields a lower bound for the abscissa of convergence of the conventional representation zeta function of G. Definition 2.7 (Admissibility properties). We refer to the properties of being admissible, strongly admissible, polynomially strongly admissible or having bounded multiplicities collectively as properties of type (A). 2.3. Tensor products and induced representations. Let G be a profinite group. The contragredient representation ̺∨ of a smooth representation ̺ of G is the the smooth part (̺∗ )∞ of the abstract dual representation ̺∗ . The tensor product (̺ ⊗ ϑ, V ⊗C U) of two smooth representations (̺, V ) and (ϑ, U) of G, defined via (̺ ⊗ ϑ)(g).(v ⊗ u) = ̺(g).v ⊗ ϑ(g).u for g ∈ G, v ∈ V , u ∈ U, is a smooth representation of G. By considering the tensor product ̺ ⊗ ̺∨ of an infinite dimensional admissible smooth representation ̺ with its contragredient representation ̺∨ , one sees that admissibility need not be preserved under tensor products. Let H ≤c G be a closed subgroup. The restriction ResG H (ϑ) of a smooth representation ϑ of G is a smooth representation of H, but, clearly, admissibility need not be preserved. Conversely, the induced representation ̺ = IndG H (σ) of a smooth representation (σ, W ) of H is constructed as follows: G acts on V̺ = {f ∈ C ∞ (G, W ) | ∀h ∈ H ∀x ∈ G : f (hx) = σ(h).f (x)} via right translation (̺(g).f )(x) = (g f )(x) = f (xg) for g, x ∈ G, f ∈ V̺ . In calling the representation ‘induced’ rather than ‘co-induced’, we follow [49, I.§2.5] rather than [48, VII.§6]. We note that in the context of profinite groups the notions of induced, compactly induced and co-induced representations are in fact all the same. The next proposition is a consequence of Frobenius reciprocity; compare [12, Sec. 2.4]. Proposition 2.8. Let G be a profinite group and H ≤c G a closed subgroup. If σ is an admissible smooth representation of H, then IndG H (σ) is an admissible smooth representation of G. The induction functor is one of the key tools to construct new representations from known ones and, in particular, interesting infinite dimensional representations from finite dimensional ones. 14 STEFFEN KIONKE AND BENJAMIN KLOPSCH 3. Twist similarity classes and admissibility properties Throughout this section G denotes a profinite group and H ≤c G a closed subgroup. Given an admissible smooth representation (σ, W ) of H, we are keen to study the zeta function ζ̺ attached to the induced representation ̺ = IndG H (σ). With this aim we develop conditions which ensure that ̺ is (polynomially) strongly admissible. Furthermore, we establish that the abscissa of convergence α(̺) of ζ̺ is rather robust: it is, in fact, an invariant of the twist similarity class of σ, defined below. 3.1. Tensor products and twist similarity. Let G be a profinite group. We say that two smooth representations (̺, V ) and (̺′ , V ′ ) of G are twist similar to one another if there are non-zero finite dimensional smooth representations (ϑ, U) and (ϑ′ , U ′ ) and a homomorphism f : V ⊗C U → V ′ ⊗C U ′ of G-representations with finite dimensional kernel and cokernel. Note that, in particular, all finite dimensional smooth representations of G are twist similar to one another. Proposition 3.1. Let ̺, ϑ be a smooth representations of a profinite group G, and suppose that 1 ≤ dim ϑ < ∞. Then ̺ has a property of type (A) if and only if ̺ ⊗ ϑ has the same property. Moreover, if ̺ and ̺ ⊗ ϑ are polynomially strongly admissible then ζ̺ and ζ̺⊗ϑ have the same abscissa of convergence: α(̺) = α(̺ ⊗ ϑ). Proof. Note that each property of type (A) is inherited by sub-representations. Denoting by ϑ∨ the contragredient representation of ϑ acting on Vϑ∨ = Vϑ∨ , we observe that the trivial representation 1G occurs in ϑ ⊗ ϑ∨ . Hence ̺ is a sub-representation of ̺ ⊗ ϑ ⊗ ϑ∨ . Consequently, it suffices to show: (i) if ̺ has a property of type (A) then ̺ ⊗ ϑ has the same property; (ii) if ̺ and ̺ ⊗ ϑ are polynomially strongly admissible then α(̺ ⊗ ϑ) ≤ α(̺). For smooth irreducible representations σ, π ∈ Irr(G), we recall that HomG (Vπ ⊗C Vϑ , Vσ ) ∼ = HomG (Vπ , , Vϑ∨ ⊗C Vσ ) = HomG (Vπ , Hom(Vϑ , Vσ )) ∼ as C-vector spaces. Taking dimensions, we deduce from Schur’s lemma that the multiplicity of σ in π ⊗ ϑ and the multiplicity of π in σ ⊗ ϑ∨ are the same: (3.1) m(σ, π ⊗ ϑ) = m(π, σ ⊗ ϑ∨ ). Fix σ ∈ Irr(G) and, for π ∈ Irr(G), write π | σ ⊗ ϑ∨ to indicate that π is a constituent of σ ⊗ ϑ∨ , equivalently, that m(π, σ ⊗ ϑ∨ ) > 0 . If ̺ is admissible, then (2.1) and (3.1) yield: X X m(π, ̺) m(σ, π ⊗ ϑ). (3.2) m(σ, ̺ ⊗ ϑ) = m(π, ̺) m(σ, π ⊗ ϑ) = π∈Irr(G) σ|π⊗ϑ π∈Irr(G) π|σ⊗ϑ∨ Since σ ⊗ ϑ∨ and all π ⊗ ϑ are finite dimensional, this shows: if ̺ is admissible (respectively strongly admissible) then ̺⊗ϑ is admissible (respectively strongly admissible). ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 15 For all σ, π ∈ Irr(G) with σ | π ⊗ ϑ we infer from (3.1) that (3.3) dim σ ≤ (dim π)(dim ϑ) and dim π ≤ (dim σ)(dim ϑ). If ̺ has multiplicities bounded by M, then (3.2), (3.1) and the first inequality in (3.3) yield X m(π, ̺) m(σ, π ⊗ ϑ) m(σ, ̺ ⊗ ϑ) = π∈Irr(G) π|σ⊗ϑ∨ ≤M X m(π, σ ⊗ ϑ∨ )(dim π) π∈Irr(G) π|σ⊗ϑ∨ dim ϑ dim σ ≤ M(dim ϑ)2 , so that ̺ ⊗ ϑ has multiplicities bounded by M(dim ϑ)2 . Finally, suppose that ̺ is polynomially strongly admissible, so that ζ̺ (s) converges absolutely for Re(s) > α(̺). Without loss of generality we may assume that ̺ is infinite dimensional and consequently α(̺) ≥ 0. For all real s > α(̺), we use (3.2) and the second inequality in (3.3) to obtain X ζ̺⊗ϑ (s) = m(σ, ̺ ⊗ ϑ)(dim σ)−s σ∈Irr(G) = X m(π, ̺) X m(π, ̺) X m(π, ̺) π∈Irr(G) ≤ π∈Irr(G) m(σ, π ⊗ ϑ)(dim σ)−s X m(σ, π ⊗ ϑ)(dim σ) σ∈Irr(G) σ|π⊗ϑ π∈Irr(G) = X σ∈Irr(G) σ|π⊗ϑ (dim ϑ)s+1 (dim π)s+1 (dim ϑ)s+2 (dim π)s = (dim ϑ)s+2 ζ̺ (s). Consequently, ̺ ⊗ ϑ is polynomially admissible and α(̺ ⊗ ϑ) ≤ α(̺).  Corollary 3.2. Let ̺ be a smooth representation of a profinite group G. The properties of type (A) that hold for ̺ are common properties of the twist similarity class of ̺. If ̺ is polynomially strongly admissible, then also the abscissa of convergence α(̺) is an invariant of the twist similarity class of ̺. 3.2. Induction and restriction of smooth representations. Let H ≤c G be a closed subgroup of a profinite group G. Clearly, the restriction functor ResG H preserves twist similarity classes. Hence, for any smooth representation ̺ of G, the properties of type (A) of ResG H (̺) only depend on the twist similarity class of ̺. The next proposition shows that this conclusion also holds for the induction functor. 16 STEFFEN KIONKE AND BENJAMIN KLOPSCH Proposition 3.3. Let H ≤c G be a closed subgroup of the profinite group G, and let σ, σ ′ be twist similar non-zero smooth representations of H. If IndG H (σ) ′ has a property of type (A) then IndG (σ ) has the same property. H Furthermore, if IndG (σ) is polynomially strongly admissible then the abscissa H G of convergence α(IndH (σ)) depends on σ only up to twist similarity. Proof. Properties of type (A) are inherited by sub-representations. Hence, by an argument similar to the one starting the proof of Proposition 3.1, it suffices to consider the special cases (i) σ ′ = σ ⊗ τ and (ii) σ ′ = σ ⊕ τ for a finite dimensional smooth representation τ of H; furthermore, it is enough to show that, if IndG H (σ) is polynomially strongly admissible in these cases, then G ′ α(IndH (σ )) ≤ α(IndG H (σ)). First suppose that σ ′ = σ ⊗ τ . We choose a finite dimensional smooth representation ϑ of G such that τ injects into the restriction ResG H (ϑ). Then G G G G G ′ ∼ IndH (σ ) = IndH (σ ⊗ τ ) injects into IndH (σ ⊗ ResH (ϑ)) = IndH (σ) ⊗ ϑ, and Proposition 3.1 implies that, if IndG H (σ) has a property of type (A), then G IndH (σ ⊗ τ ) has the same property. Furthermore, if IndG H (σ) is polynomially G G ′ strongly admissible then α(IndH (σ )) ≤ α(IndH (σ) ⊗ ϑ) = α(IndG H (σ)). Now suppose that σ ′ = σ ⊕ τ . Choose a smooth irreducible constituent π of σ and observe that τ is a sub-representation of σ ⊗ π ∨ ⊗ τ . If IndG H (σ) has a property of type (A) then, by the argument above, the same property holds for G ∨ IndG H (σ ⊗ π ⊗ τ ) and hence for the sub-representation IndH (τ ). Furthermore, if IndG H (σ) is polynomially strongly admissible then we obtain G G G G ′ α(IndG H (σ )) = α(IndH (σ) ⊕ IndH (τ )) = max{α(IndH (σ)), α(IndH (τ ))} G G ∨ ≤ max{α(IndG H (σ)), α(IndH (σ ⊗ π ⊗ τ ))} = α(IndH (σ)).  The following result generalises [39, Cor. 2.3]. Proposition 3.4. Let H ≤o G be an open subgroup of the profinite group G. G The functors IndG H and ResH preserve all the properties of type (A). In addition, the functors preserve the abscissa of convergence for polynomially strongly admissible representations. Proof. We only discuss the polynomially strongly admissible case; the other properties follow from similar arguments based on Frobenius reciprocity. Let σ ∈ Irr(H) and π ∈ Irr(G) be smooth irreducible representations of H G and G respectively. If π occurs in IndG H (σ), or equivalently σ occurs in ResH (π), then dim σ ≤ dim π ≤ |G : H| dim σ. For all s ∈ R≥0 this yields the inequalities X m(π̃, IndG (σ)) 1 |G : H| H (3.4) ≤ ≤ , s s (|G : H| dim σ) (dim π̃) (dim σ)s π̃∈Irr(G) (3.5) X m(σ̃, ResG (π)) 1 |G : H|s+1 H ≤ ≤ (dim π)s (dim σ̃)s (dim π)s σ̃∈Irr(H) ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 17 Let ϑ be a polynomially strongly admissible representation of H. If ϑ is finite dimensional so is IndG H (ϑ), and there is nothing further to show. Suppose that ϑ has infinite dimension so that α(ϑ) ≥ 0. Using (3.4), we deduce that |G : H|−s ζϑ (s) ≤ ζIndGH (ϑ) (s) ≤ |G : H| ζϑ (s) for all s ∈ R≥0 so that α(ϑ) = α(IndG H (ϑ)). Similarly, the claim for the restriction functor follows from (3.5).  Example 3.5. While induction from and restriction to an open subgroup preserve properties of type (A), these functors can substantially alter algebraic properties of the associated zeta functions. Therefore our rationality results for zeta functions of induced representations of potent pro-p groups in Section 5 (compare Remark 5.2) do not automatically extend to general compact p-adic Lie groups; it remains an open problem to generalise the results of JaikinZapirain [33]. To illustrate the underlying issue we construct, for every prime p, a compact p-adic Lie group G, an open uniformly powerful pro-p subgroup H ≤o G of index 2 and a polynomially strongly admissible representation ̺ of G such that ζResGH (̺) (s) is a rational function in Q(p−s ), whereas ζ̺ (s) cannot be expressed as a rational function in Q({n−s | n ∈ N}). Let U be a uniformly powerful pro-p group which has an irreducible representation ηn of degree pn for every integer n ≥ 0. For instance, take U to be the 3-dimensional p-adic Heisenberg group. Define H = U × Zp and G = H ⋊ C2 , where the generator τ of C2 acts as the identity on U and by inversion on Zp . Fix a 1-dimensional irreducible representation χ of Zp such that χ(−t) 6= χ(t) for some t ∈ Zp . Consider the irreducible pn -dimensional representations πn = ηn ⊗ 1 and σn = ηn ⊗ χ of H. Observe that the representation πn is τ -invariant, thus πn extends to an irreducible representation αn of G. However, the construction gives σn 6= σnτ and thus yields an irreducible representation βn of G of degree τ 2pn such that ResG H (βn ) = σn ⊕ σn . Choose a sequence (mn )n∈N ∈ {0, 1}N which is not eventually periodic. The smooth representation ̺= ∞ M 2(1 − mn )αn ⊕ n=0 ∞ M mn βn n=0 of G is polynomially strongly admissible. By construction, we have ResG H (̺) = ∞ M 2(1 − mn )πn ⊕ n=0 n=0 and a short calculation yields ζResGH (̺) (s) = ∞ M ∞ X n=0 2p−ns = mn σn ⊕ ∞ M n=0 2 . 1 − p−s mn σnτ , 18 STEFFEN KIONKE AND BENJAMIN KLOPSCH However, the Dirichlet series defining the zeta function of the representation ̺ converges at 1 and evaluates to ∞ ∞ X 2 3X −n n −1 ζ̺ (1) = (2 − 2mn )p + mn (2p ) = mn p−n . − −1 1−p 2 n=0 n=0 P∞ The sequence (mn )n∈N was chosen so that the number n=0 mn p−n is irrational, and we conclude that ζ̺ (s) cannot be expressed by as a rational function in {n−s | n ∈ N} with coefficients in Q. 3.3. Strong admissibility of induced representations. Let H ≤c G be a closed subgroup of a profinite group G. As recorded in Proposition 2.8, the functor IndG H preserves admissibility. However, strong admissibility is in general not preserved by induction. For example, the regular representation of a finitely generated profinite group G is strongly admissible if and only if G is FAb. The latter means that every open subgroup K ≤o G has finite abelianisation; see Section 2. We introduce a relative FAb-condition to deal with induced representations in general. Definition 3.6. We say that G is FAb relative to H if for every open subgroup K ≤o G the abelian quotient K/(H ∩ K)[K, K] is finite. Remark 3.7. (a) Note that G is FAb if and only if it is FAb relative to the trivial subgroup. In general, G is FAb relative to a closed normal subgroup N Ec G exactly if the group G/N is FAb. (b) The group G is FAb relative to H if and only if for every open normal subgroup K Eo G the index of H[K, K] in G is finite. (c) Suppose that H1 ≤c H2 ≤c G are closed subgroups of G. Obviously, if G is FAb relative to H1 then G is FAb relative to H2 . The converse holds if H1 is open in H2 , because |H2 [K, K] : H1 [K, K]| ≤ |H2 : H1 | for every K Eo G. Theorem 3.8. Let H ≤c G be a closed subgroup of a finitely generated profinite group G. The following statements are equivalent. (a) The group G is FAb relative to H. (b) The functor IndG H preserves strong admissibility. (c) The induced representation IndG H (1H ) is strongly admissible. Proof. In order to prove that (c) implies (b), we suppose that IndG H (1H ) is strongly admissible. All finite dimensional smooth representations of H are twist similar to one another, thus Proposition 3.3 shows that IndG H (σ) is strongly admissible for every finite dimensional smooth representation σ of H. Let ϑ be any strongly admissible representation of H. For every d ∈ N we obtain X (ϑ)) = m(σ, ϑ)Rd (IndG Rd (IndG H (σ)) < ∞, H σ∈Irr(H) because ϑ and IndG H (σ) are implies Rd (IndG (σ)) = 0. H strongly admissible and, furthermore, dim(σ) > d We prove that (b) implies (a) by contraposition. Suppose that G is not FAb relative to H. Take an open normal K Eo G such that for L = (H ∩ K)[K, K] ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 19 the abelian quotient K/L is infinite. The representation IndK L (1L ) is infinite dimensional and decomposes into 1-dimensional representations of K, each occurring with multiplicity 1. In particular, using the embedding IndK L (1L ) ֒→ K K IndH∩K (1H∩K ), we conclude that IndH∩K (1H∩K ) contains an infinite number of distinct 1-dimensional representations. For the finite dimensional represenG G tation σ = IndH K∩H (1K∩H ), we conclude that IndH (σ) = IndH∩K (1H∩K ) is not strongly admissible as it contains infinitely many irreducible constituents of dimension at most |G : K|. Finally, we prove that (a) implies (c), again by contraposition. Suppose that IndG H (1H ) is not strongly admissible. We find a positive integer d and an infinite sequence (πi , Vi )∞ i=1 of distinct d-dimensional smooth irreducible representations of G which occur in IndG H (1H ). For every i ∈ N there is a non-zero vector vi in the space Vi which is fixed by H. Setting Ni = ker(πi ), we observe that G/Ni is a finite subgroup of GLd (C). By a classical theorem of Jordan (see [15, (36.13)] or [19, Thm. 5.7]) there exist m = m(d) ∈ N and open normal subgroups Ai Eo G of index at most m so that Ni ⊆ Ai and Ai /Ni is abelian for all i ∈ N. As G is finitely generated, it contains only a finite number of open subgroups of index at most m. Hence we find A Eo G such that I = {i ∈ N | A = Ai } is infinite. For each i ∈ I the stabiliser of vi in G contains the group H[A, A]. Therefore the distinct irreducible representations (πi )i∈I all occur in the induced representation IndG H[A,A] (1H[A,A] ). In particular, this representation is not finite dimensional and the index of |G : H[A, A]| is infinite. We conclude that G is not FAb relative to H.  3.4. Polynomially strong admissibility and compact p-adic Lie groups. A profinite group G has polynomial representation growth, as defined in [38], if and only if the regular representation of G is polynomially strongly admissible; see Example 2.5. As yet no simple characterisation of profinite groups of polynomial representation growth is known, not even at a conjectural level. The regular representation is obtained by inducing the trivial representation from the trivial subgroup; on that account we formulate the following more general problem. Problem 3.9. Under what conditions on H ≤c G does the induction functor IndG H preserve polynomially strong admissibility? The next result and its proof generalise [39, Prop. 2.7]. Let p be a prime. We refer to [20] for the relevant structure theory of compact p-adic analytic groups. Proposition 3.10. Let H ≤c G be a closed subgroup of a compact p-adic Lie group G. If G is FAb relative to H then IndG H (σ) is polynomially strongly admissible for every finite dimensional smooth representation σ of H. Proof. We may assume that H and G are uniformly powerful pro-p groups and that σ = 1H is the trivial representation. Indeed, there are open uniformly powerful pro-p subgroups H ∗ ≤o H and G∗ ≤o G such that H ∗ ≤ G∗ . By Proposition 3.3, it suffices to consider σ = IndH H ∗ (1H ∗ ), thus we may assume 20 STEFFEN KIONKE AND BENJAMIN KLOPSCH that H = H ∗ and σ = 1H . By Proposition 3.4, we may assume further that G = G∗ . Clearly, the property of being relatively FAb is also inherited. Let g = log(G) and h = log(H) denote the powerful Zp -Lie lattices associated to G and H. The lower p-series of G, given by G1 = G and Gn = n−1 (Gn−1 )p [Gn−1 , G] for n ≥ 2, satisfies Gn = Gp = exp(pn−1 g) for all n ∈ N. Since G is FAb relative to H, we find r ∈ N0 such that Gr+1 ⊆ H[G, G]. Observe that [G, G] is powerfully embedded in G, hence H[G, G] is uniformly powerful and log(H[G, G]) = h + [g, g]. This yields pr g ⊆ h + [g, g]. For n ∈ N this implies that p2n+r g ⊆ h+[pn g, pn g], equivalently G2n+r+1 ⊆ H[Gn+1 , Gn+1 ], using again that [Gn+1 , Gn+1] is powerfully embedded in G. For n ∈ N let ψn denote the G-sub-representation of IndG H (1H ) spanned by all n irreducible sub-representations of dimension at most p . Let (η, Vη ) ∈ Irr(G) be an irreducible constituent of ψn . As G is monomial, there are an open subgroup K ≤o G and a linear character χ : K → C× such that η = IndG K (χ). Note that n |G : K| = dim η ≤ pn and so Gn+1 = Gp ⊆ K. The commutator group [Gn+1 , Gn+1 ] lies in the kernel of η and so every Hfixed vector in Vη is also fixed by [Gn+1 , Gn+1 ]. We conclude that η occurs in IndG H[Gn+1 ,Gn+1 ] (1H ) with the same multiplicity as in ψn . Denoting by isog (h) = g ∩ (Qp ⊗Zp h) the isolator of h in g (compare [25, §3]), we obtain in total Rpn (IndG H (σ)) ≤ dim ψn ≤ |G : HG2n+r+1 | = |g : h + p2n+r g| ≤ Cp2(dim(G)−dim(H))n , where C = pr(dim(G)−dim(H)) |isog (h) : h| ∈ R>0 is independent of n.  4. Induced representations of potent pro-p groups via the orbit method Throughout this section p denotes a prime. Every p-adic Lie group contains a compact open pro-p group that is uniformly powerful; we refer to [20] for the general theory of p-adic analytic groups. A pro-p group G is called potent if [G, G] ⊆ G4 for p = 2 and γp−1 (G) ⊆ Gp for p > 2; there is an analogous definition for Zp -Lie lattices. Finitely generated torsion-free potent pro-p groups are a natural generalisation of uniformly powerful pro-p groups, and for all such groups the Kirillov orbit method provides a powerful tool for handling the characters of smooth irreducible representations; see [24, 23]. In this section we describe the representation zeta functions of induced representations for finitely generated torsion-free potent pro-p groups generalising the approach used, for instance, in [2, 3, 4]. There is a bijective correspondence between isomorphism classes of smooth irreducible representations of a profinite group G and the corresponding irreducible complex characters. We will interpret elements of Irr(G) in a flexible way as isomorphism classes of representations or characters, as befits the situation. 4.1. Potent pro-p groups. Let G be a finitely generated torsion-free potent pro-p group. Then G is saturable (in the sense of Lazard) and we denote by ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 21 g = log(G) the associated potent Zp -Lie lattice; compare [34, 22]. We make repeatedly use of the following basic lemma. Lemma 4.1. Let G be a finitely generated torsion-free potent pro-p group with associated potent Zp -Lie lattice g. Then the logarithm map log : G → g transforms the multiplicative Haar measure on G to the additive Haar measure on g. Proof. It suffices to verify that the measures of cosets of open subgroups forming a base of neighbourhoods of 1 in G are preserved under the logarithm map. This follows from the fact that the multiplicative cosets xN of any open powerfully embedded normal subgroup N Eo G are mapped to the additive cosets log(x)+n of the associated Zp -Lie sublattice n ≤ g; see the argument in [20, Cor. 6.38] or [22, Lem. 4.4].  The adjoint action of G on g is related to conjugation in G via g X = log(g exp(X)g −1) for g ∈ G and X ∈ g. We fix an isomorphism (4.1) Qp /Zp → µp∞ (C), a = a + Zp 7→ aC, −m for m ∈ N. In this way the for instance, by decreeing that p−m C = e2πip Pontryagin dual of the additive compact group g can be realised as g∨ = g∨Zp = Hom(g, Qp /Zp ). We denote the neutral element of g∨ , i.e. the zero map, by 0. The co-adjoint action of G on g∨ is given by −1 (g ω)(X) = ω(g X) for g ∈ G, ω ∈ g∨ and X ∈ g. At the level of Lie lattices there is a corresponding co-adjoint action of g on g∨ given by (Y.ω)(X) = ω([X, Y ]) for X, Y ∈ g and ω ∈ g∨ . The Kirillov orbit method for p-adic analytic pro-p groups yields a bijective correspondence G\g∨ → Irr(G), G.ω 7→ χω between the collection G\g∨ = {G.ω | ω ∈ g∨ } of co-adjoint orbits and the set Irr(G) of irreducible complex characters of G. If p is odd, the correspondence is canonical and can be made explicit via the formula X 1 (4.2) χω (x) = |G.ω|− /2 ω e (log(x))C for ω ∈ g∨ and x ∈ G, ω e ∈G.ω where we make use of the isomorphism (4.1); see [23]. If p = 2, the expression (4.2) for χω (x) remains valid whenever x lies in the open subgroup G2 , but does not hold in general; see [33, Thm. 2.12]. For ω ∈ g∨ we write πω for a representation of G affording χω so that dim πω = χω (1) = |G.ω| /2 = |G : StabG (ω)| /2 . 1 1 There is a useful Lie-theoretic description of the stabiliser StabG (ω). The stabiliser of ω in g under the co-adjoint action is stabg (ω) = {Y ∈ g | Y.ω = 0}, 22 STEFFEN KIONKE AND BENJAMIN KLOPSCH which can also be interpreted as the radical of an alternating bilinear form associated to ω. It is a fact that log(StabG (ω)) = stabg (ω) (see [33, Lem. 2.3]) and hence |G : StabG (ω)| = |g : stabg (ω)|. Now consider a (finitely generated torsion-free) potent subgroup H ≤c G and its associated potent Zp -Lie lattice h ≤ g. The inclusion map igh : h → g induces a surjective restriction map rhg : g∨ → h∨ . For η ∈ h∨ we consider the rhg -fibres over elements of the co-adjoint orbit H.η. For ω ∈ g∨ we define the intersection number in(ω, η) = |G.ω ∩ (rhg )−1 (H.η)|. With this terminology we obtain the following application of the Kirillov orbit method to induced representations for all odd primes. Proposition 4.2. Suppose that p > 2. Let G be a finitely generated torisonfree potent pro-p group, with associated Zp -Lie lattice g, and H ≤c G a potent subgroup, with associated Zp -Lie lattice h. Let ω ∈ g∨ and η ∈ h∨ . Then the multiplicity of πω in the induced representation IndG H (πη ) is given by the formula  m πω , IndG (π ) = η H in(ω, η) . |G.ω|1/2 |H.η|1/2 Proof. Frobenius reciprocity, Lemma 4.1 and the orthogonality relations for irreducible characters of h yield  G m πω , IndG H (πη ) = hχω , IndH (χη )i = hResG H (χω ), χη i Z = χω (y)χη (y) dµH (y) H = |G.ω| −1/2 |H.η| −1/2 X X Z ω e ∈G.ω ηe∈H.η = |G.ω|− /2 |H.η|− /2 in(ω, η). 1 1 h ω e (Y )C ηe(Y )C dµh (Y )  We now specialise to the situation where we induce the trivial representation 1H from a subgroup H to G. We stress that the next result is valid also for p = 2. Proposition 4.3. Let G be a finitely generated torsion-free potent pro-p group, with associated Zp -Lie lattice g, and H ≤c G a potent subgroup, with associated Zp -Lie lattice h. The zeta function of ̺ = IndG H (1H ) is given by ζ̺ (s) = X ω∈g∨ rhg (ω)=0 |g : stabg (ω)| /2 1 −1−s . ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 23 Proof. First suppose that p is an odd prime. Applying Proposition 4.2 to η = 0, hence πη = π0 = 1H and H.η = {0}, this is a simple computation: X  −s/2 |G.ω|−1 m πω , IndG ζ̺ (s) = H (π0 ) |G.ω| ω∈g∨ (4.3) X |G.ω ∩ (rhg )−1 ({0})| −1−s 1 = |G.ω| /2 |G.ω| ω∈g∨ X −1−s 1 |g : stabg (ω)| /2 . = ω∈g∨ rhg (ω)=0 Now suppose that p = 2. In this case the Kirillov orbit method involves a choice, which makes it difficult to establish a possible analogue of Proposition 4.2. However, we obtain a canonical correspondence by considering suitable equivalence classes of irreducible characters. We say that ϑ, ϑe ∈ Irr(G) are G2 -equivalent if they restrict to the same character on G2 , i.e., ϑ|G2 = ϑe|G2 . Denote by Z the group of linear characters of G that factor through the elementary abelian quotient G/G2 . The group Z acts on Irr(G) by multiplication and, as G/G2 is abelian, the G2 -equivalence classes are exactly the Z-orbits in Irr(G). For ω ∈ g∨ let ξω denote the sum of all ϑ ∈ Irr(G) that are G2 -equivalent to χω , i.e. the character associated to the G2 -equivalence class of χω , and let σω denote a representation affording ξω . For ω1 , ω2 ∈ g∨ the characters χω1 and χω2 are G2 -equivalent if and only if there are g ∈ G and τ ∈ Z such that g ω1 τ = ω2 , equivalently if ω1 , ω2 lie in the same orbit under the indicated action of the direct product G × Z on g∨ . As explained in [33], the Kirillov orbit method yields a bijective correspondence (G × Z).ω 7→ ξω between the (G×Z)-orbits in g∨ and the characters associated to G2 -equivalence classes in Irr(G). Moreover, the formula X 1 ω e (log(x))C ξω (x) = |G.ω|− /2 ω e ∈(G×Z).ω holds for all x ∈ G. Indeed, both functions are Z-invariant and hence vanish on G r G2 ; furthermore, by (4.2) the functions agree on G2 . Since all characters in a G2 -equivalence class have the same degree, a slight modification of the argument in (4.3) suffices to complete the proof: replace the terms |G.ω|−1, πω and |G.ω∩(rhg )−1 ({0})| |G.ω| by |(G ×Z).ω|−1, σω and |(G×Z).ω∩(rhg )−1 ({0})| |(G×Z).ω| respectively.  4.2. o-Lie lattices. Let o be a compact discrete valuation ring of characteristic 0, residue characteristic p and residue field cardinality q. Fix a uniformiser π so that the valuation ideal of o takes the form p = πo. Let f denote the fraction field of o, a finite extension of Qp . We denote by e(f, Qp ) the absolute ramification index of f. 24 STEFFEN KIONKE AND BENJAMIN KLOPSCH Let g be an o-Lie lattice. We take interest in the family of finitely generated torsion-free potent pro-p groups G that arise as G = exp(π r g) for all sufficiently large r ∈ N0 . The codifferent of f over Qp is the fractional ideal {x ∈ f | ∀y ∈ o : Trf|Qp (xy) ∈ Zp }. It lies in the kernel of the non-trivial character Trf|Qp ∼ = → µp∞ (C) f −−−→ Qp → Qp /Zp − of the additive group f. The different Df|Qp is the inverse of the codifferent and thus an ideal of o, say pδ , where δ = δ(f) ∈ N0 satisfies δ ≥ e(f, Qp ) − 1 with equality if and only if e(f, Qp ) is prime to p. Using [π −δ ·] : f → f, a 7→ π −δ a, we obtain a map Homo (g, f) → Hom(g, Qp ), ψ 7→ Trf|Qp ◦ [π −δ ·] ◦ ψ that induces a non-canonical isomorphism ∼ = g∨ = g∨o = Homo (g, f/o) − → Hom(g, Qp /Zp ). Consider ω ∈ g∨ and choose w ∈ Homo (g, f) such that ω(X) = w(X) + o for X ∈ g. The alternating o-bilinear form Aw : g × g → f, Aw (X, Y ) = w([X, Y ]) induces the alternating o-bilinear form Aω : g × g → f/o, Aω (X, Y ) = ω([X, Y ]) = Aw (X, Y ) + o. The o-submodule stabg (ω) is equal to the radical of Aω , which can be described in terms of Aw as rad(Aω ) = {Y ∈ g | ∀X ∈ g : Aw (X, Y ) ∈ o}, and the index |g : stabg (ω)| can be expressed in terms of the invariant factors of the o-submodule rad(Aω ) of g. The latter are closely related to the Pfaffians of the alternating o-bilinear form Aw , which are defined as follows. Let n = dimo g. For 0 ≤ k ≤ ⌊n/2⌋, the degree-k Pfaffian of Aw is the fractional ideal Pfaff k (w) of f generated by the elements k q X Y ” 1 “ sgn(σ) Aw (Y(2j−1)σ , Y(2j)σ ) = det (Aw (Yi , Yj )1≤i,j≤2k ) , k 2 k! j=1 σ∈Sym(2k) where Y1 , . . . , Y2k run through spanning sets of o-submodules of dimension 2k in g. As indicated the elements generating the degree-k Pfaffian can be regarded as square roots of suitable determinants (up to an irrelevant choice of sign). If Y = (Y1 , . . . , Yn ) is any o-basis of g, then the structure matrix [Aw ]Y ∈ Matn (f) of Aw with respect to Y is alternating. Furthermore, its elementary divisors π ν1 (w) , . . . , π νn (w) , where ν1 (w), . . . , νn (w) ∈ Z ∪ {∞} with ν1 (w) ≤ . . . ≤ νn (w), come in pairs: ν2j−1 (w) = ν2j (w) for 1 ≤ j ≤ ⌊n/2⌋. Finally, we see that Pk Pfaff k (w) = p j=1 ν2j−1 (w) for 1 ≤ k ≤ ⌊n/2⌋, ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS and this leads to 1 |g : stabg (ω)| /2 = q 2 1 Pn i=1 max{−νi (w),0} = [ {Pfaff k (w) | 0 ≤ k ≤ ⌊n/2⌋} 25 p , where kSkp = max{|x|p | x ∈ S} for ∅ 6= S ⊆ f. As a consequence of Propositions 3.10 and 4.3 we obtain the following result. Proposition 4.4. Let g be an o-Lie lattice with an o-Lie sublattice h such that |g : h + [g, g]| < ∞. Write m + 1 = dimo g − dimo h. Let r ∈ N0 be such that G = exp(π r g) is a finitely generated torsion-free potent pro-p group with potent subgroup H = exp(π r h) ≤c G. Then G is FAb relative to H and the zeta function of ̺ = IndG H (1H ) is given by the following integral formulae. (1) Writing W = {w ∈ Homo (g, f) | w(h) ⊆ o}, we have Z [ −1−s r(m+1) {Pfaff k (w) | 0 ≤ k ≤ ⌊n/2⌋} dµ(w), ζ̺ (s) = q p w∈W where µ denotes the normalised Haar measure satisfying µ(Homo (g, o)) = 1 (2) For simplicity, suppose further that the o-module g decomposes as a direct sum g = k⊕h. Interpreting Homo (k, o) as the o-points V(o) of m+1-dimensional affine space V over Spec(o), let X denote the projectivisation PV over Spec(o). For 0 ≤ k ≤ ⌊n/2⌋, the map w 7→ Pfaff k (w) induces a sheaf of ideals Ik on X, and −1−s  Z X kℓ −ℓ(m+1) −1 r(m+1) max π Ik p dµX,p , q ζ̺ (s) = (1 − q )q ℓ∈Z X(o) 0≤k≤⌊n/2⌋ where the suggestive notation kπ kℓ Ik kp is employed in anticipation of a formal definition in (5.2) and µX,p denotes the canonical p-adic measure on X(o); see Remark 5.4. Proof. From |g : h + [g, g]| < ∞ we infer that |G : H[G, G]| < ∞ so that G is FAb relative to H. In the described set-up the formula for ζ̺ provided by Proposition 4.3 translates directly into the first integral formula. To derive the second formula write Homo (k, f) r {0} as a disjoint union of the sets π ℓ Homo (k, o) r π ℓ+1 Homo (k, R o) and recall that the canonical p-adic measure µX,p is normalised so that X(o) dµX,p = q −m |X(o/p)| = (1 − q −m−1 )/(1 − q −1 ) where we use that X is the projective m-dimensional space.  Remark 4.5. By definition Pfaff 0 (w) = o is the degree-0 Pfaffian of any form w ∈ Homo (g, f). This means, that the ideal sheaf I0 is the structure sheaf OX of X. In addition, the assumption |g : h + [g, g]| < ∞ implies that the image prk ([g, g]) of the projection of [g, g] to the complement k is of finite index; i.e., π ε k ⊆ prk ([g, g]) for some non-negative integer ε ∈ Z. Since Pfaff 1 (w) = w(prk ([g, g])) ⊇ π ε w(k), we deduce that the ideal sheaf I1 contains π ε OX . Next we formulate the two integral formulae more explicitly, subject to a choice of coordinates. For simplicity, we suppose that the o-module g decomposes as a direct sum g = k ⊕ h. Fix an o-basis Y = (Y1 , . . . , Yn ) of g such that 26 STEFFEN KIONKE AND BENJAMIN KLOPSCH Y1 , . . . , Ym+1 span the complement k of h in g and Ym+2 , . . . , Yn span h. Denoting by (ci,j,k )i,j,k the structure constants of the o-Lie lattice g with respect to P the basis Y, we have [Yi , Yj ] = nk=1 ci,j,k Yk for 1 ≤ i, j ≤ n. The commutator matrix of g with respect to Y is the alternating matrix of linear homogeneous forms   Xn ci,j,k Tk ∈ Matn (o[T1 , . . . , Tn ]). R(T) = R(T1 , . . . , Tn ) = k=1 i,j {0, . . . , ⌊n/2⌋} For k ∈ we denote by Pk ⊆ o[T1 , . . . , Tn ] the collection of degree-k Pfaffians of the matrix R(T), i.e. square roots of principal 2k × 2k-minors of R(T); in particular, P0 = {1}. Furthermore, we set Fk = {f (T1 , . . . , Tm+1 , 0, . . . , 0) | f ∈ Pk } ⊆ o[T1 , . . . , Tm+1 ] and Fk (x) = {f (x) | f ∈ Fk } for x ∈ fm+1 . Observe that Fk consists of homogeneous polynomials of degree k so that for f ∈ Fk and (y1 : . . . : ym+1 ) ∈ Pm (o) the value f (y1 , . . . , ym+1 ) is independent of the particular choice of homogeneous coordinates up to a unit in o. With this notational set-up, we obtain the following concrete version of Proposition 4.4, based on a choice of coordinates. Proposition 4.6. Let g be an o-Lie lattice with an o-Lie sublattice h such that |g : h + [g, g]| < ∞. Suppose that the o-module g decomposes as a direct sum g = k ⊕ h, and put m + 1 = dimo k = dimo g − dimo h. Let Y = (Y1 , . . . , Yn ) be an o-basis of g such that Y1 , . . . , Ym+1 (respectively Ym+2 , . . . , Yn ) form an o-basis of k (respectively h), and let Fk , depending on Y, be defined as above. Let r ∈ N0 such that G = exp(π r g) is a finitely generated torsion-free potent pro-p group with potent subgroup H = exp(π r h) ≤c G. Then G is FAb relative to H and the zeta function of ̺ = IndG H (1H ) is given by the following formulae: Z [ −1−s {Fk (x) | 0 ≤ k ≤ ⌊n/2⌋} ζ̺ (s) = q r(m+1) dµ(x), p fm+1 where µ denotes the normalised Haar measure satisfying µ(om+1 ) = 1, and −1−s  Z X −1 r(m+1) −ℓ(m+1) kℓ dµPm ,p (y), max ζ̺ (s) = (1−q )q q π Fk (y) p ℓ∈Z Pm (o) 0≤k≤⌊n/2⌋ where µPm ,p denotes the canonical p-adic measure on Pm (o); see Remark 5.4. Examples based on this concrete formula are discussed in Section 7 below. 5. A Denef-type formula for globally induced representations Let K0 be a number field with ring of integers OK0 , and fix a finite set of closed points S ⊆ Spec(OK0 ). Let OK0 ,S = {a ∈ K0 | |a|p ≤ 1 for closed points p 6∈ S} denote the ring of S-integers in K0 . We consider number fields K that arise as finite extensions of K0 . Let OS = OK,S denote the integral closure of OK0 ,S in K. For a maximal ideal p E OS we write κp = OS /p for the residue field and we denote its cardinality by qp . ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 27 Furthermore, Op = OK,S,p denotes the completion of OS with respect to p and we fix a uniformiser πp so that Op has the valuation ideal πp Op. OK ⊆ OS = OK,S ⊆ K | | | OK0 ⊆ OK0 ,S ⊆ K0 Op = OK,S,p D πp Op κp ∼ = Op /πp Op ∼ = OS /p qp = |κp | Let g be an OK0,S -Lie lattice. For every finite extension K of K0 and every maximal ideal p E OS we consider the Op -Lie lattice gp = Op ⊗OK0 ,S g and, for r ∈ N0 , its principal congruence sublattices gp,r = πpr gp . Observe that, for any given K and p, the Lie lattice gp,r is potent for all sufficiently large integers r so that Gp,r = exp(gp,r ) is a finitely generated torsion-free potent pro-p group; we say that such r are permissible for gp . With these preparations we formulate the main result of this section. Theorem 5.1. As in the set-up described above, let g be an OK0,S -Lie lattice with an OK0 ,S -Lie sublattice h such that |g : h + [g, g]| < ∞. Suppose that h is a direct summand as a submodule of the OK0 ,S -module g, and put m + 1 = dimOK0 ,S g − dimOK0 ,S h. For closed points p ∈ Spec(OK,S ), where K ranges over finite extensions of K0 , and for positive integers r that are permissible for gp and hp , we consider the induced representation G (1Hp,r ) ̺p,r = IndHp,r p,r associated to the pro-p groups Gp,r = exp(gp,r ) and Hp,r = exp(hp,r ). (1) For each p there is a complex-valued function Zp of a complex variable s that is rational in qp−s with integer coefficients so that for all permissible r, r(m+1) ζ̺p,r (s) = (1 − qp−1 )qp Zp (s). (2) The real parts of the poles of the functions Zp , for all p, form a finite subset Pg,h ⊆ Q. (3) There is a finite extension K1 of K0 such that, for all closed points p ∈ Spec(OK,S ), arising for extensions K ⊇ K1 , and for all permissible r, the abscissa of convergence of the zeta function ζ̺p,r satisfies α(ζ̺p,r ) = max Pg,h . (4) There are an open dense subscheme Spec(OK0 ,T ) ⊆ Spec(OK0 ,S ) and a rational function F ∈ Q(Y1 , Y2 , X1 , . . . , Xg ) such that the following holds: For every closed point p0 ∈ Spec(OK0,T ) there are algebraic integers λ1 = λ1 (p0 ), . . . , λg = λg (p0 ) ∈ C× so that for every finite extension K of K0 and every closed point p ∈ Spec(OK,T ) lying above p0 , Zp (s) = F (q −f , q −f s , λ1f , . . . , λgf ), where q = qp0 and f = [κp : κp0 ] denotes the inertia degree of p over K0 . Furthermore the following functional equation holds: F (q f , q f s , λ1−f , . . . , λg−f ) = −q f m F (q −f , q −f s , λf1 , . . . , λfg ). 28 STEFFEN KIONKE AND BENJAMIN KLOPSCH This theorem is a consequence of Theorems 5.8 and 5.19 below, which hold for a larger class of integrals of Igusa type described in (5.3). Indeed, the zeta functions of induced representations are of the required form due to the formula given in Proposition 4.4. As discussed in the introduction, our proof proceeds along the lines of [18, 54]. Our approach is of independent interest, because we work on a different domain of integration and we modified the zeta functions with some infinite series, which is conceptually adapted to our applications. Remark 5.2. The assertions in (1), (2) and (3) of Theorem 5.1 have local analogues for Lie lattices that are defined over the valuation ring of a p-adic field; i.e. a finite extension field of some Qp . In fact, the proof of the underlying Theorem 5.8 given in Section 5.2.2 carries over directly if the base field K0 is assumed to be a p-adic field (instead of a number field). Note that there are Zp -Lie lattices g which cannot be defined globally; this means, there is no Lie lattice h defined over the ring of S-integers OS of a number field and a prime ideal p E OS such that Op ∼ = g. = Zp and Op ⊗OS h ∼ 5.1. p-Adic integrals. We continue to use the notation set up above and write (5.1) OS = OK,S , Op = OK,S,p, π = πp for short. Let X be a smooth integral projective scheme over Spec(OK0 ,S ), and let m be the dimension of the generic fibre XK0 . Let d ∈ N and let I = (Ij )dj=0 and J = (Jj )dj=0 be two collections of coherent sheaves of ideals on X. Assumption 5.3. We assume throughout that I0 = J0 = OX is the structure sheaf of X, and γOX ⊆ Ij0 for some non-zero γ ∈ OK0,S and some j0 ∈ {1, . . . , d}. A sheaf of ideals I on X defines a continuous function kIkp on the compact space X(Op ) by (5.2) kIkp (x) = max{|f (x)|p | f ∈ Ix }, where Ix = I · OX,x denotes the stalk of I at x ∈ X(Op ). We are interested in weighted combinations of such functions. For ℓ ∈ Z we define (π jℓ Ij )dj=0 p := max qp−jℓ kIj kp 0≤j≤d and likewise for J . Remark 5.4. On the compact topological space X(Op) we consider the canonical p-adic measure µX,p defined by Batyrev in [8, Def. 2.6]. This measure is locally defined in terms of differential forms, i.e. sections of the canonical bundle ωX/Op . It can be defined without assuming the existence of a global gauge form, on which Weil’s original approach [56] was based. Here we will mainly use the following property of the canonical p-adic measure: for every point x ∈ X(κp ), the fibre Y over x in X(Op ) has measure µX,p(Y ) = qp−m ; in particular, µX,p(X(Op )) = qp−m |X(κp )| as shown in [8, Thm. 2.7]. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 29 Fix once and for all a positive integer c ∈ N. We consider the local zeta function (5.3) Z X −s −1 −ℓc Zp (s) = ZX,I,J ,p (s) = qp (π jℓ Ij )dj=0 p (π jℓ Jj )dj=0 p dµX,p. X(Op ) ℓ∈Z For instance, in the setting of Proposition 4.4, we encounter such zeta functions for c = m + 1. In such applications the collections I and J may very well contain zero ideal sheaves; however, these do not contribute to the local zeta function. It follows from Remark 4.5 that Assumption 5.3 holds in this case. The next lemma shows that these assumptions guarantee the convergence of the infinite series in (5.3). Lemma 5.5. Under Assumption 5.3 the series Zp (s) converges absolutely for all s ∈ C with Re(s) > c/j0 . Proof. First we carry out the summation over all non-negative integers. For ℓ ≥ 0, the functions (π jℓ Ij )dj=0 p and (π jℓ Jj )dj=0 p have value 1 at every x ∈ X(Op), because I0 = J0 = OX . We deduce that Z ∞ ∞ X X −s −1 −ℓc qp−ℓc µX,p(X(Op )) (π jℓ Ij )dj=0 p (π jℓ Jj )dj=0 p dµX,p = qp X(Op ) ℓ=0 ℓ=0 µX,p (X(Op)) = , 1 − qp−c with absolute convergence independently of s ∈ C. It remains to sum over all negative integers. Using γOX ⊆ Ij0 to justify the second inequality below, we observe that for all s ∈ C with Re(s) > c/j0 , ∞ X qpℓc ℓ=1 ≤ ∞ X ℓ=1 Z X(Op ) qpℓc Z (π −jℓ Ij )dj=0 kπ −j0 ℓ −s p (π −jℓ Jj )dj=0 −Re(s) Ij0 kp dµX,p ≤ X(Op ) = ∞ X −1 p dµX,p ℓ(c−Re(s)j0 ) qp −Re(s) |γ|p ℓ=1 c−Re(s)j0 −Re(s) qp |γ|p c−Re(s)j0 1 − qp µX,p(X(Op )) µX,p(X(Op )).  The infimum of all σ ∈ R such that the series Zp (σ) converges is called the abscissa of convergence α(Zp ) of the local zeta function Zp ; as seen above, the series Zp (s) converges absolutely to an analytic function on the half-plane {s ∈ C | Re(s) > α(Zp)}. The computation of the integral defining the local zeta function Zp is rather simple if the ideal sheaves in I and J are monomial in the following sense. Definition 5.6. Let k be a field and let Y be a regular scheme over Spec(k). An ideal sheaf I on Y is called monomial if for all y ∈ Y the ideal Iy E OY,y 30 STEFFEN KIONKE AND BENJAMIN KLOPSCH Q is of the form Iy = ri=1 zici OY,y , where z1 , . . . , zr are regular parameters at y and c1 , . . . , cr ∈ N0 are suitable exponents; cf. [36, (3.16)]. Let X be a smooth scheme over Spec(OS ). Observe that for every a ∈ Spec(OS ), the fibre Xa is a regular scheme over Spec(k), where k = κp if a = p is a closed point and k = K otherwise. An ideal sheaf I on X is monomial, if it is locally principal and for all a ∈ Spec(OS ) the ideal sheaf I · OXa on the fibre Xa over a is monomial. Many authors refer to a monomial sheaf of ideals as a sheaf of ideals of a divisor with simple normal crossings. Hironaka’s famous resolution of singularities [32] implies that over a field of characteristic 0 any ideal sheaf can be transformed into a monomial one using a suitable sequence of blow-ups. We will use the following version of this result, which is explained in [36, Thm. 3.26]. By a variety over a field k we mean an integral, separated scheme of finite type over Spec(k). Theorem 5.7 (Hironaka Monomialisation Theorem). Let X be a smooth variety over some field k of characteristic 0 and let I be an ideal sheaf on X. There are a smooth variety Y over k and a projective morphism h : Y → X such that the ideal sheaf h∗ (I) is monomial and h restricts to an isomorphism between the complements of the closed subvarieties defined by h∗ (I) and I. 5.2. The abscissa of convergence. We continue to use the notation set up above. In this section we study the abscissa of convergence of the zeta functions Zp = ZX,I,J ,p , for finite extensions K of K0 and closed points p ∈ Spec(OS ), as defined in (5.3). The main result is the following theorem. Theorem 5.8. In the set-up described above, including Assumption 5.3, the following statements hold. (1) For every finite extension K of K0 and every closed point p ∈ Spec(OS ), there is a rational function Fp ∈ Q(X, Y ) such that Zp (s) = Fp (qp , qp−s ). (2) The real parts of the poles of the functions Zp , for all K and p as above, form a finite set P = PX,I,J ⊆ Q of rational numbers. (3) There is a finite extension K1 of K0 such that, for all K and p as above satisfying K1 ⊆ K, the abscissa of convergence of Zp satisfies α(Zp) = max P . The proof of the theorem is described in Section 5.2.2. Here we briefly discuss an interesting consequence. Let K1 be a finite extension of K0 with the properties described in part (3) of the theorem. If a maximal ideal p0 of OK0 ,S is unramified in K1 and admits a prime divisor p1 E OK1 ,S of inertia degree 1 over p0 , then the completions (K0 )p0 and (K1 )p1 coincide and hence Zp0 = Zp1 , in particular α(Zp0 ) = α(Zp1 ). By the Chebotarev Density Theorem [41, VII (13.6)] the set of such primes p0 E OK0 ,S has Dirichlet density at least [K1 : K0 ]−1 . ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 31 Corollary 5.9. The set of closed points p0 ∈ Spec(OK0 ,S ) satisfying α(Zp0 ) = max P has positive Dirichlet density. 5.2.1. The abscissa of convergence of certain Dirichlet series. We discuss a general result on a family of power series. Let Q((Q))[[t]] be the ring of formal power series in t over the field of Laurent series Q((Q)) in an indeterminate Q. Fix integers d, u ∈ N and two collections λ = (λj )dj=0 , β = (βj )dj=0 of integral linear forms λj , βj : Z1+u → Z for 0 ≤ j ≤ d. We say that an integral linear form λ : Z1+u → Z is strictly negative if λ(v) < 0 for every v ∈ N01+u r {0}. It is convenient for us to write the elements of Z1+u as pairs (ℓ, n) where ℓ ∈ Z and n = (n1 , . . . , nu ) ∈ Zu . The following assumptions are analogous to those in Assumption 5.3. Assumption 5.10. We assume throughout: (i) λ0 is strictly negative, (ii) β0 = 0, and (iii) there are an index j0 ∈ {1, . . . , d} and a ∈ N such that βj0 (ℓ, n) = aℓ for all (ℓ, n) ∈ Z1+u . For every integer N ≥ 0 and vectors ε = (ε0 , . . . , εd ), δ = (δ0 , . . . , δd ) ∈ Zd+1 with δ0 = 0 we define a power series   X X − min λj (ℓ,n)+εj − min βj (ℓ,n)+δj λ,β Q 0≤j≤d t 0≤j≤d ΞN,ε,δ (Q, t) = (5.4) ℓ∈Z n∈(Z≥N )u ∈ Q((Q))[[t]]. To simplify the notation, we write ΞN,ε,δ in place of Ξλ,β N,ε,δ . Let us verify that (5.4) defines an element of Q((Q))[[t]] r Q((Q))[t]. The variable t only occurs with non-negative exponents since β0 = 0 and δ0 = 0. Consider summands contributing to the coefficient of te , for some fixed exponent e ≥ 0. By Assumption 5.10 (iii), the relevant summands only occur for ℓ ≥ −(e+δj0 )/a. By Assumption 5.10 (i), λ0 is strictly negative; hence every monomial Qk te occurs only a finite number of times and, moreover, k is bounded below in terms of ℓ and thus in terms of e. Finally, we observe that the coefficients are all positive; as ℓ decreases, we pick up non-zero terms of increasing degree in t, thus ΞN,ε,δ 6∈ Q((Q))[t]. Lemma 5.11. In the above setting, including Assumption 5.10, the following statements hold. (1) The power series ΞN,ε,δ is a rational function over Q, i.e., ΞN,ε,δ ∈ Q(Q, t). (2) There is a finite set Pe ⊆ (Z × N0 ) r {(0, 0)} such that, for all N, ε and δ, the rational function ΞN,ε,δQcan be written as the quotient of an element of Q[Q, Q−1 , t] by a power of (A,B)∈Pe (1 − QA tB ). (3) The real parts of poles of ΞN,ε,δ (q −1 , q −s ), for all N, ε, δ and q ∈ R>1 , form a non-empty finite subset Pλ,β ⊆ Q. (4) The maximum max Pλ,β is a pole for every ΞN,ε,δ (q −1 , q −s ) as in (3). (5) The inversion property Ξ1,0,0 (Q−1 , t−1 ) = (−1)u+1 Ξ0,0,0 (Q, t) holds. 32 STEFFEN KIONKE AND BENJAMIN KLOPSCH Proof. We only sketch the proof, as the lemma is essentially a paraphrase of known results; see [54, Prop. 2.10] and [3, Prop. 4.5]. Furthermore, we may assume that N = 0 as ΞN,ε,δ (Q, t) = Ξ0,ε′ ,δ′ (Q, t) for ε′j = εj + λj (0, N, . . . , N) and δj′ = δj + βj (0, N, . . . , N), where 0 ≤ j ≤ d. For simplicity we drop N from the notation altogether. Decompose Z × N0u into a finite number of disjoint rational cones C(ε, δ)± j,k , ± for 0 ≤ j, k ≤ d, such that on each C(ε, δ)j,k the minimum in the exponent of Q is attained by λj + εj , the minimum in the exponent of t is attained by βk + δk , and ℓ is positive or non-positive according to the attached sign. Introducing new variables we may describe each cone with the cone of positive solutions of a linear integral inhomogeneous system of equations. The generating function of such a cone is known to be rational (see [51, Ch. I]) and so we obtain (1). Moreover, the denominator of the generating function of each cone is of the Q form γ (1 − X γ ) where the product runs over the finitely many completely fundamental solutions γ of the corresponding homogeneous system. Making the suitable substitutions we obtain a finite set Pe with the properties stated in (2). Observe that (0, 0) 6∈ Pe as Ξ(Q, t) is a well-defined power series, as explained just after the defining equation (5.4). Statement (3) is a direct consequence of (2), as n o A Pλ,β ⊆ − B ∈ Q | (A, B) ∈ Pe and B 6= 0 , and the inversion property (5) follows from [50, Prop. 8.3]. It remains to justify (4). We give more details than provided in [3], where the corresponding discussion appears to be short if not incomplete. Fix q > 1. As a first step we show that the abscissae of convergence of Ξε,δ (q −1 , q −s ) and Ξ0,0 (q −1 , q −s ) agree. Define E = max{|εi | | 0 ≤ i ≤ d} and ∆ = max{|δi | | 0 ≤ i ≤ d}. Fix (ℓ, n) ∈ Z × N0u , and choose indices j, k ∈ {0, . . . , d} such that min βi (ℓ, n) = βj (ℓ, n) and 0≤i≤d min βi (ℓ, n) + δi = βk (ℓ, n) + δk . 0≤i≤d Then βj (ℓ, n) ≤ βk (ℓ, n), whereas βk (ℓ, n) + δk ≤ βj (ℓ, n) + δj , and we conclude −∆ ≤ δk ≤ (βk (ℓ, n) + δk ) − βj (ℓ, n) ≤ δj ≤ ∆. A similar inequality relates the minima of λi (ℓ, n) and λi (ℓ, n)+εi . We conclude that, for every σ ∈ R for which at least one of the two series Ξε,δ (q −1 , q −σ ) and Ξ0,0 (q −1 , q −σ ) converges, q −E−|σ|∆ Ξ0,0 (q −1 , q −σ ) ≤ Ξε,δ (q −1 , q −σ ) ≤ q E+|σ|∆ Ξ0,0 (q −1 , q −σ ). Hence the abscissae of convergence of the two series are equal. Consider the abscissa of convergence of Ξ0,0 (q −1 , q −s ). Pick (A, B) ∈ Pe with B 6= 0 such that −A/B is maximal among all the pairs (A, B) ∈ Pe. By (2), the series Ξ0,0 (q −1 , q −s ) converges absolutely for Re(s) > −A/B (as for ordinary Dirichlet series this can be seen by looking at the Taylor series). ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 33 Let σ ∈ R such that Ξ0,0 (q −1 , q −σ ) converges. The term (1 − QA tB ) corresponds to some extremal ray in some cone C(0, 0)± j,k in the decomposition chosen above. As Ξ0,0 is a series in Q and t with non-negative integral P∞ coefficients −1 −σ we may sum over the extremal ray to obtain Ξ0,0 (q , q ) ≥ i=0 q (−A−Bσ)i = 1/(1−q −A−Bσ ). This implies σ > −A/B , and thus −A/B is the abscissa of convergence.  5.2.2. Local abscissae of convergence and the proof of Theorem 5.8. Recall the notation set up in Section 5.1, in particular (5.1) and Assumption 5.3. Consider the generic fibre XK0 of the scheme X, equipped with the ideal sheaf LK0 which is the product of all non-zero ideals Ij,K0 and Jj,K0 . To simplify the notation, Q we assume that all Ij,K0 and Jj,K0 are non-zero, so that LK0 = dj=0 Ij,K0 Jj,K0 ; in general, the ideal sheaves that are zero have to be removed. By Hironaka’s Theorem 5.7, there is a monomialisation h : Y → XK 0 of the ideal sheaf LK0 . If a product of non-zero ideals is monomial, then each of the ideals in the product is monomial. For 0 ≤ j ≤ d we conclude that h∗ (Ij,K0 ) (respectively h∗ (Jj,K0 )) is the sheaf of ideals of an effective divisor Dj (respectively Cj ) with simple normal crossings; say X (j) X (j) Dj = NE E and Cj = ME E. E∈T E∈T Here T denotes the finite set of smooth prime divisors, defined over K0 , occurring in the co-support of h∗ (LK0 ). Let D disc denote the discrepancy divisor, that is, the divisor defined by the image of the canonical map h∗ (ωXK0 ) ⊗ ωY∨ → OY , where ωX denotes the canonical bundle on a variety X. The support of D disc is contained in T , thus we may write X D disc = (νE − 1)E E∈T for certain νE ∈ N. These parameters are relevant for our purposes, as they describe the pullback of the canonical p-adic measure; see Section 5.3. For any finite extension K of K0 we obtain a monomialisation hK : YK → XK . As the divisors in T are smooth, they decompose into a disjoint union of prime divisors defined over K. Let p ∈ Spec(OS ) be a closed point. Since h is birational, we may pull back the integral defining Zp to Y and we obtain (5.5) Z X −1 −s d d −cℓ dh∗ (µX,p ). π jℓ h−1 (Jj ) j=0 π jℓ h−1 (Ij ) j=0 qp Zp (s) = ℓ∈Z Y (Kp ) p p We point out two subtleties in connection with the formula (5.5). Firstly, the scheme X is projective and hence X(Op ) = X(Kp ). Secondly, the symbol h−1 (Ij ) denotes the sheaf-theoretic inverse image of the OX -module Ij , which is not an OY -module; a similar remark applies to Jj . 34 STEFFEN KIONKE AND BENJAMIN KLOPSCH Given an open subset V ⊆o Y (Kp ), we define the restricted zeta function Zp [V ](s) by the formula obtained from (5.5) by restricting the domain of integration to V . We denote by αp (V ) the abscissa of convergence of Zp [V ]. Observe that V ⊆o W ⊆o Y (Kp ) implies αp (V ) ≤ αp (W ). Definition 5.12. Let K be a finite extension of K0 and let p ∈ Spec(OS ) be a closed point. We define the local abscissa of convergence at y ∈ Y (Kp ) by αp (y) = inf{αp (V ) | y ∈ V ⊆o Y (Kp )}. Lemma 5.13. In the above setting, for any open compact subset V ⊆ Y (Kp ) the abscissa of convergence of Zp [V ] is αp (V ) = sup{αp (y) | y ∈ V }. Proof. Clearly, V is an open neighbourhood of all of the points that it contains, thus αp (V ) ≥ sup{αp (y) | y ∈ V }. Conversely, let ε > 0. For every y ∈ V we find an open neighbourhood Wy of y in V such that αp (Wy ) < αp (y) + ε. SinceSV is compact, we find a finite number of points y1 , . . . , yn ∈ V such that V = {Wyi | 1 ≤ i ≤ n}. We deduce that αp (V ) ≤ max{αp (Wyi ) | 1 ≤ i ≤ n} < sup{αp (y) | y ∈ V } + ε. As ε tends to 0, we obtain αp (V ) ≤ sup{αp (y) | y ∈ V }.  Consider a point y ∈ Y (Kp ). We use the monomialisation h : Y → XK0 to compute Zp [V ] for small coordinate neighbourhoods V of y. Set T (y) = {E ∈ T | y ∈ E} and observe that u := |T (y)| ≤ m = dim(Y ). Locally at y, we can complement the collection of local equations gE for E ∈ T (y) by m − u further elements to obtain a regular system of parameters. Locally at x := h(y) ∈ X(Op ), the ideal Ij , for j ∈ {0, . . . , d}, is finitely generated, since X is noetherian. Moreover, the sheaf h−1 (Ij ) generates the monomial ideal h∗ (Ij,K0 ), therefore we obtain Y (j) N gE E kh−1 (Ij )kp = |w|p E∈T (y) p locally at y for some regular function w with w(y) 6= 0. Similar considerations apply to the ideals Jj . Therefore, if we choose V ∼ = pN Opm to be a small coordinate neighbourhood, we obtain  Y (j) d d NE jℓ+δj jℓ −1 gE π h (Ij ) j=0 = π p π jℓ h−1 (Jj ) d j=0 p E∈T (y)  Y = π jℓ+εj E∈T (y) j=0 p M (j) d gE E j=0 p . for certain integers δj , εj ∈ Z. The canonical p-adic measure is locally defined by differential forms, thus the pullback h∗ (µX,p) is transformed according to the discrepancy divisor. Writing T (y) = {E1 , . . . , Eu }, we deduce that the zeta ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS function Zp [V ] is given by Z X −cℓ qp Zp [V ](s) = ℓ∈Z max π jℓ+δj pN Opm 0≤j≤d · max π jℓ+εj 0≤j≤d N (u−m)−a (†) = qp Yu i=1 (j) i ME xi −1 p Yu i=1 πa (j) i NE xi Yu i=1 35 −s p νEi −1 xi p dµ(x) (1 − qp−1 )u ΞN,ε,δ (qp−1 , qp−s ), where µ denotes the normalised Haar measure satisfying µ(Opm ) = 1. Here ΞN,ε,δ (Q, t) is equal to X X − Q  min (εj +(j−c)ℓ+ 0≤j≤d    Pu (j) (j) − min (δ +jℓ+ N n ) (M −ν )n ) j j i Ei i=1 E i=1 E Pu i t 0≤j≤d i ℓ∈Z n∈Zu ≥N and thus a power series of the form studied in Section 5.2.1. By our general (0) (j ) (0) assumptions we have NE = NE 0 = ME = 0 for all E ∈ T and some j0 > 0; so this series satisfies Assumption 5.10. Proposition 5.14. (1) Every point y ∈ Y (Kp ) has an open neighbourhood V such that αp (y) = αp (V ). (2) Let K be a finite extension of K0 and, for i ∈ {1, 2}, let ιi : K → Kpi be a completion. For y ∈ Y (K) the local abscissa does not depend on the completion, that is αp1 (ι1 (y)) = αp2 (ι2 (y)). (3) The local abscissa at y ∈ Y (Kp ) depends only on T (y) = {E ∈ T | y ∈ E}. Proof. The coordinate neighbourhoods on which the formula (†) holds form a neighbourhood base at y. By Lemma 5.11 the abscissa of convergence does not depend on N, hence (1) holds. Let y ′ be another point in some completion Kp′ and assume that T (y ′) = T (y). On small coordinate neighbourhoods of y and y ′, we have formulae of the form (†). In these formulae, different N, ε, δ and q may occur. However, by Lemma 5.11 these parameters do not change the abscissa of convergence and the assertions follow.  Proof of Theorem T 5.8. For a subset U ⊆ T we consider the closed smooth S K0 subscheme EU = E∈U E ⊆ Y and the open subscheme EU◦ = EU r E ∈U / E ◦ of EU . The closed points y ∈ EU are concisely the ones which satisfy T (y) = U. By Proposition 5.14 the local abscissa is constant on all points of EU◦ and we denote this abscissa by α(U). Since Y is projective, the space Y (Kp ) is compact. Therefore it can be covered by a finite number of disjoint open coordinate neighbourhoods on which the zeta function is given by a local formula as in (†). Now Lemma 5.11 implies that Zp (s) is rational in qp and qp−s . Moreover, the real parts of all poles of Zp are contained in a finite union of finite sets of the form Pλ,β as in Lemma 5.11. Let p ∈ Spec(OS ) be a closed point. It follows from Lemma 5.13 that the abscissa of convergence of Zp is equal to (5.6) αp (Y (Kp )) = max{α(U) | U ⊆ T and EU◦ (Kp ) 6= ∅}. 36 STEFFEN KIONKE AND BENJAMIN KLOPSCH Each of the schemes EU◦ is of finite type over K0 , thus there is a finite extension K1 of K0 satisfying EU◦ (K1 ) 6= ∅ whenever EU◦ is not the empty scheme. Suppose that K1 ⊆ K. Then (5.6) shows that αp (Y (Kp )) is independent of K and p; thus α(Zp ) = max P .  5.3. The functional equation. In this section we prove part (4) of Theorem 5.1. We first consider the case K = K0 and, to simplify the notation, it is convenient to use the short notation OS = OK,S etc. introduced for K. Using this notation we construct in (5.7) the rational function F featuring in Theorem 5.1. In a second step we go back to the original general notation and establish the functional equations for arbitrary extensions K of K0 . Consider the scheme X over Spec(OS ) as in Section 5.1. We would like to obtain a monomialisation of the ideal sheaves Ij and Jj over Spec(OS ). For fields of positive characteristic a Monomialisation Theorem is not known and so we should not expect to achieve monomialisation globally. However, we can obtain a monomialisation on the generic fibre and expand it to some open set U ⊆o Spec(OS ). It is straightforward to deduce the following result from Hironaka’s Monomialisation Theorem. Theorem 5.15 (Generic Monomialisation). Let X be a smooth integral projective scheme over Spec(OS ) and let I be an ideal sheaf on X. There are a non-empty open subset U ⊆o Spec(OS ), a smooth integral projective scheme Y over U and a projective morphism h : Y → XU such that h∗ (I) is monomial and h restricts to an isomorphism between the complements of the closed sets defined by h∗ (I) and I. We consider the sheaf of ideals L defined as the product over all Ij and Jj which are non-zero on X. As in Section 5.2.2, we assume that all Ij and Q Jj are non-zero, so that L = dj=0 Ij Jj . We apply the generic Monomialisation Theorem to L. Hence, after enlarging S, we may assume that there is a smooth integral projective scheme Y over Spec(OS ) and a birational projective morphism h : Y → X such that h∗ (L) is monomial. The structure morphism X → Spec(OS ) is a flat morphism of finite type between noetherian schemes and is hence open. Enlarging S again if necessary, we may assume that the complement of the closed scheme Z defined by L surjects onto Spec(OS ). The fact that h is birational enables us to compute the zeta integral on Y instead of X. Indeed, let p ∈ Spec(OS ) be a closed point. The map h : Y(Op ) → X(Op) is an homeomorphism, ignoring sets of measure zero, and consequently Z X d −1 ∗ d −s −ℓc dh (µX,p ) π jℓ h∗ (Jj ) j=0 π jℓ h∗ (Ij ) j=0 qp Zp (s) = ℓ∈Z Y(Op ) p p If the product of two ideal sheaves is monomial, then each of the ideal sheaves is monomial. Therefore the morphism h : Y → X is actually a monomialisation for each of the ideals Ij and Jj separately. We will denote the inverse images of these ideals by Iej = h∗ (Ij ), Jej = h∗ (Jj ) and Le = h∗ (L). ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 37 These ideal sheaves are locally principal, hence they define effective Cartier divisors on Y. For j ∈ {0, . . . , d}, let Dj (respectively Cj ) denote the divisor defined by Iej (respectively Jej ). Since Y is an integral noetherian separated regular scheme, there is, in fact, no difference between Cartier and Weil divisors on Y; see [30, II.6.11]. Let T denote the set of prime divisors occurring in P D = dj=0 Cj + Dj . Hence we may write X (j) X (j) Dj = NE E and Cj = ME E, for j ∈ {0, . . . , d}, E∈T (j) E∈T (j) (0) where NE , ME ∈ Z are certain non-negative integers. Note that ME = (0) NE = 0 for all E ∈ T . We enlarge S such that all the all prime divisors in T and all their intersections are smooth over Spec(OS ). Now we consider the pullback h∗ (µX,p ) of the canonical p-adic measure. The ∨ image of the canonical morphism of OY -modules h∗ ωX ⊗ ωY → OY is a locally principal ideal sheaf M, which defines the discrepancy divisor D disc , an effective Cartier divisor. Its support is contained in the support of D and so X (νE − 1)E D disc = E∈T for certain multiplicities νE −1 ∈ N0 . Note that M is a monomial sheaf of ideals. The pullback of the canonical p-adic measure satisfies h∗ (µX,p) = kMk T p µY,p . For every set U ⊆ T of prime divisors, the intersection EU = E∈U E is a smooth scheme over Spec(OS ). For every finite commutative OS -algebra L, we write bU (L) = |EU (L)| for the number of L-rational points of EU . We will consider the case where L is a finite extension of a residue field κp of Op . Proposition 5.16. In the above situation for almost all closed points p ∈ Spec(OS ) the following formula holds: X (−1)|W \U | (qp − 1)|U | bW (κp ) ΞU (qp−1 , qp−s ), Zp (s) = qp−m U ⊆W ⊆T where the sum runs over all pairs (U, W ) of subsets U ⊆ W ⊆ T and ΞU (Q, t) = X − Q  min ((j−c)ℓ+ 0≤j≤d P  (j) E∈U (ME −νE )nE ) − t  min (jℓ+ 0≤j≤d P E∈U  (j) NE n E ) . ℓ∈Z (nE )E ∈NU Proof. It suffices to establish the equation X Zp (s) = qp−m (qp − 1)|U | cU (κp ) ΞU (qp−1 , qp−s ), U ⊆T where cU (L) = |{a ∈ Y(L) | ∀E ∈ T : a ∈ E ←→ E ∈ U}|. For then the proposition follows from the principle of inclusion and exclusion X bW (L)(−1)|W \U | , cU (L) = U ⊆W ⊆T where the sum runs over all sets W lying between U and T . 38 STEFFEN KIONKE AND BENJAMIN KLOPSCH The proof is very similar to the proof of [54, Thm. 2.1]. We only give a brief sketch. Take a κp -rational point a ∈ Y(κp ). Let Ta denote the subset of T consisting of those divisors passing through a. Write Ta = {E1 , . . . , Er } for r = |Ta |, say. By construction the divisors have a simple normal crossing in a, thus we find a regular local system of OY,a of the form π, g1 , g2 , . . . , gm such that gi is the defining equation of Ei at a, for i ∈ {1, . . . , r}. On the p-adic open set Wa = {y ∈ Y(Op ) | y ≡ a (mod p)}, the following equalities hold: Yr kIej kp = (j) NE i=1 gi i p Yr kJej kp = , (j) ME i=1 gi i p , kMkp = Yr νEi −1 i=1 gi p . For any given ℓ ∈ Z this allows us to evaluate the integral over Wa as follows Z π jℓ h∗ (Ij ) Wa = = = Z d −s j=0 p max π jℓ Wa 0≤j≤,d Z π jℓ h∗ (Jj ) Yr max π (πOp )m 0≤j≤d i=1 jℓ (j) i NE gi −s −1 j=0 p dh∗ (µX,p ) max π jℓ p Yr d (j) NE xi i i=1 0≤j≤d −s Yr max π p i=1 jℓ 0≤j≤d (j) i ME −νEi +1 gi Yr −1 dµY,p p (j) ME −νEi +1 xi i i=1 −1 dµ(x) p   Pr Pr (j) (j) min (jℓ+ i=1 (ME −νEi )ni )+s min (jℓ+ i=1 NE ni ) (qp − 1)r X 0≤j≤d qp qpm r n∈N i 0≤j≤d i Now the proposition follows by grouping the finitely many κp -rational points according to the prime divisors on which they lie.  Lemma 5.11 (1) and (5) imply that ΞU is rational and has the following inversion property. Lemma 5.17. For every set U ⊆ T of prime divisors the formal sum ΞU (Q, t) ∈ Q((q))[[t]] is a rational function in Q(Q, t). The functions Ξ satisfy the inversion property X ΞU (Q−1 , t−1 ) = (−1)|U |+1 ΞV (Q, t) V ⊆U for all U ⊆ T . We record a simple combinatorial lemma. Lemma 5.18. Let V ⊆ W be finite sets and z some indeterminate. Then X V ⊆U ⊆W (z − 1)|U | (−z)|W \U | = (−1)|W \V | (z − 1)|V | . ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 39 Proof. Say |W | = n and |V | = r ≤ n and write ∆ = W r V . (−1)n−r (z − 1)r = ((z − 1) − z)n−r (z − 1)r = n−r X n−r j j=0 = X  (−1)n−r−j (z − 1)r+j z n−r−j (−1)n−r−|H| (z − 1)r+|H| z n−r−|H| H⊆∆ X = (−1)|W \U | (z − 1)|U | z |W \U | .  V ⊆U ⊆W Let f be a positive integer, and let Lf denote the unique extension of κp of degree f . For simplicity we write bU (p, f ) = bU (Lf ). We proceed along the lines of [18]; see [16] for an overview of the relevant results on ℓ-adic cohomology. Write EU = EU × κp , where κp denotes the algebraic closure of κp . Then, by the ℓ-adic Lefschetz fixed point principle, we obtain 2(m−|U |) bU (p, f ) = X i=0  (−1)i Tr ϕf |H i (EU , Qℓ ) , where ϕ denotes the endomorphism induced by the Frobenius automorphism. In particular, we get an expression 2(m−|U |) bU (p, f ) = X g(U,i) (−1) i i=0 X λfU,i,j j=1 in terms of the eigenvalues λU,i,j , for 1 ≤ j ≤ g(U, i) := dim H i (EU , Qℓ ), of ϕ acting on the ℓ-adic cohomology H i (EU , Qℓ ). Poincaré duality in ℓ-adic cohomology implies the functional equation of the Weil zeta function (‡) −f (m−|U |) bU (p, −f ) = qp bU (p, f ). By construction, the schemes EU are smooth and projective (hence proper) over Spec(OS ); recall that S was enlarged to achieve this. By the smooth proper base change theorem (see [16, §6.8] or [17, Thm. (3.1), p. 62]) the ith ℓ-adic Betti number is independent of the chosen place p. In particular, the number of Frobenius eigenvalues is the same for all p. Let Υ be the set of all triples υ = (U, i, j) satisfying U ⊆ T , 0 ≤ i ≤ m − |U| and 1 ≤ j ≤ g(U, i). Consider the polynomial ring Q(Y1 , Y2)[X] := Q(Y1 , Y2)[Xυ | υ ∈ Υ] over the field of rational functions Q(Y1 , Y2 ), where X denotes the whole collection of independent variables Xυ . For every U ⊆ T , we set 2(m−|U |) bU (X) = X i=0 (−1) g(U,i) i X j=1 XU,i,j , 40 STEFFEN KIONKE AND BENJAMIN KLOPSCH and we define the rational function F = F (Y1, Y2 , X) X m = Y (−1)|W \U | (Y1−1 − 1)|U | bW (X) ΞU (Y1 , Y2 ) 1 (5.7) U ⊆W ⊆T ∈ Q(Y1 , Y2 )[X]. As explained above, we now revert to the original notation. It remains to establish the functional equations for arbitrary finite extension K of K0 . Let K be a finite extension of K0 of inertia degree f , and let p ∈ Spec(OS ) be a closed point over p0 ∈ Spec(OK0 ,S ). As in the statement of Theorem 5.1, set q = qp0 . The preceding discussion yields Zp (s) = F (q −f , q −f s , (λfυ )υ∈Υ ), where the λfυ are the corresponding Frobenius eigenvalues as above. Theorem 5.19. In the above setting, the function F satisfies for every positive integer f the functional equation fm F (q f , t−f , (λ−f F (q −f , tf , (λfυ )υ∈Υ ), υ )υ∈Υ ) = −q where t is any indeterminate. Proof. The following calculation, based on (‡), Lemma 5.17 and Lemma 5.18 as indicated, proves the functional equation: F (q f , t−f , (λ−f υ )υ∈Υ ) X = qf m (−1)|W \U | (q −f − 1)|U | bW (p, −f ) ΞU (q f , t−f ) U ⊆W ⊆T = qf m X (−1)|W \U | (q −f − 1)|U | q −f (m−|W |) bW (p, f ) ΞU (q f , t−f ) by (‡) U ⊆W ⊆T = X (−1)|W \U | (q −f − 1)|U | q f |W | bW (p, f ) (−1)|U |+1ΞV (q −f , tf ) by 5.17 V ⊆U ⊆W ⊆T =− X (−q f )|W \U | (q f − 1)|U | bW (p, f ) ΞV (q −f , tf ) V ⊆U ⊆W ⊆T =− X (−1)|W \V | (q f − 1)|V | bW (p, f ) ΞV (q −f , tf ) by 5.18 V ⊆W ⊆T = −q f m F (q −f , tf , (λfυ )υ∈Υ ).  6. Groups acting on rooted trees and multiplicity-free representations In this section we describe a geometric situation which leads to a transparent treatment of zeta functions associated to certain admissible representations. In particular, this yields a straightforward description of the zeta function asGL (o) sociated to the induced representation IndPξ n+1 (1Pξ ) from a maximal (1, n)parabolic subgroup Pξ to the compact p-adic Lie group GLn+1 (o); see Proposition 6.5 for details. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 41 Central to the geometric approach is a suitable notion of (weak) 2-transitivity. Definition 6.1. The action of a group G on a metric space (X, d), from the right by isometries, is called distance transitive if for all x1 , x2 , y1 , y2 ∈ X with d(x1 , x2 ) = d(y1 , y2) there is an element g ∈ G with xi g = yi g for i ∈ {1, 2}. More specifically, if G is a profinite group acting distance transitively on a rooted tree T there is a geometric way to compute the zeta function of the representation of G on the space C ∞ (∂T , C) of locally constant functions on the boundary ∂T . The corresponding method was used by Bartholdi and Grigorchuk [6] for specific groups. In [9], Bekka and de la Harpe discuss a general approach based on reproducing kernels; in collaboration with Grigorchuk, they treat groups acting on rooted trees in detail in an appendix. We briefly review the theoretic background and produce a formula for the zeta function. As an application we compute the zeta functions of induced representations of certain compact p-adic analytic groups that are not torsion-free potent pro-p. 6.1. Trees and distance transitive actions. Let m = (mi )i∈N be an integer sequence with mi ≥ 2 for all i ∈ N. We define the associated spherically homogeneous rooted tree Tm as follows. The vertices of level n ≥ 0 are finite sequences w = (w1 , . . . , wn ) of length n with wi ∈ {0, . . . , mi − 1}. We write |w| = n to indicate that w is of level n. The root of Tm is the empty sequence. There is an edge between a vertex v of level n and a vertex w of level n + 1 if and only if v is a prefix of w. Let Lm (n) denote the set of vertices of level n in Tm . For any two vertices v and w we write pre(v, w) for the longest common prefix of v and w, regarded as a vertex of Tm . The boundary ∂Tm of Tm is the space of geodesic rays in Tm starting at the root, that is, the profinite topological space of infinite sequences (ξi )i∈N with ξi ∈ {0, . . . , mi − 1}. For any n ∈ N0 , we write ξ(n) for the prefix of ξ of length n and we say that the geodesic ray ξ passes through ξ(n). The longest common prefix of ξ, η ∈ ∂Tm is denoted pre(ξ, η), which is a vertex of Tm unless ξ = η. There is a natural metric d on ∂Tm given by 1 d(ξ, η) = for all ξ, η ∈ ∂Tm with ξ 6= η. 1 + |pre(ξ, η)| The same formula defines also a metric on Lm (n). Let Aut(Tm ) denote the profinite group of rooted automorphisms of Tm . Lemma 6.2. A closed subgroup G ≤c Aut(Tm ) acts distance transitively on ∂Tm if and only if it acts distance transitively on each layer Lm (n), n ∈ N0 . Proof. First suppose that G ≤c Aut(Tm ) acts distance transitively on the boundary ∂Tm . Let n ∈ N0 and, for i ∈ {1, 2}, let xi , yi ∈ Lm (n) such that d(x1 , x2 ) = d(y1 , y2). Choose geodesic rays ξi passing through xi and ηi passing to yi with d(ξ1, ξ2 ) = d(η1 , η2 ). Then there exists g ∈ G such that ξi g = ηi for i ∈ {1, 2}, and hence xi g = yi . Conversely, suppose that G acts distance transitively on each layer. For i ∈ {1, 2}, consider ξi , ηi ∈ ∂Tm such that d(ξ1, ξ2 ) = d(η1 , η2 ). For each 42 STEFFEN KIONKE AND BENJAMIN KLOPSCH n ∈ N0 , the set Kn = {g ∈ G | ξi (n)g = ηi (n) for i ∈ {1, T 2}} ⊆ G is closed and non-empty. As G is compact, we find an element g ∈ n Kn . Evidently, ξi g = ηi for i ∈ {1, 2}.  Let G ≤c Aut(Tm ) act distance transitively on ∂Tm and consider the space C (∂Tm , C) of locally constant complex valued functions on the boundary. We study the representation ̺∂ of G on C ∞ (∂Tm , C) defined by ∞ (̺∂ (g).f )(x) = (g f )(x) = f (xg) for all g ∈ G and f ∈ C ∞ (∂Tm , C). Let ξ ∈ ∂Tm be a point on the boundary and let P = Pξ = stabG (ξ) denote the stabiliser in G; the group P is called a parabolic subgroup of G. As G acts transitively on the boundary, it follows that ̺∂ is isomorphic to the induced repG resentation IndG P (1P ). We recall that (G, P ) is called a Gelfand pair if IndP (1P ) is multiplicity-free or, equivalently, if the convolution algebra of P -bi-invariant locally constant functions on G is commutative; compare [11, §45] or [26]. The following theorem is essentially due to Bekka, de la Harpe and Grigorchuk; see [9, Prop. 10]. For completeness we include a short proof. Theorem 6.3. Let G ≤c Aut(Tm ) act distance transitively on ∂Tm and let P = Pξ ≤c G be a parabolic subgroup. Then (G, P ) is a Gelfand pair and the representation ̺∂ decomposes as a direct sum of the trivial representation and Qn−1 a unique irreducible constituent πn of dimension (mn − 1) j=1 mj for each n ≥ 1. In particular, the zeta function of the representation ̺∂ is ζ̺∂ (s) = 1 + ∞ X (mi − 1) i=1 with abscissa of convergence α(̺∂ ) = 0. −s i−1 Y mj−s j=1 Proof. For n ∈ N0 , let Pn ≤o G be the stabiliser of the vertex ξ(n) for the lim IndG action of G on the layer Lm (n). Observe that IndG Pn (1Pn ), P (1P ) = − → G where IndPn (1Pn ) is simply the permutation representation C[Lm (n)] of G on the vertices of level n. We claim that dimC EndG (C[Lm (n)]) = n + 1. From this it follows, for n ≥ 1, that C[Lm (n)] = C[Lm (n − 1)] ⊕ Vπn for some πn ∈ Irr(G) that does not yet occur as a constituent of C[Lm (n − 1)] and satisfies Yn−1 dimC πn = |Lm (n)| − |Lm (n − 1)| = (mn − 1) mj . j=1 It remains to establish the claim. Frobenius reciprocity implies dimC EndG (C[Lm (n)]) = dimC HomPn (1Pn , C[Lm (n)]) = |Lm (n)/Pn |. As G acts distance transitively, the Pn -orbits in Lm (n) correspond bijectively to the possible distances from the vertex ξ(n). Finally, the number of prefixes of any vertex of level n is exactly n + 1.  Remark 6.4. Theorem 6.3 applies, in particular, to G = Aut(Tm ). Variation of the sequence m = (mi )i∈N allows one to construct induced representations with various different zeta functions. For instance, if we apply the theorem to ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 43 the d-regular tree Tm with mi = d for all i and some fixed integer d ≥ 2, then −s the zeta function of the representation on the boundary is ζ̺∂ (s) = 1 + (d−1) 1−d−s which admits a meromorphic continuation to the complex plane. By contrast, suppose that the sequence (mi )i∈N tends to infinity with i. In this case the zeta function ζ̺∂ (s) cannot be extended analytically and the vertical axis Re(s) = 0 is the natural boundary; see [40, Thm. VI.2.2]. 6.2. Induction from maximal (1, n)-parabolic subgroups to GLn+1 (∆). In this section o denotes a complete discrete valuation ring with maximal ideal p and finite residue field κ = o/p of cardinality q. Let π ∈ p denote a uniformiser. We emphasise that here o may have positive characteristic, e.g., o = Fp [[t]]. Consider a central division algebra d of index d over the fraction field f of o so that dimf d = d2 . It is known that d contains a unique maximal o-order ∆. Up to isomorphism, d and ∆ can be described explicitly, in terms of the index d and a second invariant r satisfying 1 ≤ r ≤ d and gcd(r, d) = 1; see [44, §14] and the more explicit description given in Section 7.4. Here it suffices to fix a uniformiser Π ∈ d so that ∆ has maximal ideal P = Π∆. Recall P∞ thatk every element of ∆ can be written as a converging power series k=0 ck Π with coefficients coming from any set of representatives for the elements of the residue field ∆/P, which is a finite field of size q d . Fix n ∈ N, and consider the general linear group GLn+1 (∆) with a maximal parabolic subgroup Pξ which is the stabiliser of a point ξ ∈ Pn (∆) under the right GLn+1 -action. For instance, if ξ0 = (1 : 0 : . . . : 0), then   GL1 (∆) 0 ··· 0  ∆   ≤ GLn+1 (∆). Pξ0 =  .  .. GL (∆)  n ∆ Proposition 6.5. For all ξ ∈ Pn (∆) the pair (GLn+1 (∆), Pξ ) is a Gelfand pair GL (∆) and the induced representation ̺ = IndPξ n+1 (1Pξ ) has the zeta function   q dn − 1 −s  (q d(n+1) − 1)−s −ds ζ̺ (s) = 1 + q + . qd − 1 1 − q −dns Proof. Consider the (left) projective n-space Pn (∆). Concretely, we describe elements x in terms of homogeneous coordinates x = (x0 : . . . : xn ), where (x0 , . . . , xn ) ∈ ∆n is primitive, i.e., has at least one entry not contained in P, and (x0 : . . . : xn ) = (zx0 : . . . : zxn ) for all units z ∈ ∆× . We construct a rooted tree T representing Pn (∆) as follows. The root ε is the unique vertex of level 0 and, for each k ∈ N, the vertices of level k are the points of Pn (∆/Pk ). There is an edge between the root and every vertex of level 1. Moreover, a vertex x ∈ Pn (∆/Pk ) of level k and a vertex y ∈ Pn (∆/Pk+1 ) of level k + 1 are connected by an edge if and only if x ≡ y mod Pk . The boundary of T is ∂T ∼ = Pn (∆) since ∆ is complete. Note that T is spherically homogeneous and T ∼ = Tm for m1 = |Pn (∆/P)| = (q d(n+1) − 1)/(q d − 1) and dn mk = q for k ≥ 2. 44 STEFFEN KIONKE AND BENJAMIN KLOPSCH The group GLn+1 (∆) acts on the tree T from the right. We show below that the action on the boundary is distance transitive. Consequently, Theorem 6.3 implies that (GLn+1 (∆), Pξ ) is a Gelfand pair and ∞ X q −dnks ζ̺ (s) = 1 + (|Pn (∆/P)| − 1)−s + |Pn (∆/P)|−s (q dn − 1)−s k=0 =1+  q d(n+1) − q d −s qd −1  q dn − 1 −s  +  q d(n+1) − 1 −s qd (q dn − 1)−s 1 1 − q −dns −1 (q − 1)−s  −ds =1+ q + . qd − 1 1 − q −dns It remains to show that GLn+1 (∆) acts distance transitively on Pn (∆). Since GLn+1 (∆) acts transitively on Pn (∆), it suffices to show that the group P0 = Pξ0 acts transitively on the spheres around ξ0 = (1 : 0 : . . . : 0) ∈ Pn (∆). Let x, y ∈ Pn (∆) lie on such a sphere, that is, x ≡ ξ0 ≡ y mod Pk but x 6≡ ξ0 mod Pk+1 and y 6≡ ξ0 mod Pk+1 for some k ≥ 0. Note that, for k = 0, the first congruence holds trivially for all x, y. We need to find g ∈ P0 such that xg = y. We may write x = (x0 : Πk u1 : . . . : Πk un ) d(n+1) and y = (y0 : Πk v1 : . . . : Πk vn ), where x0 ≡ y0 ≡ 1 mod Pk and u = (u1, . . . , un ), v = (v1 , . . . , vn ) ∈ ∆n are primitive. There is a matrix h ∈ GLn (∆) such that uh = v, since GLn (∆) acts transitively Pn on primitive vectors. Furthermore, we find a1 , . . . , an ∈ ∆ such k that Π i=1 ui ai = y0 − x0 . Thus   1 0 ··· 0   a1  ∈ P0 g= .   .. h an has the property that xg = y.  7. Examples of induced representations of potent pro-p groups Let o be the ring of integers of a p-adic field f, with maximal ideal p E o and finite residue field κ = o/p of cardinality q. Let π ∈ p denote a uniformiser. 7.1. Induction from a Borel subgroup to GLr3 (o). We consider the general linear group G = GL3 (o) and, for r ∈ N, its principal congruence subgroup  Gr = ker GL3 (o) → GL3 (o/pr ) . Let B ≤c G be the Borel subgroup consisting of upper triangular matrices, and set B r = B ∩ Gr . Our aim is to compute the zeta function of the induced r representation IndG B r (1B r ). We remark that the zeta function of the induced representation IndG B (1B ) has already been computed by Onn and Singla [43, Thm. 6.5], using direct representation-theoretic considerations. Let g = gl3 (o) denote the o-Lie lattice of 3 × 3-matrices and let b denote the sublattice of all upper triangular matrices. The groups Gr and B r are finitely ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 45 generated torsion-free potent pro-p groups whenever r ≥ 2e for p = 2 and r ≥ e(p − 2)−1 for p > 2, where e denotes the ramification index of f over Qp ; compare [3, Prop. 2.3]. In this case π r g (respectively π r b) regarded as a Zp -Lie lattice, is the Lie lattice associated to Gr (respectively B r ). Proposition 7.1. In the set-up described above and subject to r ≥ 2e for p = 2 and r ≥ e(p − 2)−1 for p > 2, the zeta function of the representation r ̺ = IndG B r (1B r ) is ζ̺ (s) = q 3(r−1) q 1−3s (q − q −s )(u(q s ) − qu(q −s )) (1 − q −s )(1 − q 1−6s ) where u(X) = X 2 − 2X + 1 − 2X −1 + X −2 − X −3 . The abscissa of convergence is α(̺) = 1/6. It would be interesting to find an interpretation of the value 1/6 for the abscissa of convergence; compare the discussion in the introduction. Note that from the given formula it is easy to verify that ζ̺ satisfies a functional equation, in accordance with Theorem 5.1. Proof of Proposition 7.1. We indicate how the result can be obtained, by applying the method described in Section 4.2. As most steps consist of simple computations we leave the verification of some details to the reader. Consider the o-basis (Ei,j )3i,j=1 of g which consists of all elementary matrices; i.e., the only non-zero entry of Ei,j is a 1 in position (i, j). The subalgebra k of strictly lower triangular matrices is a complement of b in g, and the matrices Ei,j with j < i form a basis of k. Using the commutator relations [Ei,j , Es,t ] = δj,s Ei,t − δi,t Es,j , one can determine the commutator matrix R(T) ∈ Mat9 (Z[Ti,j | 1 ≤ i, j ≤ 3]), introduced in Section 4.2, for a set of variables Ti,j corresponding to the chosen basis of elementary matrices Ei,j . Substituting T2,1 = x, T3,2 = y, T3,1 = z and Ti,j = 0 whenever i ≤ j we obtain the reduced commutator matrix   0 0 0 z 0 −z −x y 0 0 0 0 0 0 −z x −x 0   0 z 0 0 y −y 0 0 0   −z −x 0 0 0 · · ·  · · · 0   0  x −y 0 0 · · · · · · 0 R(x, y, z) =  . .. .. ..  ..   . 0 y . . . z x  0 0     . . . . . . . . −y 0 . . 0 . . ··· 0 0 0 0 0 0 ··· An easy (but, if done by hand, lengthy) calculation yields the sets Fk of degreek Pfaffians. Removing those Pfaffians, whose modulus cannot dominate the others, we obtain kF0 (x, y, z)kp = 1, kF1 (x, y, z)kp = kx, y, zkp , kF2 (x, y, z)kp = kx2 , y 2, z 2 kp , kF3 (x, y, z)kp = kx2 y, xy 2kp . 46 STEFFEN KIONKE AND BENJAMIN KLOPSCH Hence Proposition 4.6 yields the formula Z 3r k1, x2 , y 2, z 2 , x2 y, xy 2k−1−s dµ(x, y, z) ζ̺ (s) = q p f3 3r 3r −1 = q + q (1 − q ) ∞ X ℓ=1 q 3ℓ Z | P2 (o) kπ −2ℓ , π −3ℓ I3 k−1−s dµP2 ,p , p {z } (∗) where I3 is the sheaf of ideals on P2 /o generated by the image of O(3)∨ = O(−3) after pairing with the sections x2 y and xy 2 of the 3rd twisting sheaf O(3). The fibres of the reduction map P2 (o) → P2 (κ) admit global charts and via these charts the contribution to the integral (∗) from any one fibre can be written as an integral over πo2 . Thus it remains to compute the integral over every fibre. Let (x̄ : ȳ : z̄) ∈ P2 (κ) be a point in projective coordinates. (a) There are q(q−1) many points satisfying x̄, ȳ 6= 0. In these fibres the integral has constant value q −2 q −3ℓ−3ℓs and working out the geometric series, we obtain the overall contribution ∞ X q −3s 3r −1 −2 q −3ℓs = q 3r (1 − q −1 )2 q (1 − q ) · q(q − 1) · q 1 − q −3s ℓ=1 to ζ̺ (s). (b) There are q points satisfying x̄ 6= 0 and ȳ = 0. In these fibres one can compute the integral by distinction of the cases |y|p ≥ q −ℓ and |y|p < q −ℓ . Similarly, there are q points satisfying x̄ = 0 and ȳ 6= 0; these points yield the same contributions, because the integral formula is symmetric in x and y. We obtain the overall contribution q 3r 2(1 − q −1 ) q −2s − q −1−5s (1 − q −3s )(1 − q −2s ) to ζ̺ (s). (c) Finally, the integral over the fibre of the remaining point (0 : 0 : 1) is more intricate: the resulting 3-dimensional summation, over ℓ and the valuations of x and y, can be calculated by choosing a suitable cone decomposition of the parameter space. For example, we first considered the case where x and y have the same valuation and then used the symmetry in x and y to treat the remaining cases. Skipping the details, we record the overall contribution  1−9s 3r −1 3 q −1−2s +q −4s +q 1−6s q (1 − q ) + (1−q−3sq )(1−q1−6s ) (1−q −2 )(1−q 1−6s )  2(q −1−4s +q −6s +q −1−8s ) 2q −2−2s 2q 1−8s + (1−q−2 )(1−q + + −1 )(1−q −2s ) (1−q −2 )(1−q −2s )(1−q 1−6s ) (1−q −2s )(1−q −3s )(1−q 1−6s ) to ζ̺ (s). Addition and simplification yields the explicit formula.  7.2. Induction from a Borel subgroup to Ur3 (o). Let e be a quadratic extension field of f and let oe denote the ring of integers of e. Denote the non-trivial Galois automorphism of e over f by σ. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 47 Let U3 be the unitary group scheme over o associated to the extension oe and  0 0 1 the non-degenerate hermitian matrix W = 0 1 0 . We study the group 1 0 0 G = U3 (o) = {g ∈ GL3 (oe ) | σ(g)tr W g = W } of o-rational points and its principal congruence subgroups Gr = G ∩ GLr3 (oe ) as in Section 7.1. Further we write B and B r = B ∩ GLr3 (oe ) to denote the Borel subgroups of upper triangular matrices in G and Gr respectively. Consider the o-Lie lattice u3 = {Z ∈ Mat3 (oe ) | σ(Z)tr W + W Z = 0}. The groups Gr and B r are finitely generated torsion-free potent pro-p groups whenever r ≥ 2e for p = 2 and r ≥ e(p − 2)−1 for p > 2, where e denotes the ramification index of f over Qp . In this case π r u3 , regarded as a Zp -Lie lattice, is the Lie lattice associated to Gr . Proposition 7.2. Suppose that p is odd and that e is unramified over f. In the set-up described above and subject to r ≥ e(p − 2)−1 , the zeta function of the r representation ̺ = IndG B r (1B r ) is ζ̺ (s) = q 3(r−1) q 1−2s (q − q −s )(q −s u(q s ) + qu(q −s )) (1 − q 1−6s ) where u(X) = X 2 + X + X −2 . The abscissa of convergence is α(̺) = 1/6. As before, it would be interesting to find an interpretation for the value 1/6; it is highly suggestive that the abscissa agrees with the one found in Proposition 7.1. From the given formula it is easy to verify that ζ̺ satisfies a functional equation, in accordance with Theorem 5.1. A similar formula holds in case e is ramified over f, however the resulting zeta function does not admit a functional equation. In the ramified case the denominator is still (1 − q 1−6s ), whereas the numerator is given by a more complicated formula. Proof of Proposition 7.2. Since p is odd, the canonical map oe ⊗o u3 → gl3 (oe ) is an isomorphism of oe -Lie lattices. Since e is unramified over f, we find δ ∈ o× e ro 2 × with δ ∈ o . Then 1, δ form an o-basis for oe and σ(δ) = −δ. Let k ≤ u3 be the Lie sublattice of strictly lower triangular matrices; clearly k ⊕ b = u3 , and the matrices 0 0 0 0 0 0 0 0 0 A= δ00 , B= 1 0 0 , C = 000 0 δ 0 0 −1 0 δ 0 0 form an o-basis for k. Consider an o-linear map ω : u3 → f that vanishes on b, and put u = ω(A), v = ω(B) and w = ω(C). We need to find the symplectic minors of the symplectic form ω̃ on u3 , given by ω̃(X, Y ) = ω([X, Y ]) for X, Y ∈ u3 . The symplectic minors are invariant under base change. As oe ⊗o u3 ∼ = gl3 (oe ) we simply need to compare the basis A, B, C with the basis E2,1 , E3,2 , E3,1 used in the proof of Proposition 7.1. In the notation used there, we obtain x = 21 (v + δ −1 u), y = 12 (δ −1 u − v) and z = δ −1 w. Observe that |v + δ −1 u|p = 48 STEFFEN KIONKE AND BENJAMIN KLOPSCH max{|u|p, |v|p }, Because u, v ∈ o and 1, δ are o-linearly independent. We finally get the formula Z 3r k1, u2, v 2 , w 2 , u3, v 3 k−1−s dµ(u, v, w). ζ̺ (s) = q p f3 Now the explicit formula can be computed as in the proof of Proposition 7.1.  7.3. Induction from a maximal parabolic subgroup to GLrn (o). Let n, t ∈ N such that n = t + t′ with 1 ≤ t ≤ t′ := n − t. We consider the general linear group G = GLn (o) and, for r ∈ N, its principal congruence subgroup Gr = ker(GLn (o) → GLn (o/pr )). We are interested in the maximal parabolic subgroup of type (t, n − t), defined by  H = Hn,t = (gij ) ∈ GLn (o) | gij = 0 for i ≤ t < j   0 ··· 0 .. ..  ..  . . .  GLt (o)   0 ··· 0  = , ··· o o  .  . . . . . . . . GLn−t (o)  o ··· o and we set H r = H ∩ Gr . The groups Gr and H r are finitely generated torsionfree potent pro-p groups whenever r ≥ 2e for p = 2 and r ≥ e(p−2)−1 for p > 2, where e denotes the ramification index of f over Qp . Our aim is to compute the Gr zeta function of the induced representation Ind H r (1B r ) for such r. Qm −j For m ∈ N0 , define Vq (m) = j=1 (1 − q ), viz. the volume of GLm (o) with respect to the additive Haar measure on Matm,m (o). For a subset J = {x1 , . . . , x|J| } ⊆ {1, . . . , t} with x1 < . . . < x|J| we write |J| Y Vq (t)Vq (n − t) Vq (xj − xj−1 )−1 , Vn,t (J) = Vq (t − x|J| )Vq (n − t − x|J| ) j=1 with the convention x0 = 0. Theorem 7.3. In the set-up described above and subject to r ≥ 2e if p = 2 and r r ≥ e(p − 2)−1 if p > 2, the zeta function of the representation ̺ = IndG H r (1B r ) is X Y q −j(n−j)s (7.1) ζ̺ (s) = q rt(n−t) Vn,t (J) . 1 − q −j(n−j)s j∈J J⊆{1,...,t} The abscissa of convergence is α(̺) = 0. Remark 7.4. Even though the formula in (7.1) seems complicated, it is rather easy to evaluate the occurring terms for small values of t. For instance, for t = 1 we obtain   −(n−1)−(n−1)s  q −(n−1)s −(n−1) r(n−1) r(n−1) 1 − q 1+ 1−q ζ̺ (s) = q = q . 1 − q −(n−1)s 1 − q −(n−1)s ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 49 This formula will be generalised in Section 7.4. It should also be compared with the formula obtained in Proposition 6.5. The proof of Theorem 7.3 requires some preparations. For N, k ∈ N0 , a composition of length k of N is a k-tuple u = (u1, . . . , uk ) of positive integers such that N = u1 + . . . + uk ; we put N(u) = N and λ(u) = k. In particular, the empty tuple is a composition of 0 of length 0. We denote by Comp(N) the set of all compositions of N. Set g = gln (o), and let h = {(Xij ) ∈ g | Xij = 0 for i ≤ t < j} denote the parabolic o-Lie sublattice of type (t, n−t), related to H. We identify the quotient g/h with the o-lattice Matt,t′ (o) of t × t′ -matrices, by projecting onto the upper right t × t′ -block. Furthermore, we identify the f-dual space (g/h)∗ = Homo (g/h, f) with the f-vector space Matt′ ,t (f) via the trace form Matt′ ,t (f) × Matt,t′ (o) → f, | {z } | {z } ∼ =(g/h)∗ (M, X) 7→ Tr(MX), ∼ =g/h and we identify the Pontryagin dual (g/h)∨ ∼ = Homo (g/h, f/o) with the space Matt′ ,t (f/o); compare Section 4.2. Indeed, writing M ∈ Matt′ ,t (f/o) for the image of M ∈ Matt′ ,t (f), we obtain an isomorphism Matt′ ,t (f/o) → (g/h)∨ , M 7→ ωM , ωM : g/h → f/o, where ωM (X) = Tr(MX) + o for M ∈ Matt′ ,t (f). In order to apply Proposition 4.3, we need to calculate |g : stabg (ω)| for every form ω ∈ (g/h)∨ . We make use of the Levi subgroup L ≤c H. This is the group of block diagonal matrices  L = (gij ) ∈ H | gij = 0 for j ≤ t < i ∼ = GLt (o) × GLn−t (o), and accordingly we write elements of L as pairs (g, h) ∈ GLt (o) × GLn−t (o). The action of L on (g/h)∨ ∼ = Matt′ ,t (f/o) via the co-adjoint representation is described explicitly by (g, h).M = hMg −1 for (g, h) ∈ L and M ∈ Matt′ ,t (f); indeed, for X ∈ Matt,t′ (o) ∼ = g/h we obverse that  (g, h).ωM (X) = Tr(Mg −1 Xh) = Tr(hMg −1 X) = ωhM g−1 (X). Next we determine an explicit set of orbit representatives for the L-orbits in Matt′ ,t (f/o). To this end we introduce the parameter set Ξ = Ξn,t consisting of all pairs ξ = (u, γ), where u is a composition satisfying N(u) ≤ t and γ = (γ1 , . . . , γλ(u) ) is a strictly increasing sequence of negative integers so that γ1 < . . . < γλ(u) < 0. For ξ = (u, γ) ∈ Ξ we define ( Pk−1 P γk if j=1 uj < i ≤ kj=1 uj , αi (ξ) = where 1 ≤ i ≤ t, 0 if N(u) < i, 50 STEFFEN KIONKE AND BENJAMIN KLOPSCH and we associate to ξ the matrices  π α1 (ξ)      Mξ =    0  .  .. 0 π α2 (ξ) .. ··· ···     .  αt (ξ)  ∈ Mat ′ (f) π  t ,t  0  ..  .  0 and Mξ ∈ Matt′ ,t (f/o). The elementary divisor theorem implies that M = Mn,t = {Mξ | ξ ∈ Ξ} is a system of representatives of the L-orbits in Matt′ ,t (f/o). Since |g : stabg (ω)| is constant on the co-adjoint orbit of a form ω with regard to L, it suffices to determine, for ξ ∈ Ξ, the index |g : stabg (ωMξ )| and the size of the L-orbit of Mξ . Lemma 7.5. Let ξ = (u, γ) ∈ Ξ. The stabiliser of ωMξ in g satisfies g : stabg (ωMξ ) 1/2 λ(u) = Y q −uiγi (n−ui −2 Pi−1 j=1 uj ) . i=1 Lemma 7.6. Let ξ = (u, γ) ∈ Ξ and put N = N(u). The L-orbit of Mξ has the cardinality λ(u)  Y Pi−1 Vq (t)Vq (n − t) Vq (ui )−1 q −(n−N )γi ui + j=1 (γi −γj )ui uj . |L.Mξ | = Vq (t − N)Vq ((n − t) − N) i=1 We postpone the proofs of the lemmata and explain first how Theorem 7.3 can be deduced. Proof of Theorem 7.3. For any composition u, we set λ(u) Y Vq (t)Vq (n − t) Wu = Vq (ui )−1 . Vq (t − N(u))Vq ((n − t) − N(u)) i=1 ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 51 It follows from Proposition 4.3 and from Lemmata 7.5 and 7.6 that ̺ = r IndG H r (1B r ) satisfies X −1−s 1 |g : stabg (ω)| /2 ζ̺ (s) = q rt(n−t) ω∈(g/p)∨ =q X rt(n−t) λ(u) Y L.Mξ X Wu X =q Wu λ(u) Y j=1 2 q N (u)γi ui −γi ui − i=1 ξ=(u,γ)∈Ξ rt(n−t) Pi−1 uj )(1+s) i=1 ξ=(u,γ)∈Ξ = q rt(n−t) q ui γi (n−ui −2 λ(u) Y q ui γi (n−ui −2 P j<i (γi +γj )ui uj Pi−1 j=1 uj )s q ui γi (n−ui −2 Pi−1 j=1 uj )s  . i=1 ξ=(u,γ)∈Ξ Let ξ = (u, γ) ∈ Ξ. Since γ1 < γ2 < . . . < γλ(u) < 0 is strictly increasing, we Pλ(u) may write γi = − k=i βk for certain positive integers β1 , . . . , βλ(u) ∈ N. Using this reparametrisation, we obtain ζ̺ (s) = q rt(n−t) X λ(u) Wu ξ=(u,γ)∈Ξ =q rt(n−t) X Y =q X Wu uj )s Y q −ui Pλ(u) k=i βk (n−ui −2 P j<i uj )s β1 ,β2 ,..., i=1 βλ(u) ∈N Wu ∞ X β1 =1 X λ(u) N ∈{0,...,t} u∈Comp(N ) j=1 λ(u) X N ∈{0,...,t} u∈Comp(N ) = q rt(n−t) Pi−1 i=1 N ∈{0,...,t} u∈Comp(N ) rt(n−t) q ui γi (n−ui −2 Wu Y k=1 ··· ∞  X q − Pλ(u) k=1 βk Pk i=1 ui (n−ui −2  Pi−1 j=1 uj )s βλ(u) =1 q− Pk 1 − q− i=1 ui (n−ui −2 Pk i=1 Pi−1 ui (n−ui −2 j=1  uj )s Pi−1 j=1 uj )s , wherePthe last step is derived using the geometric series. Finally, we write xk = ki=1 ui for k ∈ {1, . . . , λ(u)}. Then every composition u yields a set J = Ju = {x1 , x2 , . . . , xλ(u) } ⊆ {1, . . . , t} and every such set J corresponds uniquely of the number N = Pi−1 Pkto a composition max(J). This proves the theorem since i=1 ui (n−ui −2 j=1 uj ) = xk (n−xk ) and Wu = Vn,t (J).  Proof of Lemma 7.5. Let ξ = (u, γ) ∈ Ξ. As explained in Section 4.2, the index |g : stabg (ωMξ )| can be computed via the Pfaffians of the symplectic form Aξ : g × g → f, ^ Aξ (X, Y ) = wMξ ([X, Y ] + h) := Tr(Mξ [X, Y ]), 52 STEFFEN KIONKE AND BENJAMIN KLOPSCH where Ze ∈ Matt,t′ (o) denotes the projection of Z ∈ g onto its upper right t × t′ block. The elementary n × n-matrices Ei,j , with entry 1 in position (i, j) and entries 0 elsewhere, form an o-basis of g. A short calculation yields  α (ξ)  if j1 = i2 , j2 = i1 + t and i1 ≤ t π i1 α (ξ) i Aξ (Ei1 ,j1 , Ei2 ,j2 ) = −π 2 if j2 = i1 , j1 = i2 + t and i2 ≤ t .  0 otherwise Thus g, equipped with the form Aξ , decomposes into an orthogonal direct sum of subspaces of three different types. Type 1. For i > t and j ∈ / {t + 1, . . . , 2t}, the space oEi,j is contained in the radical of Aξ , this means, Aξ (Ei,j , X) = 0 for all X ∈ g. Type 2. For 1 ≤ i ≤ t and j > 2t, the free o-module of rank 2 spanned by Ei,j and Ej,i+t is orthogonal to all other elementary matrices. The form Aξ restricted to this space has the Pfaffian pαi (ξ) . For each i with 1 ≤ i ≤ t there are (n − 2t) possible choices for a corresponding index j. Type 3. For 1 ≤ i, j ≤ t the o-module of rank 3 spanned by Ei,j ,Ej,i+t and Ei+t,j+t is orthogonal to all other elementary matrices. The form Aξ restricted to this space has the degree-1 Pfaffian pmin(αi (ξ),αj (ξ)) . The sequence of numbers αi (ξ), i ∈ {1, . . . , t}, is increasing. Thus we can determine the maximal Pfaffian of Aξ , and hence |g : stabg (ωMξ )| /2 = q − 1 Pt i=1 αi (ξ)(n−2i+1) = q− Pλ(u) i=1 γi ui (n−ui −2 P j<i uj ) .  Proof of Lemma 7.6. Let ξ = (u, γ) ∈ Ξ and put N = N(u). We compute the stabiliser StabL (Mξ ) of Mξ ∈ Matt′ ,t (f/o) and its volume with respect to the normalised additive Haar measure on Matt,t (o) × Matt′ ,t′ (o). For simplicity we denote by vol the normalised additive Haar measure on any implicitly given o-lattice. Suppose (g, h) ∈ L = GLt (o) × GLt′ (o) lies in the stabiliser of Mξ . Write     A C B X g= and h = U V D Y with A, B ∈ MatN,N (o), C, U tr ∈ MatN,t−N (o), V ∈ Matt−N,t−N (o), Y ∈ Matt′ −N,t′ −N (o). D, X tr ∈ Matt′ −N,N (o), Let Mξ◦ denote the upper left N × N-block of the matrix Mξ . The assumption hMξ = Mξ g is equivalent to the following three conditions (i) BMξ◦ − Mξ◦ A ≡o 0, (ii) DMξ◦ ≡o 0, (iii) Mξ◦ C ≡o 0. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 53 Writing D = (dij ), we observe that condition (ii) is equivalent to dij ∈ p−αj (ξ) for 1 ≤ i ≤ t′ −N and 1 ≤ j ≤ N. Thus the set Z2 of all matrices D ∈ Matt′ −N,N (o) that satisfy condition (ii) has volume Yλ(u) YN ′ ′ q γi ui (t −N ) . q αj (ξ)(t −N ) = vol(Z2 ) = i=1 j=1 Similarly, writing C = (cij ), we see that condition (iii) means: cij ∈ p−αi (ξ) for 1 ≤ i ≤ N and j ≤ t − N. Thus the volume of the set Z3 of all matrices C ∈ MatN,t−N (o) that satisfy condition (iii) is Yλ(u) YN q γi ui (t−N ) . q αi (ξ)(t−N ) = vol(Z3 ) = i=1 i=1 Since αi (ξ) < 0 for 1 ≤ i ≤ N, the matrices C and D vanish modulo π. Consequently, the square matrices A, B, V, Y are invertible over o. Now consider condition (i). Writing A = (aij ) and B = (bij ), we see that condition (i) is equivalent to (7.2) aij π αi (ξ) ≡o bij π αj (ξ) for 1 ≤ i, j ≤ N. Let Z1 denote the set of all pairs (A, B) ∈ GLN (o) × GLN (o) satisfying (7.2). We observe that, if (A, B) ∈ Z1 , then A is contained in the group G(ξ) = {(zij ) ∈ GLN (o) | zij  GLu1 (o) pγ2 −γ1  GLu2 (o)  o = . ..  .. . o ··· ∈ π αj (ξ)−αi (ξ) o for i ≤ j}  ··· pγλ(u) −γ1 .. ..  . .  . .. . pγλ(u) −γλ(u)−1  o GLuλ(u) (o) Moreover, for any A ∈ G(ξ), there are matrices B such that (A, B) ∈ Z1 and each entry bij ∈ o is uniquely determined modulo π −αj (ξ) . We deduce that vol(Z1 ) = vol(G(ξ)) N Y q αk (ξ)N = λ(u) Y λ(u) vol(GLui (o))q N γi ui i=1 k=1 Y q (γi −γj )ui uj j=i+1  . Recalling that vol(GLm (o)) = Vq (m) for m ∈ N, we combine the three volume computations to conclude that vol(StabL (Mξ )) = vol(Z1 ) vol(Z2 ) vol(Z3 ) vol(GLt−N (o)) vol(GLt′ −N (o)) ′ = Vq (t − N)Vq (t − N) λ(u) Y ′ Vq (ui )q (t+t −N )ui γi + i=1 Pλ(u) j=i+1 (γi −γj )ui uj  . The claim now follows from the observation that the orbit length can be expressed in terms of the volume as follows: |L.Mξ | = |L : StabL (Mξ )| = Vq (t)Vq (n − t) . vol(StabL (Mξ ))  54 STEFFEN KIONKE AND BENJAMIN KLOPSCH 7.4. Induction from a maximal (1, n)-parabolic subgroup to GLdr n+1 (∆). Let o be a compact discrete valuation ring of characteristic 0, residue characteristic p and residue field cardinality q. Fix a uniformiser π so that the valuation ideal of o takes the form p = πo. Let f denote the fraction field of o, a finite extension of Qp , and consider a central division algebra d of index d over f so that dimf d = d2 . It is known that d contains a unique maximal o-order ∆. Up to isomorphism, d and ∆ can be described explicitly, in terms of the index d and a second invariant h satisfying 1 ≤ h ≤ d and gcd(h, d) = 1; see [44, §14]. Fix n ∈ N and set G = GLn+1 (∆). For r ∈ N, we take interest in the principal congruence subgroup  Gdr = ker GLn+1 (∆) → GLn+1 (∆/π r ∆) . The maximal parabolic subgroup   GL1 (∆) 0 ··· 0  ∆   ≤ GLn+1 (∆) H = .  .. GLn (∆)  ∆ gives rise to a subgroup H dr = H ∩ Gdr ≤c Gdr . The groups Gdr and H dr are finitely generated torsion-free potent pro-p groups whenever r ≥ 2e for p = 2 and r ≥ e(p−2)−1 for p > 2, where e denotes the ramification index of f over Qp ; compare [3, Prop. 2.3]. Proposition 7.7. In the set-up described above and subject to r ≥ 2e for p = 2 and r ≥ e(p − 2)−1 for p > 2, the zeta function of the induced representation dr ̺ = IndG H dr (1H dr ) is −dn(1+s) rnd2 1 − q ζ̺ (s) = q . 1 − q −dns Proof. The division algebra d contains a splitting field e that is unramified of degree d over f. Thus e = f(ξ), where ξ is a primitive (q d − 1)th root of unity, and e|f is a cyclic Galois extension. The ring of integers in e is o[ξ]. Furthermore there exists a uniformiser Π ∈ d so that Πd = π and Πx = σ(x)Π for all x ∈ e, h where σ is the generator of Gal(e|f) satisfying σ(ξ) = ξ q . In this way we obtain an f-basis (ξ i Πj )0≤i,j≤d−1 for d that is at the same time an o-basis for ∆: Xd−1 Xd−1 o ξ i Πj . ∆= j=0 i=0 P Pd−1 i j The reduced trace trd|f (x) of an element x = d−1 j=0 ai,j ξ Π satisfies i=0  Xd−1 i ai,0 ξ . trd|f (x) = Tre|f i=0 Observe that the symmetric f-bilinear trace form e × e → f, (x, y) 7→ Tre|f (xy) restricts to a symmetric o-bilinear form o[ξ] × o[ξ] → o that is non-degenerate, ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 55 i.e. non-degenerate modulo p at the level of residue fields. Consequently, the f-bilinear pairing ∆ × d → f, (x, y) → 7 trd|f (xy) induces isomorphisms and Homo (∆, f/o) ∼ Homo (∆, f) ∼ = d/Π−d+1 ∆. =d For m = m0 d + m1 with m0 ≥ 0 and 0 ≤ m1 ≤ d − 1, we take a closer look at the related o-bilinear form βm : ∆ × ∆ → f, (x, y) 7→ trd|f (xyΠ−m ) = π −m0 trd|f (xyΠ−m1 ). Its structure matrix with respect to the o-basis (ξ i Πj )0≤i,j≤d−1 of ∆, ordered as (1, ξ, . . . , ξ d−1, Π, ξΠ, . . . , ξ d−1 Π, . . . . . . , Πd−1 , ξΠd−1 , . . . , ξ d−1 Πd−1 ), takes the shape   A0  A1  ···   −m0 Am1 Bm = π      πAm1 +2 ··· πAd−1       ∈ Matd2 (o), πAm1 +1     where Ai ∈ Matd (o) denotes the structure matrix of the o-bilinear form o[ξ] × o[ξ] → o, (x, y) 7→ Tre|f (xσ i (y)) with respect to the o-basis (1, ξ, . . . , ξ d−1). Since each of the latter forms is non-degenerate, we infer that the elementary divisors of Bm are π −m0 , with multiplicity (m1 + 1)d, and π −m0 +1 , with multiplicity (d − m1 − 1)d. We consider the o-Lie lattice g = gln+1 (∆). The elementary matrices Eij , with 1 ≤ i, j ≤ n + 1, form a ∆-basis of the left ∆-module g. Let h denote the maximal parabolic o-Lie sublattice of g that is spanned as a ∆-submodule by those Eij satisfying (i, j) = (1, 1) or i ≥ 2. For m ∈ N0 with m ≥ d − 1, we take interest in the o-linear form X wm : g → f, z = zij Eij 7→ trd|f (z1,n+1 Π−m ) 1≤i,j≤n+1 and the induced o-linear form ωm : g → f/o, z 7→ wm (z) + o. Clearly, wm (h) = {0} ⊆ o. Furthermore, the co-adjoint action of the Levi subgroup   GL1 (∆) 0 ··· 0  0   ≤ GLn+1 (∆), L= .  .. GLn (∆)  0 associated with h, on Homo (g, f) maps W = {w ∈ Homo (g, f) | w(h) ⊆ o} to itself. We observe that, modulo Homo (g, o), the L-orbits on W are parametrised 56 STEFFEN KIONKE AND BENJAMIN KLOPSCH by the elements wm , m ≥ d − 1. Furthermore, the volume of Wm = L.wm + Homo (g, o) is equal to ( (q dn − 1)q dn(m−d) if m ≥ d, µ(Wm ) = 1 if m = d − 1, where µ denotes the Haar measure normalised so that µ(Homo (g, o)) = 1. We choose a total order ≺ on index pairs {(k, l) | 1 ≤ k, l ≤ n + 1} such that (1, 1) ≺ (1, n + 1) ≺ (n + 1, n + 1) ≺ (1, 2) ≺ (2, n + 1) ≺ (1, 3) ≺ (3, n + 1) ≺ . . . ≺ (1, n) ≺ (n, n + 1) ≺ any (k, l) with k 6= n + 1 and l 6= 1. Let Y denote the o-basis of g consisting of the basis elements ξ i Πj Ekl , where 0 ≤ i, j ≤ d − 1 and 1 ≤ k, l ≤ n + 1, ordered according to (i, j, k, l) < (i′ , j ′ , k ′ , l′ ) ⇔  ′ ′   (k, l) ≺ (k , l ), or (k, l) = (k ′ , l′ ) and j < j ′ , or   (k, l) = (k ′ , l′ ) and j = j ′ and i < i′ . Evaluating the commutator matrix R(T) of the o-Lie lattice g with respect to Y at the point xm corresponding to wm , we obtain   B0   B1     B2     .. .  ∈ Mat(n+1)2 d2 (o), R(xm ) =    Bn−1         where and   0 Bm 0 tr 0 Bm  ∈ Mat3d2 (o) B0 = −Bm tr 0 −Bm 0 B1 = . . . = Bn−1 =  0 Bm tr −Bm 0  ∈ Mat2d2 (o) each have elementary divisors π −m0 , with multiplicity 2(m1 + 1)d, and π −m0 +1 , with multiplicity 2(d − m1 − 1)d, the remaining d2 elementary divisors of B0 ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 57 being π ∞ = 0. This gives |g : stabg (ωm )| /2 = 1 [ {Pfaff k (wm ) | 0 ≤ k ≤ ⌊d2 (n+1)2/2⌋} p = kPfaff nd2 (w)kp = |(π −m0 )(m1 +1)dn (π −m0 +1 )(d−m1 −1)dn |p = q nd(m−(d−1)) . dr Thus, by Proposition 4.4, the zeta function of ̺ = IndG H dr (1H dr ) is given by ! ∞ [ X −1−s 2 ζ̺ (s) = q rnd {Pfaff k (wm ) | 0 ≤ k ≤ ⌊d2 (n+1)2/2⌋} µ(Wm ) p m=d−1 =q =q rnd2 rnd2 2 = q rnd 1+  ∞ X m=d 1+ 1−q   −1−s q dn − 1 q dn(m−d) q nd(m−(d−1)) −dn 1 − q −dn(1+s) . 1 − q −dns  q −dns 1 − q −dns  !  References [1] A. Aizenbud and N. Avni, Representation growth and rational singularities of the moduli space of local systems, Invent. Math. 204 (2016), 245–316. [2] N. Avni, B. Klopsch, U. Onn, and C. Voll, Representation zeta functions of some compact p-adic analytic groups, Zeta functions in algebra and geometry, Contemp. Math., vol. 566, Amer. Math. Soc., Providence, RI, 2012, pp. 295–330. , Representation zeta functions of compact p-adic analytic groups and arithmetic [3] groups, Duke Math. J. 162 (2013), 111–197. , Similarity classes of integral p-adic matrices and representation zeta functions [4] of groups of type A2 , Proc. London Math. Soc. 112 (2016), 267–350. [5] , Arithmetic groups, base change, and representation growth, Geom. Funct. Anal. 26 (2016), 67–135. [6] L. Bartholdi, and R. I. Grigorchuk, On parabolic subgroups and Hecke algebras of some fractal groups, Serdica Math. J. 28 (2002), 47–90. [7] H. Bass, A. Lubotzky, A. R. Magid and S. Mozes, The proalgebraic completion of rigid groups, in: Proceedings of the Conference on Geometric and Combinatorial Group Theory, Part II (Haifa, 2000), Geom. Dedicata 95 (2002), 19–58. [8] V. V. Batyrev, Birational Calabi-Yau n-folds have equal Betti numbers, New trends in algebraic geometry (K. Hulek et al., eds.), Cambridge University Press, Cambridge, 1999. [9] M. B. Bekka, and P. de la Harpe, Irreducibility of Unitary Group Representations and Reproducing Kernels Hilbert Spaces, Expo. Math. 21 (2003), 115–149. [10] C. Blondel, Quelques propriétés des paires couvrantes, Math. Ann. 331 (2005), 243–257. [11] D. Bump, Lie groups, Springer-Verlag, New York, 2013. [12] C. J. Bushnell and G. Henniart, The local Langlands conjecture for GL(2), SpringerVerlag, Berlin, 2006. [13] P. S. Campbell, M. Nevins, Branching rules for unramified principal series representations of GL(3) over a p-adic field, J. Algebra 321 (2009), 2422–2444. 58 STEFFEN KIONKE AND BENJAMIN KLOPSCH [14] W. Casselman, The restriction of a representation of GL2 (k) to GL2 (o), Math. Ann. 206 (1973), 311–318. [15] C. W. Curtis, and I. Reiner, Representation Theory of Finite Groups and Associative Algebras, Wiley, New York, 1988. [16] V. I. Danilov, Cohomology of algebraic varieties, in Algebraic geometry II, 1–125, Encyclopaedia Math. Sci., 35, Springer, Berlin, 1996. [17] P. Deligne et al., Cohomologie étale, Séminaire de Géométrie Algébrique du Bois-Marie SGA 4 21 , Springer-Verlag, Berlin-New York, 1977. [18] J. Denef, and D. Meuser, A functional equation of Igusa’s local zeta function, Amer. J. Math. 113 (1991), 1135–1152. [19] J. D. Dixon, The structure of linear groups, Van Nostrand-Reinhold Company, London, 1971. [20] J. D. Dixon, M. P. F. du Sautoy, A. Mann, and D. Segal, Analytic pro-p groups, Cambridge University Press, Cambridge, 1999. [21] D. H. Dung and C. Voll, Uniform analytic properties of representation zeta functions of finitely generated nilpotent groups, Trans. Amer. Math. Soc. 369 (2017), 6327–6349. [22] J. González-Sánchez, On p-saturable groups, J. Algebra 315 (2007), 809–823. [23] J. González-Sánchez, Kirillov’s orbit method for p-groups and pro-p groups, Comm. Algebra 37 (2009), 4476–4488. [24] J. González-Sánchez and A. Jaikin-Zapirain, On the structure of normal subgroups of potent p-groups, J. Algebra 276 (2004), 193–209. [25] J. González-Sánchez, and B. Klopsch, Analytic pro-p groups of small dimension, ,J. Group Theory 12 (2009), 711–734. [26] B. H. Gross, Some applications of Gelfand pairs to number theory, Bull. Amer. Math. Soc. 24 (1991), 277–301. [27] F. J. Grunewald, D. Segal and G. Smith, Subgroups of finite index in nilpotent groups, Invent. Math. 93 (1988), 185–223. [28] G. Harder, Eisenstein cohomology of arithmetic groups. The case GL2 , Invent. Math. 89 (1987), 37–118. [29] M. Harris and R. Taylor, The geometry and cohomology of some simple Shimura varieties, Princeton University Press, Princeton, NJ, 2001. [30] R. Hartshorne, Algebraic geometry, Springer-Verlag, New York-Heidelberg, 1977. [31] G. Henniart, Une preuve simple des conjectures de Langlands pour GL(n) sur un corps p-adique, Invent. Math. 139 (2000), 439–455. [32] H. Hironaka, Resolution of singularities of an algebraic variety over a field of characteristic zero. I, II, Ann. of Math. (2) 79 (1964), 109–203; ibid. 205–326. [33] A. Jaikin-Zapirain, Zeta function of representations of compact p-adic analytic groups, J. Amer. Math. Soc. 19 (2006), 91–118. [34] B. Klopsch, On the Lie theory of p-adic analytic groups, Math. Z. 249 (2005), 713–730. [35] B. Klopsch, Representation growth and representation zeta functions of groups, Note Mat. 33 (2013), 107–120. [36] J. Kollár, Lectures on resolution of singularities, Princeton University Press, Princeton, NJ, 2007. [37] Y. Komori, K. Matsumoto and H. Tsumura, On Witten multiple zeta-functions associated with semisimple Lie algebras II, J. Math. Soc. Japan 62 (2010), 355–394. [38] M. Larsen and A. Lubotzky, Representation growth of linear groups, J. Eur. Math. Soc. 10 (2008), 351–390. [39] A. Lubotzky and B. Martin, Polynomial representation growth and the congruence subgroup growth, Israel J. Math. 144 (2004), 293–316. [40] S. Mandelbrojt, Dirichlet Series - Principles and Methods, D. Reidel Publishing Co., Dordrecht 1972. [41] J. Neukirch, Algebraic number theory, Springer-Verlag, Berlin, 1999. ZETA FUNCTIONS FOR REPRESENTATIONS OF p-ADIC LIE GROUPS 59 [42] M. Nevins, On branching rules of depth-zero representations, J. Algebra 408 (2014), 1–27. [43] U. Onn and P. Singla, On the unramified principal series of GL(3) over non-Archimedean local fields, J. Algebra 397 (2014), 1–17. [44] I. Reiner, Maximal orders, Oxford University Press, Oxford, 2003. [45] D. Renard, Représentations des groupes réductifs p-adiques, Société Mathématique de France, Paris, 2010. [46] T. Rossmann, Topological representation zeta functions of unipotent groups, J. Algebra 448 (2016), 210–237. [47] P. Sarnak and S. Adams, Betti numbers of congruence groups, Israel J. Math. 88 (1994), 31–72. [48] J.-P. Serre, Local Fields, Springer-Verlag, New York-Heidelberg, 1979. , Galois Cohomology, Springer-Verlag, Berlin, 2002. [49] [50] R. P. Stanley, Combinatorial reciprocity theorems, Advances in Math. 14 (1974), 194– 253. [51] , Combinatorics and commutative algebra, second ed., Birkhäuser Boston, Inc., Boston, MA, 1996. [52] A. Stasinski and C. Voll, Representation zeta functions of nilpotent groups and generating functions for Weyl groups of type B, Amer. J. Math. 136 (2014), 501–550. [53] M. F. Vignéras, Reprśentations l-modulaires d’un groupe réductif p-adique avec l 6= p, Birkhäuser Boston, Inc., Boston, MA, 1996. [54] C. Voll, Functional equations for zeta functions of groups and rings, Ann. of Math. (2) 172 (2010), 1181–1218. , Zeta functions of groups and rings—recent developments, in: Groups St Andrews [55] 2013 (ed. C. M. Campbell e. a.), 469–492, Cambridge Univ. Press, Cambridge, 2015. [56] A. Weil, Adeles and Algebraic Groups, Birkhäuser Basel, 1982. [57] E. Witten, On quantum gauge theories in two dimensions, Comm. Math. Phys. 141 (1991) 153–209. [58] M. Zordan, Poincaré series of Lie lattices and representation zeta functions of arithmetic groups, preprint: arXiv:1704.04165. Mathematisches Institut, Heinrich-Heine-Universität, Universitätsstr. 1, 40225 Düsseldorf, Germany E-mail address: [email protected] Mathematisches Institut, Heinrich-Heine-Universität, Universitätsstr. 1, 40225 Düsseldorf, Germany E-mail address: [email protected]
4math.GR
1 NOMA Assisted Wireless Caching: Strategies and Performance Analysis Zhiguo Ding, Senior Member, IEEE, Pingzhi Fan, Fellow, IEEE, George K. arXiv:1709.06951v2 [cs.IT] 19 Jan 2018 Karagiannidis, Fellow, IEEE, Robert Schober, Fellow, IEEE, and H. Vincent Poor, Fellow, IEEE (Invited Paper) Abstract Conventional wireless caching assumes that content can be pushed to local caching infrastructure during off-peak hours in an error-free manner; however, this assumption is not applicable if local caches need to be frequently updated via wireless transmission. This paper investigates a new approach to wireless caching for the case when cache content has to be updated during on-peak hours. Two non-orthogonal multiple access (NOMA) assisted caching strategies are developed, namely the pushthen-deliver strategy and the push-and-deliver strategy. In the push-then-deliver strategy, the NOMA principle is applied to push more content files to the content servers during a short time interval reserved for content pushing in on-peak hours and to provide more connectivity for content delivery, compared to the conventional orthogonal multiple access (OMA) strategy. The push-and-deliver strategy is motivated by the fact that some users’ requests cannot be accommodated locally and the base station has to serve them directly. These events during the content delivery phase are exploited as opportunities for content pushing, which further facilitates the frequent update of the files cached at the content servers. It is This work was presented in part at the IEEE International Conference on Communications (ICC), Kansas City, MO, May 2018 [1]. Z. Ding and H. V. Poor are with the Department of Electrical Engineering, Princeton University, Princeton, NJ 08544, USA. Z. Ding is also with the School of Computing and Communications, Lancaster University, Lancaster, UK (email: [email protected], [email protected]). P. Fan is with the Institute of Mobile Communications, Southwest Jiaotong University, Chengdu, China (email: [email protected]). G. K. Karagiannidis is with the Department of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Thessaloniki, Greece (email: [email protected]). R. Schober is with the Institute for Digital Communications, Friedrich-Alexander-University Erlangen-Nurnberg (FAU), Germany (email: [email protected]). 2 also shown that this strategy can be straightforwardly extended to device-to-device caching, and various analytical results are developed to illustrate the superiority of the proposed caching strategies compared to OMA based schemes. I. I NTRODUCTION Recently non-orthogonal multiple access (NOMA) has received significant attention as a key enabling technique for future wireless networks [2]–[4]. The key idea of NOMA is to encourage spectrum sharing among mobile nodes, which not only improves the spectral efficiency but also ensures that massive connectivity can be effectively supported. Practical concepts for implementing the NOMA principle for a single resource block, such as an orthogonal frequency division multiplexing (OFDM) subcarrier, include power domain NOMA and cognitive radio (CR) inspired NOMA [5]–[7], which provide different tradeoffs between throughput and fairness. When each user is allowed to occupy multiple subcarriers, dynamically grouping the users on different subcarriers is a challenging problem, and various multi-carrier NOMA schemes, such as sparse code multiple access (SCMA) and pattern division multiple access (PDMA) [8], [9], provide practical solutions for achieving different performance-complexity tradeoffs. Unlike single-carrier NOMA, in multi-carrier NOMA, a user’s message is spread over multiple resource blocks, which requires efficient encoding schemes, such as multi-dimensional coding, to be implemented at the transmitter and low-complexity decoding schemes, such as message passing algorithms, to be used at the receivers. NOMA has been shown to be compatible with many other advanced communication concepts. For example, several features of millimeter-wave (mmWave) communications, such as highly directional transmission, and the mismatch between the users’ channel vectors and the commonly used finite resolution analog beamforming, facilitate the implementation of NOMA in mmWave networks [10], [11]. In addition, NOMA can further improve the spectral efficiency of multipleinput multiple-output (MIMO) systems. For example, MIMO-NOMA can efficiently exploit the spatial degrees of freedom of MIMO channels and, unlike single-input single-output (SISO) NOMA, is beneficial even if the users have similar channel conditions [12]–[14]. Furthermore, conventionally, when the users have a single antenna, cooperative transmission can be used to exploit spatial diversity but suffers from a reduced overall data rate, since relaying consumes extra bandwidth resources [15]. In this context, the application of NOMA can efficiently reduce 3 the number of consumed bandwidth resource blocks, such as subcarriers and time slots, and hence improve the spectral efficiency of cooperative communications [16]–[18]. Furthermore, existing studies have also revealed a strong synergy between NOMA and CR networks, where the use of NOMA can significantly improve the connectivity for the users of the secondary network [19]. Wireless caching is another important enabling technique for future communication networks [20], [21], but little is known about the coexistence of NOMA and wireless caching. The key idea of wireless caching is to push the content in off-peak hours during the so-called content pushing phase close to the users before it is requested, and therefore, the users’ requests can be locally served during the so-called content delivery phase. In fact, asking a base station (BS) to serve the users’ requests directly is not preferable, not only because the maximal number of users that a BS can serve concurrently is small, but also because non-caching transmission schemes are severely constrained by the limited backhaul capacity of wireless networks. Most caching schemes can be grouped into one of two classes 1 [21], [24]. The first class assumes the existence of a content caching infrastructure, such as content servers, small cell BSs, etc., [25]– [27]. When caching infrastructure (e.g., content servers) is available, the objective in the content pushing phase is to push the content files to the content servers in a timely and reliable manner, before the users request these files. During the phase of content delivery, an ideal situation is that all the users’ requests can be locally served, without communicating with the central controller of the network, e.g., the BS. The second class, also known as device-to-device (D2D) caching, assumes that there is no dedicated caching infrastructure, and relies on user cooperation [28], [29]. Particularly, during the content pushing phase, all users will proactively cache some content. During the content delivery phase, a user will communicate with its BS only if none of its neighbours can help the user locally, i.e., the user cannot find its requested file in the caches of its surrounding neighbours. A fundamental assumption made in the existing caching literature is that, in the content pushing phase, content is pushed to the content servers in an error-free manner during off-peak hours. However, performing caching only during off-peak hours is not effective if the popularity of 1 We note that coded caching, where the number of BS transmissions is reduced by exploiting the structure of the content sent during the content pushing and delivery phases, does not fall into the two considered categories [22], [23]. 4 the content is rapidly changing or the files to be cached need to be frequently updated. Typical examples for this type of content include up-to-the-minute news, sports events requiring live updates, e-commerce promotion with frequent pricing changes, newly released music videos, etc. Similarly, assuming error-free content pushing may also be questionable in many practical communication scenarios. In practice, connecting the content servers wirelessly with the BS is preferable since the cost for setting up the network is reduced and the installation of cables is avoided. Furthermore, wireless networks facilitate D2D caching, since file sharing among users in wireless networks is straightforward, whereas realizing pairwise connections in wireline networks is more difficult. However, wireless transmission is prone to noise, distortion, and attenuation, which makes error-free transmission a very strong assumption in practice. The objective of this paper is to apply the NOMA principle to wireless caching and to develop NOMA assisted caching strategies which do not require the aforementioned assumptions. The contributions of the paper are summarized as follows: • For the case where the content pushing and delivery phases are separated and limited bandwidth resources are periodically available for content pushing in on-peak hours, a NOMA-assisted push-then-deliver strategy is proposed. Particularly, during the content pushing phase, the BS will use the NOMA principle and push multiple files to the content servers simultaneously. A CR inspired NOMA power allocation policy is used to ensure that content files are delivered to their target content servers with the same outage probability as with conventional orthogonal multiple access (OMA) based transmission. However, by using NOMA, additional files can be pushed to the content servers simultaneously, which is important to efficiently use the limited resources reserved for content pushing and hence to improve the cache hit probability. During the content delivery phase, the use of NOMA not only improves the reliability of content delivery, but also ensures that more user requests can be served concurrently by a content server. • The objective of the proposed push-and-deliver strategy is to provide additional bandwidth resources for content pushing. Unlike the push-then-deliver strategy, the push-and-deliver strategy seeks opportunities for content pushing during the content delivery phase. In particular, during the content delivery phase, the BS occasionally has to serve some users directly, since these users’ requested files cannot be found in the local content severs. Conventionally, this is a non-ideal situation which reduces the spectral efficiency. 5 Nevertheless, this non-ideal situation is inevitable in practice and is expected to occur frequently, as the users’ requests cannot be perfectly predicted. In this paper, this nonideal situation for content delivery is exploited as an opportunity for additional content pushing. In other words, the push-and-deliver strategy is particularly useful when the bandwidth resources reserved for content pushing are limited, but the files at the content servers need to be frequently updated. The proposed push-and-deliver strategy is also extended to D2D caching without caching infrastructure, where the caches at the D2D helpers can be refreshed while users are directly served by the base station. We note that the NOMA-multicasting scheme proposed in [30] can be viewed as a D2D special case of the proposed push-and-deliver strategy, if the multicasting phase in [30] is viewed as the content delivery phase. However, the impact of integrating content pushing and delivery on the cache hit probability was not investigated in [30]. • Analytical results for the cache hit probability, the transmission outage probability, and the D2D cache miss probability are derived in order to obtain a better understanding of the performance of the proposed caching strategies. Conventionally, the cache hit probability is mainly determined by the size of the caches of the content servers, instead of by transmission outages, since conventional content pushing is carried out during off-peak hours, which means that the amount of the pushed content is much larger than the size of the caches of the content servers. However, for the schemes proposed in this paper, the outage based cache hit probability is a more suitable metric for performance evaluation, as explained in the following. In particular, we assume that a short time interval is periodically reserved during on-peak hours for pushing new content to the content servers. The time interval reserved for content pushing has to be short in order to achieve high spectral efficiency and has to be shared by multiple content servers. Thus, the amount of content that can be pushed to the content servers may be much smaller than the size of the storage of the content servers. Considering the tremendous increase in storage capacity available with current technologies, this is a realistic assumption. For the considered caching scenario, the crucial issue is how to quickly push the content files to the content servers during the short time interval available for content pushing during on-peak hours. Therefore, the outage based cache hit probability is the relevant performance criterion. When caching infrastructure is available, the impact of NOMA on the content pushing 6 phase is quantified by exploiting the joint probability density function (pdf) of the distances between the content servers and the BS, and closed-form expressions for the achieved cache hit probability are developed. The impact of NOMA on the content delivery phase is investigated by using the transmission outage probability as a performance criterion and modelling the locations of the users and the content servers as Poisson cluster processes (PCPs). Furthermore, the impact of NOMA on D2D caching is studied by modelling the effect of content pushing as a thinning Poisson point process and deriving the cache miss probability, i.e., the probability of the event that a user cannot find its requested file in the caches of its neighbours. The provided simulations verify the accuracy of the proposed analysis, and illustrate the effectiveness of the proposed NOMA based wireless caching schemes. The remainder of the paper is organized as follows. In Section II, the considered system model, including the caching model and the spatial model, are introduced. In Section III, the NOMA-assisted push-then-deliver strategy is presented, and its impact on the content pushing and delivery phases is investigated. In Section IV, the proposed push-and-deliver strategy is developed by efficiently merging the content pushing and delivery phases, its impact on the cache hit probability is investigated, and its extension to D2D scenarios is discussed. Computer simulations are provided in Section V, and the paper is concluded in Section VI. The details of all proofs are collected in the appendix. II. S YSTEM M ODEL Consider a two-tier heterogeneous communication scenario, where multiple users request cacheable content with the help of one BS and multiple content servers. The D2D scenario without caching infrastructure, e.g., content servers, will be described in Section IV.C. Assume that each user is associated with a single content server. If the file requested by a user can be found in the cache of its associated content server, this server will serve the user, which means that multiple content servers can communicate with their respective users concurrently and hence the spectral efficiency is high. However, if the file requested by a user cannot be found locally, the BS will serve the user directly, a situation which is not ideal for caching and should be avoided. The assumption that each user is associated with a single content server facilitates the use of PCP modelling, as discussed in the following subsection. 7 A. Spatial Clustering Model Assume that the BS is located in the origin of a two-dimensional Euclidean plane, denoted by R2 . As shown in Fig. 1, there are multiple content servers. The locations of the content servers and the users are modelled as PCPs. In particular, assume that the locations of the content servers are denoted by xi and are modelled as a homogeneous Poisson point process (HPPP), denoted by Φc , with density λc , i.e., xi ∈ Φc . For notational simplicity, the location of the BS is denoted by x0 . Each content server is the parent node of a cluster covering a disk whose radius is denoted by Rc . Denote the content server in cluster i by CSi . Without loss of generality, assume that there are K users associated with CSi , denoted by Ui,k . Note that users associated with the same content server are viewed as offspring nodes [31]. The offspring nodes are uniformly distributed in the disk associated with CSi , and their locations are denoted by yi,k . To simplify the notation, the locations of the cluster users are conditioned on the locations of their cluster heads (content severs). As such, the distance from a user to its content server is simply given by ||yi,k ||, and the distance from user Ui,k to content server CSj is denoted by ||yi,k + xi − xj || [32], [33]. Ui,1 CSi Ui,2 Ut,1 Ui,k CSt BS Ut,k Um,1 CSm Um,k Fig. 1. An illustration of the assumed spatial model. Um,2 Ut,2 8 B. Caching Assumptions Consider that the files to be requested by the users are collected in a finite content library F = {f1 , · · · , fF }. The popularity of the requested files is modelled by a Zipf distribution [34]. Particularly, the popularity of file fi , denoted by P(fl ), is modelled as follows: P(fl ) = 1 lγ PF 1 p=1 pγ , (1) where γ > 0 denotes the shape parameter defining the content popularity skewness. We note that P(fl ) is the probability that a user requests file fi . Similar to the existing wireless caching literature, [20], [21], [25]–[27], packets belonging to different files are assumed to have the same length. However, unlike the existing literature, we do not assume that the amount of information contained in the packets of different files is identical. Particularly, the prefixed data rate of the packets of file fl is denoted by Rl . We assume that packets belonging to different files have the same size but may contain different amounts of information for the following reasons. Firstly, the packet size is typically predefined according to practical system standards and cannot be changed. Therefore, it is reasonable to assume that all packets have the same size. Secondly, packets belonging to different files have different priorities and different target reception reliabilities, which requires the use of different channel coding rates for different packets. As a result, packets which have the same size do not necessarily contain the same amount of information. We note that all analytical results developed in this paper, except for Lemma 2, do not require the assumption that the packets contain different amounts of information. In fact, the performance for the special case of identical target data rates for all files is investigated in the simulation section. Finally, we assume that the BS has access to all files. In this paper, when content servers exist, we assume that the users have no caching capabilities. On the other hand, for the D2D assisted caching discussed in Section IV.C, it is assumed that each user has a cache. III. P USH - THEN - DELIVER S TRATEGY In this section, we consider the case where the two caching phases, content pushing and content delivery, are separated. Unlike conventional caching which relies on the use of offpeak hours for content pushing, the proposed push-then-deliver strategy assumes that limited bandwidth resources, such as short time intervals, are periodically reserved for pushing new files 9 to the content servers during on-peak hours. For example, every hour, a BS deployed in a large shopping mall or an airport may use a few seconds to push updated advertising and marketing videos to the content servers. The time interval reserved for content pushing during on-peak hours has to be short in order to achieve high system spectral efficiency. As will be shown, the proposed push-then-deliver strategy allows more files to be pushed within this short time interval compared to OMA. In the following two subsections, we will demonstrate the impact of the NOMA principle on the content pushing and delivery phases, respectively. CSt f1 CSm+1 f1 f2 CSm+2 f1 CS2 f1 f2 Different time slots in the content pushing phase OMA NOMA … … BS pushes a single file to CSt BS pushes multiple files to CSs f3 BS … CSm f1 f2 CS1 f1 f2 f3 f1 CSm-1 f2 f3 f4 … Different time slots in the content pushing phase (a) A general illustration of the content pushing phase Fig. 2. f2 OMA - BS pushes f1 to CSt NOMA - BS pushes 4 files to CSs (b) An example for the outcome of content pushing An illustration of the impact of NOMA on content pushing. “CS” denotes a content server in the subfigures. For the example shown in subfigure (b), it is assumed that CSm is closer to the BS than CSt , for 1 < m < t. In OMA, a single file is pushed to CSt , and in NOMA, the BS pushes a superimposed mixture consisting of four files, where content servers closer to the BS are likely able to decode more pushed files. A. Content Pushing Phase In order to have a baseline for the performance of NOMA assisted content pushing, conventional OMA based content pushing is introduced first. 1) OMA Based Content Pushing: In OMA, the BS divides the content pushing phase into multiple time slots, and different content servers are served during different time slots, as shown in Fig. 2(a). Without loss of generality, we focus on a time slot in which the BS needs to push a 10 file to CSt . Since the use of OMA means that only a single file can be pushed during this time slot, the BS will push the most popular file f1 to CSt 2 . Therefore, CSt is able to decode file f1 with the following achievable data rate:   1 CP Rt,OM A = log 1 + ρ , L (||xt − x0 ||) where ρ denotes the transmit signal-to-noise ratio (SNR), and 1 L(||xt ||) (2) is the large scale path loss between CSt and the BS located at x0 . Particularly, the following path loss model is used, 1 , L(||xt ||) where L (||xt ||) = ||xt ||α and α denotes the path loss exponent. For a large scale network, the probability that ||xt − x0 || < 1 is very small, and therefore, the simplified unbounded path loss model is used in this paper [32], [33], [35]. Nevertheless, the presented analytical results can be extended to other path loss models, e.g., L (||xt ||) = ||1 + xt ||α or L (||xt ||) = max{1, ||xt||α }, in a straightforward manner. We note that small scale multi-path fading is not considered for the channel gain associated with CSt since the content servers can be deployed such that line-ofsight connections to the BS are ensured, which means that large scale path loss is the dominant factor for signal attenuation. However, small scale fading will be considered for the channel gains associated with the users, since the users may not have line-of-sight connections to their transmitters. 2) NOMA Assisted Content Pushing: By applying the concept of NOMA, more content can be simultaneously delivered from the BS to the content servers, as illustrated in Fig. 2(b). Particularly, the BS sends the following mixture, which contains the Ms most popular files: si = Ms X αi f¯i , (3) i=1 where f¯i denotes the signal which represents the information contained in file fi , αi denotes P s 2 the real-valued power allocation coefficient and M i=1 αi = 1. The content servers carry out successive interference cancellation (SIC). The SIC decoding order is determined by the priority 2 We note that how content is pushed over the limited number of time slots available for content pushing during on-peak hours depends on the file scheduling strategy. One possible strategy is to divide the popular content into different libraries or different sets, where the most popular files in these libraries or sets will be pushed during those time slots. As a result, the broadcast nature of wireless channels can be exploited, and a transmission pushing a file to an intended content server also benefits other content servers which are interested in the same content and have stronger connections to the BS than the intended content server. An interesting direction for future research is the design of sophisticated algorithms for file scheduling during the short time interval available for content pushing in on-peak hours. 11 of the files, i.e., a more popular file, fi , will be decoded before a less popular file, fj , i < j. Suppose that the files fj , j < i, have been decoded and subtracted correctly by content server CSm . In this case, CSm can decode the next most popular file, fi , with the following data rate: ! ραi2 L(||xm1−x0 ||) CP . (4) Rm,i = log 1 + P s 2 ρ L(||xm1−x0 ||) M j=i+1 αj + 1 CP If Rm,i ≥ Ri , then file fi can be decoded and subtracted correctly at CSm . For a fair comparison with OMA, which pushes only one file at a time, a sophisticated power allocation policy is needed for the NOMA scheme. Without loss of generality, we assume that the content servers are ordered as follows: 1 1 1 ··· ≥ ≥ ··· ≥ ≥ ··· , L (||x1 − x0 ||) L (||xm − x0 ||) L (||xt − x0 ||) (5) for 1 ≤ m < t. Furthermore, since the considered time slot is used to push f1 to CSt , we make the following quality of service (QoS) assumption, in order to facilitate the design of the power allocation coefficients: QoS Target: The most popular file, f1 , needs to reach the t-th nearest content server (CSt ). Both the OMA and NOMA transmission schemes need to ensure this QoS target. Therefore, the CR inspired power allocation policy can be used for NOMA [7], i.e., power allocation coefficient α1 is chosen such that f1 can be delivered reliably to CSt , i.e., CP Rt,1 ≥ R1 . (6) This constraint results in the following choice of α1 :     ǫ1 ρ L(||x 1−x ||) + 1  t 0 , α12 = min 1,  ρ(1 + ǫ1 ) L(||xt1−x ||)  0 (7) where ǫl = 2Rl − 1. The use of the power allocation policy in (7) ensures that the outage probability for pushing file, f1 , to CSt is the same as that for OMA. The reason is that if there is an outage in OMA, α1 becomes one, i.e., all the power is allocated to f1 . Or in other words, additional files are pushed in NOMA only if f1 is pushed to CSt successfully. P s 2 Since M j=1 αj = 1, (7) implies that the sum of the power allocation coefficients, excluding α1 , is constrained as follows: Ms X j=2 ( αj2 = max 0, ρ L(||xt1−x0 ||) − ǫ1 ρ(1 + ǫ1 ) L(||xt1−x0 ||) ) . (8) 12 The constraint in (7) is sufficient to guarantee the successful delivery of f1 to the t-th nearest content server. How the remaining power shown in (8) is allocated to the other files, fi , i 6= 1, does not affect the delivery of f1 . Therefore, in this paper, it is assumed that the portion   allocated ρ 1 −ǫ1 L(||xt −x0 ||) to fi , i 6= 1, is fixed, i.e., αi2 = βi Pr , where Pr = max 0, ρ(1+ǫ and βi are 1 1 ) L(||x −x ||) t 0 PMs constants, which satisfy the constraint j=2 βi = 1. Note that the coefficients, βi , indicate how the remaining transmission power, after the power for f1 has been deducted is allocated to the additional files. 3) Performance Analysis: An important criterion for evaluating content pushing is the cache hit probability which is the probability that, during the content delivery phase, a user finds its requested file in the cache of its associated content server3 . Since the request probability for file l is decided by its popularity, the hit probability for a user associated with CSm can be expressed as follows: Phit m = Ms X P(fi )(1 − Pm,i ), (9) i=1 where Pm,i denotes the outage probability of CSm for decoding file i. Note that for the OMA case, only file f1 will be sent, and hence the corresponding OMA hit probability is simply given by OM A Phit m,OM A = P(f1 )(1 − Pm,1 ), (10) A where POM denotes the outage probability of CSm for decoding file f1 . The following theorem m,1 reveals the benefit of using NOMA for content pushing. Theorem 1. The cache hit probability achieved by the proposed NOMA assisted push-thendeliver strategy is always larger than or at least equal to that of the conventional OMA based strategy, i.e., hit Phit m ≥ Pm,OM A , (11) for 1 ≤ m ≤ t. 3 We note that retransmission for content pushing, where after decoding failure, CSt requests the retransmission of file f1 by the BS, is not considered in this paper. However, investigating the impact of file retransmission on the caching performance is an important direction for future research. 13 Proof: See Appendix A. Remark 1: Theorem 1 clearly demonstrates the superior performance of the proposed NOMA assisted caching strategy compared to OMA based caching. This performance gain originates from the fact that multiple content files are pushed concurrently during the content pushing phase. Remark 2: Only the t nearest content servers are of interest in (11), i.e., 1 ≤ m ≤ t, which is due to our assumption that the BS aims to push the most popular file, f1 , to CSt . A Remark 3: As shown in Appendix A, the key step to prove the theorem is to show POM m,1 = Pm,1 , i.e., the outage performance of NOMA for decoding f1 at CSm is the same as that of OMA. If f1 is viewed as the message to the primary user in a CR NOMA system, this observation about the equivalence between the outage performances of NOMA and OMA is consistent with the results in [7] and [13]. While the use of the CR power allocation policy guarantees that CSt can decode f1 , this also implies that the outage performance at CSm depends on the channel conditions of CSt . This means that for calculation of the outage probability, Pm,i , the joint distribution of the ordered distances of CSt and CSm to the BS is needed. The following lemma provides an analytical expression for this joint distribution. Lemma 1. Denote the distance between the BS and the i-th nearest content server by ri . The joint pdf of rm and rt is given by frm ,rt (x, y) =4y(λcπ)t e−λc πy 2 x2m−1 (y 2 − x2 )t−m−1 . (t − m − 1)!(m − 1)! (12) Proof: See Appendix B. Remark 4: We note that Lemma 1 is general and can be applied to any two HPPP nodes which are ordered according to their distances to the origin. Remark 5: It is worth pointing out that the joint pdf obtained in [36] is a special case of Lemma 1, when m = 1 and t = 2. Since the cache hit probability is a function of the outage probability, we provide the outage performance for content pushing in the following lemma. Lemma 2. Assume ǫMs ≥ ǫ1 . The outage probability of CSn , 1 ≤ n ≤ t, for decoding f1 is 14 given by −λc π Pn,1 = e  ρ ǫ1 2 X n−1 α (λc π) k=0 k   2k α ρ ǫ1 k! . (13) The outage probability of CSt for decoding fi , 2 ≤ i ≤ Ms , is given by  − 2k α − 2 X  t−1 (λ π)k ǫ1 + (1+ǫ1 ) (1+ǫ ) ǫ c α ρ ρφi −λc π ρ1 + ρφ 1 i , (14) Pt,i = e k! k=0 n  o  P s where φi = min ξ̄ǫ22 , · · · , ξ̄ǫii , ξ¯i = βi − ǫi M β for 2 ≤ i < Ms , and ξ¯Ms = βMs . j j=i+1 The outage probability of CSm , 1 ≤ m < t, for decoding fi , 2 ≤ i ≤ Ms , is given by   t−m−1 X 4(λc π)t p t−m−1 Pm,i ≈ Pt,1 + (−1) p (t − m − 1)!(m − 1)! p=0 × N X π (τ2 − τ1 ) l=1  ρφi 1+ǫ1 +ǫ1 φi 2N  α1 fm  τ2 − τ1 τ2 + τ1 wl + 2 2 q 1 − wl2 ,  − α1 , τ2 = ǫρ1 , N denotes the parameter for Chebyshev-Gauss − α1   (1+ǫ1 ) , and π , g(y) = quadrature, wl = cos 2l−1 2N φi (ρ−ǫ1 y α ) where τ1 = 2  e−λc πy y 2(t−m−1)−2p+1 2m+2p fm (y) = y − (g(y))2m+2p ) . 2m + 2p (15) Proof: See Appendix C. Remark 6: By using the closed-form expressions developed in Lemma 2, the outage probabilities for content pushing can be evaluated in a straightforward manner, and computationally challenging Monte Carlo simulations can be avoided. Remark 7: We note that, in Lemma 2 it is assumed that the target data rates and the power allocation coefficients are chosen to ensure ξ¯i > 0. Otherwise, an outage will always happen for decoding file fi , i ≥ 2, at the content servers. Remark 8: In Lemma 2, it is also assumed that ǫMs ≥ ǫ1 , in order to avoid a trivial case for the integral calculation, as shown in (74) in Appendix C. This assumption means that the target data rate for file fMs is larger than that of file f1 , and the assumption is important to the performance gain of the NOMA assisted strategy over the OMA based one, as explained in the following. Recall that the CR power allocation policy in (7) ensures that CSt can decode the pushed file f1 . If there is any power left after satisfying the needs of CSt , the BS will use the 15 remaining power to push additional files. If the target data rate of f1 , R1 , is very large, meeting the decoding requirement of CSt becomes challenging, i.e., it is very likely that there is not much power available for pushing additional files. In this case, the use of the proposed pushthen-deliver strategy will not offer much performance gain compared to OMA. In other words, a large R1 is not ideal for applying the proposed NOMA based push-then-deliver strategy. The proposed strategy is more beneficial in scenarios when the target data rate of f1 is small. B. Content Delivery Phase In the previous subsection, the cache hit probability for content delivery has been analyzed. However, the event that a user can find its requested file in the cache of its associated content server is not equivalent to the event that this user can receive the file correctly, due to the multipath fading and path loss attenuation that affect its link to the content server. Hence, in this subsection, the impact of NOMA on the reliability of content delivery is investigated. Similar to the previous subsection, the conventional OMA based content delivery strategy is described first as a benchmark scheme. 1) OMA Based Content Delivery: Similar to the content pushing phase, the content delivery phase is also divided into multiple time slots, as shown in Fig. 3(a). During each time slot, for the OMA case, each content server randomly schedules a single user whose requested file is available in its cache. We assume that each content server can find a user to serve for this OMA based content delivery, and multiple content servers help their associated users simultaneously. 2) NOMA Assisted Content Delivery: If the NOMA principle is applied in the content delivery phase, each content server can serve two users4 . Thereby, it is assumed that each content server can find at least two users whose requests can be accommodated locally5. This assumption is applicable to high-density wireless networks, such as networks deployed in sport stadiums or 4 We focus on the case with two users since the content delivery phase is analog to the conventional downlink case and two-user NOMA based downlink transmission has been proposed for long term evolution (LTE) Advanced [37]. The analytical results presented in this paper can be extended to the case with more than two users by dividing the disc covered by a content server into multiple rings. In practice, the number of users to be served simultaneously needs to reflect a practical tradeoff between system complexity and throughput. 5 Please note that we did not make any assumption regarding which particular user makes a request to its content server. This is the reason why the locations and fading channels of the users are modelled as random. 16 Ui,2 Different time slots in the content delivery phase OMA … CSi Ut,2 Ut,1 BS Each CS serves a single user … Ui,1 CSt Um,2 NOMA … CSm Each CS serves multiple users … Um,1 Different time slots in the content delivery phase (a) A general illustration for the content delivery phase Fig. 3. (b) An example for the outcome of content pushing An illustration of the impact of NOMA on content delivery. In OMA, each content server serves a single user. By using NOMA, an additional user can be served. airports, where the number of users is much larger than the number of content servers. We note that this assumption constitutes the worst case for the reception reliability of the users. In fact, content servers that do not have any user to server will not cause interference to the users served by other content servers. Without loss of generality, assume that the two users are ordered based on their distances to the associated content server. As shown in Fig. 3, the far user, which is far from the content server and is denoted by Um,1 , is inside a ring bounded by radii Rs and Rc , Rs < Rc . The near user, which is close to the content server and is denoted by Um,2 , is inside a disc with radius Rs . Without loss of generality, denote the file requested by Um,k by fm,k , fm,k ∈ F . Each content server broadcasts a superposition signal containing two messages, and Um,k , which is associated with CSm , receives the following signal: 2 ym,k X hm,mk αl f¯m,l L (||ym,k ||) l=1 | {z } =p (16) Signals from CSm + X xj ∈Φc \m | p 2 X hj,mk αl f¯j,l + nm,k , L (||ym,k + xm − xj ||) l=1 {z } Signals from interfering clusters where f¯j,l denotes the signal which represents the information contained in file fj,l , αl denotes the NOMA power allocation coefficient, nm,k is the additive complex Gaussian noise, and hj,mk denotes the Rayleigh fading channel coefficient between CSj and Um,k . In order to obtain 17 tractable analytical results, fixed power allocation is used, instead of CR power allocation, and it is assumed that all content servers use the same fixed power allocation coefficients. In order to keep the notations consistent, the power allocation coefficients are still denoted by αi . We note that the simulation results provided in Section V show that the use of this fixed power allocation can still ensure that NOMA outperforms OMA for both users. Um,1 will treat its partner’s message as noise and decode its own message fm,1 with the following SINR: SINR1m,1 = α2 |h 2 α21 |hm,m1 |2 L(||ym,1 ||) m,m1 | 2 L(||ym,1 ||) where Im,1 inter = X xj ∈Φc \m + Im,1 inter + 1 ρ , (17) |hj,m1|2 . L (||ym,1 + xm − xj ||) In practice, the content servers are expected to use less transmission power than the BS, but for notational simplicity, ρ is still used to denote the ratio between the transmission power of the content servers and the noise power. In Section V, for the presented computer simulation results, different transmission powers are adopted for the BS and the content servers. The near user, Um,2 , intends to first decode its partner’s message with the data rate log(1 + 2 α2 1 |hm,m2 | SINR1m,2 ), where SINR1m,2 is defined similarly to SINR1m,1 , i.e., SINR1m,2 = and the inter-cluster interference, Im,2 inter , is defined similarly to Im,1 inter . ( ) L ||ym,2 || α2 |h |2 m,m2 1 2 +Im,2 inter + ρ L ||ym,2 || , ( ) 1 If log(1 + SINRm,2 ) > R1 , i.e., Um,2 can decode its partner’s message successfully, Um,2 will remove fm,1 and decode its own message with the following SINR: α22 |hm,m2 |2 L(||y ||) SINR2m,2 = m,2 m,2 1 Iinter + ρ . (18) The outage probabilities of the two users are defined as follows: P1m,1 = P(log(1 + SINR1m,1 ) < R1 ), (19) P2m,2 = 1 − P(log(1 + SINR1m,2 ) > R1 , log(1 + SINR2m,2 ) > R2 ). (20) and The following lemma provides closed-form expressions for these outage probabilities. 18 Lemma 3. The outage probability of Um,2 can be expressed as follows: N 1 c  X cn,R ρ s n,Rs − o τ̃ q w̄n e Pm,2 ≈1 − , (21) τ̃ n=1 o  n 2 2  α1 −ǫ1 α22 α22 sα 2 α−2 , B(·, ·) denotes the Beta , ǫ2 , q(s) = exp −2πλc α B α , α where τ̃ = min ǫ1 p α π function, w̄n = 2N 1 − wn2 (wn + 1), wn is defined in Lemma 2, and cn,r = 2r wn + 2r . The outage probability of Um,1 can be expressed as follows: ǫ  cn,Rs ǫ1  N cn,R 1 X − 2 s ρ2 − 2 R2s o α −ǫ1 α α −ǫ1 α2 1 2q 1 2 w̄ e e Pm,1 ≈1 + 2 n 2 Rc − Rs n=1 ǫ  cn,Rc ǫ1  N cn,R 1 X − 2 − 2 c ρ2 R2c 2 α −ǫ1 α 2q e α1 −ǫ1 α2 . − 2 w̄n e 1 2 Rc − Rs n=1 (22) Proof: See Appendix D. Remark 9: In the previous subsection, the CR power allocation policy is used and this type of power allocation ensures that the NOMA outage performance of the far user, Um,1 , is the same as that for OMA. Since fixed power allocation coefficients are used in this subsection for content pushing, the performance of the far user is no longer guaranteed, but surprisingly, our simulation results indicate that the use of NOMA can still yield an outage performance gain for the far user, compared to OMA, as shown in Section V. IV. P USH - AND - DELIVER S TRATEGY While the proposed push-then-deliver strategy ensures that more files can be pushed to the content servers during a short content pushing phase, it still relies on the same principle as conventional caching in the sense that content pushing and content delivery are separately carried out. Therefore, if the time interval between two adjacent content pushing phases is large, the caches of the content servers can be updated only infrequently. If new content arrives during the content delivery phase, the use of both conventional caching and the proposed push-then-deliver strategy means that the base station has to wait until the next content pushing phase in order to update the caches of the content servers. In contrast, the proposed push-and-deliver strategy provides an efficient mechanism for frequently updating the files cached at the content servers by exploiting opportunities for content pushing during the content delivery phase as illustrated in Fig. 4(a). In particular, such opportunities arise, when the BS has to serve a user directly during the content delivery phase, as explained in the following. 19 Content delivery phase OMA BS serves Um,k ….. CSs serve users simultaneously ….. directly Content delivery Content delivery NOMA ….. ….. BS serves Um,k while pushing new content CSs serve users simultaneously ….. ….. Content pushing (a) General principle of push-and-deliver CS% ! CSt Um,k CSm Content delivery Content pushing (b) An illustration of push-and-deliver Fig. 4. An illustration of the proposed push-and-deliver strategy. In particular, consider a time slot which is dedicated to user Um,k , as shown in Fig. 4(b). During this time slot, if OMA is used, only this user can be served by the BS directly. However, the use of the NOMA principle offers the opportunity to also push new content to the content servers6 , i.e., the BS sends a superposition signal containing the file requested by Um,k , denoted by f0 , and the Ms most popular files pushed by the BS, denoted by fi , 1 ≤ i ≤ Ms . Assume that f0 and fi , 1 ≤ i ≤ Ms , belong to different file libraries, and the newly pushed files are 6 We note that the BS cannot apply the proposed push-and-deliver strategy in each time slot, as the need to serve a user directly is a prerequisite. Particularly, the proposed strategy is applied in time slots in which a user cannot find the requested file at its local content server. More specifically, in these time slots, the BS pushes new content to the content servers, while severing the user directly. In other words, the push-and-deliver strategy can be applied whenever a user has to be served directly by the BS. 20 useful to all the content servers, in order to avoid correlation among these files and to simplify the expression for the cache hit probability. This assumption is reasonable in practice and can be justified by using the following scenario as an example. Assume that after a period following the initial content pushing phase, one user needs to be served by the BS directly, and during this period, a new library of files, e.g., a set of videos for breaking news, has arrived at the BS to be pushed to the content servers. None of the content servers has had a chance to cache these files yet. With the proposed push-and-deliver strategy, the BS can push the new files to the content servers, while serving the requesting user directly, i.e., waiting for the next content pushing phase is avoided. A. Performance Analysis Following similar steps as in the previous section, the data rate of Um,k for decoding its requested file, f0 , which is directly sent by the BS, is given by  2 2  Rm,k = log 1 + P Ms α0 |hmk | L(||ym,k +xm ||) α2l |hmk |2 l=1 L(||ym,k +xm ||) + 1 ρ   , (23) and each content server, CSm , can decode the additionally pushed file fi with the following data rate:  Rlm = log 1 + α2l L(||xm ||) PMs α2l l=i+1 L(||xm ||) + 1 ρ  , (24) if Rjm is larger than Rj , for 0 ≤ j ≤ i − 1, where Rl denotes the target data rate of fl . Again, small scale multi-path fading is not considered in the channel model for CSm , as we assume that the large scale path loss is dominant in this case, but small scale fading is considered for the users’ channels. Note that the indices of the power allocation coefficients αi start from 0, due to file f0 . Compared to the distance between CSm and the BS, the corresponding distance between Um,k and the BS has a very complicated pdf, as shown in the following subsection. Therefore, in order to obtain tractable analytical results, fixed power allocation coefficients αi will be used, instead of the CR based ones. The outage probabilities of the user and the content servers will be studied in the following subsections, respectively. 21 1) Performance of the user: The main challenge in analyzing the outage performance at the user is the complicated expression for the pdf of the distance ||ym,k + xm ||. First, we define z̄m,k = |hmk |2 . L(||ym,k +xm ||) The outage probability at the user can be expressed as follows: P1m,k where ζl = αl2 − ǫl PMs   ǫ0 =P(Rm,k < R0 ) = P z̄m,k < ρζ1 n ǫ o −L ||y +x || 0 =EL(||ym,k +xm ||) 1 − e ( m,k m ) ρζ0 , 2 j=l+1 αj (25) 2 . Again, it is assumed that the for 0 ≤ l < Ms , and ζMs = αM s power allocation coefficients and the target data rates are carefully chosen to ensure that ζl is positive. In order to derive the pdf of ||ym,k + xm ||, we first define rm = ||xm || and also a function 2 g(rm , r) = 2 2 −Rc 2r arccos rm +r 2rm r πR2c . Conditioned on rm , the pdf of ||ym,k + xm || is given by [38] f||ym,k +xm || (r|rm ) = g(rm , r), (26) for rm − Rc ≤ r ≤ rm + Rc , if rm > Rc . Otherwise, we have f||ym,k +xm || (r|rm)    if r ≤ Rc − rm   2πr, p 2 . = 2πr − g(rm , r), if Rc − rm < r ≤ R2c − rm   p  2 < r ≤ R +r  g(rm , r), if R2c − rm c m (27) In order to avoid the trivial cases, which lead to r = 0, i.e., the user is located at the same place as the BS, we assume that no content server can be located inside the disc, denoted by B(x0 , δRc ), i.e., a disc with the BS located at its origin and radius δRc with δ > 1, which means that rm ≥ δRc for all m ≥ 1. Therefore, only the expression in (26) needs to be used since rm is strictly larger than Rc . After using the pdf of ||ym,k + xm ||, the outage probability can be expressed as follows: Z ∞ Z z+Rc ǫ rα − 0 1 e ρζ0 g(z, r)dr f¯rm (z)dz, (28) Pm,k =1 − δRc z−Rc where f¯rm (z) denotes the pdf of rm . Because of the assumption that no content server can be located inside of B(x0 , δRc ), the pdf of rm is different from that in (50), but the steps of the 22 proof for Theorem 1 in [39] can still be applied to obtain the pdf of rm . Particularly, first denote by Ar the ring with inner radius δRc and outer radius r. The cumulative distribution function (CDF) of rm can be expressed as follows: F̃rm (r) =1 − P(# of nodes in the ring Ar < m) =1 − m−1 X l=0 (29) (λc [πr 2 − πδ 2 R2c ])l −λc [πr2 −πδ2 R2c ] e . l! Therefore, the pdf of rm can be calculated as follows: m−1 X (λc [πr 2 − πδ 2 R2 ])l−1 c −λc [πr 2 −πδ2 R2c ] ¯ frm (r) = − 2πλc re (l − 1)! l=1 ! m−1 X (λ[πr 2 − πδ 2 R2 ])l c − l! l=0 − πδ 2 R2c ]m−1 . (m − 1)! Substituting (30) into (28), the outage probability of the user can be obtained. −λc [πr 2 −πδ2 R2c ] [πr =2πλm c re 2 (30) 2) Performance of the content servers: The content servers need to carry out SIC in order to decode the newly pushed files fl . As a result, the outage probability of CSm for decoding fi can be expressed as follows: Pim =1 − P(Rlm > Rl , ∀l ∈ {0, · · · , i}) (31)    ρζl , ∀l ∈ {0, · · · , i} . =P L(||xm ||) > min ǫl By applying the assumption that rm ≥ δRc and also the pdf in (30), the outage probability of CSm for decoding fi can be expressed as follows: i h   m−1 X (λc τ̄πi2 − πδ 2 R2c )l −λc π2 −πδ2 R2c τ̄ i , Pim = e l! l=0  α1  1 n o . where τ̄i = ρζl min ǫl (32) ,∀l∈{0,··· ,i} Based on the outage probability Pim , the corresponding cache hit probability for a user associated with CSm can be expressed as follows: Phit m = Ms X P(fi )(1 − Pim ), (33) i=1 where f0 has been omitted as it is the file currently requested by a user and it is assumed that f0 and fl , 1 ≤ l ≤ Ms , belong to different libraries. 23 B. OMA Benchmarks A naive OMA based benchmark is that the BS does not push new content while serving a user directly. Compared to this naive OMA scheme, the benefit of the proposed push-and-deliver strategy is obvious since new content is delivered and the cache hit probability will be improved. A more sophisticated OMA scheme is to divide a single time slot into (Ms + 1) sub-slots. During the first sub-slot, the user is served directly by the BS. From the second until the (Ms +1)th sub-slots, the BS will individually push the files, fi , i ∈ {1, · · · , Ms }, to the content servers. Compared to this more sophisticated OMA scheme, the use of the proposed push-and-deliver strategy still offers a significant gain in terms of the cache hit probability, as will be shown in Section V. C. Extension to D2D Caching The aim of this subsection is to show that the concept of push-and-deliver can also be applied to D2D caching. Assume that a time slot is dedicated to a user whose request cannot be found in the caches of its neighbours, and during this time slot, the BS will send the requested file f0 to the user directly. By applying the push-and-deliver strategy, the BS will also proactively push Ms new files, fl , 1 ≤ l ≤ Ms , to all users for future use. In other words, when the BS addresses the current demand of a user directly, the BS pushes more content files to all users, including the user which requests f0 , for future use. In the context of D2D caching, content servers are no longer needed. Therefore, the spatial model presented in Section II needs to be revised accordingly. Particularly, it is assumed that the locations of the users are denoted by yk and modelled as an HPPP, denoted by Φu , with density λu . After implementing the push-and-deliver strategy, following similar steps as in the previous subsection, for a user with distance r from the BS and Rayleigh fading channel gain h, the outage probability for decoding fi is given by Rir = log 1 + PMs αi2 |h|2 r −α 2 2 −α + j=i+1 αj |h| r 1 ρ ! , (34) when Rlr > Rl , for 0 ≤ l ≤ i − 1. If fj , 0 ≤ j ≤ Ms − 1, can be decoded correctly, fMs can be decoded by this user with the following data rate:  2 s RM |h|2 r −α . = log 1 + ραM r s (35) 24 Consequently, for a user with distance r from the BS, the probability of successfully decoding fi can be expressed as follows: Pi (r) =P Rlr > Rl , ∀l ∈ {0, · · · , i} α α =e−τ̄i r .  (36) Following (36), one can draw the conclusion that the locations of the users which can successfully receive fi no longer follow the original HPPP with λu , but follow an inhomogeneous PPP which is thinned from the original HPPP by Pi (r), i.e., the density of this new PPP is Pi (r)λu . By using this thinning process, the cache miss probability can be characterized as follows. During the D2D content delivery phase, assume a newly arrived user, whose location is denoted by y0 , requests file fi . Denote by B(y0 , d) a disc with radius d and its origin located at y0 . This disc is the area in which the user searches for a helpful neighbour which has the requested file in its cache. For this inhomogeneous PPP, the cache hit probability for the user requesting fi is given by Phit i =1 − P(no user in B(y0 , d) caches fi ) (37) =1 − e−Λi (B(y0 ,d)) , where Λi (B(y0 , d)) denotes the intensity measure of the inhomogeneous PPP for the users which have fi in their caches. In (37), the hit probability is found by determining the cache miss probability which corresponds to the event that the user cannot find its requested file in the caches of its neighbours located in the disc B(y0 , d). The calculation of the cache hit probability depends on the relationship between d and the distance between the observing user and the BS, denoted by r0 , as shown in the following subsections. 1) For the case of d < r0 : For d < r0 , define Λi (B(y0 , d)) , Λid≤r0 (r0 ). The assumption d < r0 means that the BS is excluded from B(y0 , d). Therefore, the intensity measure can be calculated as follows: Λid≤r0 (r0 ) = Z Z Pi (r)λu dθrdr. (38) r,θ∈B(y0 ,d) As can be observed from Fig. 5, the constraint on r and θ can be expressed as follows: r 2 + r02 − 2r0 r cos θ ≤ d2 . (39) 25 D2D Helper  D2D Helper  BS BS y0 r0 r0 y0 d d (b) d ≥ r0 (a) d < r0 Fig. 5. Two possible cases between the radius of the search disc, B(y0 , d), and the distance between the observing user located at y0 and the BS. Therefore, the intensity measure can be expressed as follows: Λid≤r0 (r0 ) = Z r0 +d r0 −d = 2λu Z Z arccos − arccos r0 +d 2 −d2 r 2 +r0 2r0 r 2 −d2 r 2 +r0 2r0 r Pi (r)λu dθrdr Pi (r)r arccos r0 −d r 2 + r02 − d2 dr. 2r0 r (40) By applying Chebyshev-Gauss quadrature, the intensity measure can be calculated as follows: N q X π i gr (r0 + dwl ) 1 − wl2 , Λd≤r0 (r0 ) ≈ 2λu d (41) N l=1 where gr (z) is given by gr (z) = Pi (z)z arccos z 2 + r02 − d2 . 2r0 z (42) 2) For the case of d ≥ r0 : For d ≥ r0 , define Λi (B(y0 , d)) , Λd>r0 . The assumption, d ≥ r0 , means that the BS is inside of B(y0 , d). Following similar steps as in the previous case, the 26 intensity measure can be evaluated as follows: Z d−r0 Z π i Λd≤r0 (r0 ) = Pi (r)λu dθrdr 0 + −π Z r0 +d d−r0 2πλu ≈ γ ατ̄i2  Z arccos − arccos 2 −d2 r 2 +r0 2r0 r 2 −d2 r 2 +r0 2r0 r 2 α , τ̄ (d − r0 )α α i Pi (r)λu dθrdr  N q X π gr (d + r0 wl ) 1 − wl2, + 2λu r0 N l=1 (43) where γ(·) denotes the incomplete Gamma function, and the approximation in the last step follows from the application of Chebyshev-Gauss quadrature. Finally, the cache hit probability can be obtained by substituting (41) and (43) into (37). V. N UMERICAL S TUDIES AND D ISCUSSIONS In this section, the performances achieved by the proposed push-then-deliver and push-anddeliver strategies are studied by using computer simulations, where the accuracy of the developed analytical results will be also verified. The system parameters adopted for simulation and analysis are specified in the captions of the figures shown in this section. A. Performance of Push-then-deliver Strategy In Figs. 6 and 7, the impact of the NOMA assisted push-then-deliver strategy on the cache hit probability is studied. The thermal noise is set as σn2 = −100 dBm. The density of the content servers is parameterized by cluster radius Rc , i.e., λc = 0.01 , πR2c in order to account for the fact that the density of the content servers is affected by Rc . By applying the NOMA principle to the content pushing phase, more content can be pushed to the content servers simultaneously, and hence, the cache hit probability is improved, compared to the OMA case, as can be observed from Fig. 6. For example, when the transmission power is 40 dBm, the shape parameter for the content popularity is γ = 0.5, and Rc = 50 m, the use of OMA yields a hit probability of 0.2, and the use of NOMA improves this value to 0.45, which corresponds to a 100% improvement. At low SNR, NOMA and OMA yield the same performance. This is due to the use of the CR inspired power allocation policy in (7), which implies that at low SNR, all the power is 27 allocated to file f1 , and hence, there is no difference between the OMA and NOMA schemes. Note that the curves for analysis and simulation match perfectly in Fig. 6, which demonstrates the accuracy of the developed analytical results. Furthermore, we note that the NOMA power allocation coefficients βi are assumed to be fixed. Optimizing these power allocation coefficients dynamically according to the users’ channel conditions can further enhance the performance gain of NOMA assisted caching compared to the OMA baseline scheme. The impact of γ, the shape parameter defining the content popularity, on the hit probability is significant, as can be observed in Fig. 6. Particularly, increasing the value of γ improves the hit probability. This is because a larger value of γ implies that the first Ms files become more popular, hence ensuring the delivery of these more popular files can significantly improve the hit probability, as indicated by (9). Comparing Fig. 6(a) with Fig. 6(b), one can observe that the impact of Rc on the hit probability is also significant, which is due to the fact that the density of the content servers depends on Rc . Particularly, a larger Rc means that the content servers are more sparsely deployed and hence it is more difficult for the BS to push content to the content servers, and the cache hit probability decreases. Recall that during the time slot considered for content pushing in Section III-A, the BS pushes additional files to CSm while ensuring that f1 is pushed to CSt . In Fig. 7, the impact of different choices of m and t on the cache hit probability is studied. As can be observed from the figure, increasing t will decrease the hit probability. This is again due to the use of the CR power allocation policy. In particular, a larger t means that more transmission power is needed to delivery f1 to CSt , and hence, less power is available for other files. An interesting observation in Fig. 7 is that the shape of the hit probability curves is not smooth. This is due to the fact that the hit probability is the summation of popularity probabilities P (fl ) and these popularity probabilities are prefixed and not continuous, as shown in (1). On the other hand, for a fixed t, increasing m reduces the cache hit probability, since increasing m means that CSm is further away from the BS and hence its reception reliability deteriorates. In Fig. 8, the impact of using NOMA for content delivery is studied, where the rate pair {R1 , R2 } is set to {1, 6} BPCU to account for the fact that the near user can achieve a higher data rate. As can be observed from the figure, the proposed push-then-deliver strategy can improve the reliability of content delivery, particularly for the user with strong channel conditions. For example, when the path loss exponent is set to α = 3 and the transmission power of the content 28 10 0 OMA, CTt OMA, CTm NOMA, CTt , simulation NOMA, CTm , simulation Cache Hit Probability NOMA, CTt , analytical NOMA, CT , analytical m 10-1 Solid lines: γ = 0.5 Dash-dotted lines: γ=1.5 10 15 20 25 30 35 40 Transmission Power of the BS (dBm) (a) Rc = 100m 10 0 Cache Hit Probability Solid lines: γ = 0.5 Dash-dotted lines: γ=1.5 OMA, CTt OMA, CT 10 m -1 NOMA, CT , simulation t NOMA, CTm , simulation NOMA, CTt , analytical NOMA, CTm , analytical 10 15 20 25 30 35 40 Transmission Power of the BS (dBm) (b) Rc = 50m Fig. 6. The cache hit probability for the push-then-deliver strategy. N = 20, α = 3, λc = 0.01 , πR2 c t = 5, m = 1, Ms = 3, and Rl = 1 bit per channel use (BPCU), for 1 ≤ l ≤ 3. The power allocation coefficient for file f1 is based on the CR power allocation policy. The power allocation coefficients for files f2 and f3 are β2 = 3 4 and β3 = 14 , respectively. |F| = 10. 29 Cache Hit Probability 10 0 10-1 10-2 10 t=15, m=1 t=10, m=1 t=5, m=1 t=15, m=10 t=10, m=5 t=5, m=2 -3 10 15 20 25 30 35 40 Transmission power of the BS in dBm Fig. 7. The impact of the choices of m and t on the cache hit probabilities for the push-then-deliver strategy. N = 20, α = 3, Rc = 50m, λc = 0.01 , πR2 c Ms = 3, t = 5, m = 1, and Rl = 1 BPCU, for 1 ≤ l ≤ 3. The power allocation coefficient for file f1 is based on the CR power allocation policy. The power allocation coefficients for files f2 and f3 are β2 = 3 4 and β3 = 14 , respectively. γ = 0.5 and |F| = 3. Analytical results are used to generate the figure. servers is 20 dBm, the use of NOMA ensures that the outage probability for the far user is improved from 4.5 × 10−2 to 3 × 10−2 , which is a relatively small performance gain. However, the performance gap between the OMA and NOMA schemes for the near user is much larger, e.g., for the same case as considered before, the outage probability is improved from 5 × 10−1 to 1.1×10−2 . Note that the outage probability for content delivery has an error floor, i.e., increasing the transmission power of the content severs cannot reduce the outage probability to zero. This is because multiple content servers transmit simultaneously, and hence, content delivery becomes interference limited at high SNR. We note that the impact of the path loss exponent on the reliability of content delivery is significant, as can be observed by comparing Figs. 8(a) and 8(b). This is due to the fact that a smaller value of α results in a lower path loss, which leads to an improved reception reliability. B. Performance of Push-and-deliver Strategy In Fig. 9, the impact of the proposed push-and-deliver strategy on the cache hit probability is studied. We employ δ = 1.1 to avoid the trivial case where the user is located at the same 30 Outage Probabilities for Content Delivery 10 0 Near user, R =6 BPCU 2 10-1 10 -2 -10 Far user, R =1 BPCU 1 OMA, far user NOMA, simulation, far user NOMA, analytical, far user OMA, near user NOMA, simulation, near user NOMA, analytical, near user -5 0 5 10 15 20 Transmission power of the content servers in dBm (a) α = 3 Outage Probabilities for Content Delivery 10 0 Far user, R =1 BPCU 1 10 -1 -10 OMA, far user NOMA, simulation, far user NOMA, analytical, far user OMA, near user NOMA, simulation, near user NOMA, analytical, near user -5 0 Near user, R2 =6 BPCU 5 10 15 20 Transmission power of the content servers in dBm (b) α = 4 Fig. 8. λc = 0.01 , πR2 c The outage probabilities for content delivery for the push-then-deliver strategy. N = 20, α = 4, Rc = 100m. R1 = 1 BPCU, and R2 = 6 BPCU. The power allocation coefficients are α21 = 3 4 and α22 = 41 . 31 Cache Hit Probability 100 10-1 OMA, m=5 NOMA, m=5, simulation NOMA, m=5, analytical OMA, m=3 NOMA, m=3, simulation NOMA, m=3, analytical OMA, m=1 NOMA, m=1, simulation NOMA, m=1, analytical 10-2 10 15 20 25 30 35 40 Transmission power of the BS in dBm (a) Case 1 Cache Hit Probability 10 10 0 -1 OMA, m=5 NOMA, m=5, simulation NOMA, m=5, analytical OMA, m=3 NOMA, m=3, simulation NOMA, m=3, analytical OMA, m=1 NOMA, m=1, simulation NOMA, m=1, analytical 10-2 10 15 20 25 30 35 40 Transmission power of the BS in dBm (b) Case 2 The cache hit probability for the proposed push-and-deliver strategy. Rc = 50m, N = 20, γ = 1.5, α = 3, λc = Fig. 9. Ms = 3, δ = 1.1. R0 = α20 = 4 , 8 α21 = 3 , 8 α22 = 1 8 2 , 8 BPCU, R1 = and α23 = 1 . 8 3 4 BPCU, R2 = 7 8 BPCU, and R3 = 11 4 0.01 , πR2 c BPCU. The power allocation coefficients are 32 place as the BS, as discussed in Section IV-A. As can be observed, the use of the proposed strategy can effectively improve the cache hit probability compared to the OMA case, which is consistent with the conclusions drawn in the previous subsection. In both sub-figures of Fig. 9, the analytical results perfectly match the simulation results, which verifies the accuracy of the developed analysis. In Fig. 9, the impact of different choices for the popularity parameters on the cache hit probability is studied. In particular, the following two cases are considered: • Case 1: F1 = {f1 , · · · , f10 }, and the power allocation coefficient for fl is αl ; • Case 2: F2 = {f1 , · · · , f3 }, and the power allocation coefficient for fl is α4−l . The two cases correspond to two different options for mapping files with different popularities to different power levels (or equivalently SIC decoding orders), where in the first case, more popular files are assigned more power, and in the second case, less power is assigned to more popular files. In Case 1, the performance gap between NOMA and OMA is not significant, as can be observed from Fig. 9(a). For example, when the transmit power is 40 dBm and m = 5, the use of OMA results in a hit probability of 0.7 and the use of NOMA yields a hit probability of 0.8, where the gap is 0.1 only. However, for a different set of popularity parameters, i.e., Case 2, the performance gap between OMA and NOMA is significantly increased. For example, for a transmit power of 40 dBm and m = 5, the performance gap between OMA and NOMA is enlarged to 0.5. The reason behind this phenomenon is as follows. Recall that the use of NOMA can significantly improve the reception reliability of the files which are decoded at the later stages of the SIC procedure, but the improvement for the files which are decoded during the first few stages of SIC is not significant. In Case 1, the first few files will get larger weights in the sum of the cache hit probability, i.e., file fl , for a small l, has more impact on the overall performance. As a result, the gap between OMA and NOMA in Case 1 is small, since the reception reliability for decoding these files in the case of NOMA is not so different from that for OMA. On the other hand, Case 2 means that the most popular file, f1 , will be decoded last. As discussed before, the capabilities of OMA and NOMA to decode f1 are quite different, which is the reason for the larger performance gap in Case 2. Recall that the key idea of the push-and-deliver strategy is to perform content pushing when asking the BS to serve the users directly. Fig. 9 clearly demonstrates that this strategy can 33 efficiently push new content to the content servers, but it does not demonstrate the impact of this strategy on content delivery, which is studied in Fig. 10. Particularly, as can be observed from the figure, the use of the proposed push-and-deliver strategy does not degrade the reception reliability of content delivery. In fact, the use of NOMA can even improve the outage probability for content delivery. In Fig. 11, the concept of the proposed push-and-deliver strategy is extended to D2D caching scenarios. Without loss of generality, the newly arrived user is located at y0 = (500m, 500m). As expected, the use of the proposed strategy can significantly reduce the miss probability, compared to the case of OMA. For example, for the case where the user density is λu = 5×10−5 , a transmit power of 40 dBm, and d = 150 m, the use of NOMA yields a miss probability of 6 × 10−2 , whereas the miss probability for OMA is 1.6 × 10−1 , which is much worse. As can be observed from the figure, increasing the value of d can reduce the miss probability, since the area for searching for a D2D helper is increased. Another important observation is that by increasing the density of the users, the miss probability can be further reduced, since increasing the density means that more users are located in the same area and hence it is more likely to find a D2D helper. We note that, in Fig. 11, computer simulation and analytical results match perfectly, which demonstrates again the accuracy of the developed analysis. VI. C ONCLUSIONS Unlike conventional wireless caching strategies which rely on the use of off-peak hours for content pushing, in this paper, the NOMA principle has been applied to wireless caching to enable the frequent update of the local caches via wireless transmission during on-peak hours. Two NOMA assisted caching strategies have been developed, namely the push-then-deliver strategy and the push-and-deliver strategy. The push-then-deliver strategy is applicable to the case when the content pushing phase and the content delivery phase are separated, and utilizes the NOMA principle independently in both phases. The developed analytical results demonstrate that the proposed NOMA assisted caching scheme can efficiently improve the cache hit probability and reduce the delivery outage probability. The push-and-deliver strategy is motivated by the fact that, in practice, it is inevitable that some user requests cannot be accommodated locally and the BS has to serve these users directly. The key idea of the push-and-deliver strategy is to merge the two phases, i.e., the BS pushes content to the content servers while simultaneously serving 34 Outage Probabilities for Content Delivery 10 0 10-1 10-2 10-3 10-4 10 OMA, m=5 NOMA, m=5, simulation NOMA, m=5, analytical OMA, m=3 NOMA, m=3, simulation NOMA, m=3, analytical OMA, m=1 NOMA, m=1, simulation NOMA, m=1, analytical 15 20 25 30 35 40 Transmission power of the BS in dBm Fig. 10. The impact of the push-and-deliver strategy on content delivery. Rc = 50m, γ = 1.5, α = 3, λc = N = 20, δ = 1.1. R0 = 1 8 BPCU, R1 = 3 4 BPCU, R2 = 7 8 BPCU, and R3 = 11 4 0.01 , πR2 c Ms = 3, BPCU. The power allocation coefficients are α20 = 84 , α21 = 83 , α22 = 28 , and α23 = 18 . Case 2 is considered. users directly. Furthermore, in addition to the caching scenario with caching infrastructure, e.g., content servers, we have considered D2D caching, where the use of NOMA has also been shown to yield superior performance compared to OMA. The results in this paper open several new directions for future research. First, in this paper, the file popularity parameter has been assumed to be given and fixed. As demonstrated in Fig. 9, different choices for this parameter yield different cache hit probabilities, which means that dynamically optimizing the NOMA power allocation (or equivalently the NOMA SIC decoding order) for given content popularity parameters could further improve the performance of NOMAassisted caching. Second, fixed NOMA power allocation coefficients have been adopted in this paper, except for Section III-A2, where CR inspired power allocation was used. In general, optimizing the power allocation coefficients is expected to further improve the performance of NOMA based caching. Third, increasing the density of the users or the search area in D2D caching can increase the cache hit probability, but might also cause stronger interference during the content delivery phase, when the D2D helpers deliver the requested files to their neighbours simultaneously. Therefore, for the content delivery phase, it is important to design low-complexity 35 Miss Probability 100 10-1 10 OMA, d=100 m NOMA, d=100 m, simulation NOMA, d=100 m, analytical OMA, d=150 m NOMA, d=150 m, simulation NOMA, d=150 m, analytical 15 20 25 30 35 40 Transmission power of the BS in dBm (a) λu = 5 × 10−5 Miss Probability 100 10-1 10-2 10 -3 10 OMA, d=100 m NOMA, d=100 m, simulation NOMA, d=100 m, analytical OMA, d=150 m NOMA, d=150 m, simulation NOMA, d=150 m, analytical 15 20 25 30 35 40 Transmission power of the BS in dBm (b) λu = 1 × 10−4 Fig. 11. The impact of the proposed push-and-deliver strategy on the cache miss probability in D2D caching scenarios. N = 20, α = 3, y0 = (500 m, 500 m), R0 = 0.5 BPCU, R1 = 4 BPCU and Ms = 1. The power allocation coefficients are α20 = 3 4 and α21 = 41 . 36 algorithms for efficient scheduling of the users’ requests in order to limit co-channel interference. In this context, coordinated multi-point transmission (CoMP) and cloud radio access networks (C-RAN) are interesting options for suppressing co-channel interference [25], [40]. Fourth, in this paper, content pushing is carried out without exploiting the structure of the content files. As shown in [22], the spectral efficiency of wireless caching can be further improved by applying coded caching, since only parts of the content files need to be cached and one multicast transmission during the content delivery phase can benefit multiple users simultaneously. Thus, enhanced caching and delivery schemes combining the benefits of the proposed NOMA based strategies and coded caching are of interest. Fifth, in this paper, the cache hit probability has been used as the performance criterion, whereas latency is another important metric [41]–[43]. The proposed caching strategies can potentially decrease the latency for content delivery. On the one hand, the proposed push-then-deliver strategy can effectively reduce the waiting time of the users for being served, since multiple users can be simultaneously served by one content server. On the other hand, with the proposed push-and-deliver strategy, the files cached at the content servers can be updated more frequently, which indirectly helps in reducing the latency of content delivery. Hence, a formal analysis of the impact of the proposed caching strategies on the latency of content delivery is needed, where various effects have to be considered, including the number of retransmissions of the content, the scheduling delay for those users which are served by the BS directly, etc. A PPENDIX A P ROOF T HEOREM 1 P Ms Recall that the NOMA cache hit probability is Phit m = i=1 P(fi )(1 − Pm,i ) and the OMA hit OF OM A probability is Phit m,OM A = P(f1 )(1 − Pm,1 ). Since the file popularity probabilities are positive A and identical for the NOMA and OMA cases, proving POM = Pm,1 for all CSm , 1 ≤ m ≤ t, m,1 is sufficient to prove the theorem. Recall that each content server will carry out SIC, i.e., files j, 1 ≤ j < i, are decoded before file i is decoded. Therefore, the outage probability of CSm for decoding file i can be expressed as follows: Pm,i = 1 − P (fj is decoded, ∀j ≤ i) . (44) 37 For notational simplicity, first define zm , 1 , L(||xm −x0 ||) and note that these channel gains are ordered as follows: z1 ≥ · · · ≥ zt . Therefore, the outage probability can be expressed as follows:   ǫl , ∀l ≤ i , (45) Pm,i = 1 − P zm > ρξl P s 2 where ξl = αl2 − ǫl M j=l+1 αj . A As discussed previously, showing POM = Pm,1 is sufficient to prove the theorem. First, we m,1 focus on the performance of CSt . According to the definition of the CR NOMA power allocation policy, the outage probability of CSt for decoding the most popular file, f1 , is given by   ǫ1 Pt,1 = P zt < ρξ1   ǫ1 (a) A = P (α1 = 1) = P zt < = POM , t,1 ρ (46) where ǫ1 and ξ1 are used since they are valid for file f1 . Step (a) follows from the fact that an outage occurs at CSt only if all the power is assigned to file f1 , i.e., α1 = 1. Therefore, regarding the capability of CSt to decode f1 , adopting NOMA does not bring any difference, compared to OMA. Second, the outage probability of CSm , 1 ≤ m < t, for decoding f1 , is given by   ǫ1 Pm,1 = P zm < ρξ1     ǫ1 ǫ1 + P α1 < 1, zm < . = P α1 = 1, zm < ρξ1 ρξ1 Since the channel conditions of CSm are better than those of CSt , the condition that CSt can decode f1 correctly, i.e., α1 < 1, is sufficient to guarantee successful detection of f1 at CSm . Therefore, the outage probability can be simplified as follows:   ǫ1 Pm,1 = P α1 = 1, zm < . ρξ1 (47) Note that the use of the CR power allocation policy in (7) complicates the expression for the outage probability, since the power allocation coefficients depend on the channel conditions of 38 CSt . In order to better understand the outage events, we express the event {zm <     ǫ1 ǫ1 = zm < zm < ρξ1 ρ (1 − Pr − ǫ1 Pr )     ǫ1 o n = zm <  ρzt −ǫ1   ρ 1 − (1 + ǫ1 ) max 0, ρ(1+ǫ 1 )zt     ǫ1 o . n = zm <    ρ 1 − max 0, ρzt −ǫ1 ǫ1 } ρξ1 as follows: (48) ρzt By combining (47) and (48), surprisingly probability Pm,1 can be simplified as follows:   ǫ1 ǫ1 , (49) Pm,1 = P zt < , zm < ρ ρ n o ρzt −ǫ1 since max 0, ρ(1+ǫ = 0 for the case zt < ρξǫ11 . On the other hand, it is straightforward to 1 )zt show that the outage probability for OMA is given by     ǫ1 ǫ1 ǫ1 ǫ1 OM A + P zt < , zm < Pm,1 = P zt > , zm < ρ ρ ρ ρ = Pm,1 . Therefore, the NOMA outage performance of CSm , 1 ≤ m ≤ t, for decoding f1 is the same as that of OMA, but the use of NOMA can ensure that more content is delivered to the content servers, which proves the theorem. A PPENDIX B P ROOF OF L EMMA 1 Since the content servers follow an HPPP, the pdf for the m-th shortest distance is given by [39] frm (x) = m 2m−1 2λm 2 c π x e−λc πx . (m − 1)! (50) The conditional CDF for the t-th shortest distance, given rm = x, can be expressed as follows: Frt |rm (y) , P(rt ≤ y|rm = x) (51) = 1 − P(rt > y|rm = x). The event, (rt > y|rm = x), corresponds to the case where the t-th nearest content server is not located inside the ring between a larger circle with radius y and a smaller one with radius 39 x. Or equivalently, the event, (rt > y|rm = x), means that at most (t − m − 1) content servers are inside the ring between the two circles. Therefore, the conditional CDF, Frt |rm (y), can be explicitly written as follows: Frt |rm (y) = 1 − t−m−1 X P(#(int(B(x0 , x), B(x0 , y)) = n), (52) n=0 where #(A) denotes the number of points falling into the area A, B(x0 , x) denotes a disc with its origin located at x0 and radius x, and int(B(x0 , x), B(x0 , y)) denotes the ring between the boundaries of B(x0 , x) and B(x0 , y). By applying the HPPP assumption, the conditional CDF can be found as follows: Frt |rm (y) = 1 − t−m−1 X −λc π(y 2 −x2 ) 2 ne 2 n (λc π) (y − x ) n! n=0 . (53) In order to find the joint pdf between rm and rt , the conditional pdf is needed first. However, the derivative of the CDF Frt |rm (y) shown in the above equation has the following complicated form: frt |rm (y) = t−m−1 X 2y(λc π)n (y 2 − x2 )n−1 −λc π(y2 −x2 ) e n! n=1   2 2 × λc π(y 2 − x2 ) − n + 2λc πye−λc π(y −x ) . (54) This complicated form makes the calculation of the outage probability very difficult. Instead, the steps provided in [39] can be used to obtain a much simpler form, as shown in the following. First, define Sn = (λc π(y 2 −x2 ))n , n! and hence the conditional CDF obtained in (53) can be re-written as follows: Frt |rm (y) = 1 − t−m−1 X Sn e−λc π(y 2 −x2 ) . (55) n=0 After taking the derivative of the CDF and exploiting the structure of Sn , the conditional pdf can be obtained as follows: frt |rm (y) =2yλc πe−λc π(y 2 −x2 ) t−m−1 X n=0 =2y(λc π)t−m e−λc π(y 2 −x2 ) which is much simpler than the expression in (54). Sn − t−m−1 X Sn−1 n=1 2 t−m−1 (y 2 − x ) , (t − m − 1)! ! (56) 40 By applying Bayes’ rule, the joint pdf between rm and rt can be obtained as follows: frm ,rt (x, y) =frm |rt (x)frt (y) =4y(λcπ)t e−λc πy (57) 2 x2m−1 (y 2 − x2 )t−m−1 . (t − m − 1)!(m − 1)! Note that, for the special case of m = t − 1, the two parameters, x and y, are decoupled to yield the following simplified form for the joint pdf: frm ,rt (x, y) = 4(λc π)m+1 yx2m−1 −λc πy2 e . (m − 1)! (58) This completes the proof of the lemma. A PPENDIX C P ROOF OF L EMMA 2 Following the steps provided in the proof of Theorem 1, the outage probability for CSt to decode f1 is given by Pt,1   ǫ1 . = P zt < ρ After applying the marginal pdf of the t-th shortest distance shown in (50), Pt,1 can be calculated as follows: Pt,1 2λtc π t = (t − 1)! −λc π =e  ρ ǫ1 Z ∞ 1 ρα 1 ǫα 1 2 y 2t−1 e−λc πy dy 2 X t−1 α (λc π)k k=0   2k α k! ρ ǫ1 (59) . According to (49), the outage probability for CSm to decode f1 is given by   ǫ1 ǫ1 . Pm,1 = P zt < , zm < ρ ρ By using the fact that rm ≤ rn and again applying the marginal distribution of rm , the outage probability can be straightforwardly obtained as follows: Pm,1   2k α ρ   k   2 m−1 (λ π) c α X ρ ǫ ǫ1 1 −λ π = P zm < = e c ǫ1 . ρ k! k=0 Hence, the first part of the lemma is proved. (60) 41 The outage probability for file i, i > 1, is more complicated than the case of f1 . The impact of the channel condition of CSt on the outage performance of CSm can be made explicit by n o expressing the individual event zm < ρξǫii , i > 1, as follows:       ǫi ǫi  = zm <  (61) zm < P s  ρξi 2  α ρ αi2 − ǫi M j=i+1 j     ǫi o , n = zm <  ρξ¯ max 0, ρzt −ǫ1  i ρ(1+ǫ1 )zt n o ρzt −ǫ1 where the last step follows from the fact that Pr = max 0, ρ(1+ǫ . Recall that ξ¯i = 1 )zt   P s βi − ǫi M j=i+1 βj is a constant and not a function of the channel conditions of CSt . Therefore, the outage probability of CSt for decoding fi , i > 1, is given by    ǫ1 ǫi Pt,i =P α1 = 1, zt < max ,··· , ρξ1 ρξi    ǫi ǫ1 . ,··· , + P α1 < 1, zt < max ρξ1 ρξi (62) Note that α1 = 1 corresponds to the event that all the power is allocated to f1 . Therefore, n o ǫi ǫ1 zt < max ρξ1 , · · · , ρξi is always true if α1 = 1, and therefore, the outage probability can be simplified as follows: Pt,i =P (α1 = 1)    ǫi ǫ2 . ,··· , + P α1 < 1, zt < max ρξ2 ρξi Note that when α < 1, the expression for the event {zt < ǫi } ρξi (63) in (61) can be simplified as follows:  ǫi zt < ρξi  = ( ǫi zt < ¯ ρzt −ǫ1 ρξi ρ(1+ǫ1 )zt ) . (64) Therefore, the outage probability can be rewritten as follows: Pt,i =P (α1 = 1) + P α1 < 1, zt < max (65) ( )! ǫj ρzt −ǫ1 , 2 ≤ j ≤ i ¯ ρξj ρ(1+ǫ1 )zt     ǫ1 ǫ1 (1 + ǫ1 ) ǫ1 + P zt > , zt < + . = P zt < ρ ρ ρ ρφi 42 By applying the marginal pdf for the t-th shortest distance, the outage probability for CSt to decode fi can be obtained as follows: −λc π Pt,i = e  ǫ1 (1+ǫ ) + ρφ 1 ρ i − 2 X t−1 α (λc π) k k=0  ǫ1 ρ + (1+ǫ1 ) ρφi k! − 2k α . (66) Hence, the second part of the lemma is proved. The outage probability for CSm to decode fi , i > 1, is the most difficult to obtain among the probabilities shown in the lemma. This probability can be first expressed as follows:    ǫ1 ǫi Pm,i =P α1 = 1, zm < max ,··· , ρξ1 ρξi    ǫ1 ǫ1 . ,··· , + P α1 < 1, zm < max ρξ1 ρξi (67) Note that α1 = 1 results in the situation that no power is allocated to fj , j > 1, which means n o that the event zm < max ρξǫ11 , · · · , ρξǫii always happens, if α1 = 1. In addition, by using the fact that rm ≤ rt , the outage probability can be simplified as follows:   ǫ1 Pm,i =P zt < ρ    ǫ2 ǫi ǫ1 . ,··· , + P zt > , zm < max ρ ρξ2 ρξi {z } | (68) Q1 Note that zt > However, zt > term ǫj , ρξj ǫ1 ρ ǫ1 ρ guarantees zm > ǫ1 , ρξ1 as zt ≤ zm and zt > does not guarantee zm > ǫj , ρξj ǫ1 ρξ1 is equivalent to zt > ǫ1 . ρ ǫ1 , ρ the j > 1. Recall that conditioned on zt > j > 1, can be simplified as follows: ǫi ǫi = ¯ ρzt −ǫ1 . ρξi ξi (1+ǫ1 )zt (69) Therefore, the term Q1 can be calculated as follows:    ǫ1 ǫi ǫ2 Q1 = P zt > , zm < max ,··· , ρ ρξ2 ρξi   ǫ1 (1 + ǫ1 )   . = P zt > , zm <  ρ φ ρ − ǫ1 i (70) zt After applying the path loss model, zt (zm ) can be replaced by the distance between the BS and CSt (CSm ), and the outage probability can be expressed as follows:  − α1 !  − α1 (1 + ǫ1 ) ǫ1 , ,x > Q1 = P y < ρ φi (ρ − ǫ1 y α ) (71) 43 where x denotes the distance between the BS and CSt and y denotes the distance between the BS and CSm . However, there is an extra constraint on y as follows:  − α1  − α1 ǫ1 (1 + ǫ1 ) > , ρ φi (ρ − ǫ1 y α) (72) which leads to the following constraint on y:   ρ 1 + ǫ1 α y > 1− . ǫ1 ǫ1 φi To better understand this constraint, the term 1+ǫ1 ǫ 1 φi (73) is rewritten as follows: 1 + ǫ1 1 + ǫ1 ǫMs 2R1 1 + ǫ1 o≥ n , = = ξ̄Ms ξ̄Ms ǫ1 φi ǫ1 ξ¯Ms ǫ1 ǫM ǫ1 min ξ̄ǫ22 , · · · , ǫM s (74) s where ξ¯Ms ≤ 1 and 2R1 ≥ 1 hold. The only uncertainty for the comparison between the term 1+ǫ1 ǫ 1 φi and 1 is caused by the relationship between ǫ1 and ǫMs . In the lemma, it is assumed that ǫ1 ≤ ǫMs . As a result, the constraint in (73) is always satisfied since 1+ǫ1 ǫ 1 φi probability in (71) also implies the following constraint: − α1  (1 + ǫ1 ) . y> φi (ρ − ǫ1 y α ) This leads to the following constraint on y:   α1 ρφi y> , τ1 . 1 + ǫ1 + ǫ1 φi ≥ 1. However, the (75) (76) After understanding the ranges of x and y, we can now apply the joint pdf to calculate the outage probability, which yields the following: Z τ2 Z y Q1 =  τ1 (1+ǫ1 ) φi (ρ−ǫ1 y α ) − 1 α frm ,rt (x, y)dxdy, (77) where τ2 is defined in the lemma. To facilitate the calculation of this integral, the joint pdf is rewritten as follows: frm ,rt (x, y) = t−m−1 X 4(λc π)t 2 e−λc πy (−1)p (t − m − 1)!(m − 1)! p=0   t − m − 1 2(t−m−1)−2p+1 2m+2p−1 y x . × p (78) 44 Now, we can apply the joint pdf which yields the following:   t−m−1 X 4(λc π)t p t−m−1 (−1) Q1 = p (t − m − 1)!(m − 1)! p=0 Z τ2 fm (y)dy, × (79) τ1 where fm (·) is defined in the lemma. One can apply Chebyshev-Gauss quadrature to obtain the following expression for Q1 :   t−m−1 X 4(λc π)t p t−m−1 Q1 ≈ (−1) p (t − m − 1)!(m − 1)! p=0 × N X π (τ2 − τ1 ) l=1 2N fm  τ2 + τ1 τ2 − τ1 wl + 2 2 q (80) 1 − wl2 . Substituting (80) and (60) into (68), the third part of the lemma is proved. A PPENDIX D P ROOF OF L EMMA 3 Because the two users associated with the same content server are located in different regions inside the disc with radius Rc , the density functions for their channel gains are different, and therefore, the two users’ outage probabilities will be calculated separately in the following subsections. 1) The outage performance at Um,2 : First define the composite channel gain as zm,k , |hm,mk |2 L(||ym,k ||) , for k ∈ {1, 2}. Recall that, for a user which is uniformly distributed in a disc with radius r, the CDF of its composite channel gain which includes the effects of small scale Rayleigh fading and path loss can be expressed as follows [6]: Fr (z) ≈ N X n=1  w̄n 1 − e−cn,r z , and the corresponding pdf of the channel gain is fr (z) ≈ (81) PN n=1 w̄n cn,r e−cn,r z . Recall that Um,2 is uniformly distributed in a disc with radius Rs , and therefore, the CDF and pdf of the channel gain of Um,2 are simply given by FRs (z) and fRs (z) by replacing r with Rs . The reason for using the approximated form in (81) is that both the approximated CDF and pdf are in the form of exponential functions. In the following, we will show that these exponential functions will signficiantly simplify the application of the probability generating functional (PGFL). 45 |hm,mk |2 With the definition of zm,k , L(||ym,k ||) , the SINR of Um,2 for decoding the first message, fm,1 , is given by SINR1m,2 = α12 zm,2 . 1 α22 zm,2 + Im,2 inter + ρ (82) Similarly, the SINR of Um,2 for decoding its own message, fm,2 , can be rewritten as follows: SINR2m,2 = α22 zm,2 . 1 Im,2 + inter ρ (83) Therefore, the outage probability of Um,2 for decoding its own message can be expressed as follows:  Pom,2 =1 − P log(1 + SINRlm,2 ) > Rl , l ∈ {1, 2} ( ( m,2 ǫ1 Iinter + ǫρ1 ǫ2 Im,2 inter + =EIm,2 P zm,2 < max , inter α12 − ǫ1 α22 α22 (84) ǫ2 ρ )!) , where Ex {·} denotes the expectation operation with respect to x. In order to facilitate the application of the PGFL, the outage probability is first rewritten as follows: ( ( m,2 )!) m,2 1 1 I + I + inter inter ρ ρ Pom,2 =EIm,2 P zm,2 < max , α2 −ǫ α2 α2 inter 1 2 1 (85) 2 ǫ ǫ 1 2    m,2 1   Iinter + ρ  . o n 2 =EIm,2 P zm,2 < α −ǫ α2 α2 inter   min 1 ǫ11 2 , ǫ22 After using the approximated expression for the pdf of zm,2 , the outage probability can be approximated as follows: Pom,2 ≈EIm,2 inter ≈1 −    N X    n=1 N X  m,2 I +1 ) ( inter ρ −cn,Rs 2 2 α1 −ǫ1 α2 2 , α2 min ǫ1 ǫ2  w̄n  1 − e − w̄n e ( min 1 cn,R ρ s ) α2 −ǫ1 α2 α2 1 2, 2 ǫ1 ǫ2 n=1         (86)   m,2 I c  ( n,Rs inter ) −    min α21 −ǫ1 α22 , α22  ǫ1 ǫ2 EIm,2 . e inter       Denote the Laplace transform of Im,2 inter by LIm,2 (s). Then, the outage probability can be inter rewritten as follows: Pom,2 ≈1 − N X n=1 − w̄n e ( min 1 cn,R ρ s ) 2 α −ǫ1 α2 α2 1 2, 2 ǫ1 ǫ2  LIm,2  inter min n cn,Rs α21 −ǫ1 α22 α22 , ǫ2 ǫ1  o . (87) 46 Therefore, the outage probability can be calculated if the Laplace transform of Im,2 inter is known. Particularly, the Laplace transform of Im,2 (s), can be first expressed as follows: inter , LIm,2 inter      Y 2 |hj,m2| exp −s LIm,2 (s) = E . inter  L (||ym,2 + xm − xj ||)  xj ∈Φc \xm By using the assumption that hj,m2 is Rayleigh distributed, the small scale fading gain can be averaged out in the expression, and the Laplace transform can be expressed as follows:    Y  1 LIm,2 (s) = E . s inter  + 1 L(||ym,2 +xm −xj ||) (88) xj ∈Φc \xm By applying the Campell theorem and the PFGL [31], [32], [44], the Laplace transform can be simplified as follows: LIm,2 (s) =exp −λc inter Z R2 1 − Eym,2 ( 1 s L(||ym,2 +xm −x||) +1 )! ! dx , (89) which contains a 2-D integral with respect to a HPPP point x. Denote the pdf of ym,2 , ym,2 ∈ B(xm , Rs ), by fym,2 (y), where we recall that B(xm , Rs ) denotes the disc with radius Rs and its origin located at xm . Therefore, the Laplace transform can be expressed as follows: ! ! Z Z 1 dxdy . LIm,2 (s) =exp −λc fym,2 (y) 1− s inter + 1 B(xm ,Rs ) R2 L(||y+xm −x||) (90) Following similar steps as in [31]–[33], [44], the substitution of y + xm − x → x′ can be used to simplify the expression of the Laplace transform as follows: Z Z fym,2 (y) LIm,2 (s) =exp −λc 1− inter B(xm ,Rs ) =exp −λc Z s L(||x′ ||) R2 fym,2 (y)2π B(xm ,Rs ) 1 Z 0 ∞ +1 ! 1 1− s +1 L(r) dx′ dy ! ! (91) ! rdrdy . After applying the Beta function [45], the Laplace transform can be obtained as follows:  !  Z 2 2 α−2 sα dy , fym,2 (y)2π B LIm,2 (s) =exp −λc inter α α α B(xm ,Rs ) !  2 sα 2 α−2 =exp −2πλc B , (92) , α α α where the last equality follows from the fact that the integral with respect to y is not a function of x. Substituting (92) into (87), the first part of the lemma is proved. 47 2) The outage performance at Um,1 : Recall that Um,1 is located inside a ring with Rs as the inner radius and Rc as the outer radius. Therefore, the CDF of this user’s channel gain needs to be calculated differently compared to that of Um,2 . First, by using the assumptions that the user is uniformly distributed inside the ring and the fading gain is Rayleigh distributed, the CDF of zm,1 can be expressed as follows [46]: 2 Fzm,1 (z) = 2 Rc − R2s Z Rc 1 − e−r αz Rs  rdr (93)  Z Rc 1 α  2 2 = 2 1 − e−r z rdr Rc 2 2 Rc − Rs Rc 0  Z Rs  −r α z 2 2 1−e rdr . −Rs 2 Rs 0 Comparing this with [6, Eq. (3)], one can find that the approximated form shown in (81) can be applied to each term in the above expression, and hence the CDF can be approximated as follows: Fzm,1 (z) = R2c   2 1 Rc FRc (z) − R2s FRs (z) . 2 − Rs (94) Following similar steps as in the previous subsection, the outage probability of Um,1 for decoding fm,1 can be obtained as follows Pom,1 =EIm,1 inter ( P zm,1 < ǫ1 Im,1 inter + α12 − ǫ1 ρ ǫ1 α22 !) . (95) After using the approximated expression for the pdf of zm,1 , the outage probability can be approximated as follows: Pom,1 R2 ≈ 2 c 2 EIm,1 Rc − Rs inter ( N X −cn,Rc w̄n 1 − e ǫ m,1 ǫ1 I + ρ1 inter α2 −ǫ1 α2 1 2 n=1 R2 − 2 s 2 EIm,1 Rc − Rs inter ( N X n=1 −cn,Rs w̄n 1 − e !) ǫ m,1 ǫ1 I + ρ1 inter 2 2 α1 −ǫ1 α2 !) ( ǫ m,1 ) N cn,R 1 ǫ I c X − n,R2s 1 inter − 2 s ρ2 R2s 2 ≈1 + 2 w̄n e α1 −ǫ1 α2 EIm,1 e α1 −ǫ1 α2 inter Rc − R2s n=1 ( ǫ m,1 ) N cn,R 1 ǫ I c X − n,R2c 1 inter − 2 c ρ2 R2c 2 − 2 w̄n e α1 −ǫ1 α2 EIm,1 e α1 −ǫ1 α2 . 2 inter Rc − Rs n=1 (96) m,2 It is straightforward to show that the Laplace transform of Im,1 inter is the same as that of Iinter . Therefore, substituting (92) with (96), the second part of the lemma is proved. 48 R EFERENCES [1] Z. Ding, P. Fan, G. Karagiannidis, R. Schober, and H. V. Poor, “On the application of NOMA to wireless caching,” in Proc. IEEE Int. Conf. on Commun., Kansas City, MO, May 2018. [2] Z. Ding, X. Lei, G. K. Karagiannidis, R. Schober, J. Yuan, and V. Bhargava, “A survey on non-orthogonal multiple access for 5G networks: Research challenges and future trends,” IEEE J. Sel. Areas Commun., vol. 35, no. 10, pp. 2181 –2195, 2017. [3] “5G radio access: Requirements, concepts and technologies,” NTT DOCOMO, Inc., Tokyo, Japan, 5G Whitepaper, Jul. 2014. [4] “5G innovation opportunities- a discussion paper,” techUK, London, 5G Whitepaper, Aug. 2015. [5] Y. Saito, Y. Kishiyama, A. Benjebbour, T. Nakamura, A. Li, and K. Higuchi, “Non-orthogonal multiple access (NOMA) for cellular future radio access,” in Proc. IEEE Veh. Tech. Conf., Dresden, Germany, Jun. 2013. [6] Z. Ding, Z. Yang, P. Fan, and H. V. Poor, “On the performance of non-orthogonal multiple access in 5G systems with randomly deployed users,” IEEE Signal Process. Lett., vol. 21, no. 12, pp. 1501–1505, Dec. 2014. [7] Z. Ding, P. Fan, and H. V. Poor, “Impact of user pairing on 5G non-orthogonal multiple access,” IEEE Trans. Veh. Tech., vol. 65, no. 8, pp. 6010–6023, Aug. 2016. [8] H. Nikopour and H. Baligh, “Sparse code multiple access,” in Proc. IEEE Int. Symposium on Personal Indoor and Mobile Radio Commun., London, UK, Sept. 2013. [9] X. Dai, S. Chen, S. Sun, S. Kang, Y. Wang, Z. Shen, and J. Xu, “Successive interference cancelation amenable multiple access (SAMA) for future wireless communications,” in Proc. IEEE Int. Conf. Commun. Systems, Coimbatore, India, Nov. 2014. [10] Z. Ding, P. Fan, and H. V. Poor, “Random beamforming in millimeter-wave NOMA networks,” IEEE Access, vol. 5, pp. 7667–7681, 2017. [11] Z. Ding, L. Dai, R. Schober, and H. V. Poor, “NOMA meets finite resolution analog beamforming in massive MIMO and millimeter-wave networks,” IEEE Commun. Lett., vol. 21, no. 8, pp. 1879–1882, Aug. 2017. [12] J. Choi, “Minimum power multicast beamforming with superposition coding for multiresolution broadcast and application to NOMA systems,” IEEE Trans. Commun., vol. 63, no. 3, pp. 791–800, Mar. 2015. [13] Z. Ding, F. Adachi, and H. V. Poor, “The application of MIMO to non-orthogonal multiple access,” IEEE Trans. Wireless Commun., vol. 15, no. 1, pp. 537–552, Jan. 2016. [14] X. Chen, Z. Zhang, C. Zhong, and D. W. K. Ng, “Exploiting multiple-antenna techniques for non-orthogonal multiple access,” IEEE J. Sel. Areas Commun., vol. 35, no. 10, pp. 2207 – 2220, 2017. [15] J. N. Laneman, D. N. C. Tse, and G. W. Wornell, “Cooperative diversity in wireless networks: Efficient protocols and outage behavior,” IEEE Trans. Inform. Theory, vol. 50, pp. 3062–3080, Dec. 2004. [16] Z. Ding, M. Peng, and H. V. Poor, “Cooperative non-orthogonal multiple access in 5G systems,” IEEE Commun. Lett., vol. 19, no. 8, pp. 1462–1465, Aug. 2015. [17] B. Zheng, X. Wang, M. Wen, and F.-J. Chen, “NOMA-based multi-pair two-way relay networks with rate splitting and group decoding,” IEEE J. Sel. Areas Commun., vol. PP, no. 99, pp. 1–1, 2017. 49 [18] M. Xu, F. Ji, M. Wen, and W. Duan, “Novel receiver design for the cooperative relaying system with non-orthogonal multiple access,” IEEE Commun. Lett., vol. 20, no. 8, pp. 1679–1682, Aug. 2016. [19] Y. Liu, Z. Ding, M. Elkashlan, and J. Yuan, “Nonorthogonal multiple access in large-scale underlay cognitive radio networks,” IEEE Trans. Veh. Tech., vol. 65, no. 12, pp. 10 152–10 157, Dec. 2016. [20] E. Bastug, M. Bennis, and M. Debbah, “Living on the edge: The role of proactive caching in 5G wireless networks,” IEEE Commun. Mag., vol. 52, no. 8, pp. 82–89, Aug. 2014. [21] N. Golrezaei, A. F. Molisch, A. G. Dimakis, and G. Caire, “Femtocaching and device-to-device collaboration: A new architecture for wireless video distribution,” IEEE Commun. Mag., vol. 51, no. 4, pp. 142–149, Apr. 2013. [22] M. A. Maddah-Ali and U. Niesen, “Fundamental limits of caching,” IEEE Trans. Inform. Theory, vol. 60, no. 5, pp. 2856–2867, May 2014. [23] X. Xu and M. Tao, “Modeling, analysis, and optimization of coded caching in small-cell networks,” IEEE Trans. Commun., vol. 65, no. 8, pp. 3415–3428, Aug. 2017. [24] Z. Chen and M. Kountouris, “D2D caching vs. small cell caching: Where to cache content in a wireless network?” in Proc. Int. Workshop on Signal Processing Advances in Wireless Commun., Edinburgh, UK, Jul. 2016. [25] M. Tao, E. Chen, H. Zhou, and W. Yu, “Content-centric sparse multicast beamforming for cache-enabled cloud RAN,” IEEE Trans. Wireless Commu., vol. 15, no. 9, pp. 6118–6131, Sept. 2016. [26] N. Zhao, X. Liu, F. R. Yu, M. Li, and V. C. M. Leung, “Communications, caching, and computing oriented small cell networks with interference alignment,” IEEE Commun. Mag., vol. 54, no. 9, pp. 29–35, Sept. 2016. [27] F. Cheng, Y. Yu, Z. Zhao, N. Zhao, Y. Chen, and H. Lin, “Power allocation for cache-aided small-cell networks with limited backhaul,” IEEE Access, vol. 5, pp. 1272–1283, 2017. [28] M. Ji, G. Caire, and A. F. Molisch, “Fundamental limits of caching in wireless D2D networks,” IEEE Trans. Inform. Theory, vol. 62, no. 2, pp. 849–869, Feb 2016. [29] R. Wang, J. Zhang, S. H. Song, and K. B. Letaief, “Mobility-aware caching in D2D networks,” IEEE Trans. Wireless Commun., vol. 16, no. 8, pp. 5001–5015, Aug. 2017. [30] Z. Zhao, M. Xu, Y. Li, and M. Peng, “A non-orthogonal multiple access (NOMA)-based multicast scheme in wireless content caching networks,” IEEE J. Sel. Areas Commun., vol. PP, no. 99, pp. 1–1, 2017. [31] M. Haenggi, Stochastic Geometry for Wireless Networks. Cambridge University Press, Cambridge, UK, 2012. [32] K. Gulati, B. L. Evans, J. G. Andrews, and K. R. Tinsley, “Statistics of co-channel interference in a field of Poisson and Poisson-Poisson clustered interferers,” IEEE Trans. Signal Process., vol. 58, no. 12, pp. 6207–6222, Dec. 2010. [33] Y. J. Chun, M. O. Hasna, and A. Ghrayeb, “Modeling heterogeneous cellular networks interference using Poisson cluster processes,” IEEE J. Sel. Areas Commun., vol. 33, no. 10, pp. 2182–2195, Oct. 2015. [34] K. Shanmugam, N. Golrezaei, A. G. Dimakis, A. F. Molisch, and G. Caire, “FemtoCaching: Wireless content delivery through distributed caching helpers,” IEEE Trans. Inform. Theory, vol. 59, no. 12, pp. 8402–8413, Dec. 2013. [35] J. Venkataraman, M. Haenggi, and O. Collins, “Shot noise models for outage and throughput analyses in wireless ad hoc networks,” in Proc. IEEE Military Commun. Conf., Washington, DC, USA, Oct. 2006. [36] F. Baccelli and A. Giovanidis, “A stochastic geometry framework for analyzing pairwise-cooperative cellular networks,” IEEE Trans. Wireless Commu., vol. 14, no. 2, pp. 794–808, Feb. 2015. 50 [37] 3rd Generation Partnership Project (3GPP), “Study on downlink multiuser superposition transmission for LTE,” Mar. 2015. [38] J. Tang, G. Chen, J. P. Coon, and D. E. Simmons, “Distance distributions for matern cluster processes with application to network performance analysis,” in Proc. IEEE Int. Conf. on Commun., Paris, France, May 2017, pp. 1–7. [39] M. Haenggi, “On distances in uniformly random networks,” IEEE Trans. on Information Theory, vol. 51, no. 10, pp. 3584–3586, Oct. 2005. [40] A. Liu and V. K. N. Lau, “Cache-enabled opportunistic cooperative MIMO for video streaming in wireless systems,” IEEE Trans. Signal Process., vol. 62, no. 2, pp. 390–402, Jan. 2014. [41] J. Liu, B. Bai, J. Zhang, and K. B. Letaief, “Cache placement in Fog-RANs: From centralized to distributed algorithms,” IEEE Trans. Wireless Commu., vol. 16, no. 11, pp. 7039–7051, Nov. 2017. [42] Y. Cao, M. Tao, F. Xu, and K. Liu, “Fundamental storage-latency tradeoff in cache-aided MIMO interference networks,” IEEE Trans. Wireless Commu., vol. 16, no. 8, pp. 5061–5076, Aug. 2017. [43] A. Sengupta, R. Tandon, and O. Simeone, “Fog-aided wireless networks for content delivery: Fundamental latency tradeoffs,” IEEE Trans. Inform. Theory, vol. 63, no. 10, pp. 6650–6678, Oct 2017. [44] Z. Qin, Y. Liu, G. Y. Li, and J. A. McCann, “Modelling and analysis of low-power wide-area networks,” in Proc. IEEE Int. Conf. on Commun., Paris, France, May 2017, pp. 1–7. [45] I. S. Gradshteyn and I. M. Ryzhik, Table of Integrals, Series and Products, 6th ed. New York: Academic Press, 2000. [46] H. Wang, S. Ma, T.-S. Ng, and H. V. Poor, “A general analytical approach for opportunistic cooperative systems with spatially random relays,” IEEE Trans. Wireless Commun., vol. 10, no. 12, pp. 4122–4129, Dec. 2011.
7cs.IT
The cone topology on masures Corina Ciobotaru∗1 , Bernhard Mühlherr†2 and Guy Rousseau‡3,4 arXiv:1703.00318v1 [math.GR] 1 Mar 2017 1 Université de Fribourg, Section de Mathématiques, Chemin du Musée 23, 1700 Fribourg, Switzerland. 2 Universität Giessen, Mathematisches Institut, Arndtstrasse 2, 35392 Gießen, Germany. 3 Université de Lorraine, Institut Élie Cartan de Lorraine, UMR 7502, Vandœuvre-lès-Nancy, F-54506, France. 4 CNRS, Institut Élie Cartan de Lorraine, UMR 7502, Vandœuvre-lès-Nancy, F-54506, France. February 28, 2017 Abstract Masures are generalizations of Bruhat–Tits buildings and the main examples are associated with almost split Kac–Moody groups G over non-Archimedean local fields. In this case, G acts strongly transitively on its corresponding masure ∆ as well as on the building at infinity of ∆, which is the twin building associated with G. The aim of this article is twofold: firstly, to introduce and study the cone topology on the twin building at infinity of a masure. It turns out that this topology has various favorable properties that are required in the literature as axioms for a topological twin building. Secondly, by making use of the cone topology, we study strongly transitive actions of a group G on a masure ∆. Under some hypotheses, with respect to the masure and the group action of G, we prove that G acts strongly transitively on ∆ if and only if it acts strongly transitively on the twin building at infinity ∂∆. Along the way a criterion for strong transitivity is given and the existence and good dynamical properties of strongly regular hyperbolic automorphisms of the masure are proven. 1 Introduction Masures were introduced by Gaussent and Rousseau [GR08] and developed further by Rousseau [Rou11,Rou16,Rou], Charignon [Cha11], Gaussent–Rousseau [GR14] and BardyPanse–Gaussent–Rousseau in [BPGR16]. The theory of masures has been developed in ∗ [email protected], Partially supported by Swiss National Science Foundation Grant 153599 [email protected][email protected] † 1 2 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau order to make several techniques from Bruhat–Tits theory also applicable in the context of Kac–Moody groups. By Bruhat–Tits theory, with every semi-simple algebraic group G over a non-Archimedean local field K there is associated a “symmetric space”, called the affine building of G. More generally, with an almost split Kac–Moody group G over such a field K there is associated a masure whose construction is carried out by suitably modifying the Bruhat–Tits construction. As for buildings, a masure is covered by apartments corresponding to the maximal split tori and every apartment is a finite dimensional real affine space endowed with a set of affine hyperplanes called walls. At a first glance, a masure looks very much like a Bruhat–Tits building. However, in the case of masures, the set of all walls is not always a locally finite system of hyperplanes and it is no longer true that any two points are contained in a common apartment. For this reason, the word “building” is replaced by the word “masure”. Moreover, if we look at infinity of a masure, we obtain a twin building, which is the analogue of the spherical building at infinity associated with a Bruhat–Tits building. As an application, Bardy-Panse, Gaussent and Rousseau [GR14], [BPGR16] use the construction of masures to define the spherical Hecke and Iwahori–Hecke algebras associated with an almost split Kac–Moody group over a non-Archimedean local field. In [GR08] the masure is used to make the link (in the representation theory of Kac–Moody groups) between the Littelmann’s path model and the Mirkovic–Vilonen cycle model. Although there are several contributions to the subject, it is fair to say that the theory of masures is not yet in its final form. This is underlined by the fact that there are several basic questions that still need to be answered. Most of these questions are about generalizations of known results from Bruhat–Tits theory and sometimes it is even not clear how to state properly the analogue of such a result in the context of masures. In [CR] two of us provided a generalization of a result on strongly transitive actions that has been proved by the first author in a joint work with P.-E. Caprace in [CC15] for Bruhat–Tits buildings. The result in [CC15] involves the cone topology on the spherical building at infinity of a Bruhat–Tits building and therefore relies on the fact that the latter is a CAT(0)-space. Unfortunately, it seems that there is no reasonable way to endow a masure with a CAT(0)-metric. However, it turns out that there is nonetheless a canonical cone topology on the set of chambers of the twin building at infinity of a masure. This observation was indeed one of the crucial insights in [CR] to generalize the result in [CC15] to masures. Apart from being useful in this particular context we believe that the cone topology is an important ingredient for the theory of masures. For this reason we provide several basic results regarding the cone topology which show that it has several remarkable properties. As a consequence of our investigation, it turns out that the twin building at infinity of a masure endowed with the cone topology is a “weak topological twin building” in the sense of Hartnick–Köhl–Mars [HKM13]. In that paper, topological twin buildings are constructed by means of the Kac–Peterson topology of a Kac–Moody group. It turns out that masures provide examples of weak topological twin buildings and this construction appears to be much more natural and direct than the one given in Hartnick– Köhl–Mars [HKM13]. The cone topology on masures 3 As a result of what has been said so far, the goal of this article is twofold. Firstly, we introduce the cone topology on the set of chambers of the twin building at infinity of a masure and study its basic properties. Secondly, we investigate the notion of strong transitivity for masures. Based on the notion of the cone topology we are able to provide a generalization of a result of Caprace and Ciobotaru from [CC15]. 1.1 The cone topology on a masure For any CAT(0) space (e.g., a locally finite affine building, a locally finite tree, etc.) the cone topology is a natural topology used to study various properties of the visual boundary of the corresponding CAT(0) space. Unfortunately, there does not seem to be any reasonable way to endow a masure with a CAT(0) metric. Therefore it is unlikely that we can use the full power of the CAT(0) machinery in the context of masures. However, it turns out that there is still a canonical topology on the set of chambers of the twin building at infinity of a masure which generalizes the cone topology on the visual boundary of a Bruhat–Tits building. The precise definition of the cone topology requires some preparation and it is given in Definition 3.2. It turns out that the cone topology has several remarkable properties and some of them are given in the following theorem. Theorem 1.1. Let ∆ be a masure and let X be the set of chambers of the twin building at infinity of ∆. 1. The cone topology on the set X of all chambers at infinity of a masure is Hausdorff. 2. Residues are closed with respect to the cone topology on X. 3. The set of chambers in X opposite a given chamber in X is open in X. 4. When the masure is “locally finite” and “locally complete” (see Definitions 2.3 and 2.4 below), then any panel and, more generally, any spherical residue or Schubert variety in X is compact. We would like to point out that the statement of Theorem 1.1 is meant to give the reader a rough idea about our results on the cone topology. They will be proved among other results given in Sections 3.2 and 3.3 to which we refer for the details. As already indicated above, these results provide a link to previous contributions of Kramer [Kra02] and Hartnick–Köhl–Mars [HKM13] on topological twin buildings. Especially in the latter reference the authors discuss several axioms that one could require for a topological twin building. It turns out that the cone topology behaves very nicely in the sense that it satisfies most of them. Apart from the basic facts on the cone topology recorded in Theorem 1.1 we shall also present in this introduction a slightly more specific result. This result relies on the notion of a panel tree in a masure, which also plays a crucial role on our results on strongly transitive actions. The concept of a panel tree is well known from the theory of affine buildings and it turns out that it generalizes without any problems to masures. More precisely, let ∆ be a masure and let X be its building at infinity. Then one can 4 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau associate with any pair (R, R′ ) of opposite spherical residues of X an affine building ∆(R, R′ ) which is a “convex” subset of ∆; moreover, there is a canonical identification of R with the spherical building at infinity of ∆(R, R′ ). As we already mentioned, there is the “usual” cone topology on the boundary ∂∆(R, R′ ) of ∆(R, R′ ) which induces a topology τR′ on R, that a priori depends on the opposite residue R′ . Proposition 1.2. Let ∆ be a masure, let X be its building at infinity, let R be a spherical residue of X and let τX be the cone topology on X. Then τX |R = τR′ for each residue R′ that is opposite R in X. For more details about Proposition 1.2 see Section 2.6 and Remark 3.17. 1.2 A topological criterion for strong transitivity In the second part of the paper we shall provide a criterion which ensures that a group action on a masure is strongly transitive. This criterion involves the cone topology on the twin building at infinity. Its proof relies on a modification of the strategy followed by Caprace and Ciobotaru in [CC15]. The notion of a strongly transitive action on a discrete building is crucial for group theoretic applications of buildings since it provides the link to groups with BN-pairs. If the building is no longer discrete (e.g., R−buildings), the standard definition of a strongly transitive action has to be suitably modified in order to adapt the basic machinery (see Section 4.1 below). Thus it is not surprising that there is also a natural definition of a strongly transitive action on a masure. It is given in Rousseau [Rou, 4.10] (see also Gaussent-Rousseau [GR14, 1.5]) and it is recalled in Definition 4.6 below. As this definition is somehow involved we prefer to omit it in this introduction. The starting point of our investigation is provided by the following: Fact 1.3. (see Proposition 4.9) Let ∆ be a thick affine building (or a thick masure) and let X be its (twin)-building at infinity. Suppose that a group G acts strongly transitively on ∆, then the action of G induced on X is strongly transitive as well. The converse is not true in general: There are examples of group actions on affine buildings or masures which are not strongly transitive on ∆ but which induce a strongly transitive action on X. The following remark provides a basic example of such a situation. Remark 1.4. Let T be a regular tree and let ξ be an end of T . Define A to be the set of all apartments of T not containing ξ at infinity and let G be the group of automorphisms of T fixing ξ. Then G is 2−transitive (equivalently, strongly transitive) on the set E(A) of ends of (T, A). But G is not strongly transitive on (T, A): any g ∈ G stabilizing an apartment A ∈ A fixes the projection of ξ on A. Suppose that G is a group acting on a masure such that its action on the twin building at infinity is strongly transitive. In view of the example above it is natural to ask for additional conditions which ensure that G acts strongly transitively on the masure. For affine buildings one such condition is the assumption that the apartment system of ∆ is The cone topology on masures 5 complete. In the locally finite case this is due to Caprace and Ciobotaru, as it follows from Theorem 1.1 in [CC15]. It was proved later in full generality by Kramer and Schillewaert in [KS]. Although completeness of the apartment system is a most natural assumption, there are important situations where the apartment system is not complete. Moreover, in the case of masures it is even not clear whether there is a sensible definition of a complete apartment system. Thus, it is natural to ask for other conditions which ensure that a strongly transitive action at infinity yields a strongly transitive action on the affine building or masure. In this paper we provide such a condition for masures. It involves the cone topology and the notion of a strongly regular hyperbolic element in the automorphisms group of a masure. It relies on the observation, that the strategy used by Caprace and Ciobotaru in the proof of Theorem 1.1 in [CC15] can be modified in such a way that completeness is not needed and - more importantly in our context - that it also works for masures. Before stating our generalization of the main result of [CC15] it is convenient to provide some information about strongly regular hyperbolic elements in the automorphism group of a masure and to formulate the analogue of the topological condition in [CC15] for masures. Strongly regular hyperbolic automorphisms of masures: Let ∆ be a masure and let α ∈ Aut(∆). Then α is called a strongly regular hyperbolic automorphism of ∆ if it has no fixed points in ∆ and stabilizes an apartment A of ∆ on which it induces a translation. Moreover, the direction of the latter is required to be in the Tits cone (up to sign), but should not be contained in any of its walls (see Definition 5.1). As a side product of our investigation in this paper we obtain the following general fact about strongly regular hyperbolic elements: Proposition 1.5. Let ∆ be a thick masure such that the type of ∂∆ has no direct factor of affine type. If a vectorially Weyl subgroup G ≤ Aut(∆) is strongly transitive, then G contains a strongly regular hyperbolic element. This is a consequence of Lemma 4.11 and Theorem 5.2 below. A topological condition for group actions on masures: The following definition is motivated by one of the assumptions in Theorem 1.1 of [CC15]: Definition 1.6. Let ∆ be a masure and let G be a group acting by vectorially Weyl automorphisms (see Section 2.4.1) on ∆. Let c ∈ Ch(∂∆), let cop denote the set of chambers in ∂∆ which are opposite to c and let Gc denote the stabilizer of c in G. The horospherical stabilizer of c is defined to be the group G0c := {g ∈ Gc | g fixes a point in ∆} (see Lemma 4.2). We say that G satisfies Condition (Top) if, for each chamber c in ∂∆, the following holds: (Top) The orbits of G0c in cop are closed with respect to the topology on cop that is induced from the cone topology on ∂∆. We are now in the position to state our main result about strongly transitive actions on masures: 6 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau Theorem 1.7. Let (∆, A) be a thick masure and let G be a vectorially Weyl subgroup of Aut(∆). If G contains a strongly regular hyperbolic element and satisfies Condition (Top), then the following are equivalent: (i) G acts strongly transitively on ∆; (ii) G acts strongly transitively on the twin building at infinity ∂∆. Combining Theorem 1.7, Proposition 1.5 and Remark 6.2, we obtain also the following: Corollary 1.8. Let ∆ be a thick masure such that the type of ∂∆ has no direct factor of affine type. Let G ≤ Aut(∆) be a vectorially Weyl subgroup.Then the following are equivalent: (i) G acts strongly transitively on ∂∆, contains a strongly regular hyperbolic automorphism of Aut(∆) and satisfies Condition (Top); (ii) G is strongly transitive on ∆. Remark 1.9. Theorem 1.7 generalizes Theorem 1.1 of [CC15]. But in the latter theorem, there is a third equivalent condition involving the existence of a commutative spherical Hecke algebra. This existence is proved in [GR14] for groups strongly transitive on a locally finite masure. We did not investigate here the possibility of a converse result. 1.3 Organization of the paper In Section 2 we explain the background of this article about masures and twin buildings. We add also a less known topic: the affine building (resp., panel tree) associated to a pair of opposite ideal faces (resp., panels) at infinity of a masure. In Section 3 we define and study the cone topology on the twin building at infinity of a masure. We prove Theorem 1.1 and several other results which are motivated by the axioms for topological twin buildings discussed in [HKM13]. In Section 4 we introduce different notions of stabilizers (in particular the horospherical stabilizer) of chambers or pairs of opposite panels at infinity, and prove some technical lemmas about them. We remind also the existing definitions of strong transitivity in combinatorial buildings, affine R−buildings and twin buildings. The definition of strong transitivity in masures is introduced in Section 4. Two equivalent simpler definitions are given and the Fact 1.3 is proven. A link is also made with a weaker condition (LST) of “locally strong transitivity”. In Section 5 we study the existence and dynamics of strongly regular hyperbolic elements. We prove Proposition 1.5, under the weaker hypothesis (LST) and more generally for masures of affine type, under a technical condition (AGT). This allows us to prove Theorem 1.7 and Corollary 1.8 in Section 6. 7 The cone topology on masures Acknowledgement This paper is an extension of the preprint [CR] which was initiated when G.R. was visiting C.C. at the University of Geneva in 2014. C.C. and G.R. would like to thank this institution for its hospitality and good conditions of working. The research yielding to the paper in its present form was accomplished during a visit of C.C. and G.R. at the University of Gießen. The authors are grateful to this institution for its support. 2 2.1 Masures Vectorial data We consider a quadruple (V, W v , (αi )i∈I , (α∨ i )i∈I ) where V is a finite dimensional real v vector space, W a subgroup of GL(V ) (the vectorial Weyl group), I a finite non empty ∗ set, (α∨ i )i∈I a family in V and (αi )i∈I a free family in the dual V . We ask these data to satisfy the conditions of Rousseau [Rou11, 1.1]. In particular, the formula ri (v) = v v v − αi (v)α∨ i defines a linear involution in V which is an element in W and (W , S = {ri | i ∈ I}) is a Coxeter system. Actually we consider throughout the paper the Kac–Moody case of [Rou11, 1.2]: the matrix M = (αj (α∨ i ))i,j∈I is a generalized (possibly decomposable) Cartan matrix. Then v W is the Weyl group of the corresponding Kac–Moody Lie algebra gM , it acts on V and its dual V ∗ with the associated real root system being Φ = {w(αi ) | w ∈ W v , i ∈ I} ⊂ Q = M Z.αi . i∈I P L ∨ WePset Φ± = Φ ∩ Q± where Q± = ±( i∈I (Z≥0 ).αi ) and Q∨ = ( i∈I Z.α∨ i ), Q± = ∨ + − −1 ±( i∈I (Z≥0 ).αi ). We have Φ = Φ ∪ Φ and, for α = w(αi ) ∈ Φ, rα = w.ri .w and rα (v) = v − α(v)α∨ , where the coroot α∨ = w(α∨ i ) depends only on α. We shall also ± ± v consider the imaginary roots of gM : Φim = Φ+ ∪ Φ− im im where Φim ⊂ Q is W −stable and Φ ⊔ Φim is the set of all roots of gM , associated with some Cartan subalgebra. The fundamental positive chamber is Cfv := {v ∈ V | αi (v) > 0, ∀i ∈ I}. Its closure Cfv is the disjoint union of the vectorial faces F v (J) := {v ∈ V | αi (v) = 0, ∀i ∈ J, αi (v) > 0, ∀i ∈ I \ J} for J ⊂ I. The positive (resp., negative) vectorial faces are the sets w.F v (J) (resp., −w.F v (J)) for w ∈ W v and J ⊂ I; they are chambers (resp., panels) when J = ∅ (resp., |J| = 1). The support of such a face is the vector space it generates. The set J or the face w.F v (J) or an element of this face is called spherical if the group W v (J) := hri | i ∈ Ji is finite. Actually the type of the face ±w.F v (J) is J; by abuse of notation we identify J with the subset {ri | i ∈ J} of S. A chamber or a panel is spherical. The Tits cone T (resp., its interior T ◦ ) is the (disjoint) union of the positive vectorial (resp., and spherical) faces. Actually T is a geometric realization of the Coxeter complex of W v . The classical geometric realization is the quotient by V0 = F v (I) = ∩i∈I Ker(αi ) and R>0 of T \ V0 . 8 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau We make no irreducibility hypothesis for (V, W v ). So V (and also A, ∆ as below) may be a product of direct irreducible factors, which are either of finite, affine or indefinite type, see Kac [Kac90, 4.3]. When M is a genuine Cartan matrix (i.e., when W v is finite) gM is a reductive Lie algebra and everything is classical, in particular Φ is finite, Φim = ∅ and T = T ◦ = V . 2.2 The model apartment As in Rousseau [Rou11, 1.4] the model apartment A is V considered as an affine space and endowed with a family M of walls. These walls are affine hyperplanes directed by Ker(α), for α ∈ Φ. They can be described as M (α, k) = {v ∈ V | α(v) + k = 0}, for α ∈ Φ and k ∈ Λα ⊂ R (with |Λα | = ∞). We may (and shall) suppose the origin to be special, i.e., 0 ∈ Λα , ∀α ∈ Φ. We define Λα = R, when α ∈ Φim . We say that this apartment is semi-discrete if each Λα (for α ∈ Φ) is discrete in R; in this case Λα = kα .Z is a non trivial discrete subgroup of R. Using Lemma 1.3 in Gaussent–Rousseau [GR14] (i.e., replacing Φ by another system Φ1 ) we may assume that Λα = Z, ∀α ∈ Φ. Notice that, for W v finite, semi-discrete is equivalent to discrete (which means that the family M of walls is locally finite). For α ∈ Φ, k ∈ Λα and M = M (α, k), the reflection rα,k = rM with respect to the wall M is the affine involution of A with fixed points this wall M and associated linear involution rα . The affine Weyl group W a is the group generated by the reflections rM for M ∈ M; we assume that W a stabilizes M. Actually W a = W v ⋉ Q∨ when Λα = Z, ∀α ∈ Φ; the group W a is then a Coxeter group when W v is finite. An automorphism of A is an affine bijection ϕ : A → A stabilizing the set of pairs (M, α∨ ) of a wall M and the coroot associated with α ∈ Φ such that M = M (α, k), k ∈ Z. The group Aut(A) of these automorphisms contains W a and normalizes it. For α ∈ Φ and k ∈ R, D(α, k) = {v ∈ V | α(v) + k ≥ 0} is an half-space, it is called an half-apartment if M (α, k) is a wall i.e., k ∈ Λα . The Tits cone T and its interior T o are convex and W v −stable cones (this is proved in [Kac90, 3.12] for T and it is then clear for T o ). Therefore, we can define two W v −invariant preorder relations on A: x≤y ⇔ y−x∈T; o x < y ⇔ y − x ∈ T o. If W v has no fixed point in V \ {0} and no finite factor, then they are order relations; still, they are not in general: one may have x ≤ y, y ≤ x and x 6= y. If W v is finite, both relations are trivial. 2.3 Faces, sectors, chimneys... The faces in A are associated with the above systems of walls and half-apartments. As in Bruhat–Tits [BT72], they are no longer subsets of A, but filters of subsets of A. For the definition of that notion and its properties, we refer to Bruhat–Tits [BT72] or Gaussent– Rousseau [GR08, Definition 2.3]. We endow A with its affine space topology. 9 The cone topology on masures If F is a subset of A containing an element x in its closure, the germ of F in x is the filter germx (F ), consisting of all subsets of A containing the intersection of F with some neighborhood of x. Given a filter F of subsets of A, its enclosure clA (F ) (resp., closure F ) is the filter made of the subsets of A containing a set of the form ∩α∈Φ∪Φim D(α, kα ) that is in F , where kα ∈ Λα ∪ {∞} (resp., containing the closure S of some S ∈ F ). Its support, denoted by supp(F ), is the smallest affine subspace of A containing it. A local face F in the apartment A is associated with a point x ∈ A (its vertex) and a vectorial face F v in V (its direction); it is F = F ℓ (x, F v ) := germx (x + F v ). Its closure is F ℓ (x, F v ) = germx (x + F v ). The enclosure clA (F ) is called a closed face. There is an order on the local faces: the assertions “F is a face of F ′ ”, “F ′ covers F ” and “F ≤ F ′ ” are by definition equivalent to F ⊂ F ′ . The dimension of a local face F is the dimension of its support; if F = F ℓ (x, F v ), then we have supp(F ) := x + supp(F v ). A local chamber is a maximal local face, i.e., a local face F ℓ (x, ±w.Cfv ) for some x ∈ A and w ∈ W v . The fundamental local chamber is C0+ = germ0 (Cfv ). A local panel is a local face F ℓ (x, F v ), where x ∈ A and F v is a vectorial panel. A sector in A is a V −translate Q = x + C v of a vectorial chamber C v = ±w.Cfv (w ∈ W v ), x is its base point and C v is its direction; it is open in A. Two sectors have the same direction if, and only if, they are conjugate by a V −translation, and if, and only if, their intersection contains another sector. The sector-germ of a sector Q = x + C v in A is the filter germ(Q) of subsets of A consisting of the sets containing a V −translation of Q, it is well determined by the direction C v . So, the set of translation classes of sectors in A, the set of vectorial chambers in V and the set of sector-germs in A are in canonical bijection. A sector-face in A is a V −translation f = x + F v of a vectorial face F v = ±w.F v (J), its direction; its type is J. The sector-face-germ of f is the filter F of subsets containing a shortening of f i.e., a translation f′ of f by a vector in F v (i.e., f′ ⊂ f). If F v is spherical, then f and F are also called spherical. The sign of f and F is the sign of F v . We say that f (resp., F) is a sector-panel (resp., sector-panel-germ) if, and only if, F v is a vectorial panel. A chimney in A is associated with a local face F = F ℓ (x, F0v ), called its basis, and to a vectorial face F v , its direction; it is the filter r(F, F v ) := clA (F + F v ). A chimney r = r(F, F v ) is splayed if F v is spherical, it is solid if the direction of its support (as a filter) has a finite pointwise stabilizer in W v . A splayed chimney is therefore solid. The enclosure of a sector-face f = x + F v is a chimney. The germ of the chimney r is the filter germ(r) = R consisting of all subsets of A which contain r(F + ξ, F v ) for some ξ ∈ F v . A ray δ with origin in x and containing y 6= x (or the interval (x, y], or the segment o o [x, y]) is called preordered if x ≤ y or y ≤ x, generic if x < y or y < x and strongly 10 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau regular if moreover y − x is in no wall-direction; its sign is + if x ≤ y and − if x ≥ y (it may be + and −, e.g., if W v is finite). The germ of this ray is the filter germ(δ) consisting of all subsets of A which contain a shortening of δ i.e., δ \ [x, z) for some z ∈ δ. 2.4 The masure In this section, we recall the definition and some properties of a masure given in Rousseau [Rou11], where the masure is called “masure affine ordonnée”. 2.4.1 The apartment system An apartment of type A is a set A endowed with a set Isomw(A, A) of bijections (called Weyl–isomorphisms) such that, if f0 ∈ Isomw(A, A), then f ∈ Isomw(A, A) if, and only if, there exists w ∈ W a satisfying f = f0 ◦ w. An isomorphism (resp., a Weyl– isomorphism, resp., a vectorially Weyl–isomorphism) between two apartments ϕ : A → A′ is a bijection such that, for any f ∈ Isomw(A, A) and f ′ ∈ Isomw(A, A′ ), we have f ′−1 ◦ ϕ ◦ f ∈ Aut(A) (resp., ∈ W a , resp., ∈ (W v ⋉ V ) ∩ Aut(A)). We write Isom(A, A′ ) ′ (resp., Isomw (A, A′ ), resp., Isomw R (A, A )) for the set of all these isomorphisms. All isomorphisms considered in [Rou11] are Weyl–isomorphisms. As the filters in A defined in Section 2.3 (e.g., local faces, sectors, walls, etc) are permuted by Aut(A), they are well defined in any apartment of type A and preserved by any isomorphism; each such apartment is also endowed with a canonical structure of real affine space. Definition 2.1. A masure (or affine ordered hovel) of type A is a set ∆ endowed with a covering A of subsets called apartments such that: (MA1) any A ∈ A admits a structure of an apartment of type A; (MA2) if F is a point, a germ of a preordered interval, a generic ray or a solid chimney in an apartment A and if A′ is another apartment containing F , then A ∩ A′ contains the enclosure clA (F ) of F and there exists a Weyl–isomorphism from A onto A′ fixing (pointwise) clA (F ); (MA3) if R is the germ of a splayed chimney and if F is a closed face or a germ of a solid chimney, then there exists an apartment that contains R and F ; (MA4) if two apartments A, A′ contain R and F as in (MA3), then their intersection contains clA (R ∪ F ) and there exists a Weyl–isomorphism from A onto A′ fixing (pointwise) clA (R ∪ F ); (MAO) if x, y are two points contained in two apartments A and A′ , and if x ≤A y then the two line segments [x, y]A and [x, y]A′ are equal. The covering A appearing in the definition of the masure is called the apartment system of the masure ∆. The cone topology on masures 11 We say that ∆ is thick (resp., of finite thickness) if the number of local chambers containing a given (local) panel is ≥ 3 (resp., finite). If ∆ is thick, then any wall M in ∆ is thick: there are three half-apartments H1 , H2 , H3 such that, for i 6= j, Hi ∩ Hj = M (and then Hi ∪Hj ∈ A) [Rou11, Prop. 2.9]. For affine buildings the definition of thickness is the same as the one stated above for a masure. The proof of the thickness of any wall is then classical and well known for the discrete affine buildings; for R−buildings that proof is an easy consequence of condition (CO) of Parreau [Par00, 1.21]. An automorphism (resp., a Weyl–automorphism, resp., a vectorially Weyl– automorphism) of ∆ is a bijection ϕ : ∆ → ∆ such that A ∈ A ⇐⇒ ϕ(A) ∈ A and then ϕ|A : A → ϕ(A) is an isomorphism (resp., a Weyl–isomorphism, resp., a vectorially Weyl–isomorphism). All isomorphisms considered in [Rou11] are Weyl–isomorphisms. For x, y ∈ ∆, we introduce the relation: x ≤ y if, and only if, there is an (or for any) apartment A such that x, y ∈ A and x ≤A y (i.e., f −1 (x) ≤ f −1 (y) for any f ∈ Isomw (A, A)). This relation is a preorder on ∆, invariant by any vectorially Weyl–automorphism. It is trivial if W v is finite. Remark 2.2. 1) When W v is finite, a masure of type A is the same thing as a (not necessarily discrete) affine building of type A that is chimney friendly (i.e., any two chimney-germs are in a same apartment). In particular, the buildings associated with valued root data are masures. Actually by Charignon [Cha11], a discrete affine building is chimney friendly if and only if it is sector friendly (i.e., any two sector-germs are in a same apartment). In this article the R−buildings are considered among affine buildings; they are sector friendly by definition. 2) The system of apartments is given with the masure and may not be “complete” (even if ∆ is a building). Actually in Rousseau [Rou16] one obtains masures associated with split Kac–Moody groups over fields endowed with a real valuation, possibly not with a “complete” apartment system. Up to now there is no definition of “complete masures”. We shall use actually a substitute. See Definition 2.4 below. 3) Affine buildings are locally finite if and only if they are discrete and of finite thickness. We shall use these two properties as a substitute to “local finiteness” for masures: Definition 2.3. Let ∆ be a masure. We say that ∆ is locally finite if ∆ is semi-discrete and of finite thickness. The main examples of thick, semi-discrete (resp., and of finite thickness) masures are provided by the masures associated with an almost split Kac–Moody group over a field complete with respect to a discrete valuation and with a perfect (resp., finite) residue field, see [GR08], [Rou16], [Cha11] and [Rou]. 2.4.2 The building at infinity 1) By (MA3), two spherical sector-faces (or generic rays) are, up to shortening, contained in a common apartment A; we say that they are parallel if one of them is a V –translation 12 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau of the other one. This does not depend on the choice of A by (MA4) and parallelism is an equivalence relation (the proof in [Rou11] uses the spherical assumption). The parallel class ∂δ of a generic ray δ is called an ideal point or a point at infinity. The parallel class ∂f = ∂F of a spherical sector-face f (or its germ F) is called an ideal face or a face at infinity (an ideal chamber if f is a sector and an ideal panel if f is a sector-panel). The type of ∂f is the type of f. Actually, a chamber at infinity is nothing else than a sector-germ; its type is S. We write ∂f ≤ ∂f′ if, for suitable choices of f, f′ in their parallel classes, we have f ⊂ f′ . The ordered set of ideal faces of sign ± is (the set of spherical faces of) the building ∂∆± with Weyl group W v ; these buildings are twinned (see Rousseau [Rou11, 3.7]). We write ∂∆ = ∂∆+ ⊔ ∂∆− and Ch(∂∆) = {ideal chambers}. The type (defined above) of an ideal face is the same as its type defined in the building ∂∆± with Weyl group W v . We write f aceS ′ (c) the ideal face of type S ′ of an ideal chamber c. When W v is finite, ∂∆+ = ∂∆− is a spherical building, twinned with itself. Notice that, when ∆ is a masure and not a building, |W v | = ∞, the dimension of its apartments is at least 2 and the rank of its building at infinity ∂∆ is strictly positive. We say that an ideal point ξ, an ideal face φ, is at infinity of an apartment A (or a wall h, a half apartment H, ...) if we may write ξ = ∂δ, φ = ∂f, with δ ⊂ A, f ⊂ A (or ⊂ h, ⊂ H, ...). We write then ξ ∈ ∂A, φ ∈ ∂A (or ∂h, ∂H, ...); actually ∂A is a twin apartment in ∂∆. We say that ξ ∈ φ if (for suitable choices of δ, f) ξ = ∂δ, φ = ∂f and δ ⊂ f. Actually we may look at the set |∂∆| of ideals points as a geometric realization of ∂∆ and the condition ξ ∈ φ (resp., ξ ∈ ∂A) describes φ (resp., ∂A) as a subset of |∂∆|. Actually |∂A+ |, with its partition in ideal faces, is isomorphic with the quotient of T ◦ by R>0 . 2) From (MA3) and (MA4), we see that a point x ∈ ∆ and an ideal chamber c (resp., an ideal face φ, resp., an ideal point ξ) determine, in the parallel class c (resp., φ, resp., ξ), a unique sector (resp., spherical sector face, resp., generic ray [x, ξ)) of base point (resp., origin) x. To fix the notation, for a point x ∈ ∆ and an ideal chamber c ∈ ∂∆ (resp., ideal face φ ∈ ∂∆), we denote by Qx,c (resp., Qx,φ ) the sector (resp., sector face) in ∆ with base point x that corresponds to the chamber at infinity c (resp., the ideal face at infinity φ). Notice that if the sector-face germ F is not spherical, then there might exist two different apartments in ∆ that can contain two different sectors of base point x ∈ ∆ and with faces both parallel to F but different. This is because in the definition of a masure, there is no axiom stating that for a point and a non-spherical sector-face germ F every apartment of ∆ containing both of them must contain the enclosure of x and F. Any vectorially Weyl–automorphism ϕ of ∆ acts on ∂∆ as a type-preserving automorphism; if it stabilizes an ideal face φ, it fixes any ideal point ξ ∈ φ. 3) Let c be an ideal chamber at infinity of an apartment A. By (MA3) and (MA4), for any x ∈ ∆, there is an apartment A′ containing x and the sector-germ germ(Q) associated with c and there is a unique Weyl–isomorphism ϕ : A → A′ fixing germ(Q). So, by the usual arguments, we see that x 7→ ϕ(x) is a well defined map ρA,c : ∆ → A, called the retraction of ∆ onto A with center c. The cone topology on masures 13 Definition 2.4. Let ∆ be a masure . We say that ∆ is locally complete if the apartment system A of ∆ is locally-complete, i.e., if the following holds: Take any increasing sequence {Hn }n≥0 of half-apartments that are respectively contained in apartmentsS{An }n≥0 ∈ A. We suppose that, S for an ideal chamber c ∈ Ch(∂H0 ), we have n≥0 ρA0 ,c (Hn ) = A0 . Then n≥0 Hn is an apartment A ∈ A. Clearly, for trees, the local-completeness is equivalent to the completeness of the apartment system. The masures of almost split Kac-Moody groups over complete fields are locally complete. 2.5 Twin buildings Let X = (X+ , X− ) be a twin building of type (W, S) and we consider it as a set of chambers. We write δ and δ∗ its distance and codistance. Recall the following piece of notation, classical or issued from Hartnick–Köhl–Mars [HKM13]. For every c ∈ Ch(X) and every subset S ′ ⊂ S we define the S ′ -residue of c to be resS ′ (c) := {d ∈ Ch(X) | δ(c, d) ∈ hs | s ∈ S ′ i}. The collection of all S ′ -residues in X will be denoted by ResS ′ (X). A residue resS ′ (c) is called spherical if the group W v (S ′ ) = hs | s ∈ S ′ i is finite (i.e., S ′ itself is spherical); then resS ′ (c) is a spherical building, see e.g., [AB08, 5.30]. In the case of X := Ch(∂∆) as in Section 2.4.2 and if S ′ is spherical, resS ′ (c) is the set of all ideal chambers sharing the same ideal face of type S ′ as the ideal chamber c. We obtain thus a bijection between the set f aceS ′ (∂∆) of ideal faces of type S ′ in ∂∆ and ResS ′ (X). Let Sph(S, W v ) := {J ⊂ S | J spherical}. The residues of rank one are called s-panels and their set is denoted by P ans (X) := Res{s} (X). By convention we write Ps (c) instead of res{s} (c). The residues of co-rank one are called s-vertices and their set is denoted by Vs := ResS\{s} (X). We write verts (c) := resS\{s} (c). The canonical embedding Y i : X ֒→ Vs given by c 7→ (resS\{s} (c))s∈S s∈S sends a maximal simplex to the tuple consisting of its vertices. Given a spherical residue R ⊆ X± and a chamber c ∈ X∓ there exists a unique chamber d ∈ R such that δ∗ (c, d) is of maximal length in the set δ∗ (c, R) [AB08, Lemma 5.149]. ∗ (c). This chamber is called the projection of c onto R and is denoted by projR Given a chamber c ∈ X± and an element w ∈ W we denote by Ew (c) := {d ∈ ∗ ∗ (c) := {d ∈ X X± | δ(c, d) = w ∈ W } and Ew ∓ | δ (c, d) = w ∈ W }. The sets ∗ (c), E ∗ (c) are defined accordingly, with respect to the strong Bruhat E≤w (c), E<w (c), E≤w <w order (also called Bruhat–Chevalley order). We also define Xw := {(c, d) ∈ (X+ × X− ) ∪ (X− × X+ ) | δ∗ (c, d) = w} for each w ∈ W. 14 2.6 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau Affine buildings in masures Recall that by Section 2.4.2, an ideal face φ of ∂∆ is a parallel class of spherical sectorfaces and we denote by J ⊂ S its type. Let φ′ be an ideal face opposite φ. We denote by ∆(φ) the set of all (spherical) sector-face-germs germ(f) with f being in the parallel class φ and by ∆(φ, φ′ ) the union of all apartments A in A, such that φ, φ′ ⊂ ∂A; we denote A(φ, φ′ ) the set of all these apartments. Actually, by (MA4), ∆(φ, φ′ ) depends only on the “convex hull” of φ, φ′ in ∂∆ (a wall if φ, φ′ are panels). Proposition 2.5. By [Rou11, 4.3], ∆(φ) is an affine, chimney friendly building. More explicitly, any apartment A(φ) of ∆(φ) is constructed from a (not necessarily unique) apartment A of ∆, with φ at infinity of A, by the formula A(φ) = {germ(f) ∈ ∆(φ) | f ⊂ A}. By the same formula, a wall of A(φ) is constructed from a wall of A that contains some f ∈ φ. The corresponding vectorial Weyl group of ∆(φ) is isomorphic to the group W v (J) generated by J. The faces of ∆(φ) correspond to chimney-germs of the same direction as φ: if R is such a chimney-germ, then the associated face is the filter F(R) consisting of all subsets of ∆(φ) containing {germ(f) ∈ ∆(φ) | f ⊂ Σ}, for some Σ ∈ R. This face is a chamber in ∆(φ) if the support of R in any apartment is equal to that apartment. The sector-germs of ∆(φ) correspond to sector-germs R in ∆ such that c = ∂R ≥ φ: they are the filters F(R) defined as above. In particular, if c ∈ Ch(∂∆) is such that φ is a face of c, then the chambers at infinity of ∆(φ) correspond to resJ (c) which is a spherical building. Proposition 2.6. Let ∆ be a masure and let φ, φ′ be opposite ideal faces of ∂∆. Then: (1) For any sector-face-germ F of ∆, with ∂F = φ, there is an apartment A ∈ A(φ, φ′ ) with F ⊂ A. (2) The map eφ : ∆(φ, φ′ ) → ∆(φ), x 7→ germ(Qx,φ ) is onto. For any A ∈ A(φ, φ′ ), eφ (A) = A(φ) and the map eφ : A → A(φ) identifies A(φ) with the quotient of A by the vector space generated by the direction of φ. (3) Each A ∈ A(φ, φ′ ) may be considered with its natural structure of apartment or with its restricted structure Aφ that is given by the set Mφ of the walls in A that contain an f ∈ φ. Moreover, the restricted structure Aφ is associated (up to some identifications) with v the subroot system generated by ((αi )i∈J , (α∨ i )i∈J ) with vectorial Weyl group W (J). Thus, φ the restriction of eφ to A is the essentialization map that identifies A(φ) with the quotient of A by the vector space intersection of the directions of all walls of Aφ . Proof. The assertion (1) is a consequence of (MA3) applied to F and a sector-face-germ F′ with ∂F′ = φ′ . Then (2) and (3) are clear. Proposition 2.7. Let ∆ be a masure and let φ, φ′ be opposite ideal faces of ∂∆. Let c1 , c2 be two ideal chambers in the residue of φ (i.e., φ ≤ c1 , c2 ) and opposite in this spherical residue (which is a spherical building). Then there is a unique apartment A ∈ A(φ, φ′ ) such that c1 , c2 ∈ Ch(∂A). 15 The cone topology on masures Proof. As c1 , c2 are opposite in the residue of φ and φ, φ′ are opposite, we have that c1 and the projection c′2 = projφ∗′ (c2 ) are opposite. We choose A ∈ A such that ∂A is the unique twin apartment containing c1 and c′2 . So ∂A contains c1 , φ, c′2 , φ′ and c2 = projφ∗ (c′2 ). Notice that the apartment A is entirely determined by ∂A. Theorem 2.8. Let ∆ be a masure and let φ, φ′ be opposite ideal faces of ∂∆. The set ∆(φ, φ′ ) is an affine, chimney friendly building, with system of apartments {Aφ | A ∈ A(φ, φ′ )}. The map eφ : ∆(φ, φ′ ) → ∆(φ) is the essentialization map. If ∆ is semidiscrete (resp., thick, resp., of finite thickness), then ∆(φ, φ′ ) is discrete (resp., thick, resp., of finite thickness). Remark 2.9. When we endow each A ∈ A(φ, φ′ ) with its natural structure of apartment coming from ∆, then ∆(φ, φ′ ) has to be considered as a masure that is not thick. In particular, the axioms of the definition of the masure are verified; actually ∆(φ, φ′ ) is an affine building, except that we added in each apartment many useless walls. Proof of Theorem 2.8. The apartments A(φ) of ∆(φ) correspond to apartments A of ∆ with φ ∈ ∂A and A(φ) = {F = germ(f) ∈ ∆(φ) | ∂F ∈ ∂A}. But many apartments A may give the same A(φ). Actually A(φ) is well determined by two opposite sector-germs in ∆(φ) and, by Proposition 2.5, these sector-germs are associated with two sector-germs Q1 , Q2 in ∆, i.e., to two ideal chambers c1 , c2 , which are opposite in the residue of φ. So, by Proposition 2.7, there is one, and only one, apartment B ∈ A(φ, φ′ ) such that c1 , c2 ∈ ∂B, i.e., B(φ) = A(φ). This gives a one to one correspondence between A(φ, φ′ ) and the set of apartments of ∆(φ). As ∆(φ) is an affine, chimney friendly building, we clearly obtain the theorem from Proposition 2.6 above. Corollary 2.10. Let ∆ be a masure of dimension n. Let σ, σ ′ ⊂ ∂∆ be a pair of opposite panels at infinity. We denote by ∆(σ, σ ′ ) the union of all apartments of ∆ whose boundaries contain σ and σ ′ . Then ∆(σ, σ ′ ) is a closed convex subset of ∆, which is an extended tree, i.e., splits canonically as a product ∆(σ, σ ′ ) ∼ = T × Rn−1 , where T = T (σ, σ ′ ) ≃ ∆(σ) is a (chimney friendly) R−tree whose ends are canonically in one-to-one correspondence with the elements of the set Ch(σ) of all ideal chambers having σ as a panel. Under this isomorphism, the walls of ∆, contained in ∆(σ, σ ′ ) and containing σ, σ ′ at infinity, correspond to the subsets of the form {v} × Rn−1 with v a vertex of T . When ∆ is semi-discrete (resp., thick, resp., of finite thickness), then the R−tree T is a genuine discrete (resp., thick, resp., of finite thickness) tree. Remark 2.11. With the above hypotheses, ∆(σ) (resp., ∆(σ, σ ′ )) is often called a panel tree (resp., a wall (extended) tree). Proof. This is a consequence of Theorem 2.8 or, better, of [Rou11, Section 4.6]. 16 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau Remark 2.12. Clearly a masure ∆ is locally complete if and only if the apartment system of any such R−tree T is complete. 2.7 Retractions of line segments or rays The somewhat technical content of this subsection will be only needed in the proof of Proposition 3.25. Let (∆, A) be a masure. Let c be an ideal chamber at infinity of an apartment A ∈ A. → − → It is associated with a vectorial chamber − c in the real vector space A . We identify → − − (A, → c ) with the pair (V, Cfv ) of Section 2.1. We consider, in (another) apartment A′ of ∆, a preordered segment [x, y] or a preordered ray δ of origin x (and containing some y 6= x). We parametrize [x, y] or δ by an affine map π1 : [0, 1] → A′ or π1 : [0, +∞) → A′ , with π1 (0) = x. If c ∈ Ch(∂∆+ ) (resp., c ∈ Ch(∂∆− )) we assume that π1 is increasing (resp., decreasing) for the order ≤. This means that x ≤ y (resp., y ≤ x). We consider the retraction ρ = ρA,c and the image π = ρ ◦ π1 of the path π1 . Proposition 2.13. The path π is a Hecke path with respect to c, in the sense of [GR08, → → − Def. 5.2] or [GR14, 1.8]. In particular, after the identification of ( A , − c ) with (V, Cfv ), this means that: The path π is piecewise linear. Except in 0 (resp., 1 for segments) the left (resp., ′ (t) (resp., π ′ (t)) are defined and belong to an orbit W v .λ of some right) derivatives π− + → c ). λ ∈ Cfv (the closure of − More precisely, we define w± (t) ∈ W v as the element with the smallest length such ′ (t) = w (t).λ. Then we have w (t) ≤ w (t) ≤ w (t′ ) ≤ w (t′ ) when 0 < t < t′ that π± ± − + − + (for the Bruhat–Chevalley order in W v ). Proof. We may reduce to the case of a segment. Unfortunately the references above deal → → − with an opposite case: we have to identify ( A , − c ) with (V, −Cfv ) and consider the reverse path π 1 , defined by π 1 (t) = π1 (1 − t); so its image under ρ is defined by π(t) = π(1 − t). From Theorem 6.2 in [GR08] (see also Proposition 6.1, there), we obtain that π = ρ◦π 1 is a Hecke path. Hence π is piecewise linear and we have π ′± (t) ∈ W v .µ with µ ∈ Cfv = −~c ; ′ (t) = −π ′ (1 − t) ∈ W v .λ with λ = −µ ∈ ~ c. Moreover, so π is piecewise linear and π± ± ′ π ± (t) = w ± (t).µ (with w± (t) of minimal length) and, by Lemma 5.4 in l.c. , we have ′ (t) = w (t).λ with w− (t) ≥ w+ (t) ≥ w − (t′ ) ≥ w + (t′ ) for t < t′ . So, for π, we obtain π± ± w± (t) = w∓ (1 − t) and the expected inequalities for the w± (t) are satisfied. 3 The cone topology on masures Let ∆ be a masure. As in the case of CAT(0) spaces we would like to define a topology on the realization |∂∆| of the boundary ∂∆ of the masure ∆, which does not depend on the chosen base point. Recall that a masure is not necessarily a geodesic metric space, therefore, we cannot apply the CAT(0) theory. Still, we can define a cone topology on the set of all chambers Ch(∂∆) at infinity of ∆; that is presented in Section 3.1. This The cone topology on masures 17 topology has interesting dynamical properties (see Proposition 6.1 below), as well as other natural properties that are presented in Sections 3.2 and 3.3. 3.1 Definition of the cone topology By a chamber at infinity of ∆ we mean the interior of it and we choose, in any chamber c at infinity, an ideal point ξc , called its barycenter. We ask that any vectorially Weyl–isomorphism ϕ between apartments in ∆ permutes these barycenters: ϕ(ξc ) = ξϕ(c) . Moreover, for any two opposite ideal chambers c and c− , we impose that the corresponding barycenters ξc and ξc− are also opposite. Actually, we choose ξc for c = ∂Cfv . Then ξc is uniquely and well defined for any c ∈ X ± by the above conditions, as the vectorially Weyl–isomorphisms between apartments in ∆ induce the type-preserving isomorphisms between apartments in ∂∆. Definition 3.1. Let ∆ be a masure, x ∈ ∆ be a point and c ∈ Ch(∂∆) be a chamber at infinity. Let ξc be the barycenter of c. By the definition of a masure, we know that there exists an apartment A ⊂ ∆ such that x ∈ A and c ∈ Ch(∂A). Consider the ray [x, ξc ) ⊂ A issuing from x and corresponding to the barycenter ξc of c (see Section 2.4.2.2) above). Let r ∈ [x, ξc ); we define the following subset of Ch(∂∆) Ux,r,c := {c′ ∈ Ch(∂∆) | [x, r] ⊂ [x, ξc′ ) ∩ [x, ξc )}. The subset Ux,r,c is called a standard open neighborhood in Ch(∂∆) of the (open) chamber c with base point x and gate r. Definition 3.2. Let ∆ be a masure and let x be a point of ∆. The cone topology Topx (Ch(∂∆)) on Ch(∂∆), with base point x, is the topology generated by the standard open neighborhoods Ux,r,c, with c ∈ Ch(∂∆) and r ∈ [x, ξc ). Lemma 3.3. The cone topology Topx (Ch(∂∆)) does not depend on the choice of the barycenters. ξ Proof. Let us consider another choice η for the family of barycenters. Then if c′ ∈ Ux,r,c for r far, then Qx,c ∩ Qx,c′ ⊃ cl([x, r]), which is a “big” part of Qx,c . In particular Qx,c ∩ Qx,c′ contains some far r ′ ∈ [x, ηc ). By [Rou11, 5.4], there is a Weyl isomorphism of apartments ψ that sends Qx,c to Qx,c′ and fixes cl([x, r]). Then ψ sends ηc′ to ηc and η [x, ηc′ ) to [x, ηc ). So r ′ ∈ [x, ηc′ ) and c′ ∈ Ux,r ′ ,c . We have proved that the cone topology associated with the family ξ is finer than the one associated with η. Now, by symmetry, the result follows. Remark 3.4. When the masure ∆ is a (chimney friendly) affine building, ∆ is endowed with a Euclidean metric and it is well known that it is a CAT(0) space. Then the boundary ∂∆ defined in Section 2.4.2 is contained in the visual boundary ∂∞ ∆ of ∆ as defined in [BH99] (it may be different if the apartment system is not complete). The cone topology of Definition 3.2 clearly coincides with the restriction on Ch(∂∆) of the cone topology defined in [BH99] on ∂∞ ∆. 18 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau Proposition 3.5. Let ∆ be a masure and let x, y ∈ ∆ be two different points. Then the cone topologies Topx (Ch(∂∆)) and Topy (Ch(∂∆)) are the same. Proof. To prove that Topx (Ch(∂∆)) and Topy (Ch(∂∆)) are the same, it is enough to show that the identity map Id : (Ch(∂∆), Topx (Ch(∂∆))) → (Ch(∂∆), Topy (Ch(∂∆))) is continuous with respect to the corresponding topologies. For this it is enough to prove that for every chamber c ∈ Ch(∂∆) and every standard open neighborhood V of c in Topy (Ch(∂∆)), there exists a standard open neighborhood W of c in Topx (Ch(∂∆)) such that W ⊂ V , as subsets of Ch(∂∆). Let us fix a chamber c ∈ Ch(∂∆) and let V := Uy,r,c be a standard open neighborhood of c with respect to the base point y, where r 6= y. Let Qz,c be the sector with base point z ∈ ∆ corresponding to the chamber at infinity c ∈ ∂∆. Notice that, for any two points z1 , z2 ∈ ∆, the intersection Qz1 ,c ∩ Qz2 ,c is not empty and moreover, it contains a subsector Qz3 ,c , where z3 is a point in the interior of Qz1 ,c ∩ Qz2 ,c . Take z1 := x, z2 := y and z3 =: z, such that z is in the interior of the intersection Qy,c ∩ Qx,c. To y and z as above apply Lemma 3.6, that is stated below. We obtain the existence of a standard open neighborhood Uz,r′ ,c of c with base point z such that Uz,r′ ,c ⊂ Uy,r,c . Now for R := r ′ ∈ [z, ξc ) far enough, apply Lemma 3.6 to the points z and x. We obtain the existence of a standard open neighborhood Ux,R′ ,c of c with base point x such that Ux,R′ ,c ⊂ Uz,r′ ,c = Uz,R,c . From here we have that Ux,R′ ,c ⊂ Uy,r,c and the conclusion follows. Lemma 3.6. Let ∆ be a masure and let c ∈ Ch(∂∆) be a chamber at infinity. Let z1 , z2 ∈ ∆ be two different points such that the sector Qz1 ,c contains the point z2 in its interior. Then, for every standard open neighborhood Uz1 ,r,c of c, with base point z1 , there exists a standard open neighborhood Uz2 ,r′ ,c of c with base point z2 such that Uz2 ,r′ ,c ⊂ Uz1 ,r,c . And vice versa, for every standard open neighborhood Uz2 ,R,c of c with base point z2 there exists a standard open neighborhood Uz1 ,R′ ,c of c with base point z1 such that Uz1 ,R′ ,c ⊂ Uz2 ,R,c . Proof. Let A be an apartment of ∆ such that Qz1 ,c ⊂ A. Let ξc be the barycenter of the chamber at infinity c and consider the standard open neighborhoods Uz1 ,r,c and Uz2 ,R,c . Our first claim is that there exists r ′ ∈ (z2 , ξc ) far enough, such that the enclosure clA ([z1 , r ′ ]) contains the segment [z1 , r) and also that there exists R′ ∈ (z1 , ξc ), far enough, such that clA ([z2 , R′ ]) ⊃ [z2 , R]. Indeed, this is true because for every point x in the interior of Qz1 ,c we have that clA ([z1 , x]) ⊃ (Qz1 ,c ∩ Qx,c− ), where c− ∈ Ch(∂A) denotes the chamber opposite c and [z1 , x] is the geodesic segment with respect to the affine space A. By taking r ′ , and respectively, R′ sufficiently far enough, the claim follows. Let us prove the first assertion of the Lemma. Let r ′ ∈ (z2 , ξc ) satisfying the above claim and let r ′′ ∈ (z1 , ξc ) such that [z1 , r ′′ ] = Qz1 ,c ∩ Qr′ ,c− ∩ [z1 , ξc ). This implies that Uz1 ,r′′ ,c ⊂ Uz1 ,r,c . Next we want to prove that in fact Uz2 ,r′ ,c ⊂ Uz1 ,r′′ ,c ⊂ Uz1 ,r,c. Let c′ ∈ Uz2 ,r′ ,c ; so [z2 , r ′ ] ⊂ [z2 , ξc′ ) ∩ [z2 , ξc ). We may apply Lemma 3.7 (see below) to δ2 = [z2 , ξc′ ) and δ1 = [r ′ , ξc− ). We get an apartment B containing these two The cone topology on masures 19 rays, hence, their enclosures Qz2 ,c′ and Qr′ ,c− . Thus, c− , c′ ∈ Ch(∂B), and B contains clA (z1 , r ′ ) ⊃ Qz1 ,c ∩ Qr′ ,c− . In B all rays of direction ξc′ are parallel to [z2 , ξc′ ), hence to [z2 , r ′ ]; or [z1 , r ′′ ] ⊂ A ∩ B. So [z1 , r ′′ ] ⊂ [z1 , ξc′ ) and c′ ∈ Uz1 ,r′′ ,c . This concludes that Uz2 ,r′ ,c ⊂ Uz1 ,r′′ ,c ⊂ Uz1 ,r,c. Let us prove the second assertion. From our first claim there exists R′ ∈ (z1 , ξc ), far enough, such that clA ([z1 , R′ ]) ⊃ (Qz1 ,c ∩ QR′ ,c− ) ⊃ [z2 , R]. If c′′ ∈ Uz1 ,R′ ,c , we apply Lemma 3.7 to δ2 = [z1 , ξc′ ) and δ1 = [R′ , ξc− ) and one easily proves that c′′ ∈ Uz2 ,R,c , hence Uz1 ,R′ ,c ⊂ Uz2 ,R,c . Lemma 3.7. Let δ1 , δ2 be two preordered rays in apartments A1 , A2 of a masure ∆, with origins x1 , x2 . Suppose x1 6= x2 and x1 , x2 ∈ δ1 ∩ δ2 (hence [x1 , x2 ] ⊂ δ1 ∩ δ2 ). Then δ1 ∪ δ2 is a line in an apartment A of ∆. Proof. This is exactly what is proved in part 2) of the proof of Rousseau [Rou11, Prop. 5.4]. Lemma 3.8. Let Q1 , Q2 be two sectors in a masure ∆, sharing the same base point x, with Q1 (resp., Q2 ) of positive (resp., negative) direction. We suppose Q1 , Q2 are o o opposite, i.e., there exist y1 ∈ Q1 , y2 ∈ Q2 (hence y2 < x < y1 ) such that x ∈ [y1 , y2 ]. Then there is an apartment A containing Q1 and Q2 . Remark 3.9. This is condition (CO) of Parreau [Par00, 1.12] Proof. Let δi′ be the generic ray of origin x in Qi containing yi . By (MA3) there is an apartment Ai containing germ(δi′ ) and germx ([x, y3−i ]), hence also δi′ (by convexity) and some point xi ∈ (x, y3−i ]. Now it is clear that δi = δi′ ∪ [x, xi ] is a (generic) ray in Ai . Applying Lemma 3.7, there is an apartment A containing δ1 and δ2 . Now, by (MA2) and (MA3), A contains clA (δi′ ) ⊃ Qi . Remark 3.10. 1) Let x be a fixed base point in ∆ and let S ′ ⊂ S be spherical. With the S ′ −residue resS ′ (c) of an ideal chamber c ∈ Ch(∂∆) there is associated in a unique way the ideal face of type S ′ of c. Therefore, on the set ResS ′ (Ch(∂∆)) of all S ′ −residues in Ch(∂∆) one can define a cone topology (with base point x) in the same way as in Definition 3.2. More precisely, in such an ideal face φ of type S ′ (that corresponds to a unique S ′ −residue resS ′ (c)) one can choose an ideal point ξφ (equivariantly under vectorially Weyl–isomorphisms between apartments in ∆) and then the definition of the standard open neighborhoods Ux,r,φ of φ in ResS ′ (Ch(∂∆)) goes as in Definition 3.1. In Proposition 3.23 below we prove that this cone topology on ResS ′ (Ch(∂∆)), with S ′ spherical, does not depend on the chosen base point x. 2) Suppose ∆′ ⊂ ∆ is a “sub-masure” of ∆, this means that ∆′ is union of some apartments of ∆ that also satisfy the axioms of Definition 2.1. Then Ch(∂∆′ ) ⊂ Ch(∂∆). It is clear that the cone topology on Ch(∂∆′ ) viewed as a masure itself, coincides with the restriction on Ch(∂∆′ ) of the cone topology on Ch(∂∆) (assuming that the base point x is in ∆′ ). 20 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau For example this is the case when ∆′ = ∆(φ, φ′ ) (as in Theorem 2.8), with apartments endowed with their natural structure of apartments coming from ∆ (see Remark 2.9). Let us now consider the affine building ∆′′ = ∆(φ, φ′ ), where any apartment A ∈ A(φ, φ′ ) is endowed with its restricted structure of apartment Aφ . Because there are more directions of walls in A than in Aφ , any ideal chamber c′′0 in Aφ contains an ideal chamber c0 in A and we choose ξc′′0 := ξc0 . Extending these choices by invariance under vectorially Weyl–isomorphisms between apartments of ∆′′ , we obtain an injection ι : Ch(∂∆′′ ) ֒→ Ch(∂∆′ ) ⊂ Ch(∂∆) and a choice of ξc′′ ∈ c′′ for any c′′ ∈ Ch(∂∆′′ ), such that ξc′′ = ξι(c′′ ) . (As there are less walls in Aφ , an ideal chamber in Aφ may contain two (or more) chambers of A.) ′′ ∂∆ ∂∆ By the above property of ι, one has ι−1 (Ux,r,ι(c ′′ ) ) = Ux,r,c′′ ; thus, the cone topology on Ch(∂∆′ ) (or Ch(∂∆)) induces the same topology as the cone topology on Ch(∂∆′′ ) (where ∆′′ is an affine building, hence a CAT(0) space, as explained in Remark 3.4). By Lemma 3.3 the initial choice of c0 , i.e., of ξc′′0 = ξc0 , has no influence on the topology. Recall that (by Proposition 2.5 and Theorem 2.8), for an ideal chamber c with φ ≤ c and J the type of φ, the set Ch(∂∆′′ ) is the residue resJ (c). 3.2 Basic properties of the cone topology We want to verify basic properties of the cone topology on Ch(∂∆), where ∆ is a masure. Many of these properties are inspired from Kramer [Kra02] and Hartnick–Köhl– Mars [HKM13]. Recall also the notation of Section 2.5. In what follows we let X := Ch(∂∆). Proposition 3.11. Let ∆ be a masure. For each c ∈ X± the set E1∗ (c) is an open subset of X. Proof. To prove the lemma we recall that the cone topology on X does not depend on the chosen base point. Therefore, let d be a chamber in E1∗ (c), that is to say opposite c. We need to prove that there is an open neighborhood of d in the cone topology that is a subset of E1∗ (c). For this let A be the unique apartment of ∆ containing c, d in Ch(∂A) and fix a base point x ∈ A for the cone topology. For every r ∈ (x, ξd ), every chamber in Ux,r,d is opposite c by Lemma 3.8. The proposition is proven. Corollary 3.12. Let ∆ be a masure and X = Ch(∂∆). Then any residue resJ (c) ⊂ X is closed for the cone topology of X. Proof. This is deduced from Proposition 3.11 by the same twin-building-arguments as in [HKM13, Lemma 3.4]. Lemma 3.13. Let ∆ be a masure. Then the cone topology on X is Hausdorff. Proof. This is a direct consequence of the definition of the cone topology on X. 21 The cone topology on masures Proposition 3.14. Let ∆ be a masure. For each J ∈ Sph(S, W v ) the map pJ : X1 → X+ ∪ X− ∗ (c, d) 7→ projres (d) J (c) is continuous, where X1 := {(c, d) ∈ (X+ × X− ) ∪ (X− × X+ ) | δ∗ (c, d) = 1}. Proof. Notice that X+ × X− and X− × X+ are endowed with the product topology from X+ and X− . Therefore, the topology on X1 is the following. Let c, d ∈ X such that δ∗ (c, d) = 1. A standard open neighborhood of (c, d) in X1 is given by X1 ∩(Ux,r,c ×Ux,r′ ,d ), where Ux,r,c and Ux,r′ ,d are standard open neighborhoods of c, respectively d, with r ∈ [x, ξc ), r ′ ∈ [x, ξd ) and x is a base point for the cone topology on X. Actually by taking r ∈ (x, ξc ), r ′ ∈ (x, ξd ) and x in a same apartment as c and d, then, by Lemma 3.8, (Ux,r,c × Ux,r′ ,d ) ⊂ X1 . ∗ Let d′ := projres (d), where (c, d) ∈ X1 . Let A be the unique apartment in ∆ such J (c) ′ that c, d, d ∈ Ch(∂A) and fix a base point x ∈ A. Recall that the cone topology on X does not depend on the chosen base point. We need to prove that given a standard open neighborhood Ux,r,d′ of d′ there exist open neighborhoods Ux,r1 ,c , Ux,r2 ,d of c and respectively d such that the image of (Ux,r1 ,c × Ux,r2 ,d ) by the map pJ is included in Ux,r,d′ . For r1 , r2 far enough, clA ([r1 , r2 ]) ⊃ [x, r]. If c1 ∈ Ux,r1 ,c and d1 ∈ Ux,r2 ,d , there is an apartment A1 containing Qx,c1 ⊃ [x, r1 ] and Qx,d1 ⊃ [x, r2 ] (Lemma 3.8). Now, by [Rou11, Prop. 5.4], there is a Weyl isomorphism ϕ : A → A1 fixing clA ([r1 , r2 ]). Clearly ϕ sends d to d1 , c to c1 , resJ (c) to resJ (c1 ), hence d′ = pJ (c, d) to d′1 = pJ (c1 , d1 ) and [x, ξd′ ) to [x, ξd′1 ). But ϕ fixes clA ([r1 , r2 ]) ⊃ [x, r], so [x, r] ⊂ [x, ξd′ ) ∩ [x, ξd′1 ) and d′1 = pJ (c1 , d1 ) ∈ Ux,r,d′ . Corollary 3.15. Let ∆ be a masure. For each s ∈ S and each c ∈ X± the map projP∗ s (c) : E1∗ (c) → Ps (c) ⊂ X± d 7→ projP∗ s (c) (d) is continuous, where E1∗ (c), Ps (c) are endowed with the induced topology from the cone topology on X. Moreover, if c′ ∈ E1∗ (c), then the map projP∗ s (c) : Ps (c′ ) → Ps (c) is a homeomorphism. Proof. By Proposition 3.11, recall that E1∗ (c) is open in X and by Corollary 3.12, Ps (c) is closed in X. Then the first part of the corollary is a consequence of Proposition 3.14 by replacing resJ (c) with Ps (c), for s ∈ S. The final assertion is then proved as in [HKM13, Prop. 3.5], using some twin-building-arguments. 22 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau Lemma 3.16. Let ∆ be a masure. We suppose the existence of a group V0 of vectorially Weyl–automorphisms of ∆ that stabilizes each apartment A ∈ A, induces on each such − → apartment A a group of translations V0 and stabilizes each wall in A. We assume moreover − → that ∆/V0 has a (natural) structure of a masure with apartments {A/V0 | A ∈ A} and − → − → set of walls in each A/V0 the set {M/V0 | M ∈ MA }. Then there is a natural homeomorphism Ch(∂∆) → Ch(∂(∆/V0 )) with respect to the cone topology on Ch(∂∆) and the cone topology on Ch(∂(∆/V0 )). Proof. We denote π : ∆ → ∆/V0 to be the quotient map. Clearly, each sector Q in ∆ is stable under V0 and π(Q) = Q/V0 is a sector in ∆/V0 . So we obtain a bijection π : Ch(∂∆) → Ch(∂(∆/V0 )), germ(Q) 7→ germ(π(Q)). We have now to identify the corresponding two cone topologies. Let x be a base point in ∆. → − For c = germ(Q) ⊂ A, then ξc is the class of a generic ray δ whose direction δ is → − − → not in V0 ; so π( δ ) is the direction of a generic ray in π(A) = A/V0 , whose class we denote by ξπ(c) . For c ∈ Ch(∂∆), π([x, ξc )) is the ray [π(x), ξπ(c) ). So, for c, c′ ∈ Ch(∂∆), π([x, ξc ) ∩ [x, ξc′ )) ⊂ [π(x), ξπ(c) ) ∩ [π(x), ξπ(c′ ) ). This proves that the map π : Ch(∂∆) → Ch(∂(∆/V0 )) is continuous. Conversely, let c ∈ Ch(∂∆) and suppose [π(x), ξπ(c) ) ∩ [π(x), ξπ(c′ ) ) is big, for c′ ∈ Ch(∂∆). We choose an apartment A in ∆ containing {x} ∪ c and write c1 the ideal chamber opposite c in A. The retraction ρA,c1 sends c′ to c (by Lemma 3.8), hence ξc′ to ξc and [x, ξc′ ) to [x, ξc ). Moreover it fixes π −1 ([π(x), ξπ(c) ) ∩ [π(x), ξπ(c′ ) )). So [x, ξc′ ) ∩ [x, ξc ) is big: we have proved that the map π −1 : Ch(∂(∆/V0 )) → Ch(∂∆) is continuous. Remark 3.17 (Proof of Proposition 1.2). When ∆ is an affine (extended) building, the hypotheses of Lemma 3.16 are clearly satisfied where V0 is the group of automorphisms − → that are inducing on each apartment A the group of translations V0 that is determined by the vector space intersection of the directions of all walls in A. Therefore, Lemma 3.16 applies in the situation of Theorem 2.8. By Remark 3.10.2), Theorem 2.8 and this Lemma 3.16, the cone topology on Ch(∂∆(φ)) = Ch(∂∆(φ, φ′ )) coincides with the topology induced by the cone topology of Ch(∂∆). As a conclusion, when ∆ is a masure, the induced cone topology on any spherical residue in Ch(∂∆), which is a spherical building, is described classically through an affine (essential) building. This concludes the proof of Proposition 1.2. Proposition 3.18. Let ∆ be a masure. Assume that ∆ is locally finite and locally complete. Then for each s ∈ S, every panel P ∈ P ans (X± ) is compact, with respect to the induced cone topology. Proof. Let σ ⊂ ∂∆ be the panel at infinity corresponding to P , i.e., P is the set Ch(σ) of all ideal chambers having σ as a panel. We choose an opposite panel σ ′ ⊂ ∂∆. By Corollary 2.10 there is in ∆ an extended tree ∆(σ, σ ′ ) ≃ T × Rn−1 , where T is an R−tree whose set of ends Ω is in one to one correspondence with Ch(σ). As ∆ is locally finite, The cone topology on masures 23 T is a genuine (i.e., discrete) tree and, as ∆ is locally complete, the apartment system of T is complete; so Ω is compact. We have seen, by Lemma 3.16 and Remark 3.17, that the topologies on Ω = Ch(∂T ) and on Ch(∂∆(σ, σ ′ )) coincide. Therefore, the residue P is compact. Corollary 3.19. Let ∆ be a masure. Assume that ∆ is locally finite and locally complete. Then for each s ∈ S there exists a compact panel P ∈ P ans (X± ). Proof. This follows from Proposition 3.18. Corollary 3.20. Let ∆ be a masure and c ∈ Ch(∂∆). Assume that ∆ is locally finite and locally complete. Then for any w ∈ W v , the Schubert variety E≤w (c) is compact for the cone topology (induced by the cone topology of Ch(∂∆)). In particular, any spherical residue is compact. Proof. This is a consequence of Propositions 3.11, 3.18, Corollary 3.15 and Lemma 3.13. One uses a Bott–Samelson–Demazure desingularization of E≤w (c) involving galleries in Ch(∂∆), see [HKM13, Section 3.3]. 3.3 Further properties of the cone topology Lemma 3.21. Let ∆ be a masure. The set X1 := {(c, d) ∈ (X+ × X− ) ∪ (X− × X+ ) | δ∗ (c, d) = 1} is open with respect to the induced cone topology of X. Proof. As in the proof of Proposition 3.14, we have that (Ux,r,c × Ux,r′ ,d ) ⊂ X1 is an open neighborhood of (c, d) ∈ X1 , where x ∈ A, A is the apartment of ∆ with c, d ∈ Ch(A) and r, r ′ are far enough. Proposition 3.22. Let ∆ be a masure. For every S ′ ⊂ S, the canonical map resS ′ : X± → ResS ′ (X± ) is open with respect to the quotient topology on ResS ′ (X± ) and the cone topology on X± . In particular, for every s ∈ S the canonical map verts : X± → Vs± is open with respect to the quotient topology on Vs± and the cone topology on X± . Proof. The quotient topology on ResS ′ (X± ) (resp., Vs± ) is the finest such that the canonical map resS ′ : X± → ResS ′ (X± ) (resp., verts : X± → Vs± ) is continuous, i.e., a subset −1 U ⊂ ResS ′ (X± ) (resp., Vs± ) is open if and only if res−1 S ′ (U )) (resp., verts (U )) is open in X± with respect to the cone topology on X. Fix a base point x ∈ ∆. It is enough to prove that for a standard open neighborhood −1 Ux,r,c of c ∈ X the set res−1 S ′ (resS ′ (Ux,r,c )) is open in X± . Let d ∈ resS ′ (resS ′ (Ux,r,c )), ′ ′ then there exists c ∈ Ux,r,c such that c and d share the same facet of type S ′ . Let A be an apartment that contains c′ and d in its boundary Ch(∂A). Notice that x is not necessarily a point in A. Take y in A as a base point (recall that the cone topology does not depend on the chosen base point) and choose a standard open neighborhood Uy,r′ ,c′ such that Uy,r′ ,c′ ⊂ Ux,r,c = Ux,r,c′ . We claim that there exists a standard open neighborhood ′ Uy,rd ,d of d such that Uy,rd ,d ⊂ res−1 S ′ (resS (Ux,r,c )). In order to prove the claim it is 24 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau enough to prove that there exists rd ∈ [x, ξd ) far enough such that for every d′ ∈ Uy,rd ,d there exists c′′ ∈ Uy,r′ ,c′ with the property that c′′ and d′ share the same facet of type S ′ . Indeed, let σ be the facet of type S ′ shared by c′ and d in ∂A. We write d1 ⊂ ∂A the chamber opposite d. We take rd ∈ [y, ξd ) far enough such that clA (rd , d1 ) contains [y, r ′ ] and an open neighbourhood of y in A. For d′ ∈ Uy,rd ,d , the sectors Qy,d1 and Qy,d′ are opposite, hence in a same apartment B, by Lemma 3.8. Now B contains [y, rd ], clA (rd , d1 ) ⊃ [y, r ′ ] and an open neighbourhood of y in A. We consider the retraction ρ = ρB,d1 and c′′ = ρ(c′ ). Then [y, ξc′′ ) = ρ([y, ξc′ )) ⊃ [y, r ′ ], hence c′′ ∈ Uy,r′ ,c′ . Moreover c′ , d in ∂A, share the same facet of type S ′ . So c′′ = ρ(c′ ), d′ = ρ(d) in ∂B, share the same facet of type S ′ . Proposition 3.23. Let ∆ be a masure and let S ′ ∈ Sph(S, W v ). We identify ResS ′ (X± ) with the set f aceS ′ (∂∆± ) of all ideal faces of type S ′ in ∂∆± as in Section 2.5. So the map resS ′ : X± → ResS ′ (X± ) is identified with the map f aceS ′ that sends any ideal chamber to its face of type S ′ . Then the quotient topology on ResS ′ (X± ) defined in Proposition 3.22 coincides with the topology on f aceS ′ (∂∆± ) defined in Remark 3.10.1). In particular, the latter topology does not depend on the base point x. Proof. We fix a base point x for the topology on f aceS ′ (∂∆± ). We have to prove that the map f aceS ′ : X± → f aceS ′ (∂∆± ) is continuous and open. Furthermore, both ResS ′ (X± ) and f aceS ′ (∂∆± ) are endowed with the quotient topologies of the cone topology on X± by the surjective map resS ′ identified with f aceS ′ . Indeed, let Ux,r,φ = {φ′ ∈ f aceS ′ (X± ) | [x, r] ⊂ [x, ξφ′ ) ∩ [x, ξφ )} be an open neighborhood of φ = f aceS ′ (c), with c ∈ X± . For r ′ far in [x, ξc ), we have cl([x, r ′ ]) ⊃ [x, r]. So, for c′ ∈ Ux,r′ ,c , the closed sector Qx,c′ contains [x, r] and, for φ′ = f aceS ′ (c′ ), [x, r] ⊂ [x, ξφ′ ), thus φ′ ∈ Ux,r,φ . We have proved that the map f aceS ′ is continuous. Let us prove now that the map f aceS ′ is open, i.e., for any c ∈ X± and r ∈ [x, ξc ), f aceS ′ (Ux,r,c ) is open. Indeed, for any c′ ∈ Ux,r,c and φ = f aceS ′ (c′ ), we have to find r ′ ∈ [x, ξφ ) such that Ux,r′ ,φ ⊂ f aceS ′ (Ux,r,c ); this means that for every φ′ ∈ Ux,r′ ,φ there exists c′′ ∈ Ux,r,c′ = Ux,r,c with f aceS ′ (c′′ ) = φ′ . We choose an apartment A containing Qx,c′ , hence A contains Qx,φ . We define φ− to be the ideal face in A opposite φ and c− = projφ∗− (c′ ) an ideal chamber in A. We choose r ′ ∈ [x, ξφ ) far enough, such that [x, r] ⊂ Qr′ ,c− . This is possible as, in A, cl(Qx,φ ∪ Qx,c− ) = cl(Qx,φ− ∪ Qx,c′ ). Indeed, in ∂A, c− = projφ∗− (c′ ) is on the same side as c′ with respect to any (twin) wall M containing φ and φ− (otherwise the reflection rM would increase the codistance); so in ∂A, cl(φ ∪ c− ) ⊂ cl(φ− ∪ c′ ) and there is equality, as c′ = projφ∗ (c− ). This equality is sufficient to have that [x, r] ⊂ Qr′ ,c− . By the following Lemma 3.24, there is an apartment B containing Qx,c− and Qx,φ′ (for φ′ ∈ Ux,r′ ,φ ), hence also Qr′ ,c− ⊃ [x, r]. We consider the retraction ρ = ρB,c− and c′′ = ρ(c′ ) ⊂ B. Clearly ρ sends A to B (isomorphically), [x, ξc′ ) to [x, ξc′′ ), φ to φ′ and fixes A ∩ B ⊃ Qr′ ,c− ⊃ [x, r]. So f aceS ′ (c′′ ) = ρ(f aceS ′ (c′ )) = ρ(φ) = φ′ and [x, ξc′ ) ∩ [x, ξc′′ ) ⊃ [x, r]; we have c′′ ∈ Ux,r,c′ as expected. The cone topology on masures 25 Lemma 3.24. Let ∆ be a masure, A an apartment in ∆, x a point in A and φ, φ− opposite ideal faces in A. We consider c− ∈ Ch(∂∆) with φ− ⊆ c− . Then, for any φ′ ∈ Ux,r′ ,φ with r ′ ∈ (x, ξφ ), there exists an apartment B containing Qx,c− and Qx,φ′ . Proof. We consider the local chamber F ℓ := germx (Qx,c− ). By axiom (MA3) there is an apartment A1 containing the closed local chamber F ℓ and also φ′ , hence A1 contains Qx,φ′ . Thus A ∩ A1 contains cl(x, r ′ ). We consider in A1 the sector Qx,c′ , with base point x and opposite F ℓ ; it is thus opposite Qx,c− and Qx,c′ ⊃ Qx,φ′ . By Lemma 3.8 there is an apartment B containing Qx,c− and Qx,c′ , hence also Qx,φ′ . Proposition 3.25. Let ∆ be a masure and S ′ ⊂ S, with S ′ 6= ∅, S ′ 6= S. Then the set Res± S ′ := ResS ′ (X± )) is Hausdorff with respect to the quotient topology induced from the cone topology on X± . In particular, the vertex sets Vs± , s ∈ S, are Hausdorff with respect to the quotient topology. Remark 3.26. When S ′ is spherical, this is also a consequence of Proposition 3.23: as in Lemma 3.13, we see easily that the topology on f aceS ′ (∂∆± ) is Hausdorff. Proof. The quotient topology on Res± S ′ is the finest such that the canonical map resS ′ : ± −1 X± → ResS ′ is continuous, i.e., a subset U of Res± S ′ is open if and only if resS ′ (U ) is open in X± with respect to the cone topology on X. ± We prove that Res± S ′ is Hausdorff. Indeed, take σ1 6= σ2 ∈ ResS ′ and consider ci ∈ σi ⊂ X, for i ∈ {1, 2}. We have that c1 6= c2 and that σi = resS ′ (ci ), for i ∈ {1, 2} (using the notation in Section 2.5). Consider an apartment A ∈ A such that c1 , c2 ∈ Ch(∂A) and take a point x ∈ A as a base point for the cone topology on X. Let w := δ(c1 , c2 ). As c1 and c2 do not share their face of type S ′ , we have that w ∈ / W v (S ′ ). Thus w contains some s ∈ S \ S ′ in any reduced decomposition. Moreover, every w′ with w′ ≥ w, with respect to the Bruhat–Chevalley order, does contain s in any reduced decomposition. Take U := Ux,r,c1 and V := Ux,r′ ,c2 . Notice that the open sets resS ′ (U ), resS ′ (V ) are open neighborhoods of σ1 , respectively σ2 , by Proposition 3.22 and also that −1 res−1 S ′ (resS ′ (U )) and resS ′ (resS ′ (V )) are open subsets in X, by the definition of the quotient topology on Res± S′ . Let c− ∈ Ch(∂A) be the chamber opposite c1 . Without loss of generality, we consider r ∈ [x, ξc1 ) far enough such that clA (r, c− ) contains [x, r ′ ]. We need to prove that resS ′ (U )∩resS ′ (V ) = ∅. Suppose the contrary, that resS ′ (U )∩ resS ′ (V ) 6= ∅. Thus, there exist an ideal chamber d1 ∈ U and an ideal chamber d2 ∈ V that share their face of type S ′ . We claim that this cannot be possible. Indeed, for d1 ∈ U = Ux,r,c1 , the sectors Qx,c− and Qx,d1 are opposite, hence in a same apartment B, by Lemma 3.8. Now B contains [x, r] and clA (r, c− ), which contains ⊃ [x, r ′ ] if r is far enough. Applying the retraction ρB,c− , we have ρB,c− (c1 ) = d1 and δ(d1 , ρB,c− (c2 )) = w. Now by Proposition 2.13 applied to the preordered ray [x, ξd2 ) and the retraction ρB,d1 we have that, for t great, δ(d1 , d2 ) = w± (t) ≥ w+ (0) = 26 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau δ(d1 , ρB,c− (c2 )) = w. Notice that for π1 (t) ∈ [x, r ′ ) we have that w+ (t) = w. Therefore, we have obtained that δ(d1 , d2 ) contains s in any reduced decomposition, thus d1 and d2 cannot share a face of type S ′ ⊂ S \{s}. This is a contradiction of our assumption and the conclusion follows. T v Proposition 3.27. Let ∆ be a masure and Q Σ ⊂ Sph(S, W ) satisfying J∈Σ J = ∅. ResJ (X± ) given by c 7→ (resJ (c))J∈Σ is a Then the diagonal embedding ι : X± ֒→ J∈Σ homeomorphism onto its image, with respect to the cone topology on X. Q ResJ (X± ) is the product topology given by the topology on Proof. The topology on J∈Σ every ResJ (X± ). Recall that the topology on ResJ (X± ) is the finest topology such that the canonical map resJ : X± → ResJ (X± ) is continuous, i.e., a subset U of ResJ (X± ) is open if and only if res−1 J (U ) is open in X± with respect to the cone topology on X. Notice that the map ι is injective and continuous. Indeed, by the hypothesis on Σ, the union of all faces (of some chamber) having the type in Σ is in no wall; so this chamber is uniquely determined by its faces having the type in Σ and we have that ι is injective. The continuity follows from the fact that the canonical maps resJ : X± → ResJ (X± ) are continuous, for every J ∈ Σ. To prove that ι is a homeomorphism onto its image it is enough to prove that ι is an open map onto its image. Indeed, to prove this it is sufficient to show that, for every standard open neighborhood U of X± with respect to the cone topology, the set ι(U ) is open Q in the image ι(X± ) ResJ (X± ). that is endowed with the topology induced from the topology on J∈Σ Let c ∈ X± , x ∈ ∆ and r ∈ (x, ξc ). Denote by A an apartment containing x and containing the chamber c at infinity. Let c−Qbe the chamber opposite c in ∂A. We have ResJ (X± ). Take (resJ (d))J∈Σ for some ι(Ux,r,c ) = {(resJ (d))J∈Σ | d ∈ Ux,r,c } ⊂ J∈Σ Q ResJ (X± ) is of the d ∈ Ux,r,c. A standard open neighborhood of (resJ (d))J∈Σ in J∈Σ Q resJ (Ux,rJ ,d ), where rJ ∈ (x, ξd ) for every J ∈ Σ. Notice that rJ might be form J∈Σ ′ different  from rJ ′ , for J6= J . It is sufficient to prove that there exists rd ∈ (x, ξd ) such Q resJ (Ux,rd ,d ) ∩ ι(X± ) ⊂ ι(Ux,r,c ), i.e., for every d′ ∈ X± such that there that J∈Σ exists dJ ∈ Ux,rd ,d with resJ (d′ ) = resJ (dJ ), for every J ∈ Σ, we have that d′ ∈ Ux,r,c . Consider rd such that r ∈ (x, rd ). We can suppose that because d ∈ Ux,r,c. Let d′ ∈ X± such that there exists dJ ∈ Ux,rd ,d with resJ (d′ ) = resJ (dJ ), for every J ∈ Σ. Let A′ be the apartment of ∆ containing c− and d at infinity. Actually, by Lemma 3.8, the closed sectors Qx,c− and Qx,d are opposite and in A′ . Recall that for a spherical face φ at infinity of ∆ and a point z ∈ ∆ there exists a uniquely defined sector face Qz,φ with base point z and ideal face φ. This might not be the case when J ⊂ S is not spherical. For J ∈ Σ, let φJ (resp., φ′J ) be the ideal face of type J of d (resp., d′ or dJ ). As dJ ∈ Ux,rd ,d , Proposition 5.4 in [Rou11] tells that there is a Weyl–isomorphism of 27 The cone topology on masures apartments of ∆ sending Qx,d onto Qx,dJ , and fixing clA (x, rd ). So, if rd is far enough, Qx,φJ ∩ Qx,φ′J is big in Qx,φJ (i.e., for any Euclidean metric on A′ , the apartment A′ contains any given bounded subset of Qx,φJ ). Now Qx,d′ contains each Qx,φ′J , so it contains the big subset Qx,φJ ∩ Qx,φ′J of Qx,φJ . S By the hypothesis on Σ, the union J∈Σ Qx,φJ ⊂ Qx,d is in no wall; so the convex hull of S J∈Σ (Qx,φJ ∩ Qx,φ′J ) is big in Qx,d . By the axiom (MAO), this implies that Qx,d ∩ Qx,d′ is big in Qx,d . So d′ ∈ Ux,r,c , for rd far enough. Remarks 3.28. 1) Notice that a natural choice for Σ is the set Σp := { {s} | s ∈ S}, the corresponding residues being the panels. 2) Another natural choice would be the set Σv := { S \ {s} | s ∈ S} with vertices as residues. By Proposition 3.27 this is possible when each S \ {s} is spherical (i.e., essentially, when W v is of finite, affine or strictly hyperbolic type). In this case, we obtain that the canonical embedding i : X± ֒→ Y Vs± given by c 7→ (verts (c))s∈S s∈S is a homeomorphism Q onto its image, with respect to the cone topology on X and the product topology on s∈S Vs± . 3.4 Comparison with other topologies In this subsection we compare the properties proved above of the cone topology on Ch(∂∆), when ∆ is a masure, with the axioms introduced in Kramer [Kra02] and Hartnick–Köhl–Mars [HKM13], for abstract twin buildings. Lemma 3.13 is axiom (TTB1) from [HKM13]. Proposition 3.14 is a generalization of axiom (TTB2) of [HKM13] and the first part of Corollary 3.15 is exactly that axiom. Proposition 3.18 is axiom (TTB4+) and its Corollary 3.19 is axiom (TTB4). Therefore, when ∆ is locally finite and locally complete, Ch(∂∆) is a weak topological twin building in the terminology of [HKM13]. Lemma 3.21, Proposition 3.22 and Proposition 3.25 for the case of vertices are respectively, axioms (TTB5), (TTB6), (TTB1+) from [HKM13]. Proposition 3.27 is a generalization of axiom (TTB7) from [HKM13] that is stated in Remark 3.28.2). Actually (TTB7) is essential to make the link between the point of view of [HKM13] and the one of [Kra02]. One may remark that Kramer [Kra02] is studying essentially the affine twin building case and in that case, the axiom (TTB7) is proven to be true (see Remark 3.28.2)) in the context of the cone topology. The definition of topological twin buildings that are studied in [HKM13] involves axioms (TTB1), (TTB2), (TTB4) that are presented above and also the following axiom: (TTB3) There exist chambers c± ∈ X± such that X± = lim E≤w (c± ). → The latter mentioned equality is clear set-theoretically, but one wants it topologically. More precisely, we say that a topological space Y is the direct limit of subspaces Yi , 28 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau S denoted by Y = lim Yi , if Y = Yi and U ⊂ Y is open if and only if U ∩ Yi is open for → every i ∈ I. Following [HKM13], a weak topological twin building (i.e., a twin building endowed with a topology satisfying (TTB1), (TTB2), (TTB4)) may be endowed with a “completed” topology (i.e., the finest topology inducing the given topology on each Schubert variety E≤w (c± )) and one obtains a topological twin building. We do not know whether the cone topology satisfies (TTB3), even if ∆ is locally finite and locally complete. Still, the cone topology studied in this current article is natural and has many good and useful properties, as it was proven in Sections 3.2 and 3.3. It is not clear whether the associated completed topology (i.e., the topological twin building) is better than the cone topology. 4 Stabilizers and strong transitivity in masures We recall now the definition of strongly transitive actions, for combinatorial buildings as well as for affine R−buildings and twin buildings. Definition 4.1. Let ∆ be a combinatorial (hence discrete) building (resp., an affine R− building) and let A be the (not necessarily complete) apartment system defining ∆. Let G ≤ Aut(∆). We say that G acts strongly transitively on ∆ if G acts transitively on the set A of apartments and if, for one (so every) apartment A ∈ A, the stabilizer StabG (A) of A in G acts transitively on the set Ch(A) of chambers in A (resp., induces on A a group containing the affine Weyl group W a ). When ∆ = (∆− , ∆+ ) is a twin building with apartment system A = (A+ , A− ) and G ≤ Aut(∆) we say that G acts strongly transitively on ∆ if G acts transitively on the set of all twin apartments A = (A− , A+ ) ∈ A and StabG (A) acts transitively on Ch(A+ ) (so also on Ch(A− )), for every twin apartment A = (A− , A+ ) in A. Notice that this last definition is purely combinatorial, hence independent of any choice of a geometric realization of ∆. We now reproduce the same results as in Caprace–Ciobotaru [CC15, Section 3], where affine buildings are studied. We only translate those results into the language of masures. Lemma 4.2. Let ∆ be a masure and let G ≤ Aut(∆) be any group of vectorially Weyl– automorphisms. Let c ∈ Ch(∂∆) be a chamber at infinity. Then the set G0c := {g ∈ Gc | g fixes some point of ∆} is a normal subgroup (called the horospherical stabilizer) of the stabilizer Gc := {g ∈ G | g(c) = c}. Proof. It is clear that Gc , G0c are subgroups of G, as an element g ∈ Gc fixing a point x of ∆ will also fix (pointwise) an entire sector that emanates from x and pointing to c. This is also used to prove that G0c is normal in Gc (one proceeds as in [CC15, Section 3]). 29 The cone topology on masures Lemma 4.3. Let ∆ be a masure and let G ≤ Aut(∆) be any group of vectorially Weyl– automorphisms. Let c ∈ Ch(∂∆) be a chamber at infinity and A be an apartment of ∆, whose boundary contains c. Then for any g ∈ Gc , the map βc (g) : A → A : x 7→ ρA,c (g(x)) is an automorphism of the apartment A, acting as a (possibly trivial) translation. Clearly βc (g) and g coincide on A ∩ g−1 (A). Moreover the map βc : Gc → Aut(A) is a group homomorphism whose kernel coincides with G0c . In particular [Gc , Gc ] ⊂ G0c . Proof. For g ∈ Gc , g(A) is an apartment of ∆ that contains the chamber c in its boundary at infinity ∂g(A). By the definition of the retraction ρA,c , as g is vectorially Weyl and c ∈ Ch(∂A) ∩ Ch(∂g(A)), it is easy to see that indeed βc (g) is an element of Aut(A), that can act as a translation or can fix a point of A. Let us prove that βc is a group homomorphism, whose kernel coincides with G0c . Let g, h ∈ Gc . Because c ∈ Ch(∂A) ∩ Ch(∂g(A)) ∩ Ch(∂h(A)), there exists a common sector Qx,c in A ∩ g(A) ∩ h(A). This implies that for βc to be a group homomorphism it is enough to consider a point y far away in the interior of the sector Qx,c such that ρA,c (h(y)) = h(y). We have that βc (g)βc (h)(y) = βc (g)(ρA,c (h(y))) = βc (g)(h(y)) = ρA,c (g(h(y))) = βc (gh)(y). It is clear from the definition that G0c is contained in the kernel of βc . Let now g ∈ Ker(βc ). This implies that g fixes a point in the intersection A ∩ g(A); therefore, g ∈ G0c . The conclusion follows. Lemma 4.4. Let ∆ be a masure and let G ≤ Aut(∆) be a subgroup of vectorially Weyl– automorphisms that acts strongly transitively on ∂∆. Then for any pair c, c′ of opposite chambers at infinity, every G0c –orbit on the set cop of chambers opposite c is invariant under Gc,c′ := Gc ∩ Gc′ . Proof. Let c, c′ be a pair of opposite chambers at infinity of ∆ and let d ∈ cop . As G acts strongly transitively on ∂∆ there is some g ∈ Gc with d = g(c′ ). As the quotient Gc /G0c is abelian by Lemma 4.3, we have that the subgroup H := Gc,c′ G0c is normal in Gc and Gc,c′ (G0c (d)) = = = = = = H(g(c′ )) g(H(c′ )) g(G0c .Gc,c′ (c′ )) gG0c (c′ ) G0c (g(c′ )) G0c (d). Thus the G0c –orbit of d is indeed invariant by Gc,c′ , as claimed. It follows that the H–orbits on cop coincide with the G0c –orbits. 30 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau In this section we also verify an analogue criterion for strong transitivity as in Caprace–Ciobotaru [CC15, Section 3]. We first give a definition. Definition 4.5. Let ∆ be a masure and let G ≤ Aut(∆) be a group of automorphisms. Let A be an apartment of ∆. We say that a subset (or a filter) Ω of the apartment A is G−friendly if, for any two apartments A, A′ containing Ω, there is g ∈ G0Ω := {g ∈ G | g fixes pointwise Ω} such that A′ = g(A) and g : A → A′ , x 7→ g(x) is a Weyl–isomorphism. For Ω a local chamber or a sector-germ, Ω is G−friendly if, and only if, G0Ω is transitive on the set of all apartments containing Ω: this is a consequence of (MA2) and (MA4) as two isomorphisms A → A′ fixing Ω are necessarily equal; this implies in particular that the corresponding isomorphism is Weyl. In the same way, we also obtain that G0Ω fixes pointwise Ω and clA (Ω). Definition 4.6. (See Gaussent–Rousseau [GR14, 1.5] or Rousseau [Rou, 4.10]). Let ∆ be a masure and let G be a subgroup of Aut(∆). We say that G acts strongly transitively on ∆ if any isomorphism involved in axioms (MA2), (MA4) may be chosen to be the restriction of an element of G. This means that each of the sets clA (F ) appearing in (MA2) and clA (R∪F ) appearing in (MA4) is G−friendly. The Kac–Moody groups as in the example of Section 2.4.1 act strongly transitively by vectorially Weyl–automorphisms on the corresponding masures, see [GR08] and [Rou16] in the split case and [Rou] in the general almost split case. Proposition 4.7. Let ∆ be a masure and let G ≤ Aut(∆) be a group of vectorially Weyl–automorphisms. Then the following conditions are equivalent. (i) G is strongly transitive on ∆; (ii) every local chamber of ∆ is G−friendly; (iii) every sector-germ of ∆ is G−friendly. Remark 4.8. Notice that for thick, affine, chimney friendly buildings (viewed as R−buildings) there are two definitions of strong transitivity: Definition 4.1 and Definition 4.6. By the proof of Proposition 4.9 below these two definitions are the same. In addition, the proof of Proposition 4.7 gives the equivalence of the above three conditions for thick, sector friendly affine R−buildings. For this one needs only condition (CO) of [Par00]. Proof of Proposition 4.7. (i) ⇒ (iii): This follows from the definition of the strongly transitive action of G on the masure ∆. (ii) ⇒ (i): First we claim that the enclosure cl(F ) of any local face F of the masure ∆ is G−friendly. Indeed, if there exist two apartments A and A′ such that F ⊂ A ∩ A′ , The cone topology on masures 31 we consider a local chamber C of A and a local chamber C ′ of A′ such that both cover F . By Rousseau [Rou11, Prop. 5.1] there is an apartment A′′ of ∆ containing cl(C) and cl(C ′ ) (both containing cl(F )). Applying our hypothesis to (C, A, A′′ ) and (C ′ , A′ , A′′ ), the claim follows. We need to verify that all isomorphisms involved in the definition of the masure are e = clA (F ) or Ω e = clA (R ∪ F ) be as in the induced by elements of G. Therefore, let Ω e such that axiom (MA2) or (MA4). We consider a closed convex subset Ω ⊂ supp(Ω) ′ e cl(Ω) contains the filter Ω and is contained in the intersection A ∩ A of two apartments A, A′ of ∆. But in cl(Ω) one can find a (maximal) local face F1 such that F1 ⊂ cl(Ω) ⊂ supp(cl(F1 )), where supp(cl(F1 )) is the unique affine space of minimal dimension that contains cl(F1 ). For this face F1 we apply our above claim and we obtain an element g in the pointwise stabilizer G0cl(F1 ) < G such that g(A) = A′ , g : A → A′ , x 7→ g(x) is a Weyl–isomorphism and g fixes pointwise the closed face cl(F1 ). As cl(F1 ) ⊂ cl(Ω) ⊂ supp(cl(F1 )) and g is an affine isomorphism from A onto A′ , we also have that g fixes e The conclusion follows. (pointwise) cl(Ω) ⊃ Ω. (iii) ⇒ (ii): Let C be a local chamber contained in the intersection of two apartments A and A′ of ∆. Let x be a vertex of C and consider in A the sector Qx with base point x that contains the chamber C. Then A ∩ A′ contains a neighborhood C ′ of x in Qx and so that C ⊂ C ′ . Let y be a point in the interior of C ′ . Take the sector in A of the form Qy := Qx + (y − x) ⊂ Qx . In the apartment A′ consider the sector Q′y with base point y that contains the vertex x, hence which is opposite Qy . Notice that Q′y ∩ Qx is a small neighborhood of x (resp., of y) in Qx (resp., in Q′y ). By applying Lemma 3.8, one concludes that there is an apartment A′′ containing the sectors Qx and Q′y . So A′′ contains Qx ⊂ clA ({x}∪Qy ) and Qx ∩Q′y is an element of the filter C. By the hypothesis, applied successively to (Qx , A, A′′ ) and (Q′y , A′ , A′′ ), we obtain the conclusion. Proposition 4.9. Let ∆ be a thick masure, let X be its twin building at infinity and let G ≤ Aut(∆) be a group of vectorially Weyl automorphisms. If G acts strongly transitively on ∆, then the action of G induced on X is strongly transitive as well. Proof. By the axiom (MA3), it is clear that G is transitive on the set of all apartments of (∆, A). It remains to prove that the stabilizer StabG (A) of an apartment A ∈ A is transitive on the set Ch(∂A+ ). To obtain this it is enough to prove that the affine Weyl group W a is contained in StabG (A). First, consider three half-apartments H1 , H2 , H3 ⊂ ∆ that have a wall h in common and such that Hi ∩ Hj = h, for every i 6= j. We claim there exists an element g ∈ G such that g fixes H1 and g(H2 ) = H3 . In particular, we obtain that g(A2 ) = A3 , where A2 = H1 ∪ H2 and A3 = H1 ∪ H3 . Indeed, let Q1 be a sector in H1 such that it admits a sector-panel-germ at infinity of h, which is denoted by F1 . Consider at infinity of h a sector-panel-germ F2 that is opposite F1 . Let Q2 (resp., Q3 ) be a sector in H2 (resp., H3 ) that contains F2 at infinity. One notices that Q1 and Q2 (resp., Q3 ) are of opposite direction in A2 (resp., A3 ). We apply axiom (MA4) for germ(Q1 ) and F2 and to the apartments A2 and A3 . Then, there exists a Weyl–isomorphism 32 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau g ∈ G such that g(A2 ) = A3 and g is fixing pointwise clA2 (germ(Q1 ), F2 ). Notice that H1 = clA2 (germ(Q1 ), F2 ); therefore, g(H1 ) = H1 pointwise. The claim is proved. Let now h be a wall of the apartment A and denote by H1 , H2 the half-apartments of A such that ∂H1 = ∂H2 = h. We claim that there exists g ∈ W a ≤ StabG (A) such that g is a reflection with respect to the wall h. Indeed, as the masure is thick, by Rousseau [Rou11, Prop. 2.9] there exists a third half-apartment H3 ⊂ ∆ such that H1 ∩ H3 = H2 ∩ H3 . From the above claim, applied three times, we obtain an element g ∈ StabG (A) with the desired properties. In particular, as g fixes pointwise the wall h, we have that g ∈ W a and the conclusion follows. Definition 4.10. Let (∆, A) be a masure that is not a tree (or an extended tree) and let G be a vectorially Weyl subgroup of Aut(∆). Let σ, σ ′ ⊂ ∂∆ be a pair of opposite panels and denote by ∆(σ, σ ′ ) the union of all apartments of (∆, A) whose boundaries contain σ and σ ′ . By Corollary 2.10 consider the panel tree T (σ, σ ′ ) := (T (σ, σ ′ ), A(σ, σ ′ )) associated with σ and σ ′ . Let Gσ,σ′ be the stabilizer in G of σ, σ ′ . We say that G satisfies condition (LST) if for each pair of opposite panels (σ, σ ′ ) the subgroup Gσ,σ′ acts strongly transitively (as in Definition 4.1) on the panel tree T (σ, σ ′ ). We shall say that a group acting on an (extended) tree satisfies condition (LST) if it acts strongly transitively on the associated (quotient) tree. Lemma 4.11. Let ∆ be a masure (can be a tree or an extended tree). If G ≤ Aut(∆) is strongly transitive on ∆, then it satisfies Condition (LST). Remark 4.12. If we assume the apartment system is “locally complete” (see Definition 2.4) and G strongly transitive on ∂∆, then it is possible to see that G satisfies (LST). Without this completeness assumption, we obtain only that Gσ,σ′ is 2−transitive on the ends of T (σ, σ ′ ) which is not sufficient for (LST) (see Remark 1.4). Proof. The ends of T (σ, σ ′ ) correspond to the ideal chambers in Ch(σ). It is well known (and a consequence of Proposition 4.7 and Remark 4.8 above) that a group H acting on a tree is strongly transitive if, and only if, the horospherical stabilizer He0 of an end e of T (σ, σ ′ ) is transitive on the apartments containing this end e. To such an end e there are associated a unique ideal chamber c in Ch(σ) and its unique projected ideal chamber c′ in Ch(σ ′ ) (see Section 2.6). We consider the associated sector germs c = germ(Q) and c′ = germ(Q′ ). As G is strongly transitive on ∆, the subgroup G0c,c′ of G fixing pointwise these sector germs is transitive on the apartments containing them (i.e., containing σ, σ ′ and e). But G0c,c′ ≤ Gσ,σ′ is in the horospherical stabilizer of e with respect to the subgroup Gσ,σ′ . So Gσ,σ′ is strongly transitive on T (σ, σ ′ ). 5 Existence and dynamics of strongly regular elements Definition 5.1. (See [CC15, Section 2.1]) Let ∆ be a masure and let A be an apartment of ∆. With respect to the affine structure of A, a line ℓ ⊂ A is called strongly regular, if its points at infinity lie in the interior of two opposite chambers of the twin building The cone topology on masures 33 at infinity of ∆. This also means that both associated ray-germs are strongly regular. In particular, the apartment A is the unique apartment of ∆ containing the strongly regular line ℓ. Moreover, a hyperbolic element γ of Aut(∆) is called strongly regular if it admits a strongly regular translation axis (i.e., there exists an apartment A of ∆ and a strongly regular geodesic line in A which is a translation axis of γ). Theorem 5.2. Let (∆, A) be a thick, masure such that Av = (V, W v ) has no irreducible factor of affine type. Let G be a vectorially Weyl subgroup of Aut(∆) that acts transitively on A and satisfies condition (LST). Then G contains a strongly regular hyperbolic element. Remark 5.3. As stated, the theorem fails when ∆ is of affine type: we may consider a split loop group G over a non-Archimedean local field, acting on its masure ∆. It acts strongly transitively on ∂∆, so it acts transitively on the set of all apartments of ∆, but the smallest positive imaginary root δ ∈ Φ+ im is trivial on the maximal torus T . So all translations induced by StabG (A) on the corresponding apartment A have their corresponding translation vectors in the boundary ker(δ) of the Tits cone: there is no strongly regular element. It will be clear from the proof of the theorem that the conclusion of the theorem is true even when Av may have an irreducible factor of affine type, if we add the following hypothesis for the action of G: (AGT) For some (and hence for any) apartment A ∈ A of the masure ∆, its stabilizer StabG (A) in G contains an element which induces an affinely generic translation, → → i.e., a translation whose corresponding translation vector − v satisfies δ(− v ) 6= 0 for any imaginary root of an affine component of Φ ∪ Φim . Proof of Theorem 5.2. If ∆ is a tree (or an extended tree), then condition (LST) tells us that G is strongly transitive on the associated (quotient) tree, hence contains a strongly regular hyperbolic element. Thus, we assume now that ∆ is not an (extended) tree. We start with a preliminary observation. Let A be an apartment of ∆ and let H, H ′ be two complementary half-apartments of A. We claim that there is some g ∈ StabG (A) which swaps H and H ′ ; in particular g stabilizes the common boundary wall ∂H = ∂H ′ . In order to prove the claim, choose a pair of opposite panels σ, σ ′ at infinity of the wall ∂H. Notice that it makes sense to consider panels at infinity since ∆ is not a tree, and thus the twin building ∂∆ has positive rank. We now invoke Corollary 2.10 which provides a canonical isomorphism ∆(σ, σ ′ ) ∼ = (T (σ, σ ′ ), A(σ, σ ′ )) × Rn−1 , where n = dim(∆) and ′ ′ (T (σ, σ ), A(σ, σ )) is a thick tree. The set Ch(σ) is in one-to-one correspondence with ∂T (σ, σ ′ ). Recall that Gσ,σ′ is strongly transitive on (T (σ, σ ′ ), A(σ, σ ′ )) by the hypothesis (LST). Therefore, if v (resp., D) denotes the vertex (resp., geodesic line) of T corresponding to the wall ∂H (resp., the apartment A), we can find some g ∈ StabGσ,σ′ (A) stabilizing D and acting on it as the symmetry through v. It follows that g stabilizes A, the wall ∂H = ∂H ′ and swaps the two half-apartments H and H ′ . This proves our claim. (We warn the reader that g might however act non-trivially on the wall ∂H.) 34 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau Using the above proven fact, we claim that, for every root α ∈ Φ, we can construct a translation in StabG (A) of translation vector that is almost collinear to α∨ . Indeed, let h be a wall of A and denote by H, H ′ the corresponding two complementary half-apartments of A such that ∂H = ∂H ′ = h. Let g ∈ StabG (A) that swaps H and H ′ and stabilizes the wall h together with a panel σ at infinity of h. We denote rh ∈ Aut(A) the reflection with respect to the wall h. Then rh ◦g|A is a vectorially Weyl–automorphism of A and stabilizes the two chambers of ∂A containing σ. We conclude that rh ◦ g|A is a translation in Aut(A). As g and rh stabilize h, the element rh ◦ g|A is a translation parallel to h. We call such an element g ∈ StabG (A) a reflection-translation of wall h. We remark the following. Fix two different walls h1 and h2 of the apartment A of direction ker α and let g1 , g2 ∈ StabG (A) be two reflection-translations corresponding respectively, to the walls h1 and h2 . We have that g1 ◦ g2 ∈ StabG (A) is a translation element whose translation vector is not in ker α. In particular, we notice that the projection of the translation vector of g1 ◦ g2 in the direction ker α equals the sum of the translation vectors of g1 and g2 . Moreover, the projection of the translation vector of g1 ◦ g2 in the direction of α∨ depends on the “euclidean distance” |α(h2 ) − α(h1 )| between the walls h1 and h2 . Let us denote γ := g1 ◦ g2 . For every reflection-translation g ∈ StabG (A) of wall hg of direction ker α, we have that γ n gγ −n ∈ StabG (A) is a reflection-translation of wall γ n (hg ) and whose translation vector equals the translation vector of g. To conclude our last claim, one can choose two walls h1 and h2 of direction ker α in the same orbit of the group hγi, that are very far away and two reflection-translations g1 , g2 ∈ StabG (A) corresponding respectively to h1 and h2 . By the remark above, we have that g1 ◦ g2 ∈ StabG (A) is a translation and the projection of its translation vector in the direction α∨ can be made very big, depending on the distance between h1 and h2 . In particular, the translation vector of g1 ◦ g2 can be made almost collinear to α∨ as we want. The claim follows. Finally, to construct a strongly regular hyperbolic element, we choose a base of roots (α ) the hypothesis on the type of (V, W v ), we get some Z−linear combination i P i∈I . By ∨ v i∈I ni αi which is in Cf , see Kac [Kac90, Th. 4.3]. But from above, we get a fixed neighborhood U of 0 in V and elements gi,n ∈ StabG (A) inducing translations with vector in nri α∨ i + U , for every i ∈ I and some Q ri ∈ (0, +∞). Therefore, for some Ni big (with all Ni ri /ni almost equal), the product i∈I gi,Ni (in any order) will be the desired hyperbolic element. 6 Proof of Theorem 1.7 Proposition 6.1. (See [CC15, Proposition 2.10]) Let ∆ be a masure and let γ ∈ Aut(∆) be a vectorially Weyl strongly regular hyperbolic element of translation apartment A. Let c− ∈ Ch(∂A∓ ) be the unique chamber at infinity that contains the repelling point of γ in its interior. Then for every c ∈ Ch(∂∆± ) the limit lim γ n (c) exists with respect to the cone n→∞ The cone topology on masures 35 topology on Ch(∂∆) and coincides with the retraction of c onto A centered at the chamber c− . In particular, the fixed-point-set of γ in Ch(∂∆± ) is the set Ch(∂A± ). Proof. The proof goes in the same way as in [CC15, Proposition 2.10]. Remark 6.2. If G acts strongly transitively on ∆, then G0c is transitive on cop (apply the definition of the strong transitivity to the situation of (MA2) with F the sectorgerm associated with the ideal chamber c); in particular Condition (Top) is satisfied. Therefore, our hypothesis (Top) together with the dynamics at infinity are necessary to obtain Theorem 1.7. Proof of Theorem 1.7. The implication (i) =⇒ (ii) is Proposition 4.9. Let us now prove (ii) =⇒ (i). Let c ∈ Ch(∂∆), c′ ∈ cop and denote by A the unique apartment in ∆ whose boundary contains c and c′ . By hypothesis we have that G contains a strongly regular hyperbolic element. As G is strongly transitive on ∂∆, G acts transitively on the set A of all apartments of ∆, and we conclude that every apartment in ∆ admits a strongly regular hyperbolic element in G. Moreover, there exists a strongly regular hyperbolic element γ of Gc,c′ ≤ G such that c, respectively c′ , is the unique chamber at infinity that contains in its interior the repelling, respectively the attracting, point of γ. Applying Proposition 6.1 to the strongly regular element γ ∈ Gc,c′ with its unique translation apartment A we obtain that c′ is an accumulation point for every G0c Gc,c′ – orbit in cop , with respect to the cone topology on Ch(∂∆). By our hypothesis, every G0c –orbit in cop is closed in the cone topology on Ch(∂∆), and so is every G0c Gc,c′ –orbit in cop , by Lemma 4.4. Therefore, there is only one G0c Gc,c′ –orbit in cop . We conclude that Gc = G0c Gc,c′ and that G0c is transitive on cop . The desired conclusion follows from the criterion of strong transitivity given by Proposition 4.7. Corollary 6.3. Let (∆, A) be a thick masure. Let G be a vectorially Weyl subgroup of Aut(∆). If ∆ has some factors of affine type, we ask moreover that G satisfies the condition (AGT) of Remark 5.3. Then the following are equivalent: (i) G acts strongly transitively on ∆; (ii) G acts strongly transitively on the twin building at infinity ∂∆ and G satisfies Condition (LST) and Condition (Top) of Definition 1.6. Proof. It follows by applying Theorem 5.2, Remark 5.3, Theorem 1.7, Lemma 4.11 and Remark 6.2. Notice that Corollary 1.8 is a special case of Corollary 6.3. 36 Corina Ciobotaru, Bernhard Műhlherr & Guy Rousseau References [AB08] Peter Abramenko and Kenneth S. Brown, Buildings, Graduate Texts in Mathematics, vol. 248, Springer, New York, 2008. Theory and applications. ↑13 [BPGR16] N. Bardy-Panse, S. Gaussent, and G. Rousseau, Iwahori–Hecke algebras for Kac–Moody groups over local fields, Pacific J. Math 285 (2016), 1-61. ↑1, 2 [BH99] M. Bridson and A. Haefliger, Metric spaces of non positive curvature, Springer Verlag, Berlin, 1999. ↑17 [BT72] François Bruhat and Jacques Tits, Groupes réductifs sur un corps local I, Données radicielles valuées, Publ. Math. Inst. Hautes Études Sci. 41 (1972), 5–251. ↑8 [CC15] P-E. Caprace and C. Ciobotaru, Gelfand pairs and strong transitivity for Euclidean buildings, Ergodic Theory and Dynamical Systems 35 (2015), no. 4, 1056-1078. ↑2, 3, 4, 5, 6, 28, 30, 32, 34, 35 [Cha11] Cyril Charignon, Immeubles affines et groupes de Kac–Moody, masures bordées, Éditions universitaires européennes, Sarrebruck, 2011. Thèse Nancy, 2 juillet 2010, http://tel.archivesouvertes.fr/docs/00/49/79/61/PDF/these.pdf. ↑1, 11 [CR] C. Ciobotaru and G. Rousseau, Strongly transitive actions on affine ordered hovels. arXiv:1504.00526v2. ↑2, 7 [CMR] C. Ciobotaru, B. Mühlherr, and G. Rousseau, Strongly transitive actions on masures. In preparation. ↑ [GR08] S. Gaussent and G. Rousseau, Kac–Moody groups, hovels and Littelmann paths, Annales Inst. Fourier 58 (2008), 2605–2657. ↑1, 2, 8, 11, 16, 30 [GR14] , Spherical Hecke algebras for Kac–Moody groups over local fields, Ann. of Math. 180, Issue 3 (2014), 1051–1087. ↑1, 2, 4, 6, 8, 16, 30 [HKM13] Tobias Hartnick, Ralf Köhl, and Andreas Mars, On topological twin buildings and topological split Kac-Moody groups, Innov. Incidence Geom. 13 (2013), 1–71. arXiv: 1201.3562v2. MR3173010 ↑2, 3, 6, 13, 20, 21, 23, 27, 28 [Kac90] Victor G. Kac, Infinite dimensional Lie algebras, Cambridge University Press, Cambridge, third edition, 1990. ↑8, 34 [Kra02] Linus Kramer, Loop Groups and Twin Buildings, Geom. Dedicate 92 (2002), 145–178. ↑3, 20, 27 [KS] Linus Kramer and Jeroen Schillewaert, Strongly transitive actions on Euclidean buildings. To appear in ‘Israel J. Math.’, arXiv:1506.03594. ↑5 [Par00] Anne Parreau, Immeubles affines: construction par les normes et étude des isométries, in Crystallographic groups and their generalizations, Kortrijk (1999), Contemporary Math. (Amer. Math. Soc., Providence) 262 (2000), 263–302. ↑11, 19, 30 [Rou11] Guy Rousseau, Masures affines, Pure Appl. Math. Quarterly (in honor of J. Tits) 7 (2011), no. 3, 859–921. ↑1, 7, 8, 10, 11, 12, 14, 15, 17, 19, 21, 26, 31, 32 [Rou16] , Groupes de Kac–Moody déployés sur un corps local, 2 Masures ordonnées, Bull. Soc. Math. France 144 (2016), 613-692. ↑1, 11, 30 [Rou] , Almost split Kac–Moody groups over ultrametric fields. preprint Nancy, February 2012, ArXiv [math.GR] 1202.6232v2. ↑1, 4, 11, 30
4math.GR
Facial Expression Recognition from World Wild Web arXiv:1605.03639v3 [cs.CV] 5 Jan 2017 Ali Mollahosseini1 , Behzad Hassani1 , Michelle J. Salvador1 , Hojjat Abdollahi1 , David Chan2 , and Mohammad H. Mahoor1,2 1 Department of Electrical and Computer Engineering 2 Department of Computer Science University of Denver, Denver, CO [email protected], [email protected], [email protected]) [email protected], [email protected], and [email protected] Abstract Recognizing facial expression in a wild setting has remained a challenging task in computer vision. The World Wide Web is a good source of facial images which most of them are captured in uncontrolled conditions. In fact, the Internet is a Word Wild Web of facial images with expressions. This paper presents the results of a new study on collecting, annotating, and analyzing wild facial expressions from the web. Three search engines were queried using 1250 emotion related keywords in six different languages and the retrieved images were mapped by two annotators to six basic expressions and neutral. Deep neural networks and noise modeling were used in three different training scenarios to find how accurately facial expressions can be recognized when trained on noisy images collected from the web using query terms (e.g. happy face, laughing man, etc)? The results of our experiments show that deep neural networks can recognize wild facial expressions with an accuracy of 82.12%. 1. Introduction The World Wide Web (aka the Internet) has become a vast abundant source of information and data. Especially with the growth and use of social media and the availability of digital cameras on smart phones, people can easily add data to the Internet by taking photos, writing a short description, and immediately uploading them to the social media. People add more information to each photo by doing a tag, like, dislike, or comment on photos posted by friends or others on the Web. It is estimated that over 430 million photos are uploaded to Facebook and Instagram servers every day [10, 4]. Among photos posted on the Web, facial images have the highest incidents (e.g. selfies or selfportrait images are very popular nowadays). These facial photos are often taken in the wild under natural conditions with varying and diverse parameters such as scene lighting, user’s head pose, camera view, image resolution and background, subject’s gender, ethnicity, and facial expressions among others. Furthermore, the labels given by users use a wide range of vocabulary that is commonly understood to describe emotions, facial attributes, and expressions, of the pictures’ contents. These photos are truly Wild images both in terms of the image quality/conditions and the labels given by users. An interesting question that may arise is, how the labels given wildly to facial images on the web by general users are consistent with the six basic emotions defined by psychologists. On the other hand, computer vision and machine learning techniques for facial expression recognition are finding their ways into the design of a new generation of HumanComputer Interfaces. In order to train a machine learning system, many researchers have created databases using human actors/subjects portraying basic emotions [9, 25, 16]. However, most of the captured datasets mainly contain posed expressions acquired in a controlled environment. This is mostly due to the fact that it is hard and time consuming to collect unposed facial expression data in lab settings. However, in real applications, the system needs to capture and recognize spontaneous expressions, which involve different facial muscles, less exaggeration/intensity and have different dynamics than posed expressions. Researchers who have created spontaneous expression databases have captured the human face spontaneously while watching a short video or filling a questionnaires [7, 17, 18]. However, the datasets are still captured in controlled lab settings (i.e. with the same illumination, resolution, etc.) or have a limited number of subjects, ethnicities, and poses poorly representing the environment and conditions faced in real-world situations. Existing databases in the wild settings, such as SFEW [3] or FER2013 [6], are also either very small or have low resolution without facial landmark points necessary for preprocessing. Moreover, state-of-the-art machine learning algorithms such as Deep Neural Network requires big data for training and evaluation of the core algorithms. Given all the aforementioned motivations, this paper presents the results of our recent study with the aim of resolving the following questions: 1. How consistent are the expression labels given by general web users compared to the six basic expression labels annotated by expert annotators on facial images? 2. How accurately can a state-of-the-art algorithm classify images when trained on facial images collected from the web using query terms (e.g. happy face, laughing man, etc)? To address these questions, we created a database of inthe-wild facial expressions by querying different search engines (Google, Bing and Yahoo) We then annotated a subset of images using two human annotators and showed the general accuracy of the querying search engines for facial expression recognition. We trained two different deep neural network architectures with different training settings i.e. training on clean well-labeled data, training on a mixture of clean and noisy data, and training on mixture of clean and noisy data with a noise modeling approach using a general framework introduced in [38]. In other words, given the result of annotations, the noise level of each search engine is estimated as a prior distribution on the labels of our posterior set allowing for greater classification performance when we sample noisy labels and true labels in the same proportion. In order to achieve this, we learned a stochastic matrix where the entries are the probability of confusion in the labels. From this matrix, we can extract a posterior distribution on the true labels of the data conditioned on the true label given the noisy label, and the noisy label given the acquired data. For more information on the technique, see [38]. The rest of this paper is organized as follows. Section 2 reviews existing databases and state-of-the-art methods for facial expression recognition in the wild. Sec. 3 explains the methodology of automatically collecting a large amount of facial expression images from the Internet and procedure of verifying them by two expert annotators. Section 4 presents experimental results on training two different network architectures with different training settings, and section 5 concludes the paper. 2. Facial Expression Recognition in the wild Automatic Facial Expression Recognition (FER) is an important part of social interaction in Human-Machine- Interaction (HMI) systems [22]. Traditionally, automatic facial expression recognition (AFER) methods consist of three main steps 1) registration and preprocessing, 2) feature extraction, and 3) classification. Preprocessing and registration form an important part of the AFER pipeline. Many studies have shown the advantages of using facial image registration to improve classification accuracy in both face identification and facial expression recognition [8, 27]. In the feature extraction step, many methods such as HOG [17], Gabor filters [14], Local binary pattern (LBP) [31], facial landmarks [12], pixel intensities [19], and Local phase quantization (LPQ) [43], or a combination of multiple features using multiple kernel learning methods [41, 42] have been proposed to extract discriminative features. Classification is the final step of most AFER techniques. Support vector machines [43], multiple kernel learning [41, 42], dictionary learning [20] etc. have been shown to have a great performance in classifying discriminative features extracted from the previous stage. Although, traditional machine learning approaches have been successful when classifying posed facial expressions in a controlled environment, they do not have the flexibility to classify images captured in a spontaneous uncontrolled manner (“in the wild”) or when applied to databases for which they were not designed. The poor generalizability of traditional methods is primarily due to the fact that many approaches are subject or database dependent and only capable of recognizing exaggerated or limited expressions similar to those in the training database. Many FER databases have tightly controlled illumination and pose conditions. In addition, obtaining accurate training data is particularly difficult, especially for emotions such as sadness or fear which are extremely difficult to accurately replicate and do not occur often in real life. Recently, facial expression datasets with in the wild settings have attracted much attention. Dhall et al. [2] released Acted Facial Expressions in the Wild (AFEW) from movies by semi-automatic approach via a recommender system based on subtitles. AFEW addresses the issue of temporal facial expressions and it is the only temporal publicly available facial expression database in the wild. A static subset Static Facial Expressions in the Wild (SFEW) is created by selecting static frames which covers unconstrained facial expressions, different head poses, age range, and occlusions and close to real world illuminations. However, it contains only 1635 images and there are only 95 subjects in the database. In addition, due to the wild settings of the database, the released facial location and landmarks do not capture the faces in all images correctly making some training and test samples unusable (See Fig. 1). The Facial Expression Recognition 2013 (FER-2013) database was introduced in the ICML 2013 Challenges in Representation Learning [6]. The database was created us- Angry Sad Happy Disgust Figure 1. Sample of images from SFEW [3] and their original registered images published with the database. Angry Disgust Fear Happy Sad Surprise Neutral Figure 2. Sample of images from FER2013 database [6]. ing the Google image search API that match a set of 184 emotion-related keywords to capture the six basic expressions as well as the neutral expression. Human labelers rejected incorrectly labeled images. Images are resized to 48x48 pixels and converted to grayscale. The resulting database contains 35,887 images most of them in wild settings, yet only 547 of the images portray disgust. Figure 2 shows some sample images of FER2013. FER2013 is currently the biggest publicly available facial expression database in wild settings, enabling many researchers to train machine learning methods where large amounts of data are needed such as Deep neural networks. However, as shown in Fig. 2, the faces are not registered, and unfortunately most of facial landmark detectors fail to extract facial landmarks at this resolution and quality. In addition, FER in the wild is really a challenging task both in terms of machine and human performance. Extensive experiments in [5] show that even humans are only capable of 53% agreement in terms of Fleiss kappa over all classes to classify AFEW video clips without listening to the audio track. State-of-the-art automated methods have achieved 35% accuracy on AFEW video clips by using audio modalities [44]. Even recognizing expression from still images or static frames using traditional machine learning approaches are not accurate and the best performance on SFEW 2.0 database is reported as 50% accuracy (with a baseline of 39.13%) [44]. Recently, deep neural networks have seen a resurgence in popularity. Recent state-of-the-art results have been ob- tained using neural networks in the fields of visual object recognition [13, 33], human pose estimation [36], face verification [34], and many more. Even in the FER field results so far have been promising [11, 21, 15, 11], and most of the facial expression recognition challenge winners have used deep neural networks [35, 40]. In the FER problem, however, unlike visual object databases such as imageNet [1], existing FER databases often have limited numbers of subjects, few sample images or videos per expression, or small variation between sets, making neural networks significantly more difficult to train. For example, the FER2013 database [6] (one of the largest recently released FER databases) contains 35,887 images of different subjects yet only less than 2% of the images portray disgust. Similarly, the CMU MultiPIE face database [9] contains around 750,000 images but is comprised of only 337 different subjects, where 348,000 images portray only a “neutral” emotion and the remaining images do not portray anger, fear or sadness. In a recent study [21], the authors proposed a deep neural network architecture and combined seven well-known facial expression databases (i.e. MultiPIE, MMI, CK+, DISFA, FERA, SFEW, and FER2013) to perform an extensive study on subject-independent and cross database. The results of the proposed architecture were comparable to or better than the state-of-the-art methods, However, the majority of data were still posed images and performance on wild databases (SFEW and FER2013) were only comparable to the state-of-the-art methods. Considering the need to develop an automated FER in wild system, and issues with the current facial expression in wild databases, a possible solution is to automatically collect a large amount of facial expression images from the abundant images available on the Internet, and directly use them as ground truth to train deep models. However, consideration should be done to avoid false samples in the search engine results for expressions such as disgust or fear. This is due to the higher tendancy of people to publish happy or neutral faces that can be mislabeled or associated with disgust or fear by web users. Nonetheless, semi-supervised [37], transfer learning [24], or noise modeling approaches [32, 38] can be used to train deep neural networks with noisy data by obtaining large amounts of facial expression images from search engines, along with a smaller subset of fully well-labeled images. 3. Facial expressions from the wild web To create our database with the larger amount of images necessary for Deep Neural Networks, three search engines were queried by facial emotion related tags in six different languages. We used Google, Bing, and Yahoo. Other search engines were considered such as Baidu and Yandex. However they either did not produce a high percentage of the intended images or they did not have accessible APIs for automatically querying and pulling image urls into the database. A total of 1250 search queries were compiled in six languages and used to crawl Internet search engines for the image urls in our dataset. The first 200 urls returned for each query were stored in the database (258,140 distinct urls). Among the 258,140 urls, 201,932 images were available for download. OpenCV face recognition was used to obtain bounding boxes around each face. Bidirectional warping of Active Appearance Model (AAM) [23] and a face alignment algorithm via regressing local binary features [26, 39] were used to extract 66 facial landmarks. The employed facial landmark localization techniques have been trained using the annotations provided from the 300W competition [28, 30, 29]. Images with at least one face with facial landmark points were kept for the next processing stages. A total of 119,481 images were kept. Other attributes of the queries were stored if applicable such as; intended emotion, gender, age, language searched, and its English translation if not in English. On average 4000 images of each queried emotions were selected randomly, and in total 24,000 images were given to two expert annotators to categorize the face in the image into nine categories (i.e. No-face, six basic expressions, Neutral, None, and Uncertain). The annotators were instructed to select the proper expression category on the face, where the intensity is not important as long as the face depicts the intended expressions. The No-face category was defined as images that: 1) There was no face in the image; 2) There was a watermark on the face; 3) The bounding box was not on the face or did not cover the majority of the face; 3) The face is a drawing, animation, painted, or printed on something else; and 4) The face is distorted beyond a natural or normal shape, even if an expression could be inferred. The None category was defined as images that portrayed an emotion but the expression/emotions could be categorized as one of the six basic emotions or neutral (such as sleepy, bored, tired, seducing, confused, shame, focused, etc.). If the annotators were uncertain about any of the facial expressions, images were tagged as uncertain. Figure 3 shows some examples of each category and the intended queries written in parentheses. The annotation was performed fully blind and independently, i.e. the annotators were not aware of the intended query or other annotator’s response. The two annotators agreed on 63.7% of the images. For the images that were at a disagreement, favor was given to the intended query i.e. if one of the annotators labeled the image as the intended query, the image was labeled in the database with the intended query. This happened in 29.5% of the images with disagreement between the annotators. On the rest of None (Sad) No-Face (Happy) Uncertain (Angry) Neutral (Disgust) Angry (Happy) Disgust (Angry) Happy (Angry) Surprise (Happy) Angry (Angry) Fear (Fear) Sad (Sad) Disgust (Disgust) Figure 3. Sample of queried images from the web and their annotated tags. The queried expression is written in parentheses. Table 1. Number of annotated images in each category Label Neutral Happy Sad Surprise Fear Disgust Anger None Uncertain No-face Number of images 3501 7130 3128 1439 1307 702 2355 403 280 3755 the images with disagreement, one of the annotations was assigned to the image randomly. Table 1 shows the number of images in each category in the set of 24,000 images that were given to two human annotators. As shown, some expressions such as Disgust, Fear, and Surprise have few images compared to the other expressions, despite the number of queries being the same. Table 2 shows the confusion matrix between queried emotions and their annotations. As is shown, happiness had the highest hit-rate (68%) and the rest of emotions had hitrates at less than 50%. There was about 15% confusion with No-Face category for all emotions, as many images from the web contained watermarks, drawings etc. About 15% of all queried emotions resulted in neutral faces. Disgust and Fear had the lowest hit rate among other expression with 12% and 17% hit-rates respectively and most of the result of disgust and fear are mainly happiness or No-Face. Table 2. Confusion Matrix of annotated images for different intended emotion-related query terms Happy Sad Surprise Fear Disgust Anger Happy 68.18 16.5 27.6 18.74 26.71 22.28 Sad 2.66 42.42 6.31 10.91 7.47 7.39 Surprise 1.23 1.52 20.11 6.49 4.48 2.31 Fear 0.74 1.88 5.62 17.69 4.53 2.11 Disgust 0.33 0.57 1.07 1.47 12.61 1.19 4. Training from web-images The annotated images labeled with six basic expressions as well as neutral faces are selected from 24,000 annotated images (18,674 images). Twenty percent of each label is randomly selected as a test set (2,926 images) and the rest are used as training and validation sets. A total of 60K of not annotated images (10K for each basic emotion) is selected as noisy training set. As baselines, two different deep neural network architectures are trained in three different training scenarios: 1) training on well-labeled images, 2) training on a mixture of noisy and well-labeled sets, and 3) training on a mixture of noisy and well-labeled sets using a noise modeling approach introduced in [38]. The network architecture we used in these experiments are AlexNet [13] and a networks for facial expression recognition recently published in WACV2016 in [21], called WACV-Net in the rest of this paper. All networks are evaluated on a well-labeled test set. AlexNet consists of five convolutional layers, some of which are followed by max-pooling layers, and three fullyconnected layers. To augment the data, ten crops of registered facial images of size 227x227 pixels are fed to AlexNet. We have tried a smaller version of AlexNet with smaller input images of 40x40 pixels and smaller convolutional kernel sizes, but the results were not as promising as the original model. WACV-Net consists of two convolutional layers each followed by max pooling, four Inception layers, and two fully-connected layers. The input images are resized to 48x48 pixels with ten augmented crops of 40x40 pixels. Our version of AlexNet performed more than 100M operations, whereas the WACV-Net performs about 25M operations, due to size reductions in Inception layers. Therefore, WACV-Net trained almost four times faster than AlexNet and consequently it had faster evaluation time as well. In the first scenario, the network is trained on only welllabeled set with random initialization. In the second scenario (mixture of noisy and well-labeled sets), the network is pre-trained with only well-labeled data, and then trained on the mixture of the noisy and well-labeled sets. This increased about 5% in accuracy compared with training on the mixture of the noisy and well-labeled sets from scratch. In the last scenario (mixture of noisy and well-labeled sets Anger 1.59 4.73 4.85 6.39 9.62 30.59 Neutral 5.67 16.55 17.1 13.92 17.34 16.21 No-Face 18.54 13.31 14.73 20.49 12.41 14.43 None 0.74 1.57 1.65 2.22 2.99 2.34 Uncertain 0.33 0.98 0.96 1.67 1.84 1.14 Table 3. Recognition accuracy of AlexNet and WACV-Net on well-labeled test set with different training settings Train on well-labeled Train on mix Train on mix with noise estimation [38] AlexNet 82.12% 69.03% WACV-Net [21] 75.15% 67.04% 81.68% 76.52% using the noise modeling), as the posterior computation could be totally wrong if the network is randomly initialized [38], the network components are pre-trained with the well-labeled data. In addition, we bootstrap/upsample the well-labeled data to half of the noisy data. In all scenarios, we used a mini-batch size of 256. The learning rate is initialized to be 0.001 and is divided by 10 after every 10,000 iterations. We keep training each model until convergence. Table 3 shows the overall recognition accuracy of AlexNet and WACV-Net on the test set in three training scenarios. As shown, in all cases AlexNet performed better than WACV-Net. Training on mixture of the noisy and well-labeled data were not as successful as training on only well-labeled data. We believe that this was due to the fact that facial expression images crawled from the web are very noisy and in most expressions, less than 50% of the noisy data portray the intended query. The noise estimation approach can improve the accuracy of the network trained on the mixture of noisy and well-labeled sets. The best result is achieved from training AlexNet on well-labeled data. This gives slightly better overall accuracy (1%) than training on the mixture of noisy and well-labeled sets using noise modeling. Table 4 shows the confusion matrix of AlexNet trained on the well-labeled set. Table 5 shows the confusion matrix of AlexNet trained on the mixture of noisy and well-labeled sets with noise estimation [38]. As shown in these tables, the noise estimation approach can improve the recognition accuracy of sadness, surprise, fear and disgust expressions. The reason is that there are fewer samples of these expressions in the well-labeled sets compared with other labels, and therefore including noisy data increases the training samples if the posterior distribution is estimated well. However, in some cases such as neutral faces and angry, training on only well-labeled data has higher recognition accuracy, Table 4. Confusion matrix of AlexNet Trained on well-labeled predicted NE HA SA SU FE DI AN 79.12 6.73 9.98 0.46 0 0 3.71 HA 6.37 91.63 1.14 0.29 0.14 0.07 0.36 SA 14.52 5.24 73.10 0.24 0.48 0.71 5.71 SU 10.59 6.47 1.18 76.47 3.53 1.18 0.59 FE 4.14 3.45 7.59 15.86 60 2.76 6.21 DI 2.41 4.82 8.43 2.41 1.2 57.83 22.89 AN 8.6 2.87 5.73 1.79 0.36 5.73 74.91 Actual NE Happy (Neutral) Angry (Disgust) Neutral (Fear) Angry (Neutral) Disgust (Angry) Happy (Surprise) Neutral (Sad) Surprise (Fear) * NE, HA, SA, SU, FE, DI, AN stand for Neutral, Happiness, Sadness, Surprised, Fear, Disgust, Anger respectively. Table 5. Confusion matrix of AlexNet Trained mixture of noisy and well-labeled sets with noise estimation Actual predicted NE HA SA SU FE DI AN NE 65.20 10.67 20.19 0.23 0 1.62 2.09 HA 3.29 91.56 3.72 0.21 0.21 0.43 0.57 SA 7.62 3.33 84.29 0.24 0.95 1.43 2.14 SU 5.29 5.88 4.12 76.47 5.29 1.76 1.18 FE 0.69 3.45 11.72 13.79 63.45 3.45 3.45 DI 2.41 4.82 6.02 2.41 1.2 68.67 14.46 AN 6.45 2.87 12.54 2.87 0.36 4.66 70.25 * NE, HA, SA, SU, FE, DI, AN stand for Neutral, Happiness, Sadness, Surprised, Fear, Disgust, Anger respectively. as the prior distribution on the well-label set may not fully reflect the posterior distribution on the noisy set. Figure 4 shows a sample of randomly selected images misclassified by AlexNet trained on the well-labeled and their corresponding ground-truth given in parentheses. As the figure shows, it is really difficult to classify some of the images. For example, we were unable to correctly classify the images in the first row. Also, the images in the second row have similarities to the misclassified labels, such as nose wrinkle in disgust, or raised eyebrows in surprise. It should be mentioned that classifying complex facial expressions as discrete emotions, especially in the wild, can be very difficult and even there was only 63.7% agreement between two human annotators. 5. Conclusion Facial expression recognition in a wild setting is really challenging. Current databases with in wild setting are also either very small or have low resolution without facial landmark points necessary for pre-processing. The Internet is a vast resource of images and it is estimated that over 430 million photos are uploaded on only social network servers every day. Most of these images contain faces, that are captured in uncontrolled settings, illuminations, pose, etc. In fact it is Word Wild Web of facial images and it can be a great resource for capturing millions of samples with differ- Happy (Fear) Angry (Sad) Neutral (Angry) Neutral (Surprise) Figure 4. Samples of miss-classified images. Their corresponding ground-truth is given in parentheses. ent subjects, ages, and ethnicity. Two neural network architectures were trained in three training scenarios. It is shown that, training on only welllabeled data has higher overall accuracy than training on the mixture of noisy and well-labeled data, even with the noise estimation method. The noise estimation can increase the accuracy in sadness, surprise, fear and disgust expressions, as there were limited samples in well-labeled data. But still training on only well-labeled data has a higher overall accuracy. The reason is that as annotations of web images showed, most of the facial images queried from the web have less than 50% hit-rates and even for some emotions such as disgust and fear, the majority of the results portrayed other emotions or neutral faces. The whole database, query terms, annotated images subset, and their facial landmark points will be publicly available for the research community. 6. Acknowledgment This work is partially supported by the NSF grants IIS1111568 and CNS-1427872. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Tesla K40 GPU used for this research. References [1] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. FeiFei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. 3 [2] A. Dhall, R. Goecke, J. Joshi, M. Wagner, and T. Gedeon. Emotion recognition in the wild challenge 2013. In Pro- [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] ceedings of the 15th ACM on International conference on multimodal interaction, pages 509–516. ACM, 2013. 2 A. Dhall, R. Goecke, S. Lucey, and T. Gedeon. Static facial expression analysis in tough conditions: Data, evaluation protocol and benchmark. In Computer Vision Workshops (ICCV Workshops), 2011 IEEE International Conference on, pages 2106–2112. IEEE, 2011. 1, 3 M. Drange. Why is this canadian hacker better than facebook at detecting gun photos? http: //www.forbes.com/sites/mattdrange/ 2016/03/31/facebook-guns-beet_ farmer-image-recognition/#23db8f4478ed, 2016. 1 T. Gehrig and H. K. Ekenel. Why is facial expression analysis in the wild challenging? In Proceedings of the 2013 on Emotion recognition in the wild challenge and workshop, pages 9–16. ACM, 2013. 3 I. J. Goodfellow, D. Erhan, P. L. Carrier, A. Courville, M. Mirza, B. Hamner, W. Cukierski, Y. Tang, D. Thaler, D.-H. Lee, et al. Challenges in representation learning: A report on three machine learning contests. Neural Networks, 64:59–63, 2015. 2, 3 J. F. Grafsgaard, J. B. Wiggins, K. E. Boyer, E. N. Wiebe, and J. C. Lester. Automatically recognizing facial expression: Predicting engagement and frustration. In EDM, pages 43– 50, 2013. 1 T. Gritti, C. Shan, V. Jeanne, and R. Braspenning. Local features based facial expression recognition with face registration errors. In Automatic Face & Gesture Recognition, 2008. FG’08. 8th IEEE International Conference on, pages 1–8. IEEE, 2008. 2 R. Gross, I. Matthews, J. Cohn, T. Kanade, and S. Baker. Multi-pie. Image and Vision Computing, 28(5):807–813, 2010. 1, 3 Instagram. Press page. https://www.instagram. com/press/?hl=en, 2016. 1 S. E. Kahou, C. Pal, X. Bouthillier, P. Froumenty, Ç. Gülçehre, R. Memisevic, P. Vincent, A. Courville, Y. Bengio, R. C. Ferrari, et al. Combining modality specific deep neural networks for emotion recognition in video. In Proceedings of the 15th ACM on International conference on multimodal interaction, pages 543–550. ACM, 2013. 3 H. Kobayashi and F. Hara. Facial interaction between animated 3d face robot and human beings. In Systems, Man, and Cybernetics, 1997. Computational Cybernetics and Simulation., 1997 IEEE International Conference on, volume 4, pages 3732–3737. IEEE, 1997. 2 A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. 3, 5 C. Liu and H. Wechsler. Gabor feature based classification using the enhanced fisher linear discriminant model for face recognition. Image processing, IEEE Transactions on, 11(4):467–476, 2002. 2 M. Liu, S. Li, S. Shan, and X. Chen. Au-aware deep networks for facial expression recognition. In Automatic [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] Face and Gesture Recognition (FG), 2013 10th IEEE International Conference and Workshops on, pages 1–6. IEEE, 2013. 3 M. Lyons, S. Akamatsu, M. Kamachi, and J. Gyoba. Coding facial expressions with gabor wavelets. In Automatic Face and Gesture Recognition, 1998. Proceedings. Third IEEE International Conference on, pages 200–205. IEEE, 1998. 1 S. M. Mavadati, M. H. Mahoor, K. Bartlett, P. Trinh, and J. F. Cohn. Disfa: A spontaneous facial action intensity database. Affective Computing, IEEE Transactions on, 4(2):151–160, 2013. 1, 2 D. McDuff, R. Kaliouby, T. Senechal, M. Amr, J. Cohn, and R. Picard. Affectiva-mit facial expression dataset (am-fed): Naturalistic and spontaneous facial expressions collected. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 881–888, 2013. 1 M. Mohammadi, E. Fatemizadeh, and M. H. Mahoor. Pcabased dictionary building for accurate facial expression recognition via sparse representation. Journal of Visual Communication and Image Representation, 25(5):1082– 1092, 2014. 2 M. R. Mohammadi, E. Fatemizadeh, and M. H. Mahoor. Intensity estimation of spontaneous facial action units based on their sparsity properties. 2015. 2 A. Mollahosseini, D. Chan, and M. H. Mahoor. Going deeper in facial expression recognition using deep neural networks. IEEE Winter Conference on Applications of Computer Vision (WACV), 2016. 3, 5 A. Mollahosseini, G. Graitzer, E. Borts, S. Conyers, R. M. Voyles, R. Cole, and M. H. Mahoor. Expressionbot: An emotive lifelike robotic face for face-to-face communication. In Humanoid Robots (Humanoids), 2014 14th IEEE-RAS International Conference on, pages 1098–1103. IEEE, 2014. 2 A. Mollahosseini and M. H. Mahoor. Bidirectional warping of active appearance model. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2013 IEEE Conference on, pages 875–880. IEEE, 2013. 4 M. Oquab, L. Bottou, I. Laptev, and J. Sivic. Learning and transferring mid-level image representations using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1717–1724, 2014. 3 M. Pantic, M. Valstar, R. Rademaker, and L. Maat. Webbased database for facial expression analysis. In Multimedia and Expo, 2005. ICME 2005. IEEE International Conference on, pages 5–pp. IEEE, 2005. 1 S. Ren, X. Cao, Y. Wei, and J. Sun. Face alignment at 3000 fps via regressing local binary features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1685–1692, 2014. 4 E. Rentzeperis, A. Stergiou, A. Pnevmatikakis, and L. Polymenakos. Impact of face registration errors on recognition. In Artificial Intelligence Applications and Innovations, pages 187–194. Springer, 2006. 2 C. Sagonas, E. Antonakos, G. Tzimiropoulos, S. Zafeiriou, and M. Pantic. 300 faces in-the-wild challenge: Database and results. Image and Vision Computing, 2015. 4 [29] C. Sagonas, G. Tzimiropoulos, S. Zafeiriou, and M. Pantic. 300 faces in-the-wild challenge: The first facial landmark localization challenge. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 397–403, 2013. 4 [30] C. Sagonas, G. Tzimiropoulos, S. Zafeiriou, and M. Pantic. A semi-automatic methodology for facial landmark annotation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 896–903, 2013. 4 [31] C. Shan, S. Gong, and P. W. McOwan. Facial expression recognition based on local binary patterns: A comprehensive study. Image and Vision Computing, 27(6):803–816, 2009. 2 [32] S. Sukhbaatar and R. Fergus. Learning from noisy labels with deep neural networks. arXiv preprint arXiv:1406.2080, 2(3):4, 2014. 3 [33] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. 3 [34] Y. Taigman, M. Yang, M. Ranzato, and L. Wolf. Deepface: Closing the gap to human-level performance in face verification. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 1701–1708. IEEE, 2014. 3 [35] Y. Tang. Deep learning using linear support vector machines. arXiv preprint arXiv:1306.0239, 2013. 3 [36] A. Toshev and C. Szegedy. Deeppose: Human pose estimation via deep neural networks. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 1653–1660. IEEE, 2014. 3 [37] J. Weston, F. Ratle, H. Mobahi, and R. Collobert. Deep learning via semi-supervised embedding. In Neural Networks: Tricks of the Trade, pages 639–655. Springer, 2012. 3 [38] T. Xiao, T. Xia, Y. Yang, C. Huang, and X. Wang. Learning from massive noisy labeled data for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2691–2699, 2015. 2, 3, 5 [39] L. Yu. face-alignment-in-3000fps. https://github. com/yulequan/face-alignment-in-3000fps, 2016. 4 [40] Z. Yu and C. Zhang. Image based static facial expression recognition with multiple deep network learning. In Proceedings of the 2015 ACM on International Conference on Multimodal Interaction, pages 435–442. ACM, 2015. 3 [41] X. Zhang, M. H. Mahoor, and S. M. Mavadati. Facial expression recognition using {l} {p}-norm mkl multiclass-svm. Machine Vision and Applications, pages 1–17, 2015. 2 [42] X. Zhang, A. Mollahosseini, B. Kargar, H. Amir, E. Boucher, R. M. Voyles, R. Nielsen, and M. Mahoor. ebear: An expressive bear-like robot. In Robot and Human Interactive Communication, 2014 RO-MAN: The 23rd IEEE International Symposium on, pages 969–974. IEEE, 2014. 2 [43] W. Zhen and Y. Zilu. Facial expression recognition based on local phase quantization and sparse representation. In Natural Computation (ICNC), 2012 Eighth International Conference on, pages 222–225. IEEE, 2012. 2 [44] Y. Zong, W. Zheng, X. Huang, K. Yan, J. Yan, and T. Zhang. Emotion recognition in the wild via sparse transductive transfer linear discriminant analysis. Journal on Multimodal User Interfaces, pages 1–10, 2016. 3
9cs.NE
COMBINATORIAL NULLSTELLENSATZ APPROACH TO POLYNOMIAL EXPANDING arXiv:1309.3935v1 [math.CO] 16 Sep 2013 FEDOR PETROV Let F be a field and f (x, y) ∈ F[x, y] be a polynomial of two variables. For non-empty sets A, B ⊂ F denote f (A, B) = {f (x, y) : x ∈ A, y ∈ B}. There are numerous works concerning estimates of |f (A, B)| in terms of |A| and |B| for various polynomials f . Probably, the first result in this area is Cauchy-Davenport theorem, stating that for f (x, y) = x + y and F = Fp for prime p one has |f (A, B)| ≥ min(|A| + |B| − 1, p). Combinatorial Nullstellensatz of Alon [1] is one of most flexible ways to prove CauchyDavenport theorem. In particular, it easily generalizes to restricted sumsets estimates like Erdos-Heilbronn conjecture (unlike purely combinatorial methods). There are many asymptotical results for other polynomial f . Say, Bourgain [2] proved that for f (x, y) = x2 + xy, given α ∈ (0, 1) there exists β > α such that ford F = Fp (here p is large enough prime), and |A|, |B| ≥ pα one has |f (A, B)| ≥ pβ . This phenomenon (the estimate is asymptotically much better then in Cauchy-Davenport case) is called polynomial expanding. It is intimately connected to sum-products estimates and was intensively studied in recent papers, some of which are mentioned in the bibliography. The main methods are spectral graph theory and Fourier analysis. Tao in recent paper [4] uses also some algebraic geometry. The aim of this paper is to give a proof of some weak (of Cauchy-Davenport type) estimate for the Bourgain-type expanders g(x) + yh(x). The possible advantage of this result is that estimates are very explicit (without implicit asymptotical constants) and say something for all fields. Our proof is in spirit of Combinatorial Nullstellensatz. However, we do not use it as a blackbox, but involve the proof. Theorem. Let F be a field, g(x), h(x) be polynomials in F[x], A and B be non-empty finite subsets of a F, |A| = a, |B| = b. Assume also that d = deg g(x) > deg h(x) and A does not contain  roots of h(x). Assume further that k ≤ (a − 1)/d + b − 1 and binomial coefficient k does not vanish in F. Then b−1 |{g(x) + yh(x) : x ∈ A, y ∈ B}| > k. The theorem immediately yields the following The work is supported by RFBR grants 11-01-00677-a, 13-01-00935-a, 13-01-12422-ofi-m and President of Russia grant MK-6133.2013.1. 1 2 FEDOR PETROV Corollary. Let p = char F (and p = ∞ if char F = 0). Then |{g(x) + yh(x) : x ∈ A, y ∈ B}| ≥ min(a/d + b − 1, p). In particular, for Bourgain’s expander we get |{x2 +xy : x ∈ A, y ∈ B}| ≥ min(a/2+b−1, p) provided that 0 ∈ / A. Proof of the theorem. Assume the contrary. Then there exists a set C of cardinality k so that g(x) + yh(x) ∈ C for all x ∈ A, y ∈ B. Clearly k ≥ b (just fix x and vary y). Denote Y X P (x, y) := (g(x) + yh(x) − c) = λi,j g(x)i h(x)j y j i,j c∈C for some pairs (i, j) of non-negative integers and some coefficients λi,j in F. Such a polynomial P (x, y) vanishes on A × B. Consider some F-valued functions α(x), β(y) defined on A and B respectively. Look at the following sum, which eventually vanishes X X X (1) α(x)β(y)P (x, y) = λi,j α(x)β(y)g(x)ih(x)j y j = i,j x∈A,y∈B x∈A,y∈B X i,j λi,j X α(x)g(x)i h(x)j x∈A ! X y∈B β(y)y j ! . Our goal is to choose functions α, β so that there exists unique non-zero term in the last expression in (1). Let’s choose β so that ( X 0 if 0 ≤ j ≤ b − 2 β(y)y j = 1 if j = b − 1. y∈B Such β does exist, since the Vandermonde determinant for the set B does not vanish. Then all terms in (1) with j < b − 1 do vanish. If j ≥ b − 1, then we may expand d(k−b+1) i j g(x) h(x) = h(x) b−1 X ηi,j (ν)xν . ν=0 Let’s choose α so that X ( 0 if 0 ≤ i < d(k − b + 1) α(x)h(x)b−1 xi = 1 if i = d(k − b + 1). x∈A Since d(k − b + 1) ≤ a − 1, this is a (part of) Vandermonde system again (for unknowns α(x) · h(x)b−1 ), and therefore has a solution. For this choice of α all summands X α(x)h(x)b−1 ηi,j (ν)xν x∈A corresponding to fixed i, j and fixed ν < d(k − b + 1) vanish. Now note that η( i, j)(d(k − b + 1)) = 0 unless j = b − 1, i = k − b + 1 (here we use that deg h(x) < d). And if j = b − 1, COMBINATORIAL NULLSTELLENSATZ APPROACH TO POLYNOMIAL EXPANDING 3 i = k − b + 1, we have ηk−b+1,b−1 (d(k − b + 1)) =  k M k−b+1 , b−1  where M is leading coefficient of the polynomial g(x). So, by our assumption this expression does not vansih in F. After all, we indeed have unique non vanishing term in (1), as desired.  Remark. Let F be a field of pn elements for prime p, B be any subfield of, say, pm elements, and A = B \ {0}. Then f (A, B) = B for any polynomial f and we get no nontrivial bound. But already for |B| = b = pm + 1 and |A| = a ≥ C · pm , 0 < C < 1, for, say, f (x, y) = x2 + xy, we get an estimate |f (A, B)| ≥ (1 + C/2)pm − 1, since corresponding binomial coefficient is not divisible by p. It would be interesting to have structured version of this result, i.e. to prove that if |f (A, B)| is close to |B|, then B is close to a subfield. Also, the constant 1 + C/2 does not look to be sharp and probably the correct constant is 1 + C. I am grateful to Ilya Shkredov for pending my attention on this question and many fruitful discussions. References [1] N. Alon. Combinatorial Nullstellensatz. Combin. Probab. Comput. 8 (1999), 7–29. [2] J. Bourgain. More on the sum-product phenomenon in prime fields and its applications. Int. J. Number Theory 1 (2005), no. 1, 1–32. [3] D. Hart, L. Li and C.-Y. Shen. Fourier analysis and expanding phenomena in finite fields. Proc. Amer. Math. Soc. 141 (2013), 461–473 [4] T. Tao. Expanding polynomials over finite fields of large characteristic, and a regularity lemma for definable sets. arXiv:1211.2894 [5] V. H. Vu. Sum-product estimates via directed expanders. Math. Res. Lett. 15(2) (2008), 375–388. [6] I. D. Shkredov. On monochromatic solutions of some nonlinear equations in Z/pZ. Math. Notes, 88 (2010), no. 3-4, 603–611. E-mail address: [email protected] St. Petersburg Department of V. A. Steklov Institute of Mathematics RAS, St. Petersburg State University, Yaroslavl State Univeristy.
0math.AC
UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES arXiv:1607.00052v2 [math.GR] 4 Jul 2016 ADITI KAR AND MICHAH SAGEEV Abstract. In this paper we start the inquiry into proving uniform exponential growth in the context of groups acting on CAT(0) cube complexes. We address free group actions on CAT(0) square complexes and prove the more general statement that if F is a finite collection of hyperbolic automorphisms of a CAT(0) square complex X, then either there exists a pair of elements in a, b ∈ F and a pair words of length at most 7 in a and b which freely generate a free semigroup, or there exists a flat (of dimension 1 or 2) in X stabilized by all elements of √ F . As a corollary, we obtain a lower bound for the growth constant, 7 2, which is uniform not just for a given group acting freely on a given CAT(0) cube complex, but for all non virtually abelian groups acting freely on any CAT(0) square complex. 1. Introduction Given a group G and a finite generating set S, we let C(G, S) denote the Cayley graph of G relative to S. The length of an element g ∈ G with respect to the word metric relative to S is denoted |g|S and we let B(S, n) denote the ball of radius n in C(G, S). The exponential growth rate of G relative to S is defined to be the following limit (which always exists): ω(G, S) = lim |B(S, n)|1/n . n→∞ The exponential growth rate of G is then given by ω(G) = inf{ω(G, S)| finite generating sets S}. The group G is said to have exponential growth if ω(G, S) > 1 for some and therefore for all finite generating sets S. Moreover, G is said to have uniform exponential growth if ω(G) > 1. See de la Harpe [8] for details. Gromov asked if every group of exponential growth is also of uniform exponential growth. The first example of a group with exponential growth which is not of uniform exponential growth was constructed by Wilson [14]. Wilson’s group and future counterexamples were finitely generated. Whether Gromov’s question has an affirmative answer for finitely presented groups remains open. Uniform exponential growth is known to hold for groups with virtually free quotients, hyperbolic groups, soluble groups, linear groups in characteristic zero and groups acting on trees in the sense of Bass Serre theory (see [8] and 1 2 ADITI KAR AND MICHAH SAGEEV references therein). Uniform exponential growth is typically established by constructing free semigroups [1]. Lemma. Let G be a group. Suppose there exists a constant C > 0 such that for any finite generating set S of G, one can find two elements u, v ∈ G with max{|u|S√, |v|S } < C and u and v freely generate a free semigroup. Then ω(G) ≥ C 2 This method and variations of it often allows one to establish “uniform uniform exponential growth”. Mangahas [11] proved that finitely generated subgroups of the mapping class group M od(S) of a surface S which are not virtually abelian have uniform exponential growth with minimal growth rate bounded below by a constant depending only, and necessarily, on S. Breuillard [2, Main Theorem] established a different sort of uniformity for linear groups: for every d ∈ N there is N (d) ∈ N such that if K is any field and F a finite symmetric subset of GLd (K) containing 1, either F N (d) contains two elements which freely generate a nonabelian free group, or the group generated by F is virtually solvable. We refer the reader to [5] for further examples. In this paper we start the inquiry into proving uniform exponential growth in the context of groups acting on CAT(0) cube complexes. We address free group actions on CAT(0) square complexes. We do this by proving a more general statement about groups generated by hyperbolic elements. Theorem 1. Let F be a finite collection of hyperbolic automorphisms of a CAT(0) square complex. Then either (1) there exists a pair of elements in a, b ∈ F and a pair words of length at most 7 in a and b which freely generate a free semigroup, or (2) there exists a flat (of dimension 1 or 2) in X stabilized by all elements of F . As a corollary, we obtain a "uniform uniform" type result, which says that there is a uniform lower bound for growth, not just for a given group, but for all groups acting freely on any CAT(0) square complex. Corollary 2. Let G be a finitely generated group acting freely on a CAT(0) √ 7 square complex. Then either w(G) ≥ 2 or G is virtually abelian. A new class of examples to which the results of this paper apply are the simple groups constructed by Burger and Moses acting on a product of two trees [4]. We expect that a similar result will hold for all dimensions, in that for a finitely generated group G acting freely on a CAT(0) cube complex of dimension n, G will be virtually abelian or w(G) ≥ w0 > 1 where, w0 will depend only on the dimension n, and not on the group or the complex. 2. Hyperplanes and group elements We review some relevant basic facts regarding hyperplanes and halfspaces. See, for example, [6] or [12] for more details. We let X be a CAT(0) cube UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 3 complex. We use h, k to denote halfspaces, ĥ, k̂ to denote the corresponding hyperplanes and h ∗ , k ∗ to denote the complementary halfspaces. We let Aut(X) denote the collection of cubical, inversion-free automorphisms of X. (An inversion is an isometry of X that preserves a hyperplane and inverts the corresponding halfspaces). If G is an action on X which contains inversions, then we may subdivide X so that there are no inversions. In a CAT(0) cube complex of dimension n, any collection of n + 1 hyperplanes contains a disjoint pair. In particular, in the case of a 2-dimensional complex, if g ∈ Aut(X) and ĥ is a hyperplane, then the triple {ĥ, g ĥ, g 2 ĥ} contains a pair that is either disjoint or equal. Thus, either g 2 ĥ = ĥ, or one of the pair {ĥ, g ĥ}, {ĥ, g 2 ĥ} is a disjoint pair. Given a hyperplane ĥ in X and g ∈ Aut(X) a hyperbolic isometry of X, we say that g skewers ĥ if for some choice of halfspace h associated to ĥ, we have g 2 h ⊂ h. This property is equivalent to saying that any axis for g intersects ĥ in a single point. We say that a hyperbolic isometry g ∈ Aut(X) is parallel to ĥ if any axis for g is a bounded distance from ĥ. We say that a hyperbolic isometry is peripheral to ĥ if it neither skewers ĥ nor is parallel to ĥ. In this case, we have that any axis lies in a halfspace h bounded by the hyperplane ĥ and is not contained in any neighborhood of ĥ. It follows that either gh ∗ ⊂ h or g 2 h ∗ ⊂ h. Definition 3. Given a hyperbolic isometry g ∈ Aut(X), we define the skewer set of g, denoted sk(g), as the collection of all hyperplanes skewered by g. We define a disjoint skewer set for g as a collection of disjoint hyperplanes in sk(g) which is invariant under g 2 . Note that if g is parallel to a hyperplane ĥ, then any hyperplane in sk(g) intersects ĥ. Since there are no intersecting triples of hyperplanes in X, this means that no two hyperplanes in sk(g) intersect. Furthermore, any two translates of ĥ under < g > are parallel to g and hence cross every hyperplane in sk(g). Again, by the two dimensionality of X, this means that the two translates of ĥ under < g > are disjoint. We record this observation, since we will make use of it. Observation 4. If g is parallel to ĥ, then all the hyperplanes in sk(g) are disjoint and two distinct hyperplanes in the orbit of ĥ under < g > are disjoint. Lemma 5. Let g be a hyperbolic automorphism of X, then sk(g) is a union of finitely many disjoint skewer sets. Proof. Consider ĥ ∈ sk(g). If g ĥ ∩ ĥ = ∅, we let P1 = {g n (ĥ)|n ∈ Z}. Otherwise, since X is 2-dimensional, we have g 2 ĥ ∩ ĥ = ∅. We then set P1 = {g 2n (ĥ)|n ∈ Z} and P2 = {g 2n+1 ĥ|n ∈ Z}. Thus P1 and P2 break up the orbit of ĥ under < g > into two disjoint skewer sets. Since there are 4 ADITI KAR AND MICHAH SAGEEV finitely many orbits of hyperplanes in sk(g) under the action of < g >, this breaks up sk(g) into finitely many disjoint skewer sets.  Example 6. Let X denote the Euclidean plane, squared in the usual way by unit squares. Let g be an integer translation in the vertical direction. Then the skewer set of g is the collection of horizontal hyperplanes and the number of disjoint skewer sets depends on the translation length of g. Example 7. Again, let X denote the Euclidean plane. Let g be a glide reflection along the diagonal axis: g(x, y) = (y + 1, x + 1). Then the skewer set of g is a union of four disjoint skewer sets, each invariant under g 2 . 3. The parallel subset of an element Given a hyperbolic g ∈ Aut(X), we describe combinatorially a certain invariant subcomplex associated to g which consists of all the lines parallel to axes in G. (This subcomplex is discussed as well in [10] and is slightly different than the minimal set of G, as described in [3] or [9].) We consider the following partition of hyperplanes Ĥ of X. Let Ĥk (g) = {ĥ|ĥ intersects every hyperplane in sk(g)} ĤP (g) = Ĥ − (sk(g) ∪ Ĥk (g)) Since the elements of ĤP (g) are peripheral to g, it follows that for each hyperplane ĥ ∈ ĤP (g), there exists a well-defined halfspace h containing all the axes of g. Recall that the collection of cubes intersecting a hyperplane ĥ has a product structure ĥ × [0, 1]. We let N (ĥ) = ĥ × (0, 1). For a halfspace h we let R(h) = h − N (ĥ). We define Yg = \ R(h) `g ∈h and ĥ∈ĤP (g) The subspace Yg is a < g >-invariant convex subcomplex of X, and as Yg contains the axes of g, it is non-empty. The hyperplanes intersecting Yg are the hyperplanes of sk(g) and Ĥk (g). Since sk(g) and Ĥk (g) are transverse collections of hyperplanes, we obtain (by [6]) that Yg admits a product structure Yg ∼ = Eg ×Tg , where Eg is defined by the hyperplanes sk(g) and Tg is defined by the hyperplanes in Ĥk (g). Note that sk(g) does not contain any disjoint facing triples of hyperplanes. As g does not skewer any hyperplane in Ĥk (g), g fixes a vertex in Tg . Since Yg is 2-dimensional, there are two possibilities: (1) Eg = R and Tg is isomorphic to a tree. (2) Eg is 2-dimensional and Tg is a point. UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 5 We call Yg the parallel set of g and Eg its Euclidean factor. We need a further understanding of Eg in order to conclude that groups that stabilize it have nice properties. Lemma 8. Let Eg be the Euclidean factor of Yg . Then either Eg is a Euclidean plane or Eg contains an Aut(Eg )-invariant line. Proof. Note that < g > acts on Eg with finitely many orbits of hyperplanes. Consider one such hyperplane ĥ. Note that by the fact that Eg does not contain facing triples of hyperplanes, it follows that ĥ is a tree with vertices of valence 1 or 2. From this it follows that the hyperplanes in Eg are either lines, rays or closed intervals. Suppose some hyperplane ĥ ∈ Eg is a line. Then we have a disjoint skewer set K̂ = {g 2n ĥ|n ∈ Z} for g. Since there are no facing triples, we have that all hyperplanes between hyperplanes in K̂ are also lines. (See Figure 1.) line hyperplanes facing triple Figure 1. A facing triple of hyperlanes in Eg if there are some line hyperplanes, but not all are line hyperplanes. Thus, we may assume none of the hyperplanes are lines. It follows that all hyperplanes are either rays or closed intervals. If there exists a hyperplane in Eg which is a closed interval, then by similar considerations as above, we may conclude that all hyperplanes are closed intervals. Since < g > acts cocompactly on Eg , it follows all lines in Eg are parallel and the space of such lines is a compact interval I. Since the action of Aut(Eg ) on I has a fixed point, it then follows that there is an Aut(Eg )-invariant line. Finally, we consider the case in which all hyperplanes are rays. In this case, Eg is a "staircase", as in Figure 2. The space of lines which coarsely contains the endpoints of the hyperplanes is itself a ray R which is Aut(Eg )-invariant, hence there is an Aut(Eg ) fixed point in R and hence an Aut(Eg )-invariant line in Eg .  6 ADITI KAR AND MICHAH SAGEEV Figure 2. The case in which all hyperplanes in Eg are rays. The endpoints of the rays are invariant, and hence any line in Eg a bounded distance from all endpoints is Aut(Eg )invariant 4. The ping-pong lemma and hyperplane patterns that yield free semigroups We will use the following version of the Ping Pong Lemma (see, for example, [7]) Lemma 9 (Semigroup Ping Pong). Suppose that a group G is acting on a set X and U, V are disjoint subsets of X. The elements a, b ∈ G\{1} satisfy • a(U ∪ V ) ⊂ U • b(U ∪ V ) ⊂ V Then a and b freely generate a free subsemigroup in G. Proof. Let Σ be the semigroup generated by a and b in G. Observe that for any g, h ∈ Σ ⊂ G, ag = ah or bg = bh in Σ if and only if g = h in Σ. Therefore, it is enough to check that two words of the form ag and bh cannot be equal in Σ. But, ag(U ∪ V ) ⊂ U and bh(U ∪ V ) ⊂ V . Since, U ∩ V = ∅, ag 6= bh.  4.1. On groups acting on trees. To warm up, and to record a few observations we use later on, we first explore what happens for a pair of hyperbolic isometries acting on a tree. We include the proofs here because we will need these type of arguments. However, this is not new. See, for example, [1]. Let T be a simplicial tree. Recall if an element g of Aut(T ) is hyperbolic then there is a unique geodesic `g (called the axis of g) which is invariant under g on which g induces a translation. Proposition 10. If a and b are two hyperbolic automorphisms of a tree T , then one of the following occurs: UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 7 • a, b share the same axis, • a±1 and b±1 freely generate a free semigroup. Proof. Suppose that `a 6= `b . First assume that `a ∩ `b contains an edge e = [p, q]. (See Figure 3.) Choose e so that q is a point of bifurcation of `a and `b . Let Tq be the component of T − interior(e) containing q. After possibly replacing a by a−1 and/or b by b−1 , we see that ae ⊂ Tq and be ⊂ Tq . Set U = aTq and V = bTq . Then U, V satisfy the hypothesis of Lemma 9. We will generalize this argument in our context, la U ae p e q Tq be V lb Figure 3. The hyperbolic isometries a and b have non-equal, but overlapping axes. lb Tq q p Tp aTq 2 a Tq la Figure 4. The hyperbolic isometries a and b have disjoint axes. In the case that `a ∩ `b = ∅, we make a different argument, which we will also generalize. (See Figure 4.) Consider an edge e = [p, q] situated along the 8 ADITI KAR AND MICHAH SAGEEV geodesic arc joining `a and `b . Let Tp be the component of T − interior(e) containing p and Tq be the component of T − interior(e) containing q. Suppose (without of generality) S loss S thatn `a ⊂ Tp and `b ⊂ Tq . Then letn ting U = n>0 a Tq and V = n>0 b Tp , we see that a(U ∪ V ) ⊂ U and b(U ∪ V ) ⊂ V , as required. In fact, in this case, we can argue that a and b generate a free group by adjusting U and V to include all non-zero powers of a and b, but we will not need this fact. Note that there is a singular case in which `a and `b intersect in a single point. In this case, we simply use the intersecting vertex to separate T into two subtrees, each containing a different axis, and proceed in the same manner.  4.2. Back to CAT(0) cube complexes. The following two Lemmas work in any dimension and so in this section, we let X be an n-dimensional CAT(0) cube complex. Lemma 11. Let g1 , g2 ∈ Aut(X) and suppose that there exists a halfspace h of X such that gi h ⊂ h and g1 h ⊂ g2 h ∗ . Then g1 , g2 generate a free semigroup. Proof. This argument resembles the first case in the proof of Proposition 10. Set U = g1 h and set V = g2 h and apply Lemma 9  We call the triple {h, g1 h, g2 h} a ping pong triple for g1 and g2 . Lemma 12. Let ĥ be a hyperplane of X. Suppose that there exist two hyperbolic elements g1 , g2 ∈ Aut(X) such that • there exists an axis l1 for g1 such that l1 ⊂ h • there exists an axis l2 for g2 such that l2 ⊂ h ∗ • both g1 and g2 are peripheral with respect to ĥ. Then there exist 1 , 2 ∈ {1, . . . , n} such that g11 and g22 freely generate a free semigroup. Proof. This argument resembles the second case of the proof of Proposition 10. As both g1 and g2 are peripheral with respect to ĥ, there exist 1 , 2 ∈ {1, . . . , n} such that g11 ĥ ∩ ĥ = ∅ and g22 ĥ ∩ ĥ = ∅. Moreover, g11 h ∗ ⊂ h and g22 h ⊂ h ∗ . Set S1 = [ n>0 g1n1 h ∗ , S2 = [ g2n2 h n>0 The sets S1 , S2 do not intersect one another. As S1 ⊂ h, we see that g2n2 S1 ⊂ S2 . Similarly, we have g1n1 S2 ⊂ S1 . We now apply the Ping Pong Lemma stated earlier to deduce that g11 and g22 freely generate a free subsemigroup in G.  UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 9 We remark here that using a well-known group theoretic version of the Ping Pong Lemma, one can in fact show that g11 and g22 freely generate a free subgroup in G. 5. Main argument Now, let X be a CAT(0) square complex. Lemma 13 (All or nothing). Let a and b be hyperbolic isometries of X and let P be a disjoint skewer set for a. Suppose that no pair of words of length at most 6 in a and b generate a free semigroup, then either b skewers every hyperplane in P or b does not skewer any hyperplane in P . Proof. Recall that for any ĥ in sk(a), there exists an associated halfspace h such that a2 h ⊂ h. If b skewers some element in P , but not all, we may also choose h such that h is skewered by b but a2 h is not skewered by b. After replacing b possibly by b−1 , we may assume that b2 h ⊂ h. Note that b and hence b2 is peripheral to a2 ĥ. Now by the 2-dimensionality of X, either b2 a2 ĥ ∩ a2 ĥ = ∅ or b4 a2 ĥ ∩ a2 ĥ = ∅. We further have that b2 a2 h ⊂ b2 h ⊂ h and b4 a2 h ⊂ b4 h ⊂ h. We thus have that either {h, a2 h, b2 a2 h} or {h, a2 h, b4 a2 h} is a ping pong triple of halfspaces for the pairs a2 , b2 a2 or a2 , b4 a2 . In either case, we obtain words of length at most 6 freely generating a free semigroup, a contradiction. lb h ah bah 2 2 2 la Figure 5. The element b skewering h but not ah.  Proposition 14 (Not skewering means parallel). Let a and b be hyperbolic isometries of X and let P be a disjoint skewer set for a. Let `b be an axis for b. Suppose that b does not skewer any element of P and that no pair of words of length no more than 7 freely generate a free semigroup. Then (1) the axis `b is parallel to every hyperplane ĥ ∈ P . (2) bP ∈ sk(a) (3) b2 stabilizes every hyperplane in P . 10 ADITI KAR AND MICHAH SAGEEV Proof. By assumption, there exists h ∈ P such that a2 h ⊂ h and P = {a2k ĥ|k ∈ Z}. We set c = a2 . Since b does not skewer any hyperplane in P , we may assume that `b ⊂ h ∩ ch ∗ . (We are using here that the action is without inversions, so that if `b ⊂ ĥ for some hyperplane, there is a parallel axis for b on either side of ĥ.) We will now use our assumptions to remove the possibility that b is peripheral to ĥ or cĥ. First, suppose b is peripheral to both ĥ and cĥ. In this case, we note that bc = c−1 bc is an element whose axis lies in h ∗ and is peripheral to ĥ. We can then apply Lemma 12 to conclude that for some 1 , 2 ∈ {1, 2}, the elements b1 and (c−1 bc)2 generate a free semigroup. These are words of length at most 7 in a and b. Let us now assume that b is parallel to ĥ but peripheral to cĥ. It follows from Observation 4 that for any i ∈ Z, bi ĥ = ĥ or bi ĥ ∩ ĥ = ∅. First let us consider the case that b2 ĥ = ĥ. Note that since we are assuming that Aut(X) acts with no inversions, we have that b2 h = h. Now since b is peripheral to cĥ, for k = 1 or 2, we have that b2k cĥ ∩ cĥ = ∅. We thus obtain a ping pong triple of halfspaces {h, ch, b2k ch} for the elements c and b2k c. From Lemma 11 we see that c and b2k c freely generate a free semigroup, a contradiction since these are words of length at most 6 in a and b. (See Figure 6.) 2k b ch h ch lb Figure 6. If b stabilizes h, we obtain a ping-pong triple of hyperplanes. We may thus assume that bĥ ∩ ĥ = ∅ and b2 ĥ ∩ ĥ = ∅. Only one of bĥ, b2 ĥ can separate ĥ and cĥ, for otherwise we would have bh ⊂ b2 h or b2 h ⊂ h. So for some  = 1 or 2, we can assume that b ĥ does not separate ĥ and cĥ. Note also that since cĥ is peripheral to b, one cannot have bĥ ⊂ ch. UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 11 If cĥ ∩b ĥ = ∅, then we obtain a ping-pong triple of halfspace {ch ∗ , h ∗ , b h ∗ } for the words c−1 and b c−1 . Since these are words of length at most 4 in a and b, we have a contradiction. (See Figure 7.) ε h bh ch lb Figure 7. If cĥ ∩ b ĥ = ∅ and b ĥ does not separate ĥ and cĥ, we obtain a ping pong triple Thus we assume that b ĥ ∩ cĥ 6= ∅ and refer to Figure 8. Since, by Observation 4, any hyperplane in sk(b) intersects bĥ, and we are assuming that bĥ ∩ cĥ 6= ∅, the 2-dimensionality of X implies that any hyperplane in sk(b) is disjoint from cĥ. Moreover, by Observation 4, we have that for any hyperplane k̂ in sk(b), bk ⊂ k for some choice of halfspace k associated to k̂ . We may further choose k such that ch ⊂ k ∩ bk ∗ . Applying c−1 , we see that h ⊂ c−1 k ∩ c−1 bk ∗ . Applying b , we now see that b c−1 k̂ ⊂ b h ∗ ⊂ h. Thus we have a ping pong triple of half spaces {c−1 bk ∗ , c−1 k ∗ , b c−1 k ∗ } for the elements c−1 b−1 c and b c−1 b−1 c. So by Lemma 9 we have that c−1 b−1 c and b c−1 b−1 c generate a free semigroup and these are words of length at most 7. We may thus assume that b is parallel to both ĥ and cĥ. Assume, that d(`b , ĥ) ≤ d(`b , cĥ). (There is no loss of generality here, for if d(`b , cĥ) ≤ d(`b , ĥ), we will reverse the roles of ĥ and cĥ in the following argument.) As before, we first consider what happens if ĥ is not stabilized by b2 . Here we obtain ĥ, bĥ and b2 ĥ are disjoint. We cannot have that bĥ = cĥ or b2 ĥ = cĥ, for then we would obtain c−1 bĥ or c−1 b2 ĥ is an inversion of ĥ. Thus, we have that bĥ ⊂ ch ∗ and b2 ĥ ⊂ ch ∗ . We now proceed as in the case in which cĥ is peripheral to b to produce a ping pong triple of halfspaces {ch ∗ , h ∗ , b h ∗ } for the words c−1 and b c−1 . (The configuration is the same as in Figure 7 except that here cĥ is parallel to `b .) So assume b2 ĥ = ĥ. Again, as above, if b2 did not also stabilize cĥ, we would obtain a small ping pong triple. Thus b2 stabilized cĥ as well. Since b2 stabilizes cĥ (and the action is inversion-free), we have an axis for b2 in 12 ADITI KAR AND MICHAH SAGEEV c-1bk -1 ch ε bh h bk ch -1 k ck lb Figure 8. If cĥ ∩ b ĥ 6= ∅, we obtain a ping pong triple. ch ∩ c2 h ∗ . We can now carry out all the above arguments replacing ĥ and cĥ with cĥ and c2 ĥ to conclude that b2 stabilizes c2 ĥ. Proceeding in this way we see that b is parallel to every hyperplane of P and that b2 P = P . We are left to show that bP ⊂ sk(a). By Lemma 13, we have that a skewers every hyperplane in bP or none of the hyperplanes in bP . In the former case, we get bP ⊂ sk(a) as required. So suppose that a does not skewer any hyperplane in bP . Since `b ⊂ h ∩ch ∗ , we have either bh ∗ ⊂ h ∩ch ∗ or bch ⊂ h ∩ ch ∗ , depending on which of ĥ or cĥ is closer to `b . In either case, we then get a small ping pong triple, a contradicition.  If a and b are elements such that there exists a disjoint skewer set P for a as in Proposition 14, then we say that b is subparallel to a. Corollary 15. Given hyperbolic isometries a and b that such that no words of length at most 7 generate a free semigroup, b is subparallel to a if and only if sk(a) − sk(b) 6= ∅. Proof. If b is subparallel to a, then by definition, there exists a disjoint skewer set for a such that b is parallel to all the hyperlanes in P . Thus P ⊂ sk(a) − sk(b). Conversely, if there exists ĥ ∈ sk(a) − sk(b), then by Lemma 13, the entire disjoint parallel set P for a containing ĥ is not skewered by b. Then by Proposition 14, b is subparallel to a.  From this corollary, we see that there are three possibilities for two hyperbolic elements a and b so that words of length at most 7 do not freely generate a free semigroup. I sk(a) = sk(b) II b is subparallel to a and a is subparallel to b III b is subparallel to a and a is not subparallel to b (or the same with the roles of a and b reversed) UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 13 We claim that in each of these cases, we can find an invariant line or flat for < a, b >. Proposition 16. Let a and b be hyperbolic isometries such that no words in a and b of length at most 7 freely generate a free semigroup, then there exists a Euclidean subcomplex of X invariant under < a, b >. Proof. We analyze the three cases above. Suppose we are in Case I, so that sk(a) = sk(b). Then we consider Y = Ya = Yb = E × T . If T is trivial (i.e a single point), then we have that both a and b leave E invariant, as required. Otherwise we have that Y = R × T , where a and b both act by vertical translation. We consider the action of a and b on T . Both a and b have nonempty fixed point sets, which we denote Fa and Fb . If Fa ∩ Fb 6= ∅, then choosing p ∈ Fa ∩ Fb we have that both a and b stabilize the line R × {p} ⊂ R × T . So suppose that Fa ∩Fb = ∅. As in [13], we have that ab is hyperbolic in its action on T , stabilizing a line ` which intersects both Fa and Fb . We claim that a stabilizes `. For otherwise, consider the line a`. This is stabilized by the element u = a(ab)a−1 . If a` 6= `, then we obtain that (ab)±1 and u±1 freely generate a free semigroup by Proposition 10 , contradicting our assumption. Similarly, we see that b stabilizes ` as well. Thus < a, b > stabilizes the flat R × ` ⊂ R × T , as required. We now consider Case II, so that a and b are subparallel to one another. Note that since an axis for a is parallel to a hyperplane (in sk(b)), then all the hyperplanes in sk(a) are disjoint. Similarly all the hyperplanes in sk(b) are disjoint. Note also every hyperplane in sk(a) crosses every hyperplane in sk(b), so that they determine a flat E = Ya ∩Yb . Moreover since b is parallel to one of the hyperplanes in sk(a), it is parallel or peripheral to all hyperplanes in sk(a). But then by Proposition 14, we have that for all disjoint parallel sets P ∈ sk(a), we have bP ⊂ sk(a). Thus bsk(a) ⊂ sk(a). By the same argument, we obtain b−1 sk(a) ⊂ sk(a), so that b(sk(a)) = sk(a). Similarly, we have that a(sk(b)) = sk(b). We thus have that < a, b > stabilizes the flat E. Finally, we consider Case III. In this case there exists a disjoint skewer set P for a, so that b is parallel to P . However, since a is not subparallel to b, a also skewers every element in sk(b). Since the hyperplanes in sk(b) all intersect the hyperplanes in P , we have that sk(a) has crossing hyperplanes. It follows that the parallel set Ya for a is of the form Ya = E × {point}. It is also easy to see that b stabilizes E, so that < a, b > stabilizes E.  We are now ready to prove Theorem 1, which we restate here for convenience. Theorem. Let F be a finite collection of hyperbolic automorphisms of a CAT(0) square complex. Then either (1) there exists a pair of elements in a, b ∈ F and a pair words of length at most 7 in a and b which freely generate a free semigroup, or 14 ADITI KAR AND MICHAH SAGEEV (2) there exists a flat (of dimension 1 or 2) in X stabilized by all elements of F . Proof. Consider S = {s1 , s2 , . . . , sn }. Each of the pairs {si , sj } satisfy one of the cases I, II, or III, above. If there exists a pair of type III, without loss of generality, assume that is the pair {s1 , s2 }, with s2 subparallel to s1 and s1 not subparallel to s2 . In this case, the parallel set Ys1 = E × {point}. In this case, for every other si , we have that the pair s1 , si is either of type I or III. In either case, we obtain that si stabilizes E and we are done. So we suppose that no pair {si , sj } is of type III. Suppose, that there exists a pair, say {s1 , s2 }, which is of type II. Let E be the flat in X on which < s1 , s2 > acts. For any other si , we have that the pairs {s1 , si } and {s2 , si } is of type I or II. It cannot be that both pairs are of type I since sk(s1 ) ∩ sk(s2 ) = ∅. Also, it cannot be that si is subparallel to both s1 and s2 , for otherwise `si would be parallel to hyperplanes in sk(s1 ) and in sk(s2 ), but every hyperplane in sk(s1 ) crosses every hyperplane in sk(s2 ) in a single point. Thus a line cannot be parallel to a hyperplane in sk(s1 ) and a hyperplane in sk(s2 ). It follows that, without loss of generality, si is subparallel to s1 and sk(si ) = sk(s2 ). It then follows that si stabilizes E. Finally, suppose that all the pairs si , sj are of type I. Thus sk(si ) = sk(sj ) for all i, j. Thus G stabilizes Y = E × T = Esi × Tsi . If E contains squares, then T is trivial and si stabilizes E as required. So suppose that Y = R × T , and each si acts “vertically”. That is, si acts by translation along R and has a fixed point in T . We now examine the action of G on T . Let Fi denote the fixed set of ai . If for each pair i, j, Fi ∩ Fj 6= ∅, then by a standard result, Xn = ∩ni=1 Fi 6= ∅. Choose a vertex pn ∈ Xn . Then Hn =< s1 , . . . , sn > acts on `n = R × pn by translations. Thus Hn stabilizes a flat in X. So suppose that there exists a pair, say F1 and F2 , such that F1 ∩ F2 = ∅. In this case, as in the proof of Proposition 16, there exist a line ` ⊂ T on which < s1 , s2 > acts as a dihedral group. As in the proof of Proposition 16, we also obtain that for every i, si stabilizes `. Thus G stabilizes `, and therefore the flat R × `, as required.  Corollary 2 now follows from the Main Theorem since when the action of a group is free, stabilizing a flat impies the group is virtually abelian, by the Bieberbach Theorem. References [1] Roger C. Alperin and Guennadi A. Noskov, Uniform growth, actions on trees and GL2, in Computational and statistical group theory (Las Vegas, NV/Hoboken, NJ, 2001), volume 298 of Contemp. Math, (2002). [2] Emmanuel Breuillard, A Strong Tits Alternative, Preprint, arXiv:0804.1395, (2008). [3] Martin R. Bridson, On the semisimplicity of polyhedral isometries, Proc. Amer. Math. Soc., 127 (7), 2143–2146 (1999). UNIFORM EXPONENTIAL GROWTH FOR CAT(0) SQUARE COMPLEXES 15 [4] Marc Burger and Shahar Mozes, Lattices in product of trees, Inst. Hautes Études Sci. Publ. Math., 92, 151–194, (2000). [5] Jack Button, Non proper HNN extensions and uniform uniform exponential growth, Preprint, arXiv:0909.2841 (2009). [6] Pierre-Emmanuel Caprace and Michah Sageev, Rank Rigidity for Cat(0) Cube Complexes, Geometric And Functional Analysis, 21 (4) 851-891, (2011). [7] Pierre de la Harpe, Geometric Group Theory, Chicago Lectures in Mathematics (2000). [8] Pierre de la Harpe, Uniform Growth in Groups of Exponential Growth, Geom. Ded., 95,1-17, (2002). [9] Talia Fernos, Max Forester, and Jing Tao, Effective quasimorphisms on right-angled Artin groups, Preprint arxiv.org/abs/1602.05637, (2016). [10] Jingyin Huang, Kasia Jankiewicz and Piotr Przytycki, Cocompactly cubulated 2dimensional Artin groups, Preprint arXiv:1510.08493, (2015). [11] Johanna Mangahas, Uniform uniform exponential growth of subgroups of the mapping class group, Geom. Funct. Anal., 19(5), 1468–1480, (2010). [12] Michah Sageev, CAT(0) cube complexes and groups, Geometric Group Theory, IAS/Park City Math. Series 21, 7-53 (2014). [13] J.-P. Serre, Arbres, amalgames, SL2 , Astérisque, 46 (1977). [14] John S. Wilson, On exponential growth and uniformly exponential growth for groups, Invent. Math., 155 (2), 287–303 (2004).
4math.GR
arXiv:1803.08495v1 [cs.CV] 22 Mar 2018 1 Text2Shape: Generating Shapes from Natural Language by Learning Joint Embeddings Kevin Chen1 Christopher B. Choy1 Manolis Savva2 Angel X. Chang2 Thomas Funkhouser2 Silvio Savarese1 1 2 Stanford University Princeton University http://text2shape.stanford.edu/ Abstract. We present a method for generating colored 3D shapes from natural language. To this end, we first learn joint embeddings of freeform text descriptions and colored 3D shapes. Our model combines and extends learning by association and metric learning approaches to learn implicit cross-modal connections, and produces a joint representation that captures the many-to-many relations between language and physical properties of 3D shapes such as color and shape. To evaluate our approach, we collect a large dataset of natural language descriptions for physical 3D objects in the ShapeNet dataset. With this learned joint embedding we demonstrate text-to-shape retrieval that outperforms baseline approaches. Using our embeddings with a novel conditional Wasserstein GAN framework, we generate colored 3D shapes from text. Our method is the first to connect natural language text with realistic 3D objects exhibiting rich variations in color, texture, and shape detail. Keywords: 3D reconstruction, generative adversarial networks, textto-shape retrieval, text-to-shape generation Introduction Language allows people to communicate thoughts, feelings, and ideas. Research in artificial intelligence has long sought to mimic this component of human cognition. One such goal is to bridge the natural language and visual modalities. Imagine describing a “round glass coffee table with four wooden legs”, and having a matching colored 3D shape be retrieved or generated. We refer to these tasks as i) text-to-shape retrieval and ii) text-to-shape generation. Systems with such capabilities have many applications in computational design, fabrication, augmented reality, and education. For example, text-to-shape retrieval systems can be useful for querying 3D shape databases (TurboSquid, 3D Warehouse, Yobi3D, etc.) without reliance on human annotation of individual shapes. Likewise, text-to-shape generation can facilitate 3D design. Currently, 3D model designers rely on expensive modeling software (e.g., Maya, 3DS Max, Blender) with steep learning curves, and tedious, time-consuming manual design. A text-to-shape generation system can initialize shapes with basic attributes defined using natural language descriptions. Such a technology can save time and money, and allow inexperienced users to design their own shapes for fabrication. 2 a) 3D shapes and natural language descriptions Circular glass coffee table with two sets of wooden legs that clasp over the round glass edge. 1 - 2 Wooden half round table. Wooden recliner chair with patterned fabric. b) Joint embedding of text and 3D shapes Learning by association Metric learning 3b 3 A brown wooden moon shaped 2a table with three decorative legs with a wooden vine shaped decoration base connecting the legs. Dark brown wooden chair with adjustable back rest and gold printed upholestry. 3 1 2b 3 3a 1 1 2 2a 3b 2 1 1 2b 3b 2a 2b It s a dark brown, upholstered chair with arms and a curved rectangular back c2) Text-to-shape generation Combined multimodal association model brown wooden 3a c1) Text-to-shape retrieval 3a 1 1 2b 3 2 2a 3a 3b A dark brown wooden dining chair with red padded seat and round red pad back Fig. 1: By leveraging a new dataset of paired natural language descriptions and colored 3D shapes (a), our method extends learning by association and metric learning to jointly learn a text and 3D shape embedding that clusters similar shapes and descriptions, establishing implicit semantic connections (dashed lines) (b). We apply our learned embedding to two tasks: text-to-shape retrieval (c1), where 3D shapes matching a description are retrieved from a dataset, and the challenging new task of text-to-shape generation (c2), where a novel shape is generated from text. To achieve this goal, we need a system that understands natural language and 3D shapes. One way to connect language with shapes is to use a joint embedding space for text and shapes. While there has been prior work on text to image embedding [1,2,3,4,5] and image to shape embedding [6], there has been no prior work on text to 3D shape embedding to the best of our knowledge. Moreover, prior approaches in learning text-image representations rely on finegrained, category-level class or attribute labels [4,7,8,9]. Such annotations are not only expensive, but also ill-defined: should we classify objects by color, material, or style? Ideally, we would like to learn a joint embedding of text and 3D shapes directly from natural language descriptions, without relying on finegrained category or attribute annotations. However, connecting natural language to 3D shapes is challenging because there is no simple one-to-one mapping between text and 3D shapes (e.g., both “round table” and “circular table” can describe similar real objects). Given a shape there are many ways to describe it, and given a natural language description there are many possible shapes that match the description. In this paper, we first present a method for learning a joint text and shape representation space directly from natural language descriptions of 3D shape instances, followed by our text-to-shape generation framework. Unlike related work in text-to-image synthesis [4,10,8], we do not rely on fine-grained categorylevel class labels or pre-training on large datasets. Furthermore, we train the text and shape encoding components jointly in an end-to-end fashion, associating similar points in our data both within a modality (text-to-text or shape-to-shape) and between the two modalities (text-to-shape). To do this, we take inspiration from recent work on learning by association [11] to establish implicit cross-modal links between similar descriptions and shape instances, and combine this with a metric learning scheme [12] which strengthens links between similar instances in each modality (see Fig. 1(b)). Our 3 approach leverages only instance-level correspondences between a text description and a 3D shape to cluster similar descriptions, and induces an attributebased clustering of similar 3D shapes. Thus, we obviate the need for expensive fine-grained category or attribute annotations. We apply our method to text-to-shape retrieval and text-to-shape generation (see Fig. 1(c)). The retrieval task allows us to evaluate the quality of our jointly learned text-shape embedding against baselines from prior work. The text-toshape generation task is a challenging new task that we propose. We focus on colored shape generation because most descriptions of shapes involve color or material properties. To address this task, we combine our joint embedding model with a novel conditional Wasserstein GAN framework, providing greater output quality and diversity compared to a conditional GAN formulation. Lastly, we use vector embedding arithmetic and our generator to manipulate shape attributes. For realistic and challenging evaluation, we collect 75K natural language descriptions for 15K chair and table shapes in the ShapeNet [13] dataset. To facilitate controlled evaluation, we also introduce a dataset of procedurally generated colored primitives (spheres, pyramids, boxes, etc.) with synthetic text captions. Our experimental results on these datasets show that our model outperforms the baselines by a large margin for both the retrieval and generation tasks. In summary, our contributions are as follows: – We propose an end-to-end instance-level association learning framework for cross-modal associations (text and 3D shapes). – We demonstrate that our joint embedding of text and 3D shapes can be used for text-to-shape retrieval, outperforming baseline methods. – We introduce the task of text to colored shape generation and address it with our learned joint embeddings and a novel Conditional Wasserstein GAN. – We create two new datasets of 3D shape color voxelizations and corresponding text: i) ShapeNet objects with natural language descriptions, and ii) procedurally generated geometric primitives with synthetic text descriptions. 2 Related Work We review work in related areas such as multimodal representation learning, text-to-image synthesis, and 3D shape generation. Learning representations for visual descriptions. Reed et al. [4] learn text embeddings which capture visual information. This work was the basis for several text-to-image synthesis works [8,9,10]. While this method [4] was applied to the text-to-image problem [8,9,10], it utilizes pre-training on large image datasets. More importantly, it relies on fine-grained category-level labels for each image (e.g. bird species), which are expensive to collect and not always well-defined (e.g., should 3D chairs be classified by color, material, or style?). In contrast, we do not rely on fine-grained category or attribute labels and use no pre-training. Learning multimodal representations. Ngiam et al. [14] present a stacked multimodal autoencoder to learn joint audio and video representations. Srivas- 4 tava and Salakhutdinov [15] train a deep Boltzmann machine to model images and text tags. Sohn et al. [16] introduce a generative model of multimodal data by hallucinating the missing data modality and minimizing the variation of information. Another class of methods learns joint representations using Canonical Correlation Analysis (CCA) [17], with many extensions [18,1,3], including deep CCA [19]. However, Ma et al. [20] point out that this does not scale well to large amounts of data, such as our text and 3D shapes dataset. More recent work in text-image joint embeddings [2,21] focuses on other aspects such as decoding distributed representations and using unsupervised learning on unlabeled data. Metric learning. Metric learning using deep neural networks has gained significant attention in recent years. Common methods include using a contrastive loss [22], triplet loss [23,24], or N-pair loss [25]. We extend the method of Song et al. [12] in our joint representation learning approach. Since our problem is learning a joint metric space across different modalities, our framework is similar in spirit to prior cross-modal metric learning formulations [26,5,27] in that we compute distances both within modality (text-text) and across modalities (text-shape). However, we use a smoothed, triplet-based similarity loss. Generative models and generative adversarial networks (GANs). Generative models are particularly relevant to our text-to-shape generation task. Recent works have shown the capability of neural networks to understand semantics [28] and generate realistic images [29,30]. Reed et al. [10] explored the challenging problem of text to image synthesis using GANs. They separately train a text embedding [4], and then use GANs to generate images. More recent work has improved text-to-image generation [31,8,9]. StackGAN [8], for example, focuses on an orthogonal aspect of the problem and can in fact be combined with our approach.Unlike these works, we do not use fine-grained labels, making our method more scalable. 3D voxel generation. Common approaches for 3D voxel generation using deep learning rely on losses such as voxel-wise cross entropy [32,33,34,35]. GANs have also been used to generate 3D shape voxelizations from noise or shape inputs [36,37,38]. Our framework builds upon 3D GANs but performs colored voxel generation from freeform text and uses a Wasserstein GAN formulation [39]. Tulsiani et al. [40] explored the related task of image to colored voxel generation, but to our knowledge we are the first to address text to colored voxel generation. 3 Datasets We address the problem of learning joint representations for freeform text descriptions and 3D shapes (CAD models). To train and evaluate methods on this task, we introduce two new datasets: a dataset of human-designed 3D CAD objects from ShapeNet [13], augmented with natural language descriptions, and a controlled, procedurally generated dataset of 3D geometric primitives (Fig. 2). Data representation. Our datasets consist of text description – 3D shape voxel 3 grid pairs (x, s) where x is the textual description of a shape s ∈ [0, 1]v ·c . Here, x is an arbitrary length vector of word indices where each word index corresponds 5 A large red A large short sphere wide green box The blue cone is large tall A cushioned chair which is grey in color. The legs are small. A rectangular wooden coffee table with an iron base White square table with four legs that curve out from the base Fig. 2: Our proposed 3D voxel – text datasets. Left: Procedurally generated primitives dataset with associated generated text descriptions. Right: Voxelizations of ShapeNet 3D CAD models with natural language descriptions. to a word in the vocabulary, v is the maximum number of voxels along any single dimension, and c is the number of channels per voxel (4 for RGB + occupancy). ShapeNet objects and natural language descriptions. To create a realistic dataset with real 3D objects and natural language descriptions, we use the ShapeNet [13] table and chair object categories (with 8,447 and 6,591 instances, respectively). These 3D shapes were created by human designers to accurately represent real objects. We choose the table and chair categories because they contain many instances with fine-grained attribute variations in geometry, color and material. We augment this shape dataset with 75,344 natural language descriptions (5 descriptions on average per shape) provided by people on the Amazon Mechanical Turk crowdsourcing platform (see Fig. 1(a)). We then produce color voxelizations of the CAD 3D meshes using a hybrid view-based and surface sampling method, followed by downsampling with a low-pass filter in voxel space. The process for collecting natural language descriptions, the algorithm for producing color voxelizations, and the overall dataset construction are described in more detail in Appendix B. This large-scale dataset provides many challenging natural language descriptions paired with realistic 3D shapes. Primitive shapes. To enable systematic quantitative evaluation of our model, we create a dataset of 3D geometric primitives with corresponding text descriptions. This data is generated by voxelizing 6 types of primitives (cuboids, ellipsoids, cylinders, cones, pyramids, and tori) in 14 color variations and 9 size variations. The color and size variations are subjected to random perturbations generating 10 samples from each of 756 possible primitive configurations, thus creating 7560 voxelized shapes. We then create corresponding text descriptions with a template-based approach that fills in attribute words for shape, size, and color in several orderings to produce sentences such as “a large red cylinder is narrow and tall” (see Appendix B for more details). In total, we generate 192,602 descriptions, for an average of about 255 descriptions per primitive configuration. Such synthetic text does not match natural language but it does allow for an easy benchmark with a clear mapping to the attributes of each primitive shape. 4 Joint Text–3D Shape Representation Learning Fig. 1(b) shows an illustration of the components of our approach, with explicit text-shape links in solid lines and implicit similarity links in dashed lines. We 6 “a tall brown table” “a gray, cushioned chair” Text Encoder “a brown table with four legs” !" !# !$ Shape Encoder (a) ℒ '(' !" !# !$ %" %# %$ !" !# !$ %" %# %$ '' Within modality ℒ)* !" !# !$ '( Cross modality ℒ)* ℒ ('( !" %" !# Same class Diff. class %" %# %$ (b) (c) Fig. 3: Overview of our joint representation learning approach. We use text and shape encoders to compute embeddings (a). Instances of each modality make round trips back to similar instances of the same modality, establishing cross-modal associations (b). Metric learning similarities are computed within and across modalities, with embeddings belonging to the same class being pushed together and embeddings in different classes being pushed apart (c). would like our joint embedding to: i) cluster similar text together and similar shapes together, ii) keep text descriptions close to their associated shape instance, and iii) separate text from shapes that are not similar. To address i), we generalize the learning by association approach [11] to handle multiple modalities (Sec. 4.1) and to use instance-level associations between a description and a shape (Sec. 4.2). By using text-shape-text round trips we establish implicit connections between separate text and shape instances that are semantically similar (e.g. “round table” pulling shapes 1 and 2 together in Fig. 1). To enforce properties ii) and iii) in the embedding space, we jointly optimize an association learning objective with metric learning (Sec. 4.3). Our combined multimodal association model anchors text to associated shape instances while allowing latent similarities between different shapes and text to emerge. 4.1 Learning Cross-Modal Associations We generalize the same-modal data association approach of Haeusser et al. [11] to learn cross-modal text-to-shape associations (see Fig. 3). Suppose we are given a batch of n shapes and m descriptions, with potentially multiple descriptions per shape. As shown in Fig. 3(a), each shape and each text description is passed through a shape or text encoder, producing shape embeddings S and text embeddings T , with each row representing an individual shape or text embedding. To compute the embeddings, we used a CNN + RNN (GRU) structure similar to Reed et al. [10] for the text encoder, and a 3D-CNN for the shape encoder. We define the text-shape similarity matrix Mij = Ti · Sj where Ti and Sj are the ith and jth rows of the corresponding matrices. To convert this into the probability of description i associating with shape j (as opposed to another shape M P in S), we pass these through a softmax layer: PijT S = e ij/ j0 eMij0 . Similarly, we can compute the probability of associating shape i to description j by replacing M with M > . The round-trip probability for associating description i with certain 7 shapes and then associating those shapes with description j in T is then: PijT ST = (P T S P ST )ij . We abbreviate this text-shape-text round trip as TST (see Fig. 3(b) dashed box). For a given description i, our goal is to have PijT ST be uniform over the descriptions j which are similar to description i. Thus, we define the roundtrip loss LTRST as the cross-entropy between the distribution P T ST and the target uniform distribution. To associate text descriptions with all possible matching shapes, we also impose aPloss on the probability of associating each shape with any description: TS Pjvisit = i Pij /m. We maximize the entropy on this distribution P H , using an entropy loss LTHST computed from the cross entropy between the Pjvisit and the uniform distribution over the shapes. Thus, our cross-modal association loss is: LT ST = LTRST + λLTHST 4.2 (1) Instance-Level Associations The approach described in Sec. 4.1 relies on fine-grained category-level classification labels for each text description (e.g. a label for all brown chairs and a different label for all blue chairs). These fine-grained annotations are expensive to obtain and are not necessarily well-defined for 3D shapes from ShapeNet [13] where descriptions can contain multiple colors or materials. Thus, we extend the above approach to work without such fine-grained category-level annotations, making the method more scalable and practical. We assume each shape belongs to its own instance-level class containing its corresponding descriptions. These instance-level labels are appropriate for the association learning approach (Sec. 4.1) since it does not explicitly separate descriptions and shapes not labeled to correspond to each other. Thus, our crossmodal association learning is more relaxed than previous approaches [4,26,5] that use direct supervision over the cross-modal relationships, allowing us to learn cross-modal associations between descriptions and shapes that were not labeled to correspond with each other (e.g. two similar chairs, each with its own text descriptions). Moreover, we extend the association learning approach with additional round trips as shown in Fig. 3(b). Our experiments show this greatly improves the performance of our model for the multimodal problem. In addition to enforcing a loss over the text-shape-text (TST) round trip, we impose a shape-text-shape (STS) loss LST S which takes a form similar to Eq. (1). This ensures that the shapes are associated with all of the text descriptions and provides additional supervision, which is beneficial when our dataset has only instance-level labels. 4.3 Multimodal Metric Learning To facilitate learning cross-modal associations, we impose metric learning losses. This serves as a bootstrapping method which improves the cross-modal associations significantly compared to using either association learning [41] or metric learning [12] (ML) alone. 8 As in Sec. 4.1, we define similarity between embeddings with the dot product. Given a triplet (xi , xj , xk ) of text description embeddings in which (xi , xj ) belong to the same instance class (positive pair) and (xi , xk ) belong to different instance classes (negative pair), our metric learning constraint is: F (xi ; θ) · F (xj ; θ) > F (xi ; θ) · F (xk ; θ) + α, where F maps to the metric space and α is the margin. We use a variation of metric learning that uses a soft max to approximate hard negative mining [12] and combine it with the similarity constraint above in our text-to-text loss: LTMTL = X 1 2 [log (Vi + Vj ) − mi,j ]+ 2|P| (2) (i,j)∈P P where mi,j denotes the similarity between xi and xj , and Vl = k∈Nl exp{α + ml,k }. Here, Nl is a negative set, defined as the set of indices that belong to an instance class other than the class l is in, and P is a positive set in which both indices i and j belong to the same instance class. The above approach can cluster similar text descriptions together and separate dissimilar text descriptions. To extend this for cross-modal similarities, we define cross-modal constraints with anchors from each modality (see Fig. 3(c)): F (xi ; θ) · F (yj ; θ) > F (xi ; θ) · F (yk ; θ) + α, where x represents text embeddings and y represents shape embeddings. The corresponding text-to-shape loss LTMSL can be derived similarly to Eq. (2). 4.4 Full Multimodal Loss We combine the association losses with the metric learning losses to form the final loss function used to train the text and shape encoders: Ltotal = LT ST + LST S + γ(LTMTL + LTMSL ) (3) Note that the embeddings are not restricted to have unit norm, since this can make optimization difficult [25]. To avoid degeneracy, we use a variation of the approach used by Sohn et al. [25] and regularize the L2 norm of the embedding vectors only when they exceed a certain threshold. 5 Generating Colored 3D Shapes from Text We apply our joint representation learning approach to text-to-shape generation using generative adversarial networks. The model is comprised of three main components: the text encoder, the generator, and the critic. The text encoder maps the text into latent representations. The latent vectors are concatenated with a noise vector and then passed to the generator, which constructs the output shapes. Lastly, the critic determines both how realistic the generated outputs look and how closely they match with the corresponding text descriptions. Details for the architecture are in Appendix A. 9 GANs are ideal for text-to-shape generation because they encourage the model to generate outputs with the correct properties while avoiding the use of per-voxel constraints. This is crucial because the same description should be able to generate different shapes which all capture the specified attributes. Penalizing the model for generating shapes which capture the correct attributes but do not match a specific model instance would be incorrect. Thus, the conditional GAN plays a key role in our text-to-shape framework. Our formulation is based on the Wasserstein GAN [39,42] which improves output diversity while avoiding mode collapse issues with traditional GANs. To our knowledge, we present the first conditional Wasserstein GAN. Rather than using the traditional conditional GAN [43] approach, we sample batches of matching and mismatching text descriptions and shapes, in line with Reed et al. [10]. In particular, we sample matching text-shape pairs, mismatching textshape pairs, and text for the generator from the marginal distribution pT . The critic evaluates not only how realistic the shapes look but also how well they correspond to the descriptions. Thus, our objective is the following: LCWGAN =Et∼pT [D(t, G(t))] + E(t̃,s̃)∼pmis [D(t̃, s̃)] − 2E(t̂,ŝ)∼pmat [D(t̂, ŝ)] + λGP LGP LGP =E(t̄,s̄)∼pGP [(k∇t̄ D(t̄, s̄)k2 − 1)2 + (k∇š D(t̄, s̄)k2 − 1)2 ] (4) (5) where D is the critic, G is the generator, and pmat and pmis are matching textshape and mismatching text-shape pairs, respectively. For enforcing the gradient penalty, rather than sampling along straight lines as in Guljarani et al. [42], we randomly choose samples (pGP ) from the real distribution pmat (with probability 0.5) or from the generated fake voxelizations. Note that t refers to text embeddings (Sec. 4) concatenated with randomly sampled noise vectors. 6 Experiments We evaluate our learned joint representation through retrieval and generation experiments. In Sec. 6.1 we quantitatively evaluate the representations on the primitives dataset for text-to-shape retrieval, and show qualitative results on the ShapeNet dataset. In Sec. 6.2 we compare our text-to-shape generation results with baselines. Lastly, we visualize different dimensions of the learned embeddings and show generation results using vector arithmetic in Sec. 6.3. We create train/val/test splits by random subsets of 80%/10%/10% for both the primitives and the ShapeNet objects datasets. We tokenize and lemmatize all input text using spaCy [44]. For all experiments described here, we present results on the test split. Our code, data, and pretrained models are published at http://text2shape.stanford.edu/. 6.1 Retrieval Task We evaluate on the text-to-shape retrieval task, where we are given a sentence and we retrieve the nearest shapes in the joint embedding space. Ideally, we 10 would like to see that the retrieved shapes closely correspond with the query sentence. Here, we show results for the text-to-shape retrieval task. Additional experiments for text-to-text, shape-to-shape, and shape-to-text retrieval are in Appendix C. Our goal in these experiments is to verify that our method produces reasonable embeddings that cluster semantically similar descriptions and shapes using only text-shape instance-level correspondences. The primitives dataset is constructed such that each shape-color-size configuration is a single class with text describing only that class and no others. This admits a quantitative retrieval evaluation where the goal is to retrieve descriptions and shapes belonging to the same configuration. For the ShapeNet dataset it is possible that a description could apply to multiple shapes (e.g. “brown chair”), but we only have ground truth association for one shape. Thus, we show quantitative results for the retrieval task on the primitives dataset (Table 1) and qualitative results for the ShapeNet dataset (Fig. 4). Quantitative and qualitative ShapeNet retrieval results comparing our method with baselines are included in Appendix C. Table 1: Text-to-shape retrieval evaluation on primitives dataset. Our approach significantly outperforms baselines from prior work. Metric RR@1 RR@5 NDCG@5 Random DS-SJE [4] LBA-TST [11] ML LBA-MM Full-TST Full-MM 0.24 0.76 0.27 81.77 90.70 81.29 5.06 15.29 5.92 25.93 57.24 25.00 91.13 98.27 91.90 94.24 97.55 95.20 95.07 99.08 95.51 A brown color rectangular wooden table with four design ... A gray colored chair that has a curved back seat with ... It s a glass table with metal legs Fig. 4: Text-to-shape retrieval. Each row shows the five nearest neighbors to the text in our learned embedding, which match in category, color, and shape. We compare our model with the deep symmetric structured joint embedding (DS-SJE) by Reed et al. [4] and the original formulation of learning by association [11] with only TST round trips (LBA-TST). We also decompose our full model into the following: association learning only with both round trips (LBAMM), metric learning (ML) only, combined LBA and ML with TST round trip only (Full-TST), and the full combined model (Full-MM). MM for “multimodal” denotes using both TST and STS losses. We measure retrieval performance using 11 normalized discounted cumulative gain (NDCG) [45], a commonly used information retrieval metric, and recall rate (RR@k) [12,46], which considers a retrieval successful if at least one sample in the top k retrievals is of the correct class. Table 1 shows that our full model achieves the best performance. We see that the DS-SJE method [4], which requires a pre-trained model, works well, as it directly optimizes for this objective. Our association learning–only approach with additional round trips (LBA-MM) performs significantly better, largely due to the simplistic nature of the primitives dataset. We found that for the ShapeNet dataset, the LBA-MM model struggled to learn a joint embedding space of text and shapes (see appendix for more details). Our full model (Full-MM) performs the best on both the primitives and ShapeNet dataset. Fig. 4 shows that the retrieved shapes generally match the query sentence. These examples show that our encoders cluster together similar descriptions and similar shapes despite the fact that retrieved neighbors come from different instances. 6.2 Text-to-Shape Generation Task Can our learned joint representation be used for shape synthesis? To answer this question, we apply our learned embedding to the novel task of text-to-shape generation. We compare our representation learning and Wasserstein GAN approach (CWGAN) with the GAN-INT-CLS text-to-image synthesis method [10], which uses DS-SJE [4] with the coarse chair/table labels for learning embeddings. We also compare with using our joint embeddings in conjunction with GAN-CLS (using the sampling method described in Sec. 5), which we abbreviate as CGAN since it is a variant of the conditional GAN [43]. We introduce the following metrics for quantitative evaluation of the generated shapes: – Occupancy: IoU. Mean intersection-over-union (IoU) between generated voxels and ground truth shape voxels, indicating the quality of the occupancy of the generated shapes, regardless of color. We threshold the outputs to be occupied if the probability is above 0.9. Models with similar shapes are more likely to have higher IoU than dissimilar models. – Realism: inception score. We train a chair/table shape classifier and compute the inception score [47] to quantify how realistic the outputs look. – Color: Earth Mover’s Distance (EMD). This metric measures how well generated colors match the ground truth. We downsample voxel colors in HSV space and compute the Earth Mover’s Distance between the ground truth and the generated hue/saturation distributions using L1 as the ground distance. Only occupied voxels are used for computing the color distributions. – Color/occupancy: classification accuracy. Accuracy of whether the generated shape class matches with the ground truth based on a shape classifier. Table 2 shows that the CGAN model trained with our embedding outperforms the GAN-INT-CLS on all metrics. The CWGAN model further improves on all metrics except class accuracy. Qualitatively, Fig. 5 shows that the GANINT-CLS text-to-image synthesis method [10] struggles to generate color and occupancy distributions which correspond with the text. This is largely attributed 12 to poor embeddings learned using coarse chair/table labels. Our CGAN achieves comparable conditioning and generation results without relying on additional class labels, but there are still significant structural and color artifacts. Lastly, our CWGAN generates the most realistic shapes with more natural color distributions and better conditioning on the text compared to the baselines. For example, we correctly generate a chair with red padding on the seat and backrest in Fig. 5 (first row). Likewise, the table in the 4th row has multiple layers as desired. However, there is room for improvement: the table is not fully supported by its legs, and the circular table (row 2) has erratic coloring. Table 2: Text-to-shape generation evaluation on ShapeNet dataset. Method IoU↑ Inception↑ EMD↓ Class Acc.↑ GAN-INT-CLS [10] 9.51 Ours (CGAN) 6.06 Ours (CWGAN) 9.64 1.95 1.95 1.96 Input Text 0.5039 0.4768 0.4443 GANINTCLS [10] Ours CGAN 95.57 97.48 97.37 Ours CWGAN GT Dark brown wooden dining chair with red padded seat and round red pad back. Circular table, I would expect to see couches surrounding this type of table. Waiting room chair leather legs and armrests are curved wood. A multi-layered end table made of cherry wood. There is a rectangular surface with curved ends, and a square storage surface underneath that is slightly smaller. Brown colored dining table. It has four legs made of wood. Fig. 5: Example text-to-shape generations. Our CWGAN approach is correctly conditioned by the input text, generating shapes that match the described attributes. The baseline approach struggles to generate plausible shapes. Additional results can be found in the supplementary material. Manipulating shape attributes with text. We demonstrate our method learns embeddings that connect natural language and 3D shape attributes. Fig. 6 shows how output tables and chairs change to reflect different attributes in the input descriptions. As we vary the description to say “white” instead of “wooden”, or 13 “rectangular” instead of “round”, the outputs change color and shape, respectively. Note that we do not enforce consistency between outputs; each result is independently generated. However, changing a single attribute often results in small changes to other attributes. White coffee table Wooden coffee table Rectangular glass coffee table Glass round coffee table Red round coffee table Red chair Dining chair Gray dining chair Silver leather chair Gray leather chair Fig. 6: Shape manipulation using text variations. The attributes of the generated shapes can be controlled using text. 6.3 Analysis of Learned Representation Activation visualization. We visualize the representations learned by our model to demonstrate that they capture shape attributes. Using the text and shape encoders, we compute embeddings for ShapeNet test set objects to show that individual dimensions in our representation correlate with semantic attributes such as category, color, and shape. Chairs Tables Chairs Tables White/Gray Brown Rectangular Round Red White/Gray Fig. 7: Visualizing learned representations. Each of the 4 examples above visualizes the activation for a specific dimension, with darker colors indicating higher values. Individual dimensions correlate with category (top-left: chair vs. table), shape (bottom-left: rectangular vs. round), and color (top-right: white vs. brown, bottom-right: red vs. white/gray). Fig. 7 shows a saturated bar in each row representing the activation in a given dimension of the text embedding for the shape above it. In the top-left 14 row, we see that one dimension is sensitive to the shape category (chair vs. table). In the subsequent rows, we see how other dimensions are sensitive to physical shape (rectangular vs. round tables) and color (white vs. brown vs. red). Further research in this direction to disentangle representations could enable generating shapes by composing attributes. brown table white table white brown gray table gray glass round rectangular chair table rectangular glass coffee table a round brown table a rectangular brown table white chair brown round table white round table glass table rectangular table round glass table brown chair brown table white table gray chair brown chair table white table brown chair Fig. 8: Vector arithmetic on joint text-shape embeddings. Our white embedchair white brown brown leather leather dings admit composition and transfer of attributes to control shape generation. chair white table chair chair Vector arithmetic. Mikolov et al. [48] demonstrated vector arithmetic on text embeddings (e.g., ‘King’ - ‘Man’ + ‘Woman’ ≈ ‘Queen’). Following this, work on GANs (such as Radford et al. [30]) evaluated their models by vector arithmetic to show a meaningful representation space was learned. We similarly show vector arithmetic results in Fig. 8. The generator interprets the manipulated embeddings to produce shapes with the desired properties. For example, “round” is expressed by subtracting a rectangular object from a round one, and adding it to an existing rectangular shape (of a different color) produces a round version of the shape. Moreover, we can also perform arithmetic on a mixture of shape and text embeddings. These results illustrate our learned representation encodes shape attributes in a structured manner. Our model implicitly connects descriptions and shapes based on semantic attributes despite no explicit labeling of attribute relations between shape instances. 7 Conclusion We presented a method for learning joint embeddings of text and 3D shapes, trained end-to-end using only instance-level natural language descriptions of 3D shapes. We showed that the learned embeddings enable retrieval between the text and shape modalities, outperforming approaches from prior work. We then combined our embedding with a conditional Wasserstein GAN formulation for the new task of text-to-shape generation. This is a challenging problem, and our approach is only a first step. To improve the quality of generated shapes we could use stronger priors to model real-world color distributions or leverage the bilateral symmetry common in physical objects. We hope that our work catalyzes more research in connecting natural language with realistic 3D objects exhibiting rich variations in color, texture, and shape detail. 15 Acknowledgments. This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. DGE 1147470. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. This work is supported by Google, Intel, and with the support of the Technical University of Munich– Institute for Advanced Study, funded by the German Excellence Initiative and the European Union Seventh Framework Programme under grant agreement no 291763. Appendix A Model Details In this section, we describe the details of our model architecture, its implementation, and training procedures. The architectures are outlined in Table 3. We plan to release our datasets and our code. Text encoder architecture. As stated in the main paper, we use a CNN RNN architecture. Each word is mapped to a random, trainable vector and passed to the CNN RNN, which has the structure outlined in Table 3. We use a GRU with 256 units. All layers except the last are followed by a ReLU operator and all weights have an L2 regularizer with weight 0.0005. Table 3: Model architectures. Layer Layer Text encoder conv1 conv2 conv3 conv4 GRU fc5 fc6 3 3 3 3 – – – 128 128 256 256 – 256 128 1 1 1 1 – – – N Y N Y – N N 2 2 2 – – Y Y Y – N Shape encoder conv1 conv2 conv3 avg pool4 fc5 Kernel Channels Stride BN Kernel Channels Stride BN 3 3 3 – – 64 128 256 – 128 Generator fc1 conv2 conv3 conv4 conv5 trans trans trans trans – 4 4 4 4 32768 512 256 128 4 – 1 2 2 2 Y Y Y Y N 2 2 2 2 2 – – – – N N N N N – – – – Critic conv1 conv2 conv3 conv4 conv5 concat fc6 fc7 fc8 4 4 4 4 2 – – – – 64 128 256 512 256 – 128 64 1 16 Shape encoder architecture. The shape encoder takes the form of a standard 3D-CNN, utilizing 3D convolutions. All layers except the last are followed by a ReLU. Shape generation architecture. For upsampling, we use fractionally-strided convolutions. All layers except the last are followed by a ReLU. The last layer is followed by a sigmoid activation function. For the critic, we use a leaky ReLU activation function with a leak rate of 0.2 in all layers except the last (which has a sigmoid activation for the nonWasserstein GAN implementations). The text embeddings are passed through two 256-dimension FC layers (with leaky ReLU activations and batch normalization) and concatenated with the conv5 output, represented as the concatenation (concat) layer in Table 3 (Critic). For the Wasserstein GAN critic, we do not use batch normalization. However, batch normalization is used in the non-Wasserstein GAN implementations. Text-conditional Wasserstein GAN. The text-to-shape generation model is illustrated in Fig. 9. As stated in the main paper, using the text encoder trained by our joint representation learning approach, the text is mapped to the latent space followed by concatenation with noise. The resulting vector is passed to the generator, which attempts to generate a plausible shape. This shape is then evaluated by the critic and the final loss is computed. “Dark brown wooden dining chair with red padded seat and round red pad back.” Text Encoder 𝑧 Generator Critic Fig. 9: Overview of our CWGAN framework. We use a text encoder, trained using our joint representation learning method, to compute the latent embeddings. This is concatenated with noise z ∼ U [−0.5, 0.5] and fed into the generator. The output of the generator is input into a critic, which evaluates the plausibility of the generation given also the text embedding. Lastly, the loss is backpropagated through the networks. Training details. For the joint representation learning, we use both learning by association and metric learning. For the association learning, we sample 100 unique shapes in each batch, and two matching captions per shape. We add a loss for when the embedding norm exceeds a threshold of 10. For training the GAN, we use a learning rate of 5 × 10−5 with a decay rate of 0.95 every 10000 steps. In the first 25 training iterations, we run 100 critic training steps for every generator step. Afterwards, we train the critic 5 steps 17 for every generator iteration. We use a gradient penalty coefficient of 10, similar to Guljarani et al. [42]. When training the GAN baselines, we used a procedure similar to Wu et al. [36] in that we only update the discriminator weights if the accuracy in the previous batch is below 80%. Note that we use the solid 32 resolution voxelizations described in Appendix B.2. B Dataset Details We represent a shape as a colored (RGB) 3D voxel grid. We use as training data, text description–3D voxel shape pairs (x, s). We create two such paired datasets to evaluate our method: a controlled, procedurally generated dataset of colored 3D geometric primitives, and a real 3D CAD object based on ShapeNet [13], augmented with natural language descriptions provided by people. Data representation. Each text description–3D shape voxel grid pair (x, s) is 3 composed of a textual description x and a shape s ∈ Rv ·c . Here, x is represented as an arbitrary length vector of word indices, where each word index corresponds to a particular word in the vocabulary, n denotes the number of words in the description, v is the number of voxels along the largest single dimension, and c is the number of channels of the voxel grid (equal to 4 for RGB voxels). Table 4: Dataset statistics. Primitives ShapeNet Shapes 7,560 Descriptions 191,850 Descriptions per shape 255 Total words 1.3M Ave words/description 6.7 Max words/description 8 Unique words 76 Vocabulary size 77 B.1 15,038 75,344 5 1.2M 16.3 96 8147 3,588 Primitive Shapes Dataset Primitive shape generation. We create a dataset of 3D geometric primitives with corresponding text descriptions (see Fig. 10). This data is generated by voxelizing 6 types of primitives (cuboids, ellipsoids, cylinders, cones, pyramids, and tori), in 14 color variations and 9 size variations. The color and size variations are subjected to random perturbations generating 10 samples from each of 756 possible primitive configurations, thus creating 7560 voxelized shapes. The perturbations were implemented by applying a uniformly sampled noise for the color of the shape in HSV space (%5 noise for hue, and 10% for saturation and value), and 15% noise for the height and radius scales of the shape. 18 1) A large red sphere. 2) The ball is large crimson. 3) The large spherical shape is scarlet. 1) A large short wide green 1) The blue cone is large box. tall. 2) The wide green box is 2) A large high navy cone. large squat. 3) A large blue tall conical 3) A large squat broad jade shape. rectangular shape. Fig. 10: Example colored 3D voxel primitives with three generated text descriptions each. Sentence templates for synthetic dataset. We then create corresponding text descriptions with a template-based approach that fills in attribute words for shape, size, and color in several orderings to produce sentences such as “a large red cylinder is narrow and tall”. We use 10 template patterns to generate these text variations. Two example templates are: “a ${largeness} ${tallness} ${wideness} ${color} ${shape}” and “the ${shape} is ${largeness} ${tallness} ${wideness} ${color}”. Each of the variables are filled in with the term that applies to the specific primitive configuration. In total, we generate 191,850 descriptions, for an average of about 255 descriptions per primitive configuration. Such synthetic text does not match natural language but it does allow for an easy benchmark with a clear mapping to the attributes of each primitive shape. Examples of generated primitives. See Fig. 10 for some examples of generated primitive voxelizations and their corresponding text descriptions. B.2 ShapeNetCore Descriptions and Voxelizations To create a more realistic dataset with real 3D objects and natural language descriptions, we use the ShapeNet [13] table and chair object categories (with 8,447 and 6,591 instances correspondingly). These 3D CAD models were created by human designers to realistically represent real objects. We focus on only these two object categories to explore intra-category variation by getting detailed descriptions for many object instances. We chose the table and chair categories from ShapeNetCore because they have significant variation in geometry and appearance. We augment this dataset with 75,344 natural language descriptions (5 descriptions per CAD model) provided by people on the Amazon Mechanical Turk crowdsourcing platform (see Fig. 13). The dataset construction is described in 19 more detail in the following subsections. This large-scale dataset provides much more challenging natural language descriptions paired with realistic 3D shapes. Fig. 11: User interface we use for collecting natural language descriptions of 3D objects from crowdsourced workers. The worker was shown a rotating view of the displayed object and asked to provide a freeform text description of the appearance of the object. Collecting shape descriptions. We collected natural language descriptions from people on the Amazon Mechanical Turk crowdsourcing platform. The workers were shown a 3D animation of a rendered ShapeNet object (slowly rotating around the vertical axis to show a view of the object from all directions). See Fig. 11 for a screenshot. We had experimented with using a full 3D view of the object that allowed users to manipulate the camera but found that it was much slower for users to perform the task (mainly due to 3D data download size and the requirement for GPU hardware). Most users did not manipulate the view using camera controls so we decided it was more efficient to show a pre-rendered rotating view as an animation. One repercussion of this decision was that some people mentioned the fact that the object was rotating in their descriptions. We instructed the workers to describe the appearance of the object using the prompt: “describe the color, shape, material, and physical appearance of the object to another person”. There was no restriction on the number of words and the number of sentences. Many of the descriptions consisted of multiple sentences. To understand what aspects of the shape people tend to describe, we sampled 100 text descriptions. Based on this sample, 95% of the descriptions described the type of object, 86% described parts of the object and how they fit together, 83% 20 percent talked about color, 63% material, and 47% descibed the geometric shape of some part. Some descriptions also mention other features such as functionality, comfort, and the aesthetics of the object. Color voxelization of ShapeNet models. We obtain color voxelizations from the ShapeNet 3D mesh models using a hybrid surface sampling and view-based approach. This hybrid approach was designed to reliably sample all surfaces of an object even if they occur in concavities that are less likely to be observed from external viewpoints. The task of computing color voxelizations for ShapeNet models is not trivial due to challenging properties of the 3D mesh representations: close and coplanar surfaces with different materials, thin structures, and significant variety in texture resolution and level of detail. Original 3D mesh 1283 voxelization 643 voxelization 323 voxelization Interior voxelization Filtered 1283 voxelization Filtered 643 voxelization Filtered 323 voxelization Fig. 12: Color voxelization of textured 3D chair mesh. Left column: original 3D mesh (top) and slice from solid voxelization (bottom). Columns to the right show unfiltered (top) and filtered (bottom) versions of the solid voxelization at resolutions of 1283 , 643 and 323 . The low-pass filtering of voxel colors during downsampling is important to mitigate aliasing artifacts due to sampling of the high frequency patterns in the chair fabric. We perform our voxelization at a resolution of 2563 and then downsample to lower resolutions, with a low pass filter to remove sampling artifacts due to high frequency color variations in textures (see Fig. 12). Additionally, we obtain 21 two versions of the voxelization: one with voxels for only the surfaces, and one with the interior of the objects filled-in to represent the solid volume. The solid voxelization is based on the surface voxelization, so we describe the method for surface voxelization first. Surface colored voxelization. To obtain a surface voxelization we first render the 3D mesh from a set of canonical views of canonical views orbiting around the centroid of the object. We mark all surface triangles that are visible from these views. We then perform two passes of surface point sampling of the 3D mesh. In the first pass, we sample only from surface triangles that were marked visible, whereas in the second pass we sample all triangles except for triangles assigned to the material with lowest total visibility. This two pass scheme helps to fill in unseen surfaces, while preventing samples from backward facing surfaces that usually have neutral white or gray material. In total, we take two million sample points uniformly distributed on the surface of the 3D mesh, along with the associated color at each point. We assign a higher weight to voxels that have surface normal pointing to the exterior of the shape. When determining the color of a specific voxel, we take all samples with the maximal weight, and compute the color by taking the median sample in HSL space (sorting only on the hue channel). Solid colored voxelization. Solid color voxelizations are obtained by first performing a binary solid voxelization using the parity count and ray stabbing [49] methods as implemented in binvox [50]. Since internal colors are ill-defined, we choose to just propagate from the closest colored voxel to each uncolored voxel. To check the quality of both solid and surface voxelizations, we render the resulting voxel grids and manually check approximately 10% of the data. Fig. 12, left shows an example of a solid slice from the interior of the solid voxelization. Low pass filtering. Sampling the colors using the method described above alone results in voxelizations with noisy colors, as shown in Fig. 12. These inaccurate colors are due to aliasing. To overcome this, we low-pass filter the high-resolution (256 × 256 × 256) colors using a Gaussian filter with a standard deviation of 0.5. To prevent any color shift, we element-wise divide the filtered voxels by a low pass filtered occupancy mask (of 0s and 1s). Lastly, we sample the highresolution model to the desired resolution. Fig. 12 shows that after filtering, we obtain much smoother voxelizations retaining textures and patterns even in low resolution voxels. In our experiments, we use 323 resolution solid voxelizations. Examples. Fig. 13 shows several example ShapeNet object voxelizations along with the text of a description provided by a crowd worker. Each shape has 5 such text descriptions. Fig. 12 shows all 5 descriptions for the armchair, which some descriptions being very succinct (a single “armchair”) and other text describing in detail the color pattern and parts of the armchair. Descriptions focus on different aspects of the object, and use various terms to refer to physical attributes. For example, the crescent shaped table in Fig. 13 first row, column 4 could be described as “a T-shaped base connecting 3 legs” rather than “a wooden vineshaped decoration base connecting the legs”. Another difficult phenomenon is the use of negation. For example the description for the blue chair in the last 22 A violet seated chair A rectangular with netted seat rest wooden coffee table and four legs with an iron base A silver colored rectangular steel four legged table. A brown wooden Dark brown wooden A black coloured moon shaped table chair with adjustable table with green with three decorative back rest and gold table top, has two legs with a wooden printed upholestry. drawers on each vine shaped Designed for side and supported decoration base... comfort. by two legs Office desk that looks to be constructed by multiple materials such as brown wood for the top and drawers and grey... Light brown rattan wicker rocking chair with rounded corners Rectangular shaped metal chair with blue color, back rest is provided but no armrest, legs are splayed. Hairstylist’s chair A four legged, Oval shaped with metal base, foot wooden high back marble-top coffee pump and foot rest. chair. The backing table with greys and The seat area looks has two vertical beige colours. Four like it is a hard supports at the dark wooden legs plastic material and sides, with three with wooden rungs has a head rest... thicker slats... under table for... A grey colored round Circular glass coffee wooden table with table with two sets three curve shaped of wooden legs that legs. clasp over the... A dark brown rectangular table four long legs with gold color knob... A relaxing office chair with single metal finish having black color seat Fig. 13: Example color voxelizations for a variety of chair and table instances from ShapeNetCore. The voxelizations are computed at a resolution of 2563 and downsampled to 643 . Below each shape is one example of a natural language description that was provided by a crowdworker. 23 row, column 4 mentions the chair has “no armrests”. The diversity of language used to describe each object makes this a challenging dataset. Limitations. This method for voxelization was designed to handle the specific data properties of ShapeNet 3D meshes. It is however subject to some limitations. Firstly, we did not attempt to reproduce transparent surfaces (see Fig. 13 row 1, column 3 for an example of a voxelized glass coffee table). It would be possible to extend our approach by tracking an alpha channel along with color, and assign opacity to each voxel. This extension is possible since we use a hybrid surface sampling and view-based approach (it would be much harder with a purely view-based approach). Secondly, the voxel colors only capture the diffuse component, and do not account for shading under illumination. We discovered that this led to a disparity compared to our pre-rendered 3D mesh animations used for collecting natural language descriptions in the case of neutral white or light gray colors, which appeared darker under shading. This led to a conflation of ‘white’ with ‘gray’ and ‘metallic’ in the natural language descriptions (see Fig. 13 bottom row, column 3 for an example). To account for this we would either have to perform light-dependent shading in the sampled voxel colors, or render unshaded 3D meshes. Finally, thin coplanar surfaces with different colors, or high frequency detail in textures are fundamentally challenging to capture using our fixed resolution voxel sampling scheme. B.3 Preprocessing of Natural Language Descriptions The text is lowercased, tokenized and lemmatized using the Spacy pipeline.1 Since the natural language descriptions for ShapeNet had many mispellings, it was first spell-corrected using LanguageTool2 (a combination of hunspell3 , grammar rules, and custom spelling corrections for our dataset). Extremely long descriptions with more than 96 tokens are discarded (of the 75360 descriptions we collected for ShapeNet, 16 were discarded due to length). Low frequency terms (occurring ≤ 2 times) were mapped to the UNK token and a dictionary representation was establishing using the remaining terms. For the ShapeNet dataset, the total number of unique words was 8147, after dropping low frequency words and collapsing them into the UNK token, we are left with a vocabulary size of 3588. The primitives dataset has no low frequency words, and has a small vocabulary size of 77 (with the UNK token). Table 4 shows the overall statistics for the two datasets. Note that the primitives dataset has many more descriptions per shape, but has much smaller language variation (with a much smaller vocabulary size and shorter descriptions). C Additional Retrieval Results We present additional retrieval experiment results. These experiments are designed to demonstrate that our learned joint embedding of text and 3D shapes 1 2 3 https://spacy.io/ https://languagetool.org/ http://hunspell.github.io/ 24 Table 5: Same-modal retrieval results on the primitives dataset. Text-to-text Method Shape-to-shape RR@1 RR@5 NDCG@5 RR@1 RR@5 NDCG@5 Random 6.31 17.94 DS-SJE [4] 35.41 43.38 LBA-TST [11] 23.16 24.18 5.27 35.05 23.21 1.33 1.6 37.87 46.00 13.47 29.07 1.35 35.48 12.06 ML LBA-MM Full-TST Full-MM 23.73 62.03 100 100 30.93 20.80 96.53 96.13 29.60 18.94 95.30 95.59 24.01 28.31 61.84 62.71 100 100 100 100 64.27 28.00 98.80 99.20 Table 6: Cross-modal retrieval results on the primitives dataset. Shape-to-text Method Text-to-shape RR@1 RR@5 NDCG@5 RR@1 RR@5 NDCG@5 Random 2.8 DS-SJE [4] 80.5 LBA-TST [11] 5.20 6.53 85.87 6.13 1.84 80.36 5.25 0.24 0.76 81.77 90.70 5.06 15.29 0.27 81.29 5.92 ML LBA-MM Full-TST Full-MM 29.87 90.53 92.40 93.47 24.38 89.48 91.98 93.47 25.93 91.13 94.24 95.07 25.00 91.90 95.20 95.51 24.67 89.2 92.00 93.47 57.24 98.27 97.55 99.08 Table 7: Retrieval results on the ShapeNet dataset. Text-to-text Method Shape-to-text Text-to-shape RR@1 RR@5 NDCG@5 RR@1 RR@5 NDCG@5 RR@1 RR@5 NDCG@5 Random 0.08 DS-SJE [4] 0.08 LBA-TST [11] 0.82 0.38 0.52 3.75 0.08 0.11 0.82 0.07 0.13 0.20 0.34 0.60 0.80 0.06 0.13 0.12 0.11 0.12 0.04 0.35 0.65 0.20 0.23 0.38 0.12 ML LBA-MM Full-TST Full-MM 0.48 3.35 3.22 6.05 0.10 0.73 0.70 1.43 0.13 0.47 0.067 0.34 0.94 3.69 0.83 3.37 0.11 0.07 0.85 0.73 0.13 0.08 0.22 0.40 0.61 0.34 1.63 2.37 0.36 0.21 0.87 1.35 0.11 0.86 0.74 1.74 25 is structured to allow both within-modality and cross-modality retrieval. For within-modality retrieval, we provide results for text-to-text and shape-to-shape retrieval, in which we query an instance (e.g. description) and retrieve the nearest neighbors within the query’s modality (e.g. other descriptions). For crossmodality retrieval, we query in one modality and retrieve in the other. We evaluate this through text-to-shape and shape-to-text retrieval tasks. We first present quantitative results on all retrieval tasks (Appendix C.1). We then present qualitative results for text-to-text (Appendix C.2), shape-to-shape (Appendix C.3), and cross-modal retrieval (Appendix C.4). C.1 Quantitative retrieval results We provide quantitative retrieval results for the primitives dataset in Table 5. For text-to-text retrieval, we see that our model is able to correctly retrieve all descriptions corresponding to the query configuration in the primitives dataset, significantly outperforming the baselines. Moreover, the association learning alone (LBA-TST) and metric learning alone (ML) fail to generalize well to the unseen configurations in the test set. However, when the two are trained jointly (FullTST), we see a significant boost in performance. Lastly, in the original LBA work [11], the authors found that additional roundtrips do not boost performance for same-modal data. On the contrary, in working with multimodal data, we can see that using additional roundtrips in the MM model results in much higher retrieval performance. Similar to the text-to-text retrieval results, our model outperforms the baselines on both the shape-to-shape and text-to-shape retrieval tasks as shown in Table 5 and Table 6. Association learning and metric learning alone also underperform the DS-SJE baseline, but jointly training the two methods results in the best performing model. Quantitative ShapeNet retrieval results are shown in Table 7. Since we only have instance-level labels, a retrieval is considered correct if the retrieved item (text description or shape) belongs to the same instance as the query. In other words, we categorize a retrieved sentence to be correct only if it came from the same model as the query sentence. If the retrieved sentence offers similar semantic meaning but came from a different model, the retrieval is marked as incorrect. Since there are numerous descriptions and shapes in the dataset which are semantically similar but are not labeled to be, the absolute numbers do not entirely capture the performance of the model. However, higher quantitative numbers still correlate with better performance. We do not report numbers on shape-to-shape retrieval since every shape is in its own instance-level class. From Table 7, we can see that for text-to-text retrieval, our model outperforms the baseline methods, and that LBA alone and metric learning (ML) alone significantly underperform our full method (Full-MM). Moreover, utilizing additional round trips (MM) brings significant improvement compared to not using the round trips (TST). For the cross-modal retrieval, our TST model (Full-TST) actually performs slightly better than Full-MM on the shape-to-text retrieval task, though the 26 performance of the two models are still comparable with each other for this task. Moreover, we see that our full model (Full-MM) outperforms all baselines for text-to-shape retrieval. In the following subsection we give more examples for each retrieval task. C.2 Text-to-text Retrieval Given a sentence in the test set, we retrieve the nearest sentences. Qualitative results of our model on the ShapeNet dataset are in Fig. 14. Almost all of the retrieved descriptions come from different shapes, but they are semantically similar. For example, in the first row, we see that the model learns “oval” is similar to “circular”. In the second example, all retrieved descriptions describe red chairs, and in the last example, the retrieved descriptions describe glass coffee tables. Query Nearest Neighbors an brown oval table with three section base The table is a sofa table with an oval top. The legs are rounded and the table is multi-colored wood. Circular table of beige colour with 3 stand where the first two stands are circular and the botton part is rectangular and it is supported by a wooden broad c piece. a red plastic seating unit in one piece, sitting on a metal frame for feet. A red metal chair with a red leg rest. The frame is made of one piece of metal that is bent for the shape. A circular red chair with a small round base. The red chair has minimal padding and the inner seat base is black in colour. a drawer, wooden color, used A box with long hight desk type table The table is made up of wood. It has one drawers. It is to keep things like books, of teak color with three drawers and four legged clothes, it has three drawer a tilted top Light blue top glass coffee table with brown metallic stand. The modern design coffee table features wooden legs and a glass top and glass under shelf. The square wooden legs are black in color. it is grey in color, rectangle in shape with modern manufactured allowing for versatile, striking designed with metal joints and top of the table is covered with glass and appearance looks like glass coffee table Fig. 14: Text-to-text retrieval. The retrieved descriptions are semantically similar to the query despite originating from different shape instances. C.3 Shape-to-shape Retrieval Given a shape, we retrieve the nearest shapes according to our learned embedding. We show qualitative results for shape-to-shape retrieval in Fig. 15. The retrieved neighbors often correspond with the query in style and shape. For example, the retrieved neighbors of the brown armless chair are all also wooden armless chairs. When a sofa is queried, the nearest neighbors are also sofas. Likewise for tables, the retrieved neighbors have similar attributes (e.g. rectangular vs. round table). We compare our model against the baselines in Fig. 16. While the LBA (TST) method is able to perform text-to-text retrieval fairly well, its performance is much worse for shape-to-shape retrieval. For example, when a chair is queried (second query of Fig. 16), the LBA (TST) method retrieves tables. Similarly, 27 Query Nearest Neighbors Query Nearest Neighbors Fig. 15: Shape-to-shape retrieval examples. The nearest neighbor shapes for each query have closely matching attributes. the DS-SJE method does not perform well either, returning chairs which share almost no similar attributes. However, our method successfully retrieved chairs which look like they are of the same material, color, and style. Nearest Neighbors (LBA TST) Query Nearest Neighbors (LBA TST) Query Nearest Neighbors (DS-SJE) Nearest Neighbors (DS-SJE) Nearest Neighbors (Ours) Nearest Neighbors (Ours) Fig. 16: Shape-to-shape retrieval comparison. We compare with the LBA (TST) and DS-SJE [4] baselines. Ours retrieves the most reasonable nearest neighbors. C.4 Cross-modal Retrieval We provide additional results for the text-to-shape experiments described in the main paper. Qualitative results for ShapeNet text-to-shape retrieval are shown in Fig. 17. The DS-SJE [4] method seems to return the same results whenever a table caption is queried, regardless of the details in the description. This is because the representations learned by DS-SJE [4] most likely do not capture information about the attributes. Rather, they capture category information (chair/table) only. The LBA (TST) method does not always retrieve shapes of the correct category (e.g. returns chairs instead of tables). Our method is able to understand certain details such as a “blue glass top” and retrieves shapes which indeed match the given description. 28 Query: jet block rectangle table with wooden legs used for dinning purpose or in office, clubs etc., Nearest Neighbor (LBA TST) Nearest Neighbor (DS-SJE) Nearest Neighbor (Ours) Query: It is cushion chair. The chair is gray color. Nearest Neighbor (LBA TST) Nearest Neighbor (DS-SJE) Nearest Neighbor (Ours) Query: A table with blue glass top and a bent metal pipe for a leg Nearest Neighbor (LBA TST) Nearest Neighbor (DS-SJE) Nearest Neighbor (Ours) Fig. 17: Text-to-shape retrieval. Each row shows the five nearest neighbors to the text in our learned embedding, which match in category, color, and shape. We compare with the LBA (TST) and DS-SJE [4] baselines. Ours is the only method to return reasonable text-to-shape retrieval results. 29 D Additional Generation Results In this section we present additional text-to-shape generation results (Appendix D.1) and vector arithmetic results (Appendix D.2). D.1 GAN generation results We show more generation results in Fig. 18 and Fig. 19. In general, the GANINT-CLS approach [10] struggles to properly condition on the text. For example, none of the glass or white tables (examples 4, 6, 7, 11, 14, 18, 19) are of the right color. Moreover, the the model exhibits mode collapse – all of the chairs look the same and the tables in examples 4, 7, 8, 14, 17, 19, and 20 all look very similar. These poor generations are primarily due to the quality of the learned text embeddings, but also due to their GAN formulation as well. Because the representations are not trained to distinguish more than the chair/table categories, the generator and critic have a hard time learning how to properly condition on the input embeddings. The CGAN method performs better than the GAN-INT-CLS baseline [10]. Using our joint representation learning approach, the CGAN is able to properly condition on the text description such that the generated models usually have the correct category and color. However, we still see mode collapse, as examples 5, 8, 9, and 13 are very similar looking brown tables, and examples 1, 3, and 15 are very similar looking chairs. Furthermore, we see that the color distributions (such as in examples 3, 5, 9, 14, 18, and 19) look artificial and unsmooth. Lastly, we see that our CWGAN produces the most realistic generations which also properly match the ground truth in terms of color and category. In example 6 for example, the CWGAN method is the only one to produce a table which is white. The other approaches fail by either generating a chair or generating a table of the wrong color. Moreover, we notice that the generations from the CWGAN model have much higher diversity compared to the other approaches – a property that the Wasserstein GAN [39,42] had over the the traditional GAN formulation [29]. We see large variations in the color, shape, and style of the generated CWGAN voxels. From these results, we can also see that there is room for improvement. For example, the tables in examples 6 and 20 are rectangular rather than square. The round table in example 12 does not have three legs, and the desk in example 4 is not exactly an upside down U shape. Details in the descriptions such as these can be hard for the model to capture. Thus, while our model is able to significantly outperform the baselines, there is still much room for improvement in future work. D.2 Additional Vector Arithmetic Results Lastly, we provide additional results for vector arithmetic on the text and shape embeddings in Fig. 20. By performing simple operations on the learned representations, we can use our trained generator to produce novel shapes with specific attributes. 30 Input Text GANINTCLS [10] Ours CGAN Ours CWGAN GT 1) modern dining table chair with nice and sturdy for wooden legs. looks comfortable 2) Chair with wave back. Seat is light grey and legs and armrests are curved wood. 3) brown wooden chair with fabric on the seat and the backrest 4) A desk, made out of what appears to be wood, with a white top 5) Brown color, Rectangular shape, made in wood, four legs slightly shorter. 6) a simple and arrogant looking white square table. 7) A table with square wood legs. The tabletop is blue. 8) this table for constructing tbale color has brown, made from wooden sturcutre, it appears look practical appliances wooden frame,shape has rectangle, 9) A rectangle shaped dining room table with metal legs. 10) Wooden chair made up of cuisine seat and back which is in silver in colour good appearnce. Fig. 18: Example text-to-shape generations. Our CWGAN approach is correctly conditioned by the input text, generating shapes that match the described attributes. The baseline approach struggles to generate plausible shapes. Additional results can be found in the supplementary material. 31 Input Text GANINTCLS [10] Ours CGAN Ours CWGAN GT 11) A table with a glass table top, and four Ushaped legs. 12) A round wooden coffee table with three legs and a raised edge around the table top 13) Broad rectangular shaped surface table with four short legs. 14) It is a gray coffee table with lined patterns on the top and undershelf. 15) a brown folding chair 16) Modern, brown color, square shape, wooden table with a curve at bottom 17) Wooden office desk with lamp. 18) A rectangle glass table with a unique base design. 19) The object is grey in color. It is rectangular and flat in shape with four legs supporting it. Usual material is wood. 20) A wood square table with four legs. It is painted brown. Fig. 19: Example text-to-shape generations. Our CWGAN approach is correctly conditioned by the input text, generating shapes that match the described attributes. The baseline approach struggles to generate plausible shapes. Additional results can be found in the supplementary material. 32 brown table gray table gray brown glass table white table white glass rectangular round round rectangular round table browntable brown dining table glass round brown dining table brown grayround dining table rectangular table glass gray table dining table red dining chair a white dining chair a red chair a white chair brown chair white leather chair brown leather chair a brown table a white round table a brown round table white chair white table Fig. 20: Vector arithmetic on joint text-shape embeddings. Similar to the results from the main paper, our embeddings admit composition and transfer of attributes to control shape generation. 33 References 1. Gong, Y., Wang, L., Hodosh, M., Hockenmaier, J., Lazebnik, S.: Improving imagesentence embeddings using large weakly annotated photo collections. In: European Conference on Computer Vision, Springer (2014) 529–545 2. Kiros, R., Salakhutdinov, R., Zemel, R.S.: Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539 (2014) 3. Klein, B., Lev, G., Sadeh, G., Wolf, L.: Associating neural word embeddings with deep image representations using Fisher vectors. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2015) 4437–4446 4. Reed, S., Akata, Z., Lee, H., Schiele, B.: Learning deep representations of finegrained visual descriptions. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2016) 49–58 5. Wang, L., Li, Y., Lazebnik, S.: Learning deep structure-preserving image-text embeddings. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2016) 5005–5013 6. Li, Y., Su, H., Qi, C.R., Fish, N., Cohen-Or, D., Guibas, L.J.: Joint embeddings of shapes and images via CNN image purification. ACM Trans. Graph. 34(6) (2015) 234–1 7. Reed, S., van den Oord, A., Kalchbrenner, N., Bapst, V., Botvinick, M., de Freitas, N.: Generating interpretable images with controllable structure. Technical report, Google DeepMind (2016) 8. Zhang, H., Xu, T., Li, H., Zhang, S., Huang, X., Wang, X., Metaxas, D.: StackGAN: Text to photo-realistic image synthesis with stacked generative adversarial networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2017) 9. Reed, S., Akata, Z., Mohan, S., Tenka, S., Schiele, B., Lee, H.: Learning what and where to draw. In: NIPS. (2016) 10. Reed, S., Akata, Z., Yan, X., Logeswaran, L., Schiele, B., Lee, H.: Generative adversarial text-to-image synthesis. In: Proceedings of The 33rd International Conference on Machine Learning. (2016) 11. Haeusser, P., Mordvintsev, A., Cremers, D.: Learning by association-a versatile semi-supervised training method for neural networks. arXiv preprint arXiv:1706.00909 (2017) 12. Song, H.O., Xiang, Y., Jegelka, S., Savarese, S.: Deep metric learning via lifted structured feature embedding. In: Computer Vision and Pattern Recognition (CVPR). (2016) 13. Chang, A.X., Funkhouser, T., Guibas, L., Hanrahan, P., Huang, Q., Li, Z., Savarese, S., Savva, M., Song, S., Su, H., Xiao, J., Yi, L., Yu, F.: ShapeNet: An information-rich 3D model repository. Technical Report arXiv:1512.03012 [cs.GR], Stanford University — Princeton University — Toyota Technological Institute at Chicago (2015) 14. Ngiam, J., Khosla, A., Kim, M., Nam, J., Lee, H., Ng, A.Y.: Multimodal deep learning. In: Proceedings of the 28th international conference on machine learning (ICML-11). (2011) 689–696 15. Srivastava, N., Salakhutdinov, R.R.: Multimodal learning with deep Boltzmann machines. In: Advances in neural information processing systems. (2012) 2222– 2230 34 16. Sohn, K., Shang, W., Lee, H.: Improved multimodal deep learning with variation of information. In Ghahramani, Z., Welling, M., Cortes, C., Lawrence, N.D., Weinberger, K.Q., eds.: Advances in Neural Information Processing Systems 27. Curran Associates, Inc. (2014) 2141–2149 17. Hardoon, D.R., Szedmak, S., Shawe-Taylor, J.: Canonical correlation analysis: An overview with application to learning methods. Neural computation 16(12) (2004) 2639–2664 18. Gong, Y., Ke, Q., Isard, M., Lazebnik, S.: A multi-view embedding space for modeling internet images, tags, and their semantics. Int. J. Comput. Vision 106(2) (January 2014) 210–233 19. Andrew, G., Arora, R., Bilmes, J., Livescu, K.: Deep canonical correlation analysis. In: International Conference on Machine Learning. (2013) 1247–1255 20. Ma, Z., Lu, Y., Foster, D.: Finding linear structure in large datasets with scalable canonical correlation analysis. In: International Conference on Machine Learning. (2015) 169–178 21. Tsai, Y.H.H., Huang, L.K., Salakhutdinov, R.: Learning robust visual-semantic embeddings. In: Proceedings of the International Conference on Computer Vision. (2017) 22. Chopra, S., Hadsell, R., LeCun, Y.: Learning a similarity metric discriminatively, with application to face verification. In: Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on. Volume 1., IEEE (2005) 539–546 23. Weinberger, K.Q., Blitzer, J., Saul, L.K.: Distance metric learning for large margin nearest neighbor classification. In: Advances in neural information processing systems. (2006) 1473–1480 24. Schroff, F., Kalenichenko, D., Philbin, J.: FaceNet: A unified embedding for face recognition and clustering. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2015) 815–823 25. Sohn, K.: Improved deep metric learning with multi-class n-pair loss objective. In: Advances in Neural Information Processing Systems. (2016) 1857–1865 26. Wang, F., Kang, L., Li, Y.: Sketch-based 3D shape retrieval using convolutional neural networks. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR). (June 2015) 27. Gordo, A., Larlus, D.: Beyond instance-level image retrieval: Leveraging captions to learn a global visual representation for semantic retrieval. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR). (July 2017) 28. Dosovitskiy, A., Tobias Springenberg, J., Brox, T.: Learning to generate chairs with convolutional neural networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2015) 1538–1546 29. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial nets. In: Advances in neural information processing systems. (2014) 2672–2680 30. Radford, A., Metz, L., Chintala, S.: Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434 (2015) 31. Nguyen, A., Yosinski, J., Bengio, Y., Dosovitskiy, A., Clune, J.: Plug & play generative networks: Conditional iterative generation of images in latent space. arXiv preprint arXiv:1612.00005 (2016) 32. Choy, C.B., Xu, D., Gwak, J., Chen, K., Savarese, S.: 3D-R2N2: A unified approach for single and multi-view 3D object reconstruction. In: Proceedings of the European Conference on Computer Vision (ECCV). (2016) 35 33. Sharma, A., Grau, O., Fritz, M.: Vconv-DAE: Deep volumetric shape learning without object labels. In: Computer Vision–ECCV 2016 Workshops, Springer (2016) 236–250 34. Girdhar, R., Fouhey, D.F., Rodriguez, M., Gupta, A.: Learning a predictable and generative vector representation for objects. In: European Conference on Computer Vision, Springer (2016) 484–499 35. Tatarchenko, M., Dosovitskiy, A., Brox, T.: Octree generating networks: Efficient convolutional architectures for high-resolution 3D outputs. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2017) 36. Wu, J., Zhang, C., Xue, T., Freeman, W.T., Tenenbaum, J.B.: Learning a probabilistic latent space of object shapes via 3D generative-adversarial modeling. In: Advances in Neural Information Processing Systems. (2016) 82–90 37. Liu, J., Yu, F., Funkhouser, T.: Interactive 3d modeling with a generative adversarial network. arXiv preprint arXiv:1706.05170 (2017) 38. Li, J., Xu, K., Chaudhuri, S., Yumer, E., Zhang, H., Guibas, L.: Grass: Generative recursive autoencoders for shape structures. ACM Transactions on Graphics (TOG) 36(4) (2017) 52 39. Arjovsky, M., Chintala, S., Bottou, L.: Wasserstein GAN. arXiv preprint arXiv:1701.07875 (2017) 40. Tulsiani, S., Zhou, T., Efros, A.A., Malik, J.: Multi-view supervision for singleview reconstruction via differentiable ray consistency. In: CVPR. Volume 1. (2017) 3 41. Haeusser, P., Frerix, T., Mordvintsev, A., Cremers, D.: Associative domain adaptation. arXiv preprint arXiv:1708.00938 (2017) 42. Gulrajani, I., Ahmed, F., Arjovsky, M., Dumoulin, V., Courville, A.: Improved training of Wasserstein GANs. arXiv preprint arXiv:1704.00028 (2017) 43. Mirza, M., Osindero, S.: Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784 (2014) 44. Honnibal, M., Montani, I.: spaCy: Industrial-strength NLP. https://spacy.io/ (2017) Accessed: 2016-06-20. 45. Järvelin, K., Kekäläinen, J.: Cumulated gain-based evaluation of IR techniques. ACM Transactions on Information Systems (TOIS) 20(4) (2002) 422–446 46. Wang, J., Zhou, F., Wen, S., Liu, X., Lin, Y.: Deep metric learning with angular loss. In: The IEEE International Conference on Computer Vision (ICCV). (Oct 2017) 47. Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., Chen, X.: Improved techniques for training GANs. In: Advances in Neural Information Processing Systems. (2016) 2234–2242 48. Mikolov, T., Sutskever, I., Chen, K., Corrado, G.S., Dean, J.: Distributed representations of words and phrases and their compositionality. In: Advances in neural information processing systems. (2013) 3111–3119 49. Nooruddin, F.S., Turk, G.: Simplification and repair of polygonal models using volumetric techniques. IEEE Transactions on Visualization and Computer Graphics 9(2) (2003) 191–205 50. Min, P.: binvox. http://www.patrickmin.com/binvox or https://www.google.com/search?q=binvox (2004 - 2017) Accessed: 2016-06-20.
2cs.AI
arXiv:1511.00548v3 [math.GR] 6 Oct 2016 The generalised word problem in hyperbolic and relatively hyperbolic groups Laura Ciobanu, Derek Holt, and Sarah Rees February 23, 2018 Abstract We prove that, for a finitely generated group hyperbolic relative to virtually abelian subgroups, the generalised word problem for a parabolic subgroup is the language of a real-time Turing machine. Then, for a hyperbolic group, we show that the generalised word problem for a quasiconvex subgroup is a real-time language under either of two additional hypotheses on the subgroup. By extending the Muller-Schupp theorem we show that the generalised word problem for a finitely generated subgroup of a finitely generated virtually free group is context-free. Conversely, we prove that a hyperbolic group must be virtually free if it has a torsion-free quasiconvex subgroup of infinite index with context-free generalised word problem. 2010 Mathematics Subject Classification: 20F10, 20F67, 68Q45 Key words: generalised word problem, relatively hyperbolic group, context-free language, real-time Turing machine 1 Introduction Let G = hXi with |X| < ∞ be a group and H ≤ G. The word problem WP(G, X) and generalised word problem GWP(G, H, X) are defined to be the preimages φ−1 ({1G }) and φ−1 (H) respectively, where φ is the natural map from the set of words over X to G. We are interested in the relationship between the algebraic properties of G (and H) and the formal language classes containing WP(G, X) and GWP(G, H, X). These questions have already been well studied for the word problem, but relatively little for the generalised word problem. Since, as is well known for WP(G, X), the question of membership of WP(G, X) and GWP(G, H, X) in a formal language family F is typically independent of the choice of the finite generating set X, we shall usually use the simpler notations WP(G) and GWP(G, H). It will be convenient to assume throughout the paper that all generating sets X of groups G are closed under inversion; i.e. x ∈ X ⇒ x−1 ∈ X. It is elementary to prove that WP(G) is regular if and only if G is finite and, more generally, that GWP(G, H) is regular if and only if |G : H| is finite. 1 It is well-known that WP(G) is context-free if and only if G is virtually free [14], and it is shown in [10, 11] that WP(G) is a real-time language (that is, the language of a real-time Turing machine) for several interesting classes of groups, including hyperbolic and geometrically finite hyperbolic groups. The solvability of GWP(G, H) has been established for numerous classes of groups, most recently for all (compact and connected) 3-manifold groups [7]. In this paper, we study the conditions under which GWP(G, H) is a real-time or a context-free language for subgroups H of hyperbolic and relatively hyperbolic groups. There are several definitions of relatively hyperbolic groups, and the one that we are using here is that of [15]; so in particular the Bounded Coset Penetration Property holds. Our first result is the following. Theorem 1.1. Suppose that the finitely generated group G is hyperbolic relative to a set {Hi : i ∈ I} of virtually abelian (parabolic) subgroups of G, and that H is a selected parabolic subgroup. Then GWP(G, H) is a real-time language. The proof uses a combination of results for relatively hyperbolic groups that were developed by Antolı́n and Ciobanu in [3] and the extended Dehn algorithms that were introduced by Goodman and Shapiro in [9]. By choosing H = H0 to be the trivial subgroup of G, we obtain a generalisation of the result proved (also using extended Dehn algorithms) in [11] that WP(G) is a real-time language when G is a geometrically finite hyperbolic group. Since Goodman and Shapiro’s techniques, such as the N -tight Cannon’s algorithm and related results (Theorem 37 in [9]), only apply to virtually abelian groups and not, for example, to all virtually nilpotent groups, our proof cannot be extended to parabolics beyond those that are virtually abelian. Furthermore, even with a different approach to the proof there must be some limitations on the choice of parabolics, since examples exist of relatively hyperbolic groups with generalised word problems that are not real-time. If one considers, for example, the free product G = H ∗ K of two groups H and K, where H is hyperbolic and K has unsolvable word problem, then G is hyperbolic relative to K, but it is easy to see that the subgroup membership problem for K in G is unsolvable, so it cannot be real-time. Recall that a subgroup H ≤ G is called quasiconvex in G if geodesic words over X that represent elements of H lie within a bounded distance of H in the Cayley graph Γ(G, X). And H is called almost malnormal in G if |H ∩H g | is finite for all g ∈ G \ H. We conjecture that, for a hyperbolic group G, the set GWP(G, H) is a real-time language for any quasiconvex subgroup H of G, but we are currently only able to prove this under either of two additional hypotheses: Theorem 1.2. Let G be a hyperbolic group, and H a quasiconvex subgroup of G. Suppose that either (i) H is almost malnormal in G; or (ii) |CG (h) : CH (h)| is finite for all 1 6= h ∈ H. Then GWP(G, H) is a real-time language. 2 Our proofs of the result in the two cases are quite distinct, and so we write them separately. Under assumption (i), G is hyperbolic relative to {H} [15, Section 1, Example (III)], and the proof is similar to that of Theorem 1.1 (although H is not usually virtually abelian, so we cannot apply that result directly). Under assumption (ii), we make use of some results of Foord [6] about the Schreier graph of G with respect to H. Note that, since centralisers of elements of infinite order in hyperbolic groups are virtually cyclic, |CG (h) : CH (h)| is always finite for such elements h and so, in particular, assumption (ii) holds whenever G is torsion-free. Our next result, which concerns context-free generalised word problems, is straightforward to prove and may be known already, but it does not appear to be in the literature. Theorem 1.3. Let G be finitely generated and virtually free, and let H be a finitely generated subgroup of G. Then GWP(G, H) is deterministic context-free. The conclusion of Theorem 1.3 may or may not hold if we drop the condition that H is finitely generated. Suppose that G is the free group on two generators a, b. For H1 = [G, G], the set GWP(G, H1 ) consists of all words whose exponent sums in both a and b are zero, and is not context-free, but for the subgroup H2 of words whose exponent sum in a is zero, the set GWP(G, H2 ) is context-free. We would like to know to what extent Theorem 1.3 is best possible when H is finitely generated. We observe that, where HG := ∩g∈G H g is the core of H in G, the set GWP(G, H, X) is the same set of words as GWP(G/HG , H/HG , X). We know of no examples for which H is finitely generated with trivial core and GWP(G, H) is context-free, but G is not virtually free. The following result is an attempt at a converse to Theorem 1.3. Theorem 1.4. Let G be a hyperbolic group, and let H be a quasiconvex subgroup of infinite index in G such that |CG (h) : CH (h)| is finite for all 1 6= h ∈ H. If GWP(G, H) is context-free then G is virtually free. Note that we make the same assumption on centralisers of elements h ∈ H as in Theorem 1.2 (ii), and again we conjecture that this is not necessary for the conclusion of the theorem. However the necessity of quasiconvexity is demonstrated by a construction found in [16], as follows. Let Q be any finitely presented group, and choose λ > 0. We can define a finitely presented group G and a normal 2-generated subgroup H of G, such that G/H ∼ = Q, and G satisfies the small cancellation condition C ′ (λ); in particular we can choose Q with insoluble word problem, and choose λ ≤ 1/6 to ensure that G is hyperbolic, and in that case GWP(G, H) is not even recursive. The closure properties of context-free languages [12, Chapter 11] and of realtime languages [17] ensure that all of the above results are independent of the choice of the finite generating set X of G, so we are free to choose X to suit our own purposes in the proofs. (More generally, for membership of WP(G, X) or GWP(G, H, X) in a formal language class F to be independent of the choice of X, we need F to be closed under inverse homomorphism. This property holds for all of the most familiar formal language classes, including regular, context-free, 3 deterministic context-free, real-time, context-sensitive, deterministic contextsensitive, and recursive languages.) This article is structured as follows. In Section 2, we summarise the basic properties of relatively hyperbolic groups that we shall need, and we recall some of their properties that are proved in [3]. In Section 3, we introduce the concept of extended Dehn algorithms for solving the word and generalised word problems in groups and we recall some results pertaining to relatively hyperbolic groups that are proved in [9]. Sections 4, 5, 6, 7 and 8 contain the proofs of Theorems 1.1, 1.2 (i), 1.2 (ii), 1.3 and 1.4, respectively. Finally, in Section 9, we sketch a proof of a result of Foord [6, Theorem 4.3.1.1] that we shall need, since the original source might not be readily available to readers. 2 Relatively hyperbolic groups We follow [15] for notation and the definition of relatively hyperbolic groups. This definition is equivalent to what Farb calls “strong relative hyperbolicity” in [5]. Suppose that G is a group, X a finite generating set, and {Hi : i ∈ I} a collection of subgroups of G, which we call parabolic subgroups. We define Xi := X ∩Hi to be the set of generators in X that lie within the subgroup Hi , and XI := ∪i∈I Xi . b as the sets Then we define H and X [ b = X ∪ H. H := (Hi \ {1}), X i∈I Much of our argument involves the comparison of lengths of various words that b a set represent an element g ∈ G written over different sets, namely X, X, Z ⊇ X that is introduced during the extended Dehn algorithm (which, when Z ⊃ X, is not actually a generating set for G, since only some of the words over Z correspond to elements of G), and certain subsets of these sets. b for G over the generating sets So we shall consider the Cayley graphs Γ and Γ b and view words over X and X b also as paths in Γ and Γ. b We denote X and X, b For a word by dΓ the graph distance in Γ and by dΓb the graph distance in Γ. w written over a set Y (that is, an element of Y ∗ ), we write |w| to denote the length of w and, for a group element g, we write |g|Y to denote the length of a shortest word over Y that represents the group element g (assuming that such a word exists). We call |g|Y the Y -length of g, and a shortest word over Y that represents g a Y -geodesic for g. b and, in order to make a clear Most words will be written over either X or X distinction between those two types of words we will normally use Roman letters as names for words over X and paths in Γ, and Greek letters as names for words b and paths in Γ, b with the exception that we will write w over X b for the word b that is derived from a word w over X by a process called compression, over X which will be described later in this section. 4 We refer to [15] for a precise definition of relative hyperbolicity of G with respect to {Hi : i ∈ I}. Under that definition, relative hyperbolicity is known to be b is δ-hyperbolic for some δ together equivalent to the fact that the Cayley graph Γ with the Bounded Coset Penetration Property, stated below as Property 2.1. From now on we shall assume that G is relatively hyperbolic in this sense. It is proved in [15] that, under our assumption that G is finitely generated, the subgroups Hi are finitely generated, the set I is finite, and any two distinct parabolic subgroups have finite intersection. We assume that the generating set X is chosen such that Hi = hXi i for all i ∈ I. b We need some terminology relating to paths in Γ. 1. We call a subpath of a path π an Hi -component, or simply a component, of π if it is written as a word over Hi for some i ∈ I, and is not contained in any longer such subpath of π. 2. Two components of (possibly distinct) paths are said to be connected if both are Hi -components for some i ∈ I, and both start within the same left coset of Hi . 3. A path is said to backtrack if it has a pair of connected components. A path is said to vertex-backtrack if it has a subpath of length greater than 1 that is labelled by a word representing an element of some Hi . Note that if a path does not vertex-backtrack, then it does not backtrack and all of its components are edges. 4. For κ ≥ 0 we say that two paths are κ-similar if the X-distances between their two initial vertices and between their two terminal vertices are both at most κ. Property 2.1 (Bounded Coset Penetration Property [15, Theorem 3.23]). For any λ ≥ 1, c ≥ 0, κ ≥ 0, there exists a constant ǫ = ǫ(λ, c, κ) such that, for any b that do not backtrack, two κ-similar (λ, c)-quasi-geodesic paths π and π ′ in Γ the following conditions hold: (1) The sets of vertices of π and π ′ are contained in the closed ǫ-neighbourhoods (with respect to the metric dΓ ) of each other. (2) For any Hi -component σ of π for which the X-distance between its endpoints is greater than ǫ, some Hi -component σ ′ of π ′ is connected to σ. (3) Whenever σ and σ ′ are connected Hi -components of π and π ′ respectively, the paths σ and σ ′ are ǫ-similar. We shall need to use two more properties of relatively hyperbolic groups that are proved in [3]. Property 2.2 ([3, Theorem 5.2]). Let Y be a finite generating set for G. Then for some λ ≥ 1, c ≥ 0 there exists a finite set Ψ of non-geodesic words over Y ∪ H such that: 5 every 2-local geodesic word over Y ∪ H not containing any element b without of Ψ as a subword labels a (λ, c)-quasi-geodesic path in Γ vertex-backtracking. Now suppose that v is any word in X ∗ . Then following [3, Construction 4.1] we b that is obtained from v by replacing (working define vb to be the word over X from the left) each subword u that is maximal as a subword over some Xi (i ∈ I) by the element hu of H that the subword represents. We call these Xi -subwords u of v its parabolic segments, and use the term compression for the process that converts v to b v . A word v is said to have no parabolic shortenings if each of its parabolic segments is an Xi -geodesic. In order to avoid confusion we comment that a parabolic segment (which is a maximum subword over some Xi of a word over X) is not quite the same as a component (which is a maximal subpath/subword over some Hi of a path/word b but clearly the two concepts are close. over X); The other required property is proved in [3, Lemma 5.3]; the precise description of Φ is taken from the proof of that lemma, rather than from its statement. Property 2.3. Let Y be a finite generating set for G. Then for some λ ≥ 1, c ≥ 0, some finite subset H′ of H, and any finite generating set X of G with Y ∪ H′ ⊆ X ⊆ Y ∪ H, there is a finite subset Φ of non-geodesic words over X such that: if a word w ∈ X ∗ has no parabolic shortenings and no subwords in b ∗ is a 2-local geodesic and labels a (λ, c)Φ, then the word w b ∈ X b without vertex-backtracking. quasi-geodesic path in Γ Furthermore, for every i ∈ I and h ∈ Hi , we have |h|X = |h|Xi . In fact Φ = Φ1 ∪ Φ2 , where Φ1 is the set of non-geodesic words in X ∗ of length 2, and Φ2 is the set of all words u ∈ X ∗ with no parabolic shortening and for which u b ∈ Ψ, where Ψ (together with λ and c) is given by Property 2.2. 3 Extended Dehn algorithms Our proofs of Theorem 1.1 and both parts of Theorem 1.2 depend on the construction of an extended Dehn algorithm (eda) [9] for G with respect to H. In each case, we then need to show that the eda satisfies a particular condition that allows us to apply Proposition 3.2 (below) in order to verify both that the algorithm solves GWP(G, H) and that it can be programmed on a real-time Turing machine. Proposition 3.2 is derived from [11, Theorem 4.1], which was used to prove the solubility of the word problem in real-time for various groups with edas to solve that problem. We restate that result as a proposition in this paper for greater clarity of exposition. 6 Our definition of an extended Dehn algorithm (which is defined with respect to a specific finite generating set X of G) is modelled on the definition of [9] (where it is called a Cannon’s algorithm), with the difference that we are using our algorithm to solve a generalised word problem GWP(G, H, X) rather than a word problem WP(G, X). Elsewhere in the literature [11] the same concept is called a generalised Dehn algorithm; our decision to introduce a new name is based on both our recognition that there are many various different algorithms attributed to (more than one) Cannon, and our desire to avoid overuse of the term ‘generalised’. For a (Noetherian) rewriting system R with alphabet Z and w ∈ Z ∗ , we write R(w) for the reduction of the word w using the rules of R. In general, R(w) may depend on the order in which the rules are applied, and we shall specify that order shortly. A word w is called (R-)reduced if R(w) = w; that is, if w does not contain the left hand side of any rule as a subword. We define an eda for a finitely generated group G = hXi with respect to a subgroup H ≤ G to be a finite rewriting system S consisting of rules u → v, where (i) u, v ∈ Z ∗ for some finite alphabet Z ⊇ X ∪ {H}; (ii) |u| > |v|; and (iii) either u, v ∈ (Z \ {H})∗ or u = Hu1 , v = Hv1 , with u1 , v1 ∈ (Z \ {H})∗ . We say that the eda S solves the generalised word problem GWP(G, H, X) if, for every word w over X, we have S(Hw) = H if and only if w represents an element of H. If H = {1} (in which case we may assume only that Z ⊇ X), then we call S an eda for G. As observed earlier, for S(w) to be well-defined, we need to specify the order in which the reduction rules are applied to words w. In the terminology of [9, Section 1.2], S with the order we specify below is an incremental rewriting algorithm and, since we shall only apply it to words of the form Hw with w ∈ X ∗ , the rules Hu1 → Hv1 are effectively anchored rules. We assume that no two distinct rules have the same left hand sides. Then we require that when a word Hw contains several left hand sides of S, the rule which is applied is one that ends closest to the start of Hw; if there are several such rules, the one with the longest left hand side is selected. In our applications, the rules of the form u → v with u, v ∈ (Z \ {H})∗ will form an eda R for G, of a type that is considered in [9], and which solves the word problem WP(G, X); i.e. R(w) is the empty word if and only if w =G 1. The properties of the eda R that we shall use are described in more detail in Proposition 3.1 below. Many of the technical results of [9] apply without modification to edas that solve a GWP rather than WP. Note that the set Z may properly contain X ∪{H}, and so contain symbols that do not correspond to either elements or subsets of G. But it is a consequence of [9, Proposition 3] that a word in (Z \{H})∗ that arises from applying these rules to a word w ∈ X ∗ unambiguously corresponds to the element of G represented by w, and so we may interpret such words as elements in G. We shall see 7 shortly that our rewrite rules Hu → Hv will all be of the form Hz → H for words z ∈ (Z \ {H})∗ that represent elements of H, and so words derived by applying rules of the eda to Hw with w ∈ X ∗ unambiguously represent the coset of H in G defined by Hw. Following [9, Corollary 27], for a positive integer D, we say that an eda S that solves the word problem for a group K = hY i is D-geodesic if a word w that is S-reduced and represents an element g of Y -length at most D must in fact be written over Y , and be a Y -geodesic for g. In this section so far, we have not made any assumptions on G, H, X, beyond the finiteness of the generating set X. Suppose now that the parabolic subgroups Hi are all virtually abelian, and that R is an eda for G that solves WP(G, X). For integers D ≥ E ≥ 0, we say that R satisfies P(D, E) if the following conditions hold. (1) For each i, Xi := X ∩ Hi generates Hi , and the alphabet Z of R has the form Z = ∪i∈I Zi ∪ X with Xi ⊆ Zi . (2) For each rule u → v of R, we either have u, v ∈ X ∗ , or u, v ∈ Zi∗ for a unique i ∈ I. (3) For each i ∈ I, the rules u → v with u, v ∈ Zi∗ form a D-geodesic eda Ri that solves WP(Hi , Xi ). (4) All R-reduced words w ∈ X ∗ that have length at most E are X-geodesic. The following result is proved under slightly more general conditions on the parabolic subgroups in [9], and is stated here in the form in which we need it: Proposition 3.1 ([9, Theorem 37]). Suppose that G = hY i is hyperbolic relative to the virtually abelian parabolic subgroups Hi . Then, there is a finite generating set X of G, consisting of the generators in Y together with some additional elements from the Hi (that include all non-trivial elements from the intersections Hi ∩ Hj with i 6= j) with the following property: for all sufficiently large integers D, E with D ≥ E ≥ 0, there is an eda for G that solves WP(G, X) and satisfies P(D, E). We need to extend our definition of the property P(D, E) to our wider definition of an eda for a group with respect to a subgroup. For G satisfying the above hypotheses, and given any subgroup H ≤ G, we shall say that an eda S for G with respect to H, with alphabet Z ∪ {H}, satisfies P(D, E) if the rules in S of the form u → v with u, v ∈ Z ∗ form an eda R satisfying P(D, E). In the proofs of each of Theorems 1.1, 1.2 (i), 1.2 (ii), we shall apply the following result, which is essentially (part of) [11, Theorem 4.1]. Proposition 3.2. Let G be a group, finitely generated over X, H a subgroup of G, and let S be an extended Dehn algorithm for G with respect to H. Suppose that there exists a constant k such that, for any word w over X, we have |w1 | ≤ k min{|g|X : g ∈ G, g ∈ Hw}, where w1 is the word over Z defined by Hw1 = S(Hw). Then S solves the generalised word problem and can be programmed on a real-time Turing machine. 8 Proof. Since, for any w ∈ GWP(G, H) the minimal length representative of Hw is the identity element, it is immediate from the inequality that S solves GWP(G, H). That an eda satisfying that condition can be programmed in realtime is then an immediate consequence of [11, Theorem 4.1]; in fact as stated that theorem applies only to edas to solve the word problem, but it is clear from the proof that it applies also to GWP(G, H). 4 The proof of Theorem 1.1 Suppose that G = hXi satisfies the hypotheses of Theorem 1.1, and that H = H0 is the selected parabolic subgroup, generated by X0 ⊂ X. We start with some adjustments to X that are necessary to ensure that it satisfies the conditions we need for our arguments. These adjustments all consist of appending generators that lie in one of the parabolic subgroups. Firstly, we extend X to contain the finite subset H′ of H defined in Property 2.3. Secondly, we adjoin to X the elements of the Hi that are required by Proposition 3.1. (As stated in Proposition 3.1, these include all elements in the finite intersections Hi ∩ Hj (for i 6= j) of pairs of parabolic subgroups.) Associated with this choice of X, Properties 2.2 and 2.3 specify sets Ψ and Φ b and X respectively, and associated parameters of non-geodesic words over X λ, c. We then define ǫ = ǫ(λ, c + 1, 0) to be the constant in the conclusion of Property 2.1. We now apply Proposition 3.1 to find an eda R for G that solves W P (G, X) and that satisfies P(D, E) for parameters D, E with D ≥ E, where E > max{ǫ, 2}, and E is also greater than the length of any word in Φ, and greater than the X-length of any component of any word in Ψ. (The reasons for these conditions will become clear during the proof.) We can use all properties of R that are proved in [9, Section 5] in particular that, by [9, Lemma 48], for a word w ∈ X ∗ , if where v is a maximal Zi -subword for some i ∈ I, then there with Ri (v ′ ) = v, where Ri is the associated eda for Hi . So v represents the element v ′ ∈ Hi . and we observe R(w) = u1 vu2 exists v ′ ∈ Xi∗ unambiguously We create an eda S for G with respect to H by adding to R all rules of the form Hz → H with z ∈ Z0 . Since none of these new rules actually applies to words over X, it is clear that the eda S also satisfies P(D, E). We shall verify that S solves GWP(G, H, X), and that it can be programmed on a real-time Turing machine. Now suppose that w ∈ X ∗ and that S(Hw) = Hw1 . In order to verify that our eda S solves GWP(G, H, X) and can be programmed on a real-time Turing machine, it is sufficient by Proposition 3.2 to establish the existence of a constant k that is independent of the choice of w, such that |w1 | ≤ k min{|g|X : g ∈ Hw}. (†) 9 So the aim of the rest of the proof is to prove the inequality (†). Observe that a maximal subword pi of w1 that is written over Zi∗ for some i may contain symbols from Zi \ Xi , but any such symbols must have arisen from application of the rules in the eda Ri to words over Xi∗ , and so pi unambiguously represents an element of Hi . Following [9], we decompose w1 as a concatenation w1 = v0 p1 v1 · · · pm vm , (∗) where p1 is defined to be the first subword of w1 (working from the left) that is written over Zi1 for some i1 ∈ I, has maximal length as such a subword, and represents an element of Hi1 of Xi1 -length greater than E. (Note that the words vi are denoted by gi in [9].) The subwords pi for i > 1 are defined correspondingly with respect to the suffix remaining after removing the prefix v0 p1 v1 · · · pi−1 from w1 . Then any (maximal) subword of any vj that is written over any Zi represents an element of Hi of Xi -length at most E ≤ D, and so P(D, E) (3) ensures that the subword is written over Xi and is an Xi -geodesic. Hence vj is a word over X with no parabolic shortenings. Then (since E > 2) property P(D, E) (4) ensures that vj is also a 2-local geodesic. Also, since Φ is a set of non-geodesic words over X of length at most E, vj cannot contain any subword in Φ. It follows by Property 2.3 that each vbj is a 2-local geodesic. Now, for each j, choose qj to be a geodesic word over Xij that represents the same element hj of Hij as pj (so, by Property 2.3, qj is also an X-geodesic). Define w2 = v0 q1 v1 · · · qm vm . We already observed that each vj is written over X, and hence so is w2 . Now according to [9, Lemma 23], the X-lengths of non-identity elements of Hi are bounded below by an exponential function on the lengths of words over Zi that are their reductions by the eda for Hi . So there is certainly a positive constant k1 such that |qj | ≥ k1 |pij | for all j, and hence |w2 | ≥ k1 |w1 |. Hence it is sufficient to prove the inequality (†) above for the word w2 rather than w1 , that is, for some k ′ , show that |w2 | ≤ k ′ min{|g|X : g ∈ Hw}. (††) b representing With this in mind, our next step is to construct a word w f2 over X, the same element of G as w2 , and for which we can use Property 2.2. We define w f2 = vb0 h1 vb1 · · · hm vc m. Note that we would have w f2 = w c2 if the subwords qj were parabolic segments of w2 , but this might not be true if the first generator in some qj were in more than one parabolic subgroup, and then we could not be sure that w c2 would satisfy the required conditions. We call the process of conversion of w2 to w f2 modified compression and we call the subwords qj of w2 together with the parabolic segments of the subwords vj the modified parabolic segments of w2 . Observe that these modified parabolic segments are all X-geodesics. 10 We want to apply Property 2.2 to w f2 , so we must show first that w f2 is a 2-local b If not, then w geodesic over X. f2 has a non-geodesic subword ζ of length 2, b equal in G to an X-geodesic word η of length at most 1. We saw earlier that the subwords vbj are 2-local geodesics, so ζ must contain some hj ; that is, ζ = yhj or b Then the definition of the pj as maximal Zij -subwords ζ = hj y, where y ∈ X. of w1 ensures that y 6∈ Hij , so |η| = 1. So, since λ, c + 1 ≥ 1, ζ and η are both (λ, c + 1)-quasigeodesics. But now, since hj is a component in ζ of X-length b greater than E > ǫ = ǫ(λ, c + 1, 0), we can apply Property 2.1 to the paths in Γ labelled by ζ and η, and deduce that η contains a component connected to the component hj , and so η represents an element of Hij ; hence ζ ∈ Hij , and we have a contradiction. (Alternatively, we could apply [3, Lemma 4.2] to deduce that |ζ| = 2, a contradiction.) To verify the second requirement of Property 2.2, we need to check that w f2 contains no subword in Ψ. So suppose that ξ is such a subword in Ψ. Then ξ cannot contain any of the generators hj , since hj would then be a component in ξ of X-length greater than E, by the conditions imposed on the decomposition (∗) of w1 ; but this contradicts the choice of E earlier in this proof to be greater than the X-length of any component of any word in Ψ. So ξ must be a subword of some vbj ; but in that case, ξ = u b for some subword u of vj . We saw earlier that vj has no parabolic shortenings, and hence neither does u. So from the definition of Φ2 we have u ∈ Φ2 ⊆ Φ. But we also observed earlier that vj has no subword in Φ, so we have a contradiction. b without It now follows using Property 2.2 that w f2 is a (λ, c)-quasigeodesic over X vertex-backtracking. Let w3 be a geodesic over X that represents an element of Hw2 = Hw; since it is geodesic, w3 cannot contain any subwords in Φ, and it cannot have any parabolic shortenings. So we can apply Property 2.3 to deduce that w c3 is a b and a (λ, c)-quasigeodesic without vertex-backtracking. 2-local geodesic over X Now w f2 =G hc w3 for some h ∈ H and so, since w f2 is a (λ, c)-quasigeodesic, |f w2 | ≤ λ|hc w3 | + c. b without We note that w f2 and hc w3 are both (λ, c + 1)-quasigeodesics over X b vertex-backtracking, and the initial and terminal vertices of the paths in Γ that they label coincide. So we have Properties 2.1 (2) and (3) concerning the components of the two paths. (This is why we chose ǫ = ǫ(λ, c + 1, 0) at the beginning of the proof.) We choose a geodesic word wh over X0 that represents h, and consider the words w2 and wh w3 . We want to compare the lengths of w2 and wh w3 , and we do this by examining the processes of (modified) compression of w2 and wh w3 to w f2 and w \ w3 . The word w2 can be decomposed as a concatenation h w3 = hc of disjoint subwords that are its long modified parabolic segments, its short modified parabolic segments and its maximal subwords over X \ XI ; we define a modified parabolic segment to be long if its length is greater than 4ǫ and short otherwise. 11 w f2 (quasi-geodesic) ✟✟ ✟✟ ✟✟ ✟✟ t ✟ ✟ ◗ 1Γb ◗ ◗ ◗ ◗ ◗ hc w3 (quasi-geodesic) component û, |u|X > 4ǫ P ✂ PPP ✆ PP ❅ ✂ ✆ ❅ ❅ ✂ ≤ε ✆ ≤ε ✟✟ ✟✟ ✂ ✆ ✟ ✟ ✟ ✂ ✆ ✟ ub′ b bounded coset penetration Figure 1: The paths w f2 and hc w3 in Γ: Now modified compression reduces the total length of subwords of the second b by a factor of at most 4ǫ, type, which are replaced by single elements of X, while the subwords of the third type are unchanged. So the total length of the subwords of w2 of the second and third types is bounded by 4ǫ|f w2 | ≤ 4ǫ(λ|hc w3 | + c) ≤ 4ǫ(λ|wh w3 | + c), where the second equality follows from the fact that hc w3 = w \ h w3 . Now let u be a long modified parabolic segment of w2 . Then Property 2.1 applied to w f2 and hc w3 ensures that there is a corresponding parabolic segment u′ of wh w3 such that u b and ub′ are connected components of length 1 of w f2 and hc w3 Then since u b and ub′ must be ǫ-similar, it follows that the initial and terminal points of u′ must be within X-distance ǫ of the initial and terminal points (respectively) of u. Then 4ǫ < |u| ≤ 2ǫ + |u′ |, and so |u| ≤ 2|u′ | (see Fig. 1). Since w f2 does not backtrack, distinct components of w f2 must correspond to distinct components of hc w3 , and we deduce that the total length of the long parabolic segments in w2 is bounded above by 2|wh w3 |. So |w2 | ≤ (4ǫλ + 2)|wh w3 | + 4ǫc. Now we consider wh , which is a parabolic segment of wh w3 . If |wh | > ǫ then Property 2.1 applied to (the paths labelled by) hc w3 and w f2 ensures the existence of a corresponding parabolic segment u2 in w2 , whose initial vertex is within b and whose terminal X-distance ǫ of the basepoint 1Γb of the Cayley graph Γ, vertex must be in H. Let w2 factorise as a concatenation of subwords u1 u2 u3 . Since u1 u2 is a prefix of w2 that represents an element of H, the fact that w f2 does not vertex-backtrack ensures that its subword u c1 u c2 must have length at most 1, and hence u1 is empty. But now the prefix u2 of w2 is written over the generators of H, and w2 cannot have a non-trivial such prefix, since w1 (from which it was derived) was reduced by the eda S, and we have a contradiction. So now |wh | ≤ ǫ, and we can deduce from the inequality above that |w2 | ≤ A|w3 | + B 12 for some constants A, B. Provided that |w3 | 6= 0, it follows that |w2 | ≤ (A + B)|w3 |. But if |w3 | = 0, then w2 must represent an element of H and so, since w f2 has already been proved not to vertex-backtrack, w f2 must be a word written over H of length at most 1. It follows that w2 is a word over X0 , and so, just as above, we deduce that |w2 | = 0, and so the same inequality holds. This completes our verification of the condition of (††) (and hence (†)), and the theorem is proved. 5 The proof of Theorem 1.2 (i) Let H be a quasiconvex and almost malnormal subgroup of a hyperbolic group G = hXi. It is observed in [15, Section 1, Example (III)] that G is hyperbolic relative to {H} so we can apply the results of Section 2. The proof of Theorem 1.2 (i) is very similar to that of Theorem 1.1 (although we are no longer assuming that H is virtually abelian) but is more straightforward, so we shall only summarise it here. In particular, we have Z = X so the complications arising from the elements of Z \ X that do not necessarily represent group elements do not arise. We start by extending X as before to include the finite subset H′ of H defined in Property 2.3. Since we are not applying Proposition 3.1 in this proof, the other adjustment to X is not necessary. We define Ψ, Φ, λ, c, ǫ, E as before and put D = E. The standard Dehn algorithm for solving WP(G, X) consists of all rules u → v with u, v ∈ X ∗ such that u =G v and 4δ ≥ |u| > |v|, where δ is the ‘thinness’ constant of G with respect to X (i.e. all geodesic triangles in Γ are δ-thin); see [1, Theorem 2.12]. Words w that are reduced by this algorithm are 4δ-local geodesics, and it is proved in [10, Proposition 2.1] that, if w represents the group element g, then |w| ≤ 2|g|. We define our Dehn algorithm R for WP(G, X) to consist of all rules u → v as above, with k ≥ |u| > |v|, where k = max(2D, 4δ). Then R-reduced words have the property that subwords representing group elements of X-length at most D are X-geodesics. Since D = E, it is also true that R-reduced words of length at most E are geodesic, so R has the required property P(D, E). As in the previous proof, we define S to be the eda for GWP(G, H, X) consisting of R together with rules Hx → H for all x ∈ X0 := X ∩ H. As before, we suppose that S reduces the input word Hw to Hw1 and define the decomposition (∗) of w1 with pi being maximal X0 -subwords of w1 that represent group elements of X-length greater than E. Again we let qi be geodesic words over X0 (and hence also over X) with qi =G pi . By [10, Proposition 2.1], we have |qi | ≥ k1 |pi | with k1 = 1/2, so again we have |w2 | ≥ k1 |w1 |. The remainder of the proof is identical to that of Theorem 1.1. 13 6 Proof of Theorem 1.2 (ii) As we did for Part (i) of this theorem, we prove Theorem 1.2 (ii) by constructing an eda over the alphabet X ∪ {H}, where G = hXi. As in the two earlier proofs, we verify that the conditions of Proposition 3.2 hold, to complete the proof. For a finite (inverse-closed) generating set X of an arbitrary group G, we define an X-graph to be a graph with directed edges labelled by elements of X, in which, for each vertex p and each x ∈ X, there is a single edge labelled x with source p and, if this edge has target q, then there is an edge labelled x−1 from q to p. So the Cayley graph Γ(G, X) and, for a subgroup H ≤ G, the Schreier graph Σ(G, H, X) of G with respect to H are examples of X-graphs. We shall denote the base points of the Cayley and Schreier graphs by 1Γ and 1Σ respectively. Following [6, Chapter 4], for k ∈ N, we define the condition GIB(k) (which stands for group isomorphic balls) for Σ := Σ(G, H, X) as follows. GIB(k): there exists K ∈ N such that, for any vertex p of Σ with d(1Σ , p) ≥ K, the closed k-ball Bk (p) of Σ is X-graph isomorphic to the k-ball Bk (1Γ ) of Γ(G, X). We say that Σ satisfies GIB(∞) if it satisfies GIB(k) for all k ≥ 0. The following result is proved in [6, Theorem 4.3.1.1]. Since its proof may not be readily available, we shall sketch it in Section 9. Proposition 6.1. Let H be a quasiconvex subgroup of the hyperbolic group G. Then Σ(G, H, X) satisfies GIB(∞) if and only if, for all 1 6= h ∈ H, the index |CG (h) : CH (h)| is finite. Suppose that G, H satisfy the hypotheses of Theorem 1.2 (ii). So Σ := Σ(G, H, X) satisfies GIB(∞) and, by [6, Theorem 4.1.3.3] or [13], Σ is δ-hyperbolic for some δ > 0 (that is, geodesic triangles in Σ are δ-thin). Let k be an integer with k ≥ 4δ. Let K be an integer that satisfies the condition in the definition of GIB(k), and let R = 2K. We can assume that K ≥ max(k, 2). We define our eda to consist of all rules of the following two forms: Hv1 → Hv2 , |v2 | < |v1 | ≤ R, (1) u1 → u2 , |u2 | < |u1 | ≤ k, (2) where v1 , v2 , u1 , u2 ∈ X ∗ , v1 v2−1 ∈ H, u1 =G u2 . In order to apply Proposition 3.2 we need to verify that, whenever w ∈ X ∗ and Hw is reduced according to the above eda, the length of the shortest string v over X with Hv = Hw is bounded below by a linear function of |w|. We shall use [10, Proposition 2.1]: if u (of length > 1) is a k-local geodesic in a δ-hyperbolic graph, with k ≥ 4δ, then the distance between the endpoints of u is at least |u|/2 + 1. 14 So suppose that Hw is reduced according to the eda. If w has length at most R, then since Hw is reduced by rules of type (1), Hw is geodesic in Σ, and the inequality in Proposition 3.2 holds with k = 1. So suppose that |w| > R, and let w1 be the prefix of length R of w. We aim to show that every vertex of Σ that comes after w1 on the path from 1Σ labelled w lies outside of BK (1Σ ). Choose w2 so that w1 w2 is maximal as a prefix of w subject to all vertices of w2 lying outside of BK (1Σ ). Then, since w1 is geodesic of length R = 2K, we have |w2 | ≥ K − 1, and so |w1 w2 | ≥ 3K − 1. Since w1 is geodesic in Σ, and that part of the path labelled w1 w2 that lies outside of the K-ball is a k-local geodesic in Σ (because, by GIB(k), it is isometric to the corresponding word in the Cayley graph, and our inclusion of the rules of type (2) in the eda ensures that the reduced words over X of length ≤ k are geodesics), we see that the whole of the path labelled w1 w2 is a k-local geodesic in Σ. So we can apply [10, Proposition 2.1] to deduce from the δ-hyperbolicity of Σ that dΣ (1Σ , Hw1 w2 ) ≥ |w1 w2 |/2 + 1 ≥ (3K + 1)/2 > K + 1. It follows that, if w1 w2 were not already equal to w, then it would be extendible to a longer prefix of w subject to all vertices of w2 lying outside of BK (1Σ ). So w1 w2 = w, and the above inequality gives us the linear lower bound dΣ (1Σ , Hw) ≥ |w|/2 + 1 ≥ |w|/2 on dΣ (1Σ , Hw). So the inequality in Proposition 3.2 holds with k = 2 and hence, by the preceding paragraph, it holds with k = 2 for all words w such that Hw is reduced according to the eda. The result now follows from Proposition 3.2, and this completes the proof of Theorem 1.2 (ii). 7 Proof of Theorem 1.3 Let F be a free subgroup of G = hXi with |G : F | finite, and let Y be the inverse closure of a free generating set for F ; that is the union of a free generating set with its inverses. Let K = F ∩H. The subgroup K has finite index in H, and so must (like H) be finitely generated. It easy to see that the elements in any right transversal of K in H lie in different cosets of F in G, so we can extend a right transversal T ′ = {t1 , . . . , tm } of K in H to a right transversal T = {t1 , . . . , tn } of F in G. Then any word w ∈ X ∗ can be expressed (in G) as a word in U ∗ T , where U is the set {u(i, x) : 1 ≤ i ≤ n, x ∈ X} of Schreier generators for F in G defined by the equations ti x = u(i, x)tj . (Note that X inverse-closed implies that U is inverse-closed.) Then, by substituting the reduced word in Y ∗ for each u(i, x), the word w can be written as a word vt in Y ∗ T (where v is not necessarily freely reduced). The first step to recognise whether w ∈ H is to rewrite it to the form vt, as above, using a transducer. Then w ∈ H if and only if t ∈ T ′ and v ∈ K. It remains for us to describe the operation of a deterministic pushdown automaton (pda) N to recognise those words v in Y ∗ that lie in the subgroup K of the free group F . Note that this machine operates simultaneously, rather than sequentially, with the transducer, and it follows from the fact that context-free 15 languages are closed under inverse gsms [12, Example 11.1, Theorem 11.2] that the combination of the two machines is a pda. By [2] or [8, Proposition 4.1], any finitely generated subgroup K of a free group is L-rational, where L is the set of freely reduced words over a free generating set; that is, the set K ∩ L is a regular language. In our case, we choose L to ber the freely reduced words over Y . We shall build our pda N out of a finite state automaton (fsa) M for which L(M ) ∩ L = K ∩ L (where L(M ) is the set of words accepted by M ). The construction is (in effect) described in the proof of [8, Theorem 2.2] that K is L-quasiconvex. The L-quasiconvexity condition is equivalent to the property that all prefixes of freely reduced words that represent elements of K lie within a bounded distance of K in the Schreier graph Σ := Σ(F, K, Y ). Equivalently, a freely reduced word v over Y represents an element of K precisely if it labels a loop in Σ from 1Σ to 1Σ that does not leave a particular bounded neighbourhood B = Bd (1Σ ) of 1Σ . Suppose that g1 = 1 and that K = Kg1 , Kg2 , . . . , Kgr are the right cosets corresponding to the bounded neighbourhood B of 1Σ within Σ that is identified above. The fsa M is defined as follows. (i) The states of M are denoted by σ1 , . . . , σr , σ̂. (ii) The states σ1 , . . . , σr correspond to the right cosets Kgi of K in F , where each gi is in the finite subset B identified above; indeed we may identify σi with the coset Kgi , and then use the name B both for the set {Kg1 , . . . , Kgr } of cosets and for the set {σ1 , σ2 , . . . , σr } of states. The state σ1 (which corresponds to the subgroup K) is the start state and the single accepting state. (iii) For 1 ≤ i, j ≤ r and y ∈ Y , there is a transition σiy = σj if and only if −1 Kgi y = Kgj . It follows from this that σiy = σj if and only if σjy = σi . (iv) σ̂ is a failure state, and is the target of all transitions that are not defined in (iii), including those from σ̂. We see that, as a word is read by M , the automaton keeps track of the coset of Σ that contains Kw, where w is the prefix that has been read so far, so long as that coset is within the finite neighbourhood B of 1Σ , and in addition so are all cosets Kw′ for which w′ is a prefix of w. The L-quasiconvexity of K ensures that a word in L is accepted by M if and only if it represents an element of K. In fact any word over Y that is accepted by M must represent an element of K. However words over Y that are not freely-reduced (that is, not in L) and do not stay inside of B will be rejected by M , even when they represent elements of K. In order to construct a machine that accepts all words v over Y within K, and not simply those that are also freely-reduced, we need to combine the operation of the fsa M above with a stack, which we use to compute the free reduction. We construct our pda N to have the same state set B ∪ {σ̂} as M , again with σ1 = Kg1 = K as the start state and sole accepting state. The transitions from the states σi = Kgi are as in M . We need however to describe the operation 16 of the stack, and transitions from the state σ̂, which is non-accepting, but no longer a failure state. The stack alphabet is the set Y ∪ (Y × B). The second component of an element of Y × B is used to record the state M is in immediately before it enters the state σ̂. In addition, we use the stack to store the free reduction of the prefix of v that has been read so far. The operations of the pda N that correspond to the various transitions of M are described in the following table. The absence of an entry in the ‘push’ column indicates that nothing is pushed. Transition of M σiy = σj σiy y = σ̂ σ̂ = σ̂ Input state σi σi σi σ̂ σ̂ σ̂ σ̂ Input symbol y y y y y y y Pop y −1 y ′ 6= y −1 y′ (y −1 , σi ) (y ′ , σi ), y ′ 6= y −1 y −1 y ′ 6= y −1 Push y′y y ′ (y, σi ) (y ′ , σi )y y′y Output state σj σj σ̂ σi σ̂ σ̂ σ̂ Note that we have not specified that y ′ 6= y −1 in line 3, but in fact the condition y ′ = y −1 does not arise in this situation. Since there can be a symbol in Y × B on the stack only when N is in state σ̂, it is not possible to pop such a symbol when N is in state σi , so there are no such entries in the table. The fact that N recognises GWP(F, K, Y ) follows from the fact that N accepts w if and only if M accepts w, where w is the free reduction (in L) of w. We prove this by induction on the number k of reductions of the form w1 yy −1 w2 → w1 w2 with y ∈ Y that we need to apply to reduce w to w. The case k = 0 of our induction follows from the fact that L(M ) ∩ L = K ∩ L, combined with the observation that, if w is freely reduced, then w leads to the same state of M as it does of N . For in that case the only possible transitions as we read w are of the types described in lines 2,3,5,7 of the table. For k > 0 it is enough to prove the statement (∗): if wy ∈ L, then the configuration of N after reading wyy −1 is identical to the configuration after reading w. It follows from (∗) that a word w1 yy −1 w2 in which yy −1 is the leftmost cancelling pair is accepted by N if and only if w1 w2 is accepted by N , and hence we have the inductive step we need. We can check the statement (∗) with reference to the table. There are up to seven possibilities for the type of transition of N as the final symbol y of wy is read. 17 For the first two of these, N is in state σi after reading w, and moves to a state σj . Since wy is in L, the top stack symbol after reading w is not y −1 . Hence the transition must be of the type described in line 2 of the table, and not as in line 1, that is, y ′ 6= y −1 is popped, and then y ′ y is pushed. Recalling that σiy = σj −1 in M if and only if σjy = σi , we see that the next transition of N , from wy on y −1 , is of the type described in line 1. Then the symbol y is popped, the symbol y ′ is again on the top of the stack, and N returns to the state σi We consider similarly the remaining five possibilities for the transition from w on y ′ , and the subsequent transitions on y ′−1 , and verify (∗) for each of those configurations. This completes the proof of Theorem 1.3. 8 Proof of Theorem 1.4 Our proof of Theorem 1.4 has the same structure as the proof in [14] that groups with WP(G) context-free are virtually free, and it would be helpful for the reader to be familiar with that proof. We shall prove that G has more than one end. Assuming that to be true, we use Stalling’s theorem [18] to conclude that G has a decomposition as an amalgamated free product G = G1 ∗K G2 , or as an HNN-extension G = G1 ∗K,t , over a finite subgroup K. Since G1 (and G2 ) are easily seen to be quasiconvex subgroups of G, it is not hard to show that the hypotheses of the theorem are inherited by the subgroup H ∩ G1 of G1 (and H ∩ G2 of G2 ), and so they too have more than one end, and we can apply the Dunwoody accessibility result to conclude that G is virtually free. So we just need to prove that G has more than one end. Fix a finite inverseclosed generating set X of G. Then, as in [14], we consider a context-free grammar in Chomsky normal form with no useless variables that derives GWP(G, H, X). More precisely, we suppose that each rule has the form S → ε (where S is the start symbol), z → z ′ z ′′ or z → a, where z, z ′, z ′′ are variables, and a is terminal, and we assume that S does not occur on the right hand side of any derivation. When a word w′ can be derived from a word w by application of a single grammatical rule we write w ⇒ w′ , and when a sequence of such rules is needed we write w ⇒∗ w′ . Let z1 , . . . , zn be the variables of the grammar other than S and, for each zi let ui be a shortest word in X ∗ with zi ⇒∗ ui . Let L be the maximum length of the words ui . Let w ∈ GWP(G, H, X) with |w| > 3, and fix a derivation of w in the grammar. We shall define a planar X-graph ∆ with an associated X-graph homomorphism φ : ∆ → Σ := Σ(G, H, X). We start with a simple plane polygon with a base point, and edges labelled by the letters of w, and with φ mapping the base-point of ∆ to 1Σ . Note that φ is not necessarily injective. If zi occurs in the chosen derivation of w, then we have w = vvi v ′ with zi ⇒∗ vi ; two such words vi and vj are either disjoint as subwords of w or related by 18 containment. Since zi ⇒∗ ui , we also have vui v ′ ∈ GWP(G, H, X). So we can draw a chord labelled ui in the interior of ∆ between the two ends of the subpath labelled vi , and φ extends to this extension of ∆. If we do this for each such zi for which 1 < |vi | < |w| − 1 then, as in [14, Theorem 1], we get a ‘diagonal triangulation’ of ∆, in which the sides are either boundary edges of ∆ or internal chords of length at most L. (But note that, for the first derivation S → z1 z2 , say, if |v1 | > 1 and |v2 | > 1 then, to avoid an internal bigon, we omit the chord labelled u2 .) Suppose, for a contradiction, that G has just one end; that is, for any R, the complement in Γ(G, X) of any ball of radius R is connected. Then, for any R, we can find a word w1 w2 w3 over X with w1 w2 w3 =G 1 which, starting at 1Γ , labels a simple closed path in Γ(G, X), where |w1 | = |w3 | = R, w3 w1 is geodesic, and no vertex in the path labelled w2 is at distance less than R from 1Γ . Choose such a path with R = 3L + 1. Choose k ′ such that the whole path lies in the ball Bk′ (1Γ ) of Γ(G, X), and let k = k ′ + L. Then, since by Proposition 6.1 Σ(G, H, X) satisfies GIB(k), there exists K such that, for any vertex p of Σ(G, H, X) with d(1Σ , p) ≥ K, the ball Bk (p) of Σ(G, H, X) is X-graph isomorphic to the ball Bk (1Γ ) of Γ(G, X). Choose such a vertex p, and consider the path labelled w1 w2 w3 of Σ(G, H, X) that is based at p, as in Fig. 2. Choose a vertex q on the path labelled w1 w2 w3 with d(1Σ , q) minimal, and let w4 be the label of a geodesic path in Σ(G, H, X) from 1Σ to q. Then, for some cyclic permutation w′ of w1 w2 w3 , we have a closed path in Σ(G, H, X) based at 1Σ and labelled w4 w′ w4−1 . We apply the above triangulation process to a planar X-graph ∆ for w4 w′ w4−1 . Since q is the closest vertex to 1Σ on the loop labelled by w′ , and the path from 1Σ to q in the Cayley graph labelled by w4 is geodesic, every vertex on that path is as close to q as to any other vertex of w′ , and so any vertex of w4 that can be connected by the image of a chord of ∆′ to a vertex of w′ must be within distance at most L of q. Let r be the first such vertex on w4 (as we move from 1Σ to q), and let w5 be the suffix of w4 that labels the path along w4 from r to q. Then |w5 | ≤ L. So we can derive from our triangulation of ∆ a triangulation of a planar diagram ∆′ for the word w5 w′ w5−1 , and there is an associated X-graph homomorphism φ′ that maps this to the corresponding subpath in Σ(G, H, X). (Note that the images of w5 and w5−1 under φ′ are equal, but that φ′ is injective when restricted to w′ .) By our choice of k = k ′ + L, the image of φ′ lies entirely within Bk (p), which is X-graph isomorphic to Bk (1Γ ). So the distances in Σ(G, H, X) between vertices in this image are the same as in any path with the same label in Γ(G, X). As in [14], we colour, using three colours, the vertices of the boundary paths of ∆′ that are labelled w1 , w2 , w3 (where vertices on two of these subwords get both associated colours), and we colour the vertices on w5 and w5−1 with the same colour (or colours) as q. As in [14, Lemma 5], we conclude that there is a triangle in the triangulation whose vertices use all three colours between them. One (or even two) of these vertices could be on the subpath labelled w5 , and two 2-coloured vertices in the triangle might coincide, but, since any vertex on 19 w2 ❘ P PP w1 P✐ PP ✐P P PP tP Pw tP 3 P p PP P ✐P ✂✍ ✂ q P P ✂ ✂ w5 ✍ ✂ ✂t ✂ ✂r ✂ ✂ w4 ✂ ✍ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂✂ ✂t1 Σ Figure 2: Triangulation in Σ(G, H, X) w5 is within distance L of q, replacing vertices on w5 by q as necessary, we end up with a triangle of three (not necessarily distinct) vertices p1 , p2 , p3 with pi on wi , and with d(pi , pj ) ≤ 2L for each i, j. At least one of p1 , p3 must be within distance L of p. But then d(p, p2 ) ≤ 3L, contradicting our assumption that w2 is outside B3L (p). This completes the proof of Theorem 1.4. 9 Sketch of proof of Proposition 6.1 Suppose first that |CG (h) : CH (h)| is infinite for some 1 6= h ∈ H, and let w be a word representing h. Then, for any K > 0, there exists a word v ∈ CG (h) labelling a path in Σ := Σ(G, H, X) from 1Σ to a vertex p with d(1Σ , p) > K, and there is a loop labelled w based at p in Σ, but no such loop based at 1Γ in Γ := Γ(G, X). So GIB(|w|) fails in Σ. Suppose conversely that GIB(k) fails in Σ for some k. Then there are vertices p of Σ at arbitrarily large distance from 1Σ such that the ball Bk (p) in Σ is not X-graph isomorphic to the ball Bk (1Γ ) in Γ. So the natural labelled graph morphism Bk (1Γ ) → Bk (p) with 1Γ 7→ p is not injective, and hence two distinct vertices of Bk (1Γ ) map to the same vertex of Bk (p). So, for any such vertex p, there is at least one labelled loop based at p, within Bk (p), such that the corresponding labelled path based at in Bk (1Γ ) in Bk (1Γ ) is not a loop in Γ. Since the number of words that can label loops in a ball of radius k in Σ is finite, some word w with w 6=G 1 must label loops based at p for infinitely many vertices p of Σ, and we can choose w to be geodesic over X. Now for any integer N , there is a word v of length greater that N , labelling a geodesic in Σ from 1Σ to a vertex p, from which there is a loop in Σ labelled by w. 20 C t tD ✲ w v v ✻ ✻ u ✛ B t t A = 1Γ Figure 3: The geodesic quadrilateral ABCD For such a word v, we have hvw = v for some h ∈ H. Let u be a geodesic word labelling h. Then we have a geodesic quadrilateral with vertices A = 1Γ , B, C, D in Γ(G, X) with sides AB, BC, CD, AD labelled u, v, w, v, respectively, as shown in Fig. 3. By the hyperbolicity of G, each vertex of AB lies within a distance 2δ of some vertex on BC, CD or DA, where δ is the constant of hyperbolicity. Furthermore, since H is quasiconvex in G, there is a constant λ, such that each vertex of AB is within a distance λ of a vertex of Γ representing an element of H. Since each vertex of w lies at distance at least |v| − k from any vertex in H, by choosing |v| > k + 2δ + λ we can ensure that none of the vertices of AB is 2δ-close to any vertex of CD. So the vertices of AB must all be 2δ-close to vertices in BC or DA. But, since v labels a geodesic path from 1Σ in Σ, at most 2δ + λ vertices on BC or on DA can be within 2δ + λ of a vertex in H. So each vertex of AB is at distance at most 2δ from one of at most 4δ + 2λ vertices and, since the total number of vertices in Γ with that property is bounded, we see that |AB| = |u| is bounded by some expression in |X|, δ and λ. By hyperbolicity of G, the two paths BC and AD labelled v must synchronously L-fellow travel for some L (which depends on the upper bounds on |w| and |u|). Let m > 0. Then, by choosing v sufficiently long, we can ensure that some word u′ appears as a word-difference between BC and AD at least m times; that is, v has consecutive subwords v0 , . . . , vm , v ′ , such that v = v0 v1 v2 · · · vm v ′ , and hv0 v1 v2 · · · vi u′ =G v0 v1 v2 · · · vi for each i with 0 ≤ i ≤ m. The case i = 0 gives u′ = v0−1 h−1 v0 , and it follows from this that gi := v0 (v1 v2 · · · vi )v0−1 ∈ CG (h) for 1 ≤ i ≤ m. Also, since v labels a geodesic in Σ, the elements v0 v1 , v0 v1 v2 , . . . v0 v1 v2 · · · vm lie in distinct cosets of H and hence so do the gi . Since we can choose m arbitrarily large, this contradicts the finiteness of |CG (h) : CH (h)|. 21 Acknowledgements The first author was supported by the Swiss National Science Foundation grant Professorship FN PP00P2-144681/1, and would like to thank the mathematics departments of the Universities of Newcastle and Warwick for their support and hospitality. References [1] J. Alonso, T. Brady, D. Cooper, V. Ferlini, M. Lustig, M. Mihalik, M. Shapiro and H. Short, “Notes on word-hyperbolic groups”, in E. Ghys, A. Haefliger and A. Verjovsky, eds., “Proceedings of the Conference “Group Theory from a Geometric Viewpoint” held in I.C.T.P., Trieste, March 1990, World Scientific, Singapore, 1991. [2] A.V. Anisimov and F.D. Seifert. Zur algebraischen Charakteristik der durch kontext-freie Sprachen definierten Gruppen. Elektron. Informationsverarb. Kybernet., 11:695–702, 1975. [3] Y. Antolı́n and L. Ciobanu, Finite generating sets for relatively hyperbolic groups and applications to conjugacy languages, Trans. Amer. Math. Soc., Volume 368, Number 11 (2016), 7965–8010. [4] M.J. Dunwoody. The accessibility of finitely presented groups. Invent. Math., 81:449–457, 1985. [5] B. Farb, Relatively hyperbolic groups. Geom. Funct. Anal. 8 (1998) no. 5, 810–840. [6] R. Foord. Automaticity and growth in certain classes of groups and monoids. PhD thesis, University of Warwick, 2000. [7] S. Friedl and H. Wilton. The membership problem for 3-manifold groups is solvable. Alg. & Geom. Topology, 16 (2016) 1827–1850. [8] S.M. Gersten and H.B. Short. Rational subgroups of biautomatic groups. Ann. of Math., 134(1):125–158, 1991. [9] O. Goodman and M. Shapiro, On a generalization of Dehn’s algorithm. Internat. J. Algebra Comput., 18 (2008) 1137–1177. [10] D.F. Holt, Word-hyperbolic groups have real-time word problem. Internat. J. Algebra Comput. 10 (2000) 221–227. [11] D.F. Holt and S. Rees, Solving the word problem in real time, J. London Math Soc. 63 (2001) 623–639. [12] John E. Hopcroft and Jeffrey D. Ullman, Introduction to automata theory, languages and computation, Addison-Wesley, 1979. [13] I. Kapovich. The geometry of relative Cayley graphs for subgroups of hyperbolic groups, http://arxiv.org/abs/math/0201045v2. 22 [14] D.E. Muller and P.E. Schupp. Groups, the theory of ends, and context-free languages. J. Comp. System Sci., 26:295–310, 1983. [15] D. Osin, Relatively hyperbolic groups: intrinsic geometry, algebraic properties and algorithmic problems. Mem. Amer. Math. Soc. 179 (2006) no. 843, vi+100pp. [16] E. Rips. Subgroups of small cancellation groups, Bulletin London Math. Soc., 14(1):45–47, 1982. [17] Arnold L. Rosenberg, Real-time definable languages, J. Assoc. Comput. Mach. 14 (1967) 645–662. [18] J. Stallings. Group Theory and Three-Dimensional Manifolds, volume 4 of Yale Mathematical Monographs. Yale University Press, 1971. Laura Ciobanu, Mathematical and Computer Sciences, Colin McLaurin Building, Heriot-Watt University, Edinburgh EH14 4AS, UK E-mail address: [email protected] Derek Holt, Mathematics Institute, Zeeman Building, University of Warwick, Coventry CV4 7AL, UK E-mail address: [email protected] Sarah Rees, School of Mathematics and Statistics, University of Newcastle, Newcastle NE1 7RU, UK E-mail address: [email protected] 23
4math.GR
Performance Gains of Optimal Antenna Deployment for Massive MIMO Systems Erdem Koyuncu arXiv:1708.06400v1 [cs.IT] 21 Aug 2017 Department of Electrical and Computer Engineering, University of Illinois at Chicago Abstract—We consider the uplink of a single-cell multi-user multiple-input multiple-output (MIMO) system with several single antenna transmitters/users and one base station with N antennas in the N → ∞ regime. The base station antennas are evenly distributed to n admissable locations throughout the cell. First, we show that a reliable (per-user) rate of O(log n) is achievable through optimal locational optimization of base station antennas. We also prove that an O(log n) rate is the best possible. Therefore, in contrast to a centralized or circular deployment, where the achievable rate is at most a constant, the rate with a general deployment can grow logarithmically with n, resulting in a certain form of “macromultiplexing gain.” Second, using tools from high-resolution quantization theory, we derive an accurate formula for the best achievable rate given any n and any user density function. According to our formula, the dependence of the optimal rate on the user density function f is curiously only through the differential entropy of f . In fact, the optimal rate decreases linearly with the differential entropy, and the worst-case scenario is a uniform user density. Numerical simulations confirm our analytical findings. Index Terms—Multiple-antenna systems, massive MIMO, distributed antenna systems, locational optimization, quantization. I. I NTRODUCTION Massive multiple-input multiple-output (MIMO) is a recently-proposed [1] promising method that can greatly improve the energy efficiency, spectral efficiency, and coverage of cellular networks [2]. The defining feature of massive MIMO is the large number of base station antennas, which naturally provides spatially-orthogonal channels to different users. This enables interference-free inter-cell communication. The existence of many antennas comes with the opportunity of distributing them to different geographical locations. The idea of utilizing such a distributed antenna system (DAS) as opposed to a colocated antenna system (CAS) predates massive MIMO or even “regular” MIMO itself, and goes back to at least [3]. Another early work [4] studies the signalto-noise ratios (SNRs) and the signal-to-interference ratios (SIRs) for a DAS where each antenna transmits the same message. Due to reduced distance between the users and the base station, a DAS can significantly improve coverage and power-efficiency, and even reduce intra-cell interference [5]. With the advent of multi-user MIMO and massive MIMO techniques, DAS design and analysis have drawn renewed interest. Achievable rates for a circular DAS and the corresponding optimal antenna radii have been studied in [6]–[9]. These works show that using circular DAS can greatly improve upon a CAS in terms of the sum rate. However, the improvement is only a fixed constant and does not grow asymptotically with the number of distinct antenna locations. Lloyd-algorithm based numerical approaches to antenna location optimization can be found in [10], [11]. Another numerical approach to optimal antenna placement based on stochastic approximation theory can be found in [12]. The performance of circular antenna arrays with or without a central antenna has been studied in [13]. In [14], upper bounds on the single-user capacity and approximations to the sum capacity have been obtained for both randomly-distributed and colocated antenna systems. It is demonstrated that distributed antennas can provide significant gains over colocated antennas, especially when the users have channel state information (CSI). In [15], antenna locations are optimized to maximize a lower bound on the energy efficiency of a cellular DAS with two types of users. In [16], the authors provide deterministic approximations for the sum-rate of massive MIMO uplink with distributed and possibly-correlated antennas. Most of the above work have focused on a fixed antenna topology, such as a circular DAS. Clearly, a better performance can be achieved by considering base station antennas in general position. However, in a massive MIMO system, allowing all the base station antennas to be in different locations may not be feasible due to costs of backhaul implementation and land. One novelty of this work is to consider a model where N base station antennas are evenly distributed to a fixed number n of distinct locations in the N → ∞ regime. This allows us to obtain the benefits of a distributed massive MIMO system, while avoiding potentially-high implementation costs. Also, most existing work on antenna location optimization relies on numerical methods. To the best of our knowledge, when the base station antennas of a massive MIMO system are allowed arbitrary positions, a formal analysis of the benefits of antenna location optimization is not available in the literature. In this work, we present such an analysis with a particular focus on determining the achievable per-user rates. The rest of this paper is organized as follows: In Section II, we introduce the system model. In Section III, we present rigorous bounds on the achievable rates with optimized antenna locations. In Section IV, we provide a quantization-theoretical analysis of the best possible rates. In Section V, we provide simulation results. Finally, in Section VI, we draw our main conclusions. Due to space limitations, some of the technical proofs are provided in the extended version [17] of this paper. Notation: k·k is the Frobenius norm. Ak is the kth Cartesian power and |A| is the cardinality of a set A. Given b ∈ Rd and A ⊂ Rd , we let A + b , {x + b : x ∈ A}. A − b and bA are similar. Given sets A and B, A\B is the set of elements of A that are not in B. CN (0, α) is a circularly-symmetric complex Gaussian random variable with variance α2 per real dimension. log(·) is the natural logarithm, Γ(·) is the Gamma function. For a logical statement T , we let 1(T ) = 1 is T is true, and 1(T ) = 0, otherwise. µ(A) is the Lebesgue measure of a set A. For x ∈ R, we let x+ , x1(x ≥ 0). O(·) and o(·) are the standard Bachmann-Landau symbols. For sequences an , bn , the notation an ∼ bn means limn→∞ abnn = 1. II. S YSTEM M ODEL We consider a single-cell multi-user distributed MIMO system with N base station antennas. The base station antennas are divided to n groups, where each group consists of N n antennas. We assume that N is a multiple of n. This ensures that the number of antennas at each group is an integer. Given i ∈ {1, . . . , n}, suppose that the antennas in Group i are all located at the same point xi ∈ Rd , where the ambient dimension d is a positive integer (In practice, one is usually interested in the case d ∈ {1, 2, 3}.). Therefore, the N base station antennas are geographically distributed to n co-located antenna groups, where each group consists of N n antennas. The practical motivation for such a colocateddistributed architecture has been described in Section I. We study an uplink scenario where m single-antenna users simultaneously wish to communicate with the base station. Specifically, given j ∈ {1, . . . , m}, User j wishes to communicate the complex Gaussian symbol sj ∼ CN (0, 1) to the base station. Following the massive MIMO literature, we assume that each user transmits withp normalized power P/N . Thus, User j transmits the signal sj P/N over its antenna. Given i ∈ {1, . . . , n}, j ∈ {1, . . . , m}, and ` ∈ {1, . . . , N n }, let hji` ∈ C be the channel gain between User j and Antenna ` of Group i. We assume that hjil ∼ CN (0, kxi − uj k−r ), where r ≥ 0 is the path-loss exponent, and uj ∈ Rd is the location User j. p The channel input-output relationships are Pof m yi` = j=1 hji` sj P/N + τi` , where τi` ∼ CN (0, 1) is the noise at the `th antenna of Group i. We assume that all the channel gains, noises, and the data symbols are independent. We consider the massive MIMO regime where the number of base station antennas N grows to infinity. Meanwhile, the number of users m and the number of antenna groups n remain fixed N -independent constants. Under such conditions, using zero forcing at the base station, a reliable data rate of N  n n 1 XX nats −r log 1 + P lim kxi − uj k N →∞ N sec · Hz i=1  (1) `=1 is achievable for User j, as N → ∞ [8, Proposition 1]. Noting that the summand in (1) is independent of `, the achievable rate in (1) for a generic user at location u simplifies to ! n P X 1 R(u, X ) , log 1 + , (2) n i=1 kxi − ukr where X , {x1 , . . . , xn } is the set of the distinct locations of base station antennas. The achievabilities of (1) or (2) require the typical assumptions of full CSI at the base station and perfect cooperation among the base station antennas. We model the user location as a random variable with a certain probability density function f over the cell. We also assume that the cell shape S is bounded. Thus, S ⊂ [0, M ]d , where M ≥ 0 is finite, and the density f vanishes outside S. Given a deployment X of base station antennas, the average rate of a typical user can then be expressed as Z R(X ) , R(u, X )f (u)du (3) S ! Z n 1 P X f (u)du (4) = log 1 + n ku − xi kr S i=1 Our goal is to find the optimal deployment of antennas that maximize the average rate (In order to avoid unnecessary technicalities, we assume that such an optimal deployment exists.). In other words, we wish to determine Rn , max R(X ), X (5) and the structure of deployments that can achieve (5). III. B OUNDS ON THE B EST P ER -U SER R ATES We first present the achievable performance gains through an optimal deployment of antennas. Clearly, the best per-user rate Rn is a monotonically non-decreasing function of n. This leads to the lower bound Rn ≥ R1 , which is achievable when all the base station antennas are colocated to a certain unique optimal location. A natural starting point may be to improve upon this best-possible rate R1 with colocated antennas. It has been previously established [6]–[9] that a circular array of antennas can improve upon the rate R1 . Unfortunately, the improvement is only an additive constant. We will show in the following that Rn grows at least proportionally to log n. Therefore, the per-user rate can, in fact, be arbitrarily large. As also suggested several times in different contexts (see, e.g., [14]), the idea is to distribute the antenna groups “evenly” throughout the cell. For example, in two dimensions, we can position the n groups of base station antennas in a uniform square lattice so that, for any user at location u, there exists 1 a group of base station antennas that is at most O(n− 2 )-far. r According to (2), this guarantees a rate of O(log(1+P n 2 −1 )), regardless of the location of the user. It follows that for r > 2, the per-user rate is unbounded as n → ∞, growing at least as ( 2r −1) log n. In contrast, for colocated and circular topologies, the nearest base station antenna is O(1)-apart for a positive fraction of user locations, which leads to a bounded rate. Extension of the above idea of a uniform square lattice to any dimension leads to the following result. Proposition 1. For any n ≥ 1, we have   r P n d −1 Rn ≥ log 1 + . Mr (6) Proof. The proof is provided in [17, Appendix A]. According to Proposition 1, we can observe that Rn grows at least as ( dr − 1)+ log n + O(1). Therefore, the optimal peruser rate grows at least logarithmically with the number of admissable antenna locations, indicating an unbounded rate improvement over centralized or circular antenna arrangements. A fundamental question is then whether the O(log n) growth of the rate is the best possible. The affirmative answer is provided by the following result. Proposition 2. Let η , µ(S) supu∈S f (u). We have   ηr P Rn ≤ log n + η log 1 + + 2ηr, ∀n ≥ 1. r d (µ(S)) d (7) Proof. The proof is provided in [17, Appendix B]. Together, Propositions 1 and 2 reveal that Rn grows exactly logarithmically with the number of antenna locations n. This motivates us to capture the constant multiplicative factor of log n that appears in the expression of Rn through the quantity Rn . n→∞ log n ρ , lim (8) We have assumed that the limit exists for a simpler exposition. From a mathematical point of view, the definition in (8) is very similar to the definition of the multiplexing gain of a regular MIMO system. The only difference is that (8) describes the factor of log n in the data rate formula, where as the multiplexing gain usually refers to the factor of log P . The quantity ρ can also be considered as a certain form of macrodiversity gain as it emerges due the macroscale (much larger than carrier wavelength) separation of antennas. Since, to the best of our knowledge, there is no unique established definition of a macrodiversity gain, and since the nature of ρ is very similar to that of the multiplexing gain, we refer to ρ as the macromultiplexing gain of the system. The macromultiplexing gain provides a precise asymptotic characterization of the gains that are achievable through locational optimization of antennas. The following theorem, which immediately follows from Propositions 1 and 2, describes the bounds on ρ that we have obtained so far. Theorem 1. For any user density f , we have r + ηr ≤ρ≤ −1 , d d where η = µ(S) supu∈S f (u), and S ⊂ Rd is the cell. (9) Note that η ≥ 1 with equality if f is uniform on S. Thus, for a uniform f , the upper and lower bounds on ρ differ by only unity. In general, depending on how “non-uniform” f is, the gap between the bounds may be larger than 1. It does not seem straightforward to close this gap even in the case of a uniform distribution, at least by completely formal means. On the other hand, our analysis in the next section suggest + that, in fact, ρ = dr − 1 , regardless of the user density. IV. A NALYSIS OF THE B EST P ER -U SER R ATES USING HIGH - RESOLUTION Q UANTIZATION T HEORY The bounds on Rn in Propositions 1 and 2 do not provide much insight on the exact value of Rn for a given finite n, as they are not tight in general. Also, despite the fact that the bounds provide the asymptotic formula Rn = ρ log n + O(1) via Theorem 1, they are not strong enough to reveal the exact value of ρ, or the nature of O(1) term. The goal of this section is to find an accurate formula for Rn . To achieve accuracy, we utilize certain approximations that hold for large values of the design parameters n and r. Each step of approximation is described in the following together with the corresponding justifications and analysis. A. Reduction to a Quantization Problem The first step involves approximating the cost function in (4) via another function that allows a quantization-theoretical approach. For this purpose, we begin by noting the bound n X 1 1 ≥ (10) r ku − xi k mini∈{1,...,n} ku − xi kr i=1 that holds for any u and X . When searching for an optimal set of locations, our idea is to use the approximation n X 1 1 ' . (11) r r ku − x k min i i∈{1,...,n} ku − xi k i=1 Clearly, (11) is potentially inaccurate for an arbitrary X . For example, if all xi are equal, then the left hand side of (11) is n times the right hand side. However, as also discussed in the beginning of Section III, we expect the optimal antenna locations to not be superimposed, but instead be evenly distributed throughout the cell S through some lattice-like structure. For such scenarios, the following lemma shows that (11) is, in fact, an asymptotic equality as r → ∞. Lemma 1. Let Λ = {βBx : x ∈ Zd } be a lattice in Rd , where β > 0, and B ∈ Rd×d has unit determinant. For r > d, there is a constant K ≥ 1 that is independent of β, and a set A of measure zero such that for every u ∈ Rd \A, we have X K 1 ≤ . (12) ku − xkr minx∈Λ ku − xkr x∈Λ Moreover, for every u ∈ Rd \A, we have X 1 1 ∼ as r → ∞. ku − xkr minx∈Λ ku − xkr (13) x∈Λ Proof. The proof is provided in [17, Appendix C]. As a result of (13), for antenna locations X of interest, we may approximate R(X ) in (4) via   Z P 1 R(X ) ' log 1+ f (u)du, (14) n min1≤i≤n ku − xi kr S We expect (14) to be tight as r → ∞. For a finite r, according to (12), we expect the approximation error to be at most a constant n-independent rate. Numerical results in Section V suggest that the error is negligible even for small r. Second, as also shown in the proof of Proposition 1 in [17, Appendix A], the term n min1≤i≤n ku−xi kr in (14) can grow r at fast as O(n d −1 ), which means that the “1+” term inside the logarithm will be insignificant. As a result, we have e ) + log P , R(X ) ' rR(X (15) n where Z e ), R(X log S 1 f (u)du. mini∈{1,...,n} ku − xi k (16) e ) over all X as R en , maxX R(X e ), we obtain Maximizing R(X en + log P . Rn ' r R (17) n We now make a slight digression into a different but very relevant problem. Given X = {x1 , . . . , xn } as usual, let Z R(X ) , min ku − xi kr f (u)du. (18) S i∈{1,...,n} Determining the performance and structure of the minimizers of R(X ) is the fundamental problem of quantization theory and has been the subject of many publications [18]. Exact solutions are out of reach for a given arbitrary n and density f , but tight asymptotic results are known for the so-called high-resolution regime n → ∞, see. e.g. [19]. e ) in (16) is very similar to The problem of maximizing R(X the problem of minimizing R(X ) in (18). The only difference is that in (16), one considers a monotonic function (logarithm) of the minimum of norms instead of a mere minimum of rth powers of norms in (18). It is thus natural to expect that the methods and ideas for minimizing (18) can successfully be applied for maximizing (16). In the following, we first consider a uniform user density over a cubic cell S = [0, M ]d , M > 0. We shall then proceed to a general non-uniform density f . B. Solution to the Quantization Problem: Uniform Case We begin with some definitions that will be useful for our discussion in this section. Given X = {x1 , . . . , xn }, let  Vi (X ) , u ∈ S : ku − xi k ≤ ku − xj k, ∀j ∈ {1, . . . , n} , i ∈ {1, . . . , n} (19) denote the Voronoi cells that are generated by X . We have n Z X 1 e )= R(X f (u)du (20) log ku − xi k V i i=1 R 1 Also, given A ⊂ Rd with centroid c(A) , µ(A) udu, let A Z 1 1 1 ζ(A) = log du + log µ(A) (21) µ(A) A−c(A) kuk d denote the normalized logarithmic moment of A. The moment ζ(A) is normalized in the sense that ζ(αA) = ζ(A), ∀α > 0. In particular, we let ζb,d , ζ([0, 1]d ) and ζs,d , ζ({x : kxk ≤ 1}) and denote the normalized logarithmic moment of the ddimensional ball and the d-dimensional cube, respectively. By using, for example, generalized spherical coordinates, it can be shown that for any d ≥ 1, we have ζb,d = eπ d/2 1 . It does not appear as straightforward to obtain d log Γ(1+ d 2) a general formula for ζs,d . Still, we can calculate the special cases ζs,1 = log(2e) and ζs,2 = 14 (6 + 2 log 2 − π). One important consequence of the moment definition in (21) is provided by the following proposition. Proposition 3. Suppose that the Voronoi cells Vi (X ) generated by X are all congruent to a certain polytope T , and each Voronoi cell has the same d-dimensional volume. Then, e ) = 1 log n + ζ(T ). (22) R(X d Md Proof. The result follows immediately from (20) and (21). Proposition 3 will be very useful for interpreting the conclusions of the following result. Proposition 4. Let f (u) = M1d 1(u ∈ [0, M d ]). For the case of one dimension d = 1, for every n ≥ 1, we have en = log n + ζ ? , (23) R 1 M where ζ1? = ζb,1 = ζs,1 = log(2e) = 1.693147 · · · is the normalized logarithmic moment of the interval. For d ≥ 2, as n → ∞, we have en = 1 log n + ζd? + o(1), R d Md for some constant ζd? that satisfies ζs,d ≤ ζd? ≤ ζb,d (24) (25) and depends only on the dimension. In particular, ζ2? = 3 π 27 1 − √ + log = 1.070485 · · · . 2 2 3 4 4 (26) is the normalized logarithmic moment of the regular hexagon. Proof. The proof is provided in [17, Appendix D]. Let us first consider the case of one dimension d = 1. According to Proposition 3, the performance in (23) is achieved by the uniform quantizer codebook   M 3M (2n − 1)M , ,..., , (27) 2n 2n 2n whose Voronoi cells intervals of length M/n. Since, accorde approximately coincide with ing to (15), maximizers of R(·) the maximizers of R(·), the codebook (27) also corresponds to the approximately optimal set of antenna locations for the case of one dimension and uniform distribution of users. Substituting (23) to (17), we obtain P + rζ1? . (28) Mr For d = 1 and a uniform distribution of users, we thus conclude that the approximately-optimal antenna configuration is (27), and the corresponding best per-user rate is (28). For more than one dimension, the asymptotic behavior of en is provided by (24). In particular, for two dimensions, the R constant ζd? in (24) can be determined to be the normalized logarithmic moment of the regular hexagon, as shown in (26). Correspondingly, a hexagonal arrangement of antenna groups e is asymptotically optimal for maximizing R(·). By (15), we can then argue that a hexagonal arrangement is approximately optimal for maximizing the per-user rate. Rn ' (r − 1) log n + log For three or more dimensions, there is uncertainty regarding the value of ζd? , and only the upper and lower bounds in (25) are known. The optimal arrangement of antenna groups also remains to be determined. Still, for d ≥ 3, the constant ζd? can be estimated by matching the performance of a numericallye to (24) at some large n. designed maximizer of R(·) e ) over all X is equivalent to maximizing Maximizing R(X e R(X ) over allR point density functions λ(x) subject to the normalization S λ(x)dx = 1. Let Z 1 H(f ) , f (x) log dx (31) f (x) S denote the differential entropy of the user density. According to Gibbs’ inequality, we have e ) ≤ 1 log n + ζ ? − 1 H(f ) + o(1). R(X (32) d d d Equality is achieved when λ(x) = f (x), ∀x ∈ S, i.e., when the antenna density matches the user density. D. A Closed-Form Formula for the Best Per-User Rate We can now combine (32) with (15) to obtain the following main result of this section. Theorem 2. Let r > d. For large n and r, the best per-user rate can be approximated by r  r Rn ' − 1 log n + log P + rζd? − H(f ). (33) d d Such a performance is achievable when the density of antenna groups is the same as the user density. Even though the approximations to obtain (33) are shown to be valid for large n and r, numerical results in the next section show that (33) is very accurate even for small n and/or r. In particular, we can observe that the best per-user rate decreases linearly with the differential entropy of the user density. Since a uniform density maximizes the differential entropy, the worst per-user rate is achieved for a uniform distribution of users. Also, according to (33), the maximum achievable macromultiplexing gain of the massive MIMO system is ( dr − 1)+ , as also claimed in Section III. A formal derivation of (33) or its refinements are left as future work. ? 35 ? f = f1 , analysis f = f1 , simulation ? f = f2 , analysis f = f2 , simulation ? 30 Rn (nats/sec/Hz) C. Solution to the Quantization Problem: Non-Uniform Case We now work out the case of a general density f using the idea of point density functions of high-resolution quantization theory [18, Section IV]. Specifically, given any set of antenna locations X , consider the existence of a point density function λ : Rd → R≥0 such that the Rcube [x, x + dx] contains nλ(x)dx antenna locations and S λ(x)dx = 1. Since f is approximately uniform on [x, x + dx], the average per-user rate conditioned on the users being in [x, x + dx] is then 1 log(nλ(x)) + ζd? + o(1), (29) d according to (24). Averaging out the user density, we obtain Z 1 1 ? e R(X ) = log n + ζd + f (x) log λ(x)dx + o(1). (30) d d S 40 r=8 ? 25 ? 20 ? 15 10 5 ? ? ? ? ? ? ? ? r=4 ? ? ? ? r=2 0 1 2 4 8 16 32 n Fig. 1: Best per-user rates for a one-dimensional cell. V. N UMERICAL R ESULTS In this section, we present numerical simulations that verify our analytical results. We have numerically optimized the peruser rate R(X ) in (4) using gradient ascent, and compared the resulting per-user rate with the closed-form formula (33). We present simulation results for the one-dimensional cell S = [0, 1] in Fig. 1. The horizontal axis represents the number of distinct antenna locations n. The vertical axis represents the best-possible per-user rate Rn . We have considered the three cases r ∈ {2, 4, 8} for the path loss exponent. Also, we have considered a uniform distribution f1 (u) , 1(u ∈ [0, 1]), as well as a Beta distribution f2 (u) , 30u(1 − u)4 f1 (u) of 35 users with H(f2 ) = 12 − log 30 = −0.48453 · · · . The label “analysis” refers to our general formula (33) for the best peruser rate, while the label “simulation” refers to the per-user rate we have obtained through the gradient ascent procedure. Our analysis has suggested that (33) will be accurate for large n and r. The results of Fig. 1 suggest that our formula (33) agrees well with the simulations even for small n and r. For example, for r = 2, the difference between analysis and simulation is at most 0.6 nats/sec/Hz. For r ∈ {4, 8} and a uniform distribution, the analysis is almost an exact match to the simulation with barely noticeable differences. For the Beta distribution of users, the analysis converges to an exact match only as n increases. In general, for non-uniform distributions, a large-enough n is necessary for the accuracy of (33) so ? 20 VI. C ONCLUSIONS f = f3 , analysis f = f3 , simulation f = f4 , analysis f = f4 , simulation r=8 ? Rn (nats/sec/Hz) 15 ? R EFERENCES ? 10 ? 5 ? ?? ? ? ? 1 2 ? ? r=4 ? ? ? ? ? ? 4 8 16 ? ? ? ? ? ? 0 r=2 32 64 We have studied a massive MIMO uplink where the base station antennas are evenly distributed to n different locations of the cell. We have shown that a per-user rate of O(log n) is achievable through optimization of antenna locations. We have characterized the corresponding “macromultiplexing gains” in terms of the ambient dimension of the cell and the path loss exponent. Also, using tools from high-resolution quantization theory, we have found an accurate formula for the achievable per-user rate for any distribution of users throughout the cell. 128 n Fig. 2: Best per-user rates for a two-dimensional cell. that the high-resolution arguments in Section IV-C become valid. Also, in all the 6 cases, the slope of analysis curves matches their respective simulation curves, indicating that the macromultiplexing gain of the system is indeed r − 1. We present simulations results for two-dimensional cells in Fig. 2. We have considered a uniform distribution f3 (u) , 1(u ∈ [0, 1]2 ) of users over the square cell S = [0, 1]2 . In order to demonstrate that (33) can also be applied to unbounded cells, we have also considered a Gaussian distri2 bution f4 (u) = π1 e−kuk with S = R2 and H(f4 ) = log(eπ). We can observe that, as in the case of d = 1 in Fig. 1, the analysis is almost an exact match to the simulation for r = 8 and a uniform distribution. For r = 8 and the Gaussian distribution, the analysis correctly predicts the asymptotic behavior of the best per-user rate. In general, compared to the results in Fig. 1 for d = 1, the gaps between the analysis and the corresponding simulation results are larger for d = 2. The reason for the larger mismatch is that a point u has potentially more neighboring antenna locations in a higher dimensional cell. As a result, for a given finite r, the approximation (13) will be off by a larger multiplicative factor as d increases. Still, the simulations agree well with the analysis even when r is as low as 4, and correctly predict the maximum achievable macromultiplexing gains at any r. In particular, according to (33), and as can also be observed in Fig. 2, the maximum macromultiplexing gain for r = d = 2 is 0, meaning that the per-user rate will be bounded even as n → ∞. [1] T. L. Marzetta, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Trans. Wireless Commun., vol. 9, no. 11, pp. 3590–3600, Nov. 2010. [2] L. Lu, G. Y. Li, A. L. Swindlehurst, A. Ashikhmin, and R. Zhang, “An overview of massive MIMO: Benefits and challenges.” IEEE J. Select. Areas Signal Process., vol. 8, no. 5, Oct. 2014. [3] A. A. M. Saleh, A. J. Rustako, Jr., and R. S. Roman, “Distributed antennas for indoor radio communications,” IEEE Trans. Commun., vol. COM-35, no. 12, pp. 1245–1251, Dec. 1987. [4] K. J. Kerpez, “A radio access system with distributed antennas,” IEEE Trans. Veh. Tech., vol. 45, no. 2, pp. 265–275, May. 1996. [5] W. Choi, J. G. Andrews, “Downlink performance and capacity of distributed antenna systems in a multicell environment,” IEEE Trans. Wireless Commun., vol. 6, no. 1, pp. 69–73, Jan. 2007. [6] J. Gan, S. Zhou, J. Wang, and K. Park, “On the sum-rate capacity of multi-user distributed antenna system with circular antenna layout,” IEICE Trans. Commun., vol. E89-B, no. 9, pp. 2612–2616, Sept. 2006. [7] J. Gan, Y. Li, L. Xiao, S. Zhou, and J. Wang, “On sum rate and power consumption of multi-user distributed antenna system with circular antenna layout,” EURASIP J. Wireless Commun. Networking, vol. 2007, Article ID 89780. [8] A. Yang, Y. Jing, C. Xing, Z. Fei, and J. Kuang, “Performance analysis and location optimization for massive MIMO systems with circularly distributed antennas,” IEEE Trans. Wireless Commun., vol. 14, no. 10, pp. 5659–5671, Oct. 2015. [9] G. N. Kamga, M. Xia, and S. Aissa, “Spectral-efficiency analysis of massive MIMO systems in centralized and distributed schemes,” accepted to IEEE Trans. Commun., Jan. 2016. [10] X. Wang, P. Zhu, and M. Chen, “Antenna location design for generalized distributed antenna systems,” IEEE Commun. Letters, vol. 13, no. 5, pp. 315–317, May 2009. [11] Y. Qian, M. Chen, X. Wang, and P. Zhu, “Antenna location design for distributed antenna systems with selective transmission,” Intl. Conf. Wireless Commun. Signal Process., Nov. 2009. [12] S. Firouzabadi and A. Goldsmith, “Optimal placement of distributed antennas in cellular systems,” IEEE Intl. Workshop on Signal Process. Advances in Wireless Commun., June 2011. [13] E. Park, S.-R. Lee, and I. Lee, “Antenna placement optimization for distributed antenna systems,” IEEE Trans. Wireless Commun., vol. 11, no. 7, pp. 2468–2477, July 2012. [14] L. Dai, “A comparative study on uplink sum capacity with co-located and distributed antennas,” IEEE J. Select. Areas Commun., vol. 29, no. 6, pp. 1200–1213, June 2011. [15] J. Liu, J. Wu, G. Wei, and W. Li, “Antenna location optimization for hybrid user distribution,” IEEE Intl. Conf. Commun. Workshop, June 2015. [16] J. Zhang, C.-K. Wen, S. Jin, X. Gao, and K.-K. Wong, “On capacity of large-scale MIMO multiple access channels with distributed sets of correlated antennas,” IEEE J. Sel. Areas Commun., vol. 31, no. 2, pp. 133–148, Feb. 2013. [17] E. Koyuncu, “Performance gains of optimal antenna deployment for massive MIMO systems,” Tech. Rep., Apr. 2017. [Online] Available: https://webfiles.uci.edu/ekoyuncu/alotr.pdf [18] R. M. Gray and D. L. Neuhoff, “Quantization,” IEEE Trans. Inf. Theory, vol. 44, no. 6, pp. 2325–2383, Oct. 1998. [19] P. L. Zador, “Asymptotic quantization error of continuous signals and the quantization dimension,” IEEE Trans. Inf. Theory, vol. 28, no. 2, pp. 139–148, Mar. 1982.
7cs.IT
arXiv:1703.00616v1 [math.GT] 2 Mar 2017 Action Dimension of Lattices in Euclidean Buildings Kevin Schreve March 3, 2017 Abstract The action dimension of a group Γ is the minimal dimension of a contractible manifold that Γ acts on properly discontinuously. We show that if Γ acts properly and cocompactly on a thick Euclidean building, then the action dimension is bounded below by twice the dimension of the building. We also compute the action dimension of S-arithmetic groups over number fields, partially answering a question of Bestvina, Kapovich, and Kleiner. 1 Introduction The action dimension of a countable discrete group Γ, actdim(Γ), is the minimal dimension of contractible manifold M that Γ acts on properly discontinuously. If Γ is torsion-free, then M/Γ is a model for the classifying space BΓ, and hence actdim(Γ) is the minimal dimension of such a manifold model. If we assume that Γ has a finite model for BΓ, a theorem of Stallings implies that actdim(Γ) is bounded above by twice the geometric dimension of Γ [22]. The motivation for this paper is the following conjecture of Davis and Okun [14], which claims that nontrivial L2 -Betti numbers of a discrete group should provide a lower bound for action dimension. This generalizes an older conjecture of Singer on the vanishing of the L2 -cohomology of closed aspherical manifolds. Action Dimension Conjecture. If Γ has nontrivial ith L2 -Betti number, then actdim(Γ) ≥ 2i. For a nice introduction to L2 -cohomology, we refer the reader to [17]. If Γ is the fundamental group of a closed Riemannian manifold, then the L2 -Betti numbers of Γ measure the size of the space of square summable harmonic forms on the universal cover. A positive solution to the Action Dimension Conjecture has several nice implications, in particular it implies a conjecture of Hopf-Thurston that the Euler characteristic of a closed, aspherical 2n-manifold has sign (−1)n . Though both L2 -cohomology and action dimension seem difficult to compute, the Action Dimension Conjecture has been verified for many important classes of groups, such as lattices in Lie groups [6], Out(Fn ) [7], mapping class groups [16], [20], [18], and most Artin groups [4], [13], [9]. 1 We show the conjecture holds for groups that act properly and cocompactly on thick Euclidean buildings. The L2 -Betti numbers of these groups are concentrated in the dimension of the building, and we show that their action dimension is greater than or equal to twice this dimension. Theorem 1.1. If Γ is a cocompact lattice in a thick, n-dimensional Euclidean building, then actdim(Γ) ≥ 2n. If Γ is torsion-free, then actdim(Γ) = 2n. The second statement follows immediately from Stallings’ theorem, since the geometric dimension of such Γ will be n. Our main application of this theorem is to compute the action dimension of S-arithmetic groups. These groups act properly on the product of a symmetric space and a Euclidean building. Bestvina and Feighn showed that lattices in symmetric spaces have action dimension equal to the dimension of the symmetric space [6], and it was conjectured in [7] that the action dimension of S-arithmetic groups was equal to the dimension of the symmetric space plus twice the dimension of the Euclidean building. We confirm the conjecture for S-arithmetic groups over number fields in Section 6. To prove Theorem 1.1, we use the obstructor dimension method introduced by Bestvina, Kapovich, and Kleiner in [7], which involves finding subcomplexes of the visual boundary of our building that are hard to embed into Euclidean space. Surprisingly, this is what all of the above computations of action dimension rely on. For Euclidean buildings, the visual boundary admits the structure of a spherical building, and the following corollary of our method may be of independent interest. Theorem 1.2. Let B be a finite k-dimensional, spherical building, and fix a chamber C. Let Opp(C) denote the subcomplex of chambers opposite to C. If Hk (Opp(C), Z2 ) 6= 0, then B does not embed into R2k . Therefore, the only way to embed these spherical buildings into Euclidean space is by appealing to general position. This was shown earlier by Tancer and Worwerk [23] for type An and certain type Bn buildings. In the general case, we do not know of a thick spherical building which does not have a chamber ∆ with Hk (Opp(∆), Z2 ) 6= 0. In [4], the action dimension of right-angled Artin groups was computed. The key tool was a computation of the van Kampen obstruction for certain simplicial complexes called octahedralizations. Our computation for spherical buildings relies on finding embedded octahedralizations based on Opp(∆) inside the spherical building. This paper is structured as follows: In Sections 2 and 3, we review the obstructor methods of [7] and the computation of the van Kampen obstruction of the octahedralization. In Section 4, we review spherical buildings and compute their van Kampen obstruction. In Section 5, we show the Action Dimension Conjecture for lattices in Euclidean buildings, and in Section 6, we compute the action dimension of S-arithmetic groups. Acknowledgement. I thank Boris Okun for many helpful conversations. The author is partially supported by NSF grant DMS-1045119. This material is based upon work supported under NSF grant DMS-1440140 while the author was in residence 2 at the Mathematical Sciences Research Institute in Berkeley, California in the Fall 2016 semester. The author wishes to thank MSRI for hosting him during this time. 2 The van Kampen Embedding Obstruction The first cohomological obstruction to embedding a simplicial complex in Rn was developed by van Kampen [25]. In this section we review this obstruction and describe how a coarsening of this obstruction gives a lower bound for action dimension. Let K a simplicial complex, and let ∆ ⊂ K × K denote the simplicial neighbourhood of the diagonal: ∆ := {(σ, τ )|σ, τ ∈ K, σ ∩ τ 6= ∅.} The complement K × K − ∆ admits a free Z2 -action by flipping the factors. Let C(K) = (K × K − ∆)/Z2 be the simplicial configuration space of K. So, C(K) is the space of unordered pairs of disjoint simplices of K: C(K) := {{σ, τ }|σ, τ ∈ K, σ ∩ τ = ∅}. Definition 2.1. Let K be a k-dimensional simplicial complex, and let f : K → Rn be a general position map. The images of two disjoint simplices σ and τ with dim σ + dim τ = n intersect under f in a finite number of points. The Z2 -valued van Kampen obstruction vknZ/2 (K) ∈ H n (C(K), Z2 ) is defined by vknZ/2 ({σ, τ }) = |f (σ) ∩ f (τ )| mod 2. One can show that the class of this cocycle does not depend on f , which implies that if vknZ/2 (K) 6= 0, then K does not embed into Rn . In this case, we say K is an n-obstructor. An easy argument shows that such K actually cannot embed into any contractible n-manifold. Example. Suppose K3,3 is the Kuratowski graph, i.e the join of 3 points with 3 points. There is a class in H2 (C(K3,3 ), Z2 ) which consists of all unordered pairs of disjoint simplices. By drawing the graph in the plane and counting intersections, it is easy to see that vk2Z/2 (K) evaluates nontrivially on this class. We will now use the van Kampen obstruction to give a lower bound for the action dimension. This requires the following concept of Bestvina: e Z) of spaces satisfying Definition 2.2. A Z-structure on a group Γ is a pair (X, the following four axioms: e is a Euclidean retract. • X e − Z admits a covering space action of Γ with compact quotient. • X=X e i.e. there exists a homotopy X e × [0, 1] → X e such that H0 • Z is a Z-set in X, is the identity and Ht (X) ⊂ X for all t > 0. 3 • The collection of translates of a compact set in X forms a null-sequence in e i.e. for every open cover U of X e all but finitely many translates are X, contained in a single element of U . e Z) on Γ. For example, A space Z is a boundary of Γ if there is a Z-structure (X, if Γ acts properly and cocompactly on a CAT (0) space X, then compactifying X by the visual boundary ∂X gives a Z-structure on Γ. Theorem 2.3 ([7]). Suppose Z is a boundary of a group Γ, and that K is an embedded n-obstructor in Z. Then actdim(Γ) ≥ n + 2. Heuristically, if Γ admits a Z-structure and acts properly on a contractible (n + 1)-manifold M , then there would be an injective boundary map Z → ∂M . Since M is contractible, ∂M should be a n-sphere. This would contradict K being an n-obstructor, and hence prove Theorem 2.3. Of course, these optimistic statements are false in general, and the proof of Theorem 2.3 requires much more work. Example. Let Γ = F2 × F2 be the direct product of two finitely generated free groups. Γ acts properly and cocompactly on a product of trees, whose visual boundary is a product of Cantor sets. This contains the graph K3,3 , so by Theorem 2.3, actdim(Γ) = 4. More generally, Bestvina, Kapovich, and Kleiner showed that the n-fold product of free groups has actdim = 2n, using the fact that the n-fold 2n−2 6= 0. join of 3 points has vkZ/2 When we compute the action dimension of S-arithmetic groups over number fields, we use the slightly more general concept of obstructor dimension, denoted obdim(Γ). For simplicity, we only give the definition for type VF groups. We lose no generality since S-arithmetic groups over number fields are virtually of finite type. Let K be a simplicial complex, and let Cone(K) := K × [0, ∞)/(K × 0) denote the infinite cone on K. Given a triangulation of Cone(K), we set every edge to have length 1 and equip Cone(K) with the induced path metric. Definition 2.4. Let X be a proper metric space and K a simplicial complex. A map h : Cone(K) → X is expanding if for every σ and τ in K with σ ∩ τ = ∅ the images Cone(σ) and Cone(τ ) diverge, i.e. for every D > 0 there exists t ∈ R+ such that h(σ × [t, ∞]) and h(τ × [t, ∞]) are > D apart in X. Definition 2.5. Let Γ be a discrete group, and assume Γ acts properly and cocompactly by isometries on a contractible proper metric space X. Then obdim(Γ) is the maximal n + 2 such that there is a proper expanding map h : Cone(K) → X with K an n-obstructor. The following is the main theorem of [7]. Theorem 2.6. obdim(Γ) ≤ actdim(Γ). Finally, we need the following product lemma for obstructor dimension, which follows immediately from the Join Lemma in [7]. Lemma 2.7. Suppose X is a proper cocompact contractible Γ-complex and f : Cone(J) × Cone(K) → X a proper expanding map. If J is an n-obstructor and K is an m-obstructor, then obdim(Γ) ≥ n + m + 2. 4 ∆ ∆+ Figure 1: If L is an n-cycle, then D∆ (L) is a subdivided K3,3 . 3 Octahedralizations In this section, we recall the definiition of a certain simplicial complex with nontrivial van Kampen obstruction. This complex was used in [4] to give lower bounds for the action dimension of right-angled Artin groups. We will show this complex also provides lower bounds for the action dimension of groups acting properly and cocompactly on Euclidean buildings. Given a finite set V , let ∆(V ) denote the full simplex on V and let O(V ) denote the boundary complex of the octahedron on V . In other words, O(V ) is the simplicial complex with vertex set V × {±1} such that a subset {(v0 , ε0 ), . . . , (vk , εk )} of V × {±1} spans a k-simplex if and only if its first coordinates v0 , . . . , vk are distinct. Projection onto the first factor V × {±1} → V induces a simplicial projection p : O(V ) → ∆(V ). We will denote the vertex (v, +1) or (v, −1) by v + and v respectively, and the simplex (σ, 1) or (σ, −1) by σ + and σ respectively, Any finite simplicial complex L with vertex set V is a subcomplex of ∆(V ). The octahedralization O(L) of L is the inverse image of L in O(V ): O(L) := p−1 (L) ⊂ O(V ). We also will say that O(L) is the result of “doubling the vertices of L”. In particular, an n-simplex in L becomes an n-octahedron (the n-fold join of two points) in O(L), and inclusions of simplices induce inclusions of octahedra in a canonical way. We will usually assume that L is a flag complex, which means that if the 1-skeleton of a simplex is in L, then the entire simplex is in L. Fix a simplex ∆ in L, and let D∆ (L) denote the full subcomplex of O(L) containing L and ∆+ . We say D∆ (L) is L doubled over ∆. In [4], the van Kampen obstruction of D∆ (L) was calculated. Theorem 3.1. Let L be a k-dimensional flag simplicial complex. We have vk2k Z/2 (D∆ (L)) 6= 0 if and only if Hk (L, Z2 ) 6= 0. 5 4 Spherical Buildings We will only give a brief description of buildings, the reader is encouraged to refer to [3] for complete details. Definition 4.1. A Coxeter group (W, S) is a group generated by involutions si ∈ S, with the only other relations being that every pair of elements si sj generates a dihedral group (perhaps D∞ ). In other words, (W, S) has a presentation < s1 , s2 , . . . , sn |(si sj )mij = 1 > for mij ∈ N ∪ ∞ such that mii = 1. For example, proper cocompact reflection groups acting on Sn , En and Hn are all examples of Coxeter groups. We will assume from now on that |S| < ∞. A mirror structure over S on a space X is a family of subspaces {Xs }s∈S indexed by S. If (W, S) is a Coxeter system and X has a mirror structure over S, let S(x) := {s ∈ S | x ∈ Xs }. Now, define an equivalence relation ∼ on W × X by (w, x) ∼ (w′ , y) if and only if x = y and w−1 w′ ∈ WS(x) . Let U (W, X) denote the quotient space: U (W, X) = (W × X)/ ∼ . U (W, X) is called the basic construction. There is a natural W -action on W × X which respects the equivalence relation, and hence descends to an action on U (W, X). One can think of U (W, X) as pasting copies of X with the exact gluing given by the Coxeter group. Definition 4.2. Let (W, S) be a Coxeter group, and let ∆ be a simplex of dimension |S| − 1. We can label the codimension-one faces of ∆ by the elements of S. The set of codimension-one faces is a mirror structure on ∆. The space U (W, S) is called the Coxeter complex of (W, S). If W is finite, ΦW is homeomorphic to a sphere, and if W is infinite, ΦW is contractible. Definition 4.3. A building is a simplicial complex with a distinguished set of subcomplexes called apartments. This collection of apartments satisfies the following axioms: • Each apartment is isomorphic to a Coxeter complex. • For any two simplices, there is an apartment containing both of them. • If two apartments contain simplices σ and τ , then there is an isomorphism between these apartments fixing σ ∩ τ pointwise. The top dimensional simplices of a building are called chambers. A building is thick if each codimension-one face is contained in at least 3 chambers. If W is finite, then the building is called spherical, since each apartment is homeomorphic to a sphere. In a spherical Coxeter complex, there is a well-defined notion of opposite chambers. Note that every chamber σ corresponds to a Coxeter group element wσ . Two chambers σ and τ are opposite if they correspond to Coxeter group elements wσ , wτ such that wσ = w0 wτ , where w0 is the longest 6 element of W with respect to the standard generating set S. Opposition naturally extends to spherical buildings; in fact, two chambers σ and τ are opposite in one apartment if and only if they are opposite in each apartment containing them both. It is important that two chambers in an apartment are opposite if and only if they are on opposite sides of every wall in that apartment, where a wall is a fixed point set inside an apartment of a reflection in W . One can analagously define opposition of simplices: α and β are opposite in an apartment if they are contained in the same walls and separated by every wall that does not contain them both, and opposite in a building if they are opposite in each apartment which contains them. A spherical building is called right-angled if all apartments are isomorphic to an n-octahedron, which is the Coxeter complex of the right-angled Coxeter group W ∼ . In an octahedron, the vertices v and v + are opposite. More generally, = Zn+1 2 two simplices σ and τ in an octahedron are opposite if and only if p(σ) = p(τ ) and σ ∩ τ = ∅. Example. Let P denote the poset of subspaces of Rn . Let Flag(P) denote the associated flag complex, i.e. the vertices of Flag(P) consist of elements of P and simplices of Flag(P) correspond to chains of inclusions between these subspaces. Flag(P) has a natural structure of a spherical building, where apartments correspond to choosing a basis of Rn and then considering all subspaces generated by proper subsets of these basis vectors. In this case, the Coxeter group is the symmetric group Sn , which acts by permuting the basis vectors. The Coxeter complex can be identified with the barycentric subdivision of the (n − 2)-simplex. A chamber is a maximal chain [v0 ] ⊂ [v0 , v1 ] ⊂ · · · ⊂ [v0 , v1 , . . . , vn−2 ]. Two chambers C and C ′ are opposite in this building precisely when any two subspaces in C and C ′ respectively are in general position. 4.1 Bending homeomorphisms We will now give our main construction. Essentially, we will exhibit obstructors in a spherical building B by embedding D∆ (Opp) into B and applying Theorem 3.1. Definition 4.4. Let B be an n-dimensional spherical building. Let A be an apartment in B, fix a chamber C in A, and let {H1 , H2 , ..., Hn+1 } be the set of walls of A that intersect C in a codimension-one face. If On is an n-octahedron, then ′ } analogously we fix a n-simplex C ′ in O n and define a set of walls {H1′ , H2′ , ..., Hn+1 ′ that intersect C in a codimension-one face. Then there is an obvious "bending" homeomorphism f : On → A which maps each wall Hi′ → Hi , maps C ′ to C, and respects all intersections of walls. Now, fix a chamber ∆+ ∈ B, and let Opp(∆+ ) be the simplicial complex of opposite simplices. For each chamber σ ∈ Opp(∆+ ), there is a unique apartment Aσ containing ∆+ and σ. Given an octahedron O(σ) which is doubled over σ, we have a bending homeomorphism fσ : O(σ) → Aσ which takes σ to σ and σ + to ∆+ . 7 F (∆) F (σ) σ τ F (τ ) F ∆ ∆+ ∆+ Figure 2: Embedding D∆ (Opp(∆+ )) into the flag complex of subspaces of F32 . The red cycle is the opposite complex of ∆+ . Lemma 4.5. Suppose α ⊂ σ and let fσ : O(σ) → Aσ be the bending homeomorphism. Then fσ sends O(α) to the convex hull of α and the opposite simplex of α in ∆+ . Proof. Note that O(α) is the intersection of all walls in O(σ) which contain α. Since fσ preserves the intersection of walls, we have that fσ sends O(α) to the intersection of all walls which contain f (α), and that f (α+ ) is opposite to f (α). The convex hull in Aσ of two simplices is the intersection of all roots which contain them both. In this case, this is the intersection of all walls which contain f (α). Lemma 4.6. The collection of bending homeomorphisms fσ extends to a map F : O(Opp(∆+ )) → B. Proof. It suffices to show that if σ and τ are chambers in Opp(∆+ ), then fσ (O(σ ∩ τ )) = fτ (O(σ ∩τ )). By Lemma 4.5 we know fσ and fτ send O(σ ∩τ ) to the convex hull of σ ∩ τ and (σ ∩ τ )+ in Aσ and Aτ , so we must show these intersections coincide. Since each apartment is convex, we have that both convex hulls are the convex hull of σ ∩ τ and (σ ∩ τ )+ in B. Since this is unique, fσ and fτ agree on O(σ ∩ τ ). Now, we will show that F restricts to an embedding on D∆ (Opp(∆+ )), for some choice of a chamber ∆ in Opp(∆+ ). To do this, we need to be more precise about the image of simplices under F . Definition 4.7. Let (W, S) be a Coxeter group, and let w ∈ W . Then In(w) = {s ∈ S| ℓ(ws) < ℓ(w)} where ℓ(w) denotes the length of w in W with respect to the generating set S. 8 In(w) is precisely the set of letters with which a reduced expression for w can end. Note that In(w−1 ) is precisely the elements s ∈ S such that ℓ(sw) < ℓ(w), i.e. it consists of w which are separated from the identity chamber by the s-wall. Definition 4.8. Let α ∈ D∆ (Opp(∆+ )) be a simplex. Let V + (α) denote the vertices of α contained in ∆+ and V (α) denote the vertices of α contained in Opp(∆+ ). For a chamber σ in Opp(∆+ ), identify O(σ) as the Coxeter complex of (Z2 )n+1 , and identify ∆+ with the identity chamber. Given a vertex s ∈ σ, we say that the s-wall is the unique wall in O(σ) containing every other vertex in σ. A chamber α ⊂ O(σ) corresponds to an element w with In(w−1 ) = V (α), i.e. w is separated from the identity by each s-wall for s ∈ V (σ). Since the bending homeomorphism f preserves walls containing σ and the chamber ∆+ , we have in general: Lemma 4.9. For σ ∈ Opp(∆+ ) and α a chamber in O(σ), F (α) is a union of chambers of Aσ corresponding to Coxeter group elements w with In(w−1 ) = V (α). Lemma 4.10. F restricted to D∆ (Opp(∆+ )) is an embedding. Proof. It is obvious that F restricted to each simplex is a homeomorphism. Therefore, it suffices to show that disjoint top dimensional simplices are mapped disjointly under F . Note that this is obviously true for F restricted to Opp(∆+ ). Let σ, τ be chambers in Opp(∆+ ), and let α and β be disjoint chambers in O(σ) ∩ D∆ (Opp(∆+ )) and O(τ ) ∩ D∆ (Opp(∆+ ) respectively. We must show that F (α) ∩ F (β) = ∅. Again, we identify ∆+ with the identity chamber of W . If α contains a vertex s+ in ∆+ , the chambers in the image of F (α) correspond to Coxeter group elements w with s ∈ / In(w−1 ). On the other hand, since s+ ∈ / −1 β, the chambers in F (β) correspond to elements with s ∈ In(w ). Therefore, any intersection between α and β must occur on the s-wall of the respective apartments. If α contains no other vertices of ∆+ , then the intersection of the image of α with the s-wall is in Opp(∆+ ). Therefore, if there is a nontrivial intersection between α and β, α must contain another vertex in ∆+ . Repeating this argument verbatim would eventually imply that α = ∆+ , which implies F (α)∩F (β) = ∅. Now that we have embedded D∆ (Opp(∆+ )) into our spherical building, we would like to verify the assumptions of Theorem 3.1. Therefore, we need to show that Opp(∆+ ) is a flag complex with top dimensional Z2 -homology. The first statement follows straight from the definitions, we record it as a lemma. Lemma 4.11. For any chamber C in B, Opp(C) is a flag complex. Proof. We will show that Opp(C) is a full subcomplex. This means that if the vertex set of a simplex in B is contained in Opp(C), then the simplex itself is contained in Opp(C). It implies that Opp(C) is also a flag complex. We prove the contrapositive: suppose σ is a simplex not in Opp(C), so there exists a wall such that σ and C lie on the same side. Therefore, all the vertices 9 of σ are not opposite to C. Therefore, if a simplex has vertex set in C, then the simplex is in C. On the other hand, it is not obvious to us that Hk (Opp(C), Z2 ) 6= 0 for every thick spherical building. In the next lemma, we verify that this does occur for infinitely thick buildings, which will suffice for our purposes. Lemma 4.12. If B has infinite thickness, then there exists a chamber C such that Opp(C) contains an apartment. Proof. Let A ⊂ B be any apartment and ∆0 be any chamber. If ∆0 is opposite to all chambers in A, then we are done. If not, for each chamber Ai in A, there are only finitely many chambers that share a panel with ∆0 and are closer to Ai . Therefore, we can ‘push’ ∆0 to a new chamber ∆1 that is further from each Ai (or perhaps the same distance if ∆0 is already opposite to Ai ). Continuing in this way, we find a chamber C0 opposite to each Ai , and therefore Ai ∈ Opp(C0 ). Example. If k is an infinite field and Flag(P) the associated spherical building, then it is easy to construct an apartment in Opp(C) for any chamber C. Any chamber C corresponds to a flag of subspaces C = [v0 ] ⊂ [v0 , v1 ] ⊂ · · · ⊂ [v0 , v1 , . . . , vn−2 ]. The opposite apartment is determined by choosing another basis in general position (e.g. choose all ek to not lie in [v0 , v1 . . . , vn−2 ]). Remark. For the finite thickness case, there are some obvious cases where we can find cycles in Opp. If the thickness of each panel is odd, then Opp is itself a Z2 -cycle. Note that this implies that Opp has nontrivial homology if the spherical building contains a spherical subbuilding of odd thickness. Also, for large enough thickness, a simple counting argument shows that Opp has top homology as it contains more n-simplices than (n − 1) simplices. In general, we do not know if there always exist chambers such that Opp has top dimensional homology. This may be subtle: in [2], Abramenko constructs examples of infinitely thick 1-dimensional buildings where for certain chambers Opp is a disjoint union of trees. However, other chambers inside these buildings have opposite complexes which contain apartments by Lemma 4.12. Note that higher rank spherical buildings have been fully classified by Tits [24]. It seems likely that one can construct top dimensional cycles in the opposite complexes for each list in the classification, but the calculations were too hard for the author. 5 The Action Dimension Conjecture for lattices in Euclidean buildings The following theorem is classical. In [11], an alternate proof is given which also computes the L2 -cohomology of arbitrary buildings in terms of the weighted L2 cohomology of an apartment. Theorem 5.1. If Γ acts properly and cocompactly on a thick, n-dimensional, Euclidean building, then the L2 -cohomology of Γ is concentrated in dimension n, and is nontrivial if the building is thick. 10 Therefore, the following is a confirmation of the Action Dimension Conjecture in this case. Theorem 5.2. If Γ acts properly and cocompactly on a thick, Euclidean building of rank n, then actdim(Γ) ≥ 2n. If Γ is torsion-free, actdim(Γ) = 2n. Proof. It is well known that the visual boundary of a thick, Euclidean building admits the structure of a thick, spherical building of rank n − 1 with infinite thickness [Section 11.8, [3]]. By Theorem 2.3, Theorem 3.1, and Lemmas 4.10– 4.12, it follows that actdim(Γ) ≥ 2n. If Γ is torsion-free, then equality follows from Stallings’ theorem since the geometric dimension of Γ is n. 5.1 More general buildings For general buildings, the above strategy fails as we lose the spherical building at infinity. However, there are some specific examples where the action dimension is known. For example, Dymara and Osajda have shown that the boundary of a thick, n-dimensional right-angled hyperbolic building is the universal Menger space [15] (these exist for n ≤ 4). For non right-angled buildings, this was shown for n = 2 by Benakli [5]. Therefore, for cocompact lattices acting on such buildings the action dimension is at least twice the dimension of the building. It would be nice to extend Theorem 5.2 to all hyperbolic buildings, where we suspect the same bounds on action dimension should hold. The link of each vertex in a thick, locally finite, hyperbolic building B is a thick, finite, spherical building. The difficulty here is pushing this link in a compatible way to the building to get a proper expanding map Cone(Lk) → B. For general buildings, the geometric dimension of lattices can be less than the dimension of the building, so by Stallings’ theorem, the action dimension must sometimes be less than twice the dimension of the building. For example, let L be a flag (n − 1)-dimensional flag complex such that Hn−1 (L, Z2 ) = 0. Form any graph product GL such that every vertex group Gs is finite. Then GL acts properly and cocompactly on a n-dimensional thick, locally finite right-angled building XL [10]. The geometric dimension of GL is the same as the geometric dimension of the underlying Coxeter group, which has been explicitly computed and with these assumptions is less than n [12]. We conjecture that if Γ acts properly and cocompactly on a locally finite, thick building then actdim(Γ) ≥ 2 gdim(Γ). 6 S-arithmetic groups In this section, we describe our main application of Theorem 5.2. Let k be a number field, i.e. a finite degree extension of Q. Let G(k) be a semisimple linear algebraic group over k. For each finite place p let νp : k → Z denote the corresponding valuation. Let S be a set of finite places of k, including the set of infinite places. Let kp be the completion of k with respect to the norm induced by νp . The ring of S-integers is defined by: OS := {x ∈ k|νp (x) ≥ 0 for all p ∈ / S}. 11 A subgroup of G(k) is an S-arithmetic subgroup if it is commensurable with G(OS ). Example. Let S = {p1 , p2 , . . . pm } be a finite set of primes. Each prime determines a p-adic valuation Q → Z which sends u → n if u = pn x and neither the numerator nor the denominator of x is divisible by p. The ring of S-integers in this case is ZS := Z[ p11 , p12 , . . . p1m ]. An S-arithmetic subgroup Γ of G(Q) is commensurable to G(ZS ). For simplicity, we will pass to a torsion-free finite index subgroup Γ of G(OS ), which always exists in this setting [8]. If S consists of only infinite places, then Γ is an arithmetic subgroup and acts on a symmetric space X∞ . If S has finite places, then for each finite place ν thereQis a Euclidean building Xν associated to G(kν ), and Γ acts properly on X∞ × νp Xνp . Furthermore, there is a partial BS compactification of X∞ due to Borel-Serre, which we denote Q X∞ . The Γ-action BS extends to a proper and cocompact action on X∞ × νp Xνp [8]. It will be Q important for us that if we fix a vertex v in νp Xνp and restrict to the Γ-action Q on νp Xνp , the stabilizer of v in Γ is an arithmetic subgroup Γ∞ . Bestvina and Feighn construct a proper, expanding map f from a coned (dim(X∞ ) − 2)-obstructor Cone(J) into X∞ that is bounded distance from Q a Γ∞ orbit. Theorem 5.2 gives a proper, expanding map g from a coned (2 dim( νp Xνp )− Q 2)-obstructor Cone(K) into νp Xνp . Q We take the product embedding into X∞ × νp Xνp and then compose with the inclusion into the Borel-Serre partial compactification: Y BS Xνp h := f × g : Cone(J) × Cone(K) → X∞ × νp . We will now show that h is Q proper and expanding with respect to a proper BS Γ-invariant metric on X∞ × νp Xνp . We first show that such a metric exists. BS is a manifold with corners, it is separable and metrizable, and hence Since X∞ Q BS so is X∞ × νp Xνp . Therefore, the following general theorem applies. Theorem 6.1 (Theorem 4.2, [1]). Suppose X is σ-compact. If the action of Γ on X is proper and X is metrizable, then there is a Γ-invariant proper metric dΓ on X that induces the topology of X. Suppose Γ acts by isometries on two metric spaces X and Y , and suppose the diagonal action of Γ on X × Y is proper. Suppose that X admits a partial compactification X̂ such that the Γ-action extends to a proper and cocompact action on X̂ × Y . Let dX and dY denote the left Γ-invariant metrics on X and Y , and let dΓ be a left Γ-invariant metric on X̂ × Y as in Theorem 6.1. We shall prove the following general theorem in the next section. Theorem 6.2. Suppose that there is a proper expanding map f : Cone(J) → X and a proper expanding map g : Cone(K) → Y . Let (x, y) = (f (0), g(0)), and suppose Cone(J) maps a bounded distance in the dX -metric from the StabΓ (y)orbit of (x, y). For any Γ-invariant proper metric on X̂ × Y , the product map h = f × g : Cone(J) × Cone(K) → X̂ × Y is proper and expanding. 12 By the above remarks and Theorem 2.6 this theorem implies the following: Corollary 6.3. If ΓQ is an S-arithmetic group over a number field then h : Cone(J)× BS Cone(K) → X∞ × νp Xνp defined as above is proper and expanding, and hence P|S| actdim(Γ) ≥ dim(X∞ ) + i=1 2 dim(Xν ). 6.1 Proof of Theorem 6.2 We first need the following two lemmas. Lemma 6.4. Let (xi , yi ) and (x′i , yi′ ) in X̂×Y be a pair of sequences. If dY (yi , yi′ ) → ∞, then dΓ ((xi , yi ), (x′i , yi′ )) → ∞. Proof. By contradiction, suppose there exists a subsequence (xi , yi ), (x′i , yi′ ) with dΓ ((xi , yi ), (x′i , yi′ )) uniformly bounded. Since the Γ-action on X̂ ×Y is cocompact, there exists γi ∈ Γ such that (γi xi , γi yi ), and hence (γi x′i , γi yi′ ) are contained in a compact set K. We still have dY (γi yi , γi yi′ ) → ∞ since dY (γyi , γyi′ ) = dY (yi , yi′ ). Since K projects to a compact set in Y , this is a contradiction. Lemma 6.5. Let (xi , yi ) and (x′i , yi′ ) in X ×Y be a pair of sequences. Assume that yi remains bounded dY -distance from a basepoint y0 . Suppose that xi and x′i are bounded dX -distance from the StabΓ (y0 )-orbit of a basepoint x0 . If dX (xi , x′i ) → ∞, then dΓ ((xi , yi ), (x′i , yi′ )) → ∞. Proof. Again, assume by contradiction that there exist subsequences (xi , yi ) and (x′i , yi′ ), with dΓ ((xi , yi ), (x′i , yi′ )) uniformly bounded. Choose γi in StabΓ (y0 ) such that dX (γi xi , x0 ) is uniformly bounded. Since we assume yi are in a compact set of Y , we know that dY (γi yi , y0 ) is uniformly bounded. The sequence (γi xi , γi yi ) is contained in a compact set in X × Y , which implies dΓ ((γi xi , γi yi ), (x0 , y0 )) is uniformly bounded. Therefore by assumption dΓ ((γi x′i , γi yi′ ), (x0 , y0 )) is uniformly bounded. We have dX (γi x′i , x0 ) → ∞ since dX (γi xi , γi x′i ) → ∞ and dX (γi xi , x0 ) is uniformly bounded. Choose γi′ in StabΓ (y0 ) such that dX (γi′ x′i , x0 ) is uniformly bounded. Then the sequence dΓ ((γi (γi′ )−1 x0 , y0 ), (x0 , y0 )) is uniformly bounded Since dX (xi , x′i ) → ∞, we have the distance in the word metric of Γ between γi and γi′ → ∞, which contradicts the properness of the Γ-action on X̂ × Y . Now, we can prove Theorem 6.2. Proof. We show that f × g is proper and expanding. We will let (j, k) denote points in Cone(J) × Cone(K). Proper: Let (f (j0 ), g(k0 )) be the image of the cone point. Suppose f × g is not proper. Then there is a sequence (ji , ki ) which leaves every compact set of Cone(J) × Cone(K) such that h(ji , ki ) is contained in a compact set C of X̂ × Y . Since C projects to a compact set in Y and g is proper, the ki are contained in a compact subset of Cone(K). Therefore, the ji leave every compact set in Cone(J), and since f is proper, this implies that dX (f (j0 ), f (ji )) → ∞ which contradicts Lemma 6.5. 13 Expanding: Assume σ × τ and σ ′ × τ ′ are disjoint simplices in Cone(J) × Cone(K). Suppose f × g is not expanding. Then there are sequences (ji , ki ) in Cone(σ) × Cone(τ ) and (ji′ , ki′ ) in Cone(σ ′ ) × Cone(τ ′ ), which leave every compact set, and have dΓ (h(ji , ki ), h(ji′ , ki′ )) uniformly bounded. By Lemma 6.4, this implies that dY (ki , ki′ ) is uniformly bounded. Since g is expanding, this implies that ki and ki′ are contained in a compact set. Therefore, ji and ji′ leave every compact set, and since f is expanding we have dX (f (ji ), f (ji′ )) → ∞, which contradicts Lemma 6.5. Example. Let Γ = SL2 (Z[1/2]). In this case, Γ acts properly on H2 × T , where T is a trivalent tree. The obstructor complex we want to use is Cone(K3,3 ) ∼ = Cone(3pts) × Cone(3pts). In the trivalent tree, we map Cone(3pts) by choosing 3 disjoint rays emanating from a fixed base point. In H2 , which we identify with the upper half plane, we send Cone(3pts) to the orbit of i under the matrices:   [  1 0  1 t { | t ∈ R} { | t ∈ R+ } 0 1 t 1 Unfortunately, one cannot immediately use the product embedding Cone(3pts)× Cone(3pts) → H2 × T . This map is obviously proper and expanding, and if the image was bounded distance from an SL2 (Z[1/2])-orbit we could take a neighbourhood of the orbit to see that obdim(SL2 (Z[1/2])) = 4. The difficulty here is that the image is not bounded distance from any orbit. It seems in this case that one could perturb the product embedding to stay within a bounded distance of an orbit, but for the general case we chose to keep our simple definition of the product embedding and lose the nice structure of the product metric on H2 × T . Remark. These obstructor methods also apply for certain S-arithmetic groups over function fields. Let K be the function field of an irreducible projective smooth curve C defined over a finite field k := Fq . Let S be a finite nonempty set of (closed) points of C, and let OS < K be the ring of functions that have no poles except possibly at points in S. If S is a single point p, it determines a valuation νp : K → Z which assigns to a function its order of vanishing at p. If G is a linear algebraic group over K, then any group commensurable to G(OS ) is an S-arithmetic subgroup. Similarly as in the number field case, to each S-arithmetic group there is a corresponding Euclidean building XS , and in this case G(OS ) acts properly on XS , with no symmetric space factor. In the general setting, the action is not cocompact, and we cannot conclude anything from Theorem 5.2. However, we do have the following theorem: Theorem 6.6. For K and S as above, if G(OS ) acts cocompactly on XS , then actdim(G(OS )) ≥ 2 dim XS (this is true exactly when the K-rank of G = 0.) References [1] H. Abels, A. Manoussos, and G. Noskov, Proper actions and proper invariant metrics, J. London Math. Soc. 83 (2011), no. 2, 619-636. 14 [2] P. Abramenko, Twin buildings and applications to S-arithmetic subgroups, Springer Lecture Notes in Mathematics (1996). [3] P. Abramenko and K. Brown, Buildings: Theory and Applications, Springer, 2008. [4] G. Avramidi, M. W. Davis, B. Okun, and K. Schreve, Action dimension of rightangled Artin groups, Bull. London Math. Soc 48 (2016), no. 1, 115-126. [5] N. Benakli, Polyhedres hyperboliques, passage du local au global (1992). Thesis, Universite e Paris Sud. [6] M. Bestvina and M. Feighn, Proper actions of lattices on contractible manifolds, Invent. Math. 150 (2002), no. 2, 237–256. [7] M. Bestvina, M. Kapovich, and B. Kleiner, Van Kampen’s embedding obstruction for discrete groups, Invent. Math. 150 (2002), no. 2, 219–235. [8] A. Borel and J-P Serre, Cohomologie d’immeubles et de groupes S-arithmetiques, Topology 15 (1976), 211-232. [9] M. W. Davis and J. Huang, Determining the action dimension of an Artin group by using its complex of abelian subgroups. arXiv:1608.03572v2. [10] M. W. Davis and J. Meier, The topology at infinity of Coxeter groups and buildings, Comm. Math. Helv 77 (2002), 1-21. [11] M. W. Davis, J. Dymara, T. Januskiewicz, and B. Okun, Weighted ℓ2 -cohomology of Coxeter groups, Geom. Topol. 11 (2007), 47–138. [12] M. W. Davis, J. Dymara, T. Januskiewicz, J. Meier, and B. Okun, Compactly supported cohomology of buildings, Comment. Math. Helv. 85 (2010), 551-582. [13] M. W. Davis and I. J. Leary, The l2 -cohomology of Artin groups, J. London Math. Soc. (2) 68 (2003), no. 2, 493–510. [14] M. W. Davis and B. Okun, Vanishing theorems and conjectures for the ℓ2 -homology of right-angled Coxeter groups, Geom. Topol. 5 (2001), 7–74. [15] J. Dymara and D. Osajda, Boundaries of right-angled hyperbolic buildings, Fundamenta Mathematicae 197 (2007), 123-165. [16] Z. Despotovic, Action Dimension of Mapping Class Groups, 2006. [17] B. Eckmann, Introduction to ℓ2 -methods in topology: reduced ℓ2 -homology, harmonic chains, and ℓ2 -Betti numbers, Israeli Journal of Mathematics 117 (2000), 183-219). [18] M. Gromov, Kähler hyperbolicity and L2 -Hodge theory, J. Differential Geom. 33 (1991), no. 1, 263–292. MR92a:58133 [19] L. Ji, Buildings and their applications in geometry and topology, Asian J. of Math 1 (2006), 011–080. [20] C. T. McMullen, The moduli space of Riemann surfaces is Kähler hyperbolic, Ann. of Math. (2) 151 (2000), no. 1, 327–357. [21] B. Okun and K. Schreve, The L2 -(co)homology of groups with hierarchies, Alg. and Geom. Top. (2016). [22] J. R. Stallings, Embedding homotopy types into manifolds (1965). unpublished. [23] M. Tancer and K. Vorwerk, Non-embeddability of geometric lattices and buildings, Discrete and Computational Geometry 47 (2014). [24] J. Tits, Buildings of spherical type and finite BN-pairs, Vol. 386, Springer-Verlag, 1974. [25] E. R. van Kampen, Komplexe in euklidischen Raumen, Abh. Math. Sem. Univ. Hamburg 9 (1933), no. 1, 72–78. 15
4math.GR
1 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS An efficient model-free setting for longitudinal and lateral vehicle control. Validation through the interconnected pro-SiVIC/RTMaps prototyping platform arXiv:1705.03216v1 [cs.SY] 9 May 2017 Lghani MENHOUR, Brigitte d’ANDRÉA-NOVEL, Michel FLIESS, Dominique GRUYER and Hugues MOUNIER Abstract—In this paper, the problem of tracking desired longitudinal and lateral motions for a vehicle is addressed. Let us point out that a “good” modeling is often quite difficult or even impossible to obtain. It is due for example to parametric uncertainties, for the vehicle mass, inertia or for the interaction forces between the wheels and the road pavement. To overcome this type of difficulties, we consider a model-free control approach leading to “intelligent” controllers. The longitudinal and the lateral motions, on one hand, and the driving/braking torques and the steering wheel angle, on the other hand, are respectively the output and the input variables. An important part of this work is dedicated to present simulation results with actual data. Actual data, used in Matlab as reference trajectories, have been previously recorded with an instrumented Peugeot 406 experimental car. The simulation results show the efficiency of our approach. Some comparisons with a nonlinear flatnessbased control in one hand, and with a classical PID control in another hand confirm this analysis. Other virtual data have been generated through the interconnected platform SiVIC/RTMaps, which is a virtual simulation platform for prototyping and validation of advanced driving assistance systems. Keywords Longitudinal and lateral vehicle control, model-free control, intelligent controller, algebraic estimation, flatness property, classical PID controllers, ADAS (Advanced Driving Assistance Systems) I. I NTRODUCTION The vehicle longitudinal and lateral control problem has been widely investigated in the literature via model-based techniques (see, e.g., [2], [7], [8], [9], [10], [19], [20], [21], [27], [28], [30], [31], [23], [43], [33], [34], [36], [39], [41], L. Menhour is with Université de Reims, 9, Rue du Québec, 10000 Troyes, France [email protected] B. d’Andréa-Novel is with Centre de Robotique, Mines ParisTech, PSL Research University, 60 boulevard Saint-Michel, 75272 Paris cedex 06, France. [email protected] M. Fliess is with LIX (CNRS, UMR 7161), École polytechnique, 91128 Palaiseau, France. [email protected] and AL.I.E.N. (ALgèbre pour Identification et Estimation Numériques), 24-30 rue Lionnois, BP 60120, 54003 Nancy, France. [email protected] D. Gruyer is with IFSTTAR-CoSys-LIVIC, 77 rue des Chantiers, 78000 Versailles, France. [email protected] H. Mounier is with L2S (UMR 8506), CNRS – Supélec – Université Paris-Sud, 3 rue Joliot-Curie, 91192 Gif-sur-Yvette, France. [email protected] and the references therein). Their performances are guaranteed in the vicinity of the model used for their implementation. In this paper, a description of the evolution of our developments on longitudinal and lateral vehicle control problem is given. Thereafter, the poor knowledge of vehicle mathematical models has led us to develop a vehicle controller based on model-free setting [12]. In fact, obtaining of a “good” mathematical modeling is a difficult task, if not an impossible one, since uncertainties and disturbances, like frictions and tire nonlinear behaviors, should be taken into account. The vehicle behavior is highly dependent on tire road forces which are usually modeled by linear tire models. Fig. 1 illustrates an example of the tire characteristic obtained during an experimental braking maneuver on a real race track. This maneuver has highlighted the different nonlinear dynamics of the tire forces which cannot be characterized by a linear tire model. Unfortunately, there are other emergency driving situations for which simplified vehicle models cannot provide a realistic behavior of the actual car, such as the rollover phenomenon due to high values of Load Transfer Ratio (LTR), and the under-steering and over-steering behaviors due to high values of front or rear sideslip angles. The parametric dependency and the tedious features vanish here thanks to a new model-free approach where: • • the need to exploit the flatness property of a simplified model disappears, the flat output depending on uncertain parameters is replaced by a simpler and perhaps more natural one, which is the lateral deviation. Our paper is organized as follows. A brief description of the required vehicle models used for simulation or control purposes is given in Section II. A short summary on the model-free control approach with application to the design of a longitudinal/lateral vehicle control and a lateral deviation computation algorithm are presented in Section III. Section IV displays several numerical simulations established using actual data as reference trajectories and a full nonlinear 10DoF vehicle model of an instrumented Peugeot 406 experimental car. The obtained results show the relevance and efficiency of our approach. Some comparisons are provided with a nonlinear flatness-based controller and with classical PID controllers, 2 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS 3000 Lateral forces and two operating points on cornering stiffnesses   max = m(V̇x − ψ̇Vy ) = (Fx f + Fxr ) may = m(V̇y + ψ̇Vx ) = (Fy f + Fyr )  Iz ψ̈ = L f Fy f − Lr Fyr C(f,r)1 2500 Notations are defined in Table I. Notice that the the front and rear longitudinal forces in model (1) are expressed using the following dynamical model of the tire forces:  Fx f = (1/R)(−Ir ω̇ f + Tm − Tb f ) (2) Fxr = −(1/R)(Tbr + Ir ω̇r ) 2000 [N] 1500 1000 C(f,r)2 500 C(f,r)1 C(f,r)2 0 −0.5 0 0.5 1 Sideslip angle [Deg] Longitudinal speed 120 1.5 2 [km/h] 100 80 Vx1 60 40 0 Vx2 200 400 600 800 1000 Distance [m] 1200 (1) 1400 1600 1800 Fig. 1. Experimental lateral tire force characteristic and its nonlinear behavior briefly recalled in Appendix A, in order to highlight the advantages of model-free control. Secondly, a validation of modelfree control is conducted under an interconnected platform SiVIC/RTMaps (See [25]). This platform provides an efficient simulation tool in order to replace an actual system (sensors, actuators, embedded algorithms) by a virtual one in a physically realistic environment. It allows advanced prototyping and validation of perception and control algorithms including quite realistic models of vehicles, sensors and environment. Some concluding remarks are given in Section V. II. D ESCRIPTION OF VEHICLE MODELS FOR SIMULATION OR CONTROL PURPOSES The following section details some vehicle dynamics elements related to the longitudinal/lateral vehicle control problem. Three control approaches are developed: the first one is based on an algebraic nonlinear estimation and differential algebraic flatness of a 3DoF nonlinear two wheels vehicle model (1), the second one is based on simple PID controllers, in order to overcome the modeling problems, the last one is based on the so-called model-free control approach developped in [12], since, under high dynamic loads, such models may become not sufficient to handle the critical maneuvers. For this purpose, the last model-free control law is developed to overcome the modeling problems. For vehicle simulation and control design problems, a large set of vehicle models exist. Usually, the linear bicycle model is widely used for control and estimation algorithms implementation. Furthermore, more complex models exist which are, however, not appropriated for such applications. For the flat nonlinear control issue, the following nonlinear coupled two wheels vehicle model is used (see e.g. [31]): The linear tire model of lateral forces in tha case of small slip angles is defined as follows:     Fy f = C f δ − Vy +Vψ̇L f x   (3)  F = −C Vy −ψ̇Lr yr r Vx For preliminary simulation results, a 10-DoF nonlinear vehicle model and real data recorded previously with a laboratory vehicle are used. The vehicle simulator considered here is a full nonlinear four wheels vehicle model [31] of a Peugeot 406 vehicle. Such a model is composed of longitudinal Vx , lateral Vy and vertical Vz translational motions, roll φ , pitch θ and yaw ψ rotational motions and dynamical models of the four wheels (see [31] for more details on the 10DoF nonlinear simulation vehicle model). All steps of design and simulation are summarized in Fig. 2. In this document, the variables and notations in Table I, with their meaning are used. TABLE I NOTATIONS Symbol Vx Vy ψ̇ ψ y ẏ β δ Tω Fy f , Fyr α f , αr ρx C f , Cr L f , Lr Iz Ix m g µ Variable name longitudinal speed [km.h] lateral speed [km.h] yaw rate [rad/s] yaw angle [rad] lateral deviation [m] derivative of lateral deviation [m/s] sideslip angle at the CoG [rad] wheel steering angle [rad] acceleration/braking torque [Nm] front and rear lateral forces in the vehicle coordinate [N] front and rear tire slip angles [rad] aerodynamics drag coefficient front and rear cornering tire stiffnesses [N/rad] distances from the CoG to the front and rear axles [m] yaw moment of inertia [kg.m−2 ] moment of inertia about x axis [kg.m2 ] vehicle mass [kgm2 ] acceleration due to gravity [m/s2 ] adhesion coefficient III. M ODEL - FREE CONTROL A. A background of the model-free control approach Model-free control was already applied and used quite successfully in a lot of various concrete examples (see the references in [12], [13]). For obvious reasons let us insist here on its applications to intelligent transportation systems: see [1], [8], [41], [42], and [32]. This last reference was briefly discussed in Section I. 3 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS 1. 2. 3. Reference outputs Vehicle Outputs Flat nonlinear control Classical PID controllers Model-free control Longitudinal and lateral vehicle control 10DoF Nonlinear vehicle model Or Simulation platforms SiVIC/RTMaps T  Comparison performance of controllers Fig. 2. Evolution of longitudinal and lateral vehicle control design and comparison 1) The ultra-local model: Replace the unknown SISO system by the ultra-local model: z(ν) = F + αu (4) where • u is the control input, • z is the controlled output, • F is estimated via the measurements of the control input u and the controlled output z. It does not distinguish between the unknown model of the system, the perturbations and uncertainties. • ν ≥ 1 is the derivation order, • α ∈ R is chosen such that αu and z(ν) are of the same order of magnitude, • ν and α are chosen by the practitioner. Remark 1: In all the existing concrete examples ν = 1 or 2 Until now from our knowledge, in the context of model-free control, the example of magnetic bearings [11] with their low friction, provides the only instance where the order ν = 2 is necessary. 2) Intelligent controllers: Set ν = 2 in Equation (4): z̈ = F + αu (5) The corresponding intelligent Derivative controller, or iPID, reads Proportional-Integral- u=−  R F − z̈d + KP e + KI edt + KD ė α (6) where • zd is the desired reference trajectory, • e = z − zd is the tracking error and zd is a desired signal, • KP , KI , KD ∈ R are the usual gains. Combining Equations (5) and (6) yields Z ë + KP e + KI edt + KD ė = 0 where F does not appear anymore. Gain tuning becomes therefore quite straightforward. This is a major benefit when compared to “classic” PIDs. If KI = 0 we obtain the intelligent Proportional-Derivative controller, or iPD,  F − z̈d + KP e + KD ė u=− (7) α Set ν = 1 in Equation (4): ż = F + αu (8) The corresponding intelligent Proportional-Integral controller, or iPI, reads:  R F − żd + KP e + KI edt u=− (9) α If KI = 0 in Equation (9), we obtain the intelligent proportional controller, or iP, which turns out until now to be the most useful intelligent controller: F − żd + KP e (10) α 3) Algebraic estimation of F: F in Equation (4) is assumed to be “well” approximated by a piecewise constant function Fest . According to the algebraic parameter identification developed in [17], [18], where the probabilistic properties of the corrupting noises may be ignored, if ν = 1, Equation (8) rewrites in the operational domain (see, e.g., [44]) Φ sZ = + αU + z(0) s where Φ is a constant. We get rid of the initial condition z(0) d by multiplying the both sides on the left by ds : u=− dZ Φ dU = − 2 +α ds s ds Noise attenuation is achieved by multiplying both sides on the left by s−2 . It yields in the time domain the realtime estimation   Z 6 t (τ − 2σ )z(σ ) Fest (t) = − 3 dσ (11) τ t−τ +ασ (τ − σ )u(σ ) Notice that the extension to the case ν = 2 is straightforward. For this case, the estimation of F is performed by the following estimator: Z +s " Fest (t) = − 60 τ5 Rt 2 2 t−τ (τ + 6σ − 6τσ )z(σ )dσ R t − 30α (τ − σ )2 σ 2 u(σ )dσ τ 5 t−τ # (12) where τ > 0 might be quite small. This integral may, of course, be replaced in practice by a classic digital filter (for more details see e.g. [12]). See [22] for a cheap and small hardware implementation of our controller. It should be emphasized that the above-mentioned estimation methods are not of asymptotic type. 4 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS B. Application to a vehicle control C. Lateral deviation calculation As previously mentioned, to take advantage of model-free approach, an appropriate choice of the outputs and the corresponding inputs control is required. Since to avoid any vehicle modeling problem and ensure a desired tracking longitudinal and lateral motions, the following input and output variables are selected: The parameters that easily characterize a desired reference trajectory are the road curvature ρd , the yaw angle ψd , the path length coordinate sd , the coordinates xd and yd . The road curvature is computed by longitudinal speed and lateral acceleration using the following formula: 1) the acceleration/braking torque u1 = Tω and the longitudinal speed z1 , 2) the steering wheel angle u2 = δ and the lateral deviation z2 . It is obvious that the second output, which is the lateral deviation output, gives a kinematic relationship between the vehicle motions like longitudinal, lateral and yaw motions. This allow us to include some coupling effects between these motions. According to the background on the model-free setting, the above inputs/outputs, and the Newton’s second law, the following two local models are deduced: ρd (sd ) = ay (sd ) 1 = 2 R(sd ) Vx (sd ) (19) This method computes the yaw angle from the curvature (19), then the coordinates ψd , xd and yd are deduced as follows by projection of the path length coordinate sd in the vehicle frame (s0 being the initial condition): Rs   ψd (sd ) =R s0 ρd (sd )ds xd (sd ) = ss0 cos(ψd (sd ))ds (20) R  yd (sd ) = ss0 sin(ψd (sd ))ds Trajectories 350 longitudinal local model: ż1 = F1 + α1 u1 (13) lateral local model: z̈2 = F2 + α2 u2 (14) 250 Note the following properties: • 200 Equations (13)-(14) seem decoupled, but the coupling effects are included in the terms F1 and F2 . Equation (14) is an order 2 formula with respect to the derivative of z2 . For Equation (13) (resp. (14)), the loop is closed by an iP (10) (resp. iPD (7)) as follows: u1 u2  1  F1 − żd1 + KPz1 ez1 = − α1  1  = − F2 − z̈d2 + KPz2 ez2 + KDz2 ėz2 α2 (15) • Z t  t−τ (τ − 2σ )z1 (σ ) +ασ (τ − σ )u1 (σ )  (17) dσ F2est (t) = t − 60 (τ 2 + 6σ 2 − 6τσ )z2 (σ )dσ τ 5 t−τR 30α t − τ 5 t−τ (τ − σ )2 σ 2 u2 (σ )dσ R # (18) Table II gives the gains of the model-free control used in Section IV. α 1.5 1.95 KP 2 1.9 KD 0 0.5 τ [ms] 0.25 0.25 0 −50 −200 −100 0 100 200 300 400 500 Fig. 3 shows an experimental validation of algorithm (20). The actual GPS data (grey curve) are quite close to the computed trajectory (dash blue curve). Moreover, this algorithm only depends on measured data and it is independent of any vehicle parameters. Unfortunately, without accurate ground truth requiring very expensive embedded means and sensors, it is very difficult to quantify precisely the impact and the quality of the obtained result. In the real experiments, we have observed that the results were interesting and relevant. In order to obtain an objective view of the level of quality of the proposed modelfree approach comparatively to classical one, the use of simulation platforms is performed. IV. S IMULATION RESULTS TABLE II M ODEL -F REE C ONTROL PARAMETERS Longitudinal control u1 Lateral control u2 50 Fig. 3. GPS trajectory and trajectory of the algorithm (20) For ν = 2 " 100 (16) For ν = 1 6 F1est (t) = − 3 τ 150 X [m] Moreover, the estimators (11) and (12) are powerful tools to estimate respectively F1 and F2 as follows: • Y [m] • Algorithm GPS data 300 f [Hz] 200 200 As we mentioned previously in this paper, actual condition tests often are expensive and require specially equipped vehicles in order to study the interactions between embedded applications and events encountered in the road environment. Moreover in actual conditions, tens of thousands of kilometers 5 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS are required in order to obtain good enough estimation of an application quality and robustness. Furthermore, with the development of autonomous, cooperative and connecting systems, applications become increasingly complex to implement and validate. Then the Simulation allows to approach the reality of a situation and allows the control of specific events and their reproducibility. The simulation allows too to play with weather factors and to study the influence and the impact of physical parameters on the robustness of the functions used in embedded applications, especially connected and active ones (cooperative and automated driving assistance systems). Difficult or dangerous tests are easily accessible to simulation as well as the analysis of the functions performance in a singular event (emergency braking or road departure warning due to obstacle detection or road friction problem), whereas in real condition, waiting hours could be required before the generation of such an event. Waiting for this real event would be inefficient and unreasonable. In this study, the simulation stage is carried out according to the diagram block of Fig. 4 and uses two levels of simulation and three different platforms: firstly a Matlab platform is used with a full nonlinear model of the instrumented Peugeot 406 car as in [32], and secondly thanks to the pro-SiVIC1 platform [26], [25], [40], [24] interconnected with RTMaps platform2 , we will simulate complex vehicle dynamical modeling [35], environment, infrastructure, and realistic embedded sensors. Moreover pro-SiVIC will provide mechanisms allowing to generate very accurate ground truth for the evaluation and validation stages. RTMaps is a platform which allows to record, replay, manage and process multiple data flows in realtime. A. Simulation under Matlab The first simulation is conducted according to the diagram block of Fig. 5 using a 10DoF nonlinear vehicle model3 and real data recorded previously with a prototype vehicle from CAOR laboratory (Mines Paristech). Several experiments have been realized with an instrumented car to compute the coordinates of the race track depicted in Figure 3. For each trial, several dynamical variables have been recorded; among them: lateral and longitudinal accelerations, longitudinal and lateral speeds, yaw and roll rates, wheel rotation speeds, moments on the four wheels, longitudinal, lateral and vertical forces on the four wheels, steering angle, etc. Moreover, the road geometry (road bank and slope angles) is considered in the closed-loop system. In these simulations, the efficiency and relevance of the model-free control as well as its performances are compared to those of nonlinear flat control and PID controllers. The Table III summarizes the control inputs and the controlled outputs used for each control law. Two simulation scenarios are conducted for two values of the road friction coefficient: the first one for dry asphalt µ = 1 and the second one for wet asphalt µ = 0.7. These scenarios mean 1 pro-SiVIC is a professional software of CIVITEC (http://www.civitec.com). 2 RT-Maps is developed by Intempora (http://www.intempora.com). 3 See [31] and Section II for more details on 10DoF nonlinear vehicle model that the adhesion capability of the ground is reduced, thus, the vehicle becomes unstable, i.e that the vehicle maneuverability and controllability become more difficult. For a dry road (µ = 1), results are shown in Figs. 6, 7 and 8. These simulations demonstrate that the model-free control (MFC) gives quite satisfying results, better than those obtained with PID control and nonlinear flat control. It should be noticed that the test track which has been considered implies strong lateral and longitudinal dynamical requests. This track involves different types of curvatures linked to straight parts, and all these configurations represent a large set of driving situations. Fig. 6 shows that all controllers produce accurate behavior for autonomous driving applications. It is obvious that the results displayed on Fig. 7, show that the tracking errors on the lateral deviation and on the yaw angle outputs produced by the model-free control (MFC) are better compared to those produced by the other controllers. These errors are less than 10 cm and 0.5 deg in the case of model-free control (MFC). Finally, Fig. 8 shows that the control signals computed by all control strategies are quite close to the actual ones provided by the driver along the track race. Moreover, the effectiveness of the model-free control (MFC) results is also evaluated through the following normalized error: ez (i) = 100 |zs (i) − zact (i)|/max |zact | (21) Table IV summarizes a comparison between the closedloop simulated results zs and the actual data zact using the normalized error (21). The normalized norm is computed for dry and wet road scenarios. In the two cases, the model-free control (MFC) provides better results than PID control and nonlinear flat control. Using the model-free control (MFC), the maximum normalized error values are less than 0.5 % for dry road test and less than 3.5 % for wet road test. However, all normalized errors obtained with other controllers are deteriorated mainly with wet road test. These results confirm that the model-free control (MFC) with natural outputs produces a satisfactory behavior. B. Simulation under pro-SiVIC interconnected with RTMaps After the Matlab stage for the model-free approach validation, a second simulation level is addressed. This second stage proposes to implement the model-free control algorithms in a more realistic way. In this case, very realistic and complex vehicle modeling is used. This vehicle level of complexity is presented in [35]. Attached to this vehicle model, a set of virtual sensors are simulated. All this functionalities are available in pro-SiVIC platform. The data generated by proSiVIC and its sensors are sent to RTMaps which is the real software environment used in a real prototype vehicle in order to implement ADAS (Advanced Driving Assistance Systems) applications. Using an efficient way to interconnect these 2 platforms, we obtain an efficient Software In the Loop (SIL) solution and a full real-time simulation architecture presented in Fig. 9. 6 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS T Actual data: reference trajectory Longitudinal and lateral vehicle control Step 1: Simulation with 10DoF nonlinear model Step 2: Simulation under Interconnected SiVIC/RTMaps platform  Vehicle outputs Fig. 4. Validation diagram block of closed-loop system Instrumented Peugeot 406 car: trails recorded previously on race track Reference outputs calculation Vehicle models Outputs Trajectories and vehicle dynamical parameters. Measured driver inputs: steering angle and wheel torque. T ,   Longitudinal/ lateral vehicle controllers: 1. Flat control 2. PID controllers 3. Model-free control T  10DoF Nonlinear vehicle model with road geometry for simulation under Matlab Comparison with actual data: control signals, trajectories and vehicle dynamical parameters Fig. 5. Validation diagram block of vehicle controllers, reference trajectory reconstruction and vehicle models TABLE III CONTROL INPUTS AND CONTROLLED OUTPUTS OF EACH CONTROL LAW Inputs Outputs Driving/braking torque Tω Steering angle δ Longitudinal speed Vx Second flat output z2 Lateral deviation y PID control × × × NA × Flat control × × × × NA MFC × × × NA × µ = 0.7 µ =1 TABLE IV M AXIMUM NORMALIZED ERRORS ON SOME VARIABLES OF THE CLOSED - LOOP SYSTEM FOR DRY AND WET ROAD Longitudinal speed eVx (%) Yaw angle eψ (%) Lateral deviation ey (%) Longitudinal speed eVx (%) Yaw angle eψ (%) Lateral deviation ey (%) 1) The pro-SiVIC platform: From the past decade, a great set of researches aimed to improve the road safety through the implementation of driving assistance systems. These researches generally take into account a local perception (from the ego-vehicle point of view) and the ego-vehicle maneuvers (e.g. braking and acceleration). Nevertheless, in many actual road configurations, a local perception is no longer sufficient. Additional information is needed to minimize risk and maximize the driving security level. This additional information requires additional resources which are both time-consuming and expensive. It therefore becomes essential to have a simulation environment allowing to prototype and to evaluate extended, enriched and cooperative driving assistance systems PID control 0.93 1.76 2.8 5.54 13.54 16.64 Flat control 0.45 1.21 1.4 4.23 7.67 9.37 MFC 0.186 0.45 0.35 2.31 2.7 3.49 in the early design stages. An efficient and functional simulation platform has to integrate different important capabilities: Road environments, virtual embedded sensors (proprioceptive, exteroceptive), infrastructure sensors and cooperative devices (transponders, communication means, ...), according to the physical laws. In the same way, a physics-based model for vehicle dynamics (potentially with steering wheel column and powertrain models) coupled with actuators (steering wheel angle, torques on each wheel) is necessary. pro-SiVIC takes into account these remarks and these requirements, and is therefore a very efficient and dedicated platform to develop and prototype a high level autonomous driving system with cooperative and extended environment perception. 7 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS Longitudinal speed Braking/Driving Wheel Torque Actual PID controllers Flat control MFC 110 100 0 −500 −1000 90 [Km/h] 500 [Nm] 120 0 500 80 1000 Steering angle 150 70 100 [deg] 60 50 1500 Actual PID controllers Flat control MFC 50 0 −50 40 0 500 1000 Distance [m] Fig. 6. The actual longitudinal speed versus the closed-loop simulated longitudinal velocities Lateral deviation errors 1 [m] 0.5 0 −0.5 −1 0 500 1000 1500 Yaw rate errors [deg] 20 PID controllers Flat control MFC 10 0 −10 0 500 1000 Distance [m] 0 1500 1500 Fig. 7. Tracking trajectory errors on lateral deviation and yaw angle This platform is currently shared in two version: pro-SiVIC and pro-SiVIC research. The first version is the industrial one. The second version, which we have used, is the research version developed in IFSTTAR institute. The research version, in its current state, includes a set of different exteroceptive and proprioceptive sensors, thus communication means. The exteroceptive sensors set involved several types of cameras (classical, omnidirectional, and fisheye), several models of laser scanner, and some levels of automotive RADAR modeling. The proprioceptive sensors model odometers (curvilinear distance, speed, impulses) and Inertial Navigation systems (accelerometers, gyrometers). Then communication means for cooperative systems include both 802.11p communication media and beacon (transponder). For all these sensors and medias, it is possible, in real-time and during the simulation stages, to tune and to change the sensor’s sampling time, operating modes, and intrinsic/ extrinsic parameters. Some examples of 500 1000 Distance [m] 1500 Fig. 8. Wheel torques and steering angles control signals: actual and simulated the rendering of these sensors are shown in Fig. 10. 2) RTMaps platform: RTMaps is a software platform originally developed at Mines ParisTech by B. Steux [38].4 for the needs of the European Carsens project. The main objective of this platform was to provide an efficient way to collect, to replay and to process, in real real-time, a great set of heterogeneous and asynchronous sensors. So this platform can provide a relevant solution for the embedded and multisensors applications prototyping, test and evaluation. In the processing stages, RTMaps allows to manage and to process in same time raw data flows coming from images, laser scanner, GPS, odometric, and INS sensors. The algorithms, which can be applied to the sensor data, are provided in several libraries (RTMaps packages) dedicated to specific processing (image processing and multi-sensors fusion). In its current user configuration an efficient new package and new module development procedure is available. This capability has been used in order to implement our different perception and control modules. This type of architecture gives a powerful tool in order to prototype embedded ADAS (Advanced Driving Assistance Systems) with either informative outputs or orders to control vehicle dynamics. At each stage, the sensor data and module outputs are time-stamped for an accurate and a reliable time management. 3) pro-SiVIC/RTMaps: an interconnected platform for efficient Advanced Driving Assistance Systems prototyping: The interconnection between pro-SiVIC and RTMaps platforms brings to RTMaps the ability to replace real raw data coming from embedded sensors by simulated ones. This platforms coupling provides an efficient and a solid framework for the prototyping and the evaluation of control/command and perception algorithms dedicated to autonomous driving and SIL applications. In this multiple platform, the raw data coming from virtual sensors, vehicles, and ground truth are sent to RTMaps with, for each one, a time stamp. These data are used as inputs in the applications developed in 4 It is now marketed by the company Intempora. 8 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS Fig. 9. pro-SiVIC/RTMaps interconnected platforms for real-time prototyping, test and validation Fig. 10. Some exteroceptive types of sensors in pro-SiVIC a specific package involving a perception/control/command module. Then the outputs of the control/command module provide the orders which are sent back to the interface module which allows, in pro-SiVIC, to control the longitudinal and lateral maneuvers of the virtual ego-vehicle. In our case, we do not use the powertrain and steering wheel models. This implies that the orders act directly on the dynamics vehicle model (front wheel angle and wheel torques). This chain of design is very efficient because the algorithms developed in RTMaps can then be directly transferred either as a microsoftware on real hardware devices, or in an embedded version of RTMaps in an actual prototype vehicle. In this way and with the high level of vehicle and sensors modeling, the design process can be considered very close to reality (real vehicles, real sensors). The different modes, flow of data, types of data, type of peripherals handled by this interconnection mechanism are shown in Fig. 11. Several mechanisms have been implemented and tested. The best solution is clearly the optimized FIFO (First In, First Out) method which allows the transfer of a great number of data in a short time. It is a very critical functionality in order to guarantee a real-time link between pro-SiVIC and the perception/data processing/control algorithms. In order to correctly manage time, a synchronization module is available. This synchronization allows providing a time reference from pro-SiVIC to RTMaps. Then RTMaps is fully synchronized with pro-SiVIC components (vehicle, pedestrian and sensors). The pro-SiVIC/RTMaps simulation platform also enables to build reference scenarios and allows evaluating and testing of control/command and perception algorithms. In fact, the pro- 9 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS interface Reference sensors (optique) Reference sensors (observer) Optical sensors Telemetric sensors Proprio sensors 3D Objects Value (int, float) events Acc Torques (floats) Torque orders Brq Steering (float) vehicle Time Base renderer Script Commands Peripherals management Time management mgEngine Frame of data Orders event pedestrian Frames (int, float, double) Images (iplImage) Frames (floats) Optical sensors Modes and sampling time management for sensors Images (char *) RTMaps Time (int64) Shared Memory Steering orders Applications of vehicle automation API SiVIC Synchro time Package Interfaces SiVIC FIFO Peripherals management (RTMaps) peripherals Fig. 11. SiVIC/Types of data managed between pro-SiVIC and RTMaps SiVIC/RTMaps platform constitutes a full simulation environment because it provides the same types of interactivity found on actual vehicles: steering wheel angle, acceleration/braking torques, etc. From the different modules and functionalities available in both pro-SiVIC and RTMaps platforms, and following the diagram block of Fig. 4, we have implemented a complete operational architecture in order to test and to evaluate the model-free controller with a real-time generated reference. In this architecture, shown in Fig. 12 and Fig. 13, pro-SiVIC provides the virtual environment, the complex vehicle dynamics modeling, and the sensors simulation. Then data coming from a vehicle observer sensor are sent towards RTMaps platform by using a dedicated interface library. This ”‘observer”’ sensor, which is a state vector with 40 parameters, includes all informations concerning the ego-vehicle state and dynamics (positioning, angles, speeds, angle speeds, accelerations, wheel speeds, ...). In RTMaps, we take into account these vehicle observer data in order to calculate the longitudinal and lateral control outputs. Then, these outputs are sent back to proSiVIC’s vehicle and more specifically to the virtual actuators. In addition, an events mechanism has been implemented in order to apply some dynamic constraints in the simulation (obstacle appearance, vehicle parameters modification, ...). In order to provide speed limit constraints in different areas, infrastructure sensors like road side beacons have been put on the virtual environment. The real-time software in the loop implementation with some data viewers is presented in Fig. 12. 4) Simulation results with the interconnected platforms proSiVIC and RTMaps: In order to test the model-free control in realistic scenario, the Satory’s test tracks have been used. The modeling of these tracks in the pro-SiVIC Platform was made from surveyor’s data with a centimeter accuracy including road coordinates and road geometry. In addition, the entire virtual infrastructure corresponds to the real infrastructure present on the real tracks. These tracks are shared into three different areas. The first is the ”routiere” track with a range of 3.4 km corresponding to a national road with very strong curvatures. The second track is a speedway (2 km) similar to a highway scene. The third track is the ”‘val d’or” area corresponding to a rural area. In our tests, we only used the first track. The level of reality between the track modeling in the simulation platform and the actual track can be seen in Fig. 14. Moreover, the inputs/outputs used in this second test are the same as those used in the first one (see Table III). Using this track, the Figs. 15, 16, 17 and 18 give the simulation results obtained by implementing the control law under the interconnected pro-SiVIC/RTMaps platforms. These results confirm the efficiency of the proposed control law even 10 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS SiVIC platform Model-Free Controller Controller Component properties Car observer RTMaps platform Controller outputs and orders Fig. 12. Real-time implementation of the model-free control with interconnected platforms RTMAPS/pro-SiVIC Decision Ego map Perception Communication Buses: DDS, Optimized Shared Memory, Sensorb Data flow: Torque on wheels Steering wheel angle Beacon, observer Vehicle and Sensors Environnement Orders Algorithms Decision Extended map 1 Events Com RTMaps Control Reference track Events Virtual EgoRVehicle oscilloscopes Road marking Ego vehicle pos Beacon 1 Road marking Number of lane curvature intersection info Actuators Beacon Receiver Pro-SiVIC Pro-SiVIC Beacon 2 Speed limit Road state Weather condition Traffic info Roads Fig. 13. General diagram of software in the loop model-free controller with functional layers under a complex and a full simulation environment very close to real conditions. The tracking performances, in terms of longitudinal speed and lateral deviation tracking errors, are also depicted in Fig. 18. With this scenario included very strong curvatures, we can observe a little degradation of the lateral deviation accuracy. Nevertheless the results stay in an acceptable domain allowing to control position of the vehicle in the current lane. About the speed profile, the vehicle follows closely the reference with an absolute error lower than 0.2 km/h. 11 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS Fig. 14. Satory’s test track (virtual, real, and bird view) Longitudinal speeds Trajectories 90 500 Reference New MFC Actual New MFC 80 400 70 [km/h] Y [m] 300 200 60 50 100 40 0 −100 −1200 −1000 30 −800 −600 −400 X [m] −200 0 200 400 20 0 500 1000 1500 2000 2500 3000 Distance [m] Fig. 15. Reference trajectory versus the simulated closed-loop trajectory Fig. 16. Longitudinal speed: actual and simulated Moreover, Figs. 19, 20 and 21 show three simulation tests with three values of the road friction coefficient. We can observe that these tests highlight the performance of the model-free control approch under low road friction coefficient and high longitudinal speed. be able to find answers to many research problems affecting both the perception of the environment, interpretation of road scenes, the safe path planning, the decision making and finally the control/command of the vehicle. In our work, we mainly address the final stage to produce control input for the vehicle control. Generally, in this stage, solutions require knowledge of vehicle dynamics and a accurate estimation of both the parameters and the variables of these dynamics models (often complex). Moreover, in real conditions, obtaining knowledge on these complex dynamic models is, in general, difficult and needs to implement expensive and complex means (sensors, V. C ONCLUSION In recent years, many researches and many studies are carried out to allow the development of co-pilot functions for autonomous driving. In order to converge to a reliable, robust and functional solution in driving limit conditions, it is essential to 12 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS Longitudinal speed Braking/Driving Wheel Torque 50 0 45 [Nm] 500 −500 500 1000 1500 2000 Steering angle 6 2500 3000 [Km/h] −1000 0 40 35 30 4 [deg] Actual µ=1 µ = 0.5 µ = 0.3 New MFC 2 25 0 0 500 1000 1500 Distance [m] 2000 2500 −2 −4 0 500 1000 1500 2000 Distance [m] 2500 3000 Fig. 19. Longitudinal speed: actual and simulated for µ = 1, µ = 0.5 and µ = 0.3 Braking/Driving Wheel Torque 800 Fig. 17. Control inputs: Wheel torques and steering angles control signals 600 400 [Nm] Logitudinal speed error 0.2 200 0 [Km/h] 0.1 −200 0 0 500 −0.1 500 1000 1500 2000 2500 2500 2 3000 Lateral deviation error 1 0 −2 µ=1 µ = 0.5 µ = 0.3 −4 −6 0.5 [m] 2000 4 New MFC [deg] −0.2 0 1000 1500 Steering angle −8 0 0 500 1000 1500 Distance [m] 2000 2500 −0.5 −1 0 500 1000 1500 2000 Distance [m] 2500 3000 Fig. 20. Control inputs: Wheel torques and steering angles control signals for µ = 1, µ = 0.5 and µ = 0.3 Lateral deviation errors 1.5 Fig. 18. Tracking errors on longitudinal speed and lateral deviation [m] 1 0.5 0 −0.5 −1 0 500 0.5 [km/h] hardware architecture). It is the same problem for the ground truth generation. Nevertheless, in case of poor estimation of the attributes of these dynamic models, the control algorithms could produce orders that will lead the system to diverge and by extension to dangerous maneuvers for the vehicle. In this paper, we propose a new approach of vehicle control using no vehicle evolution model. To demonstrate and to prove the relevance of such an approach, we have compared it with the results of several other more traditional approaches such as a PID controller and a flatness based controller. In order to test, to evaluate, and to validate this new approach, two simulation stages with different levels of dynamics vehicle modeling are used. The first level uses Matlab with a dynamic model of a Peugeot 406 (with 10 DoF). In this first stage of evaluation, the reference is provided by a trajectory obtained from a real Peugeot 406. The results clearly show a significant gain by 1000 1500 Longitudinal speed errors 2000 2500 2000 2500 0 −0.5 0 µ=1 µ = 0.5 µ = 0.3 500 1000 1500 Distance [m] Fig. 21. Tracking errors on longitudinal speed and lateral deviation for µ = 1, µ = 0.5 and µ = 0.3 13 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS using the model-free setting comparatively to the other. The accuracy obtained from the model-free controller is, in this first case of simulation, good enough in order to use it in an autonomous driving application. Another conclusion can also be inferred from the first results. Indeed, the use of the model-free controller also shows that the question of vehicle control can be effectively addressed and processed without need to a complex dynamics vehicle modeling. Only simple methods and functions are needed in order to solve this problem. Secondly, to validate this approach in a simulation environment very close to the prototyping conditions and real condition use, we have implemented the model-free approach in a complex platform made up of pro-SiVIC (simulation of vehicles, infrastructure and sensors) and RTMaps (management and processing of data flows. Also used in the real vehicle prototypes of LIVIC and CAOR laboratories). The interconnection of these two platforms has enabled to integrate the model-free controller in a SIL architecture. In addition to generating information from embedded sensors, pro-SiVIC has made it possible to generate a very accurate ground truth. Again, the results were very successful and have validated the relevance of this new model-free controller approach even in extreme driving conditions with very low curvature radii. For this second level of simulation, the vehicle was evolving on a very realistic modeling of Satory’s test tracks. Currently, the tests were carried out using sensor data without noise or malfunctions. In future works, we will discuss the impact of noise and failures of the embedded sensors on the robustness of this model-free approach (see [12]). With these new studies, we hope that we will prove that the model-free controller can remain sufficiently robust and sensors failure tolerant to ensure safe control stage enough longer in time to give back the vehicle control to the driver. This step is crucial to enable the deployment of safe driving automation applications. A PPENDIX A F LATNESS - BASED AND PID CONTROLLERS After some straightforward computations, model (1) can be rewritten in the following standard form (see [31] for details): (22) Moreover the flatness property [14], [29], [37] of system (22) is established according to the following proposition. Proposition 1: The following outputs: ( z1 = Vx z2 = L f mVy − Iz ψ̇ are flat outputs for system (22). r f r z r f 1 f and  ż1 z̈2   = ∆(z1 , z2 , ż2 ) u1 u2  + Φ(z1 , z2 , ż2 ) (25) The terms ∆11 , ∆12 , ∆21 , ∆22 , Φ1 and Φ2 of the matrices ∆ and Φ are in detailed in [31]. Thus  u= Tω δ  = ∆−1 (z1 , z2 , ż2 )   ż1 z̈2  − Φ(z1 , z2 , ż2 ) (26) with rx = 1 and ru = 2. Consequently, the system (22) is flat with flat outputs (23). Then, in order to track the desired output f re f zre 1 and z2 , set  ż1 z̈2 f 1 2 żre 1 + K1 ez1 + K1 ez1 dt "  = R f 1 2 3 z̈re 2 + K2 ėz2 + K2 ez2 + K2 ez2 dt # (27) R re f f re f where, ez1 = zre 1 − z1 = Vx −Vx and ez2 = z2 − z2 . Choosing 1 2 1 2 3 the gains K1 , K1 , K2 , K2 and K2 is straightforward. The control law contains derivatives of measured signals, which are of course noisy. This estimation is performed using the recent advances algebraic estimation techniques in [15], [16], [17], [18]. Remark 2: Let us notice that the second flat output z2 is the angular momentum of a point located on the axis between the centers of the rear and front axles. B. PID controllers A. A flatness-based controller ẋ = f (x,t) + g(x,t)u Proof: Some algebraic manipulations (see [31] for more details) yield:  T = x = Vx Vy ψ̇   z1     L f mz1 ż2 +Cr (L f +Lr )z2 (24)   z2 − Iz  L f m L f m Cr (L f +Lr )(Iz −Lr L f m)+(L f mz1 )2      L f my1 ż2 +Cr (L f +Lr )z2 − C (L +L 2 )(I −L L m)+(L mz ) (23) It seems interesting, in order to test the validity and the limits of the proposed control methods, to compare them with the classical well known PID controllers. Numerous methods to design PID controllers exist in the literature, see e.g. [3], [5], [4], [6]. For our case study, the gains (KVp x , KdVx , KiVx ) (gains of longitudinal PIDVx control) and (K py , Kdy , Kiy ) (gains of lateral deviation PIDy control) are computed in vicinity of V = 20m/s. Then, using the oscillation method [3], the chosen numerical values of the gains are (KVp x = 1.51, KdVx = 0.52, KiVx = 0.75) for PIDVx and (K py = 0.95, Kdy = 0.36, Kiy = 46) for PIDy . Moreover, in order to avoid the impact of the noisy measurements on the longitudinal speed and the lateral deviation, a first order filter is associated to the derivative actions of these controllers (see [3] for more details). The following PID controllers are used:  R u1 (t) = KVp x eVx + KdVx ėVx +RKiVx eVx dt (28) y y y u2 (t) = K p ey + Kd ėy + Ki ey dt 14 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS R EFERENCES [1] H. Abouaı̈ssa, M. Fliess, C. Join, “On ramp metering: towards a better understanding of ALINEA via model-free control”, Int. J. Control, Vol. 90(5), 2017, pp. 1018-1026. [2] J. Ackermann, J. Guldner, W. Sienel, R. Steinhauser, V. I. Utkin, “Linear and nonlinear controller design for robust automatic steering,” IEEE Trans. Contr. Syst. Techno., Vol. 3, 1995, pp. 112-143. [3] K. J. Aström and T. Hagglund, “Automatic tuning of PID controllers”, Instrument Society of America, Research Triangle Park, North Carolina, U.S.A, 1988. [4] M. Saeki, “Fixed structure PID controller design for standard H∞ control problem,” Automatica, Vol. 42, 2006, pp. 93-100. [5] W. K. Ho, K. W. Lim, Wen Xu, “Optimal gain and phase margin tuning for PID controllers,” Automatica, Vol. 34(8), 1998, pp. 1009-1014. [6] Q.-G. Wang, C. L. Zhen Ye, G. Wen, Y. He, C. C. Hang, “A quasi-LMI approach to computing stabilizing parameter ranges of multi-loop PID controllers,” Journal of Process Control, Vol. 17, 2007, pp. 59-72. [7] B. d’Andréa-Novel, M. Ellouze, “Tracking with stability for a vehicle braking in a corner”, 40th IEEE Conf. Decision Contr., Orlando, 2001. [8] S. Choi, B. d’Andréa-Novel, M. Fliess, H. Mounier, J. Villagra, “Modelfree control of automotive engine and brake for Stop-and-Go scenarios”, Europ. Control Conf., Budapest, 2009. Preprint available at http://hal.archives-ouvertes.fr/inria-00395393/en/ [9] V. Cerone, M. Milanese, D. Regruto, “Combined automatic lane-keeping and driver’s steering through a 2-DOF control strategy,” IEEE Trans. Contr. Syst. Techno., vol. 17, 2009, pp. 135-142. [10] H. Chou, B. d’Andréa-Novel, “Global vehicle control using differential braking torques and active suspension forces,” Vehicle Syst. Dynam., vol. 43, 2005, pp. 261-284. [11] J. De Miras, C. Join, M. Fliess, S. Riachy and S. Bonnet, “Active magnetic bearing: A new step for model-free control”, 52nd IEEE Conf. Decision Control, Florence, 2013. Preprint available at http://hal.archives-ouvertes.fr/hal-00857649/en/ [12] M. Fliess, C. Join, “Model-free control”, Int. J. Control, vol. 86, 22282252, 2013. Preprint available at http://hal.archives-ouvertes.fr/hal-00828135/en/ [13] M. Fliess, C. Join, “Stability margins and model-free control: A first look”, 13th Europ. Contr. Conf., Strasbourg, 2014. Preprint available at http://hal.archives-ouvertes.fr/hal-00966107/en/ [14] M. Fliess, J. Lévine, P. Martin, P. Rouchon, “Flatness and defect of nonlinear systems: introductory theory and examples,” Int. J. Contr., vol. 61, 1995, pp. 1327-1361. [15] M. Fliess, C. Join, H. Sira-Ramı́rez, “Non-linear estimation is easy”, Int. J. Model. Identif. Control, vol. 4, 2008, 12-27. (http://hal.archives-ouvertes.fr/inria-00158855/en/) [16] M. Mboup, C. Join, M. Fliess, “Numerical differentiation with annihilators in noisy environment”, Numer. Algor., vol. 50, 2009, 439-467. [17] M. Fliess, H. Sira-Ramı́rez, “An algebraic framework for linear identification”, ESAIM Control Optimiz. Calc. Variat., vol. 9, 151-168, 2003. [18] M. Fliess, H. Sira-Ramı́rez, “Closed-loop parametric identification for continuous-time linear systems via new algebraic techniques”, in eds. H. Garnier and L. Wang, Identification of Continuous-time Models from Sampled Data, Springer, pp. 362–391, 2008. Preprint available at http://hal.archives-ouvertes/inria-00114958/en/ [19] D. Fernandez-Llorca, V. Milanes, I. Parra Alonso, M. Gavilan, I. Garcia Daza, J. Perez, M.A. Sotelo, “Autonomous Pedestrian Collision Avoidance Using a Fuzzy Steering Controller”, in IEEE Trans. Intelligent Transport. Systems, 12, 390-401, 2011. [20] S. Formentin, P. de Filippi, M. Corno, M. Tanelli, S.M. Savaresi, “Datadriven design of braking control systems,” IEEE Trans. Contr. Syst. Techno., vol. 21, 186-193, 2013. [21] S. Fuchshumer, K. Schlacher, T. Rittenschober, “Nonlinear vehicle dynamics control - A flatness based approach,” in 44th IEEE Conf. Decision Contr. & Europ. Contr. Conf., Seville, 2005. [22] C. Join, F. Chaxel, M. Fliess, “Intelligent” controllers on cheap and small programmable devices”, in 2nd Int. Conf. Control Fault-Tolerant Systems, Nice, 2013. Preprint available at http://hal.archives-ouvertes.fr/hal-00845795/en/ [23] Ge Guo, Wei Yue, “Sampled-Data Cooperative Adaptive Cruise Control of Vehicles With Sensor Failures”, in IEEE Transactions on Intelligent Transportation Systems, 2404-2418, 15(6), 2015. [24] D. Gruyer, S. Glaser, B. Monnier, “Simulation of vehicle automatic speed control by transponder equipped infrastructure”, in in proc. IEEE ITST2009, Lille, France, October 2009. [25] D. Gruyer, S. Glaser, B. Monnier, “SiVIC, a virtual platform for ADAS and PADAS prototyping, test and evaluation”, in proc. FISITA2010, Budapest, Hungary, 30 may-4 june 2010. [26] D. Gruyer, N. Hiblot, P. Desouza, H. Sauer, B. Monnier, “A new generic virtual platform for cameras modeling”, in proc. of International Conference VISION 2010, Montigny le Bretonneux, France, 6-7 october 2010. [27] C. Hatipoglu, Ü. Özgüner, K.A. Redmill, “Automated lane change controller design”, IEEE Trans. Intelligent Transport. Syst., 4, 13-22, 2003. [28] A. Khodayari, A. Ghaffari, S. Ameli, J. Flahatgar, “A historical review on lateral and longitudinal control of autonomous vehicle motions”, in IEEE Int. Conf. Mechanical Electrical Techno., Singapore, 2010. [29] J. Lévine, “Analysis and Control of Nonlinear Systems – A Flatnessbased Approach”, Springer, 2009. [30] M. Manceur, L. Menhour, “Higher Order Sliding Mode controller for Driving Steering Vehicle Wheels: Tracking Trajectory Problem”, IEEE Conf. Decision Control, Florence, 2013. [31] L. Menhour, B. d’Andréa-Novel, M. Fliess, H. Mounier, “Coupled nonlinear vehicle control: Flatness-based setting with algebraic estimation techniques”, Control Engin. Practice, vol. 22, 135-146, 2014. [32] L. Menhour, B. d’Andréa-Novel, M. Fliess, H. Mounier, “Multivariable decoupled longitudinal and lateral vehicle control: A model-free design”, IEEE Conf. Decision Control, Florence, 2013. Preprint available at http://hal.archives-ouvertes.fr/hal-00859444/en/ [33] S.A. Nobe, F.-Y. Wang, “An overview of recent developments in automated lateral and longitudinal vehicle controls”, in IEEE Int. Conf. Syst. Man Cyber., Tucson, 2001. [34] D. Odenthal, T. Bunte, J.Ackerman, “Nonlinear steering and breaking control for vehicle rollover avoidance”, in Europ. Control Conf., Karlsruhe, 1999. [35] D. Gruyer, S. Demmel, B. dAndrea-Novel, G. Larue, A. Rakotonirainy, “Simulating Cooperative Systems Applications: a New Complete Architecture”, in International Journal of Advanced Computer Science and Applications (IJACSA), Volume 4, 2013. [36] C. Poussot-Vassal, O. Sename, L. Dugard, P. Gaspar, Z. Szaboc, J. Bokor, “Attitude and handling improvements through gain-scheduled suspensions and brakes control”, Control Engin. Practice, vol. 19, 252263, 2011. [37] H. Sira-Ramı́rez, S. Agrawal, “Differentially Flat Systems”, Marcel Dekker, 2004. [38] B. Steux, “RTMaps, un environnement logiciel dédié la conception d’applications embarquées temps-réel. Utilisation pour la détection automatique de véhicules par fusion radar/vision”, Thèse, Ecole des Mines de Paris, 2001. [39] G. Tagne and R. Talj and A. Charara, “Design and comparison of Robust Nonlinear Controllers for the Lateral Dynamics of Intelligent Vehicles”, IEEE Transactions on Intelligent Transportation Systems, vol. 17(3), 796-809, 2016. [40] B. Vanholme, D. Gruyer, S. Glaser, S. Mammar, “Fast prototyping of highly autonomous cooperative driving system for public roads”, in proc. IV2010, SanDiego, June 2010. [41] J. Villagra, B. d’Andréa-Novel, S. Choi, M. Fliess, H. Mounier, “Robust stop-and-go control strategy: an algebraic approach for nonlinear estimation and control”, Int. J. Vehicle Autonomous Systems, 7, 270-291, 2009. Preprint available at http://hal.archives-ouvertes.fr/inria-00419445/en/ [42] J. Villagra, D. Herrero-Pérez, “A comparison of control techniques for robust docking maneuvers for an AVG”, IEEE Trans. Control Systems Techno., 20, 1116-1123, 2012. [43] Wei Yue, Ge Guo, Wang liyuan, Wei Wang, “Nonlinear Vehicle Platoon Allowing Range-limited Sensors: Application to Arduino Cars”, in International Journal of Control, 1037-1050, 8(5), 2015. [44] K. Yosida, Operational Calculus (translated from the Japanese), Springer, 1984. Lghani MENHOUR obtained his Ph.D. in automatic control in 2010 from the Laboratoire Heuristique et diagnostic des systèmes complexes of the Université de Technologie de Compiègne, Compiègne, France. Since 2011, he is an Assistant Professor at the Laboratoire CReSTIC of the Université de Reims-Champagne-Ardenne, Reims, France. His research interests include linear and nonlinear systems, control and estimation, switched systems, Model-free control, algebraic approaches, intelligent transportation systems. IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS Brigitte d’ANDRÉA-NOVEL graduated from École Suprieure d’Informatique, Électronique, Automatique in 1984. She received the Ph. D. degree from École Nationale Suprieure des Mines de Paris in 1987 and the Habilitation degree from Universit Paris-Sud in 1995. She is currently a Professor of Systems Control Theory and responsible for the research group in Advanced Control Systems at the Center for Robotics from MINES ParisTech. Her current research interests include nonlinear control theory and applications to underactuated mechanical systems, control of wheeled vehicles with applications to automated highways. In that context she has developed regular collaborations with PSA-Peugeot-Citroën and Valeo on “Global Chassis Control”, “Stop and Go algorithms” and “Automatic parking”. Moreover, she has also been interested in modeling and boundary control of dynamical systems coupling ODEs and PDEs, with applications to the control of irrigation canals and wind musical instruments. Michel FLIESS works at the École polytechnique (Palaiseau, France). In 1991 he invented with J. Lévine, P. Martin, and P. Rouchon (Ecole des Mines de Paris, France), the notion of differentially flat systems which is playing a crucial role in many concrete situations all over the world. In 2002 he introduced with H. Sira-Ramı́rez (CINVESTAV, Mexico City) algebraic estimation and identification techniques, which are most useful in control and signal processing. Ten years ago he started with C. Join (Université de Lorraine, Nancy, France) a model-free control setting which is now being used in a number of concrete industrial applications. He got several prizes, including three ones from the French Academy of Sciences. Dominique GRUYER was born in France, in 1969. He received the M.S. and Ph.D. degree respectively in 1995 and 1999 from the University of Technology of Compigne. Since 2001, he is a researcher at INRETS, into the perception team of the LIVIC department (Laboratory on interactions between vehicles, Infrastructure and drivers) and he works on the study and the development of multi-sensors/sources association, combination and fusion. His works enter into the conception of on-board driving assistance systems and more precisely on the carry out of multi-obstacle detection and tracking, extended perception, accurate ego-localization. He is involved for multi-sensor fusion tasks and sensors modeling and simulation in several European and French projects dealing with intelligent vehicles (HAVEit, Isi-PADAS, CVIS, CARSENSE, eMOTIVE, LOVe, ARCOS, MICADO, ABV, eFuture, CooPerCom, SINETIC, ...). He is responsible and the main inventor of the SiVIC platform (Simulation for Vehicle, Infrastructure and sensors). Since 2010, He is the team leader of the LIVICs Perception team. For 5 years, he is a network researcher in AUTO21 (Canada). He was the co-founder and technical Director of the CIVITEC Company until 2015. Since April 2015, CIVITEC is a subsidiary of the ESI group company. He is now the head of the LIVIC laboratory (since January 2015), a Research Director (since 2014) in IFSTTAR, and Perception system and data fusion Scientific Director (since April 2015) for ESI group (CIVITEC). Hugues MOUNIER obtained his Ph.D. in automatic control in 1995 from the Laboratoire des Signaux et Systèmes of the Université Paris Sud, Orsay, France. From 1998 to 2010 he has been with the Institut d’Electronique Fondamentale of the same University. He is currently Professor at the Laboratoire des Signaux et Systèmes. His research interests include automotive and realtime control, neuroscience, delay systems and systems modelled by partial differential equations 15
3cs.SY
NON-FREE ITERATIVE DIFFERENTIAL MODULES arXiv:1511.00476v1 [math.AC] 2 Nov 2015 ANDREAS MAURISCHAT Abstract. In [7] we established a Picard-Vessiot theory over differentially simple rings which may not be fields. Differential modules over such rings were proven to be locally free but don’t have to be free as modules. In this article, we give a family of examples of non-free differential modules, and compute Picard-Vessiot rings as well as Galois groups for them. 1. Introduction Differential Galois theory – and also difference Galois theory – is a generalisation of classical Galois theory to transcendental extensions. Instead of polynomial equations, one considers differential resp. difference equations, and even iterative differential equations in positive characteristic. One branch of differential Galois theory is Picard-Vessiot theory, the study of linear differential equations. In this case the Galois group turns out to be a linear algebraic group or more general an affine group scheme of finite type over the field of constants. Originally, one considered extension of fields as in the finite Galois theory. However, this had to be extended for two main reasons: In difference Galois theory, zero-divisors may occur in minimal solution rings. The Galois group scheme does not act algebraically on the solution field but on the Picard-Vessiot ring, an important subring whose field of fractions is the solution field. Therefore, it is natural also to replace the base field by a base ring with “nice” properties. This has been done in several settings (see e.g. [2], [1], [7]) where the base ring is a simple ring, i.e. has no nontrivial ideals stable under the extra structure. In [8], we even gave an abstract setting covering all existing Picard-Vessiot theories, the base ring being again a simple object. Having a base ring instead of a field, the first point is that not all modules have to be free. In [7], it has been shown that all iterative differential modules (ID-modules) over a simple iterative differential ring are locally free which is enough to obtain all the machinery of Picard-Vessiot-rings and Galois groups.1 But this raises the question whether there really exist ID-modules which are not free. In this article, we answer this question by providing a family of ID-modules which are not free as modules. We also compute Picard-Vessiot rings and Galois groups for them. As we don’t assume that the field of constants is algebraically closed, Picard-Vessiot rings for a fixed module are not unique, and our example will also show this effect. As in characteristic zero simple iterative differential rings are the same as simple differential rings this also provides examples for differential modules in characteristic zero which are not free. Date: 10th Jan, 2018. 2010 Mathematics Subject Classification. 12H20, 13B05. Key words and phrases. Differential Galois theory, iterative derivations. 1 Local freeness of the modules have also been shown for other settings e.g. in [2] or [1]. 1 2 ANDREAS MAURISCHAT The article is organized as follows. In Section 2, the basic notation, and some basic examples of ID-rings are given. We proceed in Section 3 with recalling some properties of ID-simple rings and ID-modules over ID-simple rings. In our definition, ID-modules are finitely generated as modules. Section 4 is dedicated to Picard-Vessiot rings for ID-modules and their Galois groups. Finally in Section 5, we give an example of a non-free ID-module over some ID-simple ring, and compute some of its Picard-Vessiot rings as well as the corresponding Galois groups. 2. Basic notation All rings are assumed to be commutative with unit and different from {0}. We will use the following notation (see also [6]). An iterative derivation on a ring R is a family of additive maps (θ (n) )n∈N on R satisfying (i) θ (0) = idR , P (ii) θ (n) (rs) = i+j=n θ (i) (r)θ (j) (s) for all r, s ∈ R, n ∈ N, as well as  (i+j) for all i, j ∈ N. (iii) θ (i) ◦ θ (j) = i+j i θ Most times we will consider the map ∞ X θ (n) (r)T n , θ : R → R[[T ]], r 7→ n=0 where R[[T ]] is the power series ring over R in one variable T . The conditions that the θ (n) are additive, and condition (ii) are then equivalent to θ being a homomorphism of rings, and condition (iii) is equivalent to the commutativity of the diagram θU R / R[[U ]] U 7→U +T θ  θU [[T ]]  / R[[U, T ]], R[[T ]] where θU is the map θ with T replaced by U and θU [[T ]] is the T -linear extension of θU . The pair (R, (θ (n) )n∈N ) or the pair (R, θ) is then called an ID-ring and CR := {r ∈ R | θ(r) = r} = {r ∈ R | θ (n) (r) = 0 ∀ n > 0} is called the ring of constants of (R, θ). An ideal I E R is called an ID-ideal if θ(I) ⊆ I[[T ]] and R is ID-simple if R has no ID-ideals apart from {0} and R. An ID-ring which is a field is called an ID-field. Iterative derivations are extended to localisations by θ( rs ) := θ(r)θ(s)−1 and to tensor products by X θ (k) (r ⊗ s) = θ (i) (r) ⊗ θ (j)(s) i+j=k for all k ≥ 0. (n) A homomorphism of ID-rings f : S → R is a ring homomorphism f : S → R s.t. θR ◦ f = (n) f ◦ θS for all n ≥ 0. An ID-module (M, θM ) over an ID-ring R is a finitely generated R-module M together with an iterative derivation θM on M , i.e. an additive map θM : M → M [[T ]] such that  (i+j) (j) (i) (0) for all i, j ≥ 0. θM (rm) = θ(r)θM (m), θM = idM and θM ◦ θM = i+j i θM NON-FREE ID-MODULES 3 (n) A subset N ⊆ M of an ID-module (M, θM ) is called ID-stable, if θM (N ) ⊆ N for all n ≥ 0. An ID-submodule of (M, θM ) is an ID-stable R-submodule N of M which is finitely generated as R-module.2 For an ID-module (M, θM ) and an ID-stable R-submodule N ⊆ M , the factor module M/N is again an ID-module with the induced iterative derivation. The free R-module Rn is an example of an ID-module over R with iterative derivation given componentwise. An ID-module (M, θM ) over R is called trivial if M ∼ = Rn as ID-modules, i.e. if M has a basis of constant elements. For ID-modules (M, θM ), (N, θN ), the direct sum M ⊕ N is an ID-module with iterative derivation given componentwise, and the tensor product M ⊗R N is an ID-module with P (j) (i) (k) iterative derivation θ⊗ given by θ⊗ (m ⊗ n) := i+j=k θM (m) ⊗ θN (n) for all k ≥ 0. For ID-modules (M, θM ), (N, θN ), a morphism f : (M, θM ) → (N, θN ) of ID-modules is a (k) (k) homomorphism f : M → N of the underlying modules such that θN ◦ f = f ◦ θM for all k ≥ 0. For a morphism f : (M, θM ) → (N, θN ), the kernel Ker(f ) and the image Im(f ) are ID-stable R-submodules of M resp. N . The image Im(f ) is indeed an ID-submodule, since it is isomorphic to M/ Ker(f ). Also the cokernel Coker(f ) is an ID-module. Example 2.1. (i) For any field C and R := C[t], the homomorphism of C-algebras θt : R → R[[T ]] given by θt (t) := t + T is an iterative derivation on R with field of constants C. This iterative derivation will be called the iterative derivation with respect to t. R is indeed an ID-simple ring, since for any polynomial 0 6= f ∈ R of degree n, θ (n) (f ) equals the leading coefficient of f , and hence is invertible in R = C[t]. (ii) For any field C, C[[t]] also is an ID-ring with the iterative derivation with respect to t, given by θt (f (t)) := f (t + T ) for f ∈ C[[t]]. The of (C[[t]], θt ) are P constants i ∈ C[[t]] with a 6= 0, a t C, and (C[[t]], θt ) also is ID-simple, since for f = ∞ n i=n i one has   ∞ X i i−n (n) ai t ∈ C[[t]]× . θt (f ) = n i=n Hence, every non-zero ID-ideal contains a unit. This ID-ring will play an important role, since every ID-simple ring can be ID-embedded into C[[t]] for an appropriate field C. (iii) For any ring R, there is the trivial iterative derivation on R given by θ0 : R → R[[T ]], r 7→ r · T 0 . Obviously, the ring of constants of (R, θ0 ) is R itself. (iv) Given a differential ring (R, ∂) containing the rationals (i.e. a Q-algebra R with a 1 n ∂ defines an iterative derivation on R. On the other derivation ∂), then θ (n) := n! hand, for an iterative derivation θ, the map ∂ := θ (1) always is a derivation, and 1 n θ (n) equals n! ∂ by the iteration rule. Hence, differential rings containing Q are special cases of ID-rings. Since for a differentially simple ring in characteristic zero, its ring of constants always is a field (same proof as for ID-simple rings), we see that differentially simple rings in characteristic zero are a special case of ID-simple rings in arbitrary characteristic. 2If R is an ID-simple ring, then ID-stable submodules are always ID-submodules. 4 ANDREAS MAURISCHAT 3. Properties of ID-simple rings and ID-modules over ID-simple rings We summarize some properties of ID-simple rings. Proofs can be found in [5] or [7]. Throughout the section, let (S, θ) denote an ID-simple ring with constants C. Then S is an integral domain, and its ring of constants C is a field. Furthermore, the field of fractions of S has the same constants as S (cf. [5, Lemma 3.2]). If m E S is a maximal ideal, and k := S/m is the residue field. Then (S, θ) can be embedded into (k[[t]], θt ) as ID-rings via S → k[[t]], s 7→ ∞ X θ (n) (s)tn , n=0 θ (n) (s) θ (n) (s) denotes the image of ∈ S in the residue field k (cf. [7, Thm. 3.4]). where This will be important later on, in the case that k = C. Now consider an ID-module (M, θM ) over the ID-simple ring (S, θ). Such an ID-module is projective as S-module, i.e. locally free (cf. [7, Thm. 4.3]). In particular, if S is a local ring, the ID-module is free as a module. For the special ID-simple ring (C[[t]], θt ), we even have: Theorem 3.1. (cf. [7, Thm. 4.6]) Let C be a field. Then every ID-module over (C[[t]], θt ) is trivial. 4. Picard-Vessiot rings and Galois groups Throughout the section, let (S, θ) denote an ID-simple ring, and (M, θM ) an ID-module over S. Definition 4.1. A solution ring for M is an ID-ring 0 6= (R, θR ) together with a homomorphism of ID-rings f : S → R s.t. the natural homomorphism (†) 3 R ⊗CR CR⊗S M −→ R ⊗S M is an isomorphism. A Picard-Vessiot ring (PV-ring) for M is a minimal solution ring 0 6= (R, θR ) which is ID-simple and has the same field of constants as S. Here, minimal means that if 0 6= (R̃, θR̃ ) with f˜ : S → R̃ is another solution ring, then any monic IDhomomorphism g : R̃ → R (if it exists) is an isomorphism. Remark 4.2. (i) Since the kernel of an ID-homomorphism is an ID-ideal, and S is ID-simple, the homomorphism f is always injective. Therefore, we can view any solution ring R as an extension of S, and we will omit the homomorphism f . (ii) If R is an ID-simple ring, then the homomorphism (†) is always injective (cf. [8, Prop. 4.6(iii)]), and therefore R ⊗CR CR⊗S M can be seen as a free ID-submodule of R ⊗S M . Hence, an ID-simple ring is a solution ring if and only if R ⊗S M has a basis of ID-constant elements. (iii) Assume that M is a free S-module with basis b = (b1 , . . . , br ), and R is an IDsimple solution ring for M , then there is a matrix X ∈ GLr (R) s.t. bX is a basis of constant elements in R ⊗S M . Such a matrix will be called a fundamental solution matrix for M (with respect to b). 3Take care that the definition of a solution ring given here is different to that in [7], but consistent with the one in [8, Def. 5.3]. However, the definitions of a PV-ring are all equivalent. NON-FREE ID-MODULES 5 (iv) Every PV-ring is faithfully flat over S (cf. [7, Cor. 5.5]). This will have a nice effect on the Galois groups. Namely, the Galois group of R/S (definition given later) is the same as the one of Quot(S) ⊗S R over the field of fractions Quot(S). (v) If m E S is a maximal ideal, k := S/m, and (S, θ) → (k[[t]], θt ) the embedding given above. Then k[[t]] is a solution ring for any ID-module M over S. The next proposition shows the importance of this remark in case that k = C. In this case the ring R̃ of the proposition can be chosen to be the ring C[[t]]. Proposition 4.3. Let R̃ be an ID-simple solution ring for M with the same constants as S (i.e. CR̃ = CS ). Then there is a unique Picard-Vessiot ring R inside R̃. (i) If M is a free S-module, then R is the S-subalgebra of R̃ generated by the coefficients of a fundamental solution matrix and the inverse of its determinant. (ii) For general M (i.e. M “only” locally free), R is obtained as follows: Let x1 , . . . , xl ∈ S such that hx1 , . . . , xl iS = S and M [ x1i ] is free over S[ x1i ] for all i = 1, . . . , l. Let e = (e1 , . . . , er ) be a R̃-basis of R̃ ⊗S M consisting of ID-constant elements, and for all i, let bi be a basis of M [ x1i ] over S[ x1i ] consisting of elements in M . Define the matrices Yi ∈ Matr×r (R̃) via bi = eYi (i = 1, . . . , l), and choose ni ∈ N such that xni i M ⊆ hbi iS . Then n R := S[Yj , det(xj j Yj−1 ) | j = 1, . . . l]. In particular, every Picard-Vessiot ring for M is a finitely generated S-algebra. For the proofs see [7, Prop. 5.3 and Thm. 5.4]. Remark 4.4. (i) The first part of the proposition shows that for an ID-module which is free as S-module, the definition given here coincides with the usual one given for example in [5, Sect. 3] (if the constants are algebraically closed) resp. in [6, Def. 2.3]. The second part gives a receipt to compute PV-rings in general. (ii) If S has a maximal ideal m E S such that S/m = C, then (C[[t]], θt ) is an IDsimple solution ring for M with same constants as S. Hence, the existence of a Picard-Vessiot ring is guaranteed in this case. (iii) Different maximal ideals of S with residue field C lead to different ID-embeddings S → C[[t]]. If the field of constants is not algebraically closed, this can lead to different non-isomorphic PV-rings, as in the example given in Section 5. (iv) If the field of constants is algebraically closed, then as in the case of differential fields, for every ID-module there exists a PV-ring, and furthermore, all PV-rings for a given ID-module are isomorphic (cf. [7, Thm. 5.6]). (v) Picard-Vessiot rings behave well under extension of the base field by constants. By this we mean the following: Let D/C be a field extension, D equipped with the trivial iterative derivation, and SD := S ⊗C D. If R/S is a Picard-Vessiot ring for some ID-module M , then RD := R ⊗C D is a Picard-Vessiot ring for the SD -ID-module M ⊗C D. In view of the previous remark (with D being the algebraic closure of C) this also implies that all Picard-Vessiot rings for some ID-module become isomorphic over the algebraic closure of the constants C. 6 ANDREAS MAURISCHAT The differential Galois group scheme. In the classical case over a differential field with algebraically closed field of constants the differential Galois group is defined as the group of differential automorphisms of a Picard-Vessiot ring over the base differential field. This group turns out to be a Zariski-closed subgroup of some GLn (C) where C denotes the field of constants. If the constants are not algebraically closed, and in the iterative differential setting in positive characteristic, this group of differential automorphisms might be “too small”, and one has to consider a group valued functor instead. Definition 4.5. Let S be an ID-simple ring with field of constants C, and let R be a PV-ring for some ID-module M over S. Then we define the group functor Autθ (R/S) : Algebras/C → Grps associating to each C-algebra D the group Autθ (R ⊗C D/S ⊗C D) of ID-automorphisms of R ⊗C D that fix the elements of S ⊗C D. Here, D is equipped with the trivial iterative derivation. We call G = Autθ (R/S) the ID-Galois group (scheme) of R/S and also denote it by Gal(R/S). The term “Galois group scheme” is justified by the following Theorem 4.6. (cf. [7, Cor. 5.4]) The group functor Gal(R/S) is represented by the algebra CR⊗S R which is a finitely generated C-algebra. Hence, Gal(R/S) = Spec(CR⊗S R ) is an affine group scheme of finite type over C. Remark 4.7. (i) If R is a PV-ring for a free module M of rank n, hence generated by the entries of a fundamental solution matrix X ∈ GLn (R) and the entries of X −1 , then the ring of constants CR⊗S R is generated by the entries of Z := (X −1 ⊗ 1)(1 ⊗ X) ∈ GLn (CR⊗S R ) 4 and of Z −1 = (1 ⊗ X −1 )(X ⊗ 1). This representation of CR⊗S R provides a closed embedding Gal(R/S) ֒→ GLn , and the action of Gal(R/S) on R is given by multiplying the fundamental solution matrix X by a matrix of Gal(R/S) ⊆ GLn from the right. (ii) As a Picard-Vessiot ring R is faithfully flat over S (cf. [7, Cor. 5.5]), it is linearly disjoint over S to the field of fractions F = Quot(S). In particular, RF = F ⊗S R is the localisation of R by all non-zero elements in S, and hence is a Picard-Vessiot ring over F . Therefore, Gal(RF /F ) = Gal(R/S). Hence, the ID-Galois group can be computed over any localisation of S. This simplifies its computation, since one can reduce to the case of a free module as given in (i). 5. Example We now give an example of an ID-module which is not free as a module. Therefore, we first need an ID-simple ring for which non-free projective modules exist. The most standard examples for non-free projective modules are non-principle ideals of Dedekind domains. This will be our example after having attached iterative derivations to the Dedekind domain as well as the module. 4By 1 ⊗ X we mean the matrix whose (i, j)-th entry is 1 ⊗ X , and similar for X −1 ⊗ 1. ij NON-FREE ID-MODULES 7 An ID-simple ring having non-free projective modules. Let C be any field and let 1 ]/(s3 − s − t2 ), S := C[s, t, 2 3s − 1 which is the localisation of an integral extension of C[t] of degree 3. S is integrally closed, and hence S is a Dedekind domain. Since we inverted 3s2 − 1, S is étale over C[t], and hence the iterative derivation θt by t on C[t] can be uniquely extended to an iterative derivation θ on S (cf. [4, Thm. 27.2]). The θ (n) (s) can be computed successively using the equation θ(s)3 − θ(s) = θ(t)2 = (t + T )2 , obtained from s3 − s = t2 by applying θ. In particular, 2t θ (1) (s) = 2 . 3s − 1 Proposition 5.1. The ID-ring (S, θ) is ID-simple. Proof. If 0 6= I S is an ideal, then I ∩ C[t] is an ideal of C[t]. Since, S is the localisation of an integral extension, the ideal I ∩ C[t] also is nontrivial. Furthermore, if I is an ID-ideal, then obviously I ∩C[t] is also ID-stable, hence an ID-ideal of C[t]. But (C[t], θt ) is ID-simple by example 2.1. Hence, S also contains no nontrivial ID-ideals.  A non-free ID-module over S in characteristic zero. We first restrict to the case of char(C) = 0. In this case, an iterative derivation θM on M is uniquely determined by the (1) derivation ∂M := θM . We consider the S-module M generated by two elements f1 and f2 subject to the relations tf1 − sf2 = 0 and (s2 − 1)f1 − tf2 = 0. As S-module M is isomorphic to the ideal I = hs, tiS ⊆ S by mapping f1 to s and f2 to t. Since I is a non-principal ideal of S, I and hence M is a non-free projective S-module of rank 1. Theorem 5.2. For any b ∈ S, ∂M (f1 ) := bf1 + 3s2 + 1 f2 3s2 − 1 and ∂M (f2 ) := sf1 + bf2 defines a derivation on M . Furthermore, every derivation on M can be written in this form. Proof. Using the definition, one obtains ∂M (tf1 − sf2 ) = ∂(t)f1 + t∂M (f1 ) − ∂(s)f2 − s∂M (f2 ) 3s2 + 1 2t = f1 + tbf1 + t 2 f2 − 2 f2 − s2 f1 − sbf2 3s − 1 3s − 1   2 2 3s + 1 2 − tf2 = b(tf1 − sf2 ) + (1 − s )f1 + 3s2 − 1 3s2 − 1  = b(tf1 − sf2 ) − (s2 − 1)f1 − tf2 = 0,  and similarly ∂M (s2 − 1)f1 − tf2 = 0. Hence, the derivation is a well-defined derivation on M . On the other hand, given a derivation ∂M on M , we obtain a derivation on the Quot(S)vector space M̃ := Quot(S) ⊗S M by scalar extension. The element f2 is a basis of that 8 ANDREAS MAURISCHAT vector space, and f1 = st f2 ∈ M̃ . Hence, ∂M (f2 ) = af2 for some a ∈ Quot(S) which can also be written as ∂M (f2 ) = sf1 + bf2 2 for b = a − st . Then 2t s  s t−s s s 2 ∂M (f1 ) = ∂M f2 + ∂M (f2 ) = 3s −12 f2 = ∂ f2 + (sf1 + bf2 ) t t t t t   2 3 2 s 3s + 1 s − f2 . = f2 + 2 f2 + bf1 = bf1 + 2 3s2 − 1 t2 t 3s − 1 Therefore, ∂M is of the form above for some b ∈ Quot(S). But, M is stable under this derivation if and only if bf2 ∈ M as well as bf1 ∈ M . So M is stable under the derivation if and only if bM ⊆ M , i.e. b ∈ S.  Picard-Vessiot rings and Galois groups for this ID-module. The ID-ring S has a C-rational point, e.g. the ideal m = (s − 1, t), and we obtain an ID-embedding S → (S/m)[[t]] ∼ = C[[t]].5 So by Prop. 4.3 there exists a Picard-Vessiot ring for M inside C[[t]], and we follow the explicit description of the Picard-Vessiot ring given there. First at all, we choose x1 := s and x2 := s2 − 1. Then M [ x11 ] is free over S[ x11 ] with basis b1 := f1 , and M [ x12 ] is free over S[ x12 ] with basis b2 := f2 . Further, x1 M = sM ⊆ hb1 iS and x2 M = (s2 − 1)M ⊆ hb2 iS , hence we can choose n1 = n2 = 1. Let 0 6= e ∈ C[[t]] ⊗S M be a constant element, and y ∈ C[[t]] such that f1 = ye. As s 6∈ m, s is invertible in Sm ∼ = C[[t]], and f2 = st f1 ∈ C[[t]] ⊗S M . In particular, f1 is a basis of C[[t]] ⊗S M . Actually, this also implies that y is invertible in C[[t]], as it is the base change matrix between the bases f1 and e of C[[t]] ⊗S M . As   3s2 + 1 3s2 + 1 t ∂(y)e = ∂M (ye) = ∂(f1 ) = bf1 + 2 f2 = b + 2 ye, 3s − 1 3s − 1 s y is a solution of the differential equation   3s2 + 1 t (1) ∂(y) = b + 2 y. 3s − 1 s Furthermore we get (with notation as in Prop. 4.3) Y1 = y, Y2 = well as det(xn2 2 Y2−1 ) = (s2 −1)s yt yt s, det(xn1 1 Y1−1 ) = s y as = yt . Hence, R = S[y, yt s t , , ]. s y y Be aware that the inverse of y is not in R. As M is a module of rank 1, the Galois group is a subgroup of GL1 = Gm . Hence, the Galois group is Gm or one of the groups µn of n-th roots of unity. The Galois group is Gm if y is transcendental over S, and it is µn if n is the least positive integer such that y n ∈ S. Whether y is transcendental over S or not, depends on the choice of b. 5Using the variable t in the power series ring is justified by the fact, that t ∈ S indeed maps to t ∈ C[[t]] via the given embedding. NON-FREE ID-MODULES (i) If we take, b = 9 then ∂(y) = (3s2t−1)s y, and hence  2 2y∂(y) y 2 ∂(s) y − = 0. = ∂ s s s2 −3st 3s2 −1 , 2 Therefore, ys is a constant, i.e. y is a square root in C[[t]] of cs for some 0 6= c ∈ C. Actually, any c 6= 0 such that cs is a square in C[[t]] will do, as different choices just correspond to different choices √ e. As in C[[t]], s ≡ 1 √ of the constant basis s ∈ C[[t]] of s with s ≡ 1 mod t. Hence, we mod t, there exists a square root √ can choose c = 1, and y = s, and obtain   √ t R=S s, √ , s an extension of degree 2 and Galois group µ2 . If we would have taken the maximal ideal to be m = (s + 1, t), and the corresponding embedding S ֒→ (S/m)[[t]] ∼ then in the last step = C[[t]], √ s ≡ −1 mod t √ inside C[[t]], and we have a square root −s of −s in C[[t]] with −s ≡ 1 mod t. This leads to the Picard-Vessiot ring   √ t R2 = S , −s, √ −s which is not isomorphic as an S-algebra to R above, if −1 is not a square in C × . The Galois group, however, is again µ2 . (ii) If we take, b = 0, then inside Quot(S) we have  y  ∂(y) y ∂(s) 2t ty (3s2 + 1)t y ∂ = −y 2 = − = 2 2 s s s (3s − 1)s s (3s − 1)s s ss n If ys was not transcendental over Quot(S), then some n-th power w = ys would be in Quot(S). For w we get the differential equation nt ∂(w) = w. s Writing w = w0 (s) + w1 (s)t with w0 , w1 ∈ C(s), we calculate 2t 2t + w1′ (s) 2 t + w1 (s) ∂(w) = ∂(w0 (s)) + ∂(w1 (s))t + w1 (s) = w0′ (s) 2 3s − 1 3s − 1   2w′ (s) 2(s3 − s) t, + 20 = w1 (s) + w1′ (s) 2 3s − 1 3s − 1 as well as nt nt nt2 nw0 (s) w = w0 (s) + w1 (s) = n(s2 − 1)w1 (s) + t. s s s s Here w0′ (s) and w1′ (s) denote the usual derivatives of rational functions. By comparing coefficients of t, we obtain 2w0′ (s) and 3s2 − 1 2(s3 − s) (ns2 − n − 1)w1 (s) = w1′ (s) 2 . 3s − 1 nw0 (s) s = 10 ANDREAS MAURISCHAT If w0 , w1 6= 0, this implies    ′  2w0 (s) nw0 (s) + 1 = degs + 1 = degs (w0′ (s)) − 1, degs (w0 (s)) = degs s 3s2 − 1 and degs (w1 (s)) = degs    2(s3 − s) ′ (ns − n − 1)w1 (s) −2 = degs w1 (s) 2 −2 = degs (w1′ (s))−1. 3s − 1 2 But degs (f ′ (s)) ≤ degs (f (s)) − 1 for all 0 6= f (s) ∈ C(s), and hence w0 (s) = w1 (s) = 0, i.e. w = 0 which is impossible. Hence, there is no such w, and ys and also y are transcendental over S. A non-free ID-module over S in positive characteristic. Finding an example in (1) positive characteristic is harder, since one is not done by giving just θM , but by giving all (pj ) θM which moreover have to commute and have to be nilpotent of order p. We will follow a different approach here. We start with the example in characteristic zero given in the previous paragraph. The iterative derivation on C[t] is already defined on Z[t] and extends to the ring SZ := Z[s, t, 3s21−1 ]/(s3 − s − t2 ), since the latter is étale over the former. Therefore, the ID-ring S from above (with constants C) is obtained as S = C ⊗Z SZ . And this holds in any characteristic. For constructing an ID-module M over S, one can start with a projective module M ′ over SZ , and define a derivation on M := S ⊗SZ M ′ . If the corresponding iterative derivation stabilizes M ′ , one can reduce modulo p, to obtain an iterative derivation on M ′ /pM ′ . This is then an ID-module over Fp ⊗Z SZ . −3st Therefore take the ID-module over SQ from above with b = 3s 2 −1 . Then we know that √ 1 e = y f1 is a constant basis of R ⊗ M , where y = s. √ Hence, θM (f1 ) = θM (ye) = θ(y)e = θ(y) s and using the chain rule y f1 . Replacing y by (cf. [9, Prop. 7.2]) one obtains:  k ∞  √ √ X √ 1 1/2 θ(s) −1 . θ( s) = θs ( s)|T =θ(s)−s = (s + T ) 2 |T =θ(s)−s = s · k s k=0 Therefore, all appearing rational numbers only have powers of 2 in the denominator, and we can reduce modulo any prime p different from 2, obtaining a non-free ID-module in characteristic p. References [1] Katsutoshi Amano and Akira Masuoka. Picard-Vessiot extensions of Artinian simple module algebras. J. Algebra, 285(2):743–767, 2005. [2] Yves André. Différentielles non commutatives et théorie de Galois différentielle ou aux différences. Ann. Sci. École Norm. Sup. (4), 34(5):685–739, 2001. [3] Tobias Dyckerhoff. The inverse problem of differential Galois theory over the field R(z). Preprint, 2008. [4] Hideyuki Matsumura. Commutative ring theory, volume 8 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, second edition, 1989. Translated from the Japanese by M. Reid. [5] B. Heinrich Matzat and Marius van der Put. Iterative differential equations and the Abhyankar conjecture. J. Reine Angew. Math., 557:1–52, 2003. [6] Andreas Maurischat. Infinitesimal group schemes as iterative differential Galois groups. J. Pure Appl. Algebra, 214(11):2092–2100, 2010. NON-FREE ID-MODULES 11 [7] Andreas Maurischat. Picard-Vessiot theory of differentially simple rings. J. Algebra, 409:162–181, 2014. [8] Andreas Maurischat. A categorical approach to Picard-Vessiot theory. Preprint available from arXiv at http://arxiv.org/abs/1507.04166, Juli 2015. [9] Andreas Röscheisen. Iterative Connections and Abhyankar’s Conjecture. PhD thesis, Heidelberg University, Heidelberg, Germany, 2007. Andreas Maurischat, Lehrstuhl A für Mathematik, RWTH Aachen University, Germany E-mail address: [email protected]
0math.AC
Follow the Compressed Leader: Faster Online Learning of Eigenvectors and Faster MMWU arXiv:1701.01722v3 [cs.LG] 18 Sep 2017 (version 3)∗ Zeyuan Allen-Zhu [email protected] Microsoft Research Yuanzhi Li [email protected] Princeton University January 6, 2017 Abstract The online problem of computing the top eigenvector is fundamental to machine learning. In both adversarial and stochastic settings, previous results (such as matrix multiplicative weight update, follow the regularized leader, follow the compressed leader, block power √ method ) either achieve optimal regret but run slow, or run fast at the expense of loosing a d factor in total regret where d is the matrix dimension. We propose a follow-the-compressed-leader (FTCL) framework which achieves optimal regret without sacrificing the running time. Our idea is to “compress” the matrix strategy to dimension 3 in the adversarial setting, or dimension 1 in the stochastic setting. These respectively resolve two open questions regarding the design of optimal and efficient algorithms for the online eigenvector problem. 1 Introduction Finding leading eigenvectors of symmetric matrices is one of the most primitive problems in machine learning. In this paper, we study the online variant of this problem, which is a learning game between a player and an adversary [2, 17, 20, 26, 30]. Online (Adversarial) Eigenvector Problem. The player plays T unit-norm vectors w1 , . . . , wT ∈ Rd in a row; after playing wk , the adversary picks a feedback matrix Ak ∈ Rd×d that is symmetric and satisfies 0  Ak  I.1 Both these assumptions are for the sake of simplicity and can be relaxed.2 The player then receives a gain wk> Ak wk = Ak • wk wk> ∈ [0, 1] . The regret minimization problem asks us the player to design a strategy to minimize regret, that is, the difference between the total gain obtained by the player and that by the a posteriori ∗ The arXiv version appeared on January 6, 2017. This second and third versions polish writing and fix typos. We denote by A  B spectral dominance that is equivalent to saying that A − B is positive semidefinite (PSD). 2 Firstly, all the results cited and stated in this paper, after scaling, generalize to the scenario when the eigenvalues of Ak are in the range [l, r] for arbitrary l, r ∈ R. For notational simplicity, we have assumed l = 0 and r = 1 in this paper. Secondly, if Ak is not symmetric or even rectangular, classical reductions can turn such a problem into an equivalent online game with only symmetric matrices (see Sec 2.1 of [20]). 1 1 20 30 20 10 0 150 15 Total Regret 40 Total Regret Total Regret 50 10 5 0 0 FTPL 2000 4000 6000 8000 10000 this paper 50 0 0 MMWU 100 2000 FTPL (a) random 4000 6000 8000 10000 this paper (b) diagonal MMWU 0 FTPL 2000 4000 6000 this paper 8000 10000 MMWU (c) diagonal+rotation Figure 1: We generate synthetic data to verify that the total regret of FTPL can indeed be poorer than MMWU or our FTCL. We explain how matrices Ak are chosen in Appendix A. We have d = 100 and the x-axis represents the number of iterations. best fixed strategy u ∈ Rd : minimize max u∈Rd PT = λmax • (uu> − wk wk> ) P A1 + · · · + AT ) − Tk=1 wk> Ak wk . k=1 Ak The name comes from the fact that the player chooses only vectors in a row, but wants to compete against the leading eigenvector in hindsight. To make this problem meaningful, the feedback matrix Ak , is not allowed to depend on wk but can depend on w1 , . . . , wk−1 . 1.1 Known Results The most famous solution to the online eigenvector problem is the matrix multiplicative-weightupdate (MMWU) method, which has also been used towards efficient algorithms for SDP, balanced separators, Ramanujan sparsifiers, and even in the proof of QIP = PSPACE. exp(ηΣ ) def k−1 MMWU. At iteration k, define Wk = Tr exp(ηΣ where Σk−1 = A1 + · · · + Ak−1 and η > 0 k−1 ) is the learning rate. Then, compute its eigendecomposition P exp(ηΣk−1 ) Wk = Tr exp(ηΣ = dj=1 pj · yj yj> k−1 ) where vectors yj are normalized eigenvectors. Now, the MMWU √ instructs the player to √ strategy choose wk√= yj each with probability pj . The best choice η = log d/ T yields a total expected regret O( T log d) [32], and this is optimal up to constant [11]. It requires some additional, but standard, effort to turn this into a high-confidence result. Unfortunately, the per-iteration running time of MMWU is at least O(dω ) due to eigendecomposition, where dω is the complexity for multiplying two d × d matrices.3 MMWU-JL. Some researchers also use the Johnson-Lindenstrauss (JL) compression to reduce the dimension of Wk from MMWU to make it more efficiently computable [5, 9, 27, 35]. Specifically, 1/2 they compute a sketch matrix Y = Wk Q using a random Q ∈ Rd×m , and then use YY> to 2 ), this compression incurs an average regret loss of e approximate Wk . If the dimension m is O(1/σ 4 σ. We call this method MMWU-JL for short. √ e T ), one must let σ ≈ T −1/2 . Therefore, JL Unfortunately, to maintain a total regret O( e ), and is only useful when T ≤ d. compresses the matrix exponential to dimension O(T 3 In fact, it is known that eigendecomposition has complexity O(dω ) when all the eigenvalues are distinct, and could possibly go up to O(d3 ) when some eigenvalues are equal [34]. 4 e notation to hide polylogarithmic factors in T, d and 1/ε if applicable. Through the paper, we use the O 2 Paper MMWU [9, 11] MMWU-JL [9, 35] (T ≤ d only) Total Regret √ e T) O( √ e T) O( Time Per Iteration at least O(dω ) e ) Mexp ×O(T √ e dT ) FTPL (T ≥ d only) [20] O( Mev ×1 √ e T ) Theorem 1&2 Mlin ×O(1) e O( this paper Theorem 3 √ e T) block power method [20] O( √ e T) this paper O( Minimum Total Time for ε Average Regret5  e O dω ε2 e O d1.5 nnz(Σ) ε3.5 e O e O e O ↓ stochastic online eigenvector only ↓  e O O nnz(Σ)  e Theorem 4 O nnz(A) Theorem 4 O 1 nnz(Σ) ε4.5    1 nnz(Σ) and ε2.5 3 1 1 nnz(Σ) 4 nnz(A) 4 ε2.5 1 nnz(Σ) ε2 + ε12 nnz(Σ)   1 nnz(A) ε2  Table 1: Comparison of known methods for the online eigenvector problem. We denote by nnz(M) the time needed to multiply M to a vector, by Σ = A1 + · · · + AT , and by nnz(A) = maxk∈[T ] nnz(Ak ) ≤ nnz(Σ). e 1/2 ) · I. • Mexp is the time to compute e−M multiplied with a vector, where M ∈ Rd×d satisfies 0  M  O(T ev −3/2 1/2 • M is the time to compute the leading eigenvector of M to multiplicative accuracy O(T d ) ∈ (0, 1). e 1/2 ). • Mlin is the time to solve a linear system in M ∈ Rd×d , where M is PSD and of condition number ≤ O(T ev exp lin • If using iterative methods, the worst-case values M , M , M are (see Section 3)    e min{T 41 nnz(Σ), dω } ≥ Mlin = O e min{min{d, T 14 }nnz(Σ), dω } , e min{T 34 d− 14 nnz(Σ), dω } ≥ Mexp = O Mev = O where dω is the time needed to multiply two d × d matrices. If using stochastic iterative methods, Mlin can be  e T 14 nnz(Σ) 43 nnz(A) 14 + nnz(Σ) . further reduced to O FTPL. Researchers also study the follow-the-perturbed-leader (FTPL) strategy [2, 17, 20, 26]. In particular, Garber, Hazan and Ma [20] proposed to compute an (approximate) leading eigenvector √ of the matrix Σk−1 + rr> at iteration k, where √ r is a random vector whose √ norm is around dT . e dT ), which is a factor d worse than the optimum Unfortunately, the total regret of FTPL is O( √ regret, and interesting only when T ≥ d. This factor d loss can indeed be realized in practice, see Figure 1. In theory, this d1/2 factor loss is necessary at least for their proposed method [22]. 1.2 Our Main Results We propose a follow-the-compressed-leader (FTCL) strategy that, at a high level, compresses the e ) in MMWU-JL. Our MMWU strategy only to dimension m = 3 as opposed to dimension m = Θ(T FTCL strategy has significant advantages over previous results because: √ √ e T ) which is optimal up to poly-log factors (as opposed to d in FTPL). • FTCL has regret O( • Each iteration of FTCL is dominated by solving a logarithmic number of linear systems. Since solving linear systems is generally no slower than computing eigenvectors or matrix exponentials, the per-iteration complexity of FTCL is no slower than FTPL, and much faster than MMWU and MMWU-JL. We shall make this comparison more explicit in Section 3. 5 The total time complexity of the first Tε rounds where Tε is the earliest round to achieve an ε average regret. 3 1.3 Our Side Result: Stochastic Online Eigenvector We also study the special case of the online eigenvector problem where the adversary is stochastic, meaning that A1 , . . . , AT are chosen i.i.d. from a common distribution whose expectation equals B ∈ Rd×d , independent of the player’s actions. For this problem, there are two goals: P (G1) minimizing regret: T · λmax (B) − Tk=1 wk> Ak wk , and (G2) finding a unit vector w satisfying w> Bw ≥ λmax (B) − ε. Goal is obviously strongerP than goal (G2). By (martingale) concentration, the quantity PT (G1) T > > k=1 wk Bwk , and thus given a strategy which minimizes regret k=1 wk Ak wk must be close to for (G1), we can select w = wk for a√uniform random k ∈ {1, . . . , T }, and w should achieve goal (G2) e with small ε. In particular, √ an O( T ) optimal-regret strategy for (G1) gives rise to an algorithm e for (G2) with ε ≤ O(1/ T ) [4]. Before our work, for this problem: p • Garber et al. [20] showed a block power method gives total regret O( T log(dT )), and runs in O(nnz(Σk )) time each iteration k. (We denote nnz(M) the time to multiply M to a vector.) √ √ 6 e • Shamir [37] √ showed Oja’s algorithm achieves the weaker goal (G2) with error ε = O( d/ T ), a factor d worse than optimum. Oja’s algorithm runs in O(nnz(Ak )) time each iteration k. • It was asked explicitly as an√open question in [23] that whether Oja’s algorithm can achieve e the optimum error ε = O(1/ T ) for goal (G2).7 In this paper, we show that √ • Oja’s algorithm has total regret O( T log d) for the stochastic online eigenvector problem. √ √ e This is optimal up to a log d factor. It implies an error ε = O(1/ T ) for the easier goal (G2), and thus answers the open question of [23]. Our proof relies on a compression view of Oja’s algorithm which compresses MMWU to dimension m = 1. Our proof is one-paged, indicating that FTCL might be a better framework for designing and analyzing online algorithms for matrices. Remark 1.1. Our result on Oja’s algorithm gives rise to a new framework for non-convex stochastic optimization. One can view each Ak as a stochastic sample of the negative Hessian matrix, and apply Oja’s algorithm to find the most negative eigenvector. This leads to an online algorithm that outperforms stochastic gradient descent with applications to deep learning and so on. [4] 1.4 Our Results in a More Refined Language def Denoting by λ = T1 λmax (A1 + · · · AT ), we have λ ≤ 1 according to the normalization Ak  I. In general, the smaller λ is, the better a learning algorithm should behave. In the previous subsections, we have followed the tradition and discussed our results and prior works assuming the worst possibility of λ. This has indeed simplified notations. If λ is much smaller than 1, our complexity bounds can be improved to quantities that depend on λ. We call this the λ-refined language. At a high level,√for our FTCL, in both the adversarial √ e λT ). e T ) to O( and stochastic settings, the total regret improves from O( 6 Here is a simple description of Oja’s algorithm [31]: beginning with a random Gaussian vector u ∈ Rd , at each iteration k, choose wk to be (I + ηAk−1 ) · · · (I + ηA1 )u after normalization. 7 Jain et al. [23] obtained an optimum formula for ε when B has a large gap between its first two leading eigenvalues; and they raised it as an open question in the case without any eigengap assumption. In a separate and earlier work of √ e T ) error for Oja’s algorithm can indeed us [8], we showed that in the special case of Ak being rank-1, the ε = O(1/ by obtained, using very different techniques from this paper. 4 √ There is an information-theoretic lower bound of Ω( λT ) for the total regret in this λ-refined language, see Appendix J. This lower bound even holds for the simpler stochastic online eigenvector problem, even when the matrices Ak are of rank 1. As for prior work, it has been √ recorded that (cf. Theorem 3.1 of [9]) the MMWU and MMWU-JL methods have total √ regret O( λT log d). The block power method (for the stochastic setting) has e λT ), by modifying the proof in [20]. To the best of our knowledge, FTPL has not total regret O( been analyzed in the λ-refined language. This may not be a surprise because not all algorithms can take advantage of the λ-refined language (see for instance one hard instance in bandit problems [3]). We compare our results with prior work in Table 2 for this λ-refined language. 1.5 Other Related Works The multiplicative weight update (MWU) method is a simple but powerful algorithmic tool that has been repeatedly discovered in theory of computation, machine learning, optimization, and game theory (see for instance the survey [11] and the book [15]). Its natural matrix extension, matrix-multiplicative-weight-update (MMWU) [32], has been used towards efficient algorithms for solving semidefinite programs [5, 12, 35], balanced separators [33], Ramanujan sparsifiers [9, 27], and even in the proof of QIP = PSPACE [24]. Some authors also refer to MMWU as the follow-theregularized-leader (FTRL) strategy, because MMWU can be analyzed from a mirror-descent view with the matrix entropy function as its regularizer [9]. √ e dT ) For the online eigenvector problem, if the feedback matrices Ak are only of rank-1, the O( e 1/4 T 1/2 ). This is first shown by Dwork et al. [17] total regret of FTPL can be improved to O(d and independently by Kotlowski and Warmuth [26]. However, this d1/4 factor for the rank-1 case and the d1/2 factor for the high-rank case are tight at least for their proposed FTPL methods [22]. Abernethy et al. showed FTPL strategies can be analyzed using a FTRL framework [1]. Researchers also put efforts to understand high-rank variants of the online eigenvector problem, that is to obtain the top k eigenvectors as opposed to the top one. Nie et al. [30] studied the high-rank adversarial setting simply using MMWU, and their per-iteration complexity is high due to eigendecomposition. Some authors study a very different online model for computing the top k eigenvectors [13, 25]: they wish to output O(k · poly(1/ε)) vectors instead of k but with a good PCA reconstruction error. In the stochastic setting, the two papers [8, 21] achieve a variant of goal (G2) for finding the top k eigenvectors; however, their techniques are very different from ours and do not imply our results anyways. For the less relevant offline setting, we refer interested readers to our papers [6] (for PCA / SVD) and [7] (for CCA and generalized eigendecomposition) for the most efficient algorithms. 1.6 Roadmap We introduce notations in Section 2, and compare the per-iteration complexity of FTCL to prior work in Section 3. We discuss high-level intuitions and techniques in Section 4. We introduce a new trace inequality in Section 5, and prove our main FTCL result for an oblivious adversary in Section 6. We extend it to the adversarial setting in Section 7, and discuss how to implement FTCL fast in Section 8. Finally, in Section 9 we provide our FTCL result for a stochastic adversary. Our results are stated directly in the λ-refined language. 5 2 Notations and Preliminaries def Pk Define Σk = i=1 Ai for every k = 0, 1, . . . , T . Since each Ak is positive semi-definite (PSD), we can find Pk ∈ Rd×d such that Ak = Pk P> k ; we only use Pk for analysis purpose only. Given def d×d two matrices A, B ∈ R , we write A • B = Tr(A> B). We write A  B if A, B are symmetric matrices and A − B is PSD. We write [A]i,j the (i, j)-th entry of A. We use kMk2 to denote the spectral norm of a matrix M. We use nnz(M) to denote time needed to multiply matrix M ∈ Rd×d with an arbitrary vector in Rd . In particular, nnz(M) is at most d plus the number of non-zero  def elements in M. We denote nnz(A) = maxk∈[T ] nnz(Ak ) . P Suppose x1 , · · · , xt ∈ R are drawn i.i.d. from the standard Gaussian N (0, 1), then χ = ti=1 x2i has a chi-squared distribution of t-degree freedom. χ−1 is called inverse-chi-squared distribution of 1 t-degree freedom. It is known that E[χ−1 ] = t−2 for t ≥ 3. 3 Detailed Comparison to Prior Work We compare the per-iteration complexity of our results more closely to prior work. In the stochastic setting, Oja’s method runs in time nnz(Ak ) for iteration k, and therefore is undoubtedly faster than the block power method which runs in time nnz(Σk ). In the adversarial setting, it is clear that the per-iteration complexities of FTPL and FTCL are no greater than MMWU, because computing the leading eigenvector and the matrix inversion are both faster than computing the full eigendecomposition. In the rest of this section, we compare MMWU-JL, FTPL and FTCL more closely. They respectively have per-iteration complexities e ) × Mexp , 1 × Mev , and O(1) e O(T × Mlin where • In MMWU-JL, we denote by Mexp the time needed for computing exp(ηΣk−1 /2) multiplied to e −1/2 ). a vector. Recall that η = Θ(T • In FTPL, following the tradition, we denote by Mev √ the time needed for computing the top eigenvector of Σk−1 + rr> , where the norm of r is O( dT ). • In FTCL, we denote by Mlin the time needed for solving a linear system with matrix M = e −1/2 ). cI − ηΣk−1 , where M  1e I and η = Θ(T For exact computations, one may generally derive that Mexp ≥ Mev ≥ Mlin . However, for large-scale applications, one usually applies iterative methods for the three tasks. Iterative methods utilize matrix sparsity, and have running times that depend on matrix properties. Worst-case Complexity. We compute that: 1/4 nnz(Σ ), dω }). e • Mexp in the worst case is O(min{T T The first is because if using Chebyshev approximation, one can compute exp(ηΣk−1 /2) applied  e kηΣk−1 k1/2 · nnz(Σk−1 ) . The second is because one can to a vector in time at most O 2 e ω ) and then compute the matrix compute the singular value decomposition of Σk−1 in time O(d exp(ηΣk−1 /2) directly. 3/4 d−1/4 nnz(Σ ), dω }). e • Mev in the worst case is O(min{T T The first is so because, as proved in [20], it suffices to compute the top eigenvector of Σk−1 + 3 1 rr> up to a multiplicative error O(T − 2 d 2 ).8 If one applies Lanczos method, this is in time 8 A multiplicative error δ means to find x such that x> (Σk−1 + rr> )x ≥ (1 − δ)λmax (Σk−1 + rr> ). 6  e T 34 d− 41 nnz(ΣT ) . (Recall that it only works when T ≥ d). The second is because the O leading eigenvector of a d × d matrix can be computed directly in time O(dω ).  e min{min{T 41 , d}nnz(ΣT ), dω } . • Mlin in the worst case is O The first is because our matrix M has a condition number (i.e., λmax (M)/λmin (M)) at most e 1/2 ). If using conjugate gradient [38], one can solve a linear system for M in O(ηT ) = O(T  e min{T 41 , d}nnz(ΣT ) . The second is because the inverse of a d × d matrix can time at most O be computed directly in time O(dω ) [14].   e min T 41 nnz(ΣT ) 34 nnz(A) 14 + nnz(ΣT ), dω • Mlin can be improved to O if using stochastic iterative methods. In sum, if using iterative methods, the worst case values of Mlin , Mev , Mexp are on the same e lin ), this is no slower than O(Mev ) of magnitude. Since the per-iteration cost of FTCL is only O(M FTPL, and much faster than O(T × Mexp ) of MMWU-JL. Practical Complexity. There are many algorithms to compute leading eigenvectors, including Lanczos method, shift-and-invert, and the (slower) power method. The performance may depend on other properties of the matrix, including “how well-clustered the eigenvalues are.” There are also numerous ways to compute matrix inversions, including conjugate gradient, accelerated coordinate descent, Chebyshev method, accelerated SVRG, and many others. Some of them also run faster when the eigenvalues form clusters [38]. In particular, for a random Gaussian matrix Σk−1 (with dimension 100 ∼ 5000), using the default scientific package SciPy of Python, Mev is roughly 3 times of Mlin . Total Worst-Case Complexity. Since FTPL requires d times more iterations in order to achieve the same average regret as FTCL or MMWU, in the last column of Table 1, we also summarize the minimum total time complexity needed to achieve an ε average regret. Examples. If nnz(ΣT ) = d2 and nnz(A) = O(d), the total complexity needed to achieve an ε average regret: e 2 ε−2 + d1.75 ε−2.5 ) (by us) vs. O(d e 2 ε−4.5 ) (by MMWU-JL) O(d e ω ε−2 ) (by MMWU) . or O(d λ-refined setting. In the λ-refined setting, one can revise the complexity bounds accordingly. For all the three methods FTCL, MMWU and MMWU-JL, the optimal learning rate η becomes 2 ) iterations. e e O((λT )−1/2 ) in this setting, and they achieve an average ε regret in at most T = O(λ/ε The running time of MMWU therefore improves by a factor of λ. 1/2 e As for MMWU-JL, the worst-case value Mexp is O(kηΣ T k2 · nnz(Σ)) if using conjugate gradient, and this spectral norm kηΣT k2 ≤ O(ηkΣT k) ≤ O(ηλT ) = O(λ/ε). Moreover, the come ε−2 in order to achieve an ε average regret. This pressed dimension of MMWU-JL must be O e 1/2 ε−5/2 nnz(Σ)) and thus a total complexity of gives a per-iteration worst-case complexity O(λ 1.5 −4.5 e O(λ ε nnz(Σ)). As for our FTCL, the worst-case value Mlin depends on the condition number of the matrix M = cI−ηΣk−1 we invert at each iteration. The condition number of M is at most kηΣT k2 ≤ O(λ/ε), so e 1/2 ε−1/2 nnz(Σ)) if using conjugate gradient, and the the per-iteration worst-case complexity is O(λ 1.5 −2.5 e total complexity is O(λ ε nnz(Σ)). Alternatively, if one uses the accelerated SVRG method e √ηT nnz(Σ) 34 nnz(A) 14 + to compute this inversion, the per-iteration worst-case complexity is O   e ε−0.5 nnz(Σ) 34 nnz(A) 14 + nnz(Σ) . nnz(Σ) = O 7 4 High-Level Discussion of Our Techniques Revisit MMWU. We first revisit the high-level idea behind the proof of MMWU. Recall Wk = exp(ck I + ηΣk−1 ) where ck is the unique constant such that TrWk = 1. The main proof step (see for instance [9, Theorem 3.1]) is to use the equality TrWk = TrWk+1 = 1 to derive a relationship between ck − ck+1 and the gain value Wk • Ak at this iteration. More specifically, using the Golden-Thompson inequality we have     Tr eck I+ηΣk ≤ Tr eck I+ηΣk−1 eηAk = Tr Wk eηAk ≈ Tr eck I+ηΣk−1 + ηWk • Ak . One can also use convexity to show   Tr eck+1 I+ηΣk − Tr eck I+ηΣk ≤ ck+1 − ck . Adding these two inequalities, and using the fact that TrWk = TrWk+1 = 1, we immediately have ck − ck+1 . ηWk • Ak . In other words, the gain value Wk • Ak at iteration k, up to a factor η, is lower bounded by the decrement of ck . On the other hand, it is easy to see c1 − cT +1 ≥ ηλmax (ΣT ) − O(log d) from c1 = − log d and the definition of cT +1 . Together, we can derive that PT k=1 Wk • Ak & λmax (ΣT ) . In the rest of this section, we perform a thought experiment to “modify” the above MMWU analysis step-by-step. In the end, the intuition of our FTCL shall become clear to the reader. Thinking Step 1. We wish to choose a random Gaussian vector u ∈ Rd and “compress” MMWU to dimension 1 in the direction of u. More specifically, we define Wk = exp(ck I + ηΣk−1 ) but this time ck is the unique constant such that Tr(Wk uu> ) = u> Wk u = 1. In such a case, we wish to say that   (?)  Tr eck I+ηΣk uu> = Tr eck I+ηΣk−1 +ηAk uu> ≤ Tr e(ck I+ηΣk−1 )/2 uu> e(ck I+ηΣk−1 )/2 eηAk  1/2 1/2 1/2 1/2 = Tr Wk uu> Wk eηAk ≈ Tr(Wk uu> ) + ηWk uu> Wk • Ak . def 1/2 If the above inequality were true, then we could define wk = Wk u which is a unit vector (because Tr(Wk uu> ) = 1) and the gain wk> Ak wk = wk wk> • Ak would again be proportional to the change of this new potential function Tr eck I+ηΣk−1 uu> . This idea almost worked except that inequality (?) is false due to the non-commutativity of matrices.9 Perhaps the most “immediate” idea to fix this issue is to use the randomness of uu> . Recall that E[uu> ] = I if we choose properly normalize u, and therefore it “seems like” we have E[Tr(Wk uu> )] = Tr(Wk ) and the inequality will go through. Unfortunately, this idea fails for a fundamental reason: the normalization constant ck depends on u, so Wk is not independent from the randomness of u.10 Thinking Step 2. Since Gaussian vectors are rotationally invariant, we switch wlog to the eigenbasis of Σk−1 so Wk is a diagonal matrix. We make an important observation:11 ck depends only on |u1 |, . . . , |ud |, but not on the 2d possible signs of u1 , . . . , ud . For this reason, we can fix a diagonal matrix D and consider all random uu> which agree with D 9 A analogy for this effect can be found in the inequality Tr(eA ) ≤ Tr(eB ) for every A  B. This inequality becomes false when multiplied with uu> and in general eA  eB is false. 10 In fact, ck can be made almost independent from u if we replace uu> with QQ> where Q is a random d × m matrix for some very large m. That was the main idea behind MMWU-JL.  P 11 This is because, Tr(eck I−ηΣk−1 uu> ) = di=1 |ui |2 · eck −ηλi where λi is the i-th eigenvalue of Σk−1 . 8 on its diagonal,12 All of such vectors u give the same normalization constant ck , and it satisfies E[uu> |D] = D. This implies that we can now study the conditional expected potential change       E Tr eck I+ηΣk uu> − Tr eck I+ηΣk−1 uu> D = Tr eck I+ηΣk D − Tr eck I+ηΣk−1 D ,   or if we denote by B = ck I + ηΣk−1 , we want to study the difference Tr eB+ηAk D − Tr eB D only in the special case that D and B are simultaneously diagonalizable.   B+ηAk D − Tr eB D is to define f (η) def Thinking Step 3. A usual way to bound Tr e =  Tr eB+ηAk D and bound f (η) by its Taylor series f (0) + f 0 (0)η + 21 f 00 (0)η 2 + · · · . The zero-order  derivative f (0) is Tr eB D . The first-order derivative f 0 (0) = Tr(Ak eB D) = eB/2 DeB/2 • Ak behaves exactly in the way we hope, and this strongly relies on the commutativity between B and D. Unfortunately, higher-order derivatives f (k) (0) benefit less and less from the commutativity between B and D due to the existence of terms such as Ak eB DeB Ak D. For this reason, we need to (1) truncate the Taylor series and (2) use different analytic tools. This motivates us to use the following regime that can be viewed as a “low-degree” version of MMWU: A Quick Detour. In a recent result, the authors of [9] generalized MMWU to `1−1/q regularized strategies. For every q ≥ 2, they define Xk = (ck I − ηΣk−1 )−q where ck is the unique constant such that ck I − ηΣk−1  0 and TrXk = 1.13 This is a generalization of MMWU because when q ≈ log d, the matrix Xk behaves nearly the same as Wk ; in particular, it gives the same regret bound. The analysis behind this new strategy is to keep track of the potential change in Tr (ck I−ηΣk−1 )−(q−1)  c I+ηΣ k−1 , and then use the so-called Lieb-Thirring inequality (see Section 5) to as opposed to Tr e k replace the use of Golden-Thompson. (Note that ck is choosen with respect to q but the potential is with respect to q − 1.) Thinking Step 4. Let us now replace MMWU strategies in our Thinking Steps 1,2,3 with `1−1/q regularized strategies. Such strategies have two advantages: (1) they help us overcome the issue for higher-order terms in Thinking Step 3, and (2) solving linear systems is more efficient than computing matrices exponentials. We shall choose q = Θ(log(dT )) in the end. Specifically, we prepare a random vector u and define the normalization constant ck to be the unique one satisfying Tr (ck I − ηΣk−1 )−q uu> = Tr(Xk uu> ) = 1. At iteration k, we let the player 1/2 choose strategy Xk u which is a unit vector. If one goes through all the math carefully (using Woodbury formula),  this time we  are entitled to upper bound the trace difference of the form Tr (B + ηC)q−1 D − Tr Bq−1 D where D is simultaneously diagonalizable with B but not C. Similar to Thinking Step 3, we can define  def q−1 f (η) = Tr (B + ηC) D and bound this polynomial f (η) using its Taylor expansion at point 0. Commutativity between B and D helps us compute f 0 (0) = (q − 1)Tr(Bq−2 CD) but again we cannot bound higher-derivatives directly. Fortunately, this time f (η) is a degree q − 1 polynomial so we can use Markov brothers’ inequality to give an upper bound on its higher-order terms. This is the place we lose a few extra polylogarithmic factors in the total regret. Thinking Step 5. Somehow necessarily, even the second-order derivative f 00 (0) can depend on terms such as 1/Dii where Dii = |ui |2 is the i-th diagonal entry of D. This quantity, over the Gaussian random choice of ui , does not have a bounded mean. More generally, the inverse chisquared distribution with degree t (recall Section 2) has a bounded mean only when t ≥ 3. For this That is, all random uu> such that kui k22 = Di,i for each i ∈ [d]. For simplicity we also denote this event as D. The name “`1−1/q strategies” comes from the following fact. Recall MMWU naturally arises as the follow-theregularized-leader strategy, where the regularizer is the matrix entropy. If the entropy function is replaced with a negative `1−1/q norm, the resulting strategy becomes Xk . We encourage interested readers to see the introduction of [9] for more background, but we shall make this present paper self-contained. 12 13 9 reason, instead of picking a single random vector u ∈ Rd , we need to pick threerandom vectors > > u1 , u2 , u3 ∈ Rd and replace all the occurrences of uu> with 13 u1 u> 1 + u2 u2 + u3 u3 in the previous thinking steps. As a result, each Dii becomes a chi-squared distribution of degree 3 so the issue goes away. This is why we claimed in the introduction that we can compress MMWU to dimension 3. Remark. By losing a polylog factor in regret, one can compress it further to dimension 2. This is because the mean of the inverse chi-squared distribution with degree 2, if truncated at some large √ value v, is only log(v). However, this “truncated mean” becomes Ω( v) for degree 1. Thinking Step 6. Putting together previous steps, we obtain a FTCL strategy with total regret √ O( T log3 (dT )), which is worse than MMWU only by a factor O(log2.5 (dT )). We call this method FTCLobl and include its analysis in Section 6. However, FTCLobl only works for an oblivious adversary (i.e., when A1 , . . . , AT are fixed a priori) and gives an expected regret. To turn it into a robust strategy against adversarial A1 , . . . , AT , and to make the regret bound work with high confidence, we need to re-sample u1 , u2 , u3 every iteration. We call this method FTCLadv . A careful but standard analysis with Azuma inequality helps us reduce FTCLadv to FTCLobl . We state this result in Section 7. Running Time. As long as q is an even integer, the computation of “(ck I − ηΣk−1 )−1 applied to a vector” (or in other words, solving linear systems) becomes the bottleneck for each iteration of FTCLobl and FTCLadv . However, as long as q ≥ Ω(log(dT )), we show that the condition number of the matrix ck I − ηΣk−1 is at most ηT = Θ(T 1/2 ). Conjugate gradient solves each such linear 1/4 , d} × nnz(Σ e system in worst-case time O(min{T k−1 )). Compress to 1-d in Stochastic Online Eigenvector. If the adversary is stochastic, we observe that Oja’s algorithm corresponds to a potential function Tr (I + ηAk ) · · · (I + ηA1 )uu> (I +  ηA1 ) · · · (I+ηAk ) . Because the matrices are drawn from a common distribution, this potential be haves similar to the matrix exponential but compressed to dimension 1, namely Tr eη(A1 +···+Ak ) uu> . In fact, just using linearity of expectation carefully, one can both upper and lower bound this potential. We state this result in Section 9 (and it can be proved in one page!) 5 A New Trace Inequality Prior work on MMWU and its extensions rely heavily on one of the following trace inequalities [9]:  Golden-Thompson inequality : Tr(eA+ηB ) ≤ Tr eA eηB   Lieb-Thirring inequality : Tr (A + ηB)k ≤ Tr Ak/2 (I + ηA−1/2 BA−1/2 )k Ak/2 . Due to our compression framework in this paper, we need inequalities of type  “ Tr(eA+ηB D) ≤ Tr eηB eA/2 DeA/2 ”   “ Tr (A + ηB)k D ≤ Tr (I + ηA−1/2 BA−1/2 )k Ak/2 DAk/2 . ” (5.1) which look almost like “generalizations” of Golden-Thompson and Lieb-Thirring (by setting D = I). Unfortunately, such generalizations do not hold for an arbitrary D. For instance, if the first “generalization” holds for every PSD matrix D then it would imply “ eA+ηB  eA/2 eηB eA/2 ” which is a false inequality due to matrix non-commutativity. In this paper, we show that if D is commutative with A, then the “generalization” (5.1) holds for the zeroth and first order terms with respect to η. As for higher order terms, we can control it using Markov brothers’ inequality. (Proof in Appendix B.) 10 Lemma 5.1. For every symmetric matrices A, B, D ∈ Rd×d , every integer k ≥ 1, every η ∗ ≥ 0, and every η ∈ [0, η ∗ /k 2 ], if A and D are commutative, then  2 2 n o ηk k k k−1 0 k k (A + ηB) • D − A • D ≤ kηB • A D + max (A + η B) • D − A • D . η∗ η 0 ∈[0,η ∗ ] 6 Oblivious Online Eigenvector + Expected Regret In this section we first focus on a simpler oblivious setting. A1 , . . . , AT are T PSD matrices chosen by the adversary in advance, and they do not depend on the player’s actions in the T iterations. We are interested in upper bounding the total expected regret  PT PT > λmax k=1 E[wk Ak wk ] , k=1 Ak − where the expectation is over player’s random choices wk ∈ Rd (recall kwk k2 = 1). In Section 7 we generalize this result to the full adversarial setting along with high-confidence regret. Our algorithm FTCLobl is presented in Algorithm 1. It is parameterized by an even integer q ≥ 2 and a learning rate η > 0. It initializes with Wishart random matrix U. For every −qa rank-3 def 14 k ∈ [T + 1], we denote by Xk = ck I − ηΣk−1 where  ck > 0 is the unique constant s.t. ck I − ηΣk−1  0 and Tr Xk U = 1 . At iteration k ∈ [T ], the player plays a random unit vector wk , among the three eigenvectors of 1/2 1/2 1/2 1/2 Xk UXk . It satisfies E[wk wk> ] = Xk UXk . We prove the following theorem in this paper for the total regret of FTCLobl (T, q, η). Theorem 1. In the online eigenvector problem with an oblivious adversary, there exists absolute  1 constant C > 1 such that if q ≥ 3 log(2dT ) and η ∈ 0, 11q3 , then FTCLobl (T, q, η) satisfies T T i X h i h X  4 1/2 1/2 > E Ak • Xk UXk ≥ 1 − C · ηq 5 log(dT ) λmax (ΣT ) − . E wk A k wk = η k=1 k=1 (dT )  λmax (ΣT ) Corollary 6.1. If q = 3 log(2dT ) and η = Θ √log −3 h i p  3 >A w ≥ λ (Σ ) − O E w λ (Σ ) log (dT ) , max max T T k k k=1 k √ or choosing the same q but η = Θ(log−3 (dT )/ T ) we have h i √  PT 3 >A w T log (dT ) . E w ≥ λ (Σ ) − O max T k k k=1 k PT (λ-refined language) (general language) As discussed in Section 4, our proof of Theorem 1 relies on a careful analysis on how the potential  1−1/q function Tr(Xk U) = Tr (ck I − ηΣk−1 )−(q−1) U changes across iterations. We analyze this potential increase in two steps: in the first step we replace Σk−1 with Σk , and in the second step we replace ck with ck+1 . After appropriate telescoping, we can derive the result of Theorem 1. We now discuss the details in the subsequent sections. 14  This ck is unique because Tr Xk U is a strictly decreasing function for ck > ηλmax (Σk−1 ). 11 Algorithm 1 FTCLobl (T, q, η) Input: T , number of iterations; q ≥ 2, an even integer,  theory-predicted choice q = Θ(log(dT )) p η, the learning rate.  theory-predicted choice η = log−3 (dT )/ λmax (ΣT ) 1: Choose u1 , u2 , u3 ∈ Rd where the 3d coordinates are i.i.d. drawn from N (0, 1).  > > 2: U ← 13 u1 u> 1 + u2 u2 + u3 u3 . 3: for k ← 1 to T do P 4: Σk−1 ← k−1 i=1 Ai . −q 5: Denote by Xk ← ck I − ηΣk−1 where ck is the unique constant satisfying that ck I − ηΣk−1  0 and Tr Xk U = 1 . P 1/2 1/2 6: Compute Xk UXk = 3j=1 pj · yj yj> where y1 , y2 , y3 are orthogonal unit vectors in Rd . 7: Choose wk ← yj with probability pj .  it satisfies p1 , p2 , p3 ≥ 0 and p1 + p2 + p3 = 1. 8: Play strategy wk and receive matrix Ak . 9: end for 6.1 Well-Behaving Events Due to concentration reasons, the potential increase could only be “reasonably” bounded for wellbehaved matrices U. We now make this definition formal. Given some parameter δ > 0 that we shall later choose to be 1/T 3 , we introduce the following event: Definition 6.2. For every k ∈ {0, 1, . . . , T }, define event n δ ed o def Ek (U) = ν1> Uν1 ≥ and ∀i ∈ [d] : νi> Uνi ≤ 2 log 2 δ def where ν1 , . . . , νd are the eigenvectors of Σk with non-increasing eigenvalues. Let E<j (U) = Vj−1 k=0 Ek (U). Intuitively, event Ek (U) makes sure that the matrix U is “well-behaved” in the eigenbasis of Σk : (1) it has a non-negligible first coordinate ν1> Uν1 , and (2) each coordinate νi> Uνi is no more than logarithmic. Using tail bounds for Gaussian distributions, it is not hard to show that this event occurs with probability at least 1 − δ (see Appendix C): Lemma 6.3. PrU [Ek (U)] ≥ 1 − δ for all k = 0, 1, . . . , T . Under event Ek−1 (U), the barrier ck and the matrix Xk satisfy the following nice properties. (Their proofs are manipulations of matrix algebra and in Appendix C.) Proposition 6.4. If q ≥ max{log 2δ , log(3d log ed δ )}, then event Ek−1 (U) implies 1 ≤ ck − ηλmax (Σk−1 ) ≤ e . e In particular, Ek−1 (U) implies (recall Ak = Pk P> k) 1 (a) : ck I − ηΣk−1  I e 1−1/q (b) : Tr(Xk U) ≤ ck ≤ ηλmax (Σk−1 ) + e 6.2 1/q (c) : ηP> k Xk Pk  eηI . First Potential Increase The next lemma bounds the potential increase if we replace Σk−1 with Σk : 12 Lemma 6.5. There exists constant C > 1 such that, if q ≥ max{log 2δ , log(3d log ed δ )} and η ≤ h     i −(q−1) −(q−1) E Tr ck I − ηΣk U · 1E<k (U) − Tr ck I − ηΣk−1 U · 1E<k (U) h i 1/2 1/2 ≤ (q − 1)η(1 + C · ηq 5 log(d/δ)) E Ak • Xk UXk + (ηT + e)T δ . 1 , 3q 3 The proof of Lemma 6.5 is the main technical contribution of this paper, and deviates the most from classical analysis of MMWU. It makes use of our trace inequality in Section 5, and is the only place in our analysis that relies on rank(U) ≥ 3. We include the details in Appendix D. 6.3 Second Potential Increase The following lemma bounds the potential increase if we replace ck with ck+1 . Its proof is included in Appendix E and is reasonably straightforward. Lemma 6.6. For all q ≥ 2 and η > 0, h  i h  i −(q−1)  −(q−1)  U · 1E<(k+1) (U) − E Tr ck I − ηΣk U · 1E<k (U) E Tr ck+1 I − ηΣk ≤ −(q − 1)(E[ck+1 ] − E[ck ]) . Finally, we prove in Appendix F that Theorem 1 is a direct consequence of our two potential increase lemmas above. 7 Adversarial Online Eigenvector + Regret in High-Confidence In this section, we switch to the more challenging adversarial setting: in each iteration k, the adversary picks Ak after seeing the player’s strategies w1 , . . . , wk−1 . In other words, Ak may depend on the randomness used in generating w1 , . . . , wk−1 as well. In such a case, denoting by D the same rank-3 Wishart distribution we generate U from in FTCLobl , we consider a variant of FTCLobl where a new random Uk is generated from D per iteration. In other words, instead of choosing U ∼ D only once at the beginning, we choose U1 , . . . , UT i.i.d. from D. Then, the normalization constant ck is defined to satisfy Tr((ck I − ηΣk−1 )−q Uk ) = 1. We call this algorithm FTCLadv and present it in Algorithm 2 for completeness’ sake. Our next theorem shows that, algorithm FTCLadv gives the same regret bound as Theorem 1 even in the adversarial setting; in addition, it elevates the regret bound to a high-confidence level. Theorem 2. In the online eigenvector problem with an adversarial adversary, there exists constant   1 C > 1 such that for every p ∈ (0, 1), q ≥ 3 log(2dT ) and η ∈ 0, 11q3 , our FTCLadv (T, q, η) satisfies w.p. ≥ 1 − p : T X k=1   5 wk> Ak wk ≥ 1 − C · η q 5 log(dT ) + log(1/p) λmax (ΣT ) − . η Corollary 7.1. Let q = 3 log(2dT ) and η = Θ PT > k=1 wk Ak wk ≥ λmax (ΣT ) − log3 (dT )+log1/2 (1/p))−1  √ , λmax (ΣT ) then with prob. ≥ 1 − p:   p p λmax (ΣT ) · O log3 (dT ) + log(1/p) , (λ-refined language) log3 (dT )+log1/2 (1/p))−1  √ T we have with prob. ≥ 1 − p:   p √ PT 3 >A w ≥ λ w (Σ ) − T · O log (dT ) + log(1/p) . (general language) max T k k k=1 k or choosing the same q but η = Θ 13 Algorithm 2 FTCLadv (T, q, η) Input: T , number of iterations; q ≥ 2, an even integer,  theory-predicted choice q = Θ(log(dT )) p η, the learning rate.  theory-predicted choice η = log−3 (dT )/ λmax (ΣT ) 1: for k ← 1 to T do 2: Choose 3 vectors u1 , u2 , u3 ∈ Rd where the 3d coordinates are i.i.d. drawn from N (0, 1). > > 3: Uk ← 13 u1 u> 1 + u2 u2 + u3 u3 . Pk−1 4: Σk−1 ← i=1 Ai . −q 5: Denote by Xk ← ck I − ηΣk−1 where ck is the unique constant satisfying that  ck I − ηΣk−1  0 and Tr Xk Uk = 1 . P3 1/2 1/2 > 6: Compute Xk Uk Xk = j=1 pj · yj yj where y1 , y2 , y3 are orthogonal unit vectors in Rd .  This is an eigendecomposition and it satisfies p1 , p2 , p3 ≥ 0 and p1 + p2 + p3 = 1. 7: Choose wk ← yj with probability pj . 8: Play strategy wk and receive matrix Ak . 9: end for Proof of Theorem 2 relies on a reduction to the oblivious setting, and is included in Appendix G. 8 Efficient Implementation of FTCL Recall that our regret theorems were based on the assumption that in each iteration k, the three vectors −q/2 def 1/2 vj = Xk uj = ck I − ηΣk−1 uj for j ∈ [3] (8.1)  can be computed exactly. Once v1 , v2 , v3 are given, we can compute the 3×3 matrix u> i Xk uj i,j∈[3] 1/2 1/2 explicitly, from which we can derive in O(d) time the rank-3 eigendecomposition Xk UXk P3 > j=1 pj · yj yj . Therefore, it suffices to compute v1 , v2 , v3 efficiently. To achieve this goal, we need to = (a) allow v1 , v2 , v3 to be computed approximately, (b) find the normalization constant ck efficiently, and −1 (c) compute ck I − ηΣk−1 b efficiently for any b ∈ Rd . At a high level, issue (a) is simple because if vj0 satisfies kvj − vj0 k2 ≤ εe/poly(d, T ) and we use vj0 instead of vj , then the final regret is affected by less than εe; issue (b) can be dealt as long as we perform a careful binary search to find ck , similar to prior work [9]; issue (c) can be done as long as we have a good control on the condition number of the matrix ck I − ηΣk−1 . We discuss the details in Appendix H, and state below our final running-time theorem: Theorem 3. If q ≥ 3 log(2dT /p), with probability at least 1 − p, for all k ∈ [T ], the k-th iteration e of FTCLobl and FTCLadv runs in O(d) plus the time to solve O(1) linear systems for matrices cI − ηΣk−1 . Here, c > 0 is some constant satisfying cI − ηΣk−1  1e I. Corollary 8.1. Since the condition number of matrix cIp − ηΣk−1 is at most ηλmax (ΣT ) + 1, each e max{ ηλmax (ΣT ) + 1, d} · nnz(ΣT ) if implelinear system can be solved in worst-case time O  e nnz(ΣT ) + √ηT · nnz(ΣT )3/4 nnz(A)1/4 by the stochastic mented by conjugate gradient, or time O SVRG method. 14 9 Stochastic Online Eigenvector Consider the special case when the matrices A1 , . . . , AT are generated i.i.d. from a common distribution whose expectation equals B. This is known as the stochastic online eigenvector problem, and we wish to minimize the regret15 PT > k=1 wk Ak wk − T · λmax (B) . We revisit Oja’s algorithm: beginning with a random Gaussian vector u ∈ Rd , at each iteration k, let wk be (I + ηAk−1 ) · · · (I + ηA1 )u after normalization. It is clear that wk can be computed from wk−1 in time nnz(A). We include in Appendix I a one-paged proof of the following theorem:  p  Theorem 4. There exists C > 1 such that, for every p ∈ (0, 1), if η ∈ 0, p/(75T λmax (B)) in Oja’s algorithm, we have with probability at least 1 − p: PT log(d/p) > . k=1 wk Ak wk ≥ (1 − 2η)T · λmax (B) − C · η √ p Corollary 9.1. Choosing η = Θ( p/ T λmax (B)), we have with prob. ≥ 1 − p: √  PT T ·λmax (B) >A w ≥ T · λ √ (B) − O w · log(d/p) . (λ-refined language) max k k k=1 k p √ √ Choosing η = Θ( p/ T ), we have with prob. ≥ 1 − p: √  PT > √T · log(d/p) . (general language) k=1 wk Ak wk ≥ T · λmax (B) − O p The proof of Theorem 4 uses a potential function analysis which is similar to the matrix exponential potential used in MMWU, but compressed to dimension 1. 10 Conclusions We give a new learning algorithm FTCL for the online eigenvector problem. It matches the optimum regret obtained by MMWU, but runs much faster. It matches the fast per-iteration running time of FTPL, but has a much smaller regret. In the stochastic setting, our side result on Oja’s algorithm also outperforms previous results. We believe our novel idea of “follow the compressed leader” may find other applications in the future. Acknowledgement We thank Yin Tat Lee for discussing the problem regarding how to compress MMWU to constant dimension in 2015. We thank Elad Hazan for suggesting us the problem and for several insightful discussions. We thank Dan Garber and Tengyu Ma for clarifying some results of prior work [20]. 15 In principle, one can also ask to minimize regret where T · B is replaced with A1 + · · · + AT . However, due to simple concentration results, there is no big difference between the two different notions. [20] 15 Appendix Paper MMWU [9, 11] MMWU-JL [9, 35] FTPL [20] this paper Total Regret √ e λT ) O( √ e λT ) O( not clear √ e λT ) Theorem 1&2 O( Time Per Iteration at least O(dω ) M exp e /λ) × O(T e O e O e e Mlin × O(1) Theorem 3 O e O ↓ stochastic online eigenvector only ↓ √  e e block power method [20] O( λT ) O nnz(Σ) O √  e λT ) Theorem 4 e O( this paper O nnz(A) Theorem 4 O Minimum Total Time for ε Average Regret  λdω ε2  λ1.5 nnz(Σ) ε4.5  λ1.5 nnz(Σ) and ε2.5 3 1 λ nnz(Σ) 4 nnz(A) 4 ε2.5 λ nnz(Σ) ε2 + ελ2 nnz(Σ)   λ nnz(A) ε2  Table 2: Comparison of known methods for the online eigenvector problem in the λ-refined language (see Section 1.4).  We denote by Σ = A1 + · · · + AT , by nnz(A) = maxk∈[T ] nnz(Ak ) , and by λ = T1 λmax (Σ) ∈ [0, 1]. e • Mexp is the time to compute e−M multiplied with a vector, where M ∈ Rd×d satisfies 0  M  O((λT )1/2 ) · I. lin d×d e • M is the time to solve a linear system in M ∈ R , where M is PSD and of condition number ≤ O((λT )1/2 ). exp • If using iterative methods, the worst-case values M and Mlin are   e min{min{d, (λT ) 14 }nnz(Σ), dω } , e min{(λT ) 14 nnz(Σ), dω } ≥ Mlin = O Mexp = O where dω is the time needed to multiply two d × d matrices. If using stochastic iterative methods, Mlin is at  e (T /λ) 41 nnz(Σ) 43 nnz(A) 14 + nnz(Σ) . (See discussions in Section 3.) most O A Evaluation Setup √ e T ) total regret, just like MMWU or MMWU-JL. Recall that our FTCL has nearly-optimal O( √ e dT ) and this could be far However, the previous developed FTPL method has a total regret O( from optimal. In this section, we generate synthetic data to verify that FTPL can indeed have poor regret performance. We generate three sequences of synthetic matrices Ak : 1. random. We pick a random covariance matrix Σ from Wishart distribution. In each iteration k, we pick a random vector vk ∼ N (0, Σ) and let Ak = vk vk> . Note that matrices Ak are i.i.d. 1 2. diagonal. In iteration k where k = sd 2 + r for s ∈ N and r ∈ [d/2], we whose Ak = 2 I + Er , where Er a matrix with all entries zero except the (r, r) entry being 1. In dataset diagonal, the eigen basis is fixed, and each vector ei in the standard basis takes turns to be the leading eigenvector. > 1 3. diagonal+rotation. In iteratin k where k = sd 2 + r, we whose Ak = P ( 2 I + Er )P, where Ps is a “rotation matrix” whose entries are  cos( 4πsd if i = j;  T )   sin( 4πsd ) if i=j−1 T [Ps ]i,j = 4πsd  − sin( T ) if i = j + 1   0 otherwise. 16 This dataset diagonal+rotation is just dataset diagonal plus a rotation in each step, so the eigen basis of the matrix gradually changes. We pick dimension d = 100 and T = 10000, and have implemented FTPL, FTCL and MMWU. (We did not implement MMWU-JL because MMWU has better regret than MMWU-JL.) For each of the three algorithms, we search through 100 different parameters for the learning rate, and report the best total regret. As illustrated in Figure 1, We can see that when the matrices are random, three algorithms behaves similarly. However, even in the simple data where each diagonal entries keep turns to be large, our algorithm has a notable advantage over FTPL. When the eigen basis starts to change, FTPL behaves significantly worse than FTCL and MMWU. B Proof of Lemma 5.1 We first recall Markov brother’s inequality. For a polynomial f : R → R, we use f (k) to denote the k-th order derivative of f at point x. We have: Theorem B.1 (Markov brother’s inequality). If polynomial f is of degree n, then ∀k ∈ N∗ and ∀a > 0 :  i 2 2 2 n (n − 12 )(n2 − 22 ) . . . (n2 − (k − 1)2 ) (k) max |f (x)| ≤ max |f (x)| . (B.1) a (2k − 1)!! x∈[0,a] x∈[0,a] Lemma 5.1. For every symmetric matrices A, B, D ∈ Rd×d , every integer k ≥ 1, every η ∗ ≥ 0, and every η ∈ [0, η ∗ /k 2 ], if A and D are commutative, then  2 2 o n ηk k k k−1 0 k k (A + ηB) • D − A • D ≤ kηB • A D + . max (A + η B) • D − A • D η∗ η 0 ∈[0,η ∗ ] Proof. Consider a degree-k polynomial def k k f (η) = (A + ηB) • D − A • D = Its first order derivative X f 0 (0) = Aj0 BAj1 • D = j0 ,j1 ∈Z≥0 j0 +j1 =k−1 X j0 ,j1 ∈Z≥0 j0 +j1 =k−1 k X ηi i=1 X j0 ,...,ji ∈Z≥0 j0 +···+ji =k−i Aj0 BAj1 B · · · BAji • D A(k−1)/2 BA(k−1)/2 • D = kB • A(k−1)/2 DA(k−1)/2 . def Above, the first equality is due to the commutativity between A and D. Letting f ∗ = maxη0 ∈[0,η∗ ] |f (η 0 )|, we can apply Markov brothers’ inequality (B.1) and obtain for every i ≥ 2,  i 2 2 k (k − 1) · · · (k 2 − (i − 1)2 ) k 2i ∗ 2 0 (i) · max |f (η )| ≤ f . |f (0)| ≤ η∗ 1 · 3 · 5 · · · (2i − 1) (η ∗ )i η 0 ∈[0,η ∗ ] Therefore, as long as η ≤ 0 η∗ , k2 f (η) = f (0) + f (0) · η + we have k X i=2 k X f (i) (0) η · ≤ f (0) + f 0 (0) · η + i! i i=2  ηk 2 η∗ i · 0 f∗ i! ≤ f (0) + f (0) · η + Since f (0) = 0 we complete the proof. 17  ηk 2 η∗ 2 f∗ .  C C.1 Proof for Section 6.1 Proof of Lemma 6.3 Lemma 6.3. For every k = 0, 1, . . . , T , we have PrU [Ek (U)] ≥ 1 − δ. Proof. Let ν1 , . . . , νd be the eigenvectors of Σk with non-increasing eigenvalues. Because Gaussian random vectors are rotationally invariant, we can view each u1 , u2 , u3 as drawn in the basis of ν1 , . . . , νd , so each νi> uj is drawn i.i.d. from N (0, 1) for every i ∈ [d], j ∈ [3]. Since ν1> Uν1 = 31 (ν1> u1 )2 + (ν1> u2 )2 + (ν1> u3 )2 , we immediately know that 3ν1> Uν1 is distributed according to chi-square distribution χ2 (3). The probability density function of χ2 (3) is √ −x/2 f (x) = e √2π x (for x ∈ [0, ∞)) and therefore r Z 3δ/2 √ h i Z 3δ/2 e−x/2 √x x 1 3 3/2 δ > √ √ dx = Pr ν1 Uν1 ≤ δ/2 ≤ dx ≤ δ ≤ . 2 π 2 2π 2π 0 0 As for the second condition, for every t ≥ 0 and i ∈ [d], r √  r h i Z ∞ e−x/2 √x t 2 −t/2 √ 2 −t/2 √ −t/2 > √ dx = 1 − Erf √ + e t≤e + e t , Pr νi Uνi ≥ t/3 ≤ π π 2π 2 t where Erf(x) is the Gauss error function. Picking t = 4 log ed δ , we have r r r δ 2 −t/2 √ δ2 2 δ2 ed −t/2 e ·2 < . e + t≤ 2 2 + 2 2 π e d πe d δ 2d   Therefore, we have Pr ∀i ∈ [d] : νi> Uνi ≥ 2 log ed ≤ 2δ and we conclude by union bound δ PrU [Ek (U)] ≤ 2δ + 2δ = δ .  C.2 Proof of Proposition 6.4 Proposition 6.4. If q ≥ max{log 2δ , log(3d log ed δ )}, then 1 ≤ ck − ηλmax (Σk−1 ) ≤ e . e In particular, Ek−1 (U) implies (recall Ak = Pk P> k) event Ek−1 (U) implies (C.1) 1 1/q 1−1/q (a) : ck I − ηΣk−1  I (b) : Tr(Xk U) ≤ ck ≤ ηλmax (Σk−1 ) + e (c) : ηP> k Xk Pk  eηI . e Proof. Let ν1 , . . . , νd be the eigenvectors of Σk−1 with non-increasing eigenvalues λ1 , . . . , λd . Then, Pd νi> Uνi δ > i=1 (ck −ηλi )q = Tr(Xk U) = 1. However, event Ek (U) tells us νi Uνi ≥ 2 which implies (ck − ηλ1 )q ≥ 2δ . Under our choice of q, we have ck − ηλ1 ≥ 1e which proves the first inequality in (C.1). On the other hand, letting c = ηλmax (Σk−1 ) + e, our choice of q implies Tr((cI − ηΣk−1 ) −q d d X X νi> Uνi 2 log(ed/δ) U) = ≤ ≤1 . q (c − ηλi ) eq i=1 i=1 Since the left hand side of the above inequality is an decreasing function in c, and since Tr((ck I − ηΣk−1 )−q U) = 1, we must have ck ≤ c which proves the second inequality in (C.1). Finally, (a) is a simple corollary of the first inequality of (C.1). As for (b), it simply comes from the following upper bound 1−1/q Tr(Xk U) = d X i=1 d X ν > Uνi νi> Uνi i ≤ ck = ck Tr(Xk U) = ck . q−1 (ck − ηλi ) (ck − ηλi )q i=1 18 1/q > > As for (c), it follows from P> k Pk  I so ηPk Xk Pk  ηPk (eI)Pk  eηI. D  Proof for Section 6.2 Lemma 6.5. There is constant C > 1 such that, if q ≥ max{log 2δ , log(3d log ed δ )} and η ≤ h    i −(q−1) −(q−1)  E Tr ck I − ηΣk U · 1E<k (U) − Tr ck I − ηΣk−1 U · 1E<k (U) h i 1/2 1/2 ≤ (q − 1)η(1 + C · ηq 5 log(d/δ)) E Ak • Xk UXk + (ηT + e)T δ . 1 , 11q 3 −(q−1)  Remark D.1. We have slightly abused notations here. In principle, the quantity Tr ck I−ηΣk U can be unbounded if ck I − ηΣk is not invertible. However, as we shall see in the proof of Lemma 6.5, this necessarily implies 1E<k (U) = 0 because of Proposition 6.4. Therefore, we de −(q−1)  fine Tr ck I − ηΣk U · 1E<k (U) to be zero if this happens. Proof of Lemma 6.5. Let ν1 , . . . , νd be the eigenvectors of Σk−1 with non-increasing eigenvalues. In this proof, let us assume without loss of generality that all vectors and matrices are written in this eigenbasis (so Σk−1 and Xk are both diagonal matrix). Since Gaussian random vectors are rotationally invariant, we assume that u1 , u2 , u3 are generated according to the following procedure: first, the absolute values of their 3d coordinates u1 , u2 , u3 are determined; then, their signs are determined. Denoting by D = diag{U11 , . . . , Udd } the diagonal part of U, we immediately notice that D is determined completely at the first step of the above procedure. This has two important consequences that we shall rely crucially in the proof: • fixing the randomness of D, it satisfies EU [U|D] = D;16 • ck is completely determined by D. 17 In addition, since the event Ek−1 (U) only depends on the diagonal entry of U, slightly abusing notation, we also use Ek−1 (D) to denote this event on diagonal matrices D. We also use Di to represent the i-th diagonal entry of D. Our proof now has three parts: Part I: Potential Increase for D. For every PSD matrix D, denoting by Ak = Pk P> k,   −(q−1)  −(q−1)  Tr ck I − ηΣk D − Tr ck I − ηΣk−1 D      ¬ −(q−1) −1/q 1−1/q = Tr Xk − ηPk P> D − Tr Xk D k  q−1    ­ 1/q 1/q 1/q 1−1/q −1 > 1/q D − Tr X D (D.1) = Tr Xk + ηXk Pk (I − ηP> X P ) P X k k k k k k Above, ¬ follows from the definition of Xk and ­ uses the Woodbury formula for matrix inversion. Now, unlike the classical proof for MMWU, our matrix D here is not identity so we cannot rely on the Lieb-Thirring trace inequality to bound the right hande side of (D.1) like it was used in [9]. We can instead consult our new trace inequality Lemma 5.1 because D and Xk are both diagonal matrices so they are commutative. Recall that Lemma 5.1 requires a crude upper bound on the first trace quantity on the term “ (A + η 0 B)k • D − Ak • D ”, and we shall provide this crude upper bound in Lemma D.2. 16 More specifically, since the off-diagonal entries of U can still randomly flip signs in the second step of the random procedure, their expectations are all equal to zero. 17 This is because ck is defined as the constant satisfying 1 = Tr((ck I − ηΣk−1 )U) = Tr((ck I − ηΣk−1 )D). 19 def 1 Formally, choosing η ∗ = 11q , we that for every D satisfying Ek−1 (D),   −(q−1)  −(q−1)  Tr ck I − ηΣk D − Tr ck I − ηΣk−1 D ® 1/q 1/q 1/q (q−2)/q −1 > D ≤ (q − 1)ηXk Pk (I − ηP> k Xk Pk ) Pk Xk • Xk   2 η(q − 1)2 · 4(q − 1)η ∗ kDk2 Pk P> + k • Xk η∗ ¯ (q − 1)η  2 6 Pk P> · kDk2 · Pk P> ≤ k • Xk D + O η q k • Xk 1 − eη °  2 6 > ≤ (q − 1)ηPk P> k • Xk D + O η q log(d/δ) Pk Pk • Xk . (D.2) Above, ® follows from Lemma 5.1 (with η ≤ η ∗ /q 2 ) together with Lemma D.2 (for η = η ∗ ); ¯ 1/q follows from I − ηP> k Xk Pk  (1 − eη)I (see Proposition 6.4), the fact that Tr(AC) ≤ Tr(BC) for A  B and C symmetric, and the choice of η ∗ ; ° follows from our assumption η ≤ 61 as well as kDk2 ≤ 2 log 2d δ which comes from the definition of event Ek−1 (D). Part II: Potential Increase for All U That Agrees With D. For every fixed D that satisfies Ek−1 (D), taking expectation over all matrices U that agrees with D:18 h   i −(q−1)  −(q−1)  E Tr ck I − ηΣk U · 1E<(k−1) (U) − Tr ck I − ηΣk−1 U · 1E<(k−1) (U) D h   ¬ −(q−1)  −(q−1)  ≤ E Tr ck I − ηΣk U − Tr ck I − ηΣk−1 U   i −(q−1) + Tr ck I − ηΣk−1 U · (1 − 1E<(k−1) (U) ) D   h i ­ −(q−1)  −(q−1)  ≤ Tr ck I − ηΣk D − Tr ck I − ηΣk−1 D + E (ηT + e) · (1 − 1E<(k−1) (U) ) D i   h −(q−1)  −(q−1)  = Tr ck I − ηΣk D − Tr ck I − ηΣk−1 D + (ηT + e) · Pr E<(k−1) (U) D ®  2 6 > ≤ (q − 1)ηPk P> k • Xk D + O η q log(d/δ) · Pk Pk • Xk + (ηT + e)T δ    ¯ 2 6 > = (q − 1)η E Pk P> k • Xk U | D + O η q log(d/δ) · Pk Pk • Xk + (ηT + e)T δ. (D.3) 1−1/q Above, ¬ is because indicator functions are never greater than 1; ­ uses Tr(Xk U) ≤ ηλmax (Σk−1 )+ e ≤ ηT + e which follows from Proposition 6.4; ® follows from (D.2) as well as Lemma 6.3; and ¯ follows from the observation EU [U|D] = D together with the fact that Xk only depends on D. Part III: Potential Increase for All U. We now claim for all possible diagonal D, it satisfies h   i −(q−1)  −(q−1)  U · 1E<k (U) D E Tr ck I − ηΣk U · 1E<k (U) − Tr ck I − ηΣk−1    2 6 > ≤ (q − 1)η E Pk P> (D.4) k • Xk U|D + O η q log(d/δ) · Pk Pk • Xk + (ηT + e)T δ. This is because, if D satisfies Ek−1 (D) then (D.4) comes from (D.3); or if D does not satisfy Ek−1 (D) then the left hand side of (D.4) is zero (see Remark D.1) but the right hand side is non-negative. Taking expectation with respect to the randomness of D in (D.4), and using Lemma D.3 which > > upper bounds ED [Pk P> k •Xk ] by ED [Pk Pk •Xk D] = EU [Pk Pk •Xk U] we get the desired inequality. 1/2 1/2 (Note that Pk P>  k Xk U = Ak Xk U = Ak Xk UXk .) 18 1 Note when D satisfies Ek−1 (D) we have  ck I − ηΣk−1  e I according to Proposition 6.4. This implies, as long as −(q−1) η ≤ e−1 , it satisfies ck I − ηΣk  0 so Tr ck I − ηΣk U > 0. 20 D.1 Missing Auxiliary Lemmas In this subsection we prove the following two auxiliary lemmas. The first one shall be used to bound the higher-order terms in Lemma 5.1.   1 Lemma D.2. For every q ≥ 2 and every η ∈ 0, 4e(q−1) , event Ek−1 (D) implies that  q−1   q−1  1/q 1/q > 1/q −1 > 1/q Tr Xk + ηXk Pk (I − ηPk Xk Pk ) Pk Xk D − Tr Xk q D ≤ 4η(q − 1)kDk2 Tr(Xk Pk P> k) . The second one upper bounds the expectation of the right hand side of Lemma D.2. We highlight that the proof of Lemma D.3 is the only place in this paper that we have assumed k(U) = 3. > Lemma D.3. We have ED [Tr(Pk P> k Xk )] ≤ 9 · ED [Tr(Pk Pk Xk D)]. Note that we can assume without loss of generality that Σk−1 , Xk and D are all diagonal matrices, which has been argued in the proof of Lemma 6.5. Therefore, all the proofs in this subsection will be given under this assumption. To prove Lemma D.2 we need the following lemma: Lemma D.4 (Monotonicity of Diagonal entries). Let A, D ∈ Rd×d be two diagonal positive definite matrices,19 let B ∈ Rd×d be PSD, then for every q ∈ N∗ such that qkA−1/2 BA−1/2 k2 < 1:  kDk2 q−1 0 ≤ Tr((A + B)q D) − Tr(Aq D) ≤ Tr A B . 1 − qkA−1/2 BA−1/2 k2 Proof of Lemma D.4. For every i ∈ [D], let P be a matrix with all zero entries except Pi,i = 1. Then we have: [(A + B)q ]i,i = Tr(Pq (A + B)q Pq ) ≥ Tr ((P(A + B)P)q ) = ([A + B]i,i )q ≥ [A]qi,i = [Aq ]i,i . Where the first inequality is due to the Lieb-Thirring inequality, and the last equality is because A is diagonal. Since D is a diagonal PSD matrix, we can conclude that20 Tr((A + B)q D) − Tr(Aq D) = and Tr((A + B)q D) − Tr(Aq D) ≤ max[D]i,i i∈[d] d X i=1 d X [D]i,i ([(A + B)q − Aq ]i,i ) ≥ 0 . i=1 [(A + B)q − Aq ]i,i = kDk2 Tr((A + B)q − Aq ) .(D.5) q We focus on the term (A+B)q . We can re-write it as (A+B)q = A1/2 (I + A−1/2 BA−1/2 )A1/2 . Then by Lieb-Thirring again, we have:   q  Tr((A + B)q ) ≤ Tr Aq/2 I + A−1/2 BA−1/2 Aq/2     1 −1/2 −1/2 q/2 q/2 A BA A ≤ Tr A I+ 1 − qkA−1/2 BA−1/2 k2  q ≤ Tr(Aq ) + Tr Aq−1 B . (D.6) −1/2 −1/2 1 − qkA BA k2 19 20 In fact, we have only required them to be simultaneously diagonalizable. The authors would like to thank Elliott Lieb who has helped us obtain the inequality of the next line. 21 q Where the second inequality uses (I + X)q  I + 1−qkXk X for every PSD matrix X with 2 qkXk2 < 1. Putting together (D.5) and (D.6), we obtain: Tr((A + B)q D) − Tr(Aq D) ≤  qkDk2 Tr Aq−1 B . −1/2 −1/2 1 − qkA BA k2  1/q Proof of Lemma D.2. Under event Ek−1 (D) , we know I−ηP> k Xk Pk  (1−eη)I (see Proposition 6.4) and thus eη 1/2q 1/2q 1/q 0  ηXk Pk (I − ηP> Pk )−1 P> I . k Xk k Xk  1 − eη 1/q 1/q 1/q 1/q −1 > We now apply Lemma D.4 with A = Xk , B = ηXk Pk (I−ηP> k Xk Pk ) Pk Xk , and q = q−1. (q−1)eη We can do so because A and D are both diagonal and 1−eη < 1 under our assumption of η. The conclusion of Lemma D.4 tells us that:  q−1   q−1  1/q 1/q > 1/q −1 > 1/q Tr Xk + ηXk Pk (I − ηPk Xk Pk ) Pk Xk D − Tr Xk q D   q−2 kDk Tr(A B) ≤ 2(q − 1)kDk 2 2 (q−1)eη q−1 ≤ 1− 1−eη ≤ 4η(q − 1)kDk2 Tr(Xk Pk P> k) .  η ) Tr(Xk Pk P> k 1 − eη Above, the second and third inequalities have respectively used are both true by our assumption on η. (q−1)eη 1−eη < 1 2 and 1 1−eη ≤ 2, which  Proof of Lemma D.3. Let λ1 ≥ · · · ≥ λd ≥ 0 be the eigenvalues of Σk−1 and ν1 , . . . , νd be the corresponding eigenvectors. Let D1 , · · · , Dd be the diagonals of D. Recall that Σk−1 , Xk , D are all diagonal matrices. Define function f : Rd → R def f (r1 , · · · , rd ) = d X [Pk P> ]i,i · ri k i=1 (ck − λi )q (recall that ck depends on (D1 , . . . , Dd )) We shall prove that for some γ ∈ (0, 1) that shall be chosen later, it satisfies for every i ∈ [d], E[f (γ, · · · , γ, Di , · · · , Dd )] ≥ E[f (γ, · · · , γ, Di+1 , · · · , Dd )] def where recall that both expectations are only over the randomness of D1 , . . . , Dd . Let D−i = (D1 , . . . , Di , Di+2 , · · · , Dd ). Then, it is sufficient to prove that for every fixed possibility of D−i , the following inequality holds: E [f (γ, · · · , γ, Di , · · · , Dd ) | D−i ] ≥ E [f (γ, · · · , γ, Di+1 , · · · , Dd ) | D−i ] . Di Di Therefore, in the remaining proofs, we shall consider Di as the only random variable, and thus ck only depends on Di . For a fixed value s ≥ 1 that we shall choose later, we can let c be the (unique) value of ck when Di = sγ. def x Letting g(x) = (ck −λ q , we make three quick observations: i) 1. g(γ) = γ (ck −λi )q is a monotone decreasing function of Di . This is so because ck is a monotone increasing function of Di . 2. g(Di ) = Di (ck −λi )q is a monotone decreasing function of Di . P D This is because g(Di ) = 1 − j6=i (ck −λj j )q = 1 but ck is a monotone increasing function of Di . 22 γ sγ 3. When Di ≤ sγ, we have g(γ) ≤ D q. i (c−λi )   P P D D sγ This is because g(γ) = Dγi 1 − j6=i (ck −λj j )q ≤ Dγi 1 − j6=i (c−λjj )q = Dγi (c−λ q , where the j) first inequality is because ck ≤ c when Di ≤ sγ (by the monotone increasing of ck with respect to Di ), and the second equality is according to the definition of c. Combining the above three observations, we have: sγ E[g(Di )] ≥ Pr[Di ≥ sγ] E[g(Di ) | Di ≥ sγ] ≥ Pr[Di ≥ sγ] (c − λi )q   sγ 2 1 E[g(γ)] ≤ Pr[Di ≥ sγ] E[g(γ) | Di ≥ sγ] + E Di (c − λi )q      1 sγ 2 sγ 1 γ γ +E ≤ . ≤ +E (c − λi )q Di (c − λi )q (c − λi )q s Di Recall that each Di = 13 (hνi , u1 i2 + hνi , u2 i2 + hνi , u3 i2 ) where u1 , u2 , u3 are three normal Gaussian random vectors. Therefore, each 3Di has a chi-square distribution of degree 3, which implies E[ D1i ] = 3 and Pr[Di ≥ 31 ] > 23 . In sum, if we take γ = 19 and s = 3, we have: E [g(Di )] ≥ E [g(γ)] . Di Di Finally, this implies E [f (γ, · · · , γ, Di , · · · , Dd ) − f (γ, · · · , γ, Di+1 , · · · , Dd ) | D−i ] = [Pk P> k ]i,i E [g(Di ) − g(γ)|D−i ] ≥ 0 . Di Di so we have E[f (γ, · · · , γ, Di , · · · , Dd )] ≥ E[f (γ, · · · , γ, Di+1 , · · · , Dd )] . D D In particular,  > E[Tr(Pk P> k Xk D)] = E[f (D1 , · · · , Dd )] ≥ E[f (γ, · · · , γ)] = γ E[Tr(Pk Pk Xk )] . E Proof for Section 6.3 Lemma 6.6. For all q ≥ 2 and η > 0, h  i h  i −(q−1)  −(q−1)  E Tr ck+1 I − ηΣk U · 1E<(k+1) (U) − E Tr ck I − ηΣk U · 1E<k (U) ≤ −(q − 1)(E[ck+1 ] − E[ck ]) Proof. Recall that ck+1 ≥ ck because all matrices Ak are PSD. Denoting by ν1 , . . . , νd the eigenvectors of Σk with non-increasing eigenvalues λ1 ≥ · · · ≥ λd ,21 we have for every U,   −(q−1)  −(q−1)  Tr ck+1 I − ηΣk U − Tr ck I − ηΣk U d X d d X X ¬ νi> Uνi νi> Uνi νi> Uνi − ≤ −(q − 1)(c − c ) · k+1 k (ck+1 − ηλi )q−1 (ck − ηλi )q−1 (ck+1 − ηλi )q i=1 i=1 i=1  −q  = −(q − 1)(ck+1 − ck ) · Tr ck+1 I − ηΣk U = −(q − 1)(ck+1 − ck )Tr(Xk+1 U) = = −(q − 1)(ck+1 − ck ) . 21 This is different from the proof of Lemma 6.5 where we defined them to be eigenvectors of Σk−1 . 23 (E.1) 1 1 − xq−1 (c+x)q−1 1 f (x) = xq−1 . Above, inequality ¬ is derived from inequality (q−1)c ≤ − (c+x) q (for every c ≥ 0, x > 0) which follows from the convexity of function Next, we observe that for every U that does not satisfy E<k (U), the very right hand side of (E.1) is still non-negative. Therefore, we conclude that for all U,   −(q−1)  −(q−1)  Tr ck+1 I − ηΣk U · 1E<k (U) − Tr ck I − ηΣk U · 1E<k (U) ≤ −(q − 1)(ck+1 − ck ) .  −(q−1)  Finally, since 1E<(k+1) (U) ≤ 1E<k (U) and Tr ck I − ηΣk U ≥ 0, we have   −(q−1)  −(q−1)  Tr ck+1 I − ηΣk U · 1E<(k+1) (U) − Tr ck I − ηΣk U · 1E<k (U) ≤ −(q − 1)(ck+1 − ck )  and taking expectation we finish the proof of Lemma 6.6. F Proof of Theorem 1: Oblivious Online Eigenvector Theorem 1. In the online eigenvector problem with an oblivious adversary, there exists absolute  1 constant C > 1 such that if q ≥ 3 log(2dT ) and η ∈ 0, 11q3 , then FTCLobl (T, q, η) satisfies T T h i X h i X  4 1/2 1/2 E Ak • Xk UXk ≥ 1 − C · ηq 5 log(dT ) λmax (ΣT ) − . E wk> Ak wk = η k=1 k=1 Proof of Theorem 1. Combining Lemma 6.5 and Lemma 6.6, we have h   i h   i 1−1/q 1−1/q E Tr Xk+1 U · 1E<k+1 (U) − E Tr Xk U · 1E<k (U) h i 1/2 1/2 ≤ −(q − 1)(E[ck+1 ] − E[ck ]) + (q − 1)η(1 + O(ηq 5 log(d/δ))) · E Ak • Xk UXk + (ηT + e)T δ . Telescoping it for all k = 1, . . . , T , we have h   i h   i 1−1/q 1−1/q E Tr XT +1 U · 1E<T +1 (U) − E Tr X1 U · 1E<1 (U) ≤ −(q − 1)(E[cT +1 ] − E[c1 ]) + (q − 1)η(1 + O(ηq 5 log(d/δ))) · E We make four quick observations: (F.1) T hX k=1 1/2 1/2 Ak • Xk UXk i + (ηT + e)T 2 δ .   1−1/q • Regardless of the randomness of U, we have Tr XT +1 U · 1E<T +1 (U) ≥ 0. • Regardless of the randomness of U, we have cT +1 ≥ ηλmax (ΣT ). • We have E[c1 ] ≤ e. To derive that, we use c1q TrU = Tr(X1 U) = 1 which implies c1 = 1 P (TrU)1/q . Notice that TrU = 13 i∈[d],j∈[3] (uj,i )2 so 3TrU is distributed according to chi− 3d − x 3d −1 e 2x 2 . We thus have squared distribution χ2 (3d) whose PDF is p(x) = 2 2Γ(3d/2)   1 Z ∞ 21/q Γ 3d 2 + q 3d 1/q 1/q  E[c1 ] = x p(x)dx = ≤ 21/q · = (3d)1/q ≤ e . 3d 2 Γ 2 0 a Above, the first inequality uses Γ(x+a) Γ(x) ≤ x for a ∈ (0, 1) and x > 0 (cf. Wendell [39]), and the second inequality uses our assumption on q. i h   1−1/q 1−1/q 1 • E Tr X1 U · 1E<1 (U) ≤ e. This is because Tr(X1 U) = q−1 TrU = c1 and E[c1 ] ≤ e. c1 24 Substituting the four observations above into the telescoping sum (F.1), we have 5 (q − 1)ηλmax (ΣT ) ≤ e + (q − 1)e + (q − 1)η(1 + O(ηq log(d/δ))) · E Using the inequality (ηT + e)T 2 δ ≤ (1 + e)T 3 δ, T hX k=1 1/2 1/2 Ak • Xk UXk we conclude that if we choose δ = i 1 −3 , 1+e T + (ηT + e)T 2 δ . then T hX i  1/2 1/2 (q − 1)ηλmax (ΣT ) ≤ (q − 1)η 1 + O(ηq 5 log(dT )) · E Ak • Xk UXk + 4(q − 1) . k=1 1/2 1/2 Dividing both sides by (q − 1)η, and recalling that E[wk wk> ] = Xk UXk , we arrive at the desired inequality.  G Proof of Theorem 2: Adversarial Online Eigenvector Theorem 2. In the online eigenvector problem with an adversarial adversary, there exists constant   1 C > 1 such that for every p ∈ (0, 1), q ≥ 3 log(2dT ) and η ∈ 0, 11q3 , our FTCLadv (T, q, η) satisfies w.p. ≥ 1 − p : T X k=1   5 wk> Ak wk ≥ 1 − C · η q 5 log(dT ) + log(1/p) λmax (ΣT ) − . η Proof of Theorem 2. Before beginning our proof, let us emphasize that in this adversarial setting, • Ak and Σk can depend on the randomness of U1 , . . . , Uk−1 . • Xk and ck depend on the randomness of Uk and Σk−1 (and thus also on U1 , . . . , Uk−2 ). e drawn from distribution D, Consider (for analysis purpose only) another random matrix U independent of the randomness of U1 , . . . , UT . Define cek to be the unique constant satisfying fk = (cek I − ηΣk−1 )−q . cek I − ηΣk−1  0 and Tr((cek I − ηΣk−1 )−q U) = 1, and define X Now, if we fix the randomness of U1 , . . . , Uk−1 , the matrices Σk−1 and Ak become fixed. The e are both drawn from the same distribution D (and the fact that Xk and X fk fact that Uk and U e are computed from Uk and U in the same way) implies i h i h 1/2 1/2 fk 1/2 U eX fk 1/2 U1 , . . . , Uk−1 (G.1) E Ak • Xk Uk Xk U1 , . . . , Uk−1 = E Ak • X Uk e U Now, consider random variables Zk = wk> Ak wk . We have that Zk is Fk -measurable for Fk generated by U1 , ..., Uk , w1 , ..., wk . According to the martingale concentration Lemma G.1, we have " T # T X X log p1 Pr Zk ≤ (1 − µ) E[Zk | Fk−1 ] − ≤p . µ k=1 k=1 At the same time, we have     1/2 1/2 E[Zk | Fk−1 ] = E Ak • wk wk> | U1 , . . . , Uk−1 = E Ak • Xk Uk Xk | U1 , . . . , Uk−1 Uk wk ,Uk   fk 1/2 U eX fk 1/2 | U1 , . . . , Uk−1 , = E Ak • X e U where the last inequality comes from (G.1). In sum, with probability at least 1 − p (over the 25 randomness of U1 , . . . , UT , w1 , . . . , wT ), we have T X wk> Ak wk k=1 ≥ (1 − µ) E e U T hX k=1 i log 1 1/2 1/2 p f e f Ak • Xk UXk . U1 , . . . , UT −1 − µ Applying Theorem 1 we have (more specifically, fixing each possible sequence U1 , . . . , UT , we have a fixed sequence of A1 , . . . , AT and can apply Theorem 1): T X k=1 wk> Ak wk 1  4 log p ≥ (1 − µ) 1 − O(ηq log(dT )) λmax (ΣT ) − − . η µ 5  Choosing µ = η · log(1/p), we finish the proof of Theorem 2. G.1 A Concentration Inequality for Martingales We show the following (simple) martingale concentration lemma that we believe is classical but have not found anywhere else. Lemma G.1 (Concentration). Let {Zt }Tt=1 be a random process with respect to a filter {0, Ω} = F0 ⊂ F1 ⊂ · · · ⊂ FT and each Zt ∈ [0, 1] is Ft -measurable. For every p, µ ∈ (0, 1), " T # T X X log p1 Zt ≤ (1 − µ) E[Zt | Ft−1 ] − ≤p . Pr µ t=1 t=1 We emphasize here that E[Zt | Ft−1 ] is Ft−1 -measurable and thus not a constant. Proof of Lemma G.1. Like in classical concentration proofs, we have hP i PT log p1 T E[Z | F ] − Pr Z ≤ (1 − µ) t t−1 t t=1 t=1 µ hP 1 i log p T = Pr t=1 ((1 − µ) E[Zt | Ft−1 ] − Zt ) ≥ µ i h n P o T 1 = Pr exp µ ((1 − µ) E[Z | F ] − Z ) ≥ t t−1 t t=1 p h n P o i T ≤ p E exp µ . t=1 ((1 − µ) E[Zt | Ft−1 ] − Zt ) (G.2) Denote by Yt = µ(1 − µ) E[Zt | Ft−1 ] − µZt , we know that each Yt ∈ [−1, 1] is Ft -measurable. h nP oi h h nP o ii T T E exp Y = E E exp Y F T −1 t=1 t t=1 t h nP o  i T −1 YT F = E exp Y E e T −1 t=1 t h nP o  i T −1 2 F ≤ E exp Y E 1 + Y + Y . t T T −1 t=1 T Now, we focus on the term YT + YT2 : YT + YT2 ≤ µ(1 − µ) E[ZT | FT −1 ] − µZT + µ2 (1 − µ)2 E[ZT | FT −1 ]2 + µ2 ZT2 ≤ µ(1 − µ) E[ZT | FT −1 ] − µZT + µ2 (E[ZT | FT −1 ] + µZT ) . (The first inequality has used (a − b)2 ≤ a2 + b2 when a, b ≥ 0, and the second has used Zt ∈ [0, 1].) Taking the conditional expectation, we obtain E[YT + YT2 | FT −1 ] ≤ 0 and this implies h nP oi h nP oi T T −1 E exp Y ≤ E exp Y ≤ · · · ≤ e0 = 1 . t t t=1 t=1 Plugging this into (G.2) completes the proof of Lemma G.1. 26  H Proof of Theorem 3: Implementation Details Theorem 3. If q ≥ 3 log(2dT /p), with probability at least 1 − p, for all k ∈ [T ], the k-th iteration e of FTCLobl and FTCLadv runs in O(d) plus the time to solve O(1) linear systems for matrices 1 cI − ηΣk−1 . Here, c > 0 is some constant satisfying cI − ηΣk−1  e I. Resolution to Issue (a). We firstP point out that the final regret blows up by an additive value εe as long as the eigendecomposition 3j=1 pj · yj yj> is computed to satisfy22 3 X 1/2 1/2 Xk uj u> j Xk j=1 − 3 X j=1 pj · yj yj> 2 ≤ εe . poly(d, T )  Moreover, this can be done in time O(d) as long as we can compute the three vectors X1/2 uj j∈[3] −1 ck I − ηΣk−1 to an additive εe/poly(d, T ) error in Euclidean norm. This can be done by applying a number q/2 times to vector uj , each again to an error εe/poly(d, T ). In sum, we can repeatedly apply Lemma H.1 and the final running time only logarithmically depends on εe/poly(d, T ). Resolution to Issue (c). We choose δ = p/T and revisit the event Ek (U) defined in Def. 6.2. According to Lemma 6.3 and union bound, it satisfies with probability at least 1 − p, all the T events E0 (U1 ), . . . , ET −1 (UT ) are satisfied. If we apply Proposition 6.4, we immediately have that 1 (H.1) (ηλmax (Σk−1 ) + e)I  ck I  ck I − ηΣk−1  I . e −1 This implies, throughout the algorithm, whenever we want to compute ck I−ηΣk−1 , the matrix under inversion has a bounded condition number. We have the following lemma which relies on classical results from convex optimization: −1 b 2≤ Lemma H.1. Given any b ∈ Rd , the computation of a ∈ Rd satisfying a − ck I − ηΣk−1 εkbk2 can be done in running time p  e ηλmax (Σk−1 ) + 1 · nnz(Σk−1 ) · log ε−1 if conjugate gradient or accelerated gradient descent • O is used;    √ e nnz(Σk−1 )+ ηk·maxi∈[k−1] nnz(Σk−1 )3/4 nnz(Ai )1/4 log ε−1 if accelerated SVRG is used. • O q ≥ 3 log(2dT /p) =⇒ ∀k ∈ [T ] : def Proof. This inverse operation is the same as minimizing a convex function f (x) = 12 x> ck I − ηΣk−1 x − b> x. The condition number of Hessian matrix ∇2 f (x) is at most O(ηλmax (Σk−1 ) + 1) according to (H.1), so one can apply conjugate gradient [38] or Nesterov’s accelerated gradient descent [29] to minimize this objective. 1 Pk−1 > c I− As for the SVRG type of result, one can write f (x) = k−1 k i=1 fi (x) where fi (x) = x  η(k − 1)Ai x − b> x. Each computation of ∇f (x) requires time O(nnz(Σk−1 )) and that of ∇fi (x) requires time O(nnz(Ai )). Since k∇2 fi (x)k2 ≤ ηk for each i, one can apply the SVRG method [10,  2 e 36] to minimize f (x) which gives running time O nnz(Σk−1 ) + (ηk) maxi∈[k−1] {nnz(Ai )} . Then, using the Catalyst/APPA acceleration scheme [18, 28], the above running time can be improved to √ e nnz(Σk−1 ) + ηk · maxi∈[k−1] {nnz(Σk−1 )3/4 nnz(Ai )1/4 } . O  22 We refrain from doing this precisely here because because MMWU analysis is generally “robust against noise”. 1−1/q The authors of [9] have shown that the potential Tr(Xk ) is robust against noise and a completely analogous (but lengthy) proof of theirs applies to this paper. 27 Resolution to Issue (b). In each iteration, we need to compute some constant ck such that Tr(X1/2 UX1/2 ) = 1. This can be done via a “binary search” procedure which was used widely for shift-and-invert based methods [19]: 1. Begin with c = ηk + e which is a safe upper bound on ck according to (H.1). def 2. Repeatedly compute some value σ e which is a 9/10 approximation of σ = c − ηλmax (Σk−1 ). (This requires O(1) iterations of power method applied to (cI − ηΣk−1 )−1 [19].) 9 (which implies σ ≤ 1e ), we end the procedure; otherwise we update c ← c − σ e/2 3. If σ e ≤ 1e · 10 and go to Step 2. It is a simple exercise (with details given in [19]) to show that when the procedure ends, it satisfies 1 1 2e ≤ c − ηΣk−1 ≤ e so c  is a lower bound on ck . At this point, it suffices to perform a binary search between c, ηk + e to find ck . Note that, according to resolution to issue (a), it suffices to compute ck to an additive error of εe/poly(d, T ). In sum, the above binary search procedure requires only a logarithmic number of oracle calls to 1 (cI − ηΣk−1 )−1 , and each time we do so it satisfies c ≤ ηk + e and (ηk + e)I  cI − ηΣk−1  2e I. For this reason, the same computational complexity in Lemma H.1 applies. The three resolutions above, combined together, imply that the running time statements in Theorem 3 hold. I Proof of Theorem 4: Stochastic Online Eigenvector  p  Theorem 4. There exists C > 1 such that, for every p ∈ (0, 1), if η ∈ 0, p/(75T λmax (B)) in Oja’s algorithm, we have with probability at least 1 − p: PT log(d/p) > . k=1 wk Ak wk ≥ (1 − 2η)T · λmax (B) − C · η Proof of Theorem 4. Let λ and ν be the largest eigenvalue and the corresponding normalized eigenvector of B, and define def ΦM k = (I + ηAk ) · · · (I + ηA1 )M(I + ηA1 ) · · · (I + ηAk ) Ψk = (I + ηAk ) · · · (I + ηAT )νν > (I + ηAT ) · · · (I + ηAk ) . def We first make three calculations:    > uu> uu> uu> 2 uu> Tr(Φuu T ) = Tr (I + ηAT )ΦT −1 (I + ηAT ) = Tr(ΦT −1 ) + 2ηTr AT ΦT −1 + η Tr AT ΦT −1 AT ¬ ­ > > 2 > uu (2η+η ≤ Tr(Φuu T −1 ) · (1 + (2η + η )Tr(AT wT wT )) ≤ Tr(ΦT −1 ) · e > ≤ · · · ≤ Tr(Φuu ) · e(2η+η 0 > 2) PT k=1 wk> Ak wk = kuk22 · e(2η+η > 2) > PT k=1 2 )w > A w T T T wk> Ak wk > . (I.1) > 2 uu uu uu uu > Above, ¬ uses Tr(AT Φuu T −1 AT ) = Tr(AT ΦT −1 ) ≤ Tr(AT ΦT −1 ) as well as ΦT −1 = Tr(ΦT −1 )wT wT , x and ­ uses 1 + x ≤ e .   E[Tr(Ψ1 )] = E Tr νν > (I + ηAT )ΦIT −1 (I + ηAT ) = E[Tr(νν > (I + 2ηAT )ΦIT −1 ) + η 2 ν > AT ΦT −1 AT ν] ¬ ≥ E[Tr(νν > (I + 2ηB)ΦIT −1 ) = (1 + 2ηλ) E[ν > ΦIT −1 ν] ≥ e2ηλ−2η ≥ · · · ≥ e(2ηλ−2η 2 λ2 )T · (ν > ΦI0 ν) = e(2ηλ−2η 28 2 λ2 )T . 2 λ2 E[ν > ΦIT −1 ν] (I.2) 2 Above, ¬ uses 1 + 2x ≥ e2x−2x for x ∈ [0, 1], and the expectation is over A1 , . . . , AT .    ¬   E Tr(Ψ21 ) = E Tr((I + ηA1 )2 Ψ2 (I + ηA1 )2 Ψ2 ) ≤ E Tr((I + ηA1 )4 Ψ22 ) ­    ≤ E Tr (I + (4η + 11η 2 )A1 )Ψ22 = Tr (I + (4η + 11η 2 )B) E[Ψ22 ] ≤ e4ηλ+11η 2λ E[Tr(Ψ22 )] ≤ · · · ≤ 3e(4ηλ+11η 2 λ)T . (I.3) Above, ¬ uses the Lieb-Thirring inequality Tr(ABAB) ≤ Tr(A2 B2 ),23 ­ uses (I + ηA1 )4  I + (4η + 11η 2 )A1 , and the expectation is over A1 , . . . , AT . Now, we can combine (I.2) and (I.3) and apply Chebyshev’s inequality: for every p ∈ (0, 1) q i h 1 2 2 e(4ηλ+11η2 λ)T − (e(2ηλ−2η2 λ2 )T )2 ≤ p/2 . Pr Tr(Ψ1 ) ≤ e(2ηλ−2η λ )T − p A1 ,...,AT p/2 In other words, as long as λη 2 T ≤ p/75, we have with probability ≥ 1 − p/2 over A1 , . . . , AT , p 2 2 2 2 2 (I.4) Tr(Ψ1 ) ≥ e(2ηλ−2η λ )T · (1 − (p/2)−1/2 e15η2 λT − 1) ≥ e(2ηλ−2η λ )T . 3 def Finally, denoting by g = (I+ηA1 ) · · · (I+ηAT )ν, using tail bounds for chi-squared distribution [16], we have with probability at least 1 − p/2 over the randomness of u:24 p kuk22 ≤ d + O( d log(1/p)) ≤ O(d + log(1/p)) and (g > u)2 ≥ Ω(p−2 kgk2 ) . > > > uu > 2 −2 2 −2 Note the the later implies Tr(Φuu T ) ≥ ν ΦT ν = kg uk ≥ Ω(p kgk ) = Ω(p )Tr(Ψ1 ). Plugging them into (I.1) and (I.4), we have with probability at least 1 − p: (2η + η 2 ) T X k=1  wk> Ak wk ≥ 2ηT λ − 2η 2 λ2 T − O log(d + log(1/p)) − O(log(1/p)) , which after dividing both sides by 2η + η 2 finishes the proof of Theorem 4. J  A Simple Lower Bound for the λ-Refined Language We sketch the proof that for the stochastic online eigenvector problem, for every λ ∈ (0, 1), there exists a constant C > 0, a PSD matrix B satisfying B  λI, and a distribution D of (even rank-1) matrices with spectral norm at most 1 and expectation√ equal to B, such that for every learning algorithm Learner, the total regret must be at least C · λT . Such a lower bound naturally translates to the harder adversarial or oblivious settings. We prove this lower bound by reducing the problem to an information-theoretic lower bound that has appeared in our separate paper [8]. The lower bound in [8] states that, for every 1 ≥ λ ≥ λ2 ≥ 0, there exists a PSD matrix B with the largest two eigenvalues being λ and λ2 , and a distribution D of rank-1 matrices with spectral norm at most 1 and expectation equal to D. Furthermore, for any algorithm Alg that takes T samples from D and outputs a unit vector v ∈ Rd , it must satisfy   λ E[1 − hv, ν1 i2 ] ≥ Ω for every T ≥ Ω(λ/(λ − λ2 )2 ) , (λ − λ2 )2 T 23 In fact, we do not need the full power of Lieb-Thirring here because one of the two matrices is rank-1. Chi-square distribution upper tail bound gives Pr[kuk22 ≥ (1 + α) · d] ≤ ((1 + α) · e−α )d/2 for α > 0; choosing α = Θ(d−1/2 log1/2 (1/p)) makes this probability p. The lower tail bound gives Pr[(g > u)2 < α ·kgk2 ] ≤ (α · e1−α )1/2 ≤ √ 2 α for α ∈ [0, 1]. 24 29 where ν1 is the first eigenvector of B, and the expectation is over the randomness of Alg and the T samples from D. After rewriting, we have   λ E[v > Bv] ≤ E[λhv, ν1 i2 + λ2 (1 − hv, ν1 i2 )] = E[λ − (λ − λ2 )(1 − hv, ν1 i2 )] ≤ λ − Ω . (λ − λ2 )T If we choose λ2 such that T = Θ(λ/(λ − λ2 )2 ), then the above inequality becomes p E[v > Bv] ≤ λ − Ω( λ/T ) . Finally, for any algorithm Learner for the stochastic online eigenvector problem, suppose Learner takes T samples A1 , . . . , AT from D and outputs unit vectors v1 , . . . , vT , we can define a corresponding algorithm Alg that outputs v = vk each with probability 1/T . In this way, we have E T X k=1 vk> Ak vk  =E T X k=1 √    vk> Bvk = T E vBv ≤ λT − Ω( λT ) . √ In other words, the total regret of Learner must be at least Ω( λT ). References [1] Jacob Abernethy, Chansoo Lee, Abhinav Sinha, and Ambuj Tewari. Online linear optimization via smoothing. In COLT, pages 807–823, 2014. [2] Jacob Abernethy, Chansoo Lee, and Ambuj Tewari. Spectral smoothing via random matrix perturbations. ArXiv e-prints, abs/1507.03032, 2015. [3] Alekh Agarwal, Akshay Krishnamurthy, John Langford, Haipeng Luo, and Robert E. Schapire. Open problem: First-order regret bounds for contextual bandits. In COLT, 2017. [4] Zeyuan Allen-Zhu. Natasha 2: abs/1708.08694, August 2017. Faster Non-Convex Optimization Than SGD. ArXiv e-prints, [5] Zeyuan Allen-Zhu, Yin Tat Lee, and Lorenzo Orecchia. Using optimization to obtain a widthindependent, parallel, simpler, and faster positive SDP solver. In Proceedings of the 27th ACM-SIAM Symposium on Discrete Algorithms, SODA ’16, 2016. [6] Zeyuan Allen-Zhu and Yuanzhi Li. LazySVD: Even Faster SVD Decomposition Yet Without Agonizing Pain. In NIPS, 2016. Full version available at http://arxiv.org/abs/1607.03463. [7] Zeyuan Allen-Zhu and Yuanzhi Li. Doubly Accelerated Methods for Faster CCA and Generalized Eigendecomposition. In Proceedings of the 34th International Conference on Machine Learning, ICML ’17, 2017. [8] Zeyuan Allen-Zhu and Yuanzhi Li. First Efficient Convergence for Streaming k-PCA: a Global, GapFree, and Near-Optimal Rate. In FOCS, 2017. Full version available at http://arxiv.org/abs/1607. 07837. [9] Zeyuan Allen-Zhu, Zhenyu Liao, and Lorenzo Orecchia. Spectral Sparsification and Regret Minimization Beyond Multiplicative Updates. In Proceedings of the 47th Annual ACM Symposium on Theory of Computing, STOC ’15, 2015. [10] Zeyuan Allen-Zhu and Yang Yuan. Improved SVRG for Non-Strongly-Convex or Sum-of-Non-Convex Objectives. In ICML, 2016. [11] Sanjeev Arora, Elad Hazan, and Satyen Kale. The Multiplicative Weights Update Method: a MetaAlgorithm and Applications. Theory of Computing, 8:121–164, 2012. [12] Sanjeev Arora and Satyen Kale. A combinatorial, primal-dual approach to semidefinite programs. In Proceedings of the thirty-ninth annual ACM symposium on Theory of computing - STOC ’07, page 227, New York, New York, USA, 2007. ACM Press. [13] Christos Boutsidis, Dan Garber, Zohar Karnin, and Edo Liberty. Online principal components analysis. 30 In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 887– 901. SIAM, 2015. [14] James R Bunch and John E Hopcroft. Triangular factorization and inversion by fast matrix multiplication. Mathematics of Computation, 28(125):231–236, 1974. [15] Nicolo Cesa-Bianchi and Gabor Lugosi. Prediction, Learning, and Games. Cambridge University Press, Cambridge, 2006. [16] Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of johnson and lindenstrauss. Random Structures & Algorithms, 22(1):60–65, 2003. [17] Cynthia Dwork, Kunal Talwar, Abhradeep Thakurta, and Li Zhang. Analyze gauss: optimal bounds for privacy-preserving principal component analysis. In STOC, pages 11–20. ACM, 2014. [18] Roy Frostig, Rong Ge, Sham M. Kakade, and Aaron Sidford. Un-regularizing: approximate proximal point and faster stochastic algorithms for empirical risk minimization. In ICML, 2015. [19] Dan Garber and Elad Hazan. Fast and simple PCA via convex optimization. ArXiv e-prints, September 2015. [20] Dan Garber, Elad Hazan, and Tengyu Ma. Online learning of eigenvectors. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 560–568, 2015. [21] Moritz Hardt and Eric Price. The noisy power method: A meta algorithm with applications. In NIPS, pages 2861–2869, 2014. [22] Elad Hazan. private communication, 2016. [23] Prateek Jain, Chi Jin, Sham M. Kakade, Praneeth Netrapalli, and Aaron Sidford. Streaming PCA: Matching Matrix Bernstein and Near-Optimal Finite Sample Guarantees for Oja’s Algorithm. In COLT, 2016. [24] Rahul Jain, Zhengfeng Ji, Sarvagya Upadhyay, and John Watrous. QIP = PSPACE. Journal of the ACM (JACM), 58(6):30, 2011. [25] Zohar Karnin and Edo Liberty. Online pca with spectral bounds. In Proceedings of the 28th Annual Conference on Computational Learning Theory (COLT), pages 505–509, 2015. [26] Wojciech Kotlowski and Manfred K. Warmuth. Pca with gaussian perturbations. ArXiv e-prints, abs/1506.04855, 2015. [27] Yin Tat Lee and He Sun. Constructing linear-sized spectral sparsification in almost-linear time. In FOCS, pages 250–269. IEEE, 2015. [28] Hongzhou Lin, Julien Mairal, and Zaid Harchaoui. A Universal Catalyst for First-Order Optimization. In NIPS, 2015. [29] Yurii Nesterov. Introductory Lectures on Convex Programming Volume: A Basic course, volume I. Kluwer Academic Publishers, 2004. [30] Jiazhong Nie, Wojciech Kotlowski, and Manfred K Warmuth. Online pca with optimal regrets. In International Conference on Algorithmic Learning Theory, pages 98–112. Springer, 2013. [31] Erkki Oja. Simplified neuron model as a principal component analyzer. Journal of mathematical biology, 15(3):267–273, 1982. [32] Lorenzo Orecchia. Fast Approximation Algorithms for Graph Partitioning using Spectral and Semidefinite-Programming Techniques. PhD thesis, EECS Department, University of California, Berkeley, May 2011. [33] Lorenzo Orecchia, Sushant Sachdeva, and Nisheeth K. Vishnoi. Approximating the exponential, the e lanczos method and an O(m)-time spectral algorithm for balanced separator. In STOC ’12. ACM Press, November 2012. [34] Victor Y Pan and Zhao Q Chen. The complexity of the matrix eigenproblem. In Proceedings of the thirty-first annual ACM symposium on Theory of computing, pages 507–516. ACM, 1999. 31 [35] Richard Peng and Kanat Tangwongsan. Faster and simpler width-independent parallel algorithms for positive semidefinite programming. In Proceedinbgs of the 24th ACM symposium on Parallelism in algorithms and architectures - SPAA ’12, page 101, New York, New York, USA, January 2012. [36] Shai Shalev-Shwartz. SDCA without Duality, Regularization, and Individual Convexity. In ICML, 2016. [37] Ohad Shamir. Convergence of stochastic gradient descent for pca. In ICML, 2016. [38] Jonathan Richard Shewchuk. An introduction to the conjugate gradient method without the agonizing pain, 1994. [39] J. G. Wendel. Note on the gamma function. The American Mathematical Monthly, 55(9):563–564, 1948. 32
8cs.DS
arXiv:1003.1572v1 [cs.PL] 8 Mar 2010 Expressiveness and Extensions of an Instruction Sequence Semigroup MSc Thesis (Afstudeerscriptie) written by S.H.P. Schroevers (born February 20, 1985 in Zaandam, The Netherlands) under the supervision of Dr. Alban Ponse, and submitted to the Board of Examiners in partial fulfillment of the requirements for the degree of MSc in Logic at the Universiteit van Amsterdam. Date of the public defense: February 15, 2010 Members of the Thesis Committee: Dr. Inge Bethke Prof. Dr. Peter van Emde Boas Dr. Alban Ponse Prof. Dr. Frank Veltman arXiv:1003.1572v1 [cs.PL] 8 Mar 2010 Abstract PGA, short for ProGram Algebra [PvdZ06, BL02], describes sequential programs as finite or infinite (repeating) sequences of instructions. The semigroup C of finite instruction sequences [BP09a] was introduced as an equally expressive alternative to PGA. PGA instructions are executed from left to right; most C instructions come in a left-to-right as well as a right-to-left flavor. This thesis builds on C by introducing an alternative semigroup Cg which employs label and goto instructions instead of relative jump instructions as control structures. Cg can be translated to C and vice versa (and is thus equally expressive). It is shown that restricting the instruction sets of C and Cg to contain only finitely many distinct jump, goto or label instructions in either or both directions reduces their expressiveness. Instruction sets with an infinite number of these instructions in both directions (not necessarily all such instructions) do not suffer a loss of expressiveness. Contents Contents 3 1 Introduction 5 2 Preliminaries 7 2.1 Basic Thread Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Program Algebra: PGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Finite Instruction Sequences and Code Semigroups . . . . . . . . . . . . . . 12 3 C Instruction Sequences 3.1 The Instruction Set . . . . . . . 3.2 Semantics . . . . . . . . . . . . . 3.3 The Reachability of Instructions 3.4 A Small Variation on C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 17 20 22 23 4 Cg Instruction Sequences 4.1 The Instruction Set . . . . . . . . 4.2 Semantics . . . . . . . . . . . . . . 4.3 Normalizing Label Numbers . . . 4.4 Freeing Label Numbers . . . . . . 4.5 Cg and Relative Jumps . . . . . . 4.6 Label Instructions as More General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jump Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 25 27 29 30 31 33 5 Translating Instruction Sequences 5.1 Translating C to PGA . . . . . . 5.2 Translating PGA to C . . . . . . 5.3 Translating C to Cg . . . . . . . 5.4 Translating Cg to C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 35 36 37 40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Some Expressiveness Results 43 6.1 The Expressiveness of Subsemigroups of C . . . . . . . . . . . . . . . . . . . . 44 6.2 The Expressiveness of Subsemigroups of Cg . . . . . . . . . . . . . . . . . . . 50 7 Discussion 53 7.1 Further Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 7.2 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 A Overview of Defined Translations 55 B Proof by Bergstra & Ponse 57 3 4 Contents B.1 Expressiveness and reduced instruction sets . . . . . . . . . . . . . . . . . . . 57 Bibliography 61 Chapter Introduction Bergstra and Ponse [BP09a] introduce an algebra of finite instruction sequences by presenting a semigroup C in which programs can be represented without directional bias: in terms of the next instruction to be executed, C has both forward and backward instructions and a C-expression can be interpreted starting from any instruction. [BP09a] provides equations for thread extraction, i.e. C’s program semantics, and defines behavioral equivalence. It considers thread extraction compatible (anti-)homomorphisms and (anti-)automorphisms. Lastly, it discusses some expressiveness results. C is a recent alternative to PGA [PvdZ06, BL02], short for ProGram Algebra. Contrary to C, PGA uses infinite instruction sequences to model infinite behavior. Since both PGA and C are tools that aid in the research on imperative sequential programming, and given that any “real world” programs are always finite, C appears to be a more realistic approach to a mathematical representation for sequential programs. This thesis introduces PGA and C and describes their semantics. It then defines an alternative to C called Cg which uses label and goto instructions as control structures, as opposed to C’s relative jump instructions. Behavior preserving mappings are defined between PGA, C and Cg, thereby establishing that they are equally expressive. The final chapter of this thesis investigates the expressiveness of subsemigroups of C and Cg, particularly those from which a finite or infinite number of jump or goto instructions has been removed, thereby improving on an expressiveness result presented in [BP09a]. Lastly, the reader should take note of Appendix A, which provides a graphical representation of some of the (single-pass) instruction sequences defined in this thesis and the mappings between them. 5 1 Chapter Preliminaries In this chapter we introduce the concepts on which the remainder of this thesis builds. In §2.1 basic thread algebra is introduced. This allows us to describe the semantics of instruction sequences. Next, §2.2 and §2.3 introduce two different takes on the way in which instruction sequences can be represented: on the one hand there is PGA which describes finite or infinite single-pass instruction sequences; on the other hand we can take the (arguably more natural) stance that all instruction sequences must be finite while allowing instructions to be executed multiple times. It is the latter theory which describes instruction sequence semigroups, two concrete instances of which will be introduced in the following chapters as C and Cg. 2.1 Basic Thread Algebra Basic thread algebra, BTA for short, is a means to describe the behavior of sequential programs upon execution. BTA takes the position that program execution consists of a sequence of basic actions which are performed inside some execution environment. It is assumed that a fixed but arbitrary set of basic actions A is specified; this parameter is often kept implicit. Upon execution of an action the execution environment yields a boolean reply, the value of which specifies how execution should proceed. In this section we will briefly introduce basic thread algebra. For more on this subject we refer to [PvdZ06, BP09a, BL02]1 . BTA expressions are called threads. The set of all threads is denoted BTA. For any set A, threads are built using two constants and a single ternary operator: • The deadlock constant D : BTA. • The termination constant S : BTA. • The postconditional composition operator E D : BTA × A × BTA → BTA. It follows that each closed BTA expression performs finitely many actions and then terminates or becomes inactive (in the case of deadlock). For P ∈ BTA and a ∈ A, the thread P E a D P is often more conveniently denoted a ◦ P . The action prefix operator ◦ can be used only if the boolean reply returned after execution of a does not influence further behavior. Action prefix binds stronger than postconditional composition. Additionally, for all n ≥ 1 we will define an ◦ P to mean the thread which performs n a-actions, followed by the behavior described by the thread P . That is, a1 ◦ P = a ◦ P and an+1 ◦ P = a ◦ (an ◦ P ). 1 In [BL02] BTA is called BPPA. 7 2 8 Chapter 2. Preliminaries The approximation operator π : N × BTA → BTA returns the behavior of a given thread up to a specified “depth”2 , i.e., it bounds the number of actions performed. For all P, Q ∈ BTA and a ∈ A we define, π(0, P ) = D π(n + 1, S) = S π(n + 1, D) = D π(n + 1, P E a D Q) = π(n, P ) E a D π(n, Q) From now on we will write πn (P ) instead of π(n, P ) for brevity. Since every BTA thread is finite, it follows that for every P ∈ BTA there exists some n ∈ N such that for all m ∈ N, πn (P ) = πn+m (P ) = P. The inclusion relation on threads in BTA is the partial ordering generated by the following two clauses: • For all P ∈ BTA, D ⊑ P . • For all P, P ′ , Q, Q′ ∈ BTA and a ∈ A, if P ⊑ P ′ and Q ⊑ Q′ then P E a D Q ⊑ P ′ E a D Q′ . BTA has a completion BTA∞ which also comprises the infinite threads. BTA∞ is the cpo consisting of all projective sequences. We define, BTA∞ = {(Pn )n∈N | ∀n ∈ N(Pn ∈ BTA ∧ πn (Pn+1 ) = Pn )}. Now (Pn )n∈N = (Qn )n∈N if Pn = Qn for all n ∈ N. Furthermore we overload notation and define, D = (D, D, . . . ), S = (D, S, S, . . . ), (Pn )n∈N E a D (Qn )n∈N = (Rn )n∈N , with ( R0 = D, Rn+1 = Pn E a D Qn . This definition also shows how all elements of BTA have a counterpart in BTA∞ . The projective sequence corresponding to a thread P ∈ BTA is (πn (P ))n∈N . The set res(P ) of residual threads of P has the following inductive definition: P ∈ res(P ), Q E a D R ∈ res(P ) =⇒ Q ∈ res(P ) ∧ R ∈ res(P ). (2.1) Depending on the execution environment a residual thread may be “reached” by performing zero or more actions. A thread P is regular if res(P ) is finite. Regular threads are also called finite state threads. Every element of res(P ) is a state. We write BTAreg ⊂ BTA∞ for the set of regular threads. A finite linear recursive specification over BTA∞ is a set of equations xi = ti for i ∈ I with I a finite index set, variables xi and all ti terms of the form S, D or xi E a D xj with j, k ∈ I and a ∈ A. P ∈ BTAreg iff P is the solution of a finite recursive specification (see Theorem 1 of [BP09a]). 2 In this thesis we will use the convention that N is the set of all natural numbers, including 0. N+ = N − {0}. The integers are denoted Z. 9 2.2. Program Algebra: PGA 2.2 Program Algebra: PGA A program can be viewed as a single-pass instruction sequence. That is, a program is a finite or infinite sequence of instructions which is executed from left to right such that every individual instruction is executed at most once—it is either executed or skipped. Singlepass instruction sequences are the main concept underlying PGA [PvdZ06, BL02]. Given an (implicit) set A of actions, PGA terms are constructed by concatenating instructions from the set I, defined as, [ [ I= {a, +a, −a} ∪ {#k} ∪ {!}. a∈A k∈N The instructions in I are called primitive instructions. Let us informally define their behavior (note that a ∈ A and k ∈ N): a is a basic instruction. It instructs the execution environment to perform action a. The boolean reply returned by the environment is disregarded. +a is a positive test instruction. Like a, it instructs execution of action a. However, only if the execution environment returns true will the instruction to its immediate right be executed. Otherwise this instruction is skipped and execution proceeds at the next instruction. −a is a negative test instruction. This is the dual of the positive test instruction, in the sense that it skips the next instruction iff the environment returns true after performing action a. #k is a forward jump instruction. This instruction transfers execution to the kth instruction to its right (i.e., k − 1 instructions are skipped). Note that #0 instructs the indefinite repetition of this instruction. Hence the behavior of #0 is identified with deadlock. ! is the termination instruction. It causes successful termination of the program. The set of PGA terms is denoted P . PGA terms are constructed from primitive instructions using the binary concatenation operator ; and the unary repetition operator ω . That is, P is the smallest superset of I that is closed under concatenation and repetition. Thus, for all X, Y ∈ P , also X; Y ∈ P and X ω ∈ P . Examples of PGA terms include: a, 2.2.1 (#3; a; b)ω , +b; #3, −c; −c; (−a)ω . (2.2) First Canonical Form We define X 1 = X and X n+1 = X; X n, for all n ∈ N. Using this notation, PGA defines the following four axioms for all X, Y, Z ∈ P : (X; Y ); Z = X; (Y ; Z) n ω ω (X ) = X X ω; Y = X ω (X; Y )ω = X; (Y ; X)ω (PGA1) (PGA2) (PGA3) (PGA4) These four axioms define instruction sequence congruence. Instruction sequence congruent PGA expressions execute exactly the same instructions and are thus behaviorally equivalent. In the remainder of this thesis instruction sequence congruent PGA terms are identified. (PGA1) states that concatenation is associative. Using (PGA2) and (PGA4) we derive that X ω = X; X ω for all X ∈ P . Furthermore, using (PGA1)–(PGA4) every PGA term can be rewritten to one of the following two forms: 10 Chapter 2. Preliminaries 1. X, where X does not contain the repetition operator, or 2. X; Y ω , with X and Y not containing the repetition operator. Any PGA term in one of these two forms is said to be in first canonical form. The set P 1 ⊂ P contains exactly those PGA terms which are in first canonical form. The function fst : P → P 1 converts any given PGA term to a first canonical form. Let X1 , X2 , Y1 , Y2 ∈ P , such that X1 and X2 do not contain repetition. Then fst can be defined such that, fst(Y1ω ) = fst(Y1 ; Y1ω ) fst(Y1ω ; Y2 ) = fst(Y1ω ) fst(X1 ) = X1 fst(X1 ; X2ω ) = X1 ; X2ω fst(X1 ; Y1ω ; Y2 ) = fst(X1 ; Y1ω ) It is not hard to see that fst is total and makes use only of (PGA1)–(PGA4). 2.2.2 Second Canonical Form Another congruence relation defined on PGA terms is structural congruence. It is defined using the following four axioms which are concerned with chained jump instructions in PGA terms in first canonical form: #n+1; u1 ; . . . ; un ; #0 = #0; u1 ; . . . ; un ; #0, #n+1; u1 ; . . . ; un ; #m = #n+m+1; u1 ; . . . ; un ; #m, (#k+n+1; u1 ; . . . ; un )ω = (#k; u1 ; . . . ; un )ω , (PGA5) (PGA6) (PGA7) and, #n+m+k+2; u1 ; . . . ; un ; (v1 ; . . . ; vm+1 )ω = #n+k+1; u1 ; . . . ; un ; (v1 ; . . . ; vm+1 )ω . (PGA8) Using (PGA1)–(PGA8) every PGA term in first canonical form can be rewritten to a structurally congruent PGA term without chained jump instructions (this also implies that the jump counter of jump instructions into and inside the repeating part of a PGA term is minimal). Such a term is said to be in second canonical form. As with first canonical forms, second canonical forms are not unique. However, any second canonical form X; Y ω can be converted to an equivalent second canonical form X ′ ; Y ′ω where X ′ and Y ′ are minimal. Then X ′ ; Y ′ω is unique. The set P 2 ⊂ P 1 contains exactly those PGA terms which are in second canonical form. The function snd : P → P 2 converts any PGA term to its minimal second canonical form. We do not provide an implementation here. 2.2.3 The Semantics of PGA Every PGA term X ∈ P has uniquely defined behavior, in the form of some thread T ∈ BTAreg . The thread extraction operator | |PGA : P → BTAreg yields this thread, for every PGA term. It is defined as,   if X ∈ {a, +a, −a}, a ◦ D    if X = a; Y , a ◦ |Y |PGA    |Y | E a D |#2; Y | if X = +a; Y ,  PGA PGA   |#2; Y | if X = −a; Y , PGA E a D |Y |PGA |X|PGA = (2.3)  |Y | if X = #1; Y ,  PGA     if X = #k+2; u; Y , |#k+1; X|PGA    if X ∈ {#k, #0; Y, #k+2; u}, D    S if X ∈ {!, !; Y }, 11 2.2. Program Algebra: PGA Note that this definition does not explicitly mention the repetition operator. Instead it uses the notion that X is “unfolded” when needed—by means of (PGA4) and possibly (PGA2). Thread extraction on PGA terms requires one additional rule: If the equations in (2.3) can be applied infinitely often from left to right without ever yielding an action, then the extracted thread is D. (2.4) Observe that (2.4) is only relevant for PGA terms which contain an infinite sequence of chained jump instructions. As such it is not applicable to second canonical forms. Examples of (2.2). Let us apply the thread extraction operator | |PGA to the example PGA terms • The behavior of the term a can be derived in a single step according to (2.3): |a|PGA = a ◦ D. • +b; #3 appears to be a more complicated example, but its behavior turns out to be equally simple: |+b; #3|PGA = |#3|PGA E b D |#2; #3|PGA = D E b D D = b ◦ D. • It turns out that the single pass instruction sequence (#3; a; b)ω does not perform any action, despite its infinite length: |(#3; a; b)ω |PGA = |(#0; a; b)ω |PGA = |#0; (a; b; #0)ω |PGA = D. Observe that the first step of this derivation applies (PGA7), followed by an application of (PGA4). • Lastly, −c; −c; (−a)ω produces infinite behavior. To determine its exact behavior, we start out with a couple of left-to-right applications of (2.3): |−c; −c; (−a)ω |PGA = |#2; −c; (−a)ω |PGA E c D |−c; (−a)ω |PGA = |(−a)ω |PGA E c D (|#2; (−a)ω |PGA E c D |(−a)ω |PGA ) = |(−a)ω |PGA E c D (|#2; −a; (−a)ω |PGA E c D |(−a)ω |PGA ) = |(−a)ω |PGA E c D (|(−a)ω |PGA E c D |(−a)ω |PGA ) = |(−a)ω |PGA E c D c ◦ |(−a)ω |PGA . At this stage the behavior of −c; −c; (−a)ω has not been fully derived, as the thread corresponding to (−a)ω still needs to be determined. This thread turns out to be infinite: |(−a)ω |PGA = |−a; (−a)ω |PGA = |#2; (−a)ω |PGA E a D |(−a)ω |PGA = |#2; −a; (−a)ω |PGA E a D |(−a)ω |PGA = |(−a)ω |PGA E a D |(−a)ω |PGA = a ◦ |(−a)ω |PGA . It follows that |(−a)ω |PGA can be described by the recursive specification Q = a ◦ Q. Now, equating |−c; −c; (−a)ω |PGA with P , we see that the behavior of −c; −c; (−a)ω is equals P1 , as described by the following linear recursive specification: P1 = P3 E c D P2 , P2 = P3 E c D P3 , P3 = P3 E a D P3 . (A shorter notation would be P = Q E c D c ◦ Q, Q = a ◦ Q.) 12 Chapter 2. Preliminaries Proposition 2.1. Each thread definable in PGA is regular, and each regular thread can be expressed in PGA. Proof. See e.g. Proposition 2 in [PvdZ06]. Alternatively, the result follows from the following two observations: • The code semigroup C introduced in Chapter 3 characterizes the regular threads (see Proposition 3.1). • There exist total behavior preserving mappings from PGA to C and vice versa (see §5.2 and §5.1, respectively). 2.3 Finite Instruction Sequences and Code Semigroups In PGA each instruction is executed at most once and the repetition operator ω is used to construct infinite sequences of instructions. The instruction sequence semigroups introduced in the following chapters, on the other hand, represent only finite instruction sequences in which instructions can be executed multiple times in any order. This section introduces some relevant notions and terminology in preparation of the introduction of concrete code semigroups in Chapter 3 and Chapter 4. 2.3.1 Finite Instruction Sequences Consider a non-empty instruction set I and an associative binary operation ; on I. We will call ; the concatenation operator. Instructions can be concatenated, thereby yielding finite instruction sequences (inseqs) of arbitrary length. For all n ∈ N+ , let I 1 = I, I n+1 = {X; u | X ∈ I n , u ∈ I 1 }. Then I n is the set of instruction sequences of length n. We define [ I+ = In. n∈N+ I + contains all finite, non-empty (length greater than zero) sequences of I-instructions. X is an I-inseq iff X ∈ I + . An I-inseq will also be called an I-expression. We call ℓ : I + → N+ the length function, and it is defined such that ℓ(X) = n iff X ∈ I n . Concatenation is an associative operation, thus (X; Y ); Z = X; (Y ; Z) for arbitrary X, Y, Z ∈ I + . Parentheses will therefore usually be omitted, and we write X; Y ; Z. Note also, that it trivially follows that for arbitrary n, m ≥ 1, I n+m = {X; Y | X ∈ I n , Y ∈ I m }. For convenience, we will write I ≤n for the set of all I-expressions up to length n. Likewise I ≥n contains all I-expressions of length n or greater. That is, I ≤n = {X ∈ I + | ℓ(X) ≤ n}, I ≥n = {X ∈ I + | ℓ(X) ≥ n}. For all i ∈ N+ , we define auxiliary functions σi : I ≥i → I which return the ith instruction in a given I-inseq. That is, if X = u1 ; u2 ; . . . ; un , then σi (X) = ui for all 1 ≤ i ≤ n. We define i =X j iff σi (X) = σj (X). Clearly =X is an equivalence relation. Next, for all X ∈ I + and U ⊆ I we define U (X) = {i | σi (X) ∈ U }. In other words, U (X) contains the positions in the I-inseq X of instructions contained in U . It will sometimes prove convenient to regard an inseq X as a set whose elements are the distinct instructions contained in X. So for any X ∈ I + we write u ∈ X to indicate that σi (X) = u for some i. X ∩ S and X ∪ S are defined as one would expect them to be (note that S can be a set or another inseq). 2.3. Finite Instruction Sequences and Code Semigroups 13 About Notation Let X ∈ I + be an instruction sequence. Throughout this thesis we will write X k for k concatenations of X. That is, X 1 = X, X n+1 = X; X n. What about X 0 ? Our definition of an instruction sequence explicitly excludes the empty sequence: an I-expression will always contain at least one instruction. Still, within some contexts it will prove convenient to talk about X k for any k ∈ N. Throughout this thesis we will only write X 0 as part of sequences which, as a whole, are guaranteed to be non-empty, and are as such contained in I + (i.e., the set of proper instruction sequences). 2.3.2 Code Semigroups Given some instruction set I, every inseq X ∈ I + is constructed by concatenation of a finite number of elements in I. Hence I generates I + , denoted <I> = I + . I + is closed under the associative binary operation ; and as such I + is a semigroup with respect to ; . Clearly every instruction set I gives rise to a semigroup (<I>, ; ). We will call such a semigroup an instruction sequence semigroup or simply code semigroup. For an introduction to semigroup theory we refer to [CP61]. About Notation Let B refer to some code semigroup. Then we write IB for the instruc+ n tion set of B. IB denotes the IB -inseqs of length n, and IB contains all IB -expressions. + Hence we write B = (IB , ; ). When no confusion can arise, IB -instructions and IB -inseqs may simply be referred to as B-instructions and B-inseqs (B-expressions), respectively. + Whenever B is referred to as a set instead of a semigroup, it is identified with IB . That is, + B stands for all well-formed B-expressions. Likewise IB may be referred to as a semigroup, in which case it is identified with B. Subsemigroups Let A and B be two semigroups with respect to some operator •, such that A ⊆ B. Then A is a subsemigroup of B. Equivalently, if (B, •) is a semigroup and A ⊆ B such that a, b ∈ A implies a • b ∈ A, then A is a subsemigroup of B. Note that the intersection of any subsemigroups of B is either empty or itself a subsemigroup of B.3 Given an instruction set I we can take a subset of these instructions, I ′ ⊆ I. Observe that the semigroup <I ′ > is a strict subsemigroup of <I>. We will define plenty of such subsemigroups later in this thesis. Semigroup Homomorphisms Consider two code semigroups A and B, and a function + + f : IA → IB . Then f is a mapping between instruction sequences. A significant part of this thesis describes mappings between distinct code semigroups. Most of these mappings are homomorphisms. In general, a function f : A → B is a homomorphism between semigroups (A, •) and (B, ∗) iff f (x • y) = f (x) ∗ f (y), for all x, y ∈ A. It is easy to see that f only needs to be defined explicitly on elements of A’s generating set. If <G> = A, then for all a ∈ A − G it is the case that a = g0 • g1 • · · · • gn+1 , for some n ∈ N and g0 , g1 , . . . , gn+1 ∈ G, and hence f (a) = f (g0 ) ∗ f (g1 ) ∗ · · · ∗ f (gn+1 ) by definition. In the specific case of code semigroups this implies that a homomorphic function only needs to be defined explicitly on individual instructions. 2.3.3 Instruction Sequence Semantics It is the ability to be executed that sets instruction sequences apart from sequences of arbitrary mathematical objects. Execution of an instruction sequence leads to (possibly 3 We will not consider the empty semigroup. 14 Chapter 2. Preliminaries unobservable) behavior. Thus, for a sequence of objects to be called an instruction sequence, it must be ascribed a semantics, such that its behavior upon execution is defined. This thesis will use basic thread algebra to that end. This allows us to define the semantics of the semigroup C as in [BP09a] and provides an easy way to compare the code semigroups introduced in this thesis to PGA on a syntactical as well as a semantic level. In the tradition of PGA instructions are viewed as atomic program components: at any stage during the execution of a program at most one instruction is “active” (i.e., being executed).4 We will define the behavior of individual instructions based on their position i within an instruction sequence X. Execution of an individual instruction may or may not cause an action to be performed, after which control of execution is transferred to another position in X. Then, given the position of the first instruction to be executed, the semantics of the instruction sequence as a whole follows naturally. The first instruction to be executed is called the initial or start instruction. The leftmost and rightmost instruction of an inseq are obvious candidates to be designated as such, but given a specific instruction sequence X, execution can start at any position within X. Thus for all X ∈ I + and 1 ≤ i ≤ ℓ(X), the pair (i, X) can be identified with a certain thread, namely the thread which represents the behavior resulting from the execution of X starting with the ith instruction. Though not strictly necessary, for any invalid instruction position i (i.e. i < 1 or i > ℓ(X)) the pair (i, X) will be identified with some default thread D. Once D has been fixed, every pair (i, X) ∈ Z × I + is identified with a certain thread T . Throughout this thesis we will consider only one value for D, namely D, i.e. deadlock. In this way the thread extraction operator | , | : Z × I + → BTA∞ specifies the semantics i of a semigroup I + . For convenience we will usually write |X| instead of |i, X|, but this is + merely a notational matter. For any X ∈ I , the thread describing the behavior of X if → executed starting from the leftmost instruction is called its left behavior, written |X| = 1 ← ℓ(X) |X| . Likewise |X| = |X| is called the right behavior of X, meaning the behavior of X if executed starting from the rightmost instruction. Once specific code semigroups have been defined—along with suitable thread extraction operators—it becomes possible to analyze their expressiveness. Given equally expressive code semigroups A and B one can define mappings between them, such that the behavior of any inseq X in the domain is in some way reflected by the behavior of the corresponding inseq Y to which it is mapped in the codomain. Similar mappings can also be defined from a semigroup A onto itself. Definition 2.2. Let A and B be two code semigroups on which the thread extraction + + operators | , |A : Z × IA → BTA∞ and | , |B : Z × IB → BTA∞ are defined, respectively. + + + + Consider arbitrary X ∈ IA and Y ∈ P and three mappings f : IA → IB , g : IA → P and + h : P → IA . Then, → → • f is left behavior preserving if |X|A = |f (X)|B . ← • f is right behavior preserving if |X|← A = |f (X)|B . • f is left-right behavior preserving if it is both left and right behavior preserving. • f is behavior preserving if it is left or right behavior preserving. i • f is left uniformly behavior preserving if there exists some b ∈ N+ such that |X|A = b(i−1)+1 |f (X)|B for all i ∈ Z. Observe that every left uniformly behavior preserving mapping is left behavior preserving. 4 One could draw a parallel with the program counter as found in central processing units (CPUs), which holds the memory address of the instruction that is currently executed (or the instruction which is to be executed next, depending on the architecture). 15 2.3. Finite Instruction Sequences and Code Semigroups i • f is right uniformly behavior preserving if there exists some b ∈ N+ such that |X|A = bi |f (X)|B for all i ∈ Z. Observe that every right uniformly behavior preserving mapping is right behavior preserving. • f is left-right uniformly behavior preserving if it is both left and right uniformly behavior preserving. • f is uniformly behavior preserving if it is left or right uniformly behavior preserving. → • g is behavior preserving if |X|A = |g(X)|PGA . → • h is behavior preserving if |Y |PGA = |h(Y )|A .5 A behavior preserving mapping will also be called a translation because it preserves the meaning of the original (single pass) instruction sequence. This concludes the preliminaries. We are now ready to introduce the code semigroup C in the next chapter. 5A more general definition would be that h is behavior preserving if there exists a function t : P → Z t(Y ) such that |Y |PGA = |h(Y )|A , but this definition suffices for our purposes. Chapter C Instruction Sequences The previous chapter introduced PGA as a means to describe programs and BTA as a means to describe their behavior. It then introduced an alternative representation of program objects, namely strictly finite instruction sequences, as opposed to PGA’s infinite single-pass instruction sequences. Upon specifying an instruction set I the set of finite instruction sequences generated by concatenating elements of I forms a semigroup. This chapter introduces one such semigroup and its semantics. C was first described in [BP09a]. C is a code semigroup without directional bias: execution of a C-inseq can start at the leftmost instruction (the natural choice for most people in Western society), but may just as well start at the rightmost instruction. In fact, given some instruction sequence X, any position within X can be designated as starting position. This chapter is built up as follows: §3.1 will introduce C’s instruction set and provide some basic examples of C-expressions. It will also motivate the inclusion in the instruction set of an instruction which upon execution will cause deadlock. Next, §3.2 formalizes the semantics of C-expressions using thread algebra. Based on this, §3.3 introduces some accessibility relations on instruction positions which will be used throughout this thesis. Lastly, §3.4 briefly discusses a small syntactic and semantic variation on C. 3.1 The Instruction Set Given a set A of actions, C defines basic instructions B, positive test instructions P, negative test instructions N and relative jumps J: [ [ B= {/a, \a}, J= {/#k, \#k}, a∈A P= [ k∈N+ {+/a, +\a}, N= a∈A [ {−/a, −\a}. a∈A A is a parameter to C which is often kept implicit. Additionally, C has an abort instruction # and termination instruction !. Instructions with a backward slash are called left oriented or backward instructions; those with a forward slash are called right oriented or forward instructions. Instructions with a left (right) orientation are also said to have a left (right) + + directionality. Formally, C = (IC , ; ), with the set of all C-expressions IC generated by C’s instruction set IC , defined as IC = B ∪ P ∪ N ∪ J ∪ {#, !}. Let a, b, c ∈ A. Then examples of C-expressions are /a, /a; +/a; !; \#3, +/b; −/c; −\c, \#2; −\c. (3.1) Each C-inseq has a semantics. Before we formalize this, it will prove convenient to informally describe the meaning of some of the instructions: 17 3 18 Chapter 3. C Instruction Sequences /a is a forward basic instruction. It causes execution of the action a, after which the instruction to its right is executed, if it exists. Otherwise deadlock occurs. Note that the boolean reply resulting from a’s execution is ignored. +/a is a forward positive test instruction. Action a is executed. If its boolean reply is true, then the instruction immediately to its right is executed. On false, however, this instruction is skipped, and execution proceeds at the second instruction to its right. If no such instruction exists, deadlock follows. −/a is a forward negative test instruction. −/a mirrors the behavior of +/a, in the sense that the effect of the replies true and false is reversed. /#k is a forward jump instruction. It causes execution of the instruction k positions to its right, if such instruction exists. Otherwise deadlock will follow. # is the abort instruction. Execution of this instruction causes deadlock. ! is the termination instruction. It causes the program to halt successfully. The instructions \a, +\a, −\a and \#k are the backward versions of /a, +/a, −/a and /#k, respectively, in the sense that they have a right-to-left instead of a left-to-right orientation. For example, execution of \a results in action a, after which the instruction to its left is executed (if such instruction exists). A jump instruction /#k or \#k has jump counter k and performs a jump of distance k instructions. /#k or \#k are said to be relative jumps. The function δ : J → N+ returns the jump counter of a given jump instruction (e.g. δ(/#6) = 6). → ← We define IC ⊂ IC to be the set forward instructions. Likewise, IC ⊂ IC denotes the 1 set of backward instructions. Formally: → IC = ← IC = [ {/a, +/a, −/a} ∪ [ a∈A k∈N+ [ [ {\a, +\a, −\a} ∪ a∈A {/#k}, {\#k}. k∈N+ → ← The sets B→ = B ∩ IC and B← = B ∩ IC denote the forward and backward oriented basic instructions, respectively. Likewise for P, N and J. Note that with the exception of the abort instruction # and the termination instruction !, every C-instruction has a → ← direction, which is either forward or backward, but not both. That is, IC ∩ IC = ∅ and → ← IC ∪ IC ∪ {#, !} = IC . We write u ∼ v if instructions u and v have the same direction (or no direction). ∼ ⊂ IC × IC is the directionality relation. It is clearly an equivalence relation. Examples These informal definitions of the meaning of each instruction allow us to verbally describe the meaning of the example C-expressions of (3.1), provided that we agree upon which instruction is the first to be executed. Since this thesis is written in English, which has an obvious left-to-right bias, we will designate the leftmost instruction to be the initial instruction. Thus we will informally describe these inseq’s left behavior. • /a: Performs action a, after which deadlock occurs. • /a; +/a; !; \#3: Performs action a twice in a row. If the second action yields a positive reply, then the program terminates. Otherwise it starts all over. 1 Note, → and I ← ). again, that the set A of actions is an implicit parameter for C (and thereby for IC , IC C 19 3.1. The Instruction Set • +/b; −/c; −\c: Performs action b. If this yields the reply true, then action c will be performed, as specified by the second instruction. Here, a positive reply causes deadlock and a negative reply causes the third instruction to be executed. If the action b yields false then the third instruction will also be executed. The action c as performed by the third instruction causes execution to continue at either the first or second instruction, depending on whether it yields is a positive or negative reply, respectively.2 • \#2; −\c: Does not perform any action. Execution of this program immediately causes deadlock, since the first instruction jumps outside of the inseq. 3.1.1 The Case for an Explicit Abort Instruction A draft version of the original paper on C [BP09b] provided a definition of the semigroup C which differs slightly from the one that was published in [BP09a] (which is introduced in the previous section). Let us refer to the semigroup as it was introduced in [BP09b] by the name C ′ . The instruction set IC ′ did not contain an explicit abort instruction. It did however contain two other instructions which C lacks: /#0 and \#0, both of which signify a jump + of distance zero3 . That is, C ′ = (IC ′ , ; ), with IC ′ = {/#0, \#0} ∪ IC − {#}. Since /#0 and \#0 are under all circumstances behaviorally indistinguishable, C ′ had an extra axiom (aside from the obvious axiom which states that concatenation is associative) which stated that no distinction is made between forward and backward jumps of distance 0: /#0 = \#0. A jump of distance 0 is not really a jump at all and it is rather meaningless to talk about the direction of such a jump. Semantically both /#0 and \#0 signify deadlock. Moreover, the introduction of two distinct but equivalent instructions allows for the definition of a + mapping f on IC ′ such that X = Y while f (X) 6= f (Y ). It was therefore argued that C ′ should only contain jumps /#k and \#k for k > 0, together with a single non-directional abort instruction #, thereby eliminating the need for the axiom /#0 = \#0 while retaining a single instruction with essentially the same behavior as /#0 and \#0. This chain of reasoning naturally lead to the definition of an alternative semigroup, the one introduced in [BP09a] and the previous section under the name C.4 Execution of the abort instruction has the same effect as an attempt to transfer execution to a non-existing instruction. Since every instruction sequence is finite, one can take any + inseq X ∈ IC and construct a behaviorally equivalent inseq X ′ by replacing every abort instruction with a jump to a position < 1 or > ℓ(X). Hence # does not increase C’s expressiveness. Still, as we will later see, the abort instruction is a convenient addition to the instruction set. 2 Compare the length of this description to that of the actual program, and it becomes apparent that natural language is not really suited to produce concise descriptions of program behavior. There is also the problem of the inherent ambiguity of natural language. Luckily basic thread algebra provides a concise and unambiguous alternative! 3 The existence of these instructions was probably inspired by the #0 instruction as found in PGA. 4 The introduction of the instruction # is not really a first. A similar instruction can be found in [BL00], where it is introduced as part of PGA. It must be noted though, that [BL00] ascribes a different semantics to #, namely meaningless behavior, than to #0, which produces divergent behavior. The latter notion coincides with what is referred to in this thesis as deadlock (D in basic thread algebra). BTA does not provide a constant to represent meaningless behavior. As mentioned in a footnote in [BL02], # was later dropped and should in hindsight be seen as an abbreviation for #0. 20 Chapter 3. C Instruction Sequences + + + + For completeness, we define two homomorphisms f : IC ′ → IC and g : IC → IC ′ which make the correspondence between C ′ and C explicit. They are defined on individual instructions u as follows: ( ( # if u ∈ {/#0, \#0}, /#0 if u = #, f (u) = g(u) = u otherwise, u otherwise. Now clearly f ◦ g is the identity function on C-expressions. The axiom /#0 = \#0 ensures that likewise g ◦ f is an identity function on C ′ -expressions. 3.2 Semantics As discussed in §2.3.3, C’s semantics are defined using basic thread algebra. Thus any + combination of start position i and inseq X ∈ IC is assigned some thread |i, X|C . Writing i + → BTAreg is defined on all |X|C for |i, X|C , the thread extraction operator | , |C : Z × IC + i ∈ Z and X ∈ IC as,   D    i+1   a ◦ |X|C    i+1 i+2   |X|C E a D |X|C    i+2 i+1  |X|C E a D |X|C     i+k  |X|   C i |X|C = a ◦ |X|i−1 C   i−1 i−2   |X|  C E a D |X|C   i−2 i−1   |X|C E a D |X|C   i−k  |X|C       D    S if i < 1 or i > ℓ(X), if if if if σi (X) = /a, σi (X) = +/a, σi (X) = −/a, σi (X) = /#k, if if if if σi (X) = \a, σi (X) = +\a, σi (X) = −\a, σi (X) = \#k, (3.2) if σi (X) = #, if σi (X) = !. i In words, the thread |X|C describes the behavior resulting from the execution of the inseq ℓ(X) → 1 ← X starting at the ith instruction. Recall that we defined |X|C = |X|C and |X|C = |X|C to mean X’s left and right behavior, respectively. Examples We will apply thread extraction on the instruction sequences of (3.1) to determine their left as well as right behavior. • The C-expression /a consists of a single instruction, and as such its left and right behavior are equivalent: 1 |/a|→ C = |/a|C = a ◦ D, ℓ(/a) |/a|← C = |/a|C = |/a|1C = a ◦ D. • Let X = /a; +/a; !; \#3. The left behavior of this instruction sequence is infinite, as we have seen in §3.1. This is confirmed by several applications of equations in (3.2): → 1 2 3 4 1 |X|C = |X|C = a ◦ |X|C = a ◦ (|X|C E a D |X|C ) = a ◦ (S E a D |X|C ). Observe that |X|→ C is recursively defined by the equation P = a ◦ (S E a D P ). As for ℓ(X) the right behavior of X, we observe that |X|← = |X|4C = |X|1C = |X|→ C = |X|C C. 21 3.2. Semantics • Let X = +/b; −/c; −\c. Upon trying to extract its behavior, we see that → 1 |X|C = |X|C 3 2 = |X|C E b D |X|C = (|X|4C E c D |X|3C ) E b D (|X|1C E c D |X|2C ) 1 2 1 2 = (D E c D (|X|C E c D |X|C )) E b D (|X|C E c D |X|C ). The behavior is clearly infinite, and no single recursive equation can describe it. The following linear recursive specification does: P1 = P2 E b D P3 , P2 = P4 E c D P3 , P3 = P1 E c D P2 , P4 = D. ← Now |X|→ C = P1 and |X|C = P3 . ← → • Let X = \#2; −\c. Then |X|C = D and |X|C = c ◦ D, because 1 −1 |X|→ C = |X|C = |X|C = D ← 2 0 1 −1 |X|C = |X|C = |X|C E c D |X|C = D E c D |X|C = D E c D D = c ◦ D Loops Without Activity C-inseqs may contain chained jump instructions which form a loop. The equations of (3.2) do not adequately handle this situation, as they do not assign any specific thread to the execution of such a loop. Hence we introduce an additional rule for the extraction of behavior from C instruction sequences:5 If the equations in (3.2) can be applied infinitely often from left to right without ever yielding an action, then the extracted thread is D. (3.3) As an example of the application of this rule, consider the C instruction sequence X = /#3; \#1; !; \#2; #; +\a. Its left behavior is → 1 4 2 1 |X|C = |X|C = |X|C = |X|C = |X|C = D. 1 4 2 Here we derive that |X|C , |X|C and |X|C equal D by means of three left-to-right applications of equations in (3.2) followed by application of (3.3). Indeed, the instructions at positions 1, 2 and 4 form a closed loop without any non-jump instructions. This example is also yet another demonstration of the fact that the left and right behavior of an inseq are in general not equivalent; the right behavior of X is, ← ℓ(X) |X|C = |X|C 6 5 4 = |X|C = |X|C E a D |X|C = D E a D D = a ◦ D. Proposition 3.1. Each thread definable in C is regular, and each regular thread can be expressed in C. + Proof. Let X ∈ IC . Following (3.2) and (3.3) we have that for arbitrary i ∈ [1, ℓ(X)] one of the following is the case (for some j, k ∈ Z): |X|iC = S, |X|iC = D, |X|iC = |X|jC E a D |X|kC . Let [i]X = {j ∈ [1, ℓ(X)] | |X|iC = |X|jC } be an equivalence class of positions in X from which identical behavior can be extracted. Let Q be the corresponding quotient set of [1, ℓ(X)]. Then for all [i] ∈ Q we define,  i  if |X|C = S, S i P[i] = D if |X|C = D,   i j k P[j] E a D P[k] if |X|C = |X|C E a D |X|C . 5 This rule is near identical to the rule (2.4) which assigns a thread to infinite sequences of chained jump instructions in PGA. 22 Chapter 3. C Instruction Sequences i Now for all i ∈ [1, ℓ(X)] the thread |X|C equals P[i] , which is completely specified by the above linear equations and is thus regular. Conversely, let T ∈ BTAreg be described by the linear equations P0 = t1 , P2 = t2 , . . . , 3i+1 + Pn−1 = tn−1 . Then there exists an X ∈ IC with ℓ(X) = 3n such that Pi = |X|C and → thus specifically |X|C = P0 . We construct X as follows: If Pi = S then set σ3i+1 (X) = !. If Pi = D then set σ3i+1 (X) = #. Otherwise Pi = Pj E a D Pk , thus we set σ3i+1 (X) = +/a. σ3i+2 (X) and σ3i+3 (X) are jump instructions to positions 3j + 1 and 3k + 1, respectively. Positions in X for which no instruction has been specified can be assigned an arbitrary instruction. 3.3 The Reachability of Instructions If the equations in (3.2) are read strictly from left to right, then they define for a given inseq X and an arbitrary instruction at position i in X which action said instruction performs (if any) and at which program position(s) j execution may proceed. Let us define this relation between program positions as follows: + Definition 3.2. Let X ∈ IC . Then the accessibility relation →X ⊂ Z2 of X is defined as: i i →X j ⇐⇒ for some a ∈ A and k ∈ Z, |X|C equals one of j j j k k j {|X|C , a ◦ |X|C , |X|C E a D |X|C , |X|C E a D |X|C } according to a single left-to-right application of an equation in (3.2). That is, i →X j iff execution may continue at position j right after the instruction at position i has been executed. We then call i the source position and σi (X) the source instruction. Likewise j and σj (X) are the target position and target instruction, respectively. ∗ As usual, →+ X denotes the transitive closure of the relation →X . Likewise →X is its reflexive and transitive closure. + Definition 3.3. Let X ∈ IC . A program position j is reachable from position i in X if i →∗X j.6 The set RX,i = {j | i →∗X j} contains i and all positions reachable from i in X. It’s complement RX,i = Z − RX,i naturally contains those positions which are unreachable from i. Note that RX,i may include “invalid” program positions, i.e. positions outside of X. Definition 3.4. The set EX = {i ∈ [1, ℓ(X)] | i →X j, j ∈ / [1, ℓ(X)]} contains the exit positions of X. That is, execution of an instruction at some position in EX may cause a position outside X to be “reached”. Proposition 3.5. Every regular thread can be described by a C instruction sequence in which every instruction is reachable from the start instruction. + Proof. Consider arbitrary T ∈ BTAreg , X ∈ IC and i ∈ [1, ℓ(X)] such that |X|iC = T . If RX,i ∩ [1, ℓ(X)] = ∅, then T , X and i meet the requirements. Otherwise, randomly select some unreachable position j ∈ RX,i ∩ [1, ℓ(X)]. If the jth instruction is removed from X, then the jump counter of any jump instruction which jumps over position j should be reduced by one, so as to ensure that its target instruction remains the same. This is possible since said jump counter must be at least 2. We do not have to be concerned with any other instruction which can transfer control of execution to or over position j; such an instruction must itself not be reachable (because position j isn’t) and has as such no effect on X’s behavior. The result of removing the instruction at position j from X is an inseq X ′ such that i−1 i either |X ′ |C = T or |X ′ |C = T , depending on whether j < i or j > i, respectively. This process can be repeated until all unreachable instructions are removed. 6 Note that every instruction is reachable from itself. This is somewhat unconventional, but convenient for our purposes. 3.4. A Small Variation on C 23 A Small Variation on C 3.4 For each a ∈ A, C provides four test instructions: +/a, −/a, +\a and −\a. Semantically speaking the first two of these have immediate counterparts in PGA: +a and −a. The latter two are backward versions of the former two, and thus are indirectly based on (or even inspired by) the PGA test instructions as well. C’s lack of directional bias allows for a different semantics for test instructions, though; one that is instead inspired by the postconditional composition operator as found in basic thread algebra. Consider the following two instructions: +a is the positive test instruction. It performs action a. If the environment returns true after completion of action a the instruction to the left of the current instruction is executed. Otherwise the instruction to its right is executed. −a is the negative test instruction. This instruction mirrors the behavior of +a, in that it transfers control to the left or right if the action a yields false or true, respectively. These instructions are syntactically indistinguishable from PGA’s test instructions, but + they differ semantically. We define a code semigroup C ′ = (IC ′ , ; ) with IC ′ = (IC − P − N) ∪ [ {+a, −a}. a∈A C ′ ’s semantics can be formalized by altering the set of equations (3.2): the cases related to σi (X) ∈ {+/a, −/a, +\a, −\a} are no longer applicable, while two cases to handle σi (X) ∈ + {+a, −a} need to be added. Thus we define for all i ∈ Z and X ∈ IC ′, i |X|C ′ 3.4.1   D     a ◦ |X|i+1  C′   i−1   a ◦ |X|C ′     i+1  |X|i−1  C ′ E a D |X|C ′ i+1 i−1 = |X|C ′ E a D |X|C ′     |X|i+k  C′   i−k   |X|  C′      D    S if i < 1 or i > ℓ(X), if σi (X) = /a, if σi (X) = \a, if σi (X) = +a, if σi (X) = −a, if σi (X) = /#k, if σi (X) = \#k, if σi (X) = #, if σi (X) = !. Behavior Preserving Homomorphisms Now that the behavior of every C ′ -expression has been specified, we can answer the question whether C ′ is more or less expressive than C. It turns out that these code semigroups are equally expressive, because we can define behavior preserving homomorphisms from C to C ′ and vice versa. + + → IC First, we define a homomorphism f : IC ′ on individual instructions as follows: /a 7→ /a; /#4; #; #; \#4, +/a 7→ /#2; /#4; +a; /#7; \#2, # 7→ #; #; #; #; #, \a 7→ /#4; #; #; \#4; \a, /#k 7→ /#5k; #; #; #; \#4, −/a 7→ /#2; /#4; −a; /#7; \#2, +\a 7→ /#2; \#2; +a; \#9; \#2, ! 7→ !; #; #; #; !, \#k 7→ /#4; #; #; #; \#5k, −\a 7→ /#2; \#2; −a; \#9; \#2. Every C instruction is mapped onto five C ′ instructions. Observe that f is left-right uniformly behavior preserving. An alternative definition of f could map every C instruction 24 Chapter 3. C Instruction Sequences onto four C ′ instructions, at the expense of being only left or right uniformly behavior preserving. + + The same holds for the homomorphism g : IC One can define left or right ′ → IC . uniformly behavior preserving homomorphisms which map every C ′ instruction onto three C instructions. Here, however, we define g such that it is left-right uniformly behavior preserving: /a 7→ /a; /#3; #; \#3, /#k 7→ /#4k; #; #; \#3, \a 7→ /#3; #; \#3; \a, +a 7→ +/a; \#2; /#2; \#3, \#k 7→ /#3; #; #; \#4k, # 7→ #; #; #; #, −a 7→ −/a; \#2; /#2; \#3, ! 7→ !; #; #; !. Chapter Cg Instruction Sequences The semigroup C introduced in the previous chapter provides two ways to skip one or more instructions during execution: using a test instruction and using a jump instruction. In both cases the location of the target instruction (if present) is at a fixed distance from the source instruction. In other words, the distance over which control of execution is transferred is static and does not depend on the context (i.e., the instructions surrounding the instruction which is currently being executed). As a result, inserting a single instruction at an arbitrary position in some instruction sequence may completely alter its semantics. To alleviate this problem somewhat, we will introduce an alternative means to transfer control of execution over arbitrary distances within an instruction sequence. This chapter defines the semigroup Cg, a close cousin of C. Cg employs label instructions to mark specific positions within an instruction sequence with a natural number (a label number ). Goto instructions can then specify such a label number as the target of a jump. Cg’s instruction set is introduced in §4.1. The semantics of Cg-expressions are formalized in §4.2. This chapter then proceeds with §4.3, §4.4 and §4.5 in which certain properties of label and goto instructions are analyzed and in which some useful transformations of Cg-expressions are defined. Combined, these sections provide us with the tools required to analyze Cg and its relation to C and PGA in Chapter 5. Finally, §4.6 briefly discusses an alternative semantics for goto instructions. After defining behavior preserving endomorphisms on Cg to demonstrate that this alternative semantics does not affect Cg’s expressiveness, we will not consider it any further. 4.1 The Instruction Set The semigroup Cg has basic instructions as well as positive and negative test instructions, just like C. Cg does not have relative jumps /#k and \#k, unlike C. Instead, it has a set of label instructions L and a set of goto instructions G:1 L= [ {/£l, \£l}, G= l∈N [ {/##£l, \##£l}. l∈N Label instructions mark a specific location within an instruction sequence with a natural number l. They come in a forward as well as a backward oriented flavor, which determines whether the instruction to respectively the right or left of the label instruction is executed next. Goto instructions too are marked with a natural number l and jump to the first label l with the same orientation in the appropriate direction. 1 The notation for label and goto instructions is borrowed from [BL02, PvdZ06], which define a language PGLDg as part of the PGA language hierarchy. In PGLDg, there are label instructions £l and goto instructions ##£l, for all l ∈ N. 25 4 26 Chapter 4. Cg Instruction Sequences Formally, the instruction set ICg = L ∪ G ∪ IC − J generates the semigroup Cg = + (ICg , ; ). Note that since Cg has basic instructions and test instructions, Cg takes an implicit parameter A of actions, just like C. Examples of Cg-expressions include: +/a; #, /b; /##£0; /a; /£0; !, /b; /£3; +/a; \##£3, \£5; −\c. (4.1) Before formalizing Cg’s semantics, let us first informally describe what the intended behavior of labels and gotos is. /£l is a forward label instruction. Execution of /£l simply causes the instruction to its right to be executed, if it exists. Otherwise deadlock occurs. \£l is a backward label instruction. It is analogous to /£l, except that execution continues with the instruction to its left. /##£l is a forward goto instruction. Transfers control of execution to the nearest /£l instruction to its right, if such an instruction exists. Otherwise deadlock occurs. \##£l is a backward goto instruction. This instruction will cause execution to continue at the nearest \£l instruction to its left. And of course, if such a label does not exist, deadlock will result. For convenience we will write LG for the set L ∪ G. The function λ : LG → N returns the label number of a given label or goto instruction (e.g., λ(/£6) = 6). As with C-instructions, → ← we will define two sets ICg ⊂ ICg and ICg ⊂ ICg , which consist of forward and backward Cg-instructions respectively. That is, [ → → ICg = (IC ∩ ICg ) ∪ {/£l, /##£l}, l∈N ← ICg = ← (IC ∩ ICg ) ∪ [ {\£l, \##£l}. l∈N → ← → ← Clearly ICg ∩ ICg = ∅ and ICg ∪ ICg ∪ {#, !} = ICg . The sets L→ , L← , G→ , G← , LG→ and ← LG are defined as one would expect them to be. Likewise for the directionality relation ∼ ⊂ ICg × ICg . Examples We will formalize Cg’s semantics in §4.2 below. Still, to create or improve an intuitive understanding of Cg-expressions and how they differ from C-expressions, let us briefly describe the behavior of the Cg-inseqs of (4.1). As before, we specify that execution starts at the leftmost position. • +/a; #: Performs action a, after which deadlock occurs. This Cg-expression is also a valid C-expression. • /b; /##£0; /a; /£0; !: Performs action b and then terminates. Action a is not performed, since the second instruction is a goto instruction which causes execution to continue at position 4. • /b; /£3; +/a; \##£3: Performs action b followed by action a. Then deadlock results. The action a is not repeated, regardless of the value returned by the execution environment, because the backward goto instruction will not transfer control of execution to the forward label instruction: their directionality does not match. • \£5; −\c: Deadlock. After execution of a backward label instruction the instruction to its left is executed. Here, no such instruction is present. 27 4.2. Semantics Orphaned Goto Instructions A goto instruction in some Cg-inseq X which causes deadlock (by lack of a “matching” label instruction) will be called orphaned. In other + words, given some X ∈ ICg and i ∈ G(X), the ith instruction of X is orphaned iff i is an exit position in X. Note that although some Cg-expression X may contain labels /£l and \£l, this does not preclude the possibility that X contains a goto instruction /##£l or \##£l which matches neither of these labels (and is thus orphaned). For example, in the following expression both goto instructions are orphaned: /£0; \##£0; /##£0; \£0. The C programming language [ISO99, KR88] (not to be confused with the code semigroup C) allows statements within functions to be marked using labels. The statement goto lbl; causes program execution to continue at the statement marked with label lbl , provided that lbl is a label within the same function. The Java programming language [GJSB05] allows the labeling of code blocks. The statement break lbl; is valid only inside a block labeled lbl , and indicates that program execution must be resumed after block lbl .2 This shows that C and Java, just like the semigroup Cg, restrict the scope of label and goto statements. The statements goto lbl; and break lbl; may prevent successful compilation of a C or Java program X, even when X contains (multiple) statements labeled with lbl , because of non-overlapping scopes. When a C or Java compiler encounters a goto or break statement which references a non-existent or out-of-scope label it may3 yield an error claiming that a certain label is undefined. Such an error message seems to lay the “blame” for the failure to compile on the non-existence of some label l, rather than on the incorrectly defined goto (break) statement. Using the term “orphaned” allows us to indicate that some goto instruction does not have a matching label instruction without blaming any specific label instruction or label number. 4.2 Semantics As goto instructions transfer control to the nearest label instruction (if present) in the appropriate direction, their semantics depend on the position of said label instruction. In order to make this relation precise, we define two search functions, −−−−−→ search(X, i, S) = min({j | j ≥ i, σj (X) ∈ S} ∪ {ℓ(X) + 1}), ←−−−−− search(X, i, S) = max({j | j ≤ i, σj (X) ∈ S} ∪ {0}). −−−−−→ search performs a forward search in a given inseq X, starting at position i, for any instruction in S. The first position in X containing one such instruction is returned. If no instruction from S is found then the first position outside of X, (i.e., ℓ(X) + 1) is returned. ←−−−−− search behaves nearly identical, except that it searches from right to left, and returns 0 if + no instruction is found. Both functions have type ICg × Z × P(ICg ) → N, where P(ICg ) denotes the powerset of ICg . As with PGA and C, we will formally define the semantics of Cg-expressions using basic → + → BTAreg be the function that yields the behavior of a given thread algebra. Let | |Cg : ICg → Cg-expression when executed starting with the leftmost instruction. That is, | |Cg defines ← + → BTAreg yields the right behavior of a given Cgits left behavior. Likewise | |Cg : ICg → ← 1 ℓ(X) expression. As with C, we identify |X|Cg and |X|Cg with |X|Cg and |X|Cg , respectively, 2 It is actually not quite as simple as this, because of Java’s support for exception handling. Furthermore, the continue keyword can also be supplied with an optional label, but only if said label precedes an iteration statement, not just any code block. Also note that Java (currently) does not provide a “regular” goto statement, although the language does identify goto as a reserved keyword. 3 Tested with gcc 4.3.3 and javac 1.6.0 14. 28 Chapter 4. Cg Instruction Sequences i + + → BTAreg for all i ∈ Z, such that for all X ∈ ICg , and define auxiliary functions | |Cg : ICg i |X|Cg   D    i+1  a ◦ |X|Cg     i+1 i+2  |X|Cg E a D |X|Cg    i+2 i+1   |X|Cg E a D |X|Cg    i+1   |X|  Cg  −−−−→   |X|search(X,i,{/£l})   Cg = a ◦ |X|i−1 Cg   i−1 i−2   |X|  Cg E a D |X|Cg   i−2 i−1  |X|Cg E a D |X|Cg    i−1  |X|Cg    ←−−−−  search(X,i,{\£l})   |X|Cg      D     S if i < 1 or i > ℓ(X), if if if if σi (X) = /a, σi (X) = +/a, σi (X) = −/a, σi (X) = /£l, if σi (X) = /##£l, if if if if (4.2) σi (X) = \a, σi (X) = +\a, σi (X) = −\a, σi (X) = \£l, if σi (X) = \##£l, if σi (X) = #, if σi (X) = !. As with PGA and C, we equate an infinite sequence of left-to-right derivations according to (4.2) which does not yield an action with deadlock: If the equations in (4.2) can be applied infinitely often from left to right without ever yielding an action, then the extracted thread is D. (4.3) This rule is specifically applicable to infinite loops created using label and goto instructions. 1 For example, |/£1; \£2|Cg = D, because |/£1; \£2|1Cg = |/£1; \£2|2Cg = |/£1; \£2|1Cg . This example allows for an interesting observation: label instructions can act as control structures even in absence of a matching goto instruction. Another example is the program /£5; \a, which left as well as right behavior is described by the equation P = a ◦ P . In this sense Cg’s label instructions are quite unlike labels in C or Java, where labels cannot alter the flow of control in absence of another statement which references said label (such as goto). Cg, like C, characterizes the regular threads (as stated by Proposition 3.1). We will not prove that fact here; instead we refer to Proposition 6.7 in §6.2. For completeness we end this chapter with the left and right behavior of the examples of §4.1: → |+/a; #|Cg = D, |/b; /##£0; /a; /£0; !|→ Cg = b ◦ S, |/b; /##£0; /a; /£0; !|← Cg = S, |/b; /£3; +/a; \##£3|→ Cg = b ◦ a ◦ D, |/b; /£3; +/a; \##£3|← Cg = D, → |\£5; −\c|Cg = D, 4.2.1 ← |+/a; #|Cg = a ◦ D, ← |\£5; −\c|Cg = c ◦ D. Accessibility and Exit Positions The accessibility relation →X defined on C-inseqs X by Definition 3.2 is defined analogously on Cg-expressions. The same holds for the set RX,i of instruction positions reachable from position i in X and its complement RX,i (see Definition 3.3). The set of exit positions EX of a Cg-inseq X is defined as in Definition 3.4. Note that for Cg-expressions the notion of accessibility and reachability is in a sense more “artificial” than for C-expressions. This is so because for any orphaned goto instruction on 4.3. Normalizing Label Numbers 29 some position i in an inseq X it is the case that either i →X 0 or i →X ℓ(X) + 1, due to −−−−−→ ←−−−−− the definition of the functions search and search. We conclude this section with a result analogous to Proposition 3.5. Proposition 4.1. Every regular thread can be described by a Cg instruction sequence in which every instruction is reachable from the start instruction. + Proof. Consider arbitrary T ∈ BTAreg , X ∈ ICg and i ∈ [1, ℓ(X)] such that |X|iCg = T . If RX,i ∩ [1, ℓ(X)] = ∅, then T , X and i meet the requirements. Otherwise, randomly select some unreachable position j ∈ RX,i ∩ [1, ℓ(X)]. To see why j can be removed from X without problems, we need to make two observations. First, any instruction which transfers control of execution to position j must itself be unreachable. Second, any instruction which transfers control of execution over position j must be a goto instruction; the behavior of such instruction will not be affected by the removal of the instruction at position j (for σj (X) cannot be a matching label instruction). The result of removing the instruction at position j from X is an inseq X ′ such that i−1 i either |X ′ |Cg = T or |X ′ |Cg = T , depending on whether j < i or j > i, respectively. This process can be repeated until all unreachable instructions are removed. 4.3 Normalizing Label Numbers Cg-expressions can contain identical goto instructions which, when executed, cause a jump to distinct positions within the instruction sequence. Likewise, identical label instructions can occur multiple times within an expression. For example, X = /##£7; /a; /£7; /b; /##£7; /c; /£7. (4.4) Here, even though 1 =X 5, it is easy to see that |X|1Cg 6= |X|5Cg . Informally, we may say that the identical instructions in this expression are not semantically related. In this section we will make the notion of a semantical relation between label and goto instructions more precise. This endeavor is motivated by the observation that reasoning about a Cgexpression X is greatly simplified if any two label and goto instructions in X with the same label number and direction are known to be related in certain ways. + Definition 4.2. Let X ∈ ICg . If i, j ∈ LG(X), σi (X) ∼ σj (X) and λ(σi (X)) = λ(σj (X)), then the label/goto instructions at positions i and j have the same label number and direction, and are said to correspond, written i ≈X j. If i ∈ G(X), j ∈ L(X) and i →X j, then the goto instruction at position i targets the label instruction at position j, written i yX j. If i, j ∈ G(X), i =X j and ∃k(i →X k ∧ j →X k), then the identical goto instructions at positions i and j are said to be target equivalent, written i .X j. Note that target equivalent goto instructions can be orphaned. Also, non-target equivalent goto instructions need not be distinct, as in (4.4). Let y−1 X be the inverse of yX . We define ⋆X = .X ∪ yX ∪ y−1 X ∪ {(i, i) | i ∈ L(X)}. Instructions at positions i, j ∈ LG(X) are related iff i ⋆X j. X is in label normal form (LNF ) iff i ≈X j implies i ⋆X j for all i, j ∈ LG(X). That is, X is in LNF if and only if any pair of corresponding instructions is related. + Proposition 4.3. For all X ∈ ICg , ⋆X is an equivalence relation on LG(X). Proof. Let I = {(i, i) | i ∈ L(X)}. ⋆X is reflexive since I ⊆ ⋆X and i .X i for all i ∈ G(X). ⋆X is symmetric because .X , (yX ∪ y−1 X ) and I are. What remains to be proved is that ⋆X is transitive. To that end, let i, j and k be distinct program positions with i ⋆X j and j ⋆X k. We distinguish three situations: 30 Chapter 4. Cg Instruction Sequences • If i .X j then either j .X k, in which case i .X k, or j yX k, in which case i yX k. • If i yX j, then j y−1 X k, and hence i .X k. −1 • If i y−1 X j, then j .X k, meaning that k yX i and hence i yX k. (Note that j yX k will not be the case because that would mean i = k, while we defined i and k to be distinct positions.) + Proposition 4.4. Let X ∈ ICg be in label normal form. Then the following properties hold for all 1 ≤ i, j ≤ ℓ(X): (a) If i ∈ G(X), j ∈ L(X) and i ≈X j, then i yX j (label instructions are targeted by every goto instruction with the same label number and directionality). (b) If i, j ∈ L(X) and i =X j, then i = j (all label instructions in X are distinct). (c) If i, j ∈ G(X) and i =X j, then i .X j (identical goto instructions are target equivalent). + Proof. Let X ∈ ICg be in LNF. Note that i =X j implies i ≈X j for all i, j ∈ LG(X). Since X is in LNF, i ≈X j implies i ⋆X j. In order, the properties follow from the following identities: ⋆X ∩ (G(X) × L(X)) = yX , ⋆X ∩ (L(X) × L(X)) = {(i, i) | i ∈ L(X)}, ⋆X ∩ (G(X) × G(X)) = .X . + + Proposition 4.5. For any X ∈ ICg there exists an X ′ ∈ ICg such that X ′ is in label i ′ i normal form and |X|Cg = |X |Cg for all i ∈ Z. + Proof. Let X ∈ ICg . ⋆X is an equivalence relation on LG(X). Let [i]⋆X be the equivalence class of i and let LG(X)/⋆X be the quotient set of LG(X) by ⋆X . Let n = |LG(X)/ ⋆X | be the number of equivalence classes. Now select a bijective mapping f from LG(X)/⋆X onto [1, n], and construct an inseq X ′ by changing the label numbers of each label and goto instruction in X such that λ(σi (X ′ )) = f ([i]⋆X ) for all i ∈ LG(X). Then X ′ is in LNF and i i clearly |X|Cg = |X ′ |Cg for all i ∈ Z. 4.4 Freeing Label Numbers In this section we will briefly describe how certain label numbers can be removed from a Cg-inseq. It turns out that defining certain behavior preserving mappings on Cg instruction sequences is greatly simplified if one can assume that no label or goto instruction in the input inseq has a label number present in some set L. Definition 4.6. A label number l is available in a Cg-expression X if there is no u ∈ X such that λ(u) = l. That is, no label or goto instruction in X has label number l. To make a specific label number available, it must be freed. For each l ∈ N we define an endomorphism + + fl which frees label number l in a given Cg-inseq. fl : ICg → ICg is defined on individual instructions as follows:   /£l′ +1 if u = /£l′ and l′ ≥ l.    ′   if u = \£l′ and l′ ≥ l. \£l +1 (4.5) fl (u) = /##£l′ +1 if u = /##£l′ and l′ ≥ l.   \##£l′ +1 if u = \##£l′ and l′ ≥ l.    u otherwise. 4.5. Cg and Relative Jumps 31 Some behavior preserving mappings require several label numbers to be available. Let L = hl1 , l2 , . . . , ln i be an arbitrary finite sequence of natural numbers. Then fL is the endomorphism which frees the label numbers in L in order. Formally, fL = fln ◦· · ·◦fl2 ◦fl1 . Proposition 4.7. Let l ∈ N and let L be an arbitrary finite sequence of natural numbers. Then the endomorphisms fl and fL are left-right uniformly behavior preserving. Moreover, + if L is monotonically nondecreasing, then for every X ∈ ICg , all label numbers in L are available in fL (X). Proof. fl maps individual instructions onto individual instructions and alters only the label number of label and goto instructions with a label number ≥ l. Execution of a label instruction causes the instruction to its left or right to be executed, depending on the label’s orientation, but irrespective of the actual label number. It is not hard to see that likewise the position to which goto instructions transfer control of execution is not affected by the application of fl . Thus fl is left-right uniformly behavior preserving. As fL can be decomposed into individual applications of functions fl1 , . . . , fln , the same holds for fL . Since fl only increments label numbers ≥ l, any label number < l which is available in some inseq X will also be available in fl (X). It follows that if L is monotonically nondecreasing, then all l ∈ L will be available in fL (X). 4.5 Cg and Relative Jumps Cg does not have explicit relative jump instructions like C. Yet in Cg, too, some instructions transfer control of execution relative to their own position: basic instructions, test instruction and label instructions do so. For example, the label instruction /£6 transfers control to the instruction to its immediate right, equivalent to a forward relative jump over distance 1. Section §4.6 below defines endomorphisms on Cg in order to simulate an alternative semantics for goto instructions. These endomorphisms map single instructions onto a fixed number b of different instructions. Under those circumstances care must be taken that instructions which perform an implicit relative jump behave properly: all relative jump distances are multiplied by b. So how does this work? In this section we will describe how relative jumps over distances up to some arbitrary value k can be emulated using label and goto instructions. As a first step, consider the following family of Cg-inseqs, defined for every l ≥ 1 and k ≥ 2; d→ l = /£l; /##£l−1 d← l = \##£l−1; \£l → → → leftk = d→ 1 ; \£0; d2 ; d3 ; . . . ; dk ← ← ← rightk = d← k ; . . . ; d3 ; d2 ; /£0; d1 The Cg-expressions leftk and rightk contain alternating label and goto instructions, and an extra label with label number 0. leftk and rightk are meant to be used as subsequences of larger instruction sequences. Without going into the use of \£0 and /£0 for now, observe that leftk contains forward label instructions with label numbers 1 though k, each followed by a forward goto instruction with a label number one less than the number of the preceding label instruction. The same holds for rightk , except that it contains backward label and goto instructions. Next, for all k ∈ N, consider the family of functions φk : ICg → ICg , defined as   /##£1 if u = /£l and l ≤ k, φk : u 7→ \##£1 if u = \£l and l ≤ k,   u otherwise. The functions φk map all label instructions with a label number not greater than k to goto instructions with label number 1. 32 Chapter 4. Cg Instruction Sequences + + We now combine leftk , rightk and φk to create endomorphisms relk : ICg → ICg , for all k ≥ 2, defined on individual instructions u ∈ ICg such that, ( ← leftk ; \##£2; \##£1; φk (u); \£0; rightk if u ∈ ICg , relk : u 7→ (4.6) leftk ; /£0; φk (u); /##£1; /##£2; rightk otherwise. The functions relk are not quite left or right behavior preserving. Instead, at some higher level they redefine the semantics of goto instructions with a label number l ≤ k, such that their behavior mimics that of a relative jump over distance l. As a special case, /##£0 and \##£0 signify a jump over distance zero and as such yield deadlock.4 This alternative i semantics can be made explicit by defining thread extraction operators |X|Cg,k which are i i analogous to |X|Cg , except for the fact that the operators |X|Cg,k are defined differently for instances where i ∈ {j ∈ G(X) | λ(σj (X)) ≤ k}:   D if i < 1 or i > ℓ(X),     i+1  a ◦ |X|Cg,k if σi (X) = /a,    i+1 i+2   |X| E a D |X| if σi (X) = +/a,  Cg,k Cg,k   i+2 i+1  |X| E a D |X|Cg,k if σi (X) = −/a,    Cg,k  i+1  if σi (X) = /£l,  |X|Cg,k    D if σi (X) = /##£0,    i+l   |X|Cg,k if σi (X) = /##£l and 1 ≤ l ≤ k,   −−−−→  search(X,i,{/£l})   if σi (X) = /##£l and l > k,  |X|Cg,k i i−1 (4.7) |X|Cg,k = a ◦ |X|Cg,k if σi (X) = \a,   i−1 i−2  |X|Cg,k E a D |X|Cg,k if σi (X) = +\a,    |X|i−2 E a D |X|i−1 if σi (X) = −\a,   Cg,k Cg,k   i−1  |X| if σi (X) = \£l,  Cg,k     D if σi (X) = \##£0,    i−l   |X| if σi (X) = \##£l and 1 ≤ l ≤ k,  Cg,k  ←−−−−   search(X,i,{\£l})  |X|Cg,k if σi (X) = \##£l and l > k,       D if σi (X) = #,    S if σi (X) = !. As an example, consider the Cg-inseq X = /##£3; /£3; /a; /b and suppose that we want to interpret all goto instructions with a label number ≤ 7 as relative jumps. Then, 1 4 5 |X|Cg,7 = |X|Cg,7 = b ◦ |X|Cg,7 = b ◦ D. Observe that the goto instruction on position 1 transfers control of execution to position 4; the label instruction with the matching label number at position 2 is bypassed. Fixing some k ≥ 2, observe that relk maps every Cg-instruction on bk = 4k + 6 Cginstructions. relk is defined such that the following equality holds: b (i−1)+1 k |X|iCg,k = |relk (X)|Cg ki = |relk (X)|bCg . Specifically, → 1 1 ← ℓ(X) ℓ(relk (X)) → |X|Cg,k = |X|Cg,k = |relk (X)|Cg = |relk (X)|Cg , |X|Cg,k = |X|Cg,k = |relk (X)|Cg ← = |relk (X)|Cg . It follows that the alternative semantics for Cg as defined by (4.7) can be simulated using relk and Cg’s default thread extraction operator. 4 See also §3.1.1. 4.6. Label Instructions as More General Jump Targets 4.6 33 Label Instructions as More General Jump Targets Cg’s goto instructions are defined such that they transfer control to a label instruction with the same label number and directionality in the appropriate direction (if present). An obvious alternative behavior is for goto instructions to jump to a label instruction with the same label number in the appropriate direction, irrespective of its directionality (again, provided such instruction is present). Put more informally: instead of “accepting” jumps from a single direction, we may alter Cg’s semantics such that label instructions accept jumps originating from goto instructions in either direction. In this section we play with this idea; it turns out that with respect to expressiveness nothing is gained or lost by using such an alternative semantics. Therefore we will not consider this idea beyond this section. As a result, readers may choose to skip this section. This alternative semantics can be described by a thread extraction operator | , |Cg′ which is nearly identical to the operator | , |Cg as defined by the set of equations (4.2) and rule (4.3), except for the cases involving goto instructions. Specifically (now using the usual i shorthand notation |X|Cg′ instead of |i, X|Cg′ ): i |X|Cg′   D     i+1   a ◦ |X|Cg′   i+1 i+2  |X|Cg′ E a D |X|Cg′    i+1  |X|i+2  Cg′ E a D |X|Cg′   i+1   |X|Cg′   −−−−→  search(X,i,{/£l,\£l})   |X|   Cg′ = a ◦ |X|i−1 Cg′   i−1   |X|Cg′ E a D |X|i−2  Cg′   i−2 i−1   |X| E a D |X| ′  Cg Cg′   i−1  |X|Cg′    ←−−−−   |X|search(X,i,{/£l,\£l})  Cg′      D    S if i < 1 or i > ℓ(X), if if if if σi (X) = /a, σi (X) = +/a, σi (X) = −/a, σi (X) = /£l, if σi (X) = /##£l, if if if if σi (X) = \a, σi (X) = +\a, σi (X) = −\a, σi (X) = \£l, if σi (X) = \##£l, if σi (X) = #, if σi (X) = !. −−−−−→ ←−−−−− Observe that search and search now each search for two instructions, namely /£l, \£l, for some l ∈ N. 4.6.1 Behavior Preserving Homomorphisms It turns out that this alternative semantics does not affect Cg’s expressiveness. It is straighti i + forward to define a homomorphism f such that |X|Cg = |f (X)|Cg′ for all i ∈ Z and X ∈ ICg . f is defined on individual instructions u ∈ ICg such that,   /£2l if u = /£l,      if u = \£l, \£2l+1 f : u 7→ /##£2l if u = /##£l,    \##£2l+1 if u = \##£l,    u otherwise. Indeed f ensures that any label number l is even for forward label and goto instructions, while l is odd for backward oriented instructions. As a result, label instructions in f (X) will in practice “accept” jumps from goto instructions in only one direction, rendering the difference between | , |Cg and | , |Cg′ irrelevant. 34 Chapter 4. Cg Instruction Sequences Conversely, there exists a homomorphism g such that for all i ∈ Z there exists some i j j ∈ Z such that |X|Cg′ = |g(X)|Cg . We define g = φ ◦ rel2 ◦ fh0,1,2i . The functions fh0,1,2i and rel2 have been defined previously by (4.5) and (4.6), respectively. The function φ is a homomorphism, defined on individual Cg-instructions u such that,   /##£l; \£l; /£l if u = /£l with l > 2, φ : u 7→ \£l; /£l; \##£l if u = \£l with l > 2,   u otherwise. The correctness of g hinges on three observations: 1. By Proposition 4.7, fh0,1,2i is behavior preserving. 2. The homomorphism rel2 alters the semantics of goto instructions with label numbers ≤ 2. These instructions are not present in its input because it is passed the output of fh0,1,2i . As such, rel2 ◦ fh0,1,2i is also behavior preserving. 3. Lastly, φ does not replace label instructions introduced by rel2 . It does replace all other label instructions, such that the resulting subsequence of three instructions mimics the behavior of label instructions as defined by | , |Cg′ if fed to | , |Cg . Any label replaced by φ is embedded by rel2 , ensuring that the behavior of other label, basic and test instructions is unaffected. This explains the use of rel2 : it accommodates for the implicit relative jumps performed by these instructions. We conclude with the observation that g is left-right behavior preserving, but not uniformly so. This is because the number of instructions output by φ depends on its input. g can be made left-right uniformly behavior preserving by using an alternative definition of φ which always outputs three instructions:  /##£l; \£l; /£l if u = /£l with l > 2,    \£l; /£l; \##£l if u = \£l with l > 2, φ : u 7→ →  u; /##£1; /##£2 if u ∈ ICg ∧ u 6= /£l for l > 2,    \##£2; \##£1; u otherwise. Chapter Translating Instruction Sequences Previous chapters introduced the program algebra PGA and the code semigroups C and Cg. In this chapter we provide behavior preserving mappings between these algebras and show some properties of these translations. Though defined on at a syntactic level, a behavior preserving mapping f makes explicit certain ways in which (groups of) instructions are related on a semantic level. If f : A → B, then f tells us something about distinctions and similarities between code semigroups A and B. If f : A → A, then f (if it is not the identity function), can be seen as a reformulation instead of a translation. Additionally, if f is an (anti-)homomorphism then it provides some additional implicit information about how A and B are related. Specifically, it shows that an A-inseq X can be translated instruction by instruction, independent of context, and without taking the length of X as an explicit parameter, to some B-inseq Y . For this reason we aim to define homomorphic instead of arbitrary translations between code semigroups where possible.1 The translations defined in this chapter will aid us in proving some expressiveness results in the next chapter. In order, this chapter provides a translation from C to PGA (§5.1), from PGA to C (§5.2), from C to Cg (§5.3) and from Cg to C (§5.4). 5.1 Translating C to PGA + In this section we define a behavior preserving mapping c2pga : IC → P . We do so in three steps: the first two steps apply left behavior preserving mappings to C itself, thereby converting every C-inseq X to a behaviorally equivalent C-inseq Y which has certain structural properties. The third step exploits these properties in order to translate every such Y to a behaviorally equivalent PGA term Z. The translation presented here is based on the behavior preserving mapping from C onto PGA as defined in section 12 of [BP09a]. 1. PGA has basic instructions and test instructions whose semantics are identical to C’s forward basic and test instructions. C’s backward basic instructions and test instructions have no direct counterpart in PGA, so we wish to eliminate them. Thus we define a left + uniformly behavior preserving endomorphism f on IC which removes these backward 1 Thinking of A as a high level programming language and B as a lower level programming language or even machine code, we can view f as an interpreter or compiler. If f is an (anti-)homomorphism then parts of an A-inseq X can be transformed and possibly even executed before all of X has been read. 35 5 36 Chapter 5. Translating Instruction Sequences instructions. f is defined on individual instructions as follows: /a 7→ /a; /#2; #, +/a 7→ +/a; /#2; /#4, −/a 7→ −/a; /#2; /#4, \a 7→ /a; \#4; #, +\a 7→ +/a; \#4; \#8, −\a 7→ −/a; \#4; \#8, /#k 7→ /#3k; #; #, # 7→ #; #; #, \#k 7→ \#3k; #; #, ! 7→ !; #; #. 2. In [BP09a] the notion of C-programs is introduced. In essence, a C-program is a C-inseq which does not contain exit positions. I.e, no instruction transfers control of execution outside of the instruction sequence; only execution of the termination or abort instruction will cause program execution to halt. Every C-inseq X can be converted to a C-program, simply by prefixing and suffixing sufficiently many abort instructions. In order to maintain X’s left and right behavior, additional jump instructions must be added to its left and right. Let m ≥ 2 be an upper bound on the largest jump counter present in some C-inseq X. Then a left-right behaviorally equivalent C-program X ′ can be constructed as /#m+1; (#)m ; X; (#)m ; \#m+1. Let g be the left-right behavior preserving mapping which performs the above procedure for arbitrary C-inseqs. 3. Given f and g as defined in the previous two steps, it is immediate that for every C-inseq X there exists a left behaviorally equivalent C-program X ′ = g(f (X)) which does not contain instructions from the set B← ∪ P← ∪ N← . Let X ′ = u1 ; . . . ; un . Then the following is a behaviorally equivalent PGA term: (φn (u1 ); . . . ; φn (un ))ω . For all n ∈ N+ the function φn is defined as follows (observe that due to application of g, necessarily k < n and thus n − k ∈ N+ ): /a 7→ a, /#k 7→ #k, +/a 7→ +a, −/a 7→ −a, ! 7→ !. \#k 7→ #n−k, # 7→ #0, Denoting the above procedure by h, we have that c2pga = h ◦ g ◦ f . 5.2 Translating PGA to C + Defining a translation pga2c : P → IC turns out to be be a lot easier if PGA terms can be assumed to be in second canonical form. Hence we start out by defining pga2c = snd2c ◦ snd . Recall that snd : P → P 2 is the function defined in §2.2.2 which converts arbitrary PGA terms to their structurally (and behaviorally) equivalent minimal second canonical forms. + The mapping snd2c : P 2 → IC is a behavior preserving mapping defined on second canonical forms only. Any X ∈ P 2 does not contain chained jump instructions and has one of two forms: • X does not contain repetition and thus X = u1 ; u2 ; . . . ; un for some n ∈ N+ . We define snd2c(u1 ; u2 ; . . . ; un ) = ψ(u1 ); ψ(u2 ); . . . ; ψ(un ). 5.3. Translating C to Cg 37 • X = Y ; Z ω , and Y nor Z contain repetition, meaning that for some n, m ∈ N+ , X = u1 ; . . . ; un ; (un+1 ; . . . ; un+m )ω . Now we define snd2c(u1 ; . . . ; un ; (un+1 ; . . . ; un+m )ω ) = ψ(u1 ); . . . ; ψ(un+m ); (\#m)max(2,m−1) . The function ψ is as straightforward as can be: a 7→ /a +a 7→ +/a −a 7→ −/a ! 7→ ! #l 7→ ( # /#l if l = 0, otherwise. snd2c makes extensive use of the assumptions that can be made about its input (i.e., that it is in second canonical form). Any jump instruction ui with i ≤ n will not jump beyond un+m . Any jump instruction ui with i > n will not have a jump counter greater than m − 1. By appending max(2, m−1) \#m instructions, it is ensured that all jump instructions which transfer control of execution beyond ψ(un+m ) indirectly transfer control to the appropriate instruction. Since un+m−1 and un+m can be test instructions, it is important to append at least two backward jump instructions. 5.3 Translating C to Cg In this section we focus on translations from C to Cg. It turns out that there does not exist a homomorphism which translates arbitrary C-expressions to behaviorally equivalent Cg-expressions. Theorem 5.1 below gives a proof of this fact. A convenient way to translate C to Cg is to start out by categorizing every C-expression based on the largest jump counter it contains. We write C≤k for the subsemigroup of C which consists exactly of those C-expressions that do not contain instructions /#k ′ or \#k ′ + , ; ), with2 for k ′ > k. Formally, C≤k = (IC ≤k IC≤k = IC − {u ∈ J | δ(u) > k}. (5.1) + + Assume the existence of a family of behavior preserving mappings c2cgk : IC → ICg for ≤k + all k ∈ N. Writing c2cg(k, X) for c2cgk (X), the behavior preserving mapping c2cg : IC → + + ICg can then be defined on all X ∈ IC as,3 c2cg : X 7→ c2cg(max{δ(σi (X)) | i ∈ J(X)}, X). The hypothesized family of functions c2cgk exists. A straightforward definition is (5.3) in §5.3.1 below. An alternative homomorphic definition is (5.5) in §5.3.2. Since in both cases + + c2cgk is only defined for k ≥ 2, a slightly altered definition of c2cg : IC → ICg is in place: c2cg : X 7→ c2cg(max({δ(σi (X)) | i ∈ J(X)} ∪ {2}), X). 5.3.1 (5.2) A Behavior Preserving Mapping from C≤k to Cg + + For all k ≥ 2, we define a function c2cgk : IC → ICg such that, ≤k c2cgk (u1 ; . . . ; un ) = ψk,1 (u1 ); . . . ; ψk,n (un ). 2 Recall 3 Yes, (5.3) that δ : J → N+ returns the jump counter of a given jump instruction. + + + + the function name c2cg is overloaded here. Its type is either N × IC → ICg or simply IC → ICg . 38 Chapter 5. Translating Instruction Sequences In effect c2cgk replaces the ith instruction of its input X with the output of ψk,i (σi (X)). + The auxiliary functions ψk,i : IC → IC are defined as follows:   φk,i (/a; /##£[i+1]k+1 ) if u = /a,      φ (+/a; /##£[i+1] ; /##£[i+2] ) if u = +/a, k,i k+1 k+1      φk,i (−/a; /##£[i+1]k+1 ; /##£[i+2]k+1 ) if u = −/a,    if u = \a, φk,i (/a; \##£[i−1]k+1 )   φ (+/a; \##£[i−1] ; \##£[i−2] ) if u = +\a, k,i k+1 k+1 ψk,i (u) =  φk,i (−/a; \##£[i−1]k+1 ; \##£[i−2]k+1 ) if u = −\a,      φ if u = /#l, k,i (/##£[i+l]k+1 )     if u = \#l, φk,i (\##£[i−l]k+1 )    φk,i (#) if u = #.    φ (!) if u = !. k,i In this definition [n]k+1 stands for the remainder of n after division by k +1, i.e. the smallest nonnegative value congruent with n (mod k + 1). Thus 0 ≤ [n]k+1 ≤ k for all n. For all + + i ∈ N+ , φk,i : ICg → ICg embeds its argument between some label and goto instructions with label number [i]k+1 as follows: φk,i (U ) = /##£[i]k+1 ; \£[i]k+1 ; /£[i]k+1 ; U ; \##£[i]k+1 . Informally, φk,i (U ) “guards” the Cg instruction sequence U which replace the C instruction at position i in the original C-expression using the labels /£[i]k+1 and \£[i]k+1 . In this way a goto instruction /##£[i + l]k+1 or \##£[i + l]k+1 in a Cg-inseq U which replaces the ith C instruction transfers execution to the Cg-inseq U ′ which replaces the C instruction at position i + l or i − l, respectively. In this way the transfer of control of execution over a relative distance in the original C-inseq is simulated. Observe that label numbers are repeated (“reused”) with period k + 1. This does not pose a problem because the original C≤k -expression will not contain relative jumps over a distance greater than k. (And since k ≥ 2, the implicit relative jumps over distance 1 or 2 performed by test instructions can likewise be simulated.) The auxiliary functions ψk,i and their helper functions φk,i are defined such that c2cgk is left-right behavior preserving. Note that it is possible to omit the rightmost \##£[i]k+1 instruction outputted by each call to φk,i , but then c2cgk would no longer be right behavior preserving. 5.3.2 What About a Homomorphic Translation from C to Cg? + + The translation c2cg : IC → ICg defined by (5.2) is not homomorphic because it requires knowledge about the largest jump counter present in its input. It turns out that it is not possible to define a homomorphic alternative to c2cg. + + Theorem 5.1. There does not exist a behavior preserving homomorphism f : IC → ICg . + + Proof. We prove that no homomorphism f : IC → ICg can be left behavior preserving. The proof that no such f can be right behavior preserving is analogous. For all n ∈ N+ we define the following C-inseqs: noden = +/a; /#3n−1; /#3n+1, treen = node1 ; node2 ; . . . ; node2n −1 . (5.4) Observe that treen contains 2n exit positions (see Definition 3.4), each containing one of the rightmost 2n forward jump instructions of treen . Exactly one of these exit positions 5.3. Translating C to Cg 39 1 : node1 tree3 : 7 : node3 4 : node2 X: 10 : node4 13 : node5 16 : node6 19 : node7 • • • • • • • • Figure 5.1: Graphical representation of the C-expression tree3 ; X as defined in (5.4). The dashed arrows show the order in which the subexpressions node1 , . . . , node7 are concatenated (the prefixes denote their positions in tree3 ). The solid arrows signify jumps between which a choice is made based on the boolean reply to the a-test in the originating node. As depicted here, all instructions at exit positions of tree3 jump to distinct positions within the inseq X. This means that ℓ(X) ≥ 22. will be reached after n consecutive a-tests, provided that execution starts at position 1. Every instruction in treen is reachable from position 1. Figure 5.1 provides a graphical representation of tree3 . Towards a contradiction we will now assume that there does exist a left behavior preserving homomorphism f from the code semigroup C onto the code semigroup Cg. It is easy to see that for any combination of m ≤ 2n exit positions i1 , i2 , . . . , im in treen + there exist some X ∈ IC such that all of the following yield distinct behavior:4 i i i |treen ; X|C1 , |treen ; X|C2 , . . . , |treen ; X|Cm . It follows that f (treen ) must have at least 2n − 2 distinct orphaned forward goto instructions, all of which are reachable from the leftmost instruction.5 + For all X ∈ ICg , let LX = X ∩ L→ be the set of distinct forward label instructions in X. Obviously LX = LX k for all k ∈ N+ . Now take some n, k ∈ N such that 2n − 2 > |Lf (/a) | and k ≥ 3(2n − 1) + 1. Then 1 |treen ; (/a)k |C will perform at least n + 1 consecutive a-actions, irrespective of the boolean 1 replies they yield. However, this cannot be the case for |f (treen ; (/a)k )|Cg . Some of the forward goto instructions in f (treen ) which are reachable after n a-tests cannot have a matching label instruction in f ((/a)k ), because the number of distinct forward label instructions |Lf ((/a)k ) | = |L(f (/a))k | = |Lf (/a) | is smaller than the number of distinct forward goto instructions (which is at least 2n − 2). Thus we reach a contradiction. A Behavior Preserving Homomorphism from C≤k to Cg It turns out that the result of Theorem 5.1 is due to a surprisingly small lack of information about the context of individual instructions. Once an upper bound on the size of jump counters in the input inseq is known, a homomorphism can be defined. In other words, there does exists a homomorphic + + alternative to the family of behavior preserving mappings c2cgk : IC → ICg defined by ≤k (5.3) in §5.3.1. We provide one such alternative definition, by building on the work of §4.5. For all k ≥ 2 we define, c2cgk = relk ◦ φ. (5.5) 4 In fact, infinitely many inseqs X have this property. do not exclude the possibility that either or both of the rightmost two instruction positions of f (tree n ) are exit positions containing forward basic instructions, test instructions or label instructions. This explains the conservative estimate of 2n − 2 instead of 2n orphaned forward goto instructions. 5 We 40 Chapter 5. Translating Instruction Sequences + + The homomorphism relk : ICg → ICg is defined by (4.6) in §4.5. Recall that it causes all goto instructions with label numbers up to and including k to behave as relative jumps. It + + should come as no surprise then that the definition of the homomorphism φ : IC → ICg is straightforward:   /##£k if u = /#k, φ : u 7→ \##£k if u = \#k,   u otherwise. Observe that c2cgk is left-right uniformly behavior preserving. (Like relk , c2cgk maps every instruction in the input instruction sequence to 4k + 6 instructions in the output.) 5.4 Translating Cg to C + + Defining a behavior preserving mapping cg2c : ICg → IC is rather straightforward. Label instructions can simply be replaced by relative jumps over distance 1 in the appropriate direction. Goto instructions are replaced by relative jumps to the position of the label instruction which they target, if any. Orphaned goto instructions can be replaced by an abort instruction or a jump outside of the instruction sequence. For convenience we will choose to do the latter. ≤i For all i ∈ N+ we define functions φi : ICg → IC such that,   /#j−i      \#i−j φi (X) = /#1    \#1    σ (X) i −−−−−→ if σi (X) = /##£l and j = search(X, i, {/£l}), ←−−−−− if σi (X) = \##£l and j = search(X, i, {\£l}), if σi (X) = /£l, if σi (X) = \£l, otherwise. (5.6) φi determines whether and how the ith instruction in a given Cg-inseq X should be translated. Only label and goto instructions are replaced, precisely according to the rules mentioned. Concatenating the results of appropriate invocations of (5.6), the mapping + + cg2c : ICg → IC is thus defined: cg2c : X 7→ φ1 (X); φ2 (X); . . . ; φℓ(X) (X). (5.7) Every label and goto instruction is replaced by a jump instruction which mimics its transfer of control of execution. Other instructions are unaltered. Thus cg2c is left-right uniformly behavior preserving. 5.4.1 What About a Homomorphic Translation from Cg to C? The translation cg2c defined by (5.7) is not a homomorphism. It turns out that this is necessarily so. + + Theorem 5.2. There does not exist a behavior preserving homomorphism f : ICg → IC . + + Proof. We prove that no homomorphism f : ICg → IC can be left behavior preserving. The proof that no such f can be right behavior preserving is analogous. For all n ∈ N+ we define the following Cg-inseqs: noden = /£n; +/a; /##£2n; /##£2n+1, treen = node1 ; node2 ; . . . ; node2n −1 . 5.4. Translating Cg to C 41 It is not hard to see that treen contains 2n orphaned goto instructions with label numbers 2n through 2n+1 − 1. For example, tree2 contains the orphaned goto instructions /##£4, /##£5, /##£6 and /##£7: /£1; +/a; /##£2; /##£3; /£2; +/a; /##£4; /##£5; /£3; +/a; /##£6; /##£7. If execution of treen starts at position 1, then exactly one of the orphaned goto instructions will be reached after performing n consecutive a-actions. Every orphaned goto instruction is reachable. Towards a contradiction we will now assume that there does exist a left behavior preserving homomorphism f from the code semigroup Cg onto the code semigroup C. + For all X ∈ IC define RX = {j − ℓ(X) | i ∈ [1, ℓ(X)], i →+ X j, j > ℓ(X)}. Informally, RX contains the offsets of “invalid” positions to the right of X which are reachable from X. We fix some r such that max(Rf (/a) ) ≤ ℓ(f ((/a)r )). Then Rf (/a;(/a)r ) = Rf ((/a)r ) , and in fact Rf ((/a)k ) = Rf ((/a)r ) for all k ≥ r. Next we define treen,k = treen ; (/a)k for all n, k ∈ N, and we make two easily verifiable claims: → + ′ (1) For all n ∈ N, k, k ′ ≥ 2 and X ∈ ICg the identity |treen,k ; X|→ Cg = |treen,k ; X|Cg holds. To see why this is so, observe that all exit positions in treen,k and treen,k′ are goto instructions and that treen,k and treen,k′ do not contain backward label instructions. As a result only the last two instructions of treen,k and treen,k′ (which are /a instructions) may be reachable from a position in the “X-part“ of treen,k ; X and treen,k′ ; X. (2) For any combination of m ≤ 2n distinct positions of orphaned goto instructions i1 , + such that all of the following yield i2 , . . . , im within treen,k there exists an X ∈ ICg 6 distinct behavior: i i i m 2 1 . , . . . , |treen,k ; X|Cg , |treen,k ; X|Cg |treen,k ; X|Cg Combining these two claims, we must conclude that |Rf (treen,k ) | ≥ 2n for all n, k ∈ N. Now take some n such that 2n > |Rf ((/a)r ) | and select some k ≥ r such that Rf (treen,k ) = Rf (treen ;(/a)k ) = Rf ((/a)k ) = Rf ((/a)r ) . But then |Rf (treen,k ) | = |Rf ((/a)r ) | < 2n . Contradiction. A Behavior Preserving Homomorphism from Cg≤k to C Similar to the definition of subsemigroups C≤k , we define subsemigroups Cg≤k ⊂ Cg for all k ∈ N. Cg≤k contains precisely those Cg-inseqs which do not contain goto instructions with a label number greater + than k. That is, we define Cg≤n = (ICg , ; ), with ≤n ICg≤k = ICg − {u ∈ G | λ(u) > k}. Note that Cg≤k places no restriction on label instructions. As such, the utility of label instructions with a label number greater than k in a Cg≤k -expression is limited. As per Theorem 5.2 no total homomorphism from Cg to C can be behavior preserving. + + However, the family of behavior preserving functions cg2ck : ICg → IC (k ∈ N) can be ≤k defined such that each cg2ck is a homomorphism. Given arbitrary k, we define cg2ck on individual instructions as follows: cg2ck (u) = φk (u); nextk (u); leftk (u); rightk (u). 6 Note again that there are in fact infinitely many such X. (5.8) 42 Chapter 5. Translating Instruction Sequences Here φk is defined as: /a 7→ /a, +/a 7→ +/a, \a 7→ /a, +\a 7→ +/a, /£l 7→ /#1, \£l 7→ /#1, −/a 7→ −/a, −\a 7→ −/a, # 7→ #, /##£l → 7 /#k+l+4, \##£l → 7 /#l+3, ! 7→ !. Furthermore, nextk , leftk and rightk are defined as follows: ( ← \#2k+6; \#4k+12 if u ∈ ICg , nextk : u 7→ /#2k+4; /#4k+8 otherwise, ( (\#2k+5)l ; \#l+3; (\#2k+5)k−l if u = \£l and l ≤ k, leftk : u 7→ (\#2k+5)k+1 otherwise, ( (/#2k+5)l ; \#k+l+4; (/#2k+5)k−l if u = /£l and l ≤ k, rightk : u 7→ (/#2k+5)k+1 otherwise. The mapping cg2ck : X 7→ Y can be explained using the metaphor of a “highway” that is laid between successive instructions of X. The highway contains a dedicated lane for each goto instruction /##£l and \##£l for 0 ≤ l ≤ k, thus resulting in a highway with 2k + 2 lanes. The highway is the result of the functions leftk and rightk . Each Cg≤k -instruction is mapped onto 2k + 5 C-instructions: label/goto “highway” with 2k + 2 “lanes” z k + 1 “lanes” to the left }| { k + 1 “lanes” to the right }| { z }| { z u; v; w; \#2k+5; . . . ; \#2k+5; /#2k+5; . . . ; /#2k+5 | {z } these 2k + 5 C instructions represent a single Cg≤k instruction The highway is used solely to mimic the behavior of goto instructions using a finite number of jumps. The following C-inseq is yielded by cg2ck (/##£l): entering the “highway” k + l + 3 instructions right lane l }| { z }| { z /#k+l+4; /#2k+4; /#4k+8; (\#2k+5)k+1 ; (/#2k+5)l ; /#2k+5 ; (/#2k+5)k−l {z } | {z } | {z } | φk (/##£l) leftk (/##£l) rightk (/##£l) The intention here is that the effect of /##£l is to jump onto the lth highway lane to the right. This lane consists of chained jumps, each of distance 2k + 5, until the segment of C-instructions that is the result of cg2ck (/£l) (note that l ≤ k, for otherwise /##£l would not be part of the input). There, a jump instruction off the highway can be found: leaving the “highway” k + l + 3 instructions right lane l z }| { z }| { /#1; /#2k+4 ; /#4k+8 (\#2k+5)k+1 ; (/#2k+5)l ; \#k+l+4; (/#2k+5)k−l | {z } {z } | {z } | to next Cg≤k instruction leftk (/£l) | rightk (/£l) {z 2k + 3 instructions } cg2ck maps each Cg≤k -instruction in an inseq X onto 2k + 5 C-instructions in an inseq Y . Thus the C-instructions corresponding to the ith instruction in X start in Y at position (i − 1) · (2k + 5) + 1. (i−1)(2k+5)+1 i + for all i ∈ Z, k ≤ 2 and X ∈ ICg . Thus It follows that |X|Cg = |cg2ck (X)|C cg2ck is left uniformly behavior preserving. Chapter Some Expressiveness Results As stated in §3.1.1, the abort instruction does not enhance C’s expressiveness as any abort instruction can be replaced by a jump instruction with a sufficiently large jump counter. In §5.1 the first of three steps involving the translation of C to PGA involved the elimination of backward basic/test instructions. These observations naturally lead one to wonder whether C contains more redundant instructions. There are at least two ways to prove that this is indeed the case, both of which will be utilized in this chapter. • On the one hand one can define a procedure M which, given an arbitrary regular thread T ∈ BTAreg , constructs a C-expression X such that |X|iC = T for some i ∈ [1, ℓ(X)], using only a subset of all C instructions, regardless of T . Clearly, any instruction which is not utilized by M irrespective of its input is redundant in the sense that it does not enhance C’s expressiveness. + • On the other hand one can define a function f on IC which translates any given inseq X to a behaviorally equivalent inseq Y , such that certain instructions will never be present in Y . Again, any such instruction can be deemed redundant from the point of view of expressiveness. In our quest to trim C’s instruction set we will inevitably stumble upon instruction sets which cannot express all threads in BTAreg . As we will later see, there is in fact a hierarchy of expressive power. Each C or Cg instruction u has a dual u: for forward instructions this is their backward counterpart, and vice versa. The abort and termination instructions are their own dual. Thus e.g. /a = \a, −\b = −/b and # = #. Observe that the dual operator is an involution: u = u for all u ∈ IC ∪ ICg . The anti-automorphism rev reverses a given instruction sequence and converts all its instructions to their dual. It is defined on C and well as Cg instruction sequences. For example, rev(+/a; !; \#2) = \#2; !; +/a = /#2; !; +\a. Observe that rev is an involution, because for all i ∈ [1, ℓ(X)], σi (X) = σℓ(X)−i+1 (rev(X)) = σℓ(X)−(ℓ(X)−i+1)+1 (rev ◦ rev(X)) = σi (X). → ← It is not hard to see that |X|C = |rev(X)|C for arbitrary inseq X. It follows that any code semigroup generated by some set I ⊆ IC or I ⊆ ICg is exactly as expressive as the set of its duals {u | u ∈ I}. Thus rev tells us something about the expressiveness of subsemigroups of C and Cg. The remainder of this chapter is organized as follows: in §6.1 we will be concerned with the expressiveness of several subsemigroups of C. Specifically, we will show that a reduction of IC so that it contains only a finite number of forward or backward jump instructions (or 43 6 44 Chapter 6. Some Expressiveness Results both) reduces its expressiveness. In §6.2 we will combine the results of §6.1 with some of the translations defined in the previous chapter and use these to make some statements about the expressiveness of Cg and some of its subsemigroups. 6.1 The Expressiveness of Subsemigroups of C In §5.1 it was shown that backward basic instructions and backward test instructions do not increase C’s expressiveness, by means of a left behavior preserving endomorphism f on + IC which does not output any of these instructions. In other words, the code semigroup generated by the instruction set IC − B← − P← − N← is as expressive as C itself. This instruction set is not minimal, however, since the proper subset P→ ∪ J ∪ {!} suffices. This is demonstrated by the left behavior preserving endomorphism g, defined on individual C-instructions by /a 7→ +/a; /#2; /#1, \a 7→ +/a; \#4; \#5, +/a 7→ +/a; /#2; /#4, +\a 7→ +/a; \#4; \#8, −/a 7→ +/a; /#5; /#1, −\a 7→ +/a; \#7; \#5, /#k 7→ /#3k; !; !, \#k 7→ \#3k; !; !, # 7→ /#1; \#1; !, ! 7→ !; !; !. The next question which naturally arises is whether the instruction set P→ ∪ J ∪ {!} is minimal. For example, can we do with less than infinitely many jump instructions? And if not, will an infinite but otherwise arbitrary set of jump instructions suffice? We will now investigate those questions. Recall the definition of the subsemigroup C≤k in §5.3. As defined by (5.1), C≤k ’s instruction set does not contain jump instructions with a jump counter greater than k. Theorem 6.1 (Bergstra & Ponse). Let |A| ≥ 2. There does not exists a value k ∈ N+ such that C≤k can express all finite threads. See the proof of Theorem 7 in [BP09a]; it has been replicated in Appendix B. See the proof of Theorem 6.2 below for a discussion. Theorem 6.2. Let A be non-empty. There does not exists a value k ∈ N+ such that C≤k can express all finite threads. Proof. By Theorem 6.1 we conclude that if |A| ≥ 2, then C≤k cannot express all finite threads. What remains is to be proved is that claim also holds if |A| = 1. We do this by “patching” the proof by Bergstra & Ponse. As their proof is rather long we will not repeat it here—instead we summarize some key aspects of the proof, point out why it requires that |A| ≥ 2 and then proceed to show how this requirement can be eliminated. (Again, the proof is provided verbatim in Appendix B.) The proof uses two key notions: • Following the definition of residual threads by (2.1), the concept of n-residual threads is defined: Q is a 0-residual thread of P if P = Q. Q is an (n+1)-residual thread of P if P = P1 E a D P2 and Q is n-residual of either P1 or P2 . • Now a thread P has the a-n-property if πn (P ) = an ◦ D and P has 2n − 1 distinct n-residuals with a first approximation not equal to a ◦ D.1 An instruction sequence has the a-n-property if a thread with the a-n-property can be extracted from it. 1 The sentences following this definition of the a-n-property in [BP09a] make it clear that P is meant to have 2n instead of 2n − 1 distinct n-residuals with a first approximation not equal to a ◦ D. It turns out that this slightly weaker definition of the property does not affect the proof in any significant way. 6.1. The Expressiveness of Subsemigroups of C 45 T hai P1 hai hai hai hai hai hai Q1 P2 hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai hai R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R23 R24 R25 R26 R27 R28 R29 R30 R31 Q2 Figure 6.1: Graphical representation of a thread T with the a+5-property. The “leaves” Rn in this tree represent pairwise distinct 5-residuals of T which are each also distinct from any m-residual of T for m < 5. This in turns means that all m-residuals for m ≤ 5 are pairwise distinct. For if e.g. P1 and P2 are not distinct, then Q1 and Q2 are identical as well, violating T ’s a+5-property. A similar argument holds for any pair of m-residuals with m ≤ 5. The proof by Bergstra and Ponse shows that for every k ∈ N there exists an n ∈ N+ such that no C≤k -expression X has the a-n-property. It does so by assuming the contrary and taking the minimal value for k in this respect. It is then shown that, given arbitrary + n ∈ N+ , one can find an X ∈ IC with the a-n-property for which it is also the case that ≤k + X ∈ IC≤k−1 . This contradicts the assumption that k was minimal. Let P be a thread with the a-n-property. There are two observations to be made. First, if n > 1, then the set A of actions contains at least two elements, for otherwise the requirement that all first approximations of the distinct n-residuals of P must not equal a ◦ D cannot be met. Second, not only are all of P ’s n-residuals distinct, by extension the same holds of all m-residuals with m < n. Moreover, since all first approximations of n-residuals of P must not equal a ◦ D, it follows that for any m-residual Q and m′ -residual R with 0 ≤ m < m′ ≤ n it is necessarily so that Q 6= R. Summarizing that second observation, we see that every m-residual (m ≤ n) of a thread P with the a-n-property is unique. As a result any instruction sequence with the a-nproperty has at least 2n − 1 distinct test instructions with action a. Analyzing the proof, it turns out that it relies specifically on this second observation about threads with the a-n-property; requiring that threads with the a-n-property (n > 1) contain non-a actions is merely a means to that end. It turns out that we can define a slightly different class of threads with this second property without requiring that |A| ≥ 2: we say that a thread P has the a+n-property if πn (P ) = an ◦ D and P has 2n distinct n-residuals, none of which equals an (n−m)-residual of P (for m > 0). To see why every m-residual (m ≤ n) of a thread P with the a+n-property is unique, assume the contrary: then there are values m and m′ with m ≤ m′ ≤ n such that some mresidual Q of P equals an m′ -residual R of P . But then every (n − m′ )-residual of R equals some (n − m′ )-residual of Q. This yields a contradiction, because every (n − m′ )-residual of R is an n-residual of P , which is by definition distinct from any (n − m′ )-residual of Q, because m + (n − m′ ) ≤ n. Figure 6.1 attemps to visualize this argument using a thread T with the a+5-property. For every n ∈ N+ a thread P with the a+n-property can be created, such that P performs only a actions. Fix some n and let g : [0, 2n − 1] → {true, false}n be a bijection, where 46 Chapter 6. Some Expressiveness Results {true, false}n is the set of all boolean sequences of length n. We write (g(m))d+1 for the (d+1)th element of g(m). Now we define the family of threads P l for all 1 ≤ l < 2n such that:2 ( P 2l E a D P 2l+1 if l < 2n−1 , l P = (6.1a) n n Q2l−2n E a D Q2l−2n +1 otherwise, Q0m = a ◦ D, ( Qdm E a D D d+1 Qm = D E a D Qdm (6.1b) if (g(m))d+1 = false, otherwise. (6.1c) Informally, the thread P 1 performs n a-actions after which some state Qnm is reached. Due to the nature of g, Qnm 6= Qnm′ for distinct m and m′ . For example, for n = 2 and taking g such that 0 7→ {false, false}, 1 7→ {false, true}, 2 7→ {true, false}, 3 7→ {true, true}, the following equations are defined: P 1 = P 2 E a D P 3, P 2 = Q20 E a D Q21 , P 3 = Q22 E a D Q23 , and, Q20 = Q10 E a D D, Q21 = Q11 E a D D, Q22 = D E a D Q12 , Q23 = D E a D Q13 , Q10 = Q00 E a D D, Q11 = D E a D Q01 , Q12 = Q02 E a D D, Q13 = D E a D Q03 , Q00 = a ◦ D, Q01 = a ◦ D, Q02 = a ◦ D, Q03 = a ◦ D. Observe that any thread Qnm performs n + 1 a-actions only if the sequence of boolean replies yielded by the first n actions is exactly according to g(m). Thus each thread Qnm is a unique n-residual of P 1 (recall that g is bijective). Since D is a 1-residual of every thread Qnm , but not of any thread P l we conclude that P 1 meets the necessary criteria to have the a+n-property. Replacing any thread with the a-n-property in the proof of Bergstra & Ponse with a thread with the a+n-property results in a valid proof which requires only that |A| 6= ∅, as opposed to |A| > 1. This proves our claim. We have now established that arbitrarily many distinct jump instructions are required to let C express all finite threads. It turns out that jump instructions in a single direction suffice. Proposition 6.3. Let J → ⊆ J→ be an infinite but otherwise arbitrary set of forward jump instructions and let the code semigroup C ′ be generated by the instruction set P→ ∪J → ∪{!}. Then C ′ can express all finite thread but no infinite threads. This also holds if P→ is replaced by N→ . If J ← ⊆ J← is an infinite but otherwise arbitrary set of backward jump instructions, then the instruction sets P← ∪ J ← ∪ {!} and N← ∪ J ← ∪ {!} also generate a code semigroup which characterizes BTA. Proof. As C ′ does not contain backward instructions, it cannot create any kind of loop (for + all i, j ∈ Z, if i →X j according to some X ∈ IC ′ , then necessarily i < j). Every instruction sequence is finite, thus so is any thread extracted from a C ′ -inseq X. What remains to be shown is that all BTA threads can be described by C ′ . Let P ∈ BTA be a finite thread. We will inductively construct a C ′ instruction sequence → XP such that |XP |C = P . For convenience we will define F = {δ(u) | u ∈ J → } to be the set of jump counters of admitted jump instructions. 2 In this definition relevant values for d and m are in the ranges [0, n − 1] and [0, 2n − 1], respectively. 6.1. The Expressiveness of Subsemigroups of C 47 If P = S then define XP = !. If P = D then define XP = /#k, for some k ∈ F . Otherwise + P = Q E a D R for some a ∈ A and Q, R ∈ BTA. By induction there are XQ , XR ∈ IC ′ → → such that |XQ |C = Q and |XR |C = R. ′ Create an inseq XR from XR by changing the jump counter k of any jump instruction at an exit position in XR to some value k ′ ∈ {j ∈ F | j ≥ k + ℓ(XQ )}. (These are the instructions which upon execution cause deadlock). ′ ′ Now we define XP = +/a; /#k; XR ; (!)p ; XQ , where k ∈ {j ∈ F | j > ℓ(XR )} and → ′ p = k − ℓ(XR ) − 1. It is not hard to see that indeed |XP |C = P . Note that the termination instructions introduced here are solely for the purpose of padding. They are not reachable from the leftmost instruction. A similar construction can be made using negative tests. When using backward jump instructions create an inseq XP such that |XP |← C = P. Although all finite threads can be expressed using jump instructions in only one direction, this is not the case for all regular threads. In fact, infinitely many distinct jump instructions in both directions are necessary. + Definition 6.4. In an instruction sequence X = u1 ; u2 ; . . . ; uk ∈ IA an instruction uj is i-n-relevant if there exists an instruction sequence X ′ , created from X by changing uj to i i some other instruction u ∈ IA , such that πn (|X|A ) 6= πn (|X ′ |A ). In other words: the nth projection of the execution of inseq X starting at position i depends on uj . Observe that any instruction which is i-n-relevant is also i-(n+1)-relevant. Theorem 6.5. Let A be non-empty and fix some k ∈ N+ . Let IC ′ be the largest subset of IC which does not contain forward (backward) jump instructions with a jump counter greater than k (i.e., IC ′ contains a finite number of forward or backward jump instructions). Then the semigroup C ′ generated by IC ′ cannot express all regular threads. Proof. Let k be fixed and select n such that 2n ≥ 2k + 3. We will assume that C ′ restricts forward jump instructions (a similar argument holds if backward jump instructions are restricted). Let g : [0, 22n − 1] → {true, false}2n be a bijection, where {true, false}2n is the set of all boolean sequences of length 2n. We write (g(m))d+1 for the (d+1)th element of g(m). Now we define the family of threads P l for all 1 ≤ l < 22n such that:3 ( P 2l E a D P 2l+1 if l < 22n−1 , Pl = (6.2a) 2n Q2n 2l−22n E a D Q2l−22n +1 otherwise, Q0m = D, ( n Qdm E a D P 2 +[m]2n d+1 Qm = n P 2 +[m]2n E a D Qdm (6.2b) if (g(m))d+1 = false, otherwise. (6.2c) Figure 6.2 presents a graphical representation of thread P 1 for n = 2. Observe the similarities of this set of equations to those presented in (6.1). Recall from §5.3.1 that [m]2n is the remainder of m after division by 2n . Informally, the thread P 1 performs 2n a-actions after which some state Q2n m is reached. Distinct sequences of boolean replies to these actions 2n result in distinct values for m (0 ≤ m < 22n ). Due to the nature of g, Q2n m 6= Qm′ for distinct ′ 2n m and m . (To see why, observe that the 2n-residual D of Qm can be reached starting in state Q2n m only if the replies to the first 2n a-actions are precisely according to g(m)—and g 1 is a bijection). Thus each thread Q2n m is a unique 2n-residual of P . Since D is a 2n-residual 2n l of every thread Qm , but not of any thread P we conclude that P 1 meets the necessary criteria to have the a+2n-property. Towards a contradiction assume that there exists a C ′ -expression X such that |X|iC = P 1 i for some i ∈ [1, ℓ(X)]. We define f (l) = min{i | |X|C = P l } to be the function which 3 In this definition relevant values for d and m are in the ranges [0, 2n − 1] and [0, 22n − 1], respectively. 48 Chapter 6. Some Expressiveness Results P1 P3 P2 P4 Q10 Q00 P6 P8 P9 P 10 P 11 Q40 Q41 Q42 Q43 Q44 Q45 Q46 Q47 Q30 Q20 P5 P 12 P7 P 13 P 14 P 15 Q48 Q49 Q410 Q411 Q412 Q413 Q414 Q415 Q33 Q23 Q13 Q03 Figure 6.2: Graphical representation of the thread described by P 1 as defined by (6.2), n for n = 2. Observe that the threads P 4 , P 5 , P 6 and P 7 (i.e. the threads P 2 through n+1 P 2 −1 ) are n-residuals of of P 1 . Likewise each thread thread Q4m = Q2n m is a 2n-residual of P 1 . Each thread Q4m is distinct, and each of P 1 ’s n-residuals is a residual thread of each thread Q4m . Expanded are threads Q40 and Q43 which are defined according to g(0) = {false, false, false, false} and g(3) = {false, false, true, true}, respectively. Note that Q0m = D for all m ∈ [0, 15], thus in particular Q00 = Q03 = D. returns the leftmost position in X from which the thread P l can be extracted. Without loss of generality we will assume that all instructions in X are reachable from position i, for if not, then by Proposition 3.5 we can create an instruction sequence X ′ for which this does hold. The largest jump counter of any forward jump instruction in X ′ would be less than or equal to the largest forward jump distance in X. ′ For distinct l, l′ < 22n it is the case that P l 6= P l (because P 1 has the a+2n-property) and thus necessarily f (l) 6= f (l′ ). The n-residuals of P 1 are the threads P l for l ∈ [2n , 2n+1 − 1]. The integers in this range are totally ordered by the function f :4 l0 , l1 , . . . , l2n −1 . No instruction in X is both f (li )-n-relevant and f (lj )-n-relevant for distinct i and j, because every thread P li is an n-residual of P 1 , and P 1 has the a+2n-property. Moreover, the nn lm in residuals of any thread P li are the threads Q2n i2n +m , for 0 ≤ m < 2 . The thread P 2n turn is an 1-residual (and a 2, 3, . . . , 2n-residual) of the thread Qi2n +m . Thus every thread P lj is a residual thread of every thread P li . Recall that 2n ≥ 2k + 3 and that C ′ does not contain forward jump instructions over a distance greater than k. Thus for some i < k + 1 all f (li )-n-relevant instructions are left of position f (lk+1 ). For if not, then there are k+1 distinct positions < f (lk+1 ) containing jump instructions which target k + 1 distinct positions > f (lk+1 ). This is not possible because of the restriction on forward jump counters. Fix said i, and note that there are at least k + 1 instructions which are f (li )-(n+1)relevant to the right of f (lk+1 ): namely f (lk+2 ), f (lk+3 ), . . . , f (l2k+2 ). This leads to a contradiction, since this, too, is not possible because of the restriction on jump counters. 4 The ordering on [2n , 2n+1 − 1] imposed by f does not need to be the natural ordering of these integers! 6.1. The Expressiveness of Subsemigroups of C 49 Now that it has been established that an upper bound on the value of jump counters limits expressiveness, even if only in a single direction, the question naturally arises whether any two infinite collections of forward and backward jump instructions suffice to express all regular threads. We prove that this is indeed the case. Theorem 6.6. Let J → ⊆ J→ and J ← ⊆ J← be two infinite but otherwise arbitrary sets of jump instructions and let the code semigroup C ′ be generated by the set P→ ∪ J → ∪ J ← ∪ {!}. Then all regular threads can be expressed by C ′ . This also holds if P→ is replaced by N→ , P← or N← . Proof. Fix some infinite J → ⊆ J→ and J ← ⊆ J← and select arbitrary T ∈ BTAreg with states P0 , P1 , . . . , Pn−1 . Then the result of the procedure ConstructInseq(T , {δ(u) | u ∈ → J → }, {δ(u) | u ∈ J ← }) as outlined in Algorithm 6.1 is a C ′ -inseq X such that |X|C = T . Algorithm 6.1 C-expression construction using a restricted set of jump counters Require: A regular thread T with states P0 , P1 , . . . , Pn−1 and infinite sets F, B ⊆ N. → ← Ensure: A C-inseq X with |X|→ C = P0 , {δ(u) | u ∈ J (X)} ⊂ F , {δ(u) | u ∈ J (X)} ⊂ B. 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: procedure ConstructInseq(T , F , B) s ← RandomSelect({j ∈ F | j ≥ 4}) z ← n · s · (s − 1) ⊲ Largest (rightmost) instruction position I←∅ ⊲ Set of (position, instruction) tuples for i ← 0 to n − 1 do for r ← 0 to s − 1 do c ← (i · s + r) · (s − 1) + 1 if Pi = S then I ← I ∪ {(c, !)} else if Pi = D then d ← RandomSelect({j ∈ B | j ≥ c}) I ← I ∪ {(c, \#d)} ⊲ Jump outside program: deadlock else if Pi = Pj E a D Pk then I ← I ∪ {(c, +/a)} I ← I ∪ Connect(c + 1, j · s · (s − 1) + 1, z, s, F , B) z ← max{p | ∃u[(p, u) ∈ I]} I ← I ∪ Connect(c + 2, k · s · (s − 1) + 1, z, s, F , B) z ← max{p | ∃u[(p, u) ∈ I]} end if end for end for return ConcatInstructions(I ∪ {(p, !) | 0 < p < z, ¬∃u[(p, u) ∈ I]}) end procedure procedure Connect(i, j, z, s, F , B) r ← i + RandomSelect({k ∈ F | i + k > z}) l ← r − RandomSelect({k ∈ B | r − k ≤ j}) p ← ⌊(j − l)/s⌋ p ← p + j − (l + p · s) return {(i, /#r−i)} ∪ {(r + k · s, /#s) | 0 ≤ k < p} ∪ {(r + p · s, \#r−l)} end procedure Suppose we want to transfer control of execution in an inseq X from position i to position j. Obviously, J → ∪ J ← may not contain the jump instruction required to jump immediately from i to j. In fact, it may be so that no sequence of jump instructions permitted by J → ∪ J ← can transfer control of execution from position i to j. For example, if only even 50 Chapter 6. Some Expressiveness Results jump counters are available, then control of execution cannot be transferred from i to j if i − j is odd. Algorithm 6.1 solves this issue by producing an instruction sequence X in which functionally equivalent subsequences of instructions are repeated s times at evenly spaced intervals of length s − 1. The value of s is selected from the set of permissible forward jump counters J → , with the sole restriction that s ≥ 4. Thus, for any Pk there are at least s positions j0 , j1 , . . . , js−1 (with jm+1 = jm + s − 1) in X from which Pk can be extracted and for any position i in X there is at least one such position jm such that i = jm (mod s). Now the general procedure to “connect” a position i to one such jm in X using a sequence of permissible jump instructions is to extend X with a sequence of jump instructions to the right of X, as follows. First, select a sufficiently large forward jump instruction f which, if placed at position i, jumps outside of X to some position r. Second, select a sufficiently large backward jump instruction b which, if placed at position r, jumps to a position l ≤ j0 . Now observe that, instead of placing b at position r, we can add a sequence of chained /#s instructions, starting at position r and extending to the right, such that they transfer control of execution to some position r′ > r. r′ can be selected such that if the backward instruction b were placed there, it would jump to a position l′ between j0 − (s − 1) and j0 . By adding another j0 − l′ chained /#s instructions starting at position r′ , control of execution will be transferred to a position r′′ > r′ from which the instruction b will target exactly one of the positions jm . Specifically, m = j0 − l′ . The procedure described here is performed by Connect(i, j1 , ℓ(X), s, {δ(u) | u ∈ J → }, {δ(u) | u ∈ J ← }), which returns the required jump instructions and the positions where they should be placed. The procedure ConstructInseq(T , {δ(u) | u ∈ J → }, {δ(u) | u ∈ J ← }) selects a suitable value s and ensures that for every thread Pi there are s positions j0 , j1 , . . . , js−1 from which Pi can be extracted. At each of these positions it places a suitable instruction: ! if Pi = S, # if Pi = D and +/a if Pi = Pi′ E a D Pi′′ . In the latter case Connect(. . . ) is used to ensure that indeed either of Pi′ and Pi′′ will be reached after exectution of action a. 6.2 The Expressiveness of Subsemigroups of Cg Equipped with the translations of Chapter 5 and the theorems of §6.2, we are now ready to make statements about the expressiveness of Cg and some of its subsemigroups. Proposition 6.7. Each thread definable in Cg is regular, and each regular thread can be expressed in Cg. Proof. This follows immediately from the fact that c2cg and cg2c are behavior preserving and total. Since C characterizes the regular threads (see Proposition 3.1), so does Cg. Theorem 6.8. Let A be non-empty. There does not exists a value k ∈ N+ such that Cg≤k can express all finite threads. Proof. Upon analyzing the family of translations cg2ck as defined in §5.4.1, we see that they map Cg≤k -expressions to behaviorally equivalent C≤4k+12 -expressions. Thus if Cg≤k can express all finite threads, then so can C≤4k+12 . But by Theorem 6.2 this is impossible. Proposition 6.9. Let G→ ⊆ G→ be an infinite but otherwise arbitrary set of forward goto instructions and let L→ ⊆ L→ constitute the set of label instructions which match the goto instructions in G→ . Then the code semigroup Cg ′ generated by the instruction set P→ ∪ G→ ∪ L→ ∪ {!} can express all finite threads but no infinite threads. This also holds if P→ is replaced by N→ . If the infinite sets G← ⊆ G← and L← ⊆ L← are defined analogously, then the instruction sets P← ∪ G← ∪ L← ∪ {!} and N← ∪ G← ∪ L← ∪ {!} also generate a code semigroup capable of expressing all finite threads. 6.2. The Expressiveness of Subsemigroups of Cg 51 Proof. As in the proof of Proposition 6.3 we observe that Cg ′ does not contain backward instructions. Thus it can only express finite threads, as loops (a requirement for infinite behavior) cannot be constructed in Cg ′ . Now we need to show all BTA threads can be expressed by Cg ′ . We will inductively define a Cg ′ instruction sequence XP for every P ∈ BTA such that → |XP |→ Cg = P . Let F = {λ(u) | u ∈ G } be the set of label numbers of available goto instructions. If P = S then XP = !. If P = D then set XP = /##£l, where l is an arbitrary element → + of F . Otherwise P = Q E a D R and there are XQ , XR ∈ ICg ′ such that |XQ |Cg = Q and → |XR |Cg = R. Select some label number l ∈ F such that it is not present in XQ or XR . Then XP = +/a; /##£l; XR ; /£l; XQ . A similar construction can be made using negative tests. When using backward goto ← instructions create an inseq XP such that |XP |Cg = P . Theorem 6.10. Let A be non-empty and fix some value k ∈ N+ . Let ICg′ be the largest subset of ICg which does not contain forward (backward) goto instructions with a label number k or greater (i.e., ICg′ contains a finite number of forward or backward goto instructions). Then the semigroup Cg ′ generated by ICg′ cannot express all regular threads. Proof. The proof is analogous to that of Theorem 6.5. Again select n such that 2n ≥ 2k + 3 and consider the thread P1 as defined by (6.2). As before the function f (l) = min{i | i |X|C = P l } induces a total ordering on the range [2n , 2n+1 − 1], say l0 , l1 , . . . l2n −1 . Observe that for some i < k + 1 all f (li )-n-relevant instructions are left of position f (lk+1 ), for otherwise there must be k + 1 distinct goto instructions on positions < f (lk+1 ) which target k + 1 distinct label instructions on positions > f (lk+1 ); impossible, as ICg′ contains only k distinct forward goto instructions. Fixing said i we note that there are at least k +1 positions which are f (li )-(n+1)-relevant to the right of f (lk+1 ): this too is impossible, for the same reason. Contradiction. Chapter Discussion This thesis can be divided into four parts: the introduction of C and the theory behind it, the introduction of Cg as an alternative to C, the definition of translations between these, and several results about the expressiveness of C and Cg. We have proved that C and Cg are equally expressive by means of the total mappings c2cg and cg2c. We have also proved that such translations are only possible if the maximum jump counter (or label number) in the input inseq is known. As a result c2cg and cg2c cannot be homomorphic. We then went on to prove that any subsemigroup of C (Cg) needs to contain infinitely many jump instructions (matching label and goto instructions) in order to express all finite threads (Theorem 6.2, Theorem 6.8). In order to express all regular threads it is even necessary that such a semigroup contains infinitely many jump instructions (label/goto instructions) in both directions (Theorem 6.5, Theorem 6.10). The upshot is that any such infinite collection of jump instructions (label/goto instructions) suffices (Theorem 6.6, the corresponding result for Cg is trivial). 7.1 Further Work The translations between C and Cg in Chapter 5 use label and goto instructions to mimic the behavior of jump instructions and vice versa. There are some open questions about the nature of these translations: it is not known whether alternative behavior preserving mappings can be defined which employ less jump instructions or label/goto instructions. More precisely, • Given an arbitrary value k ∈ N, what is the smallest value k ′ ∈ N for which there + + exists a behavior preserving mapping f : ICg → IC ? (By definition of equation ≤k ≤k′ (5.8) in §5.4.1 we already know that k ′ ≤ 4k + 12.) • As demonstrated by the translations defined in §5.3, there exist behavior preserving + + → ICg for all k > 2. Is there any value k ∈ N such that for some mappings f : IC ≤k ≤k + + ′ k < k the mapping f : IC≤k → ICg is behavior preserving? ≤k′ 7.2 Acknowledgements First and foremost I want to thank my supervisor, Alban Ponse, for his guidance and most of all patience; the writing of this thesis took much longer than it should have. I thank Kyndylan Nienhuis for asking some smart questions about the semantics of Cg, which led to the inclusion of §4.6. I thank my family and especially Vera Matei for their support during the writing of this thesis. 53 7 Appendix Overview of Defined Translations Figure A.1 provides a graphical representation of the most important sets of (single pass) + instruction sequences introduced in this thesis. Recall that the set IC contains all C+ + expressions. For arbitrary k ∈ N, IC≤k is the largest subset of IC which does not contain + C-inseqs with relative jumps over a distance greater than k. Similarly, ICg contains all Cg+ expressions, and ICg≤k contains those inseqs without goto instructions with a label number greater than k. All PGA terms are contained in P ; the set P 1 is the largest set which is restricted to single pass instruction sequences in first canonical form. P 2 contains PGA’s second canonical forms. c2cg cg2c + ICg + ICg ≤k + IC ≤k sn c2cgk d2 c pga 2c + + IC IC ≤4k+12 cg2ck fs t sn P1 P2 d P Figure A.1: Overview of semigroups and single-pass instruction sequences and certain behavior preserving mappings defined between then, as introduced in this thesis. Dotted arrows represent homomorphisms. There is also a non-homomorphic version of c2cgk (§5.3.1). 55 A Appendix Proof by Bergstra & Ponse The proof of Theorem 6.1 is presented in Section 9 of [BP09a]. As the proof of Theorem 6.2 builds upon this result, Section 9 of [BP09a] is reproduced here verbatim, with kind permission of the authors. Three minor changes have been applied: a section reference has been updated to point to an equivalent section in this thesis, a footnote has been added and the last paragraph has been left out, as it is merely an introduction to Section 10 of that publication. Observe that [BP09a] uses notation which in some places differs slightly from notation introduced in this thesis. B.1 Expressiveness and reduced instruction sets In this section we further consider C’s instructions in the perspective of expressiveness. We show that setting a bound on the size of jump counters in C does have consequences with respect to expressiveness: let Ck be defined by allowing only jump instructions with counter value k or less. We first introduce some auxiliary notions: following the definition of residual threads in Section 2.1, we say that thread Q is a 0-residual of thread P if P = Q, and an n + 1-residual of P if for some a ∈ A, P = P1 E a D P2 and Q is an n-residual of P1 or of P2 . Note that a finite thread (in BTA) only has n-residuals for finitely many n, while for the thread P defined by P = a ◦ P it holds that P is an n-residual of itself for each n ∈ N. Let a ∈ A be fixed and n ∈ N+ . Thread P has the a-n-property if πn (P ) = an ◦D and P has 2n − 1 (different) n-residuals which all have a first approximation not equal to a ◦ D.1 So, if a thread P has the a-n-property, then n consecutive a-actions can be executed and each sequence of n replies leads to a unique nresidual. Moreover, none of these residual threads starts with an a-action (by the requirement on their first approximation). We note that for each n ∈ N+ we can find a finite thread with the a-n-property. In the next section we return to this point. A piece of code X has the a-n-property if for some i, |X|i has this property. It is not hard to see that in this case X contains at least 2n − 1 different a-tests. 1 It appears that the authors meant to use 2n instead of 2n − 1 in this sentence, though this does not affect the proof in any serious way. —Stephan 57 B 58 Appendix B. Proof by Bergstra & Ponse As an example, consider X = ! ; \b; +\a; +/a; \#2; +/a; /#2; /c; # Clearly, X has the a-2-property because |X|4 has this property: its 2-residuals are b ◦ S, S, D and c ◦ D, so each thread is not equal to one of the others and does not start with an a-action. Note that if a piece of code X has the a-(n + k)-property, then it also has the a-n-property. In the example above, X has the a-1-property because |X|3 has this property (and |X|6 too). Lemma 1. For each k ∈ N there exists n ∈ N+ such that no X ∈ Ck has the a-n-property. Proof. Suppose the contrary and let k be minimal in this respect. Assume for each n ∈ N+ , Yn ∈ Ck has the a-n-property. Let B = {true, false}. For α, β ∈ B ∗ we write αβ if α is a prefix of β, and we write α ≺ β or β ≻ α if α  β and α 6= β. Furthermore, let n [ Bi, B ≤n = i=0 ≤n ∗ thus B contains all B -sequences α with ℓ(α) ≤ n (there are 2n+1 − 1 such sequences). Let g : N → N be such that |Yn |g(n) has the a-n-property. Define fn : B ≤n → N+ by fn (α) = m if the instruction reached in Yn when execution started at position g(n) after the replies to a according to α has position m. Clearly, fn is an injective function. In the following claim we show that under the supposition made in this proof a certain form of squeezing holds: if k ′ is sufficiently large, then for all n > 0 ′ there exist α, β, γ ∈ B k with fk′ +n (α) < fk′ +n (β) < fk′ +n (γ) with the property ′ that fk′ +n (α) < fk′ +n (β ′ ) < fk′ +n (γ) for each extension β ′ of β within B ≤k +n . This claim is proved by showing that not having this property implies that “too many” such extensions β ′ exist. Using this claim it is not hard to contradict the minimality of k. ′ Claim 1. Let k ′ satisfy 2k ≥ 2k + 3. Then for all n > 0 there exist α, β, γ ∈ B k with fk′ +n (α) < fk′ +n (β) < fk′ +n (γ) ′ ′ such that for each extension β ′  β in B ≤k +n , fk′ +n (α) < fk′ +n (β ′ ) < fk′ +n (γ). ′ Proof of Claim 1. Let k ′ satisfy 2k ≥ 2k + 3. Towards a contradiction, suppose ′ the stated claim is not true for some n > 0. The sequences in B k are totally ordered by fk′ +n , say fk′ +n (α1 ) < fk′ +n (α2 ) < . . . < fk′ +n (α2k′ ). B.1. Expressiveness and reduced instruction sets Consider the following list of sequences: α1 , α2 , . . . , α2k+2 , α2k+3 {z } | choices for β By supposition there is for each choice β ∈ {α2 , . . . , α2k+2 } an extension β ′ ≻ β ′ in B ≤k +n with either fk′ +n (β ′ ) < fk′ +n (α1 ), or fk′ +n (β ′ ) > fk′ +n (α2k+3 ). Because there are 2k + 1 choices for β, assume that at least k + 1 elements β ∈ {α2 , . . . , α2k+2 } have an extension β ′ with fk′ +n (β ′ ) < fk′ +n (α1 ) (the assumption fk′ +n (β ′ ) > fk′ +n (α2k+3 ) for at least k + 1 elements β with extension β ′ leads to a similar argument). Then we obtain a contradiction with respect to fk′ +n : for each of the sequences β in the subset just selected and its extension β ′ , fk′ +n (β ′ ) < fk′ +n (α1 ) < fk′ +n (β), and there are at least k + 1 different such pairs β, β ′ (recall fk′ +n is injective). But this is not possible with jumps of at most k because the fk′ +n values of each of these pairs define a path in Yk′ +n that never has a gap that exceeds k and that passes position fk′ +n (α1 ), while different paths never share a position. This finishes the proof of Claim 1. Take according to Claim 1 an appropriate value k ′ , some value n > 0 and ′ α, β, γ ∈ B k . Consider Yk′ +n and mark the positions that are used for the computations according to α and γ: these computations both start in position g(k ′ + n) and end in fk′ +n (α) and fk′ +n (γ), respectively. Note that the set of marked positions never has a gap that exceeds k. Now consider a computation that starts from instruction fk′ +n (β) in Yk′ +n , a position in between fk′ +n (α) and fk′ +n (γ). By Claim 1, the first n a-instructions have positions in between fk′ +n (α) and fk′ +n (γ) and none of these are marked. Leaving out all marked positions and adjusting the associated jumps yields a piece of code, say Y , with smaller jumps, thus in Ck−1 , that has the a-n-property. Because n was chosen arbitrarily, this contradicts the initial supposition that k was minimal. Theorem 1. For any k ∈ N+ , not all threads in BTA can be expressed in Ck . This is also the case if thread extraction may start at arbitrary positions. Proof. Fix some value k. Then, by Lemma 1 we can find a value n such that no X ∈ Ck has the a-n-property. But we can define a finite thread that has this property. 59 Bibliography [BL00] Jan A. Bergstra and M. E. Loots, Program Algebra for Component Code, Formal Asp. Comput. 12 (2000), no. 1, 1–17. [BL02] , Program Algebra for Sequential Code, J. Log. Algebr. Program. 51 (2002), no. 2, 125–156. [BP09a] Jan A. Bergstra and Alban Ponse, An Instruction Sequence Semigroup with Involutive Anti-Automorphisms, Scientific Annals of Computer Science (2009), no. 19, 57–92. [BP09b] , An Instruction Sequence Semigroup with Involutive Anti-Automorphisms, CoRR abs/0903.1352v1 (2009). [CP61] A. H. Clifford and G. B. Preston, The Algebraic Theory of Semigroups, Volume I, Mathematical Surveys, no. 7, American Mathematical Society, Providence, Rhode Island, 1961. [GJSB05] James Gosling, Bill Joy, Guy Steele, and Gilad Bracha, The Java Language Specification, third ed., Addison-Wesley, June 2005. [ISO99] ISO, ISO C Standard 1999, Tech. report, 1999, ISO/IEC 9899:1999 draft. [KR88] Brian W. Kernighan and Dennis Ritchie, The C Programming Language, second ed., Prentice-Hall, 1988. [PvdZ06] Alban Ponse and Mark van der Zwaag, An Introduction to Program and Thread Algebra, CiE (Arnold Beckmann, Ulrich Berger, Benedikt Löwe, and John V. Tucker, eds.), Lecture Notes in Computer Science, vol. 3988, Springer, 2006, pp. 445–458. 61
6cs.PL
Online estimation of the asymptotic variance for averaged stochastic gradient algorithms arXiv:1702.00931v2 [math.ST] 16 Oct 2017 Antoine Godichon-Baggioni Institut de Mathématiques de Toulouse, Université Paul Sabatier, 31000 Toulouse, France email: [email protected] April 11, 2018 Abstract Stochastic gradient algorithms are more and more studied since they can deal efficiently and online with large samples in high dimensional spaces. In this paper, we first establish a Central Limit Theorem for these estimates as well as for their averaged version in general Hilbert spaces. Moreover, since having the asymptotic normality of estimates is often unusable without an estimation of the asymptotic variance, we introduce a new recursive algorithm for estimating this last one, and we establish its almost sure rate of convergence as well as its rate of convergence in quadratic mean. Finally, two examples consisting in estimating the parameters of the logistic regression and estimating geometric quantiles are given. Keywords: Stochastic Gradient Algorithm, Averaging, Central Limit Theorem, Asymptotic Variance. 1 Introduction High Dimensional and Functional Data Analysis are interesting domains which do not have stopped growing for many years. To consider these kinds of data, it is more and more important to think about methods which take into account the high dimension as well as the possibility of having large samples. In this paper, we focus on an usual stochastic optimization problem which consists in estimating m := arg min E [ g ( X, h)] , h∈ H where X is a random variable taking values in a space X and g : X × H −→ R, where H is a separable Hilbert space. In order to build an estimator of m, an usual method was to consider the solver of the problem generated by the sample, i.e to consider M-estimates (see Huber and Ronchetti (2009) and Maronna et al. (2006) among others). In order to build these estimates, deterministic convex optimization algorithms (see Boyd and Vandenberghe 1 (2004)) are often used (see Vardi and Zhang (2000), Oja and Niinimaa (1985) in the case of the median), and these methods are really efficient in small dimensional spaces. Nevertheless, in a context of high dimensional spaces, this kind of method can encounter many computational problems. The main ones are that it needs to store all the data, which can be expensive in term of memory and that they cannot deal online with the data. In order to overcome this, stochastic gradient algorithms (Robbins and Monro (1951)) are efficient candidates since they do not need to store the data into memory, and they can be easily updated, which is crucial if the data arrive sequentially (see Duflo (1996), Duflo (1997), Kushner and Yin (2003a) or Nemirovski et al. (2009) among others). In order to improve the convergence, Ruppert (1988) and Polyak and Juditsky (1992) introduced its averaged version (see also Dippon and Renz (1997) for a weighted version). These algorithms have become crucial to statistics and modern machine learning (Bach and Moulines (2013), Bach (2014), Juditsky et al. (2014)). There are already many results on these algorithms in the literature, that we can split into two parts: asymptotic results, such as almost sure rates of convergence (Schwabe and Walk, 1996; Duflo, 1997; Walk, 1992; Pelletier, 1998, 2000), and non asymptotic ones, such as rates of convergence in quadratic mean (Cardot et al., 2017; Godichon-Baggioni, 2016a; Bach and Moulines, 2013; Bach, 2014; Nemirovski et al., 2009). In a recent work, Godichon-Baggioni (2016b) introduces a new framework, with only locally strongly convexity assumptions, in general Hilbert spaces, which allows to obtain almost sure and L p rates of convergence. In keeping with it, and in order to have a deeper study of the stochastic gradient algorithm as well as of its averaged version (up to a new assumption), we first give the asymptotic normality of the estimates. In a second time, since a Central Limit Theorem is often unusable without an estimation of the variance, we introduce a recursive algorithm, inspired by Gahbiche and Pelletier (2000), to estimate the asymptotic variance of the averaged estimator and we establish its rates of convergence. As far as we know, there was not yet an efficient and recursive estimate of the asymptotic variance in the literature. Finally, two examples of application are given. The first usual one consists in estimating the parameters of the logistic regression (Bach, 2014) while the second one consists in estimating geometric quantiles (see Chaudhuri (1996) and Chakraborty and Chaudhuri (2014)), which are useful robust indicators in statistics. Indeed, they are often used in data depth and outliers detection (Serfling (2006), Hallin and Paindaveine (2006)), as well as for robust estimation of the mean and variance (see Minsker et al. (2014)), or for Robust Principal Component Analysis (Gervini (2008), Kraus and Panaretos (2012), Cardot and Godichon-Baggioni (2017)). The paper is organized as follows: Section 2 recalls the framework introduced by GodichonBaggioni (2016b) before giving two new assumptions which allow to get the rate of convergence of the estimators of the asymptotic variance. In section 3, the stochastic gradient algorithm as well as its averaged version are introduced and their asymptotic normality are given. The recursive estimator of the asymptotic variance is given in Section 4 and its almost sure as well as its quadratic mean rates of convergence are established. Applications, consisting in estimating the logistic regression parameters and in the recursive estimation 2 of geometric quantiles, are given in Section 5 as well as a short simulation study. Finally, the proofs are postponed in Section 6 and in Appendix. 2 Assumptions Let H be a separable Hilbert space such as Rd or L2 ( I ) (for some closed interval I ⊂ R), we denote by h., .i its inner product and by k.k the associated norm. Let X be a random variable taking values in a space X , and let G : H −→ R be the function we would like to minimize, defined for all h ∈ H by G (h) := E [ g( X, h)] , (1) where g : X × H −→ R. Moreover, let us suppose that the functional G is convex. Finally, let us introduce the space of linear operators on H, denoted by S( H ), equipped with the Frobenius (or Hilbert-Schmidt) inner product, which is defined by h A, Bi F := ∑ A(e j ), B(e j ) , ∀ A, B ∈ S( H ), j∈ J  is an orthonormal basis of H. We denote by k.k F the associated norm, and S( H ) is then a separable Hilbert space. Let us recall the framework introduced by Godichon- where e j j∈ J Baggioni (2016b): (A1) The functional g is Frechet-differentiable for the second variable almost everywhere. Moreover, G is differentiable and there exists m ∈ H such that ∇ G (m) = 0. (A2) The functional G is twice continuously differentiable almost everywhere and for all positive constant A, there is a positive constant C A such that for all h ∈ B (m, A), kΓh kop ≤ C A , where Γh is the Hessian of the functional G at h and k.kop is the usual spectral norm for linear operators. (A3) There exists a positive constant e such that for all h ∈ B (m, e), there is an orthonormal basis of H composed of eigenvectors of Γh . Moreover, let us denote by λmin the limit inf of the eigenvalues of Γm , then λmin is positive. Finally, for all h ∈ B (m, e), and for all eigenvalue λh of Γh , we have λh ≥ λmin 2 > 0. (A4) There are positive constants e, Ce such that for all h ∈ B (m, e), k∇ G (h) − Γm (h − m)k ≤ Ce kh − mk2 . 3 (A5) (a) There is a positive constant L1 such that for all h ∈ H, h E k∇h g ( X, h)k 2 i  ≤ L1 1 + k h − m k 2  . (a’) There is a positive constant L2 such that for all h ∈ H, h i   E k∇h g ( X, h)k4 ≤ L2 1 + k h − mk4 . (b) For all integer q, there is a positive constant Lq such that for all h ∈ H, h i   E k∇h g ( X, h)k2q ≤ Lq 1 + k h − mk2q . Let us now make some comments on assumptions. First, Assumption (A1) ensures the existence of a solution and enables to use a stochastic gradient descent, while (A2) gives some smoothness properties on the objective function. Assumption (A3) ensures the uniqueness of the minimizer of G, and (A4),(A5) give bounds of the gradient and of the remainder term of its Taylor’s expansion. The main difference between this framework and the usual one for strongly convex objective is that we just assume the local strong convexity of the objective function, and in return, p-th moments of the gradient of the functional g have to be bounded. Note also that the Hessian of the functional G is not supposed to be compact, so that its smallest eigenvalue does not necessarily converge to 0 when the dimension tends to infinity (a counter example is given in Section 5). Remark that assumptions (A1) to (A5b) are deeply discussed in Godichon-Baggioni (2016b). Let us now introduce two new assumptions. (A6) Let ϕ : H −→ S( H ) be the functional defined for all h ∈ H by ϕ (h) := E [∇h g ( X, h) ⊗ ∇h g ( X, h)] . (a) The functional ϕ is continuous at m with respect to the Frobenius norm: lim kE [∇h g ( X, m) ⊗ ∇h g ( X, m)] − E [∇h g ( X, h) ⊗ ∇h g ( X, h)]k F = 0. h→m (b) The functional ϕ is locally lipschitz on a neighborhood of m: there are positive constants e, Ce0 , such that for all h ∈ B (m, e), kE [∇h g ( X, m) ⊗ ∇h g ( X, m) − ∇h g ( X, h) ⊗ ∇h g ( X, h)]k F ≤ Ce0 kh − mk . Assumption (A6a) enables to establish the asymptotic normality of the stochastic gradient descent as well as of its averaged version. Note that under (A5a), the functional ϕ is bounded, and more precisely h i   kE [∇h g ( X, h) ⊗ ∇h g ( X, h)]k F ≤ E k∇h g ( X, h)k2 ≤ L1 1 + kh − mk2 . 4 Assumption (A6b) can be verified by giving a bound, on a neighborhood of m, of the derivative of the functional ϕ. This last assumption allows to give the rate of convergence of the estimators of the asymptotic variance. An example is given for the special case of the geometric median in Appendix. Remark 2.1. For all h ∈ H and A > 0,  B (h, A) = h0 ∈ H, h − h0 < A . Remark 2.2. Let h, h0 ∈ H, the linear operator h ⊗ h0 : H −→ H is defined for all h00 ∈ H by h ⊗ h0 (h00 ) := hh, h00 i h0 . Moreover, h ⊗ h0 3 3.1 F = k hk h0 . (2) The stochastic gradient algorithm and its averaged version The Robbins-Monro algorithm In what follows, let X1 , ..., Xn be independent random variables with the same law as X. The stochastic gradient algorithm is defined recursively for all n ≥ 1 by m n + 1 = m n − γn ∇ h g ( X n + 1 , m n ) , (3) with m1 bounded and (γn ) is a step sequence of the form γn := cγ n−α , with cγ > 0 and  α ∈ 21 , 1 . Moreover, let (Fn )n≥1 be the sequence of σ-algebras defined for all n ≥ 1 by Fn := σ ( X1 , ..., Xn ). Then, the algorithm can be considered as a noisy (or stochastic) gradient algorithm since it can be written as m n + 1 = m n − γn Φ ( m n ) + γn ξ n + 1 , (4) where Φ (mn ) := ∇ G (mn ), and (ξ n ), defined for all n ≥ 1 by ξ n+1 := Φ (mn ) − ∇h g ( Xn+1 , mn ), is a martingale differences sequence adapted to the filtration (Fn ). Finally, note that under assumptions (A1) to (A5a), it was proven in Godichon-Baggioni (2016b) that for all positive constant δ, (ln n)δ nα 2 kmn − mk = o ! a.s. (5) Moreover, assuming that (A5b) is also fulfilled, for all positive integer p, there is a constant C p such that for all n ≥ 1, h i Cp E kmn − mk2p ≤ pα . n (6) In order to get a deeper study of this estimate, we now give its asymptotic normality. Theorem 3.1. Suppose assumptions (A1) to (A5a’) and (A6a) hold. Then, we have the convergence 5 in law 1 lim √ (mn − m) ∼ N (0, Σ RM ) , n→∞ γn with Σ RM := Z +∞ 0 e−sΓm Σ0 e−sΓm ds, Σ0 := E [∇h g ( X, m) ⊗ ∇h g ( X, m)] . and The proof is given in Appendix. Note that the variance Σ RM does not depend on the step sequence (γn ), but Theorem 3.1 could be written as lim nα/2 (mn − m) ∼ N (0, cγ Σ RM ) , n→∞ Remark 3.1. Let M be a squared matrix, e M is defined by (see Horn and Johnson (2012) among others) eM = ∞ 1 ∑ k! Mk . k =0 Thanks to assumptions (A2),(A3), 0 < λmin (Γm ) ≤ λmax (Γm ) < ∞, while under (A5a) and by dominated convergence, kΣ RM k F ≤ Z +∞ e−sΓm 0 2 op Σ0 ds ≤ F Z +∞ 0 e−2sλmin Σ0 F ds ≤ L1 , 2λmin and Σ RM is so well defined. Remark 3.2. Note that analogous results are given by (Fabian, 1968; Pelletier, 1998) in the particular case of finite dimensional spaces while, for analogous results in Banach and Hilbert spaces, one can also see Walk (1992), Ljung et al. (2012), Kushner and Yin (2003b). Remark 3.3. Note that taking a step sequence of the form γn = c n with c > 2 λmin is possible, and one can obtain the following asymptotic normality (see Pelletier (2000) among others for the case of finite dimensional spaces) lim n→∞ √  n (mn − m) ∼ N 0, cΣ0 . Nevertheless, it does not only necessitate to have some information on the Hessian Γm , but cΣ0 is also not the optimal variance (see Duflo (1997) and Pelletier (2000) for instance). 3.2 The averaged algorithm As mentioned in Remark 3.3, having the parametric rate of convergence (O 1 n  ) with the Robbins-Monro algorithm is possible taking a good choice of step sequence (γn ). Nevertheless, this choice is often complicated and the asymptotic variance which is obtained is not optimal. Then, in order to improve the convergence, let us now introduce the averaged algorithm (see Ruppert (1988) and Polyak and Juditsky (1992)) defined for all n ≥ 1 by mn = 1 n mk . n k∑ =1 6 This can be written recursively for all n ≥ 1 as m n +1 = m n + 1 ( m n +1 − m n ) . n+1 (7) It was proven in Godichon-Baggioni (2016b) that under assumptions (A1) to (A5a), for all δ > 0, 2  kmn − mk = o (ln n)1+δ n  a.s. (8) Suppose assumption (A5b) is also fulfilled, for all positive integer p, there is a positive constant C 0p such that for all n ≥ 1, h E kmn − mk 2p i ≤ C 0p np . (9) Finally, in order to have a deeper study of this estimate, we now give its asymptotic normality. Theorem 3.2. Suppose assumptions (A1) to (A5a’) and (A6a) are verified. Then, we have the convergence in law lim n→∞ √ n (mn − m) ∼ N (0, Σ) , 1 0 −1 0 with Σ := Γ− m Σ Γm , and Σ : = E [∇ h g ( X, m ) ⊗ ∇ h g ( X, m )]. The proof is given in Section 6. For analogous results, one can also see Schwabe and Walk (1996), Pelletier (2000), Dippon and Walk (2006). 4 4.1 Recursive estimation of the asymptotic variance Some existing estimators A first naive method to estimate the asymptotic variance could be to estimate the Hessian Γm and the variance Σ0 as follows ( n +1) Γm Σ0n+1  1  2 (n) ∇ h g ( X n +1 , m n ) − Γ m , n+1  1 = Σ0n + ∇h g ( Xn+1 , mn ) ⊗ ∇h g ( Xn+1 , mn ) − Σ0n , n+1 (n) = Γm + but the main problem is that under assumptions (A2), (A3) and (A5a), if H is an infinite dimensional space, then kΓm k F = ∞, 1 0 −1 Γ− m Σ Γm while F ≤ L1 . λ2min Another problem is that, in order to get a recursive estimator of the asymptotic variance, it needs to invert a matrix at each iteration, which costs much calculus time in high dimensional spaces. A second estimator of the asymptotic variance was introduced in Pelletier 7 (2000), defined for all n ≥ 1 by n b n = 1 ∑ (mk − mn ) ⊗ (mk − mn ) , Σ ln n k=1 and under (A1) to (A6b), E  bn − Σ Σ 2   =O F 1 ln n (10)  . Thus, this estimator faces two main problems: it is not recursive and it converges very slowly. Finally, in order to solve the second problem, a faster algorithm was introduced by Gahbiche and Pelletier (2000), defined for all n ≥ 1 by   1−δ n 1 k 1− s Σ̃n := 1−δ ∑ δ+s+µ exp − 1−s n k =1 k k ∑ jµ/2 e j1− s 2(1− s ) ! m j − mn  k ⊗ j =1 ∑ jµ/2 e j1− s 2(1− s ) ! m j − mn  , j =1 (11) with (1 + α)/2 < s < 1, µ ≥ 0 and s/2 < δ < (1 + s)/2. This algorithm is first based on an usual decomposition of the stochastic gradient algorithm (see equation (18)) which enables to make appear a martingale term which carries the convergence rate (see equation (27)). In a second time, the objective is to find step sequences which enable to improve the rate of convergence of the variance estimate (see Gahbiche and Pelletier (2000) for technical details on assumptions on the step sequences). In the case of finite dimensional spaces, the following convergence in probability is given (under some assumptions) n1/2−s/2 Σ̃n − Σ (ln ln n)c P −−−→ op n→∞ 0, with c > 0. A first technical problem is that only the convergence in probability is given, in the case of finite dimensional spaces, and for the usual spectral norm. A second one is that it is not recursive and it cannot be easily updated. 4.2 A recursive and fast estimate We now give a recursive version of the algorithm defined by (11) to estimate the asymptotic variance in separable Hilbert spaces, before establishing its rates of convergence (almost sure and in quadratic mean). This algorithm is defined by   1 k 1− s 1−δ n Σn := 1−δ ∑ δ+s+µ exp − 1−s n k =1 k k ∑ jµ/2 e j1− s 2(1− s ) j =1 ! mj − mj  k ⊗ ∑ jµ/2 e j1− s 2(1− s ) ! mj − mj  j =1 (12) with (1 + α)/2 < s < 1, µ ≥ 0, and 8 s/2 < δ < (1 + s)/2. (13) , The difference with previous algorithm is the replacement of mn by m j , which enables the estimates to be written recursively for all n ≥ 1 as  Vn+1 = Vn + (n + 1) Σ n +1 =  n n+1  1− δ µ/2 exp ( n + 1 )1− s 2(1 − s )  ( m n +1 − m n +1 ) ,   1−δ ( n + 1 )1− s Σn + Vn+1 ⊗ Vn+1 , exp − 1−s ( n + 1) δ + s + µ with V1 = Σ1 = 0. Then, contrary to previous algorithms, this one does not need to store all the estimations into memory and can be easily updated. Finally, the following theorem ensures that it is quite fast. Theorem 4.1. Suppose assumptions (A1) to (A5a’) and (A6b) hold. Then, the sequence (Σn ) defined by (12) verifies for all positive constant γ, kΣn − Σk2F  =o (ln n)γ n 1− s  a.s. Moreover, suppose (A5b) holds too, there is a positive constant C such that for all n ≥ 1, h i E kΣn − Σk2F ≤ C n 1− s The proof is given in Section 6. Corollary 4.1. Suppose assumptions (A1) to (A5a’) and (A6b) hold. Then, for all positive constant γ, Σ̃n − Σ 2 F  =o (ln n)γ n 1− s  a.s. Moreover, suppose (A5b) holds too, there is a positive constant C such that for all n ≥ 1, E h Σ̃n − Σ 2 F i ≤ C n 1− s Remark 4.1. The constant C in Theorem 4.1 depends on the constants introduced in assumptions, on the initialization of the stochastic gradient descent, and on α, δ, µ, s, cγ . Remark 4.2. Estimating recursively the asymptotic variance coupled with Theorem 3.2 can be useful to build online asymptotic confidence balls. Moreover, in the recent literature, non asymptotic convergence rates are often given under the form h i kΣk F E k m n − m k2 ≤ + Rn , n where Rn is a rest term. Then, using the recursive variance estimates could enable to have, in practice, a precise bound of the quadratic mean error, and in the short term, it could allow to get precise non asymptotic confidence balls. Remark 4.3. In order to get a faster algorithm (in term of computational time), one can consider a parallelized version of previous estimates. This consists in splitting the sample into p parts, and to 9 run the algorithm on each subsample to get p estimates Σn/p,i , before taking the mean of these p last ones. 5 5.1 Applications Application to the logistic regression Let d be a positive integer, and let Y ∈ {−1, 1} and X ∈ Rd be random variables. In order to get the parameter ml ∈ Rd of the logistic regression, the aim is to minimize the functional Gl defined for all h ∈ Rd by Gl (h) := E [log (1 + exp (−Y h X, hi))] . (14) Under usual assumptions (see Bach (2014) among others), the functional Gl is locally strongly convex and twice Fréchet differentiable with for all h ∈ Rd , " #  exp (−Y h X, hi) exp (−Y h X, hi) 2 ∇ Gl (h) = −E YX , ∇ Gl (h) = E X⊗X . 1 + exp (−Y h X, hi) (1 + exp (−Y h X, hi))2  Then, the parameters of the logistic regression and the asymptotic variance can be estimated simultaneously as:  exp −Yn+1 Xn+1 , mln Yn+1 Xn+1 , = + γn 1 + exp (−Yn+1 h Xn+1 , mln i)  1  l mn+1 − mln , mln+1 = mln + n+1    ( n + 1 )1− s  l l l µ/2 Vn+1 = Vn + (n + 1) exp mn+1 − mln+1 , 2(1 − s )    1− δ  n 1−δ ( n + 1 )1− s l l Σ n +1 = Σn + exp − Vnl +1 ⊗ Vnl +1 . n+1 1−s ( n + 1) δ + s + µ mln+1 5.2 mln Application to the geometric median and geometric quantiles Let H be a separable Hilbert space and let X be a random variable taking values in H. Let v ∈ H such that kvk < 1, the geometric quantile mv corresponding to the direction v (see Chaudhuri (1996)) is defined by mv := arg min E [k X − hk − k X k] − hh, vi , h∈ H (15) and in a particular case, the geometric median m (see Haldane (1948)) corresponds to the case where v = 0. Under usual assumptions (see Kemperman (1987) and Cardot et al. (2013) among others), the functional Gv is locally strongly convex and twice Fréchet-differentiable 10 with for all h ∈ H, "  X − h 1 ∇ G v ( h ) = −E + v , ∇2 G v ( h ) = E k X − hk k X − hk  ( X − h) ⊗ ( X − h) IH − k X − h k2 !# . Then, it is possible to estimate simultaneously and recursively the geometric quantile mv as well as the asymptotic variance of the averaged estimator as follows: mvn+1 = mvn  + γn  Xn+1 − mvn +v , k Xn+1 − mvn k 1 (mvn+1 − mvn ) , n+1   ( n + 1 )1− s v v µ/2 Vn+1 = Vn + (n + 1) exp (mvn+1 − mvn+1 ) , 2(1 − s )   1− δ   n 1−δ ( n + 1 )1− s v Σn + Vnv+1 ⊗ Vnv+1 . Σ n +1 = exp − n+1 1−s ( n + 1) δ + s + µ mvn+1 = mvn + Note that under usual assumptions, the asymptotic variance obtained is the same as the one obtained with non-recursive estimates (Maronna et al., 2006; Gervini, 2008) in the special case of the geometric median. 5.3 A short simulation study We focus here on the estimation of the geometric median. We consider from now that X is a random variable taking values in Rd , with d ≥ 3, and following a uniform law on the unit sphere S d . Then, the geometric median m is equal to 0 and the Hessian of the functional G0 at m verifies  1 Γm = E kXk  X X Id − ⊗ kXk kXk  = Id − E [ X ⊗ X ] = d−1 I . d d Note that assumptions (A1) and (A6b) are then verified (see Section 3 in Godichon-Baggioni (2016b), Lemma A.1 in Godichon-Baggioni et al. (2017) and the Appendix to be convinced). Finally, the asymptotic variance of the stochastic gradient estimate and of its averaged version verify Z ∞  X 1 X ⊗ e−sΓm ds = I , k X k k X k 2 ( d − 1) d 0   X X d 1 −1 Σ = Γm E ⊗ Γ− I . m = kXk kXk ( d − 1)2 d Σ RM = e−sΓm E  First, let us consider a stepsequence γn = n−2/3 and let us study the quality of the Gaussian approximation of Qn , Q0n , where Qn := q 2(d − 1)n1/3 (mn − m) , and 11 Q0n := √ d−1 n √ (mn − m) . d Figure 1 (respectively Figure 2) seems to confirm Theorem 3.1 (respectively Theorem 3.2) since we can see that the estimated density of a component of Qn (respectively Q0n ) is close 0.5 0.4 0.3 Density 0.2 0.1 0.0 0.0 0.1 0.2 Density 0.3 0.4 0.5 to the density of N (0, 1), and so, even for small sample sizes (n = 200), which is also confirmed by a Kolmogorov-Smirnov test. −4 −2 0 2 4 −4 −2 0 2 4 0.5 0.4 0.3 Density 0.2 0.1 0.0 0.0 0.1 0.2 Density 0.3 0.4 0.5 Figure 1: Estimated density of a component of Qn (in blue) compared to the standard gaussian density (in red), with n = 200 (on the left) and n = 5000 (on the right). −4 −2 0 2 4 −4 −2 0 2 4 Figure 2: Estimated density of a component of Q0n (in blue) compared to the standard gaussian density (in red), with n = 200 (on the left) and n = 5000 (on the right). In Figure 3, we consider the evolution of the quadratic mean error, with respect to the Frobenius norm, of the estimates (Σn ) of Σ defined by (12), with regard to the sample size. For this, we generate 100 samples, and use the parallelized version of the algorithms. Figure 3 tends to confirm that for small dimensional spaces (d = 10), the estimates of the 12 asymptotic variance converge quite quickly and that it is still the case for moderate dimen- 4e−04 3e−04 Quadratic mean error 1e−04 0.010 0.015 2e−04 0.020 0.025 Quadratic mean error 0.030 5e−04 0.035 0.040 sional spaces (d = 5000). 100 200 500 1000 2000 5000 10000 1000 2000 Sample size 5000 10000 Sample size Figure 3: Evolution of the quadratic mean error of the estimation of the asymptotic variance Σ with respect to the Frobenius norm for d = 10 (on the left) and d = 5000 (on the right). 6 Proofs 6.1 Some decompositions of the algorithms In order to simplify the proofs, let us now give some decompositions of the algorithms. 6.1.1 The Robbins-Monro algorithm Let us recall that the stochastic gradient algorithm can be written as m n + 1 − m = m n − m − γn Φ ( m n ) + γn ξ n + 1 . Linearizing the gradient, it comes mn+1 − m = ( IH − γn Γm ) (mn − m) + γn ξ n+1 − γn δn , (16) where δn := Γm (mn − m) − Φ (mn ) is the remainder term in the Taylor’s expansion of the gradient. Thanks to previous decomposition and with the help of an induction (see Duflo (1996) or Duflo (1997) for instance), one can check that for all n ≥ 1, n −1 m n − m = β n −1 ( m 1 − m ) − β n −1 ∑ k =1 1 γk β − k δk + β n−1 n −1 ∑ γk β−k 1 ξ k+1 , (17) k =1 with β n := ∏nk=1 ( IH − γk Γm ) for all n ≥ 1 and β 0 := IH . Finally, the asymptotic variance  1 −1 can be seen as the almost sure limit of the sequence of random variables Γ− m ξ n ⊗ Γm ξ n n 13 (see the proof of Theorem 3.2). Then, in order to prove the convergence of the estimates, we need to exhibit this sequence. In this aim, one can rewrite equation (16) as mn − m = Tn T − n +1 + Ξ n +1 − ∆ n , γn γn (18) with 1 Tn := Γ− m (mn − m) , 6.1.2 1 Ξ n +1 : = Γ − m ( ξ n +1 ) , 1 ∆n := Γ− m ( δn ) . The averaged algorithm Summing equalities (18) and dividing by n, we obtain the following decomposition of the averaged estimator 1 n mn − m = ∑ n k =1  Tk T − k +1 γk γk 1 n 1 n ∆ + Ξ k +1 . k n k∑ n k∑ =1 =1  − (19) Finally, by linearity and applying an Abel’s transform to the first term on the right-hand side of previous equality (see Delyon and Juditsky (1992) or Delyon and Juditsky (1993) for instance), m 1 − m m n +1 − m 1 n Γm (mn − m) = − + ∑ nγ1 nγn n k =2 + 6.1.3  1 1 − γk γk − 1  (mk − m) − 1 n ξ k +1 . n k∑ =1 1 n δk n k∑ =1 (20) The recursive estimator of the asymptotic variance In order to simplify the proof of Theorem 4.1, we will introduce a new estimator of the variance. In this aim, let us now introduce the sequences ( an )n≥1 and (bn )n≥1 defined for  1− s  all n ≥ 1 by an := exp 2(n1−s) and bn := ∑nk=1 a2k . Then, thanks to decomposition (18), let 1 T n := √ bn 1 =√ bn n ∑ ak (mk − m) k =1 n n a ∑ γkk (Tk − Tk+1 ) + ∑ ak ∆k + ∑ ak Ξk+1 k =1 k =1 k =1 n 1 =: √ ( A1,n + A2,n + Mn+1 ) . bn ! (21) In order to simplify several proofs, we now give L p upper bounds of the terms on the righthand side of previous equality. 14 Lemma 6.1. Suppose assumptions (A1) to (A5b) hold. Then, for all positive integer p,  n a E  ∑ k ( Tk − Tk+1 ) γ k =1 k   E 2p n ∑ ak ∆k k =1  E n ∑ a k Ξ k +1 k =1 2p    1− s   pα  = O exp pn n , 1−s    1− s  p(s−α  = O exp pn n , 1−s  2p   1− s   ps  = O exp pn n 1−s The proof of this lemma as well as an analogous lemma which gives the asymptotic almost sure behavior of these terms are given in Appendix. We can now introduce the following estimator Σn = n 1 1 ∑ kδ Tk ⊗ Tk , (22) ∑nk=1 k−δ k=1 and one can decompose Σn as follows: ! !   k j1− s k j1− s   1−δ n 1 k 1− s Σn − Σ = Σn − 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m 1−s n k j =1 j =1 k =1 ! !   k k j1− s j1− s   k 1− s 1−δ n 1 + 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m − Σ n 1 − s n k j =1 j =1 k =1 + Σn − Σ. 6.2 Proof of Theorem 3.2 Proof of Theorem 3.2. Let us recall that the averaged algorithm can be written as Γm (mn − m) = + m 1 − m m n +1 − m 1 n − + ∑ nγ1 nγn n k =2  1 1 − γk γk − 1  (mk − m) − 1 n ξ k +1 . n k∑ =1 It is proven in Godichon-Baggioni (2016b) that 1 √ n n ∑ k =2  k m1 − m k √ = o (1) a.s, nγ1 k m n +1 − m k √ = o (1) a.s, nγn  1 (mk − m) = o (1) a.s, 1 − γk γk − 1 1 √ n 15 n ∑ δk k =1 = o (1) a.s. 1 n δk n k∑ =1  ∑nk=1 ξ k+1 , let us check that assumptions of Theorem 5.1 in Jakubowski (1988) are fulfilled, i.e let (ei )i∈ I be an orthonorIn order get the asymptotic normality of the martingale term 1 n mal basis of H and ψi,j := Σ0 ei , e j for all i, j ∈ I, we have to verify ∀η > 0, 1 lim P sup √ kξ k+1 k > η n→∞ n 1≤ k ≤ n 1 n ∑ hξ k+1 , ei i ξ k+1 , e j = ψi,j n→∞ n k =1 lim a.s, ∀e > 0, 1 n ∞ ∑ ξ k +1 , e j n k∑ =1 j = N lim lim sup P N →∞ n→∞ ! = 0, (23) ∀i, j ∈ I, (24) ! 2 >e = 0. (25) Proof of (23) Let η > 0, applying Markov’s inequality, 1 P sup √ kξ k+1 k > η n 1≤ k ≤ n ! n  1 ≤ ∑ P √ k ξ k +1 k > η n k =1 h i 1 n ≤ 2 4 ∑ E k ξ k +1 k 4 . n η k =1  Then, applying Lemma H.1, there is a positive constant C such that 1 P sup √ kξ k+1 k > η n 1≤ k ≤ n ! ≤ 1 n2 η 4 n C ∑ C = nη 4 . k =1 Proof of (24). First, note that 1 n 1 n 1 n ξ ⊗ ξ = E ξ ⊗ ξ |F + e k +1 , [ ] k +1 k +1 k +1 k +1 k n k∑ n k∑ n k∑ =1 =1 =1 with ek+1 := ξ k+1 ⊗ ξ k+1 − E [ξ k+1 ⊗ ξ k+1 |Fk ]. Remark that (en ) is a sequence of martingale differences adapted to the filtration (Fn ), and one can check that 1 n ∑ e k +1 = 0 n→∞ n k =1 lim a.s. Let us now prove that the sequence of operators (E [ξ k+1 ⊗ ξ k+1 |Fk ]) converges almost surely to Σ0 , with respect to the Frobenius norm. Note that E [ξ k+1 ⊗ ξ k+1 |Fk ] − Σ0 = E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0 − Φ (mk ) ⊗ Φ (mk ) ≤ E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ 0 F + kΦ (mk ) ⊗ Φ (mk )k F . Then, thanks to assumption (A6a), since kΦ(mk )k ≤ C kmk − mk and since (mk ) converges 16 F to m almost surely (see Godichon-Baggioni (2016b)), lim E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0 k→∞ lim kΦ (mk ) ⊗ Φ (mk )k F = lim kΦ(mk )k2 = 0 n→∞ k→∞ F = 0 a.s, a.s. In a particular case, for all i, j ∈ I, lim E [ξ k+1 ⊗ ξ k+1 |Fk ] (ei ), e j = ψi,j := Σ0 (ei ), e j a.s. k→∞ Thus, applying Toeplitz’s lemma, 1 n ∑ E [ξ k+1 ⊗ ξ k+1 |Fk ] (ei ), e j = ψi,j n→∞ n k =1 lim a.s. Finally, for all i, j ∈ I, 1 n 1 n ξ , e ξ , e = lim h i ∑ k +1 i k +1 j n → ∞ n ∑ ξ k +1 ⊗ ξ k +1 ( e i ), e j n→∞ n k =1 k =1 lim = ψi,j a.s. Proof of (25). Let e > 0, applying Markov’s inequality, P 1 n ∞ ∑ ξ k +1 , e j > e n k∑ =1 j = N ! ≤ = Since for all j ∈ I, ξ k+1 , e j P 2 1 ne2 1 ne2 n ∞ ∑∑ E h ξ k +1 , e j 2 i k =1 j = N n ∞ ∑∑ h h E E ξ k +1 , e j 2 |Fk ii . k =1 j = N = ξ k+1 ⊗ ξ k+1 (e j , e j , and by linearity 1 n ∞ ∑ ξ k +1 , e j > e n k∑ =1 j = N ! ≤ = 1 e2 1 e2 ∞ ∑ j= N ∞ ∑ j= N    1 n E E ξ k+1 ⊗ ξ k+1 (e j ), e j |Fk ∑ n k =1   1 n E E [ξ k+1 ⊗ ξ k+1 |Fk ] (e j ), e j . ∑ n k =1 Since E [ξ k+1 ⊗ ξ k+1 |Fk ] converges almost surely to Σ0 and by dominated convergence, lim sup P n 1 n ∞ ∑ ξ k +1 , e j > e n k∑ =1 j = N ! ≤ 1 e ∞ ∑ Σ 0 ( e j ), e j . j= N Moreover, since Σ0 = E [∇h g ( X, m) ⊗ ∇h g ( X, m)], thanks to assumption (A5a), ∞ ∑ h i Σ0 (e j ), e j = kE [∇h g ( X, m) ⊗ ∇h g ( X, m)]k F ≤ E k∇h g ( X, m)k2 ≤ L1 . j =1 17 Thus, since for all j ∈ I, Σ0 (e j ), e j ≥ 0, ∞ ∑ N →∞ Σ0 (e j ), e j = 0, lim j= N which concludes the proof. 6.3 Proof of Theorem 4.1 For the sake of simplicity, the proof is given for mu = 0 (the case where µ > 0 is strictly analogous). Let us recall that equation (12) can be written as ! !   k j1− s k j1− s   k 1− s 1−δ n 1 Σn − Σ = Σn − 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m 1 − s n k j =1 j =1 k =1 ! !   k j1− s 1 n k 1 − s j −s   k 1−δ 1 + 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m − Σ n 1−s n k j =1 j =1 k =1 + Σn − Σ. (26) In order to prove Theorem 4.1, we just have to give the rates of convergence of the terms on the right-hand side of previous equality. The following lemma gives the almost sure and the rate of convergence in quadratic mean of the first term on the right-hand side of previous equality. Lemma 6.2. Suppose assumptions (A1) to (A5a’) and (A6b) hold. Then, for all γ > 0, k 1− s 1−δ n 1 Σ n − 1 − δ ∑ δ + s e − 1− s n k k =1 k ∑e j1− s 2(1− s ) ! mj − m  k ∑e ⊗ j =1 j1− s 2(1− s ) ! mj − m 2  j =1  =o F (ln n)γ n 1− s  a.s. Moreover, suppose assumption (A5b) holds too. Then,  n k 1− s 1 1−δ E  Σ n − 1 − δ ∑ δ + s e − 1− s n k k =1 k ∑e j1− s 2(1− s ) ! mj − m  k ⊗ j =1 ∑e j1− s 2(1− s ) ! mj − m 2  j =1   =O F 1 n 1− s  . The proof is given in Appendix. The following lemma gives the almost sure and the rate of convergence in quadratic mean of the second term on the right-hand side of equality (26). Lemma 6.3. Suppose assumptions (A1) to (A5a’) and (A6b) hold. Then, for all γ > 0, 1 − δ n 1 − k 1− s e 1− s δ+s n1−δ k∑ =1 k k ∑e j1− s 2(1− s ) ! mj − m  k ⊗ j =1 ∑e j =1 18 j1− s 2(1− s ) 2 ! mj − m  − Σn  =o F (ln n)γ n 2(1− s )  a.s. Moreover, suppose assumption (A5b) holds too. Then  k 1− s 1−δ n 1 E  1 − δ ∑ δ + s e − 1− s n k k =1 k ∑e ! j1− s 2(1− s ) mj − m  k ∑e ⊗ j =1 2 ! j1− s 2(1− s ) mj − m  − Σn j =1   =O  1 n 2(1− s ) F The proof is given in Appendix. Finally, the following Proposition gives the almost sure and the rate of convergence in quadratic mean of the last term on the right-hand side of equality (26). Proposition 6.1. Suppose assumptions (A1) to (A5a’) and (A6b) hold. Then, there is a positive constant γ such that 2 F Σn − Σ  =o (ln n)δ n 1− s  a.s. Suppose assumption (A5b) holds too. Then, there is a positive constant C such that for all n ≥ 1, E h Σn − Σ 2 F i ≤ C . n 1− s Proof of Proposition 6.1. Applying equality (2), one can check that Σn − Σ F ≤ n 1 1 1 ∑ kδ bk k A1,k k2 + ∑n k−δ k =1 k =1 ∑nk=1 k−δ +2 +2 n 1 1 n k =1 ∑ kδ bk k A1,k k k A2,k k + 2 ∑n ∑nk=1 k−δ k=1 ∑nk=1 k−δ n 1 k =1 n 1 1 ∑ kδ bk k A2,k k2 k −δ 1 ∑ kδ bk k A1,k k k Mk+1 k k =1 1 1 ∑ kδ bk k A2,k k k Mk+1 k + ∑n k−δ k =1 k =1 n 1 ∑ kδ k =1  1 M ⊗ Mk + 1 − Σ bk k + 1  (27) where A1,k , A2,k , Mk+1 are defined in (21). The following Lemma gives the rate of convergence in quadratic mean of the first terms on the right-hand side of previous inequality. Lemma 6.4. Suppose Assumptions (A1) to (A6b) hold. Then, for all i, j ∈ {1, 2},  E 1 1 ∑ k δ bk ∑nk=1 k−δ k=1  E n 1 n 1 ∑ k δ bk ∑nk=1 k−δ k=1 !2    1  =o , k Ai,k k A j,k n 1− s !2    1  =o . k Ai,k k k Mk+1 k n 1− s The proof of this lemma as well as its "almost sure version" are given in Appendix. Then, we just have to bound the last term on the right-hand side of inequality (27). First 19 , F . let us decompose Mk+1 ⊗ Mk+1 as k k k ∑ a2j Ξ j+1 ⊗ Ξ j+1 + ∑ a j Ξ j+1 ⊗ Mj + ∑ a j Ξ j+1 ⊗ Mk+1 − Mj+1 Mk + 1 ⊗ Mk + 1 = j =1 j =1  j =1 k k  + ∑ a j M j ⊗ Ξ j + 1 + ∑ a j Mk + 1 − M j + 1 ⊗ Ξ j + 1 . j =1 j =1   Note that for all j, M j is F j -measurable and E Ξ j+1 ⊗ M j |F j = 0. Moreover, n 1 ∑nk=1 k−δ 1 ∑ kδ k =1 + +  1 M ⊗ Mk + 1 − Σ bk k + 1 n 1  = n 1 ∑nk=1 k−δ k 1 1 ∑ k δ bk ∑ a j Ξ j + 1 ⊗ M j + ∑ n ∑nk=1 k−δ k=1 k n 1 ∑nk=1 k−δ 1 1 ∑ k δ bk k =1 ∑ a j M j ⊗ Ξ j +1 + j =1 ∑ aj Ξ j +1 ⊗ Ξ j +1 − Σ 1 1 k k −δ 1 ∑nk=1 k−δ  j =1 n 1 k =1 j =1 k 1 1 ∑ k δ bk k =1 ∑ k δ bk ∑ a j ξ j + 1 ⊗ k =1 j =1 n k 1 1 ∑ k δ bk k =1 ∑ aj Mk + 1 − M j + 1  Mk + 1 − M j + 1 ⊗ Ξ j + 1 . j =1 The end of the proof consists in giving a bound of the quadratic mean of each term on the right-hand side of previous equality. Note that the almost sure rates of convergence are not proven since it is quite analogous.  Bounding E ∑n 1 k−δ ∑nk=1 k1δ b1k ∑kj=1 a j Ξ j+1 ⊗ M j 2 n 1 ∑nk=1 k−δ 1 1 ∑ k δ bk k =1 k ∑ a j Ξ j +1 ⊗ M j = ∑ n 1 k =1 j =1  F k =1 k −δ . First, note that n n k =1 j=k ∑ ∑ 1 1 k δ bk ! a k Ξ k + 1 ⊗ Mk . Moreover, with the help of an integral test for convergence, one can check that there is a positive constant C such that for all positive integers k ≤ n, n ∑ j=k Furthermore, since Ξ j+1 ⊗ M j  tration F j , let   1 1 C k 1− s ≤ δ exp − . (1 − s ) k δ bk k   (∗) := E  n 1 ∑nk=1 k−δ  = E  = (28) is a sequence of martingale differences adapted to the fil- j 1 1 ∑ k δ bk k =1 n 1 ∑nk=1 k−δ ∑ a j Ξ j +1 ⊗ M j j =1 1 1 2 n k =1 j=k ∑ ∑ 1 1 k δ bk 20  2 ! a k Ξ k + 1 ⊗ Mk j=k n  F ∑ ∑ k δ bk ∑nk=1 k−δ k=1 1 n 2 k !2   F h  a2k E kΞk+1 ⊗ Mk k2F i Then, applying equality (2) and Cauchy-Schwarz’s inequality,  (∗) ≤ 2 1 ≤ 2 1 n k =1 j=k n n k =1 j=k i h a2k E kΞk+1 k2 k Mk k2 !2 1 1 k δ bk ∑ ∑ ∑nk=1 k−δ !2 1 1 k δ bk ∑ ∑ ∑nk=1 k−δ  n a2k r h i i h E k Ξ k + 1 k 4 E k Mk k 4 . Finally, applying Lemmas 6.1 and H.1 as well as inequality (28),  (∗) = O 2 1 ∑nk=1 k−δ n 1 ∑ k2δ−s !  =O k =1  1 . n 1− s With analogous calculus, one can check  E Bounding E n 1 ∑nk=1 k−δ  1 ∑nk=1 k−δ 1 1 ∑ k δ bk k =1 ∑nk=1 k1δ b1k 2 k ∑ a j M j ⊗ Ξ j +1  =O j =1 ∑kj=1  k  ∑ a j Ξ j + 1 ⊗ Mk + 1 − M j = j =1 k k ∑ ∑  . n 1− s F a j Ξ j + 1 ⊗ Mk + 1 − M j + 1 1  2 F  . First, note that a j a j 0 Ξ j +1 ⊗ Ξ j 0 +1 j =1 j 0 = j +1 j 0 −1 k = ∑ ∑ a j a j 0 Ξ j +1 ⊗ Ξ j 0 +1 . j 0 =2 j =1   0 j −1 Note that ∑ j=1 a j a j0 Ξ j+1 ⊗ Ξ j0 +1 0 is a sequence of martingale differences adapted to the j  filtration F j0 . Furthermore,  E 1 1 1 = 1 2 ∑nk=1 k−δ  2 k ∑ k δ bk ∑ a j Ξ j + 1 ⊗ ∑nk=1 k−δ k=1  + n 1 ∑nk=1 k−δ  j =1 n  1 1 k  F 2 j 0 −1 ∑ a j a j 0 Ξ j +1 ⊗ Ξ j 0 +1 ∑ k2δ b2 E  ∑ 0 k =1 2 Mk + 1 − M j  " E j =2 j =1 k * n k −1 j  F j00 −1 ∑ ∑ bk−1 k−δ b−j 1 j−δ 00∑ ∑ 0 k =2 j =1  j =2 j =1 a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 , k i00 −1 ∑ ∑ +# ai0 ai00 Ξi0 +1 ⊗ Ξi00 +1 i00 =2 i0 =1 Then end of the proof consists in bounding the two   terms on the right-hand side of previj 0 −1 ous equality. First, since ∑ j=1 a j a j0 Ξ j+1 ⊗ Ξ j0 +1 21 j0 is a sequence of martingale differences .  adapted to the filtration F j0 , let  (?) := 2 1 ∑nk=1 k−δ  = 1 1 ∑nk=1 k−δ 2 j 0 −1 k ∑ k2δ b2 E  ∑ ∑ a j a j 0 Ξ j +1 ⊗ Ξ j 0 +1 0 k =1 2 1  n  k n 1 1 ∑ k2δ b2 k =1 k  j =2 j =1 k F  2 j 0 −1 ∑ E  ∑ a j a j 0 Ξ j +1 ⊗ Ξ j 0 +1 j 0 =2  . j =1 F Then, applying equality (2) and Cauchy-Schwarz’s inequality,  (?) = 2 1 ∑nk=1 k−δ  ≤ 2 1 ∑nk=1 k−δ n 1 1 ∑ k2δ b2 k =1 k n 1 1 ∑ k2δ b2 k =1 k  k 2 j 0 −1 a2j0 E  ∑ a j Ξ j+1 ∑ 0  Ξ j 0 +1 2 j =1 j =2 k r h 2 a j 0 E Ξ j 0 +1 ∑ j 0 =2 v  u iu 4 u  tE 4 j 0 −1 ∑ a j Ξ j +1   j =1 Finally, applying Lemma H.1, H.2 and 6.1,  (?) = O 2 1 ∑nk=1 k−δ n 1 1 ∑ k2δ b2 k =1 k k ∑ j 0 =2 ! a4j0 j0s  =O 1 2 ∑nk=1 k−δ n 1 1 ∑ k2δ b2 a4k k2s k =1 k !  =O  1 nmin{2−2δ,1} . Then, since δ < (1 + s)/2,  2 1 ∑nk=1 k−δ  1 1  ∑ k2δ b2 E k =1 k n k 2 j 0 −1 ∑ ∑ a j a j 0 Ξ j +1 ⊗ Ξ j 0 +1 j 0 =2 j =1   =o  1 . n 1− s F In the same way, by linearity, let  (??) :=  = ∑nk=1 k−δ 1 2 ∑nk=1 k−δ  + 2 1 1 ∑nk=1 k−δ " E n k −1 n k −1 ∑∑ * 1 −δ bk−1 k−δ b− j j 2 ∑ ∑ n k −1 ∑∑ k =2 j =1 a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 , j00 −1 j ∑ ∑ bk−1 k−δ b−j 1 j−δ E  00∑ ∑ 0 k =2 j =1 j00 −1 j00 =2 j0 =1 k =2 j =1 * j 1 −δ  bk−1 k−δ b− j j E j j00 −1 ∑ ∑ j00 =2 j0 =1 22 i00 −1 a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 , ai0 ai00 Ξi0 +1 ⊗ Ξi00 +1 ∑ ∑ +  ai0 ai00 Ξi0 +1 ⊗ Ξi00 +1  i00 =2 i0 =1 j =2 j =1 * ∑ ∑ +# i00 =2 i0 =1 j a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 , i00 −1 k k ∑ F +  i00 −1 ∑ ai0 ai00 Ξi0 +1 ⊗ Ξi00 +1  . i00 = j+1 i0 =1 F Since (Ξi00 ) is a sequence of martingale differences adapted to the filtration (Fi00 ), * n k −1 j00 −1 j ∑ ∑ bk−1 k−δ b−j 1 j−δ E  00∑ ∑ 0 k =2 j =1 ∑∑ = ∑∑ k i00 −1 ∑ ∑ ∑ ∑ 1 −δ bk−1 k−δ b− j j ai0 ai00 a j0 a j00 E h ai0 ai00 a j0 a j00 E h F i Ξ j0 +1 ⊗ Ξ j00 +1 , Ξi0 +1 ⊗ Ξi00 +1 F j00 =2 j0 =1 i00 = j+1 i0 =1 k =2 j =1 n k −1 j00 −1 j ∑ ∑ +  ai0 ai00 Ξi0 +1 ⊗ Ξi00 +1  i00 = j+1 i0 =1 j =2 j =1 n k −1 = a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 , i00 −1 k j00 −1 j k i00 −1 ∑ ∑ ∑ ∑ 1 −δ bk−1 k−δ b− j j Ξ j0 +1 ⊗ Ξ j00 +1 , Ξi0 +1 ⊗ E [Ξi00 +1 |Fi00 ] j00 =2 j0 =1 i00 = j+1 i0 =1 k =2 j =1 = 0.  j j00 −1 ∑ j00 =2 ∑ j0 =1 a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 00 is a sequence of martingale differj  ences adapted to the filtration F j00 and applying equality (2), Furthermore, since  (??) =  2 1 ∑nk=1 k−δ  = ∑nk=1 k−δ  = j ∑nk=1 k−δ 2 j00 −1 ∑ ∑ bk−1 k−δ b−j 1 j−δ E  00∑ ∑ 0 n ∑ n a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1 j k ∑ bk−1 k−δ b−j 1 j−δ  ∑ E j00 =1 ∑ ∑ bk−1 k−δ b−j 1 j−δ 00∑ k =2 j =1 ∑ 0 a j0 a j00 Ξ j0 +1 ⊗ Ξ j00 +1  j =1 j k F  2 j00 −1  j =1 F 2 j00 −1 ∑ 0 a2j00 E    j =1 j =1 k =2 j =1 2 1  k k =2 j =1 2 1 n  Ξ j00 +1 a j 0 Ξ j 0 +1 2 . j =1 Applying Cauchy-Schwarz’s inequality as well as Lemmas H.1 and 6.1,  (??) ≤ 2 1 ∑nk=1 k−δ  =O n j k ∑ ∑ bk−1 k−δ b−j 1 j−δ 00∑ k =1 j =1 2 1 ∑nk=1 k−δ n j =1 v  u u 2 u  a j00 tE k k =1 j =1 ∑ 0 a j 0 Ξ j 0 +1  E j =1 h Ξ j00 +1 F ! j ∑ ∑ bk−1 k−δ b−j 1 j−δ 00∑ 4 j00 −1 a4j00 j00s . j =1 Finally, applying Lemma H.2,  (??) = O 1 ∑nk=1 k−δ  1 =O ∑nk=1 k−δ   1 =O . n 1− s Thus,  E 1 ∑nk=1 k−δ n 2 1 1 ∑ k δ bk k =1 n k ∑ ∑ bk−1 k−δ b−j 1 j−δ a4j j2s ! k =1 j =1 2 n ∑ ! bk−1 k−2δ k2s a2k k =1 2 k ∑ a j Ξ j +1 ⊗ j =1 Mk + 1 − M j + 1  =O F 23   1 n 1− s  . 4 F i i F Moreover, with analogous calculus, one can check  E Bounding n 1 ∑nk=1 k−δ n 1 ∑nk=1 k−δ 1 ∑nk=1 k−δ 1 1 ∑ k δ bk k =1 ∑nk=1 1 k δ bk 2 k ∑ aj Mk + 1 − M j + 1 ⊗ Ξ j + 1  j =1  1 . n 1− s ∑kj=1 a2k (Ξk+1 ⊗ Ξk+1 − Σ). First , note that k =1 j =1 + n 1 ∑ kδ bk ∑ a2k (Ξk+1 ⊗ Ξk+1 − Σ) = ∑n k =1  =O F k 1  k −δ 1 ∑nk=1 k−δ k 1 ∑ kδ bk ∑ a2k (E [Ξk+1 ⊗ Ξk+1 |Fk ] − Σ) k =1 j =1 n k 1 ∑ k δ bk k =1 ∑ a2k (Ξk+1 ⊗ Ξk+1 − E [Ξk+1 ⊗ Ξk+1 |Fk ]) j =1 The end of the proof consists in bounding the quadratic mean of the terms on the right-hand side of previous equality. First, applying Lemma H.4, let  n 1 (?) := E  2 k 1 ∑ kδ bk ∑ a2j (E [Ξk+1 ⊗ Ξk+1 |Fk ] − Σ) ∑nk=1 k−δ k=1 j =1 v  u  2 u n 1 1 u   tE ≤  ∑ n − δ δ k bk ∑ k =1 k k =1   F   ≤ ∑ a2j (E [Ξk+1 ⊗ Ξk+1 |Fk ] − Σ) j =1  2   F ! r h i 2 n 1 k 2 2 ∑ kδ bk ∑ a j E kE [Ξk+1 ⊗ Ξk+1 |Fk ] − ΣkF j =1 k =1 2 1 2 k ∑nk=1 k−δ Then, applying inequality (6) and Corollary H.1,   (?) = O   2 1 ∑nk=1 k−δ  = O 2 1 ∑nk=1 k−δ !2  r h i 1 ∑ kδ bk ∑ a2j E kmn − mk2  j =1 k =1 !2  n k 1 ∑ kδ bk ∑ a2j j−α/2  . j =1 k =1 n k Furthermore, thanks to Lemma H.2,  (?) = O   !2  1 ∑ kδ bk a2k ks−α/2  = O k =1 2 1 n ∑nk=1 k−δ  ! 2 1 n ∑nk=1 k−δ 2−2δ−α  =O Thus, since α > 1/2,  E 1 ∑nk=1 k−δ n 1 ∑ k δ bk k =1 2 k ∑ a2j (E [Ξk+1 ⊗ Ξk+1 |Fk ] − Σ) j =1 =o F 24   1 n 1− s  . 1 nα  . Moreover, applying Lemma H.4, let  n 1 (??) := E  1 ∑ k δ bk k =1 ∑nk=1 k−δ 2 k ∑ a2j (Ξk+1 ⊗ Ξk+1 − E [Ξk+1 ⊗ Ξk+1 |Fk ]) j =1 v  u  2 u n 1 1 u   ≤  ∑ δ tE k bk ∑nk=1 k−δ k =1   F  2 k ∑ a2j (Ξk+1 ⊗ Ξk+1 − E [Ξk+1 ⊗ Ξk+1 |Fk ]) j =1  2   . F Furthermore, since (E [Ξk+1 ⊗ Ξk+1 |Fk ] − Ξk+1 ⊗ Ξk+1 ) is a sequence of martingale differences adapted to the filtration (Fk ) and applying Lemma H.1, v 2 u k h i u 1 t ∑ a4 E k(Ξk+1 ⊗ Ξk+1 − E [Ξk+1 ⊗ Ξk+1 |Fk ])k2  ∑ (??) ≤ F j δb k ∑nk=1 k−δ k j =1 k =1  v 2   u 2  k n 1 u 1  t ∑ a4    = O . ∑ k δ bk j = 1 j ∑nk=1 k−δ k =1  2 1  n Then, applying Lemma H.2,  (??) = O   2 1 ∑nk=1 k−δ n 1 ∑ kδ bk a2k ks/2 k =1  !2    = O 2 1 ∑nk=1 k−δ !2    1 −δ−s/2 =O . ∑k n 2− s k =1 n Finally,  E 1 ∑nk=1 k−δ n 1 ∑ k δ bk k =1 k ∑ 2 a2j (Ξk+1 ⊗ Ξk+1 − E [Ξk+1 ⊗ Ξk+1 |Fk ]) j =1   =o F 1 n 1− s  , which concludes the proof. A Proof of Theorem 3.1 Let us recall that the Robbins-Monro algorithm can be written for all n ≥ 1 as (see (17)) m n − m = β n −1 ( m 1 − m ) − β n −1 n −1 n −1 k =1 k =1 ∑ γk β−k 1 δk + βn−1 ∑ γk β−k 1 ξ k+1 . 25 It was proven in Godichon-Baggioni (2016b) that under assumptions (A1) to (A5a), for all γ > 0, ! 2 n −1 1 m − m k k n 1 β n − 1 ( m 1 − m ) − β n − 1 ∑ γk β − a.s, √ √ k δk = O γn γn k =1   (ln n)γ a.s. =o nα/2 Then, we just have to apply Theorem 5.1 in Jakubowski (1988) to the last term on the righthand side of equality (17). More precisely, let (ei )i∈ I be an orthonormal basis of H composed 0 := Σ of eigenvectors of Γm and let ψi,j RM ei , e j for all i, j ∈ I, we have to prove that the following equalities are verified. ∀η > 0, 1 n → ∞ γn lim n ∑ D 1 1 lim P sup √ β n β− k γk ξ k + 1 > η n→∞ γ n 1≤ k ≤ n 1 β n β− k γk ξ k + 1 , e i ED E 1 0 β n β− γ ξ , e k k +1 j = ψi,j k ! = 0, (29) ∀i, j ∈ I, a.s, (30) k =1 lim lim sup P ∀e > 0, N →∞ n→∞ 1 γn ∞ n D ∑∑ 1 β n β− k γk ξ k + 1 , e j E2 ! >e = 0. (31) k =1 j = N Proof of (29). Let η > 0, applying Markov’s inequality, 1 1 β n β− P sup √ k γk ξ k + 1 > η γ n 1≤ k ≤ n ! n  1 1 ≤ ∑P √ β n β− k γk ξ k + 1 > η γ n k =1   n 4 1 −1 ≤ 4 2 ∑ E β n β k γk ξ k + 1 . η γn k = 1  First, since each eigenvalue λ of Γm verifies 0 < λmin ≤ λ ≤ C, there is a rank nα such that for all positive integer k, n verifying nα ≤ k ≤ n, 1 β n β− k op n ≤ ∏ IH − γ j Γm j = k +1 n op ≤ ! n ∏  1 − γ j λmin ≤ exp −λmin ∑ γj . (32) j = k +1 j = k +1 For the sake of simplicity, we consider from now that nα = 1 (one can see the proof of Lemma 3.1 in Cardot et al. (2017) for an analogous and more detailed proof). Then, applying Lemmas H.1 and H.3, there is a positive constant C such that for all n ≥ 1, n −1 ∑ k =1 E  1 β n β− k γk ξ k + 1 4 n  ≤ ∑ 1 β n β− k k =1 4 op h i γk4 E kξ k+1 k4 n ≤C ∑ exp k =1  3 = O γn , 26 ! n −4λmin ∑ j = k +1 γj γk4 which concludes the proof of (29). Proof of (30). Since n ∑ D 1 β n β− k γk ξ k + 1 , e i ED E 1 β n β− γ ξ , e = j k k + 1 k k =1 n ∑ D    E 1 −1 β n β− γ ξ ⊗ β β γ ξ e , e , ( ) n i j k k + 1 k k + 1 k k k =1 we just have to prove that lim n→∞ 1 γn n ∑     1 −1 β n β− γ ξ ⊗ β β γ ξ − Σ RM n k k + 1 k k + 1 k k k =1 = 0 a.s. (33) F First, note that by linearity n ∑     1 −1 β n β− γ ξ ⊗ β β γ ξ n k k k +1 k k +1 = k k =1 = + n ∑  k =1 n     1 −1 β n β− γ ξ ⊗ ξ β β γ ( ) n k k k +1 k +1 k k ∑    1 −1 β n β− γ E ξ ⊗ ξ |F β β γ [ ] n k k + 1 k + 1 k k k k ∑    1 −1 β n β− γ e β β γ n k k +1 k , k k k =1 n  k =1 with ek+1 = ξ k+1 ⊗ ξ k+1 − E [ξ k+1 ⊗ ξ k+1 |Fk ]. Note that (ek ) is a sequence of martingale differences adapted to the filtration (Fk ). We now prove that the two last terms on the right-hand side of previous equality converge almost surely to 0. First, as in GodichonBaggioni (2016b) and Cardot et al. (2017), one can check that n 1 n → ∞ γn ∑ lim     1 −1 β n β− γ e β β γ n k k k +1 k k k =1 = 0 a.s. F Let us now rewrite E [ξ k+1 ⊗ ξ k+1 |Fk ] as  E [ξ k+1 ⊗ ξ k+1 |Fk ] = Σ0 + E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0 − Φ (mk ) ⊗ Φ (mk ) . Then, let (∗) := 1 ≤ γn ≤ n 1 γn 1 γn ∑     1 −1 β n β− γ Φ ( m ) ⊗ Φ m β β γ ( ( )) n k k k k k k k =1 n F ∑  ∑ 1 β n β− k γk Φ ( m k ) k =1 n   1 −1 β n β− k γk ( Φ ( mk ) ⊗ Φ ( mk )) β n β k γk 2  F . k =1 Moreover, since there is a positive constant C such that for all n ≥ 1, kΦ(mn )k ≤ C kmn − 27 m k, 1 γn (∗) ≤ n ∑ 1 β n β− k k =1 2 op γk2 kΦ (mk )k2 ≤ 1 γn n ∑ 2 1 β n β− k op k =1 γk2 C2 kmk − mk2 . Thus, applying inequalities (5) and (32) as well as Lemma H.3, for all β < α, n 1 γn 2 1 β n β− k op ∑ k =1 γk2 C2 2 kmk − mk = o n 1 γn ∑ exp −2λmin k =1 ! n ∑ γj j = k +1 1 γk2 β k !  =o 1 nβ  . In the same way, n 1 γn ∑  1 β n β− k γk  E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0  1 β n β− k γk k =1 F 1 ≤ γn ≤  1 γn n ∑ 1 β n β− k γk k =1 n ∑ 2 E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0 op n γk2 exp −2λmin F ! ∑ γj E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0 j = k +1 k =1 F . Then, with the help of assumption (A6a), Lemma H.3 and Toeplitz’s lemma, one can check that 1 n → ∞ γn lim n ∑  1 β n β− k γk  E [∇h g ( Xk+1 , mk ) ⊗ ∇h g ( Xk+1 , mk ) |Fk ] − Σ0  k =1 1 β n β− k γk  = 0 a.s. F In order to verify equality (33), we have to prove 1 n → ∞ γn lim n ∑ γk2 βn β−k 1 Σ0 βn β−k 1 − ΣRM = 0. k =1 Let (ei )i∈ I be an orthonormal basis of H composed of eigenvectors of Γm , and let (λi )i∈ I be the set of the associated eigenvalues. Then, let us rewrite ∇h g ( X, m) as ∇h g ( X, m) = ∑ h∇h g ( X, m) , ei i ei , i∈ I and it comes, by linearity and by dominated convergence, 1 γn n ∑ γk2 βn β−k 1 Σ0 βn β−k 1 k =1 i 1 n 2 h 1 −1 γk E β n β − ∇ g X, m ⊗ β β ∇ g X, m ( ) ( ) n h h ∑ k k γn k = 1 " ! n 1 n 2 =E γk ∑ h∇h g ( X, m) , ei i ∏ (1 − γk λi ) ei ⊗ γn k∑ i∈ I =1 j = k +1 = 28 !# n ∑ h∇h g (X, m) , ei i ∏ i∈ I j = k +1 ( 1 − γk λ i ) e i . In the same way, Z ∞ Σ RM = 0 Z ∞ = 0 =E e−sH Σ0 e−sH ds " ∑ h∇h g (X, m) , ei i e−λ s ei E ! ∑ h∇h g (X, m) , ei i e−λ s ei ⊗ i ∞ ∑ h∇h g (X, m) , ei i e−λ s ei i∈ I ! ∑ h∇h g (X, m) , ei i e−λ s ei ⊗ i 0 ds i i∈ I "Z !# ! i i∈ I # ds . i∈ I In order to conclude the proof, let us now introduce the following lemma, which allows to give a bound of 1 γn 1 −1 0 ∑nk=1 β n β− k γk Σ β n β k γk − Σ RM F . Lemma A.1. There is a positive sequence ( an ) such that for all n ≥ 1 and for all i, i0 ∈ I, 1 γn − an ≤ n ∑ n ∏ γk2 k =1 1 − γ j λi   Z 1 − γ j λi0 − j = k +1 ∞ 0 e−(λi +λi0 )s ds ≤ an , and limn→∞ an = 0. Proof. The proof is given in Appendix. Thanks to previous lemma, let 1 γn v u u ≤ E t n (∗) = ∑ βn β−k 1 γk Σ0 βn β−k 1 γk − ΣRM k =1 1 γn ∑ 0 i,i ∈ I  ≤ an E  s F n n ∑ γk2 ∏ k =1 ( 1 − γk λ i ) ( 1 − γk λ i 0 ) − j = k +1 1 λi + λi0  !2 h∇h g ( X, m) , ei i2 h∇h g ( X, m) , ei0 i2   ∑ 0 h∇h g ( X, m) , ei i2 h∇h g ( X, m) , ei0 i2  i,i ∈ I " = an E ∑ h∇h g (X, m) , ei i # 2 . i∈ I Under assumption (A5a), 1 γn " n ∑ βn β−k 1 γk Σ0 βn β−k 1 γk − ΣRM k =1 ≤ an E ∑ h∇h g (X, m) , ei i i∈ I F h = an E k∇h g ( X, m)k2 ≤ L1 a n . Since an converges to 0, this concludes the proof of inequality (30). 29 i # 2 Proof of inequality (31) Let e > 0, applying Markov’s inequality, P ∞ n 1 γn ∑∑ E ! >e ∑∑ ∑  1 ≤ γn e 2 ∞ n ∑ ∑E D 1 β n β− k γk ξ k + 1 , e j k =1 j = N  hD i E2  −1 −1 E E β n β k ξ k+1 ⊗ β n β k ξ k+1 |Fk (e j ), e j n  hD i E2  −1 −1 ∑ E E βn βk ξ k+1 ⊗ βn βk ξ k+1 |Fk (e j ), e j 1 γn k =1    1 −1 β n β− γ ξ ⊗ β β γ ξ n k k k +1 k k+1 converges almost surely to Σ RM with rek spect to the Frobenius norm and by dominated convergence, 1 γn lim sup P n n ∞ ∑∑ D ! E 1 β n β− k γk ξ k + 1 , e j > e k =1 j = N ≤ 1 e2 ∞ ∑ Σ RM (e j ), e j . j= N Moreover, since ∞ ∑ Σ RM (e j ), e j = Z ∞ j =1 0 e−sH Σ0 e−sH ds ≤ F 1 Σ0 2λmin F ≤ L1 , 2λmin  and since Σ RM e j , e j ≥ 0 for all j ∈ I, 1 N → ∞ e2 lim ∞ ∑  Σ RM e j , e j = 0, j= N which concludes the proof. B Proof of Lemma 6.1 Proof. Bounding E  a ∑nk=1 γkk A1,n First, E  a1 γ1 T1 E2  k =1 j = N j= N ∑nk=1 ∞ n ∞ 1 = 2 e 1 γn 1 β n β− k γk ξ k + 1 , e j k =1 j = N 1 = γn e 2 Since D 2p ( Tk − Tk+1 ) 2p  . Applying an Abel’s transform, n an a = 1 T1 − Tn+1 + ∑ γ1 γn k =2  ak a − k −1 γk γk − 1  Tk .  = O (1). Moreover, applying inequality (6) , " E an Tn+1 γn 2p #  ≤ exp  ≤ exp 30 pn1−s 1−s   1− s pn 1−s −2p −1 2pα C p λmin cγ n pα n −2p 1 pα C p c− γ λmin n . Furthermore, one can check that there is a positive constant C such that for all n ≥ 1, a an − n−1 ≤ Cn−s+α exp γn γn − 1  n 1− s 2(1 − s )  , and applying Lemma H.4 and inequality (6),  E n ∑ k =2  ak a − k −1 γk γk − 1 2p   n ∑ ≤ Tk i 2p1  h a ak − k−1 E k Tk k2p γk γk − 1 k =2 ≤C 2p −2p C p λmin n ∑k −s+α  exp k =2 !2p k 1− s 2(1 − s ) !2p  k −α/2 . Finally, applying Lemma H.2,  n ∑ E  k =2 ak a − k −1 γk γk − 1 2p      = O exp Tk pn1−s 1−s  n pα  . h i Bounding E k∑nk=1 ak ∆k k2p . Since there is a positive constant Cm (see GodichonBaggioni (2016b)) such that for all n ≥ 1, k∆n k ≤ Cm k Tn k2 , applying Lemma H.4 and inequality (6),  E 2p n ∑ ak ∆k  ≤ n ∑ 2p −4p Cm λmin k =1  h i 2p1 ak E kmn − mk4p !2p k =1 ≤ 2p −4p Cm λmin C2p n ∑ ak k −α !2p k =1 Applying Lemma H.2,  E 2p n ∑ ak ∆k k =1    1− s   2p(s−α)  = O exp pn n 1−s h i Bounding E k∑nk=1 ak Ξk+1 k2p . First, since (Ξn ) is a sequence of martingale differences, and thanks to Lemma H.2,  E n ∑ k =1 2 a k Ξ k +1  n = ∑ h i a2k E kΞk+1 k2 k =1   1− s   n = O exp ns . 1−s With the help of an induction on p (see the proof of Theorem 4.2 in Godichon-Baggioni 31 (2016a) for instance), one can check that for all integer p ≥ 1,  2p n ∑ a k Ξ k +1 E k =1    1− s   ps  = O exp p n n , 1−s which concludes the proof. C Proof of Lemma A.1 Let (λi )i∈ I be the eigenvalues of the Hessian Γm . First, let n cn,k := n ∏ 1 − γ j λi j = k +1  ∏ ! n  1 − γ j λi0 = exp j = k +1 ∑  ln 1 − γ j λi + ln 1 − γ j λi0  j = k +1 Let us recall that there is a positive constant C such taht for all i ∈ I, λi ≤ C. Then, let nα be an integer such that for all k ≥ nα , Cγk < 1, and it comes, for all k ≥ nα , λi γk ≤ Cγk < 1. Then, with the help of the Taylor’s expansion of the functional x 7−→ ln(1 − x ), one can check that for all i ∈ I and for all k ≥ nα , −λi γk ≥ ln (1 − λi γk ) ≥ −λi γk − with c := 1 1−Cγnα . Then, for all n, k ≥ nα , n exp − λ2i γk2 = −λi γk − cγk2 , 1 − Cγnα ∑  (λi + λi0 ) γ j + 2cγ2j  ! ! n ≤ cn,k ≤ exp − j = k +1 ∑ ( λi + λi0 ) γ j . j = k +1 With the help of an integral test for convergence, Z n  −α − 2cγk2+1 cn,k ≥ exp − (λi + λi0 ) γk+1 − cγ (λi + λi0 ) t dt k +1   Z n −α cn,k ≤ exp − (λi + λi0 ) γk+1 − cγ (λi + λi0 ) t dt . − 2cc2γ Z n k +1 t −2α  dt k +1 Then,  cn,k cn,k    cγ  1− α 1− α ≥ exp − (λi + λi0 ) ( k + 1) −n − γk + 1 1−α !! 2   c γ × exp 2c γk2+1 − (n1−2α − (k + 1)1−2α 1 − 2α     cγ  ≤ exp − (λi + λi0 ) ( k + 1 ) 1 − α − n 1 − α − γk + 1 1−α We now give an upper bound of ∑nk=1 γk2 cn,k . Since 0 < λmin ≤ λi ≤ C for all i ∈ I, there is a rank nα , only depending on λmin , C, cγ and α, such that the functional ϕ : R −→ R defined 32 for all t ∈ R by     cγ  ϕ(t) := c2γ t−2α exp − (λi + λi0 ) ( t + 1 )1− α − n 1− α − c γ ( t + 1 ) − α , 1−α is increasing on [nα , +∞]. For the sake of simplicity, let us consider that nα = 0. Then, with the help of an integral test for convergence, n ∑ k =1 γk2 cn,k ≤ Z n 0 c2γ t−2α   exp − (λi + λi0 )   cγ  1− α 1− α −α ( t + 1) −n − c γ ( t + 1) dt 1−α     n 1− α 1− α −α −α ( t + 1) −n t exp − (λi + λi0 ) cγ (t + 1)   cγ 1 = cγ exp − (λi + λi0 ) 0 λi + λi 1−α Z n   cγ 1− α 1− α −α 1 e−(λi +λi0 ) 1−α ((t+1) −n ) t−1−α − (λi + λi0 ) cγ t−2α e−(λi +λi0 )cγ (t+1) dt + cγ λi + λi0 0 (34) Then, since for all i ∈ I, 0 < λmin ≤ λi ≤ C, one can check that there is a positive sequence (en )n≥1 only depending on α, cγ , λmin , C such that n γn ∑ γk2 cn,k ≤ λi + λi0 + en γn , and k =1 lim en = 0. n→∞ With analogous calculus, on can check that there is a positive sequence (en0 )n≥1 only depending on α, cγ , λmin , C such that n γn ∑ γk2 cn,k ≥ λi + λi0 − en0 γn , k =1 and lim e0 n→∞ n = 0, which concludes the proof. D Proof of Lemma 6.2 We only give the bound of the quadratic mean error since the almost sure rate of convergence is quite straightforward. First, since     mj − mj ⊗ mj − mj − mj − m ⊗ mj − m     = mj − m + m − mj ⊗ mj − m + m − mj − mj − m ⊗ mj − m       = m − mj ⊗ mj − m + mj − m ⊗ m − mj + m − mj ⊗ m − mj , 33 0 and by linearity, let ! !   k j1− s k j1− s   k 1− s 1−δ n 1 (?) := Σn − 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m 1−s n k j =1 j =1 k =1 ! !   k k j1− s j1− s   k 1− s 1−δ n 1 = − 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m 1 − s n k j =1 j =1 k =1 ! !   k j1− s n k 1 − s j1− s   k 1−δ 1 − 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m 1−s n k j =1 j =1 k =1 ! !   k k j1− s j1− s   k 1− s 1−δ n 1 + 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m . 1 − s n k j =1 j =1 k =1 Then, we have to bound the three terms on the right-hand side of previous equality. "     1− s   j1− s j1− s   k k n 1− δ 1 k Bounding E n1−δ ∑k=1 kδ+s exp − 1−s ∑ j = 1 e 2(1− s ) m j − m ⊗ ∑ j = 1 e 2(1− s ) m j − m 2 # . F First, applying Lemma H.4 and equality (2), let  (∗) := E  n k 1− s 1−δ 1 exp − ∑ 1 − δ δ 1−s n k +s k =1  ≤ 1−δ n 1− δ 2 n  ∑ k =1 k 1− s exp − 1−s v  u u u  tE exp − k δ+s   ≤ 1−δ n 1− δ 2 n  ∑ k =1  1 k δ+s mj − m  k ! j1− s 2(1− s ) ∑e ⊗ j =1 k 1− s 1−s  1 ∑e ! j1− s 2(1− s ) v  u u u  tE   k  mj − m  F ! j1− s ∑e (−) mj − m 2 1 s  k ⊗ j =1 k ∑e j1− s 2(1− s )   j =1 k 2 j1− s ∑e (−) 2 1 s ! mj − m  j =1 2 mj − m k ∑e  j =1 j1− s 2(1− s ) 2  2   F 2 mj − m  j =1  2   . Applying Cauchy-Schwarz’s inequality,   (∗) ≤ 1−δ n 1− δ 2   n  ∑ k =1 1 1− s k δ+s k e − 1− s  E  k ∑e j1− s 2(1− s ) 4 mj − m   14   k ∑e   E  j =1 j =1 First, note that thanks to Lemma 6.1  E k ∑e j1− s 2(1− s ) 4 mj − m     = O exp j =1 34  2k1−s 1−s  k 2s  . j1− s 2(1− s ) 4 mj − m   14 2    . Furthermore, applying Lemmas H.4 and Lemma H.2 as well as inequality (9),  E k ∑e 4 j1− s 2(1− s ) mj − m   k ∑e ≤ j =1 j1− s 2(1− s )  h E mj − m 4 i 41 !4 j =1 k ∑e C20 ≤ j1− s 2(1− s ) j =1 !4 1 j1/2 k 1− s = O exp 2 (1 − s )    4s −2  k k . (35) Then, applying Lemma H.2,   (∗) = O  1−δ n 1− δ !2    1 1  =O . ∑ kδ+1/2−s/2 n 1− s k =1 2 n With analogous calculus, one can check that  k 1− s 1−δ n 1 E  1 − δ ∑ δ + s e − 1− s n k k =1 k ∑e j1− s 2(1− s ) Bounding E mj − m k ⊗ j =1 ∑nk=1 kδ1+s ∑e 2 ! j1− s 2(1− s ) mj − m  exp  1− s − k1−s  ∑kj=1 e   =O j =1 " 1− δ n 1− δ !  F j1− s 2(1− s ) mj − m    ⊗ ∑kj=1 e  1 n 1− s j1− s 2(1− s ) . mj − m  (∗∗) = E  n k 1− s 1 1−δ exp − ∑ 1 − δ δ 1−s n k +s k =1  n 1 − δ ≤  1− δ ∑ n k k =1  n 1 − δ =  1− δ ∑ n k k =1  v  u u 1 − s 1 −k u  1 − s tE e δ+s v  u u 1 − k 1− s u  1−s tE e δ+s  k ∑e j1− s 2(1− s ) ! mj − m  ∑e ⊗ j =1 k ∑e j1− s 2(1− s ) ! mj − m  k ∑e j1− s 2 1 s ∑e (−) ⊗ j =1 j1− s 2(1− s ) 4 mj − m j =1   2   . F (∗∗) = O  n 1−δ n1−δ k∑ =1 k !2   1 =O 1+ δ − s which concludes the proof. 35 ! mj − m 1 n 2(1− s )  , 2    F  ! 2 2   mj − m  F Then, applying inequality (35) and Corollary H.2,  j1− s 2(1− s ) j =1 j =1 k k 2 # . F First, applying Lemma H.4 and equality (2), let   E Proof of Lemma 6.3 We just give the proof for the rate of convergence in quadratic mean, the proof of the almost sure rate of convergence is quite straightforward. Let ! !  k j1− s  k j1− s   1−δ n 1 k 1− s (?) := 1−δ ∑ δ+s exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m − Σ n 1−s n k j =1 j =1 k =1 ! !     n k k j1− s j1− s   1−δ k 1− s 1 1 = − n exp − ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m ∑ 1−s n 1− δ ∑ k =1 k − δ k =1 k δ + s j =1 j =1 ! !     1 − s k k n j1− s j   1 k 1− s 1 −s −1 + n k exp − − bk ∑ e 2(1− s ) m j − m ⊗ ∑ e 2(1− s ) m j − m ∑ 1−s ∑ k =1 k − δ k =1 k δ j =1 j =1 We now bound the quadratic mean of each term on the right-hand side of previous equality. First, note that with the help of an integral test for convergence, Z n  Z n +1  n 1  1  1− δ ( n + 1 )1− δ = t−δ dt ≥ ∑ k−δ ≥ t−δ dt = n −1 . 1−δ 1−δ 0 1 k =1 Then, n n 1− δ −δ 1− δ − ∑ k =1 k n n 1− δ −δ 1− δ ∑ k =1 k ( n + 1 )1− δ 1 1−δ − n = 1 − δ n ∑ k =1 k − δ − n 1− δ + 1 ≤ (1 − δ ) n 1− δ ( n 1− δ − 1 )   1 =O . n2−2δ Then, applying Lemma H.4, there is a positive constant C such that for all n ≥ 1,  un := E   1−δ 1 − n n 1− δ ∑ k =1 k − δ  ≤ C n4−4δ n ∑ k =1 1 k δ+s  n 1 ∑ k δ+s e k 1− s − k1−s ∑e k 1− s exp − 1−s  ! mj − m  k ∑e ⊗ j =1 k =1 v u u tE j1− s 2(1− s ) k ∑e j1− s 2(1− s ) j1− s 2(1− s ) un ≤ C n4−4δ n ! mj − m  j =1 ∑ k =1 1 k δ+s  exp − k 1− s 1−s 36 v u u tE mj − m j =1 k ⊗ ∑e j1− s 2(1− s ) j =1 k ∑e j =1 j1− s 2(1− s ) 4 mj − m  2  F 2   F ! mj − m 2  2  . F Furthermore, applying equality (2)  !  Finally, applying Lemma 6.1 ans since δ < (1 + s)/2,  n C un = O  4−4δ n 1 ∑ kδ k =1 !2   =O  1  =o n2−2δ  1 . n 1− s In the same way, with the help of an integral test for convergence, n bn : = ∑ exp k 1− s 1−s  k =1   t 1− s ≤ exp dt (1 − s ) 0  1− s   1− s  Z n n t s +s exp ts−1 dt ≤ n exp (1 − s ) (1 − s ) 0  1− s   1− s    1−s  n n n s 2s−1 2s−1 = n exp + sn exp +o n exp . 1−s 1−s 1−s Z n  Thus, one can check that there is a positive constant c such that for all n ≥ 1,  s bn ≥ n exp n 1− s 1−s  + cn 2s−1  exp n 1− s 1−s  Then, n 1− s  1 − n−s exp − bn 1−s  =  1− s  n−s exp − n1−s bn  =O n −1  exp −  s bn − n exp  1− s n 1− s 1−s  n 1−s Thus, applying Lemma H.4, there is a positive constant C such that for all n ≥ 1,  vn := E  n 1 1 ∑ kδ  ∑nk=1 k−δ k=1 k −s e 1− s − k1−s − bk−1 k  ∑e j1− s 2(1− s ) ! mj − m  k ∑e ⊗ j =1 v  u 2  u n 1 − s k 1 −1 − 1 u   1 − s tE k e ≤ ∑ δ n − δ k k ∑ k =1 k =1 ∑e j1− s 2(1− s ) ! mj − m ! mj − m  k ⊗  vn ≤ 1 ∑nk=1 k−δ  = O  =O 2  n 1 −1 k 1− s   ∑ δ k exp − 1−s k k =1 2 1 ∑nk=1 k−δ 1 n 2(1− s )  n 1 ∑ k δ +1− s !2   k =1  , 37  F j1− s ∑ e 2(1− s ) F Finally, applying equality (2) and Lemma 6.1,  v  u u u  tE k j1− s 2 1 s ∑e (−) j =1   ! 2 2   mj − m  . j =1 j =1 2  j =1  k j1− s 2(1− s ) 4 mj − m  F  2   which concludes the proof. F Proof of Lemma 6.4 Proof of Lemma 6.4. This proof is a direct application of Lemma 6.1. In order to convince the reader, we just give one proof, and the other ones are analogous. Applying Lemma H.4 and 6.1 as well as Corollary H.2,  E n 1 ∑nk=1 k−δ 1 ∑ kδ bk k A1,k k2 k =1 !2   ≤ 1 2 n 1 ∑ k δ bk k =1 ∑nk=1 k−δ   2 1  =O ∑nk=1 k−δ   1 , =O n 2( s − α ) ! r h i 2 4 E k A1,k k n 1 ∑ k δ k α−s k =1 !2   which concludes the proof. We now give the "almost sure version" of Lemma 6.4. Lemma F.1. Suppose Assumptions (A1) to (A5a’) hold. Then, for all i, j ∈ {1, 2}, and for all γ > 0,  E 1 1 ∑ k δ bk ∑nk=1 k−δ k=1  E n 1 n 1 ∑ k δ bk ∑nk=1 k−δ k=1 !2    (ln n)γ  =o , k Ai,k k A j,k n 1− s !2    (ln n)γ  . =o k Ai,k k k Mk+1 k n 1− s The proof is not given since it is quite closed to the one of Lemma 6.4. G Dealing with Assumption (A6) for the geometric median In what follows, we consider that assumption (H2) in Godichon-Baggioni (2016b) is fulfilled, i.e: (H2) The random variable X is not concentrated around single points: for all positive constant A, there is a positive constant C A such that for all h ∈ B (0, A), " E 1 k X − h k2 38 # ≤ CA . Then, for all h ∈ H, let us define the function ϕh : [0, 1] −→ S( H ), defined for all t ∈ [0, 1] by ϕh (t) = E [∇h g ( X, m + t (h − m)) ⊗ ∇h g ( X, m + t (h − m))]   X − mv + t ( h − m) X − m + t (h − m) . ⊗ =E k X − m + t (h − mv )k k X − m + t (h − m)k In what follows, we will denote A(t) := X − m + t (h − m). Note that ϕh (0) = E [∇h gv ( X, m) ⊗ ∇h gv ( X, m)] ϕh (1) = E [∇h gv ( X, h) ⊗ ∇h gv ( X, h)] and that the functional ϕh is differentiable, and its derivative is defined for all t ∈ [0, 1] by " ϕ0h (t) = −2E " +E # 1 k A(t)k4 1 k A(t)k2 hh − m, A(t)i A(t) ⊗ A(t) + E " # 1 k A(t)k2 (h − m) ⊗ A(t) # A(t) ⊗ (h − m) . Then, applying Cauchy-Schwarz’s inequality, ϕ0h (t) F  1 ≤ 4E km − hk . k A(t)k  Thus, let e > 0, thanks to Assumption (H2), there is a positive constant Ckmk+e such that for all t ∈ [0, 1] and for all h ∈ B (m, e), ϕ0h (t) F ≤ Ckmk+e km − hk . Finally, kE [∇h gv ( X, m) ⊗ ∇h gv ( X, m)] − E [∇h gv ( X, h) ⊗ ∇h gv ( X, h)]k F = k ϕh (1) − ϕh (0)k F = Z 1 0 ϕ0h (t)dt F ≤ Ckmk+e km − hk . H Technical lemmas In order to simplify the proof, we recall or give some technical lemmas. The following one ensures that the sequence (ξ n ) admits uniformly bounded 2p-moments. Lemma H.1 (Godichon-Baggioni (2016b)). Suppose assumptions (A1) to (A5a’) hold, there is a positive constant K such that for all n ≥ 1, h i E k ξ n +1 k 4 ≤ K 39 Moreover, suppose assumption (A5b) holds too. Then, for all positive integer p, there is a positive constant K p such that for all n ≥ 1, i h E kξ n+1 k2p ≤ K p As a particular case, since for all eigenvalue λ of Γm , 0 < λmin ≤ λ ≤ C, for all n ≥ 1, h i −2p E kΞn+1 k2p ≤ K p λmin . Corollary H.1. Suppose assumptions (A1) to (A6b) hold. Then, there is a positive constant C such that for all n ≥ 1, kE [Ξn+1 ⊗ Ξn+1 |Fn ] − Σk2F ≤ C kmn − mk2 The proof is not given since it is a direct application of assumption (A6b) and Lemma H.1. The following lemma gives upper bounds of the sums of exponential terms which appears in several proofs. Lemma H.2. For all constants a, b, c such that a ∈ (0, 1), there is a positive constant Ca,b,c such that n ∑ k−a kb exp     ck1−a ≤ Ca,b,c nb exp cn1−a . k =1 The proof is not given it is a direct application of an integral test for convergence. As a corollary, one can obtain the following bound (lower and upper) of bn . Corollary H.2. There are positive constants c, C such that for all n ≥ 1, s  cn exp n 1− s 1−s  s  ≤ bn ≤ Cn exp n 1− s 1−s  . The following lemma is really useful in the proof of Theorem 3.1. Lemma H.3 (Cardot and Godichon-Baggioni (2017)). Let α, β be non-negative constants such that 0 < α < 1, and (un ), (vn ) be two sequences defined for all n ≥ 1 by un := cu , nα vn := cv , nβ with cu , cv > 0. Thus, there is a positive constant c0 such that for all n ≥ 1, n n j k ∑ e− ∑ = uj uk vk = O (vn ) . (36) k =1 Finally, we recall the following results, which enables us to upper bound the L p moments of a sum of random variables in normed vector spaces. Lemma H.4 (Godichon-Baggioni (2016a)). Let Y1 , ..., Yn be random variables taking values in a   normed vector space such that for all positive constant q and for all k ≥ 1, E kYk kq < ∞. Thus, 40 for all constants a1 , ..., an and for all integer p, " E n ∑ ak Yk k =1 p# n ≤ ∑ | ak | E kYk k  1 !p p  p . (37) k =1 References Bach, F. (2014). Adaptivity of averaged stochastic gradient descent to local strong convexity for logistic regression. The Journal of Machine Learning Research, 15(1):595–627. Bach, F. and Moulines, E. (2013). Non-strongly-convex smooth stochastic approximation with convergence rate O (1/n). In Advances in Neural Information Processing Systems, pages 773–781. Boyd, S. and Vandenberghe, L. (2004). Convex optimization. Cambridge university press. Cardot, H., Cénac, P., Godichon-Baggioni, A., et al. (2017). Online estimation of the geometric median in hilbert spaces: Nonasymptotic confidence balls. The Annals of Statistics, 45(2):591–614. Cardot, H., Cénac, P., and Zitt, P.-A. (2013). Efficient and fast estimation of the geometric median in Hilbert spaces with an averaged stochastic gradient algorithm. Bernoulli, 19(1):18–43. Cardot, H. and Godichon-Baggioni, A. (2017). Fast estimation of the median covariation matrix with application to online robust principal components analysis. Test, 26(3):461– 480. Chakraborty, A. and Chaudhuri, P. (2014). The spatial distribution in infinite dimensional spaces and related quantiles and depths. The Annals of Statistics, 42:1203–1231. Chaudhuri, P. (1996). On a geometric notion of quantiles for multivariate data. J. Amer. Statist. Assoc., 91(434):862–872. Delyon, B. and Juditsky, A. (1992). Stochastic optimization with averaging of trajectories. Stochastics: An International Journal of Probability and Stochastic Processes, 39(2-3):107–118. Delyon, B. and Juditsky, A. (1993). Accelerated stochastic approximation. SIAM Journal on Optimization, 3(4):868–881. Dippon, J. and Renz, J. (1997). Weighted means in stochastic approximation of minima. SIAM Journal on Control and Optimization, 35(5):1811–1827. Dippon, J. and Walk, H. (2006). The averaged robbins–monro method for linear problems in a banach space. Journal of Theoretical Probability, 19(1):166–189. Duflo, M. (1996). Algorithmes stochastiques. Springer Berlin. 41 Duflo, M. (1997). Random iterative models, volume 34 of Applications of Mathematics (New York). Springer-Verlag, Berlin. Translated from the 1990 French original by Stephen S. Wilson and revised by the author. Fabian, V. (1968). On asymptotic normality in stochastic approximation. The Annals of Mathematical Statistics, pages 1327–1332. Gahbiche, M. and Pelletier, M. (2000). On the estimation of the asymptotic covariance matrix for the averaged robbins–monro algorithm. Comptes Rendus de l’Académie des SciencesSeries I-Mathematics, 331(3):255–260. Gervini, D. (2008). Robust functional estimation using the median and spherical principal components. Biometrika, 95(3):587–600. Godichon-Baggioni, A. (2016a). Estimating the geometric median in hilbert spaces with stochastic gradient algorithms: Lp and almost sure rates of convergence. Journal of Multivariate Analysis, 146:209–222. Godichon-Baggioni, A. (2016b). Lp and almost sure rates of convergence of averaged stochastic gradient algorithms with applications to online robust estimation. arXiv preprint arXiv:1609.05479. Godichon-Baggioni, A., Portier, B., et al. (2017). An averaged projected robbins-monro algorithm for estimating the parameters of a truncated spherical distribution. Electronic Journal of Statistics, 11(1):1890–1927. Haldane, J. B. S. (1948). Note on the median of a multivariate distribution. Biometrika, 35(3-4):414–417. Hallin, M. and Paindaveine, D. (2006). Semiparametrically efficient rank-based inference for shape. i. optimal rank-based tests for sphericity. The Annals of Statistics, 34(6):2707–2756. Horn, R. A. and Johnson, C. R. (2012). Matrix analysis. Cambridge university press. Huber, P. and Ronchetti, E. (2009). Robust Statistics. John Wiley and Sons, second edition. Jakubowski, A. (1988). Tightness criteria for random measures with application to the principle of conditioning in Hilbert spaces. Probab. Math. Statist., 9(1):95–114. Juditsky, A., Nesterov, Y., et al. (2014). Deterministic and stochastic primal-dual subgradient algorithms for uniformly convex minimization. Stochastic Systems, 4(1):44–80. Kemperman, J. (1987). The median of a finite measure on a Banach space. In Statistical data analysis based on the L1 -norm and related methods (Neuchâtel, 1987), pages 217–230. NorthHolland, Amsterdam. Kraus, D. and Panaretos, V. M. (2012). Dispersion operators and resistant second-order functional data analysis. Biometrika, 99:813–832. 42 Kushner, H. J. and Yin, G. (2003a). Stochastic approximation and recursive algorithms and applications, volume 35. Springer Science & Business Media. Kushner, H. J. and Yin, G. G. (2003b). Stochastic approximation and recursive algorithms and applications, volume 35 of Applications of Mathematics (New York). Springer-Verlag, New York, second edition. Stochastic Modelling and Applied Probability. Ljung, L., Pflug, G. C., and Walk, H. (2012). Stochastic approximation and optimization of random systems, volume 17. Birkhäuser. Maronna, R. A., Martin, R. D., and Yohai, V. J. (2006). Robust statistics. Wiley Series in Probability and Statistics. John Wiley & Sons, Ltd., Chichester. Theory and methods. Minsker, S., Srivastava, S., Lin, L., and Dunson, D. (2014). Scalable and robust bayesian inference via the median posterior. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1656–1664. Nemirovski, A., Juditsky, A., Lan, G., and Shapiro, A. (2009). Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609. Oja, H. and Niinimaa, A. (1985). Asymptotic properties of the generalized median in the case of multivariate normality. Journal of the Royal Statistical Society. Series B (Methodological), pages 372–377. Pelletier, M. (1998). On the almost sure asymptotic behaviour of stochastic algorithms. Stochastic processes and their applications, 78(2):217–244. Pelletier, M. (2000). Asymptotic almost sure efficiency of averaged stochastic algorithms. SIAM J. Control Optim., 39(1):49–72. Polyak, B. and Juditsky, A. (1992). Acceleration of stochastic approximation. SIAM J. Control and Optimization, 30:838–855. Robbins, H. and Monro, S. (1951). A stochastic approximation method. The annals of mathematical statistics, pages 400–407. Ruppert, D. (1988). Efficient estimations from a slowly convergent robbins-monro process. Technical report, Cornell University Operations Research and Industrial Engineering. Schwabe, R. and Walk, H. (1996). On a stochastic approximation procedure based on averaging. Metrika, 44(1):165–180. Serfling, R. (2006). Depth functions in nonparametric multivariate inference. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, 72:1. Vardi, Y. and Zhang, C.-H. (2000). The multivariate L1 -median and associated data depth. Proc. Natl. Acad. Sci. USA, 97(4):1423–1426. Walk, H. (1992). Foundations of stochastic approximation. In Stochastic Approximation and Optimization of Random Systems, pages 1–51. Springer. 43
10math.ST
Classification of histopathological breast cancer images using iterative VMD aided Zernike moments & textural signatures Subhankar Chattoraj$, Karan Vishwakarma$ $ Techno India University, West Bengal Abstract—. In this paper we present a novel method for an automated diagnosis of breast carcinoma through multilevel iterative variational mode decomposition (VMD) and textural features encompassing Zernaike moments, fractal dimension and entropy features namely, Kapoor entropy, Renyi entropy, Yager entropy features are extracted from VMD components. The proposed method considers the histopathological image as a set of multidimensional spatially-evolving signals. ReliefF algorithm is used to select the discriminatory features and statistically most significant features are fed to squares support vector machine (SVM) for classification. We evaluate the efficiency of the proposed methodology on publicly available Breakhis dataset containing 7,909 breast cancer histological images, collected from 82 patients, of both benign and malignant cases. Experimental results shows the efficacy of the proposed method in outperforming the state of the art while achieving an average classification rates of 89.61% and 88:23% using three-fold and ten-fold cross-validation strategies, respectively. This system can aid the pathologist in accurate and reliable diagnosis of biopsy samples. BreaKHis, a publicly dataset available at http://web.inf.ufpr.br/vri/breast-cancer-database Index Terms— Medical imaging; Histopathological image classification; Breast cancer; Variational mode decomposition; LS-SVM; Zernike moments. I. INTRODUCTION Cancer is regarded as a massive health problem in the world. It is estimated by the International Agency for Research on Cancer (IARC) that by 2012 there was 8.2 million deaths due to cancer part of world health organization (WHO) and by 2030 there would be 27 million new cases of cancer [1]. Excluding the skin cancer breast cancer (BC) in women is regarded as the most common type of cancer. In recent times, there has been lot of advancement for analyzing of BC progression and molecular markers related discovery but for the BC diagnosis histopathological analysis still remains the most widely used [2]. Despite of development in various diagnostic imaging technologies but the final BC diagnosis of the samples is done by the pathologist under microscope. Therefore a Computer-Aided Detection/Diagnosis (CAD/CADx) system is needed so that it can assist the pathologist to be more accurate and productive. In an image analysis system the classification of histopathology images into distinct histopathology patterns, corresponding to the non-cancerous or cancerous condition of the analyzed tissue, is often the primordial goal but the main challenge is the complexity involving in dealing with such histopathological images. For more than 40 years, automatic imaging process for cancer diagnosis purpose has been studied and evaluated as a research topic [3] but complexity still looms in image analysis. As an example in recent research [4] for nuclei segmentation divergent algorithm were compared and tested where the cases were stratify on dataset of 500 images of being malignant or benign and the accuracy percentage reported ranging from 96% to 100%. Another recent research [5] on diagnosis of BC was presented to distinguish the images on either being a benign or malignant based on cytological images analysis of needle biopsies. The researcher reports a performance accuracy of 98% on the 737 images implementing four unlike classifiers trained with a 25-dimensional feature vector. In similar to the study illustrated above a study [6] implementing support vector machine and neural network hinged on the nuclei segmentation of cytological images proposed a diagnosis system for BC. In this study the accuracy reported was 76% to 94%. In recent study cascade was proposed approach with an option of rejection. The easy cases are solved in the first level of the cascade, whereas the hard cases are dealt by the second level which has very complex pattern classification system. They evaluated the proposed method on the database which was proposed by the Israel Institute of Technology. The database was consisted of 361 images and reported the results of about 97% of reliability. In another work [8] done by the same authors, a recognition rate of about 92% was achieved when they evaluated an ensemble of one-class classifiers on the similar database. The majority of the recent works related to the BC classification are mainly focused on the Whole Slide Imaging (WSI) [7-9] [6] [4]. Nonetheless, there are many barriers to the wide adoption of WSI and the other forms of the digital pathology. These barriers include insufficient productivity for high-volume clinical routines, the huge cost of implementing and operating the technology, intrinsic technology-related concerns, unsolved regulatory issues, as well as "cultural resistance" from the pathologists [10].Until recently, small datasets were used for most of the work based on the BC histopathology image analysis. These datasets were not usually available for the scientific community. In order to check this gap, a dataset composed of 7,909 breast histopathological images was introduced [11]. This dataset was acquired from 82 patients. In a similar study, done by the authors they evaluated different classifiers and six different textural descriptors, they reported a series of experiments with the accuracy rates ranging from 80% to 85%, depending on the image magnification factor. According to the results presented in the above study [11], it is certain that the texture descriptors may provide a good representation to train classifiers. Nevertheless, some researchers have supported the idea the main weakness of the current machine learning methods lies particularly on this feature engineering step [12-13] . For them, the machine learning algorithms must be able to extract and organize the discriminative information from the data and must be less dependent on feature engineering. In the other words, the machine learning algorithms must be capable of learning the representation. This learning is not a current method due to the popularization of Graphic Processing Units (GPUs) it has emerged as a feasible alternative for remitting computational high output at lower cost acquired through enormous parallel architecture. Convolutional Neural Network (CNN) [14] has been widely implemented to procure result as the revolutionary technique in pattern recognition [15-16]. In a recent study [17] in similar image classification of microscopic and macroscopic texture that CNN is able to transcend conventional textural descriptors. Traditional approach in feature extraction necessitates substantial effort and effectual expert knowledge in similar domain, regularly leading to customized solution for particular problem [18]. In this work, deep learning has been evaluated for BC histopathological image classification. To deal with highresolution texture images architecture utilized for low-resolution images we have scrutinized different CNN architecture. II. PROPOSED METHODOLOGY Fig. 1. Pipeline for VMD aided Zernike moments & textural signatures based classification. A. Dataset description The microscopic biopsy images of benign and malignant breast tumors are included in the BreakHis database [11]. These images were gathered through a clinical study from January to December (2014), where all the patients referred to the P&D Lab, Brazil, with a clinical indication of BC were requested to take part in the study. The study was approved by the institutional review board and the written informed agreement was given by the patients participating in the study. The anonymity was maintained for all of the data. The samples are produced from the breast tissue biopsy slides which are stained with the hematoxylin and eosin (HE). The collection of samples is done by the surgical (open) biopsy (SOB), which are then prepared for the histological study and are designated by the pathologists of the P&D Lab. In this work, the standard paraffin process (which is extensively used in clinical routine) is being used as a preparation procedure. The main objective is to preserve the original tissue structure and the molecular composition so that it can be observed under the light microscope. The steps involved in the complete preparation procedure are the fixation, dehydration, clearing, infiltration, embedding, and trimming [20]. In order to mount the tissue sections on slides, sections of 3μm are cut with the help of using a microtome. Then after the staining, a glass coverslip is used to cover all the sections. After that the tumoral areas in each slide is identified by the anatomopathologists by visually analyzing the tissue sections under the microscope. In every case, the final diagnosis is produced by the experienced pathologists and is confirmed by the complementary exams such as the immunohistochemistry (IHC) analysis. (a) (b) (c) (d) Fig. 2. A slide of breast malignant tumor (stained with HE) seen in different magnification factors: (a) 40X, (b) 100X, (c) 200X, and (d) 400X. Highlighted rectangle (manually added for illustrative purposes only) is the area of interest selected by pathologist to be detailed in the next higher magnification factor. [Type here] Table1: Image arrangement by magnification factor and class MAGNIFICATION MALIGNANT BENIGN TOTAL 40X 1370 625 1995 100X 1437 644 2081 200X 1390 623 2013 400X 1232 588 1820 Total 5429 2480 7909 Patient aggregate 58 24 82 B. Variational mode decomposition (VMD) The underlying information is effectively captured with the help of signal processing techniques despite of the non-stationary nature of the signal. Unlike the EMD [21], the VMD [22] is a non-recursive method. The decomposition which is based on EMD highly relies upon the stopping criteria, interpolation and the extreme point finding. This deficiency of mathematical theory and degrees of freedom supports the idea of having a robust decomposition method. The VMD which is an alternative to the EMD method [22] is far more improved in comparison to the EMD and robust to noise. VMD relies on the frequency information content of the signal. It is an adaptive and non-stationary [22]. It has sparsity properties and the ability to decompose the signal that centers around particular frequency into the bandlimited modes. The multi-component signal can be decomposed nonrecursively into the discrete number of bandlimited sub-signals through VMD. 1. 2. 3. For each sub-band modify the signal into its analytic equivalent. Exponential term which is modified to specific calculated center frequency has been utilized to transpose frequency spectrum of individual sub-band In order to estimate the bandwidth the squared L2-norm of the gradient is implemented. For VMD, the constrained variational problem for a multi-component signal {∑ ‖ [( ) ] ‖ } can be illustrated as follows [22]: ∑ Where, decomposed bandlimited VMD component signifies and center frequency is signified by . The constrained problem in equation (1) can be described by integrating the Lagrangian multiplier and the quadratic penalty. This can be rewritten as follows [22]: ∑‖ [( ) 〈 ] ‖ ‖ ∑ ‖ 〉 ∑ As alternate direction method of multipliers (ADMM) in respect to equation (1) the saddle point of equation (2) can be derived [22] . -mode estimation is refurbished as follows. ∑ ̂ ̂ ̂ ̂ Where, balancing parameter of the data fidelity constraint is denoted by a. The center frequency is upgraded as center of gravity, which can be presented as [22]: ∫ | ̂ | ⁄∫ | ̂ | In this study, we have employed the two dimensional VMD (2D-VMD) [23] in order to achieve the image decomposition. The 2D-VMD is applied in a repetitious manner on the green channel of the digital color fundus image. Repeatedly applying VMD can be very helpful in extracting the important details which can be used for the diagnosis of glaucoma. VMD components are [Type here] usually bandlimited. In order to capture the additional details of pixel variation, further decomposition of the previous VMD component is required. The fine details can be extracted from the previously decomposed VMD component with the help of the repetition process, which does the task of getting fine details by reducing the frequency band of the newly decomposed VMD component. The block diagram of the repetitive 2D-VMD is depicted in Fig. 3. In the first repetition, the image is decomposed into two modes. During the second repetition, the high-frequency band of the first repetition (2nd mode of the first repetition) is further decomposed into two modes. Fig. 3 depicts the decomposition of the 2nd mode of each repetition, where both of the 2nd modes of each repetition are decomposed again three more times. Therefore, we have acquired 10 VMD components with two components in each repetition. C. Feature extraction For apprehending relevant information from signals feature extraction plays a paramount role. Textural features are significant for automated glaucoma diagnosis. In image coarseness, pixel regularity and smoothness is computed by textural features [24]. In order to ensnare the pixel intensity variance in the image entropy and fractal dimension (FD) features have been extracted. We have implemented the entropy features namely Kapur entropy (KE) [25], Yager entropy (YE) [26] and Renyi entropy (RE) [25] in this proposed work. The measure of randomness and uncertainty is determined as entropy [27]. Distribution of Pixel intensity equally results to no information and therefore zeros entropy. Non-Shannon entropies are utilized in this work as the dynamic range is higher and makes preferable approximation of regularity and dispersion [26]. Let determines the probability pixel value m happened n times and let the size of the image be . Now can be expressed as . Now RE, YE, and ⁄ KE can be expressed as follows [26]: ∑ | | | | (∑ ∑ ( ∑ ) ) D. Zernike moments (ZM) The Zernike moment (ZMs) [28] is described as orthogonal moments procured by forecasting the input image onto complex orthogonal Zernike polynomials. ZMs of order p and repetition q for a function f(x, y) over a unit disk are illustrated by: where p defines non-negative integer, q defined as an integer such that the Zernike orthogonal basis function defines where √ . Now ( ⁄ ) √ | | and is defined by: . The radial polynomial | | ∑ ( In Equation (9) the zeroth order approximation is [29-30]: [Type here] | | | | ) ( | | ) is defined as: . Complex conjugate of ∑∑ where the normalized coordinate location is defined by implementing coordinate transformation given in following: √ which is commensurate to pixel (i,k) which is derived by √ for all i, k = 0, 1, 2, . . ., N − 1. For ZMs computation we utilize other unit disk which provides superior performance for ZMsbased image pattern matching complication [29-39]. For ZMs-based approach as proposed in your system, we are not using moments with negative q, as | | | |. E. Fractal dimension (FD) Fractals are the objects which comprises of self-similarity and irregularity [31]. FD is an estimation of irregularity, self-similarity and roughness. As it comprises of scale dependent property it is very convenient for studying texture [31]. Malignant and benign images have textural difference, which can be apprehended using FD. The value of FD increases with the higher roughness of surface or texture [24]. If a surface S, ascend up or down by a factor f, then it is self-similar only if S is union of non-overlapping copies ( ) of itself when extended. This similarity can be computed utilizing FD [31]: This can also be rewritten as follows: ( ) ( ) where, ⁄ To determine the FD, we have implemented Differential box counting (DBC) [32]. The DBC has been modified and named sequential box counting (SBC). Initial size of the grid in the SBC method is set to 2 and final one is set to the image size c X d. The in (13) is sum of differences of maximum and minimum intensities of each 2 X 2 grid. This process is repeated until the grid is equal to image size. F. LS-SVM & kernel selection In the computer-based diagnosis application classifier plays a crucial role. For classification of various classes a decision boundary is created utilizing hyper-planes. LS-SVM [36, 37] has been implemented for classification of diverse biomedical signals such as heart rate [38], heart sound [39] and electroencephalogram [38]. In order to separate non-linear features using LS-SVM, radial basis function (RBF) [40] as a non-linear kernel function is implemented that maps the input space into a higher dimensional space so that it can be linearly separable. LS-SVM is a oversee machine learning algorithm in compute-based glaucoma diagnosis [34]. III. RESULTS AND DISCUSSION In this section, details of our experiment, results and key finding are discussed. In our experiment we have utilized the breaKHis dataset which is available online and the illustration of the dataset has been given in Table1. We have randomly utilized 58 patients (70%) for training and the rest 25 patients (30%) for testing. The classifier which is mentioned earlier has been trained using the images of 58 patients and also 5 try-out of arbitrary selection of testing data. The images of 25 patients have been utilized to test the training model. In order to compute our results the evaluation metrics used are discussed in the following section. . Evaluation metric We have utilized the patient recognition rate (PRR) as evaluation metric to contrast the results available in the existing approach. PRR denotation is given below: [Type here] ∑ Where N defines the number of patients in total (accessible for testing). The score of patients is given below. Where are correctly classify and Zoom factor 40X is the count of cancer images in total. TABLE VIII –OVERALL PERFORMANCE ANALYSIS WITH PRE-PROCESSED IMAGES Performance Metrics Accuracy (Acc.) (%) Sensitivity (Sen.) (%) 87.7 85.8 88.4 87.1 88.0 Specificity (Spec.) (%) Positive Predictive Value (PPV) (%) Negative Predictive Value (NPV) (%) 85.3 85.1 84.6 84.6 88.6 87.5 85.7 87.6 83.4 85.1 84.6 83.7 83.5 85.4 84.3 87.0 86.9 85.3 84.7 88.4 100X 200X 400X Full Dataset TABLE-I: A COMPARISON OF SELECTED STUDIES IN THE AUTOMATED CLASSIFICATION BREAST MALIGNANT HISTOPATHOLOGICAL IMAGES USING THE BREAKHIS DATABASE Author, Years Fabio A. Spanhol., et al, 2016 [1] Fabio A. Spanhol, et al, 2016 [2] Bayramoglu., et.al, 2016 [3] Fabio A. Spanhol., et al, 2016 [4] Kosmas Dimitriopoulos., et al, 2017 [5] Zyongyi Han., et. al, 2017 [6] This work Feature descriptor Classifier Performance 100x 200x 73.2 72.9 76.4 70.2 72.8 74.3 78.6 83.4 69.4 69.6 400x 73.1 72.8 73.7 81.7 67.6 LBP CLBP LPQ GLCM QRB 1-NN, QDA, RF, SVM 1-NN, QDA, RF, SVM 1-NN, QDA, RF, SVM 1-NN, QDA, RF, SVM 1-NN, QDA, RF, SVM 40x 75.6 77.4 73.8 74.7 74.4 PFTAS Deep features 1-NN, QDA, RF, SVM CNN 83.8 84.0 82.1 83.9 85.1 86.3 82.3 82.1 Deep Features Multi task CNN 81.87 83.39 82.56 80.69 Deep Features CNN & Fusion Rules 90.0 88.4 84.6 86.1 Grassmannian manifold VLAD encoding 91.8 92.2 91.6 90.5 Deep Features Structured Deep Learning LS-SVM 95.8 96.9 96.7 94.9 87.7 85.8 88.0 84.6 Zernike moments IV. CONCLUSION In this paper, we have presented a set of experiments conducted on the BreaKHis dataset using a deep learning approach to avoid hand-crafted features. We have shown that we could use an existing SA architecture, in our case AlexNet that has been designed for classifying color images of objects and adapt it to the classification of BC histopathological images. We have also proposed several strategies for training the SA architecture, based on the extraction of patches obtained randomly or by a sliding window [Type here] mechanism, that allow to deal with the high-resolution of these textured images without changing the SA architecture designed for low-resolution images. Our experimental results obtained on the BreaKHis dataset showed improved accuracy obtained by SA when compared to traditional machine learning models trained on the same dataset but with state of the art texture descriptors. Future work can explore different SA architectures and the optimization of the hyper parameters. Also, strategies to select representative patches in order to improve the accuracy can be explored. ACKNOWLEDGEMENT The authors would like to thank Fabio Alexandre Spanhol for providing an exhaustive and inclusive discussion and standard baseline results of the BreaKHis dataset. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] P. Boyle and B. Levin, Eds., World Cancer Report 2008. Lyon: IARC, 2008. [Online]. Available: http://www.iarc.fr/en/publications/pdfs-online/wcr/2008/wcr_2008.pdf S. R. Lakhani, E. I.O., S. Schnitt, P. Tan, and M. van de Vijver, WHO classification of tumours of the breast, 4th ed. Lyon: WHO Press, 2012. B. Stenkvist, S. Westman-Naeser, J. Holmquist, B. Nordin, E. Bengtsson, J. Vegelius, O. Eriksson, and C. H. Fox, “Computerized nuclear morphometry as an objective method for characterizing human cancer cell populations,” Cancer Research, vol. 38, no. 12, pp. 4688–4697, 1978. M. Kowal, P. Filipczuk, A. Obuchowicz, J. Korbicz, and R. Monczak, “Computer-aided diagnosis of breast cancer based on fine needle biopsy microscopic images,” Computers in Biology and Medicine, vol. 43, no. 10, pp. 1563–1572, 2013. P. Filipczuk, T. Fevens, A. Krzy˙zak, and R. Monczak, “Computer-aided breast cancer diagnosis based on the analysis of cytological images of fine needle biopsies,” IEEE Transactions on Medical Imaging, vol. 32, no. 12, pp. 2169–2178, 2013. Y. M. George, H. L. Zayed, M. I. Roushdy, and B. M. Elbagoury, “Remote computer-aided breast cancer detection and diagnosis system based on cytological images,” IEEE Systems Journal, vol. 8, no. 3, pp. 949–964, 2014. Y. Zhang, B. Zhang, F. Coenen, and W. Lu, “Breast cancer diagnosis from biopsy images with highly reliable random subspace classifier ensembles,” Machine Vision and Applications, vol. 24, no. 7, pp. 1405– 1420, 2013. Y. Zhang, B. Zhang, F. Coenen, J. Xiau, and W. Lu, “One-class kernel subspace ensemble for medical image classification,” EURASIP Journal on Advances in Signal Processing, vol. 2014, no. 17, pp. 1–13, 2014. S. Doyle, S. Agner, A. Madabhushi, M. Feldman, and J. Tomaszewski,“Automated grading of breast cancer histopathology using spectral clustering with textural and architectural image features,” in Proceedings of the 5th IEEE International Symposium on Biomedical Imageging (ISBI): From Nano to Macro, vol. 61. IEEE, May 2008, pp. 496– 499. A. J. Evans, E. A. Krupinski, R. S. Weinstein, and L. Pantanowitz, “2014 american telemedicine association clinical guidelines for telepathology: Another important step in support of increased adoption of telepathology for patient care,” Journal of Pathology Informatics, vol. 6, 2015. F. Spanhol, L. S. Oliveira, C. Petitjean, and L. Heutte, “A dataset for breast cancer histopathological image classification,” IEEE Transactions of Biomedical Engineering, 2016. Y. Bengio, A. Courville, and P. Vincent, “Representation learning: A review and new perspectives,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, pp. 1798–1828, 2013. Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, pp. 436–444, 2015. Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel, “Backpropagation applied to handwritten zip code recognition,” Neural Computation, vol. 1, no. 4, pp. 541–551, 1989. A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in Neural Information Processing Systems 25, 2012, pp. 1097–1105. X. X. Niu and C. Y. Suen, “A novel hybrid cnn–svm classifier for recognizing handwritten digits,” Pattern Recognition, vol. 45, no. 1318- 1325, 2012. L. G. Hafemann, L. S. Oliveira, and P. Cavalin, “Forest species recognition using deep convolutional neural networks,” in International Conference on Pattern Recognition, 2014, pp. 1103–1107. T. H. Vu, H. S. Mousavi, V. Monga, U. A. Rao, and G. Rao, “Dfdl: Discriminative feature-oriented dictionary learning for histopathological image classification,” in Proceedings of the IEEE 12th International Symposium on Biomedical Imaging (ISBI). IEEE, Apr. 2015, pp. 990–994. U.R. Acharya, M.R.K. Mookiah, J.E. Koh, J.H. Tan, K. Noronha, S.V. Bhandary, A.K. Rao, Y. Hagiwara, C.K. Chua, A. Laude, Novel risk index for the identification of age-related macular degeneration using radon transform and {DWT} features, Comput. Biol. Med. 73 (2016) 131–140. A. L. Mescher, Junqueira’s basic histology: text and atlas. New York: McGraw-Hill Lange, 2013. [Type here] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] N.E. Huang, Z. Shen, S.R. Long, M.C. Wu, H.H. Shih, Q. Zheng, N.-C. Yen, C.C. Tung, H.H. Liu, The empirical mode decomposition and the hilbert spectrum for nonlinear and non-stationary time series analysis, Proceedings of the Royal Society of London A: Mathematical, Phys. Eng. Sci. 454 (1971) (1998) 903–995. K. Dragomiretskiy, D. Zosso, Variational mode decomposition, IEEE Trans. Signal Process. 62 (3) (2014) 531–544. K. Dragomiretskiy, D. Zosso, Two-dimensional Variational Mode Decomposition, 2015, pp. 197–208. U.R. Acharya, S.V. Sree, L. Saba, F. Molinari, S. Guerriero, J.S. Suri, Ovarian tumor characterization and classification using ultrasound—a new online paradigm, J. Digit. Imaging 26 (3) (2013) 544–553. A. Pharwaha, B. Singh, Shannon and non-shannon measures of entropy for statistical texture feature extraction in digitized mammograms, in: World Congress on Engineering and Computer Science, vol. 2, 2009. U.R. Acharya, M.R.K. Mookiah, J.E. Koh, J.H. Tan, S.V. Bhandary, A.K. Rao, H. Fujita, Y. Hagiwara, C.K. Chua, A. Laude, Automated screening system for retinal health using bi-dimensional empirical mode decomposition and integrated index, Comput. Biol. Med. 75 (2016) 54–62. M. Mookiah, U.R. Acharya, R.J. Martis, C.K. Chua, C. Lim, E. Ng, A. Laude, Evolutionary algorithm based classifier parameter tuning for automatic diabetic retinopathy grading: a hybrid feature extraction approach, Knowl. Based Syst. 39 (2013) 9–22. M.R. Teague, Image analysis via the general theory of moments, JOSA A 70(1980) 920–930. C.Y. Wee, R. Paramesran, On the computational aspects of Zernike moments,Image Vision Comput. 25 (2007) 967– 980. C. Singh, R. Upneja, Error Analysis in the computation of orthogonal rotationinvariant moments, J. Math. Imaging Vision 49 (2014) 251–271. M.K. Biswas, T. Ghose, S. Guha, P.K. Biswas, Fractal dimension estimation for texture images: a parallel approach, Pattern Recognit. Lett. 19 (34) (1998) 309–313. B.B. Chaudhuri, N. Sarkar, Texture segmentation using fractal dimension, IEEE Trans. Pattern Anal. Mach. Intell. 17 (1) (1995) 72–77. M. Sharma, R.B. Pachori, U.R. Acharya, A new approach to characterize epileptic seizures using analytic timefrequency flexible wavelet transform and fractal dimension, Pattern Recognit. Lett. 94 (2017) 172–179. S. Maheshwari, R.B. Pachori, U.R. Acharya, Automated diagnosis of glaucoma using empirical wavelet transform and correntropy features extracted from fundus images, IEEE J. Biomed. Health Inf. PP 99 (2016) 1. R. Kolar, J. Jan, Detection of glaucomatous eye via color fundus images using fractal dimensions, Radio Eng. 17 (3) (2008) 109–114. J.A.K. Suykens, J. Vandewalle, Least squares support vector machine classifiers, Neural Process. Lett. 9 (3) (1999) 293–300. J. Suykens, T.V. Gestel, J.D. Brabanter, B.D. Moor, J. Vandewalle, Least Squares Support Vector Machines, vol. 4, World Scientific Publication, Singapore, 2002. U.R. Acharya, K.S. Vidya, D.N. Ghista, W.J.E. Lim, F. Molinari, M. Sankaranarayanan, Computer aided diagnosis of diabetic subjects by heart rate variability signals using discrete wavelet transform method, Knowl. Based Syst. 81 (2015) 56–64. S. Patidar, R.B. Pachori, N. Garg, Automatic diagnosis of septal defects based on tunable-Q wavelet transform of cardiac sound signals, Expert Syst. Appl. 42 (7) (2015) 3315–3326. A.H. Khandoker, D.T.H. Lai, R.K. Begg, M. Palaniswami, Wavelet based feature extraction for support vector machines for screening balance impairments in the elderly, IEEE Trans. Neural Syst. Rehabil. Eng. 15 (4) (2007) 587– 597. [Type here]
1cs.CV
Discrete Mathematics and Theoretical Computer Science DMTCS vol. 19:3, 2017, #2 arXiv:1706.09356v2 [cs.CC] 12 Sep 2017 Tight Euler tours in uniform hypergraphs – computational aspects Zbigniew Lonc 1 Paweł Naroski Paweł Rza˛żewski Faculty of Mathematics and Information Science, Warsaw University of Technology, Poland received 2nd July 2017, accepted 12th Aug. 2017. By a tight tour in a k-uniform hypergraph H we mean any sequence of its vertices (w0 , w1 , . . . , ws−1 ) such that for all i = 0, . . . , s − 1 the set ei = {wi , wi+1 . . . , wi+k−1 } is an edge of H (where operations on indices are computed modulo s) and the sets ei for i = 0, . . . , s − 1 are pairwise different. A tight tour in H is a tight Euler tour if it contains all edges of H. We prove that the problem of deciding if a given 3-uniform hypergraph has a tight Euler tour is NP-complete (even if the maximum codegree of a pair of vertices is bounded by 4), and that it cannot be solved in time 2o(m) (where m is the number of edges in the input hypergraph), unless the ETH fails. We also present an exact exponential algorithm for the problem, whose time complexity matches this lower bound, and the space complexity is polynomial. In fact, this algorithm solves a more general problem of computing the number of tight Euler tours in a given uniform hypergraph. Keywords: tight Euler tour, Eulerian hypergraphs Problems of existence and construction of Euler tours and Hamilton cycles in graphs are among the most intensively studied problems in graph theory. Recently much attention has also been received by Hamiltonian problems for uniform hypergraphs. They have been studied from both theoretical (see e.g. Rödl, Ruciński, and Szemerédi (2008, 2011), Kühn and Osthus (2006), Katona and Kierstead (1999), Hàn and Schacht (2010), Kühn, Mycroft, and Osthus (2010)), and computational (see Dalhaus, Hajnal, and Karpiński (1993), Szymańska (2009), Karpiński, Ruciński, and Szymańska (2010)) perspectives and led to such spectacular results as a Dirac-type theorem on tight Hamilton cycles in 3-uniform hypergraphs (see Rödl, Ruciński, and Szemerédi (2011)). By contrast, not much research has been done on problems of existence and construction of Euler tours in uniform hypergraphs (see Lonc and Naroski (2010, 2012) and Bahmanian and Šajna (2017)). There are many possible generalizations of the graph-theoretic concepts of a cycle and a tour to uniform hypergraphs. The results on Euler tours mentioned in the preceding paragraph concern so-called Berge cycles and tours. In this paper we deal with tight tours. It is worth to mention that the problem of existence of a tight Euler tour is nontrivial even for complete k-uniform hypergraphs with k ≥ 3. An anticipated solution to this problem is a content of the following conjecture originally formulated in slightly different terminology of so-called universal cycles. Conjecture 1 (Chung, Diaconis, and Graham (1992)) For every k > 2 there exists n0 (k) such that for everyn > n0 (k) the complete k-uniform hypergraph on n vertices has a tight Euler tour if and only if n−1 k−1 ≡ 0 (mod k). ISSN 1365–8050 c 2017 by the author(s) Distributed under a Creative Commons Attribution 4.0 International License 2 Zbigniew Lonc, Paweł Naroski, Paweł Rzażewski ˛ The conjecture obviously holds for k = 2. Jackson (1993, 1999) and Hurlbert (1994) proved it for k = 3, 4, 5 and for k = 6 when n is relatively prime with 6. In the remaining cases the conjecture is open. Another well-known problem related to the subject of this paper is a conjecture by Baranyai and Katona (see Katona (2005), Conjecture 4.1). Let F be the k-uniform hypergraph on the vertex set {1, 2, . . . , n} whose edges are {1, 2, . . . , k}, {k + 1, k + 2, . . . , 2k}, . . . , {(a − 1)k + 1, (a − 1)k + 2, . . . , ak}, where a = m k and m is the least common multiple of n and k (the elements of the sets are computed modulo n). The hypergraphs obtained from F by permuting the elements of {1, 2, . . . , n} are called wreaths. Observe that if n and k are coprime, then a wreath is exactly a tight Hamiltonian cycle (i.e. a tight tour which contains every vertex of a hypergraph exactly once). Baranyai and Katona conjectured that the set of edges of the complete k-uniform hypergraph on n vertices can be partitioned into disjoint wreaths. It is worth mentioning that when k divides n, then this conjecture reduces to the famous Baranyai theorem (see Baranyai (1973)) on a factorization of the complete uniform hypergraph. Here are some other problems that motivate studying computational aspects of Eulerian problems in hypergraphs. In computer graphics, 3-dimensional objects are usually represented by 3-dimensional, usually triangular, meshes (see Peng, Kim, and Kuo (2005)). Storing and processing such a representation as raw data might be quite costly. Indeed, a trivial way of encoding is to store every triangle separately, i.e. the coordinates of all three vertices are stored. It requires storing 3m vertices (where m is the number of triangles in the considered triangulation). One of typical methods to deal with this problem is to partition the mesh into long strips of triangles and then encode these strips. Observe that if we manage to arrange the vertices of the mesh in a (cyclic) sequence in such a way that the vertices of every triangle appear exactly once as the three consecutive terms of this sequence and every three consecutive terms of it constitute some triangle, then we will have to store the coordinates of m vertices only. Obviously, it is not always possible (see Arkin, Held, Mitchell, and Skiena (1996)). Another motivation originates from database theory. Let V be a set of records of some database and let E be a family of some k-element subsets of V , each of them is supposed to be an answer to some query (e.g. it is a set of k records which satisfy some given conditions in “the best” way). We want to minimize the time needed to answer all possible queries. One way of achieving this goal is to organize the records of the data base as a cyclic list C in such a way that every element of E is represented in C as k consecutive elements. The list C is optimal in this approach if every member of E is represented in C exactly once and every k consecutive elements of C constitute some member of E (see Lonc, Traczyk Jr., and Truszczyński (1983) for some more details). In both problems described above we have some k-uniform hypergraph (in the former example k = 3) and we want to find a tight Euler tour in this hypergraph. In this paper we discuss computational complexity issues related to tight Euler tours. Our main result (Theorem 1) says that the problem of deciding if a given 3-uniform hypergraph has a tight Euler tour is NP-complete . The construction in the proof of Theorem 1 gives also some insight into the complexity of algorithms solving the problem. The complexity assumption that we use here is the Exponential Time Hypothesis (usually referred to as the ETH) (Impagliazzo and Paturi (1999)). A consequence of this hypothesis, typically used to give conditional lower bounds for the running time of algorithms, is the fact that 3-S AT 3 Tight Euler tours in hypergraphs with t variables and p clauses cannot be solved in time 2o(t+p) (Impagliazzo, Paturi, and Zane (2001)). We show that the existence of a tight Euler tour in a 3-uniform hypergraph cannot be decided in time 2o(m) (where m denotes the number of edges of the input hypergraph), unless the ETH fails. This lower bound is matched with a simple exact algorithm with time complexity 2m · mO(1) and polynomial space complexity (see Section 3). In fact, the algorithm solves a more general problem of counting the number of tight Euler trails and tours in the input hypergraph. 1 Preliminaries For a positive integer n, we define [n] := {1, 2, . . . , n}. By  a k-uniform hypergraph we mean a pair H = (V, E), where V is a non-empty finite set and E ⊆ Vk := {X ⊆ V : |X| = k}. For a hypergraph H = (V, E), by E(H) we denote the set E. The elements of V are called vertices of H and the elements of E its edges. The codegree of a pair of different vertices vu in a hypergraph is the number of edges in E containing both v and u. A tight walk in a k-uniform hypergraph H is a sequence w1 w2 . . . ws of vertices of H such that for all i = 1, . . . , s − k + 1 the set ei := {wi , wi+1 , . . . , wi+k−1 } is an edge of H. For a tight walk C = w1 w2 . . . ws , we say that an edge e is contained in C (or just that e is an edge of C) if e = ei for some i = 1, . . . , s − k + 1. Note that a single edge may appear in a tight walk more than once, i.e., it is possible that ei = ej for some i 6= j. Then, we say that an edge is contained in C several times. If every edge is contained in C at most once, then we call C a tight trail. By the length of a tight walk C = w1 w2 . . . ws we mean the number s − k + 1. Note that if C is a tight trail, then the length of C is equal to the number of edges contained in C. A tight trail C is a tight Euler trail in H if every edge of H is contained in C exactly once. Note that the length of a tight Euler trail is equal to |E(H)|. A tight tour in H is a closed tight trail, i.e., a tight trail C = w1 w2 . . . wm w1 w2 . . . wk−1 . Such a tight tour will be denoted by (w1 , w2 , . . . , wm ). A tight Euler tour is a tight tour which is a tight Euler trail. Note that the length m of a tight Euler tour in H is equal to |E(H)|. Remark 1 Observe that if (w1 , w2 , . . . , wm ) is a tight tour (respectively, tight Euler tour) in H, then the reversed sequence (wm , . . . , w2 , w1 ) and each sequence (wi , . . . , wm , w1 , . . . , wi−1 ), for i = 1, . . . , m, are also tight tours (resp., tight Euler tours) in H. We shall identify all these tours with C. Thus, a tight Euler tour corresponds to exactly 2|E(H)| closed tight Euler trails. Now we turn to 3-uniform hypergraphs. Our aim is to prove that the problem of deciding if a given 3-uniform hypergraph has a tight Euler tour is NP-complete. To simplify the notation we shall write xyz rather than {x, y, z} if {x, y, z} is an edge of a 3-uniform hypergraph. If e is an edge of some 3-uniform hypergraph H and C is a tight tour in H which contains e, then the three vertices of e are some three consecutive terms of C. We shall construct now a hypergraph Hℓ (where ℓ > 4 is an integer) which will be used later to prove our main result. Informally speaking, Hℓ is a 3-uniform hypergraph whose edges are the triangles in a triangulation of the torus depicted in Figure 1. Here is a formal definition of Hℓ . Definition 1 For each integer ℓ > 4 we define a hypergraph Hℓ = (V, E) such that V = {0, . . . , ℓ + 1} ∪ ℓ−1 [ {via , vib } i=1 4 Zbigniew Lonc, Paweł Naroski, Paweł Rzażewski ˛ and E= ℓ [ Ei , i=1 where E1 = {10ℓ, 1v1aℓ, v1a ℓ(ℓ + 1), v1a v1b (ℓ + 1), v1b (ℓ + 1)0, v1b 10}, b b a a a b (i − 1), vib i(i − 1)} vi−1 , via vib vi−1 , vib vi−1 Ei = {i(i − 1)vi−1 , ivia vi−1 , via vi−1 for i = 2, . . . , ℓ − 1, and a a a b b b Eℓ = {ℓ(ℓ − 1)vℓ−1 , ℓ(ℓ + 1)vℓ−1 , (ℓ + 1)vℓ−1 vℓ−1 , (ℓ + 1)0vℓ−1 , 0vℓ−1 (ℓ − 1), 0ℓ(ℓ − 1)}. ℓ+1 ℓ 0 1 2 3 ℓ−3 ℓ−2 ℓ−1 ℓ b b b b b b b b b v1b b b v1a b v2b b v3b b v2a b b b vℓ−3 b b vℓ−2 b a vℓ−3 v3a b vℓ−1 b 0 b a vℓ−2 a vℓ−1 b b b b b b b b b b b b 0 1 2 3 ℓ−3 ℓ−2 ℓ−1 ℓ ℓ+1 Fig. 1: The hypergraph Hℓ . In this picture we identify vertices labelled with the same label. Observe that the maximum codegree of a pair of vertices in H is 2. We shall study some properties of tight tours in the hypergraph Hℓ now. Let e = xyz be an arbitrary edge of a tight tour C = (w0 , . . . , wm−1 ) in Hℓ . Then, the vertices of e are some three consecutive terms wi , wi+1 , wi+2 of C. Let us assume first that they appear in the ordering xyz, i.e. wi = x, wi+1 = y, and wi+2 = z, where the operations on indices are computed modulo m. By the definition of a tight tour, wi+1 wi+2 wi+3 = yzwi+3 is an edge of Hℓ different from e. However, as a pair of distinct vertices of Hℓ is contained either in exactly two edges or in none of the edges, we conclude that the vertex wi+3 is uniquely determined by the ordering xyz of the vertices of the edge e. The same applies to all other edges contained in C, so the ordering of the vertices of some edge contained in C determines the whole tour. Observe that the reversed ordering zyx of the vertices of e defines the same tour C. Hence, each edge in Hℓ is contained in at most 3!/2 = 3 tours. From now on we shall identify the mutually reversed orderings of vertices of the edges of Hℓ . Let us describe the tight tours in Hℓ determined by the 3 orderings of the edge 01ℓ (it does not really matter which edge we choose). 5 Tight Euler tours in hypergraphs At the beginning let us consider the ordering 01ℓ. It determines the tour (0, 1, ℓ, v1a , ℓ + 1, v1b ). This tour contains only 6 of the 6ℓ edges of the hypergraph Hℓ , so it is not a tight Euler tour. We call such tours in Hℓ the tours of type N . Now let us consider the ordering 0ℓ1 of our edge. It determines the tour a (0, ℓ, 1, v1a , 2, v2a , . . . , ℓ − 1, vℓ−1 , ℓ, ℓ + 1, v1a , v1b , . . . , a b b vℓ−1 , vℓ−1 , ℓ + 1, 0, v1b , 1, . . . , vℓ−1 , ℓ − 1), which is a tight Euler tour in Hℓ . We call this tight Euler tour in Hℓ the tour of type T . Finally, the ordering ℓ01 determines the tight tour beginning with (ℓ, 0, 1, v1b , v2b , v2a , v3a , 3, 4, . . .). It is routine to verify that this tour is an Euler tour in Hℓ if and only if ℓ 6≡ 1 (mod 3). We call this tight Euler tour in Hℓ the tour of type F . Figure 2 depicts the tight Euler tour of type F in the hypergraph H5 . 0 1 2 3 4 5 b b b b b b XI 6 III v1b XXV v2b b b XXI XVII v3b XIII V I XXVII XIX b b 6 XX XXVIII XV XXIII X v4a b VI 0 b XVIII v3a b XIV XXII IX b XXVI v2a b XXX v4b b IV v1a b VIII b XII 5 XVI XXIV II VII XXIX b b b b b b 0 1 2 3 4 5 Fig. 2: The tight tour (5, 0, 1, v1b , v2b , v2a , v3a , 3, 4, v4b , 0, 6, v1b , v1a , v2a , 2, 3, v3b , v4b , v4a , 6, 5, v1a , 1, 2, v2b , v3b , v3a , v4a , 4) of type F in H5 . The consecutive edges of this tour are enumerated with Roman numerals. It is clear that there are no more tight Euler tours in Hℓ . From now on we consider only those values of ℓ, for which the hypergraph Hℓ has exactly two tight Euler tours. For any edge e ∈ E, the vertices of e are ordered differently in each of the three types of tight tours in Hℓ . Each of the two mutually reversed orderings of vertices of e in the tour of type N (resp. of type T , of type F ) will be called an ordering of e of type N (resp. of type T , of type F ). Let us observe that the type of an ordering of an edge e is determined by the pair of its vertices which are not consecutive in the ordering. For example, for the edge 01ℓ, the pair 0ℓ determines an ordering of type N , the pair 01 – an ordering of type T and the pair 1ℓ – an ordering of type F . In general, each pair 6 Zbigniew Lonc, Paweł Naroski, Paweł Rzażewski ˛ of vertices joined with a vertical (resp. horizontal, skew) line in Figure 1 determines orderings of type N (resp. T , F ) of the edges containing the pair. Let n > 2. By a cycle Cn we mean a 3-uniform hypergraph ({0, . . . , n − 1}, {i(i + 1)(i + 2) : i = 0, . . . , n − 1}), where additions are computed modulo n. Note that the maximum codegree of a pair of vertices in Cn is 2. Clearly, the hypergraph Cn has exactly one tight Euler tour. Abusing the definitions a little bit, we shall identify sometimes cycles with their tight Euler tours. 2 Complexity results In this section we prove NP-completeness of the problem of determining the existence of a tight Euler tour in a 3-uniform hypergraph. To make the proof of this statement easier to follow we give a short outline of the main steps of the reasoning. In the proof we apply a reduction from 3-S AT. To this end, for any 3-S AT formula, we build a 3-uniform hypergraph H. For every variable xi appearing in this formula we define a copy of the hypergraph Hℓi (for some ℓi ). As we have seen, the hypergraph Hℓi (for suitable values of ℓi ) has exactly two tight Euler tours. One of them (of type T ) corresponds to setting xi as true. The other one (of type F ) corresponds to setting xi as false. For every clause dj of the formula we define a copy of the cycle C6 . Some vertices of it are identified with some vertices of the copies of Hℓi corresponding to the variables appearing in dj . These identifications are designed in such a way that a tour in H can get from the copy of C6 to Hℓi forcing the tour of type T in Hℓi if and only if xi appears positively in dj and, analogously, such a tour can get from C6 to Hℓi forcing the tour of type F in Hℓi if and only if xi appears negated in dj . The most important property of the hypergraph H is that in every tight Euler tour in H the orderings of all edges of each subhypergraph Hℓi are of the same type – either T or F . Therefore such an Euler tour defines a truth assignment of the variables of the 3-S AT formula (and vice versa). Theorem 1 The problem of deciding if a given 3-uniform hypergraph H has a tight Euler tour is NPcomplete, even if the maximum codegree of a pair of vertices in H is bounded by 4. Moreover, it cannot be solved in time 2o(|E(H)|) , unless the ETH fails. Proof: Verifying if a sequence of vertices is a tight Euler tour in a hypergraph can obviously be done in polynomial time, so our problem is in the class NP. To prove it is complete in this class, we show a reduction from 3-S AT. Let c = d1 ∧ . . . ∧ dp be a 3-S AT formula, where for all j = 1, . . . , p, each dj is a clause with exactly three literals. We can assume that no clause contains both a variable and its negation because such a clause can be deleted from the formula c without changing its satisfiability. Let X = {x1 , . . . , xt } be the set of variables appearing in the formula c. For a variable xi , let occ(xi ) denote the number of occurrences of xi in c (either positive of negative). Moreover, we keep these occurrences ordered. The ordering is implied by the ordering d1 , d2 , . . . , dp of the clauses. For the formula c we construct a 3-uniform hypergraph H. For every i = 1, . . . , t, let ℓi be the smallest integer such that ℓi > 2 occ(xi ) + 3 and ℓi 6≡ 1 (mod 3). Obviously, ℓi 6 2 occ(xi ) + 4. Tight Euler tours in hypergraphs 7 For each variable xi we define a copy of the hypergraph Hℓi , which we denote by H i . Next, for each clause dj we define a copy of a cycle C6 , which we denote by C6j . Finally, we define one copy of the cycle Ct . At the beginning we assume that the vertex sets of all hypergraphs H 1 , . . . , H t , C61 , . . . , C6p and Ct are pairwise disjoint. However, we shall identify some vertices in the next steps of the construction of the hypergraph H. In each identification step we will choose two vertices x, y, belonging to a common edge, and two different vertices x′ , y ′ , also belonging to some edge, and will identify x with x′ and y with y ′ . All such pairs xy of identified vertices will be called the connectors. Firstly, for every i = 1, . . . , t, we identify the vertices 2i − 2 and 2i − 1 of the hypergraph Ct with the vertices vℓai −1 and vℓbi −1 , respectively, of the hypergraph H i . Let dj be a clause in the formula c and let xi , xk , and xs be the variables appearing in dj . Moreover, for q ∈ {i, k, s}, let oq be the number, such that the occurrence of xq in dj is the oq -th occurrence of this variable. If the variable xi is negated in dj , then we identify the vertices 0 and 1 of the hypergraph C6j with a a and v2o , respectively, of the hypergraph H i . And if a variable xi is not negated in dj , the vertices v2o i +1 i a b and v2o , respectively, then we identify the vertices 0 and 1 of the hypergraph C6j with the vertices v2o i +1 i i of the hypergraph H . Analogously we identify the vertices 2 and 3 of the hypergraph C6j with the vertices of H k and the vertices 4 and 5 of C6j with the vertices of H s . These identifications complete the definition of the hypergraph H. Note that the hypergraph H can be constructed in a polynomial time for any 3-S AT formula c. Observe that in each identification step we identified a pair of vertices from some hypergraph H i with a pair of vertices from some cycle (either Ct or C6j ). Thus the subhypergraphs of H induced by the edges of the hypergraphs C61 , . . . , C6p , and Ct are still vertex disjoint. The same is true for the subhypergraphs induced by the edges of H 1 , . . . , H t . Moreover, the maximum codegree of a pair of vertices in H is 4. We shall prove now several claims concerning properties of the hypergraph H. Claim 1 Let C be a tight Euler tour in H and let e and f be two edges of some subhypergraph H i such that they intersect on a 2-element set, which is not a connector. Then the orderings of e and f defined by the tour C are of the same type in H i . Proof of Claim 1. Let e = xyz and f = xyu. If the ordering of the edge e in C is zxy or zyx (or the reverse of one of them), then, as xy is not a connector, the edge f precedes or succeeds e in the tour C. On the other hand, obviously, e and f are consecutive edges of some tour in H i . Therefore, by the definition of the type of an ordering of an edge, the orderings of e and f in C are of the same type. Suppose now that the ordering of e in C is xzy (or its reverse). Then, the ordering of e is determined by the pair xy and, obviously, f is neither the successor nor the predecessor of e in C. If the ordering of f in C is not determined by xy, then x and y appear consecutively in the ordering of f in C. Moreover, since xy is not a connector, similarly as in the previous case, we obtain that the edge e is the successor or the predecessor of f in C, a contradiction. Thus, the ordering of f in C is determined by the pair xy and, consequently, the orderings of e and f defined by C are of the same type in H i .  Claim 2 Let C be a tight Euler tour in H. For every i = 1, . . . , t, the orderings of all the edges of the subhypergraph H i defined by C are of the same type, either T or F . Proof of Claim 2. By Claim 1, the orderings defined by C of every two edges in H i that have two common vertices which do not form a connector are of the same type in H i . It is easy to observe that the 8 Zbigniew Lonc, Paweł Naroski, Paweł Rzażewski ˛ pairs of vertices which are connectors in H i form the set of edges of an acyclic graph. Thus, the orderings defined by the tour C of all edges in H i are of the same type. Suppose now the orderings of all edges of H i are of type N . Then, however, the edges of the set E1 in i H form a tight tour of length 6. This tour cannot be a part of C because the edges in E1 do not contain any connector. Hence, the orderings of all edges of H i are of type T or all are of type F .  Claim 3 Let C be a tight Euler tour in H and let wk−1 wk wk+1 wk+2 be some consecutive terms of C such that f = wk wk+1 wk+2 ∈ E(H i ), for some i = 1, . . . , t. (i) If e = wk−1 wk wk+1 ∈ E(Ct ), then the ordering wk wk+1 wk+2 ∈ E(H i ) of f defined by C is of type T or F . (ii) If e = wk−1 wk wk+1 ∈ E(C6j ), for some j = 1, . . . , p and the ordering wk wk+1 wk+2 ∈ E(H i ) of f defined by C is of type T (resp. of type F ), then the variable xi appears positively (resp. negatively) in the clause dj . Proof of Claim 3. (i) Clearly, in this case the pair of vertices wk wk+1 is the connector vℓai −1 vℓbi −1 . Thus, the vertices vℓai −1 , vℓbi −1 appear consecutively in the ordering of f in C. On the other hand in the ordering of type N of f they do not appear consecutively. Hence, the ordering of f defined by C is of type T or F. b a va . However, va or v2o (ii) In this case the pair of vertices wk wk+1 is a connector equal to v2o i 2oi +1 i 2oi +1 if the ordering of f defined by C is of type T , then it is determined by a pair of vertices joined by a a (which is joined by a horizontal line in Figure va horizontal line in Figure 1. Thus, the pair v2o i 2oi +1 1) cannot be this connector because the vertices of this pair appear consecutively in the ordering of b va . By the definition of f defined by C. Consequently, the connector wk wk+1 is equal to v2o i 2oi +1 the hypergraph H, the variable xi appears in the clause dj positively. The version of Claim 3(ii) concerning the ordering of f of type F can be shown analogously.  We are ready to prove that the hypergraph H has a tight Euler tour if and only if the formula c is satisfiable. Let us assume first that H has a tight Euler tour C. By Claim 2, for every i = 1, . . . , t, the orderings defined by C of all edges of H i are of the same type – either T or F . We define a truth assignment w : X → {true, false} by setting w(xi ) = true if the orderings of the edges of H i in C are of type T and w(xi ) = false otherwise. We shall prove that each clause dj , for j = 1, . . . , p, is satisfied under w. As C is a tight Euler tour in H, there is a subsequence wk−1 wk wk+1 wk+2 of C such that e = wk−1 wk wk+1 ∈ E(C6j ) and f = wk wk+1 wk+2 ∈ E(H i ) for some i. By Claim 3(ii), if the ordering of f defined by C is of type T (resp. of type F ), then the variable xi appears in the clause dj positively (resp. negatively). In both cases the truth assignment w evaluates the clause dj to true. Let us assume now that the formula c is satisfiable and let w be a truth assignment for which c evaluates to true. We shall construct a tight Euler tour in H. 9 Tight Euler tours in hypergraphs Let (w0 , w1 , w2 , . . . , wq ) and (u0 , u1 , u2 , . . . , ur ) be two edge-disjoint tight tours, such that they have two common vertices, say x and y, that appear consecutively in both tours, say x = w0 = u0 and y = w1 = u1 . Then the tight tours can be glued together to form a tight tour (x, y, w2 . . . , wq , x, y, u2 . . . , ur ) that contains all the edges of the two original tours. We denote by C i the tight Euler tour in H i which is of type T if w(xi ) = true or of type F if w(xi ) = false. Clearly, the tours C 1 , . . . , C t , C61 , . . . , C6p , Ct are edge-disjoint and contain all edges of the hypergraph H. We shall construct a tight Euler tour in H by gluing together these tours. For every clause dj there is a literal in this clause that evaluates to true in the truth assignment w. Let xi be the variable in this literal. By the definition of the hypergraph H, if xi appears in dj positively (resp. a b and v2o negatively), then some two consecutive vertices of C6j are identified with the vertices v2o i +1 i a i i a (resp. v2oi and v2oi +1 ) of H . Observe that these two vertices appear consecutively in the tour C as well because the tour is of type T (resp. of type F ). Thus, in both cases we can glue the tours C i and C6j together. We repeat this gluing operation for every tour C6j and create t edge-disjoint tight tours, say T1 , . . . , Tt , such that each tour Ti contains all the edges of the hypergraph H i and the edges of every tour C6j are contained in some of the tours Ti . To complete the construction of a tight Euler tour in H we observe that each tour Ti can be glued together with the tour Ct . Indeed, by the construction of the hypergraph H, some two consecutive vertices of Ct are identified with the vertices vℓai −1 and vℓbi −1 of H i . Now, these two vertices appear consecutively in the Euler tours in H i of both types T and F . Thus, we can glue the tours Ct and Ti together. We can repeat this gluing operation for every tour Ti which completes the construction of a tight Euler tour in H. Note that the size of the hypergraph H is linear in p + t, as the following calculations show |E(H)| = t X |E(H i )| + p|E(C6 )| + |E(Ct )| i=1 t X =6 ℓi + 6p + 2t 6 6 i=1 =42p + 26t. t X (2 occ(xi ) + 4) + 6p + 2t i=1 Thus, any algorithm deciding the existence of a tight Euler tour in a 3-uniform hypergraph in time 2o(|E(H)|) could be easily transformed (in polynomial time) to an algorithm deciding the satisfiability of an arbitrary 3-S AT instance in time 2o(p+t) , which would in turn contradict the ETH. ✷ The construction presented above can be easily adapted to show the hardness of determining the existence of a tight Euler trail in a given 3-uniform hypergraph. Theorem 2 The problem of determining if a given 3-uniform hypergraph H has a tight Euler trail is NP-complete. Moreover, it cannot be solved in time 2o(|E(H)|) , unless the ETH fails. The proof of Theorem 2 is analogous to the proof of Theorem 1. The only difference is in connecting the hypergraphs H i , i = 1, . . . , t. In the proof of Theorem 1 we used the cycle Ct . Here we ought to use rather a path hypergraph Pt which is defined by V (Pt ) = {0, . . . , 2t − 1}, E(Pt ) = {i(i + 1)(i + 2) : i = 0, . . . , 2t − 3}. 10 Zbigniew Lonc, Paweł Naroski, Paweł Rzażewski ˛ 3 Exact algorithm In this section we describe an asymptotically tight exact algorithm for determining if a given k-uniform hypergraph has a tight Euler trail or a tight Euler tour. In fact, we compute the number of all tight Euler trails or tours in the input hypergraph. Our approach is based on a classical algorithm for counting Hamiltonian cycles in graphs (Karp (1982)). Let us start with introducing some notation. Let H = (V, E) be a k-uniform hypergraph. For a subset ′ E ′ ⊆ E, by Ek−1 we denote the set of all (k − 1)-element sequences x̄ = x1 x2 . . . xk−1 of distinct vertices, such that there exists e ∈ E ′ with {x1 , x2 , . . . , xk−1 } ⊆ e. To simplify the notation, we will often identify a sequence x̄ with the set of its elements, e.g., we will write x̄ ⊆ e. Also, for x0 ∈ V , by x0 x̄ we mean the sequence x0 x1 x2 . . . xk−1 . For ȳ, x̄ ∈ Ek−1 , we say that a tight walk (respectively trail) is a tight ȳ-x̄-walk (resp., ȳ-x̄-trail) if it starts with the prefix ȳ and ends with the suffix x̄ (note that the prefix and the suffix may overlap, in particular, we treat x̄ as a tight x̄-x̄-walk of length 0). Clearly every tight Euler trail in H is a tight Euler x̄-ȳ-trail for some x̄, ȳ ∈ Ek−1 . Moreover, a tight Euler tour is a tight Euler x̄-x̄-trail for some x̄ ∈ Ek−1 . The following version of the well-known inclusion-exclusion principle is the main tool that we use (see e.g. (Fomin and Kratsch , 2010, Theorem 4.2)). Theorem 3 (Inclusion-exclusion principle, intersection version) Let N be a finite set and let {Qi : i ∈ I} be a family of its subsets. Then \ i∈I Qi = X (−1)|W | N \ W ⊆I [ Qw . w∈W Now we are ready to state the main result of this section. Theorem 4 For every fixed k > 3, the number of (a) tight Euler trails, (b) tight Euler tours in a k-uniform hypergraph with m edges can be computed in time 2m · mO(1) , using polynomial space. Proof: Fix ȳ = y1 y2 . . . yk−1 ∈ Ek−1 and x̄ = x1 x2 . . . xk−1 ∈ Ek−1 . So, following the notation used in Theorem 3, define N to be the set of all tight ȳ-x̄-walks of length m in a k-uniform hypergraph H with m edges. Moreover, let I = E be the set of edges of H. For anSedge e, let Qe denote the set of tight walks in N , which contain the edge e. Note that for W ⊆ T E, N \ w∈W Qw is the set of tight ȳ-x̄-walks of length m in H ′ = (V, E \ W ). Also, if W = E, then e∈W Qe is the set of all tight Euler ȳ-x̄-trails in H. S Suppose that for every W ⊆ E we can compute |N \ w∈W Qw | in time mO(1) . Then, by Theorem 3, T we can compute | e∈E Qe | in time 2m · mO(1) . S So, let us focus on computing |N \ w∈W Qw |. Let W be a fixed subset of E and let H ′ := (V, E ′ ), ′ , by T [d, x̄′ ] we denote the where E ′ = E \ W . For d ∈ {0, 1, . . . , |E ′ |} and x̄′ = x′1 x′2 . . . x′k−1 ∈ Ek−1 ′ ′ ′ number of tight x̄-x̄ -walks of length d in H . Note that if x̄ ∈ / Ek−1 , then T [d, x̄′ ] = 0 for all d and x̄′ . ′ It is straightforward to verify that T [d, x̄ ] is given by the following recursion: 11 Tight Euler tours in hypergraphs ( ′ 1 if x̄′ = x̄ ∈ Ek−1 , T [0, x̄ ] = 0 otherwise, X T [d, x̄′ ] = T [d − 1, x′0 x′1 . . . x′k−2 ] for d > 1. ′ x′0 ∈V,s.t. x′0 x̄′ ∈E ′ Applying this recursive formula, we can use dynamic programming to compute all values T [d, x̄′ ] for ′ . The size of the dynamic programming table is O(m·m·k!) = O(m2 ) d ∈ {0, 1, . . . , |E ′ |} and x̄′ ∈ Ek−1 and computing each entry takes O(m ·T k) = O(m) time. So, all values of T [d, x̄′ ] can be computed in 3 2 time O(m ) and space O(m ). Thus, | i∈[m] Qi | can be computed in time 2m · mO(1) . To compute the number of tight Euler trails in the input hypergraph H, we need to call the algorithm described above for all ȳ, x̄ ∈ Ek−1 , i.e., at most (m · k!)2 = O(m2 ) times, and then return the sum of obtained numbers. It is clear that each tight Euler trail will be counted exactly once. Recall that a tight Euler tour in H corresponds to exactly 2m closed tight Euler trails (i.e., x̄-x̄ tight Euler trails for some x̄ ∈ Ek−1 ). Thus to compute the number of tight Euler tours, we need to call the algorithm for each x̄ ∈ Ek−1 (at most m · k! = O(m) times), and return the sum of obtained numbers, divided by 2m. ✷ 4 Final remarks and open problems In this paper we proved that the problem of deciding if a given 3-uniform hypergraph has a tight Euler tour is NP-complete. We believe the same problem for k-uniform hypergraphs with k > 3 is NP-complete too, however, we do not have a proof of this statement. Our proof for k = 3 does not seem to generalize easily to larger values of k. We think the codegree (defined as the number of edges containing a (k − 1)-tuple of vertices) is a more natural parameter than the degree in problems concerning tight cycles or tours in k-uniform hypergraphs. In fact this is the parameter that appears in the Dirac type theorem on existence of a tight Hamilton cycle in a 3-uniform hypergraph (see Rödl, Ruciński, and Szemerédi (2011)). We observed (Theorem 1) that the problem of deciding if a 3-uniform hypergraph has a tight Euler tour is NP-complete even for hypergraphs of maximum codegree bounded by 4. It is not hard to see that the problem becomes polynomial for 3uniform hypergraphs with maximum codegree bounded by 2. It follows from an observation that any tour in such hypergraphs is uniquely determined by any two of its consecutive edges. It is an open problem what the complexity status of our problem is for 3-uniform hypergraphs of maximum codegree bounded by 3. References E.M. Arkin, M. Held, J.S.B. Mitchell, S.S. Skiena, Hamiltonian triangulations for fast rendering, Visual Computer 12, 1996, 429–444. A. Bahmanian, M. Šajna, Quasi-Eulerian hypergraphs, The Electronic Journal of Combinatorics 24(3), 2017, # P3.30. 12 Zbigniew Lonc, Paweł Naroski, Paweł Rzażewski ˛ Zs. Baranyai, On the factorization of the complete uniform hypergraph, in: A. Hajnal, R. Rado, V.T. Sós, (Eds.), Infinite and Finite Sets, vol. I, Colloquium of Keszthely, 1973, North Holland, Amsterdam, Colloquium of Mathematical Society of János Bolyai, vol. 10, pp. 91—108. F. Chung, P. Diaconis, R. Graham, Universal cycles for combinatorial structures, Discrete Mathematics 110, 1992, 43–59. E. Dalhaus, P. Hajnal, M. Karpiński, On the parallel complexity of Hamiltonian cycle and matching problem on dense graphs, Journal of Algorithms 15, 1993, 367–384. F. Fomin, D. Kratsch. Exact Exponential Algorithms, Springer, 2010. H. Hàn, M. Schacht, Dirac-type results for loose Hamilton cycles in uniform hypergraphs, Journal of Combinatorial Theory Ser. B 100 (3), 2010, 332–346. G. Hurlbert, On universal cycles for k-subsets of an n-set, SIAM Journal of Discrete Mathematics 7, 1994, 598–604. R. Impagliazzo, R. Paturi, The complexity of k-SAT, Proc. 14th IEEE Conf. on Computational Complexity, 1999, 237–240. R. Impagliazzo, R. Paturi, F. Zane, Which problems have strongly exponential complexity?, Journal of Computer and System Sciences 63, 2001, 512–530. B.W. Jackson, Universal cycles of k-subsets and k-permutations, Discrete Mathematics 117, 1993, 141– 150. B.W. Jackson, Universal cycles of 4-subsets and 5-subsets, Unpublished, 1999. M. Karpiński, A. Ruciński, E. Szymańska, Computational complexity of the Hamiltonian cycle problem in dense hypergraphs, in LATIN 2010 (ed. A. López-Ortiz), Lecture Notes in Computer Science 6034, 2010, 663–674. R.M. Karp. Dynamic programming meets the principle of inclusion and exclusion, Operations Research Letters 1, 1982, 49–51. Gy.O.H. Katona, Constructions via Hamiltonian theorems, Discrete Mathematics 303, 2005, 87–103. Gy.Y. Katona, H.A. Kierstead, Hamiltonian chains in hypergraphs, Journal of Graph Theory 30, 1999, 205–212. D. Kühn, R. Mycroft, D. Osthus, Hamilton l-cycles in k-graphs, Journal of Combinatorial Theory Ser. A 117, 2010, 910–927. D. Kühn, D. Osthus, Loose Hamilton cycles in 3-uniform hypergraphs of large minimum degree, Journal of Combinatorial Theory Ser. B 96, 2006, 767–821. Z. Lonc, T. Traczyk Jr., M. Truszczyński, Optimal f -graphs for the family of all k-subsets of an n-set, in Data Base Organization (ed. S.P. Ghosh, W. Lipski, Y. Kambayashi), Academic Press, 1983, 247–270. Tight Euler tours in hypergraphs 13 Z. Lonc, P. Naroski, On tours that contain all edges of a hypergraph, Electronic Journal of Combinatorics 17, 2010, # R144. Z. Lonc, P. Naroski, A linear time algorithm for finding an Euler walk in a strongly connected 3-uniform hypergraph, Discrete Mathematics and Theoretical Computer Science 14(1), 2012, 147–158. J. Peng, C.-S. Kim, C.-C. J. Kuo, Technologies for 3D mesh compression: A survey, Journal of Visual Communication and Image Representation 16, 2005, 688–733. V. Rödl, A. Ruciński, E. Szemerédi, An approximate Dirac-type theorem for k-uniform hypergraphs, Combinatorica 28 (2), 2008, 229–260. V. Rödl, A. Ruciński, E. Szemerédi, Dirac-type conditions for Hamiltonian paths and cycles in 3-uniform hypergraphs, Advances in Mathematics 227, 2011, 1225–1299. E. Szymańska: The complexity of almost perfect matchings in uniform hypergraphs with high codegree, in IWOCA 2009 (ed. J. Fiala), Lecture Notes in Computer Science 5874, 2009, 438–449.
8cs.DS
Published as a conference paper at ICLR 2018 ON THE IMPORTANCE OF SINGLE DIRECTIONS FOR GENERALIZATION arXiv:1803.06959v1 [stat.ML] 19 Mar 2018 Ari S. Morcos1 , David G.T. Barrett, Neil C. Rabinowitz, & Matthew Botvinick DeepMind London, UK {arimorcos,barrettdavid,ncr,botvinick}@google.com A BSTRACT Despite their ability to memorize large datasets, deep neural networks often achieve good generalization performance. However, the differences between the learned solutions of networks which generalize and those which do not remain unclear. Additionally, the tuning properties of single directions (defined as the activation of a single unit or some linear combination of units in response to some input) have been highlighted, but their importance has not been evaluated. Here, we connect these lines of inquiry to demonstrate that a network’s reliance on single directions is a good predictor of its generalization performance, across networks trained on datasets with different fractions of corrupted labels, across ensembles of networks trained on datasets with unmodified labels, across different hyperparameters, and over the course of training. While dropout only regularizes this quantity up to a point, batch normalization implicitly discourages single direction reliance, in part by decreasing the class selectivity of individual units. Finally, we find that class selectivity is a poor predictor of task importance, suggesting not only that networks which generalize well minimize their dependence on individual units by reducing their selectivity, but also that individually selective units may not be necessary for strong network performance. 1 I NTRODUCTION Recent work has demonstrated that deep neural networks (DNNs) are capable of memorizing extremely large datasets such as ImageNet (Zhang et al., 2017). Despite this capability, DNNs in practice achieve low generalization error on tasks ranging from image classification (He et al., 2015) to language translation (Wu et al., 2016). These observations raise a key question: why do some networks generalize while others do not? Answers to these questions have taken a variety of forms. A variety of studies have related generalization performance to the flatness of minima and PAC-Bayes bounds (Hochreiter & Schmidhuber, 1997, Keskar et al., 2017, Neyshabur et al., 2017, Dziugaite & Roy, 2017), though recent work has demonstrated that sharp minima can also generalize (Dinh et al., 2017). Others have focused on the information content stored in network weights (Achille & Soatto, 2017), while still others have demonstrated that stochastic gradient descent itself encourages generalization (Bousquet & Elisseeff, 2002, Smith & Le, 2017, Wilson et al., 2017). Here, we use ablation analyses to measure the reliance of trained networks on single directions. We define a single direction in activation space as the activation of a single unit or feature map or some linear combination of units in response to some input. We find that networks which memorize the training set are substantially more dependent on single directions than those which do not, and that this difference is preserved even across sets of networks with identical topology trained on identical data, but with different generalization performance. Moreover, we found that as networks begin to overfit, they become more reliant on single directions, suggesting that this metric could be used as a signal for early stopping. 1 Corresponding author: [email protected] 1 Published as a conference paper at ICLR 2018 We also show that networks trained with batch normalization are more robust to cumulative ablations than networks trained without batch normalization and that batch normalization decreases the class selectivity of individual feature maps, suggesting an alternative mechanism by which batch normalization may encourage good generalization performance. Finally, we show that, despite the focus on selective single units in the analysis of DNNs (and in neuroscience; Le et al., 2011, Zhou et al., 2014, Radford et al., 2017, Britten et al., 1992), the class selectivity of single units is a poor predictor of their importance to the network’s output. 2 A PPROACH In this study, we will use a set of perturbation analyses to examine the relationship between a network’s generalization performance and its reliance upon single directions in activation space. We will then use a neuroscience-inspired measure of class selectivity to compare the selectivity of individual directions across networks with variable generalization performance and examine the relationship between class selectivity and importance. 2.1 S UMMARY OF MODELS AND DATASETS ANALYZED We analyzed three models: a 2-hidden layer MLP trained on MNIST, an 11-layer convolutional network trained on CIFAR-10, and a 50-layer residual network trained on ImageNet. In all experiments, ReLU nonlinearities were applied to all layers but the output. Unless otherwise noted, batch normalization was used for all convolutional networks (Ioffe & Szegedy, 2015). For the ImageNet ResNet, top-5 accuracy was used in all cases. Partially corrupted labels As in Zhang et al. (2017), we used datasets with differing fractions of randomized labels to ensure varying degrees of memorization. To create these datasets, a given fraction of labels was randomly shuffled and assigned to images, such that the distribution of labels was maintained, but any true patterns were broken. 2.2 P ERTURBATION ANALYSES Ablations We measured the importance of a single direction to the network’s computation by asking how the network’s performance degrades once the influence of that direction was removed. To remove a coordinate-aligned single direction , we clamped the activity of that direction to a fixed value (i.e., ablating the direction). Ablations were performed either on single units in MLPs or an entire feature map in convolutional networks. For brevity, we will refer to both of these as ‘units.’ Critically, all ablations were performed in activation space, rather than weight space. More generally, to evaluate a network’s reliance upon sets of single directions, we asked how the network’s performance degrades as the influence of increasing subsets of single directions was removed by clamping them to a fixed value (analogous to removing increasingly large subspaces within activation space). This analysis generates curves of accuracy as a function of the number of directions ablated: the more reliant a network is on low-dimensional activation subspaces, the more quickly the accuracy will drop as single directions are ablated. Interestingly, we found that clamping the activation of a unit to the empirical mean activation across the training or testing set was more damaging to the network’s performance than clamping the activation to zero (see Appendix A.1). We therefore clamped activity to zero for all ablation experiments. Addition of noise As the above analyses perturb units individually, they only measure the influence of coordinate-aligned single directions. To test networks’ reliance upon random single directions, we added Gaussian noise to all units with zero mean and progressively increasing variance. To scale the variance appropriately for each unit, the variance of the noise added was normalized by the empirical variance of the unit’s activations across the training set. 2.3 Q UANTIFYING CLASS SELECTIVITY To quantify the class selectivity of individual units, we used a metric inspired by the selectivity indices commonly used in systems neuroscience (De Valois et al., 1982, Britten et al., 1992, Freedman 2 Published as a conference paper at ICLR 2018 Figure 1: Memorizing networks are more sensitive to cumulative ablations. Networks were trained on MNIST (2-hidden layer MLP, a), CIFAR-10 (11-layer convolutional network, b), and ImageNet (50-layer ResNet, c). In a, all units in all layers were ablated, while in b and c, only feature maps in the last three layers were ablated. Error bars represent standard deviation across 10 random orderings of units to ablate. & Assad, 2006). The class-conditional mean activity was first calculated across the test set, and the selectivity index was then calculated as follows: µmax − µ−max selectivity = (1) µmax + µ−max with µmax representing the highest class-conditional mean activity and µ−max representing the mean activity across all other classes. For convolutional feature maps, activity was first averaged across all elements of the feature map. This metric varies from 0 to 1, with 0 meaning that a unit’s average activity was identical for all classes, and 1 meaning that a unit was only active for inputs of a single class. We note that this metric is not a perfect measure of information content in single units; for example, a unit with a little information about every class would have a low class selectivity index. However, it does measure the discriminability of classes along a given direction. The selectivity index also identifies units with the same class tuning properties which have been highlighted in the analysis of DNNs (Le et al., 2011, Zeiler & Fergus, 2014, Coates et al., 2012, Zhou et al., 2014, Radford et al., 2017). However, in addition to class selectivity, we replicate all of our results using mutual information, which, in contrast to class selectivity, should highlight units with information about multiple classes, and we find qualitively similar outcomes (Appendix A.5). We also note that while a class can be viewed as a highly abstract feature, implying that our results may generalize to feature selectivity, we do not examine feature selectivity in this work. 3 E XPERIMENTS 3.1 G ENERALIZATION Here, we provide a rough intuition for why a network’s reliance upon single directions might be related to generalization performance. Consider two networks trained on a large, labeled dataset with some underlying structure. One of the networks simply memorizes the labels for each input example and will, by definition, generalize poorly (‘memorizing network’) while the other learns the structure present in the data and generalizes well (‘structure-finding network’). The minimal description length of the model should be larger for the memorizing network than for the structurefinding network. As a result, the memorizing network should use more of its capacity than the structure-finding network, and by extension, more single directions. Therefore, if a random single direction is perturbed, the probability that this perturbation will interfere with the representation of the data should be higher for the memorizing network than for the structure-finding network2 . 2 Assuming that the memorizing network uses a non-negligible fraction of its capacity. 3 Published as a conference paper at ICLR 2018 a b Figure 2: Memorizing networks are more sensitive to random noise. Networks were trained on MNIST (2-hidden layer MLP, a), and CIFAR-10 (11-layer convolutional network, b). Noise was scaled by the empirical variance of each unit on the training set. Error bars represent standard deviation across 10 runs. X-axis is on a log scale. a b Figure 3: Networks which generalize poorly are more reliant on single directions. 200 networks with identical topology were trained on unmodified CIFAR-10. a, Cumulative ablation curves for the best and worst 5 networks by generalization error. Error bars represent standard deviation across 5 models and 10 random orderings of feature maps per model. b, Area under cumulative ablation curve (normalized) as a function of generalization error. To test whether memorization leads to greater reliance on single directions, we trained a variety of network types on datasets with differing fractions of randomized labels and evaluated their performance as progressively larger fractions of units were ablated (see Sections 2.2 and 2.1). By definition, these curves must begin at the network’s training accuracy (approximately 1 for all networks tested) and fall to chance levels when all directions have been ablated. To rule out variance due to the specific order of unit ablation, all experiments were performed with mutliple random ablation orderings of units. As many of the models were trained on datasets with corrupted labels and, by definition, cannot generalize, training accuracy was used to evaluate model performance. Consistent with our intuition, we found that networks trained on varying fractions of corrupted labels were significantly more sensitive to cumulative ablations than those trained on datasets comprised of true labels, though curves were not always perfectly ordered by the fraction of corrupted labels (Fig. 1). We next asked whether this effect was present if networks were perturbed along random bases. To test this, we added noise to each unit (see Section 2.2). Again, we found that networks trained on corrupted labels were substantially and consistently more sensitive to noise added along random bases than those trained on true labels (Fig. 2). The above results apply to networks which are forced to memorize at least a portion of the training set – there is no other way to solve the task. However, it is unclear whether these results would apply to networks trained on uncorrupted data. In other words, do the solutions found by networks with the same topology and data, but different generalization performance exhibit differing reliance upon single directions? To test this, we trained 200 networks on CIFAR-10, and evaluated their generalization error and reliance on single directions. All networks had the same topology and 4 Published as a conference paper at ICLR 2018 were trained on the same dataset (unmodified CIFAR-10). Individual networks only differed in their random initialization (drawn from identical distributions) and the data order used during training. We found that the 5 networks with the best generalization performance were more robust to the ablation of single directions than the 5 networks with the worst generalization performance (Fig. 3a). To quantify this further, we measured the area under the ablation curve for each of the 200 networks and plotted it as a function of generalization error (Fig. 3b). Interestingly, networks appeared to undergo a discrete regime shift in their reliance upon single directions; however, this effect might have been caused by degeneracy in the set of solutions found by the optimization procedure, and we note that there was also a negative correlation present within clusters (e.g., top left cluster). These results demonstrate that the relationship between generalization performance and single direction reliance is not merely a side-effect of training with corrupted labels, but is instead present even among sets networks with identical training data. 3.2 R ELIANCE ON SINGLE DIRECTIONS AS A SIGNAL FOR MODEL SELECTION This relationship raises an intriguing question: can single direction reliance be used to estimate generalization performance without the need for a held-out test set? And if so, might it be used as a signal for early stopping or hyperpameter selection? As a proof-of-principle experiment for early stopping, we trained an MLP on MNIST and measured the area under the cumulative ablation curve (AUC) over the course of training along with the train and test loss. Interestingly, we found that the point in training at which the AUC began to drop was the same point that the train and test loss started to diverge (Fig. 4a). Furthermore, we found that AUC and test loss were negatively correlated (Spearman’s correlation: -0.728; Fig. 4b). As a proof-of-principle experiment for hyperparameter selection, we trained 192 CIFAR-10 models with different hyperparemeter settings (96 hyperparameters with 2 repeats each; see Appendix A.2). We found that AUC and test accuracy were highly correlated (Spearman’s correlation: 0.914; Fig. 4c), and by performing random subselections of 48 hyperparameter settings, AUC selected one of the top 1, 5, and 10 settings 13%, 83%, and 98% of the time, respectively, with an average difference in test accuracy between the best model selected by AUC and the optimal model of only 1 ± 1.1% (mean ± std). These results suggest that single direction reliance may serve as a good proxy for hyperparameter selection and early stopping, but further work will be necessary to evaluate whether these results hold in more complicated datasets. 3.3 R ELATIONSHIP TO DROPOUT AND BATCH NORMALIZATION Dropout Our experiments are reminiscent of using dropout at training time, and upon first inspection, dropout may appear to discourage networks’ reliance on single directions (Srivastava et al., 2014). However, while dropout encourages networks to be robust to cumulative ablations up until the dropout fraction used in training, it should not discourage reliance on single directions past that point. Given enough capacity, a memorizing network could effectively guard against dropout by merely copying the information stored in a given direction to several other directions. However, the network will only be encouraged to make the minimum number of copies necessary to guard against the dropout fraction used in training, and no more. In such a case, the network would be robust to dropout so long as all redundant directions were not simultaneously removed, yet still be highly reliant on single directions past the dropout fraction used in training. To test whether this intuition holds, we trained MLPs on MNIST with dropout probabilities ∈ {0.1, 0.2, 0.3} on both corrupted and unmodified labels. Consistent with the observation in Arpit et al. (2017), we found that networks with dropout trained on randomized labels required more epochs to converge and converged to worse solutions at higher dropout probabilities, suggesting that dropout does indeed discourage memorization. However, while networks trained on both corrupted and unmodified labels exhibited minimal loss in training accuracy as single directions were removed up to the dropout fraction used in training, past this point, networks trained on randomized labels were much more sensitive to cumulative ablations than those trained on unmodified labels (Fig. 5a). Interestingly, networks trained on unmodified labels with different dropout fractions were all similarly robust to cumulative ablations. These results suggest that while dropout may serve as an effective regularizer to prevent memorization of randomized labels, it does not prevent over-reliance on single directions past the dropout fraction used in training. 5 Published as a conference paper at ICLR 2018 a b c Figure 4: Single direction reliance as a signal for hyperparameter selection and early stopping. a, Train (blue) and test (purple) loss, along with the normalized area under the cumulative ablation curve (AUC; green) over the course of training for an MNIST MLP. Loss y-axis has been cropped to make train/test divergence visible. b, AUC and test loss for a CIFAR-10 ConvNet are negatively correlated over the course of training. c, AUC and test accuracy are positively corrleated across a hyperparameter sweep (96 hyperparameters with 2 repeats for each). a b Figure 5: Impact of regularizers on networks’ reliance upon single directions. a, Cumulative ablation curves for MLPs trained on unmodified and fully corrupted MNIST with dropout fractions ∈ {0.1, 0.2, 0.3}. Colored dashed lines indicate number of units ablated equivalent to the dropout fraction used in training. Note that curves for networks trained on corrupted MNIST begin to drop soon past the dropout fraction with which they were trained. b, Cumulative ablation curves for networks trained on CIFAR-10 with and without batch normalization. Error bars represent standard deviation across 4 model instances and 10 random orderings of feature maps per model. 6 Published as a conference paper at ICLR 2018 a b Figure 6: Batch normalization decreases class selectivity and increases mutual information. Distributions of class selectivity (a) and mutual information (b) for networks trained with (blue) and without batch normalization (purple). Each distribution comprises 4 model instances trained on uncorrupted CIFAR-10. Batch normalization In contrast to dropout, batch normalization does appear to discourage reliance upon single directions. To test this, we trained convolutional networks on CIFAR-10 with and without batch normalization and measured their robustness to cumulative ablation of single directions. Networks trained with batch normalization were consistently and substantially more robust to these ablations than those trained without batch normalization (Fig. 5b). This result suggests that in addition to reducing covariate shift, as has been proposed previously (Ioffe & Szegedy, 2015), batch normalization also implicitly discourages reliance upon single directions. 3.4 R ELATIONSHIP BETWEEN CLASS SELECTIVITY AND IMPORTANCE Our results thus far suggest that networks which are less reliant on single directions exhibit better generalization performance. This result may appear counter-intuitive in light of extensive past work in both neuroscience and deep learning which highlights single units or feature maps which are selective for particular features or classes (Le et al., 2011, Zeiler & Fergus, 2014, Coates et al., 2012, Zhou et al., 2014, Radford et al., 2017). Here, we will test whether the class selectivity of single directions is related to the importance of these directions to the network’s output. First, we asked whether batch normalization, which we found to discourage reliance on single directions, also influences the distribution of information about class across single directions. We used the selectivity index described above (see Section 2.3) to quantify the discriminability between classes based on the activations of single feature maps across networks trained with and without batch normalization. Interestingly, we found that while networks trained without batch normalization exhibited a large fraction of feature maps with high class selectivity3 , the class selectivity of feature maps in networks trained with batch normalization was substantially lower (Fig. 6a). In contrast, we found that batch normalization increases the mutual information present in feature maps (Fig. 6b). These results suggest that batch normalization actually discourages the presence of feature maps with concentrated class information and rather encourages the presence of feature maps with information about multiple classes, raising the question of whether or not such highly selective feature maps are actually beneficial. We next asked whether the class selectivity of a given unit was predictive of the impact on the network’s loss of ablating said unit. Since these experiments were performed on networks trained on unmodified labels, test loss was used to measure network impact. For MLPs trained on MNIST, we found that there was a slight, but minor correlation (Spearman’s correlation: 0.095) between a unit’s class selectivity and the impact of its ablation, and that many highly selective units had minimal impact when ablated (Fig. 7a). By analyzing convolutional networks trained on CIFAR-10 and ImageNet, we again found that, across layers, the ablation of highly selective feature maps was no more impactful than the ablation of non-selective feature maps (Figs. 7b and 7d). In fact, in the CIFAR-10 networks, there was actually a negative correlation between class selectivity and feature map importance (Spearman’s correlation: -0.428, Fig. 7b). To test whether this relationship was depth-dependent, we calculated the correlation between class selectivity and importance separately for each layer, and found that the vast majority of the negative correlation was driven by early 3 And dead feature maps. Feature maps with no activity would have a selectivity index of 0. 7 Published as a conference paper at ICLR 2018 CIFAR-10 ConvNet MNIST MLP a b c ImageNet ResNet d e Figure 7: Selective and non-selective directions are similarly important. Impact of ablation as a function of class selectivity for MNIST MLP (a), CIFAR-10 convolutional network (b-c), and ImageNet ResNet (d-e). c and e show regression lines for each layer separately. layers, while later layers exhibited no relationship between class selectivity and importance (Figs. 7c and 7e). Interestingly, in all three networks, ablations in early layers were more impactful than ablations in later layers, consistent with theoretical observations (Raghu et al., 2016). Additionally, we performed all of the above experiments with mutual information in place of class selectivity, and found qualitatively similar results (Appendix A.5). As a final test, we compared the class selectivity to the L1 -norm of the filter weights, a metric which has been found to be a successful predictor of feature map importance in the model pruning literature (Li et al., 2017). Consistent with our previous observations, we found that class selectivity was largely unrelated to the L1 -norm of the filter weights, and if anything, the two were negatively correlated (Fig. A3, see Appendix A.4 for details). Taken together, these results suggest that class selectivity is not a good predictor of importance, and imply that class selectivity may actually be detrimental to network performance. Further work will be necessary to examine whether class and/or feature selectivity is harmful or helpful to network performance. 4 R ELATED WORK Much of this work was directly inspired by Zhang et al. (2017), and we replicate their results using partially corrupted labels on CIFAR-10 and ImageNet. By demonstrating that memorizing networks are more reliant on single directions, we also provide an answer to one of the questions they posed: is there an empirical difference between networks which memorize and those which generalize? Our work is also related to work linking generalization and the sharpness of minima (Hochreiter & Schmidhuber, 1997, Keskar et al., 2017, Neyshabur et al., 2017). These studies argue that flat minima generalize better than sharp minima (though Dinh et al. (2017) recently found that sharp minima can also generalize well). This is consistent with our work, as flat minima should correspond to solutions in which perturbations along single directions have little impact on the network output. Another approach to generalization has been to contextualize it in information theory. For example, Achille & Soatto (2017) demonstrated that networks trained on randomized labels store more 8 Published as a conference paper at ICLR 2018 information in their weights than those trained on unmodfied labels. This notion is also related to Shwartz-Ziv & Tishby (2017), which argues that during training, networks proceed first through a loss minimization phase followed by a compression phase. Here again, our work is consistent, as networks with more information stored in their weights (i.e., less compressed networks) should be more reliant upon single directions than compressed networks. More recently, Arpit et al. (2017) analyzed a variety of properties of networks trained on partially corrupted labels, relating performance and time-to-convergence to capacity. They also demonstrated that dropout, when properly tuned, can serve as an effective regularizer to prevent memorization. However, we found that while dropout may discourage memorization, it does not discourage reliance on single directions past the dropout probability. We found that class selectivity is a poor predictor of unit importance. This observation is consistent with a variety of recent studies in neuroscience. In one line of work, the benefits of neural systems which are robust to coordinate-aligned noise have been explored (Barrett et al. (2016), Montijn et al. (2016)). Another set of studies have demonstrated the presence of neurons with multiplexed information about many stimuli and have shown that task information can be decoded with high accuracy from populations of these neurons with low individual class selectivity (Averbeck et al. (2006), Rigotti et al. (2013), Mante et al. (2013), Raposo et al. (2014), Morcos & Harvey (2016), Zylberberg (2017)). Perturbation analyses have been performed for a variety of purposes. In the model pruning literature, many studies have removed units with the goal of generating smaller models with similar performance (Li et al., 2017, Anwar et al., 2015, Molchanov et al., 2017), and recent work has explored methods for discovering maximally important directions (Raghu et al. (2017)). A variety of studies within deep learning have highlighted single units which are selective for features or classes (Le et al., 2011, Zeiler & Fergus, 2014, Coates et al., 2012, Zhou et al., 2014, Radford et al., 2017, Agrawal et al., 2014). Additionally, Agrawal et al. (2014) analyzed the minimum number of sufficient feature maps (sorted by a measure of selectivity) to achieve a given accuracy. However, none of the above studies has tested the relationship between a unit’s class selectivity or information content and its necessity to the network’s output. Bau et al. (2017) have quantified a related metric, concept selectivity, across layers and networks, finding that units get more concept-selective with depth, which is consistent with our own observations regarding class selectivity (see Appendix A.3). However, they also observed a correlation between the number of concept-selective units and performance on the action40 dataset across networks and architectures. It is difficult to compare these results directly, as the data used are substantially different as is the method of evaluating selectivity. Nevertheless, we note that Bau et al. (2017) measured the absolute number of concept-selective units across networks with different total numbers of units and depths. The relationship between the number of concept-selective units and network performance may therefore arise as a result of a larger number of total units (if a fixed fraction of units is concept-selective) and increased depth (we both observed that selectivity increases with depth). 5 D ISCUSSION AND FUTURE WORK In this work, we have taken an empirical approach to understand what differentiates neural networks which generalize from those which do not. Our experiments demonstrate that generalization capability is related to a network’s reliance on single directions, both in networks trained on corrupted and uncorrupted data, and over the course of training for a single network. They also show that batch normalization, a highly successful regularizer, seems to implicitly discourage reliance on single directions. One clear extension of this work is to use these observations to construct a regularizer which more directly penalizes reliance on single directions. As it happens, the most obvious candidate to regularize single direction reliance is dropout (or its variants), which, as we have shown, does not appear to regularize for single direction reliance past the dropout fraction used in training (Section 3.3). Interestingly, these results suggest that one is able to predict a network’s generalization performance without inspecting a held-out validation or test set. This observation could be used in several interesting ways. First, in situations where labeled training data is sparse, testing networks’ reliance on single directions may provide a mechanism to assess generalization performance without sacrific9 Published as a conference paper at ICLR 2018 ing training data to be used as a validation set. Second, by using computationally cheap empirical measures of single direction reliance, such as evaluating performance at a single ablation point or sparsely sampling the ablation curve, this metric could be used as a signal for early-stopping or hyperparameter selection. We have shown that this metric is viable in simple datasets (Section 3.2), but further work will be necessary to evaluate viability in more complicated datasets. Another interesting direction for further research would be to evaluate the relationship between single direction reliance and generalization performance across different generalization regimes. In this work, we evaluate generalization in which train and test data are drawn from the same distribution, but a more stringent form of generalization is one in which the test set is drawn from a unique, but overlapping distribution with the train set. The extent to which single direction reliance depends on the overlap between the train and test distributions is also worth exploring in future research. This work makes a potentially surprising observation about the role of individually selective units in DNNs. We found not only that the class selectivity of single directions is largely uncorrelated with their ultimate importance to the network’s output, but also that batch normalization decreases the class selectivity of individual feature maps. This result suggests that highly class selective units may actually be harmful to network performance. In addition, it implies than methods for understanding neural networks based on analyzing highly selective single units, or finding optimal inputs for single units, such as activation maximization (Erhan et al., 2009) may be misleading. Importantly, as we have not measured feature selectivity, it is unclear whether these results will generalize to featureselective directions. Further work will be necessary to clarify all of these points. ACKNOWLEDGMENTS We would like to thank Chiyuan Zhang, Ben Poole, Sam Ritter, Avraham Ruderman, and Adam Santoro for critical feedback and helpful discussions. R EFERENCES Alessandro Achille and Stefano Soatto. On the Emergence of Invariance and Disentangling in Deep Representations. pp. 1–17, 2017. URL http://arxiv.org/abs/1706.01350. Pulkit Agrawal, Ross B Girshick, and Jitendra Malik. Analyzing the Performance of Multilayer Neural Networks for Object Recognition. Eccv, 2014. Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. (2003):1–11, 2016. URL http://arxiv.org/abs/1610.01644. Sajid Anwar, Kyuyeon Hwang, and Wonyong Sung. Structured Pruning of Deep Convolutional Neural Networks. 2015. Devansh Arpit, Stanisław Jastrzȩbski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S. Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, and Simon Lacoste-Julien. A Closer Look at Memorization in Deep Networks. 2017. ISSN 1938-7228. URL http://arxiv.org/abs/1706.05394. Bruno B Averbeck, Peter E Latham, and Alexandre Pouget. Neural correlations, population coding and computation. Nature reviews. Neuroscience, 7(5):358–366, May 2006. ISSN 1471-003X. doi: 10.1038/nrn1888. URL http://dx.doi.org/10.1038/nrn1888. David G.T. Barrett, Sophie Denève, and Christian K. Machens. Optimal compensation for neuron loss. eLife, 5(DECEMBER2016), 2016. ISSN 2050084X. doi: 10.7554/eLife.12454. David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network Dissection: Quantifying Interpretability of Deep Visual Representations. 2017. doi: 10.1109/CVPR.2017. 354. URL http://arxiv.org/abs/1704.05796. Olivier Bousquet and André Elisseeff. Stability and generalization. Journal of machine learning research: JMLR, 2(Mar):499–526, 2002. ISSN 1532-4435. URL http://www.jmlr.org/ papers/volume2/bousquet02a/bousquet02a.pdf. 10 Published as a conference paper at ICLR 2018 Kenneth H Britten, Michael N Shadlen, William T Newsome, and J Anthony Movshon. The analysis of visual motion: a comparison of neuronal and psychophysical performance. Journal of Neuroscience, 12(12):4745–4765, 1992. Adam Coates, Andrej Karpathy, and Andrew Y Ng. Emergence of Object-Selective Features in Unsupervised Feature Learning. Nips’2012, pp. 1–9, 2012. ISSN 10495258. doi: 10.1002/elps.200900118. URL http://www.stanford.edu/{˜}acoates/papers/ coateskarpathyng{_}nips2012.pdf. Russell L De Valois, E William Yund, and Norva Hepler. The orientation and direction selectivity of cells in macaque visual cortex. Vision research, 22(5):531–544, 1982. Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp Minima Can Generalize For Deep Nets. 2017. Gintare Karolina Dziugaite and Daniel M. Roy. Computing Nonvacuous Generalization Bounds for Deep (Stochastic) Neural Networks with Many More Parameters than Training Data. 2017. URL http://arxiv.org/abs/1703.11008. Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing Higher-Layer Features of a Deep Network Technical Report. pp. 1–13, 2009. David J Freedman and John a Assad. Experience-dependent representation of visual categories in parietal cortex. Nature, 443(7107):85–8, sep 2006. ISSN 1476-4687. doi: 10.1038/nature05078. URL http://www.ncbi.nlm.nih.gov/pubmed/16936716. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. Arxiv.Org, 7(3):171–180, 2015. ISSN 1664-1078. doi: 10.3389/fpsyg.2013.00124. Sepp Hochreiter and Jürgen Schmidhuber. Flat Minima. Neural Comput, 9(1), 1997. Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. Arxiv, 2015. URL http://arxiv.org/abs/1502. 03167. Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikahail Smelyanskiy, and Ping Tak Peter Tang. On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima. In ICLR, pp. 1–16, 2017. Quoc V Le, Marc’Aurelio Ranzato, Rajat Monga, Matthieu Devin, Kai Chen, Greg S Corrado, Jeff Dean, and Andrew Y Ng. Building high-level features using large scale unsupervised learning. International Conference in Machine Learning, 2011. ISSN 10535888. doi: 10.1109/MSP.2011. 940881. Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient ConvNets. (2016):1–10, 2017. Valerio Mante, David Sussillo, Krishna V Shenoy, and William T Newsome. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature, 503(7474):78–84, November 2013. ISSN 0028-0836, 1476-4687. doi: 10.1038/nature12742. URL http://dx.doi.org/ 10.1038/nature12742. Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning Convolutional Neural Networks for Resource Efficient Inference. ICLR, (2015):1–17, 2017. Jorrit S. Montijn, Guido T. Meijer, Carien S. Lansink, and Cyriel M A Pennartz. Population-Level Neural Codes Are Robust to Single-Neuron Variability from a Multidimensional Coding Perspective. Cell Reports, 16(9):2486–2498, 2016. ISSN 22111247. doi: 10.1016/j.celrep.2016.07.065. URL http://dx.doi.org/10.1016/j.celrep.2016.07.065. Ari S Morcos and Christopher D Harvey. History-dependent variability in population dynamics during evidence accumulation in cortex. Nature neuroscience, 19(12):nn.4403, October 2016. ISSN 1097-6256. doi: 10.1038/nn.4403. URL http://www.nature.com/articles/ nn.4403. 11 Published as a conference paper at ICLR 2018 Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nathan Srebro. Exploring Generalization in Deep Learning. 2017. URL https://arxiv.org/abs/1706.08947. Alec Radford, Rafal Jozefowicz, and Ilya Sutskever. Learning to Generate Reviews and Discovering Sentiment. 2017. URL http://arxiv.org/abs/1704.01444. Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli, and Jascha Sohl-Dickstein. On the Expressive Power of Deep Neural Networks. 2016. URL http://arxiv.org/abs/1606. 05336. Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. SVCCA: Singular Vector Canonical Correlation Analysis for Deep Understanding and Improvement. pp. 1–16, 2017. URL http://arxiv.org/abs/1706.05806. David Raposo, Matthew T Kaufman, and Anne K Churchland. A category-free neural population supports evolving demands during decision-making. Nature neuroscience, 17(12):1784–1792, November 2014. ISSN 1097-6256. doi: 10.1038/nn.3865. URL http://www.nature. com/doifinder/10.1038/nn.3865. Mattia Rigotti, Omri Barak, Melissa R Warden, Xiao-Jing Wang, Nathaniel D Daw, Earl K Miller, and Stefano Fusi. The importance of mixed selectivity in complex cognitive tasks. Nature, 497 (7451):585–590, 2013. ISSN 0028-0836. doi: 10.1038/nature12160. URL http://dx.doi. org/10.1038/nature12160. Ravid Shwartz-Ziv and Naftali Tishby. Opening the Black Box of Deep Neural Networks via Information. arXiv, pp. 1–19, 2017. URL http://arxiv.org/abs/1703.00810. Samuel L. Smith and Quoc V. Le. Understanding Generalization and Stochastic Gradient Descent. pp. 1–11, 2017. URL http://arxiv.org/abs/1710.06451. Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout : A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research (JMLR), 15:1929–1958, 2014. ISSN 15337928. Ashia C. Wilson, Rebecca Roelofs, Mitchell Stern, Nathan Srebro, and Benjamin Recht. The Marginal Value of Adaptive Gradient Methods in Machine Learning. pp. 1–14, 2017. URL http://arxiv.org/abs/1705.08292. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. Matthew Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. Computer VisionECCV 2014, 8689:818–833, 2014. ISSN 978-3-319-10589-5. doi: 10.1007/ 978-3-319-10590-1 53. URL http://link.springer.com/chapter/10.1007/ 978-3-319-10590-1{_}53. Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. 2017. URL http://arxiv.org/abs/ 1611.03530. Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object Detectors Emerge in Deep Scene CNNs. 2014. URL http://arxiv.org/abs/1412.6856. Joel Zylberberg. Untuned but not irrelevant: The role of untuned neurons in sensory information coding. September 2017. URL https://www.biorxiv.org/content/early/2017/ 09/21/134379. 12 Published as a conference paper at ICLR 2018 A A.1 A PPENDIX C OMPARISON OF ABLATION METHODS To remove the influence of a given direction, its value should be fixed or otherwise modified such that it is no longer dependent on the input. However, the choice of such a fixed value can have a substantial impact. For example, if its value were clamped to one which is highly unlikely given its distribution of activations across the training set, network performance would likely suffer drastically. Here, we compare two methods for ablating directions: ablating to zero and ablating to the empirical mean over the training set. Using convolutional networks trained on CIFAR-10, we performed cumulative ablations, either ablating to zero or to the feature map’s mean (means were calculated independently for each element of the feature map), and found that ablations to zero were significantly less damaging than ablations to the feature map’s mean (Fig. A1). Interestingly, this corresponds to the ablation strategies generally used in the model pruning literature (Li et al., 2017, Anwar et al., 2015, Molchanov et al., 2017). Figure A1: Ablation to zero vs. ablation to the empirical feature map mean. A.2 T RAINING DETAILS MNIST MLPs For class selectivity, generalization, early stopping, and dropout experiments, each layer contained 128, 512, 2048 and 2048 units, respectively. All networks were trained for 640 epochs, with the exception of dropout networks which were trained for 5000 epochs. CIFAR-10 ConvNets Convolutional networks were all trained on CIFAR-10 for 100 epochs. Layer sizes were: 64, 64, 128, 128, 128, 256, 256, 256, 512, 512, 512, with strides of 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, respectively. All kernels were 3x3. For the hyperparameter sweep used in Section 3.2, learning rate and batch size were evaluated using a grid search. ImageNet ResNet 50-layer residual networks (He et al., 2015) were trained on ImageNet using distributed training with 32 workers and a batch size of 32 for 200,000 steps. Blocks were structured as follows (stride, filter sizes, output channels): (1x1, 64, 64, 256) x 2, (2x2, 64, 64, 256), (1x1, 128, 128, 512) x 3, (2x2, 128, 128, 512), (1x1, 256, 256, 1024) x 5, (2x2, 256, 256, 1024), (1x1, 512, 512, 2048) x 3. For training with partially corrupted labels, we did not use any data augmen13 Published as a conference paper at ICLR 2018 a b Figure A2: Class selectivity increases with depth. Class selectivity distributions as a function of depth for CIFAR-10 (a) and ImageNet (b). a b Figure A3: Class selectivity is uncorrelated with L1 -norm. Relationship between class selectivity and the L1 -norm of the filter weights for CIFAR-10 (a) and ImageNet (b). tation, as it would have dramatically increasing the effective training set size, and hence prevented memorization. A.3 D EPTH - DEPENDENCE OF CLASS SELECTIVITY Here, we evaluate the distribution of class selectivity as a function of depth. In both networks trained on CIFAR-10 (Fig. A2a) and ImageNet (Fig. A2b), selectivity increased as a function of depth. This result is consistent with Bau et al. (2017), who show that concept-selectivity increases with depth. It is also consistent with Alain & Bengio (2016), who show depth increases the linear decodability of class information (though they evaluate linear decodability based on an entire layer rather than a single unit). A.4 R ELATIONSHIP BETWEEN CLASS SELECTIVITY AND THE FILTER WEIGHT L1 - NORM Importantly, our results on the lack of relationship between class selectivity and importance do not suggest that there are not directions which are more or less important to the network’s output, nor do they suggest that these directions are not predictable; they merely suggest that class selectivity is not a good predictor of importance. As a final test of this, we compared class selectivity to the 14 Published as a conference paper at ICLR 2018 L1 -norm of the filter weights, a metric which has been found to be a strongly correlated with the impact of removing a filter in the model pruning literature (Li et al., 2017). Since the L1 -norm of the filter weights is predictive of impact of a feature map’s removal, if class selectivity is also a good predictor, the two metrics should be correlated. In the ImageNet network, we found that there was no correlation between the L1 -norm of the filter weights and the class selectivity (Fig. A3a), while in the CIFAR-10 network, we found there was actually a negative correlation (Fig. A3b). A.5 R ELATIONSHIP BETWEEN MUTUAL INFORMATION AND IMPORTANCE MNIST MLP a CIFAR-10 ConvNet b c ImageNet ResNet d e Figure A4: Mutual information is not a good predictor of unit importance. Impact of ablation as a function of mutual information for MNIST MLP (a), CIFAR-10 convolutional network (b-c), and ImageNet ResNet (d-e). c and e show regression lines for each layer separately. To examine whether mutual information, which, in contrast to class selectivity, highlights units with information about multiple classes, is a good predictor of importance, we performed the same experiments as in Section 3.4 with mutual information in place of class selectivity. We found, that while the results were a little less consistent (e.g., there appears to be some relationship in very early and very late layers in CIFAR-10), mutual information was generally a poor predictor of unit importance (Fig. A4). 15
9cs.NE
arXiv:1605.08244v2 [math.GT] 15 Mar 2017 Profinite rigidity of graph manifolds and JSJ decompositions of 3-manifolds Gareth Wilkes March 16, 2017 Abstract There has been much recent interest into those properties of a 3manifold determined by the profinite completion of its fundamental group. In this paper we give readily computable criteria specifying precisely when two orientable graph manifold groups have isomorphic profinite completions. Our results also distinguish graph manifolds among the class of all 3-manifolds and give information about the structure of totally hyperbolic manifolds, and give control over the pro-p completion of certain graph manifold groups. 1 Introduction Much attention has been paid recently to those properties of 3-manifolds which can be deduced from the finite quotients of their fundamental groups; or, from another viewpoint, from the structure of their lattice of finite-sheeted coverings. Having assembled these finite quotients into the profinite completion of the fundamental group, this amounts to the study of ‘profinite invariants’ of the 3-manifold. A profinite invariant may be defined as some property P of a group G such that, whenever H is a group with property P and Ĝ ∼ = Ĥ, then G also has property P. One may restrict attention to a particular class of groups (for example fundamental groups of compact orientable 3-manifolds) and require both G and H to be from that class. For the rest of the paper we restrict our attention to this class of groups. By abuse of language one also refers to a profinite invariant of a 3-manifold. The strongest profinite invariant one could hope for is the isomorphism type of the group itself. In this case one refers to a group whose profinite completion determines the isomorphism type of the group (again, among compact orientable 3-manifold groups) as ‘profinitely rigid’. The author showed recently [Wil15] that, apart from some limited examples due to Hempel [Hem14], closed Seifert fibre spaces are profinitely rigid. Bridson and Reid [BR15] and Boileau and Friedl [BF15] have shown that the figure-eight knot complement, along with a handful of other knot complements, are profinitely rigid. Bridson, Reid and Wilton [BRW16] have also proved that the fundamental groups of oncepunctured torus bundles are profinitely rigid. To date these are the only known examples of profinitely rigid manifolds in the literature. An important property of a 3-manifold is its geometry: whether it admits one of the eight Thurston geometries and, if so, which one. This problem is 1 more naturally stated only for closed manifolds, as then any geometry is unique. Wilton and Zalesskii [WZ17] have shown that the geometry of a 3-manifold is a profinite invariant. The aspect of this theorem distinguishing between Seifert fibred or hyperbolic manifolds on the one hand and Sol or non-geometric manifolds on the other may be interpreted as the statement ‘triviality of the JSJ decomposition is a profinite invariant’. In this paper we investigate graph manifolds and, more generally, the JSJ decomposition. We obtain in particular criteria determining precisely when two graph manifold groups can have isomorphic profinite completion. The exact statement requires a good deal of terminology and notation which is inappropriate in an Introduction, hence we will give a rather loose paraphrasing of the result. For the precise statement see Theorem 10.9. Theorem A. Let M , N be closed orientable graph manifolds with JSJ decom∼ d positions (X, M• ), (Y, N• ) respectively. Suppose π[ 1 M = π1 N . Then the graphs X, Y are isomorphic, such that corresponding vertex groups have isomorphic profinite completions. Furthermore: • If X is not a bipartite graph, then M is profinitely rigid and so π1 M ∼ = π1 N . • If X is a bipartite graph then there is an explicit finite list of numerical equations defined in terms of M, N which admit a solution if and only if ∼ d π[ 1 M = π1 N . In particular, for a given M there only finitely many N (up to homeomorphism) ∼ d such that π[ 1 M = π1 N . We also use our analysis to distinguish graph manifolds from mixed or totally hyperbolic manifolds, which may be seen as an extension of [WZ17] stating that the profinite completion ‘sees’ which geometries are involved in the geometric decomposition of an aspherical 3-manifold. Theorem B. Let M be a mixed or totally hyperbolic 3-manifold and let N be a graph manifold. Then π1 M and π1 N do not have isomorphic profinite completions. While our techniques give strong control over the Seifert fibre spaces involved in a 3-manifold, it is more difficult to detect the hyperbolic pieces in a satisfactory way; we can only detect the presence of a hyperbolic piece, without giving any information about it. When there are no Seifert-fibred pieces at all, we can extract some information about the configuration of the hyperbolic pieces. ∼ d Theorem C. Let M , N be aspherical manifolds with π[ 1 M = π1 N and with JSJ decompositions (X, M• ), (Y, N• ) all of whose pieces are hyperbolic. Then the graphs X and Y have equal numbers of vertices and edges and equal first Betti numbers. This paper is structured as follows. In Sections 2, 3, and 5 we recall background material and the elements of profinite Bass-Serre theory. In Section 4 we prove some results about certain actions on profinite trees which, while known to experts, have not appeared in detail in the literature. Section 6 forms the 2 technical core of the paper, proving many useful lemmas and ultimately the first part of Theorem A. Theorem B is proved in Section 7, and Theorem C is proved in Section 8. In Section 9 we describe how, in certain situations, we may obtain a pro-p analogue of our JSJ decomposition theorem. Finally in Section 10 we complete the proof of Theorem A. Conventions. For notational convenience, we will adopt the following conventions. • From Section 3 onwards, profinite groups will generally be given Roman letters A, G, H, ...; the handful of discrete groups which appear will usually either be groups with standard symbols or the fundamental group of a space, so we will not reserve a particular set of symbols for them. • Profinite graphs will be given capital Greek letters Γ, ∆, T, ..., and abstract graphs will be X, Y, ... • A finite graph of (profinite) groups will be denoted G = (X, G• ) where X is a finite graph and G• will be an edge or vertex group. • There is a divergence of notation between profinite group theorists, for whom Zp denotes the p-adic integers, and manifold theorists who use the same symbol for the cyclic group of order p. We will follow the former convention and use Z/pZ or Z/p to denote the cyclic group. • For us, a graph manifold will be required to be non-geometric, i.e. not a single Seifert fibre space or a Sol-manifold, hence not a torus bundle. A totally hyperbolic manifold will be a 3-manifold all of whose JSJ pieces are hyperbolic, and a mixed manifold will be a manifold with both Seifertfibred and hyperbolic JSJ pieces. All 3-manifolds will be orientable. • The symbols ⊳f , ⊳o , ⊳p will denote ‘normal subgroup of finite index’, ‘open normal subgroup’, ‘normal subgroup of index a power of p’ respectively; similar symbols will be used for not necessarily normal subgroups. • For two elements g, h of a group, g h will denote h−1 gh. That is, conjugation will be a right action. The author would like to thank Marc Lackenby for carefully reading this paper, and is grateful to Henry Wilton for discussions regarding Lemma 6.6 and for drawing the author’s attention to [GDJZ15]. The author was supported by the EPSRC and by a Lamb and Flag Scholarship from St John’s College, Oxford. 2 2.1 Preliminaries Profinite completions We first briefly recall the notion of a profinite group and a profinite completion. For more detail, the reader is referred to [RZ00b]. 3 Definition 2.1. A profinite group is an inverse limit of a system of finite groups. If all these finite groups are from a particular class C of finite groups, the limit is said to be a pro-C group. Given a group G, its profinite completion is the profinite group Ĝ defined as the inverse limit of all finite quotient groups of G: Ĝ = lim G/N ←− N ⊳f G The pro-C completion is the pro-C group ĜC defined as the inverse limit of those finite quotients of G which are in the class C. In this paper, we will only refer to those classes C comprising all finite groups whose orders are only divisible by primes from a certain set of primes π. The term ‘pro-C’ is then replaced by ‘pro-π’. When π is the set of all primes, we of course get the full profinite completion. We further abbreviate ‘pro-{p}’ to b(p) . ‘pro-p’. The pro-p completion is usually denoted G Typically, we only take the profinite completion of a residually finite group; then the natural map G → Ĝ will be injective. A (topological) generating set for a profinite group H is a subset X ⊆ H such that the subgroup abstractly generated by X is dense in H. The profinite completion was determined by the inverse system of all finite quotients. In fact, by a standard argument (see [DFPR82]) two finitely generated groups have the same profinite completion if and only if the sets of isomorphism types of finite groups which can arise as finite quotients of the two groups are the same. For a profinite group G = lim Qi where the Qi are finite, the kernels of ←− the maps G → Qi form a basis for the topology at 1, and so they are open subgroups of G. A deep result of Nikolov and Segal [NS07] shows that for a finitely generated profinite group, all finite index subgroups are open; that is, the group structure determines a unique topology giving G the structure of a profinite group. Thus any abstract isomorphism of finitely generated profinite groups is a topological isomorphism also. The profinite completion of the integers plays, as one might expect, a central role in much of the theory. It is the inverse limit Ẑ = lim Z/n ←− of all finite cyclic groups. The pro-π completion, denoted Zπ , is the inverse limit of those finite cyclic groups whose orders only involve primes from π. Because of the Chinese Remainder Theorem, these finite cyclic groups split as products of cyclic groups of prime power order, and these splittings are natural with respect to the quotient maps Z/mn → Z/n. It follows that the profinite completion of Z splits as the direct product, over all primes p, of the rings of p-adic integers Zp = lim Z/pi ←− Similarly Zπ = Y Zp p∈π This splitting as a direct product, which of course is not a feature of Z itself, means that ring-theoretically Ẑ behaves less well than Z. In particular, there 4 exist zero-divisors, which are precisely those elements which vanish under some projection to Zp . The rings Zp themselves do not have any zero-divisors, and Z injects into each Zp (for every natural number n and prime p, some power of p does not divide n), so no element of Z is a zero-divisor in Ẑ. Furthermore, the group of units of Ẑ is rather large, being the inverse limit of the multiplicative groups of the rings Z/n. In particular Aut(Ẑ) is a profinite group much larger than Aut(Z). Elements of profinite groups may be raised to powers with exponents in Ẑ. For if G is a profinite group and x ∈ G, the map 1 7→ x extends to a map Z → G by the universal property of Z, which by continuity extends to a map Ẑ → G (that is, Ẑ is a free profinite group on the element 1). The image of λ ∈ Z under this map is then denoted xλ . This operation has all the expected properties; see Section 4.1 of [RZ00b] for more details. As we are discussing Ẑ, this seems a fitting place to include the following easy lemma. Lemma 2.2. If λ ∈ Ẑ, n ∈ Z r {0}, and λn ∈ Z, then λ ∈ Z. In particular if λ ∈ Ẑ× then λ = ±1. Proof. Since λn is an integer congruent to 0 modulo n, there exists l ∈ Z such that λn = ln. Since n is not a zero-divisor in Ẑ, it follows that λ = l ∈ Z. 2.2 The profinite topology Whenever profinite properties of groups are discussed, it is usually necessary to have some control over subgroup separability. Here we recall prior results that will be used heavily, and often without comment, in the sequel. Definition 2.3. The (full) profinite topology on a discrete group G is the topology induced by the map G → Ĝ. A subset of G is separable if and only if it is closed in the profinite topology. In particular, a group is residually finite if and only if the subset {1} is separable. If every finite-index subgroup H1 ≤f H of a subgroup H ≤ G is separable in G, then it follows that the natural map Ĥ → H̄ G is in fact an isomorphism. If this is the case we say that G induces the full profinite topology on H. Seifert fibred and hyperbolic 3-manifold groups have very good separability properties; specifically they are LERF, meaning that every finitely generated subgroup is separable. In this case all finitely generated subgroups H have Ĥ ∼ = H̄. Unfortunately graph manifold groups are not in general LERF; in fact in a sense a generic graph manifold group is not LERF. See [BKS87], [NW01]. However, those subgroups of primary concern are well behaved in the profinite topology. In particular: Theorem (Hamilton [Ham01]). Let M be a Haken 3-manifold. Then the abelian subgroups of π1 M are separable in π1 M (and thus π1 M induces the full profinite topology on them). Theorem 2.4 (Wilton and Zalesskii [WZ10]). Let M be a closed, orientable, irreducible 3-manifold, and let (X, M• ) be the graph of spaces corresponding to the JSJ decomposition. Then the vertex and edge groups π1 M• are closed in the profinite topology on π1 M , and π1 M induces the full profinite topology on them. 5 2.3 Seifert fibre spaces and graph manifolds In the literature there are two inequivalent definitions of what is meant by a ‘graph manifold’. In all cases, a graph manifold is an irreducible manifold whose JSJ decomposition consists only of Seifert-fibred pieces. The JSJ decomposition is by definition minimal, so the fibrings of adjacent pieces of the decomposition never extend across the union of those pieces. Some authors additionally require that a graph manifold is not geometric; i.e., it is not itself Seifert-fibred and is not a Sol manifold. Hence the JSJ decomposition is non-trivial and the graph manifold is not finitely covered by a torus bundle. In this paper we do impose this constraint. Furthermore we shall deal only with orientable graph manifolds. At the other end of the spectrum, a manifold whose JSJ decomposition is non-trivial and has no Seifert-fibred pieces at all will be called ‘totally hyperbolic’. When the JSJ decomposition has at least one Seifert-fibred piece and at least one hyperbolic piece the manifold is called ‘mixed’. We now briefly recall those facts about fundamental groups of Seifert fibre spaces which will be necessary. For a more full account, see [Sco83] or [Bri07]. The fundamental group of a Seifert fibre space M has a short exact sequence 1 → hhi → π1 M → π1orb O → 1 where O is the base orbifold and h is the homotopy class of a regular fibre. The subgroup generated by this fibre (which may be finite in general) is normal in π1 M . Moreover, either it is central in π1 M (when O is orientable) or is contained in some index 2 subgroup of π1 M in which it is central (when O is non-orientable). The orbifold fundamental group π1orb O is a Fuchsian group. The Seifert fibre spaces arising in the JSJ decomposition of a graph manifold have boundary consisting of at least one incompressible torus comprised of fibres; in this case the subgroup generated by h is infinite cyclic and π1orb O is a free product of cyclic groups. The base orbifold has either positive, zero, or negative Euler characteristic. If the Euler characteristic is negative, then there is a unique maximal normal cyclic subgroup of π1 M , called the (canonical) fibre subgroup. No positive characteristic base orbifolds can occur when the boundary is incompressible and non-empty. The Seifert fibre spaces with boundary which have Euclidean base orbifold are precisely S1 ×S1 ×I and the orientable I-bundle over a Klein bottle. The first of these can never arise in a JSJ decomposition of anything other than a torus bundle and we will henceforth ignore it. The second has two maximal normal cyclic subgroups (‘fibre’ subgroups), one central (with quotient the infinite dihedral group) and one not central (with quotient Z, here being the fundamental group of a Möbius band). We call the first of these fibre subgroups the canonical fibre subgroup. We refer to such pieces of the JSJ decomposition of a graph manifold as ‘minor’, and to those with base orbifold of negative characteristic as ‘major’ (the terms ‘small Seifert fibre space’ and ‘large Seifert fibre space’ being already entrenched in the literature with a rather different meaning). By definition, all pieces of the JSJ decomposition of a graph manifold are Seifert fibre spaces, and by minimality of the decomposition the fibres of two adjacent Seifert fibred pieces do not match, even up to isotopy. Thus the canonical fibre subgroups of adjacent Seifert fibre spaces intersect trivially in the fundamental group of the graph manifold; if one piece is minor, neither of its two 6 fibre subgroups intersect the fibre subgroup of the adjacent piece non-trivially. Note that two minor pieces can never be adjacent; for each of these having only one boundary component, the whole graph manifold would then be just two minor pieces glued together. Each has an index 2 cover which is a copy of S1 × S1 × I, so our graph manifold would be finitely covered by a torus bundle, and would thus be either a Euclidean, Nil or Sol manifold; but we required our graph manifolds to be non-geometric. Many of these properties still hold in the profinite completion; for instance, when the base orbifold is of negative Euler characteristic, Theorem 6.4 of [Wil15] guarantees that we still have a unique maximal procyclic subgroup which is either central or is central in an index 2 subgroup. We may directly check that the profinite completion of the Klein bottle group also still has just two maximal normal procyclic subgroups, one of which is central. Hence our notion of (canonical) fibre subgroup, as a maximal procyclic group with the above property, carries over to the profinite world. Seifert fibre spaces are well-controlled by their profinite completions. Theorem 2.5 (Wilkes [Wil15]). Let M be a closed orientable Seifert fibre space. Then: ^ • If M has the geometry S3 , S2 ×R, E3 , Nil, or SL 2 (R) then M is profinitely rigid. • If M has the geometry H2 × R, and is therefore a surface bundle over a hyperbolic surface Σ with periodic monodromy φ, those orientable 3manifolds with the same profinite completion as M are precisely the surface bundles over Σ with monodromy φk , for k coprime to the order of φ. The non-rigid examples of geometry H2 × R were found by Hempel [Hem14]. For Seifert fibre spaces with boundary, such as those arising in the JSJ decomposition of a graph manifold, we naturally require some conditions on the boundary. Definition 2.6. Let O be an orientable 2-orbifold with boundary, with fundamental group B = ha1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg | api i i where the boundary components of O are represented by the conjugacy classes of the elements e1 , . . . , es together with e0 = (a1 · · · ar e1 · · · es [u1 , v1 ] · · · [ug , vg ]) −1 Then an exotic automorphism of O of type µ is an automorphism ψ : B̂ → B̂ such that ψ(ai ) ∼ aµi and ψ(ei ) ∼ eµi for all i, where ∼ denotes conjugacy in B̂. Similarly, let O′ be a non-orientable 2-orbifold with boundary, with fundamental group B ′ = ha1 , . . . , ar , e1 , . . . , es , u1 , . . . , ug | api i i where the boundary components of O′ are represented by the conjugacy classes of the elements e1 , . . . , es together with e0 = a1 · · · ar e1 · · · es u21 · · · u2g 7 −1 Let o : B̂ ′ → {±1} be the orientation homomorphism of O′ . Let σ0 , . . . , σs ∈ {±1}. Then an exotic automorphism of O′ of type µ with signs σ0 , . . . , σs is an automorphism ψ : B̂ ′ → B̂ ′ such that ψ(ai ) ∼ aµi and ψ(ei ) = (eσi i µ )gi for all i where o(gi ) = σi for all i. Remark. The reader may find the term ‘exotic automorphism of O’ a little jarring as the automorphism really acts on B̂. This name was chosen to emphasize that this notion depends on an identification of the group as the fundamental group of a specific orbifold, with specific elements representing boundary components. For example, an exotic automorphism of a three-times punctured sphere is a rather different thing from an exotic automorphism of a once-punctured torus: even though both groups are free of rank 2, there are different numbers of boundary components to consider. For the same reason, there is a canonical map to a cyclic group of order 2 giving the orientation homomorphism- this is not a characteristic quotient of a free group, but is uniquely defined when an identification with an orbifold group is chosen. Theorem 2.7 (Wilkes [Wil15]). Let M, N be Seifert fibre spaces with boundary components ∂M1 , . . . , ∂Mn , ∂N1 , . . . , ∂Nn . Suppose Φ is an isomorphism of group systems Then: d \ \ \ \ Φ : (π[ 1 M ; π1 ∂M1 , . . . , π1 ∂Mn ) → (π1 N ; π1 ∂N1 , . . . , π1 ∂Nn ) • If M is a minor Seifert fibre space, then M ∼ = N. • If M is a major Seifert fibre space, then the base orbifolds of M , N may be identified with the same orbifold O such that Φ splits as an isomorphism of short exact sequences 1 Ẑ π[ 1M Φ ·λ 1 Ẑ πd 1N orb π\ 1 O 1 φ orb π\ 1 O 1 where λ is some invertible element of Ẑ and φ is an exotic automorphism of O of type µ. Hence if N is a surface bundle over the circle with fibre a hyperbolic surface Σ with periodic monodromy ψ, then M is also such a surface bundle with monodromy ψ k where k is congruent to κ = µ−1 λ modulo the order of ψ. Remark. Since this precise theorem statement does not appear in [Wil15] in quite this form, we should comment on how it arises, and in particular the point that κ is µ−1 λ rather than just λµ. First we remark that this theorem follows immediately from the case of orientable base orbifold. Note that Φ preserves the canonical index 2 subgroup given by the centraliser of the fibre, so the corresponding 2-fold covers M̃ and Ñ are related in the above fashion, for some labelling of the boundary components of each. The result then follows, noting that an automorphism of the base which 8 induces an exotic automorphism on the index 2 orientation subgroup is itself an exotic automorphism. So consider the case of orientable base orbifold. Let B = π1orb O. The fact that an isomorphism of fundamental groups gives an isomorphism of short exact sequences is the content of Theorem 6.4 of [Wil15]. The profinite groups in question are then central extensions, given by cohomology classes ζM , ζN ∈ H 2 (B̂, Ẑ) This latter cohomology group is an abelian group of exponent dividing the order of the monodromy. The statement concerning surface bundles is equivalent to the statement that ζN = µ−1 λζM To see this equivalence, one could write out presentations of the groups and hence compute the cohomology classes directly from the characterisation in Section 6.2 of [Wil15]. See also Section 5 of [Hem14], where the computation of the fibre invariants of a surface bundle with monodromy ψ k is carried out. Note that raising the monodromy to a power k actually raises the fibre invariants (pi , qi ), and hence the cohomology class, of the space to a power inverse to k modulo the order of ψ- hence the order of N and M in the last part of the theorem. From the proof of Theorem 6.7 of [Wil15], the automorphism φ of B̂ is an exotic automorphism of type µ for some µ, and the action of such a φ on cohomology is multiplication by µ. Let Γ be a central extension of B̂ by Ẑ corresponding to the cohomology class µζN . Since the action of φ−1 on cohomology is multiplication by µ−1 , and noting that this action is contravariant, we have (φ−1 )∗ (µζN ) = ζN and hence we have a short exact sequence of isomorphisms 1 Ẑ id 1 Ẑ πd 1N B̂ Γ B̂ ∼ = φ 1 −1 1 Precomposing this with the short exact sequence from the theorem there is an isomorphism 1 Ẑ π[ B̂ 1 1M ·λ 1 Ẑ ∼ = Γ id B̂ 1 which, since the map on Ẑ gives a covariant map on cohomology, says that the cohomology class representing Γ is in fact λζM . Hence λζM = µζN as was claimed. 9 Definition 2.8. If M, N are as in the latter case of the above theorem, we say that (M, N ) is a Hempel pair of scale factor κ, where κ = µ−1 λ. Note that κ is only well-defined modulo the order of φ, which may be taken to be the lowest common multiple of the orders of the cone points of M . Note that a Hempel pair of scale factor ±1 is a pair of homeomorphic Seifert fibre spaces. 3 3.1 Groups acting on profinite graphs Profinite graphs We state here the definitions and basic properties of profinite graphs for convenience. The sources for this section are [RZ01], Section 1 or [RZ00a], Sections 1 and 2. See these references for proofs and more detail. Definition 3.1. An abstract graph X is a set with a distinguished subset V (X) and two retractions d0 , d1 : X → V (X). Elements of V (X) are called vertices, and elements of E(X) = X r V (X) are called edges. Note that a graph comes with an orientation on each edge. If an abstract graph is in addition a profinite space Γ (that is, an inverse limit of finite discrete topological spaces), V (Γ) is closed and d0 , d1 are in addition continuous, then Γ is called a profinite graph. Note that E(Γ) may not be closed. A morphism of graphs X, Y is a function f : X → Y such that di f = f di for each i. In particular, f sends vertices to vertices, but may not send edges only to edges. A morphism of profinite graphs Γ, ∆ is a map f : Γ → ∆ which is a morphism of abstract graphs and is continuous. A profinite graph may equivalently be described as an inverse limit of finite abstract graphs Xi , and V (Γ) = lim V (Xi ). If E(Γ) happens to be closed, we ←− can choose the inverse system Xi so that the transition maps send edges to edges, and then E(Γ) = lim E(Xi ). If Y is another finite graph, any morphism ←− of Γ onto Y factors through some Xi . A path of length n in a graph X is a morphism into X of a finite graph consisting of n edges e1 , . . . , en and n + 1 vertices v0 , . . . , vn (with some choice of orientations on the edges) such that the endpoints of each edge ei are vi−1 , vi . Note that such a morphism into a profinite graph is automatically continuous. An abstract graph X is path-connected if any two vertices lie in the image of some path in X. A profinite graph Γ is connected if any finite quotient graph is path-connected. Equivalently a connected profinite graph is the inverse limit of path-connected finite graphs. A path-connected profinite graph is connected. If the set of edges of a connected profinite graph is closed, then each vertex must have an edge incident to it. Example 3.2 (A connected profinite graph with a vertex with no edge incident to it). Let I = N ∪ Ñ∪ {∞} be the one-point compactification of two copies N, Ñ of the natural numbers. Let V (I) = N ∪ {∞}, and define d0 , d1 by di (n) = n for n ∈ N, di (∞) = ∞, and d0 (ñ) = n, d1 (ñ) = n + 1 for ñ ∈ Ñ. This is the inverse limit of the system of finite line segments In of length n, where the maps In+1 → In collapse the final edge to the vertex n. Hence I is connected, but no edge is incident to ∞. 10 Example 3.3 (A connected graph whose proper connected subgraphs are finite). Consider the Cayley graphs Cn = Cay(Z/n, 1) with the natural maps Cmn → Cn coming from the natural group homomorphisms. Then Γ = lim Cn is the ←− Cayley graph of Ẑ with respect to the generating set 1 (see below). If ∆ is a connected proper subgraph of Γ, then the image ∆n of ∆ in some Cn is not all of Cn ; hence it is a line segment in Cn . In each Cmn , the preimage of this line segment is m disjoint copies of ∆n ; by connectedness ∆mn is precisely one of these. That is, ∆mn → ∆n is an isomorphism for all m. Thus ∆ = lim ∆mn is ←− just a line segment of finite length. Example 3.4 (Cayley graph). Let G be a profinite group and X be a closed subset of G, possibly containing 1. The Cayley graph of G with respect to X is the profinite graph Γ = G × (X ∪ {1}), where V (Γ) = G × {1}, d0 (g, x) = (g, 1) and d1 (g, x) = (gx, 1). The Cayley graph Γ is the inverse limit of the Cayley graphs of finite quotients of Γ, with respect to the images of the set X in these quotients. The set X generates G topologically if and only if its image in each finite quotient is a generating set; hence Γ is connected if and only if every finite Cayley graph is connected, if and only if X generates G. 3.2 Profinite trees As one might expect from the reduced importance of paths in the theory of profinite graphs, a ‘no cycles’ condition does not give a good definition of ‘tree’. Instead a homological definition is used. Let Fp denote the finite field with p elements for p a prime. The following definitions and statements can be found in Section 2 of [RZ00a]. For more on profinite modules and chain complexes, see Chapters 5 and 6 of [RZ00b]. Definition 3.5. Given a profinite space X = lim Xi where the Xi are finite ←− spaces, define the free profinite Fp -module on X to be [[Fp X]] = lim[Fp Xi ] ←− the inverse limit of the free Fp -modules with basis Xi . Similarly for a pointed profinite space (X, ∗) = lim(Xi , ∗) define ←− [[Fp (X, ∗)]] = lim[Fp (Xi , ∗)] ←− These modules satisfy the expected universal property, that a map from X to a profinite Fp -module M (respectively, a map from (X, ∗) to M sending ∗ to 0) extends uniquely to a continuous morphism of modules from the free module to M. Definition 3.6. Let Γ be a profinite graph. Let (E ∗ (Γ), ∗) be the pointed profinite space Γ/V (Γ) with distinguished point the image of V (Γ). Consider the chain complex δ ǫ 0 → [[Fp (E ∗ (Γ), ∗)]] → [[Fp V (Γ)]] → Fp → 0 where the map ǫ is the evaluation map and δ sends the image of an edge e in (E ∗ (Γ), ∗) to d1 (e) − d0 (e). Then define H1 (Γ, Fp ) = ker(δ) and H0 (Γ, Fp ) = ker(ǫ)/im(δ). 11 Proposition 3.7. Let Γ be a profinite graph. • Γ is connected if and only if H0 (Γ, Fp ) = 0 • The homology groups H0 , H1 are functorial, and if Γ = lim Γi , then ←− Hj (Γ, Fp ) = lim Hj (Γi , Fp ) ←− Definition 3.8. A profinite graph Γ is a pro-p tree, or simply p-tree, if Γ is connected and H1 (Γ, Fp ) = 0. If π is a non-empty set of primes then Γ is a π-tree if it is a p-tree for every p ∈ π. We say simply ‘profinite tree’ if π consists of all primes. Note that a finite graph is a p-tree if and only if it is an abstract tree. It follows immediately from Proposition 3.7 that an inverse limit of finite trees is a p-tree. However this is not the only source of p-trees, and the notion of p-tree is not independent of the prime p. Example 3.9. Let Γ be the Cayley graph of Ẑ with respect to the generator 1, written as the inverse limit of cycles Cn of length n. For a finite set X, [[Fp (X ∪ {∗}, ∗)]] = [[Fp X]] = [Fp X] so for each n, H1 (Cn , Fp ) = Fp as this is now the simplicial homology of the realisation of Cn as a topological space. Thus the map H1 (Cmn , Fp ) → H1 (Cn , Fp ) is just multiplication by m. In particular, Cpn → Cn induces the zero map on homology. It follows that the inverse limit of these groups is trivial, i. e. H1 (Γ, Fp ) = lim H1 (Cn , Fp ) = 0 ←− so that Γ is a p-tree. Now let Γq be the Cayley graph of the q-adic integers Zq with respect to 1, where q is another prime. Again Γq is the inverse limit of the cycles Cqi of length q i , and the maps induced on homology by Cqj → Cqi for j > i are multiplication by q j−i . If q = p these are the zero map, so again H1 (Γq , Fp ) = lim H1 (Cqi , Fp ) = 0 ←− so that Γq is a q-tree. On the other hand, if q 6= p, multiplication by q j−i is an isomorphism from Fp to itself, so that H1 (Γq , Fp ) = lim H1 (Cqi , Fp ) ∼ = Fp ←− and Γq is not a p-tree for p 6= q. It transpires (Theorem 1.4.3 of [RZ01]) that the Cayley graph of any free pro-π group with respect to a free basis (that is, a pro-π group satisfying the appropriate universal property in the category of pro-π groups) is a π-tree. Note that the examples above show that a profinite group acting freely on a profinite tree need not be free profinite. For the subgroup Zp ≤ Ẑ acts freely on the above Cayley graph, but is not a free object in the category of all profinite groups (for instance, if q is another prime, the map 1 7→ 1 ∈ Z/q does not extend to a map Zp → Z/q). It turns out (Theorem 3.1.2 of [RZ01]) that such a group will instead be projective in the sense of category theory. A pro-p group acting freely 12 on a pro-p tree is a free pro-p group however (Theorem 3.4 of [RZ00a]), as in the category of pro-p groups, any projective group is free pro-p. This is one of the ways in which the pro-p theory is more amenable than the general theory. Some of the topological properties of abstract trees do carry over well to the world of profinite trees: Proposition 3.10 (Propositions 1.5.2, 1.5.6 of [RZ01]). Let T be a π-tree. • Every connected profinite subgraph of T is a π-tree • Any intersection of π-subtrees of T is a (possibly empty) π-subtree It follows that for every subset W of a π-tree T there is a unique smallest subtree of T containing W . If W consists of two vertices v, w then this smallest subtree is called the geodesic from v to w and is denoted [v, w]. Note that if a profinite tree T is path-connected, hence is also an abstract tree, then [v, w] will coincide with the usual notion of geodesic, a shortest path from v to w. However there is no requirement for a geodesic to be a path. For instance, our above analysis of the connected subgraphs of the profinite tree Cay(Ẑ, 1) shows that if λ, µ ∈ Ẑ then either λ − µ ∈ Z or the geodesic [λ, µ] is the entire tree Cay(Ẑ, 1). 3.3 Group actions on profinite trees The theory of profinite groups acting on profinite trees is less tractable than the classical theory, but still parallels it in many respects. In this section we will recall results from the unpublished book [RZ01], and prove others which will be of use. The theory was originally developed in [GR78], [Zal89], [ZM89a], and [ZM89b], and the pro-p version of the theory may be found in published form in [RZ00a]. Definition 3.11. A profinite group G is said to act on a profinite graph Γ if G acts continuously on the profinite space Γ in such a way that g · di (x) = di (g · x) for all g ∈ G, x ∈ Γ, i = 0, 1. For each x ∈ Γ, the stabiliser {g ∈ G | g · x = x} will be denoted Gx . For subsets X ⊆ Γ, H ⊆ G, the set of points in X fixed by every element of H will be denoted X H . Note that given an edge e, we cannot have g · e = e without fixing both endpoints of e, as g · di (e) = di (e) for each i. In particular, the qualification ‘without inversion’ applied to group actions in the classical theory of [Ser03] is here subsumed in the definition. If G acts on Γ, the quotient space G\Γ is a well-defined profinite graph. As one might expect, such an action may be represented as an ‘inverse limit of finite group actions on finite graphs’. More precisely, Definition 3.12. Let a profinite group G act on a profinite graph Γ. A decomposition of Γ as an inverse limit of finite graphs Γ = lim Xi is said to be ←− a G-decomposition if G acts on each Xi in such a way that all quotient maps Γ → Xi and transition maps Xj → Xi are G-equivariant. 13 Indeed, the following is true Lemma 3.13 (Lemma 1.2.1 of [RZ01]). Let a profinite group G act on a profinite graph Γ. Then the graphs {N \Γ | N ⊳o G} form an inverse system and Γ = lim N \Γ ←− N ⊳o G Proof. The first statement is clear. By the universal property of inverse limits, we have a natural continuous surjection Γ ։ lim N \Γ ←− N ⊳o G and it remains to show that this is injective. If v, w ∈ Γ are identified in every N \Γ, then for all N there is some n ∈ N such that n · v = w. Thus the closed subsets {n ∈ N | n · v = w} of G are all non-empty, and the collection {N } is closed under finite intersections; T so by compactness of G, their intersection is non-empty, so there is some g ∈ N such that g ·v = w; but the intersection of all N is trivial, so v = w. Definition 3.14. If G is a profinite group acting on a profinite tree T , the action is said to be: • faithful, if the only element of G fixing every vertex of T is the identity; • irreducible, if no proper subtree of T is invariant under the action of G; • free if Gx = 1 for all x ∈ Γ. Note that a group G acts freely on its Cayley graph with respect to any closed subset X, with quotient the ‘bouquet of circles’ on the pointed profinite space (X ∪ {1}, 1), i. e. the profinite graph Γ(X ∪ {1}, 1) with vertex space {1}. Faithful and irreducible actions are the most important actions; indeed, T given a group G acting on a profinite tree Γ, we can quotient G by the kernel Gx of the action (i. e. those group elements fixing all of Γ) and then pass to a minimal G-invariant subtree to get a faithful irreducible action. Such a subtree exists by: Proposition 3.15 (Proposition 1.5.9 of [RZ01]; Lemma 3.11 of [RZ00a]). Let a profinite group G act on a pro-π tree Γ. Then there exists a minimal G-invariant subtree ∆ of Γ, and if |∆| > 1, it is unique. Theorem 3.16 (Theorem 3.1.5 of [RZ01]). Suppose a pro-π group G acts on a π-tree T . Then the set T G of fixed points under the action of G is either empty or a π-subtree of G. Theorem 3.17 (Theorem 3.1.7 of [RZ01]). Any finite group acting on a profinite tree fixes some vertex. Proposition 3.18. Let G act on a profinite tree T , and let x ∈ G. If xλ fixes a vertex v for some λ ∈ Ẑ r {0} which is not a zero-divisor, then x also fixes some vertex. 14 Proof. Let S be the subtree of T fixed by xλ ; it is non-empty by assumption. Consider the action of C = < x > on S. The closed (normal) subgroup of C generated by xλ acts trivially on S, so there is a quotient action of C/< xλ > Q on S. Now this quotient group is Ẑ/λẐ. Using the splitting Ẑ = Zp , we find Y Ẑ/λẐ = Zp /πp (λ)Zp where πp is the projection onto each factor. No πp (λ) is zero because λ is not a zero-divisor in Ẑ. Closed subgroups of Zp are finite index or trivial (see Proposition 2.7.1 of [RZ00b]), so Ẑ/λẐ is a direct product of finite cyclic groups. The subtree fixed by a direct product of groups is the intersection of the subtrees fixed by each group. Any finite product of finite cyclic groups fixes some vertex by Theorem 3.17, so the subtrees fixed by each finite cyclic group are a collection of non-empty closed subsets of S with the finite intersection property. By compactness, the intersection of all of them is non-empty; but this is the subtree fixed by C/< xλ >, which is the same as the subtree fixed by x. So x fixes some vertex of S (hence of T ). Remark. The condition that λ is not a zero-divisor is necessary. For instance, Ẑ (written multiplicatively with generator x) acts freely on its Cayley graph, but if λµ = 0 for λ, µ non-zero, then xµ fixes no vertex but (xµ )λ is the identity. Recall however that no element of Z is a zero divisor in Ẑ, so that the Proposition applies in particular when λ ∈ Z. Proposition 3.19 (Proposition 3.2.3(b) of [RZ01]). Let G be an abelian profinite group acting faithfully and irreducibly on a profinite tree. Then G acts freely and G ∼ = Zπ for some set of primes π. 4 Acylindrical actions Actions on profinite trees are particularly malleable when the action is acylindrical. Definition 4.1. Let a profinite group G act on a profinite tree T . The action is k-acylindrical if the stabiliser of any injective path of length greater than k is trivial. For instance an action with trivial edge stabilisers is 0-acylindrical. In [WZ17] Wilton and Zalesskii exploited the fact that if edge groups are malnormal in the adjacent vertex groups then the action on the standard graph is 1-acylindrical. We now prove some results about acylindrical actions on profinite trees. The following lemma is taken from the Appendix to [HZ12] and will be used to remove some of the pathologies associated with profinite graphs; we reproduce it here for completeness. Lemma 4.2. Let Γ be a profinite graph in which there are no paths longer than m edges for some integer m. Then the connected components of Γ (as a profinite graph) are precisely the path components (that is, the connected components as an abstract graph). In particular if Γ is connected then it is path-connected. 15 Proof. First define the composition of two binary relations R, S on a set X to be the relation that xRSy if and only if there exists z such that xRz and zSy; inductively define Rn+1 = Rn R. Further define Rop to be the relation that xRop y if and only if yRx. Let ∆ = {(x, x) ∈ X × X} be the identity relation. For an abstract graph Γ define R0 = {(x, y) ∈ Γ × Γ | d1 (x) = d0 (y)} (where x, y could be vertices), and set R = R0 ∪∆∪R0op . If xRn y then there is some path of length at most n containing x and y; if there is a path of n edges containing x and y then xR2n+1 y. This discrepancy is due to our convention that graphs are oriented, so we may need to include vertices in addition to the edges in a path of length n to get a chain of R-related elements of Γ. The path-components of S Γ are then the equivalence classes of the equivalence relation S = n Rn . Now in our profinite graph Γ, we have S = Rn for some n as there is a uniform bound on the length of paths in Γ. One can show that the continuity of the maps d0 , d1 and compactness of Γ imply that R, and all Rn , are closed compact subsets of Γ × Γ. In particular, the equivalence classes of S = Rn are closed subsets of Γ; that is, the path-components of Γ are closed. The quotient profinite graph Γ/S has no edges, hence its maximal connected subgraphs are points. Thus connected components of Γ (as a profinite graph) are contained in, hence equal to, a path-component of Γ. Proposition 4.3. Let a profinite group G act irreducibly on a profinite tree T . Then either T is a single vertex or it contains paths of arbitrary length. Proof. Assume that there is a bound on the lengths of paths in T ; then by the previous result T is path-connected, hence is a tree when considered as an abstract graph. Consider two geodesics of maximal length in this tree. These must intersect in at least their midpoint (a vertex if the length is even or an edge if odd); for otherwise one can easily construct a longer path. Hence the intersection of all such maximal geodesics is non-empty. This intersection is a profinite subtree of T invariant under the action of G, which must permute these maximal geodesics. Hence if the action of G is irreducible, T is equal to the intersection of its maximal geodesics; hence T is merely a path of length n. But then the midpoint of this path is fixed under the action of G; hence this middle vertex (or edge) is the whole of T . If G fixes an edge, then by our conventions that graphs are oriented, then it fixes each endpoint. Hence T is a single vertex. Corollary 4.4. Let a profinite group G act k-acylindrically on a profinite tree T for some k. Suppose g ∈ G r {1} fixes two vertices v, w. Then v, w are in the same path-component of T . Proof. By Theorem 3.16, the set T g of points fixed by g is a subtree of T as it is non-empty; therefore it contains the geodesic [v, w]. By acylindricity of the action, [v, w] contains no paths of length longer than k; hence it is pathconnected by Lemma 4.2. Proposition 4.5. Let a profinite group G act acylindrically on a profinite tree T . Let A be a closed abelian subgroup of G. Then either A ∼ = Zπ for some set of primes π or A fixes some vertex of T . 16 Proof. Let S be a minimal invariant subtree for the action of A on T . Then A acts irreducibly on S, so by Proposition 4.3 either S is a point (whence A fixes a point of T ) or S contains paths of arbitrary length. By Proposition 3.19, if A is not a projective group Zπ then the action is not faithful, so some non-trivial element of A fixes S, hence fixes paths of arbitrary length. But this is impossible by acylindricity. The following concept will be useful later. Definition 4.6. Given a profinite group G and a copy C of Ẑ contained in it, the restricted normaliser of C in G is the closed subgroup NG′ (C) = {g ∈ G | hg = h or hg = h−1 } where h is a generator of C. Note that this is a closed subgroup of G, containing the centraliser as an index 1 or 2 subgroup. We deal with the restricted normaliser to avoid certain technicalities in later proofs; in particular the centraliser may not be of finite index in the full normaliser. There is a continuous homomorphism from the full normaliser NG (C) to Aut(Ẑ). The centraliser is the kernel of this map, and the reduced normaliser is the preimage of the unique order 2 subgroup Aut(Z) ≤ Aut(Ẑ) which acts non-trivially on each Zp . Proposition 4.7. Let a profinite group G act k-acylindrically on a profinite tree T . (i) Let H ≤ K be closed subgroups of G with [K : H] < ∞, and suppose H fixes a vertex v of T . Then K fixes some vertex of T . (ii) Let C ∼ = Ẑ be a subgroup of G fixing some vertex v of T . Then the centraliser ZG (C) and the restricted normaliser NG′ (C) both fix some vertex of T . Proof. First let us prove part (i). If x ∈ K there exists n ∈ Z such that xn is in H; hence xn fixes v. Then by Proposition 3.18, there is some vertex u fixed by x. By Corollary 4.4, u and v lie in the same path component of T , hence so do u and x · v. Thus K acts on the path component S of v in T , which is an abstract tree. Every element of K fixes some vertex of S; hence by Section I.6.5, Proposition 26 of [Ser03], every finite set of elements of K has a common fixed point in S, hence in T . Thus every finite intersection T of the trees T x for x ∈ K is non-empty; by compactness of T , their intersection T x = T K is non-empty. That is, K fixes a vertex w of T . Now consider part (ii). The reduced normaliser has the centraliser as an index 2 subgroup, so by (i) it suffices to consider the centraliser of C. Let c be a generator of C, and let x ∈ ZG (C). We will show that x must fix a vertex of T in the same path component of T as v; the rest of the proof proceeds as for part (i). Let A = < x, c >. This is abelian so by Proposition 4.5 either A fixes a vertex u of T or A is a projective group Zπ . If it is projective, let a generate A. Then c = aλ for some λ ∈ Ẑ. Because C = < c > ∼ = Ẑ, it follows that λ is not a zero-divisor in Ẑ. So by Proposition 3.18, there is some vertex u of T fixed by 17 a, hence by A. In either case, A fixes a vertex u; since c fixes u and v, they lie in the same path component of T and we are done. Note that in both parts of the Proposition, the vertex w fixed by the subgroup in question is in the same path-component of T as v, and moreover will be joined to it by a path of length less than k. Remark. The following profinite analogue of the above-quoted result in [Ser03] seems plausible, and would allow a strengthening of the above result. Let a profinite group G act on a profinite tree T , and suppose that every element of G fixes a vertex of T . Then G fixes a vertex of T . However the author does not know if this result is true. 5 Graphs of profinite groups The theory of profinite graphs of groups can be defined for general profinite graphs X; we shall only consider finite graphs X here as this considerably simplifies the theory and is sufficient for our needs. First we recall the notion of free profinite product, as developed in Section 9.1 of [RZ00b] and Chapter 4 of [RZ01]. Definition 5.1. Given profinite groups G1 , . . . , Gn a free profinite product of the Gi consists of a profinite group H and morphisms φi : Gi → H and which is universal with respect to this property. That is, for any other profinite group K and morphisms ψi : Gi → K there is a unique map f : H → K such that f ◦ φi = ψi . The free profinite product exists and is unique, and will be denoted G1 ∐ . . . ∐ Gn or n a Gi i=1 Free profinite products are generally quite well-behaved, for instance for discrete groups K1 , K2 we have K̂1 ∐ K̂2 = K\ 1 ∗ K2 Free products are a special case of a graph of groups in which all edge groups are trivial. We now move to the general definition. Definition 5.2. A finite graph of profinite groups (X, G• ) consists of a finite graph X, a profinite group Gx for each x ∈ X, and two (continuous) monomorphisms ∂i : Gx → Gdi (x) for i = 0, 1 which are the identity when x ∈ V (X). We will often suppress the graph X and refer to ‘the graph of groups G’. Definition 5.3. Given a finite graph of profinite groups (X, G• ), choose a maximal subtree Y of X. A profinite fundamental group of the graph of groups with respect to Y consists of a profinite group H, and a map a a φ: Gx ∐ < te > → H x∈X e∈E(X) such that φ(te ) = 1 for all e ∈ E(Y ) 18 and φ(t−1 e ∂0 (g)te ) = φ(∂1 (g)) for all e ∈ E(X), g ∈ Ge and with (H, φ) universal with these properties. The profinite group H will be denoted Π1 (X, G). Note that in the category of discrete groups this is precisely the same as the classical definition as a certain presentation. The group so defined exists and is independent of the maximal subtree Y (see Section 5.2 of [RZ01]). In the classical Bass-Serre theory, a graph of discrete groups (X, G) gives rise to a fundamental group π1 (X, G) and an action on a certain tree T whose vertices are cosets of the images φ(Gv ) of the vertex groups in π1 (X, G) and whose edge groups are cosets of the edge groups. Putting a suitable topology and graph structure on the corresponding objects in the profinite world and proving that the result is a profinite tree, is rather more involved than the classical theory; however the conclusion is much the same. We collate the various results into the following theorem. Theorem 5.4 (See Section 5.3 of [RZ01]). Let (X, G) be a finite graph of profinite groups. Then there exists an (essentially unique) profinite tree S(G), called the standard graph of G, on which Π = Π1 (X, G) acts with the following properties. Set Π(x) = im(Gx → Π). • The quotient graph Π\S(G) is isomorphic to X. • The stabiliser of a point s ∈ S(G) is a conjugate of Π(ζ(s)) in Π, where ζ : S(G) → X is the quotient map. Conversely (see Section 5.4 of [RZ01]) an action of a profinite group on a profinite tree with quotient a finite graph gives rise to a decomposition as a finite graphs of profinite groups. However no analogous result holds when the quotient graph is infinite. In the classical theory one tacitly identifies each Gx with its image in the fundamental group π1 (X, G) of a graph of groups. In general in the world of profinite groups the maps φ : Gx → Π1 (X, G) may not be injective, even for simple cases such as amalgamated free products. We call a graph of groups injective if all the maps φ are in fact injections. Let (X, G) be a finite graph of abstract groups. We can then form a finite graph of profinite groups (X, Ĝ) by taking the profinite completion of each vertex and edge group of G. We have not yet addressed whether the ‘functors’ (X, G) → (X, Ĝ) → Π1 (X, Ĝ) and (X, G) → π1 (X, G) → π1\ (X, G) on a graph of discrete groups (X, G) yield the same result; that is, whether the order in which we take profinite completions and fundamental groups of graphs of groups matters. In general the two procedures do not give the same answer; we require some additional separability properties. Definition 5.5. A graph of discrete groups (X, G) is efficient if π1 (X, G) is residually finite, each group Gx is closed in the profinite topology on π1 (X, G), and π1 (X, G) induces the full profinite topology on each Gx . 19 Theorem 5.6 (Exercise 9.2.7 of [RZ00b]). Let (X, G) be an efficient finite graph of discrete groups. Then (X, Ĝ) is an injective graph of profinite groups and π1\ (X, G) ∼ = Π1 (X, Ĝ) In our case of interest, the above-quoted Theorem 2.4 of Wilton and Zalesskii may be rephrased as ‘the JSJ decomposition of a 3-manifold group is efficient’, and the profinite completion of our graph manifold group acts in a well-controlled fashion on a profinite tree. 6 The JSJ decomposition Definition 6.1. Let M be an aspherical 3-manifold with JSJ decomposition (X, M• ). The Seifert graph of M is the full subgraph of X spanned by those vertices whose associated 3-manifold is a Seifert fibre space. It will be denoted XSF . In this section we analyse the JSJ decomposition of an aspherical manifold, and show that ‘the Seifert-fibred part’ is a profinite invariant. Specifically we prove: Theorem 6.2. Let M , N be closed aspherical 3-manifolds with JSJ decompositions (X, M• ), (Y, N• ) respectively. Assume that there is an isomorphism ∼ d Φ : π[ 1 M → π1 N . Then there is an isomorphism ϕ : XSF = YSF such that ∼ \ π\ 1 Mx = π1 Nϕ(x) for every x ∈ XSF . If in addition M , N are graph manifolds then, after possibly performing an automorphism of πd 1 N , the isomorphism Φ induces an isomorphism of JSJ decompositions in the following sense: • there is a graph isomorphism ϕ : X → Y ; \ • Φ restricts to an isomorphism π\ 1 Mx → π1 Nϕ(x) for every x ∈ V (X) ∪ E(X). The proof will consist of an analysis of the Ẑ 2 -subgroups of G = π[ 1 M together with the normalisers of their cyclic subgroups. We maintain the above notations for the rest of the section. Additionally let S(G) be the standard graph of a graph of profinite groups (X, G• ), and let ζ : S(G) → X be the projection. Let Zv denote the canonical fibre subgroup of a vertex stabiliser Gv which is a copy of the profinite completion of some Seifert fibre space group. By abuse of terminology, we will refer to vertices of S(G) as major, minor or hyperbolic when the corresponding vertex stabiliser is the profinite completion of a major or minor Seifert fibre space group or a cusped hyperbolic 3-manifold. We will first show that the action on S(G) is 4-acylindrical. Remark. Wilton and Zalesskii use this fact in their paper [WZ10] for graph manifolds, as well as in [WZ17] and [HWZ12] more generally. Their proof does however contain a gap. Specifically, their version of Lemma 6.3 below only allows for conjugating elements gi in the original group π1orb O, rather than its profinite completion. There is a similar problem in the hyperbolic pieces, which we deal with in Lemma 6.6 below. 20 Lemma 6.3. Let O be a hyperbolic 2-orbifold, and let l1 , l2 be curves representorb ing components of ∂O. Let B = π\ 1 O, and let Ci be the closure in B of π1 li . g2 g1 Then for gi ∈ B, either C1 ∩ C2 = 1 or l1 = l2 and g2 g1−1 ∈ C1 . Proof. By conjugating by g1−1 we may assume that g1 = 1; drop the subscript on g2 = g. Note that C1 ∩ C2g is torsion-free, so it is sufficient to pass to a finite index subgroup N and show that C1 ∩ C2g ∩ N = 1. Because O is hyperbolic, it has some finite-sheeted regular cover O′ with more than two boundary components; then given any pair of boundary components, π1orb O′ has a decomposition as a free product of cyclic groups, among which are the two boundary components. Let N be the corresponding finite index normal subgroup of B. Note that for some set {hi } of coset representatives of N ∩ π1orb O in π1orb O (which give coset representatives of N in B), each C2hi is the closure of the fundamental group of a component of ∂O′ ; so set C2′ = C2hi where g = hi n for some n ∈ N . Furthermore, if two boundary components of O are covered by the same boundary component O′ , then they must have been the same boundary component of O; that is, if C1 ∩ N = C2′ ∩ N , then C1 = C2′ . Now the intersections of C1 , C2′ with N are free factors; that is, N = (C1 ∩ N ) ∐ (C2′ ∩ N ) ∐ F where F is a free product of cyclic groups (unless C1 = C2′ , when N = (C1 ∩ N ) ∐ F ). Let T be the standard graph for this free product decomposition of N . Then C1 ∩ N = Nv , C2′ ∩ N = Nw for vertices v, w ∈ T . The action on T is 0-acylindrical because all edge stabilisers are trivial; so for n ∈ N , the intersection n C1 ∩ C ′ 2 ∩ N = Nv ∩ Nn−1 ·w can only be non-trivial if v = n−1 · w, so that C1 ∩ N = C2′ ∩ N (hence C1 = C2′ ) and n ∈ C1 . We have reduced to the case where C2hi = C1 . The intersection of two distinct peripheral subgroups of π1orb O is trivial, and peripheral subgroups coincide with their normalisers in π1orb O. But π1orb O is virtually free, so by Lemma 3.6 of [RZ96], the intersection of their closures in B is also trivial, so if C2hi ∩ C2 6= 1, then C2hi = C2 , and hi normalises C2 ; hence it normalises the intersection with π1orb O, and so hi ∈ C2 = C1 as required. Lemma 6.4 (Proposition 5.4 of [WZ10]). Let L be a major Seifert fibre space with boundary, and let O be its base orbifold. Let H = πd 1 L, and Z be the canonical fibre subgroup of H. Let D1 , D2 be peripheral subgroups of H; that is, conjugates in H of the closure of peripheral subgroups of π1 L. Then D1 ∩D2 = Z unless D1 = D2 . Proof. Certainly Z is contained in the intersection D1 ∩D2 ; if D1 ∩D2 is strictly larger than Z, then the images C1 , C2 of D1 , D2 in B = H/Z intersect nontrivially. Hence by the previous lemma C1 = C2 , hence D1 = D2 . Lemma 6.5. Let e = [v, w] be an edge of S(G), where v, w are Seifert fibred. Then Zv × Zw ≤f Ge , and so Zv ∩ Zw = 1. Proof. After a conjugation in G, we may assume that e is an edge in the standard graph of the abstract fundamental group π1 M , i.e. Ge is the closure in G of 21 ∼ a peripheral subgroup of some π1 Mv . Because H\ 1 × H2 = Ĥ1 × Ĥ2 for groups H1 , H2 , the result now follows from the corresponding result in the fundamental group π1 M ; the canonical fibre subgroups are distinct direct factors of the edge group, which is therefore contains their product as a finite-index subgroup. Lemma 6.6. Let L be a hyperbolic 3-manifold with toroidal boundary. Let H = πd 1 L, and let D1 , D2 be peripheral subgroups of L; that is, conjugates in H of the closure of maximal peripheral subgroups of π1 L. Then D1 ∩ D2 = 1 unless D1 = D2 and, moreover, each Di is malnormal in H. Proof. Choose a basepoint for L and let P1 , . . . , Pn be the fundamental groups of the boundary components of L with this basepoint. These form a malnormal family of subgroups of π1 L and we wish to show that their closures are a malnormal family of subgroups of H. Suppose g ∈ H is such that P̂i ∩ P̂j g 6= 1 and suppose that i 6= j or g ∈ / P̂i . In the latter case let q : π1 L → Q be a map to a finite group such that under its extension q̄ : H → Q to H, the image of g does not lie in the image of P̂i ; otherwise take q to be the map to the trivial group. By Thurston’s hyperbolic Dehn surgery theorem (see [BP12]) we may choose slopes pk on the Pk such that Dehn filling along each slope gives a closed hyperbolic 3-manifold N ; moreover, we may choose such slopes with enough freedom to ensure that the image of P̂i ∩ P̂j g is infinite in H/≪p1 , . . . , pn ≫. The images of the Pk in this hyperbolic 3-manifold group π1 N are a malnormal family of subgroups. Now consider K0 = ker(q) ∩ ≪p1 , . . . , pn ≫ and its closure in H. Note that π1 L/K0 is a hyperbolic virtually special group; indeed on the finite-index subgroup ker(q) we have just Dehn filled to get a closed hyperbolic manifold. Furthermore the images of the Pk in π1 L/K0 are an almost malnormal family of subgroups. Then by Corollary 3.2 of [WZ17], their closures (i.e. the images of the P̂k in H/K̄0 ) are an almost malnormal family of subgroups of H/K̄0 . But since the maps to πd 1 N and the map q̄ both factor through the map H → H/K̄0 , we have that the images of P̂i and P̂jg intersect in an infinite subgroup, but i 6= j and the image of g does not lie in the image of P̂i . This contradiction completes the proof. Lemma 6.7. Let L be a hyperbolic 3-manifold with toroidal boundary. Let 2 H = πd 1 L and let A be a subgroup of H isomorphic to Ẑ . Then A is conjugate into a peripheral subgroup of H. Proof. This follows from the proof of Theorem 9.3 of [WZ17]. Proposition 6.8. The action of G = π[ 1 M on the standard graph S(G) is 4acylindrical. Proof. Take a path of length 5 consisting of edges e0 , . . . , e4 joining vertices v0 , . . . , v5 . Let Mi be the manifold Mζ(vi ) , where ζ : S(G) → X is the projection. If any of M1 , . . . , M4 is hyperbolic then the intersection of the two adjacent edge groups is trivial by Lemma 6.6. So assume all these Mi are Seifert fibre spaces. There are three cases to consider: Case 1 Suppose both M1 , M2 are major Seifert fibre spaces. Then by Lemma 6.4, Ge0 ∩ Ge1 = Zv1 and Ge1 ∩ Ge2 = Zv2 ; but Zv1 ∩ Zv2 is trivial. So T2 i=0 Gei is trivial. 22 Case 2 Suppose M1 is a major Seifert fibre space and M2 is a minor Seifert fibre space. Let g be an element of Gv2 r Ge1 . Then v3 = g · v1 is major and −1 Zv3 = Zvg1 . Then acting by g sends e1 to e2 and fixes v1 ; hence the intersection of all four edge groups, Zv1 ∩Ge2 ∩Zv3 , is a normal subgroup of G2 . Moreover, as the intersection of two direct factors of Ge2 , it is trivial or a maximal copy of Ẑ in Ge2 . Hence it is either trivial or is one of the two fibre subgroups of Gv2 . But the latter case is ruled out as neither of these fibre subgroups intersects Zv1 or Zv3 non-trivially. Case 3 Suppose v1 is minor. Then v2 is major. If v3 is major, then the argument of Case 1 applies. If v3 is minor, then v4 is major and relabelling i 7→ 5−i we are back in Case 2. Corollary 6.9. Let (X, M• ) be the JSJ decomposition of a graph manifold M , ∼ \ [ and let G• = π 1 M• . Let A be an abelian subgroup of G = π1 M . Then A = Zπ for some set of primes or A fixes some vertex of S(G). Proof. Apply Proposition 4.5. Having located the Ẑ 2 subgroups, we proceed to distinguish those making up the edge groups between Seifert fibred pieces from those ‘internal’ to the vertex group in which they are contained or adjacent to a hyperbolic piece. This will be accomplished using the normalisers and centralisers of cyclic subgroups. Recall that the centraliser of a subgroup H ≤ G is denoted ZG (H), and that NG′ (C) denotes the restricted normaliser of a procyclic subgroup as defined in Definition 4.6. Definition 6.10. A non-pathological torus in G is a copy A ≤ G of Ẑ 2 , not contained in any larger copy of Ẑ 2 , with the following property. For every conjugate Ag of A in G, either A ∩ Ag = 1, A ∩ Ag is a subgroup of Ẑ, or A = Ag . Definition 6.11. A procyclic subgroup C ∼ = Ẑ of G is major fibre-like if: • C is a direct factor of some non-pathological torus of G; • ZG (C) is not virtually abelian; and • C is maximal with these properties. The following result can be deduced from Lemma 6.4; however the following proof, being much more elementary, merits inclusion. Proposition 6.12. Let O be a hyperbolic 2-orbifold, and let c be an element orb of π1orb (O) representing a boundary component of O. Let B = π\ 1 O. Then the orb O generated by c is not contained in any strictly larger closed subgroup C ≤ π\ 1 Ẑ-subgroup of B. Hence any abelian subgroup of B containing C is C itself. Proof. Note that the quotient of Ẑ by any proper subgroup C ∼ = Ẑ is a direct product of finite groups, at least one of which is non-trivial; it follows that C is contained in some sub-Ẑ with index a prime p. Hence it suffices to show that c cannot be written as a pth power xp . If c has this property in some quotient of B, then it also has this property in B itself. Thus it suffices to find, for each 23 p, a finite quotient of π1orb O in which the image of c is not a pth power. We split into cases based on the topological type of O. Furthermore, by passing to a quotient, it suffices to deal with the cases where c is the only boundary component of O. Case 1 Suppose first that O either is orientable of genus at least 1 or that it is non-orientable with at least three projective plane summands; so that O has a punctured torus as a boundary-connected summand O = (T2 r ∗)#∂ O′ , and on passing to a quotient we may assume that O is a once-punctured torus, and c = [a, b] where a, b are free generators of the free group π1orb O. Suppose p 6= 2. Consider the mod-p Heisenberg group    1 ∗ ∗  Hp = 0 1 ∗ ≤ SL3 (Z/p)   0 0 1 and map to it by    0 1 0 0 , b 7→ 0 1 1 0 0 1 1 a 7→ 0 1 0 0  0 1 1 so that c = [a, b] maps to  1 0 0 1 0 0  1 0 1 Now in the Heisenberg group, the formula for an nth power is  n   1 x z 1 nx nz + (1 + 2 + · · · + (n − 1))xy 0 1 y  = 0 1  ny 0 0 1 0 0 1 so that in particular all pth powers vanish, noting that p is odd so divides 1 + · · · + (p − 1). So the image of c cannot possibly be a pth power. If p = 2, instead map to the mod-4 Heisenberg group H4 by the same formulae; then all squares have the form  1 x 0 1 0 0 2   z 1 2x 2z + xy y  = 0 1 2y  1 0 0 1 If this were to equal to image of c, then x and y would have to be even, so that 2x + xy would be even, and therefore not 1, a contradiction. So c cannot be a square in B either. Case 2 If O is a punctured Klein bottle, with possibly some cone points, then after factoring out the cone points we have that π1orb O is a free group on two generators a, b with c = a2 b2 . If p 6= 2 simply map to Z/p by 24 a 7→ 1, b 7→ 1, so that c 7→ 4 is not a multiple of p. If p = 2 then map to the mod-4 Heisenberg group H4 as above; this time the image of c is   1 2 0 0 1 2 0 0 1 If this were to  1 0 0 be a square 2  x z 1 1 y  = 0 0 1 0   2x 2z + xy 1 1 2y  = 0 0 1 0  2 0 1 2 0 1 then x, y would be odd, hence so would be 2z+xy which is thus non-zero. So the image of c is not a square. Case 3 The remaining cases are either discs with at least two cone points or Möbius bands with at least one cone point. After factoring out any excess cone points, we may assume π1orb O is either (Z/m) ∗ (Z/n) or (Z/m) ∗ Z, and c is expressed either as ab or ab2 in these generators. Consider the kernels K of the maps to (Z/m) × (Z/n) or Z/m respectively. Some power ck of c is then a boundary component of the cover corresponding to K, which is torsion-free hence yields one of the ‘high genus’ cases above; hence ck is not a pth power in K. If p is coprime to m, n then xp ∈ K if and only if x ∈ K, so ck is not a pth power in B either (hence neither is c itself). Finally if p divides one of m, n (without loss of generality, if p divides m), then mapping to the first factor sends c to 1, which is not divisible by p modulo m. Finally note that since B is a free product of cyclic groups, maximal abelian subgroups are (finite or infinite) procyclic. The proof is now complete. Proposition 6.13. If v is a major vertex of S(G), then ZG (Zv ) ≤ Gv and NG′ (Zv ) = Gv . Proof. The centraliser of Zv in G contains the non-abelian group ZGv (Zv ), an index 1 or 2 subgroup of Gv . By Proposition 4.7, the centraliser of Zv in G is contained in a vertex group Gw ; any two distinct vertex groups intersect in at most Ẑ 2 , so v = w and the centraliser of Zv in G is equal to the centraliser of Zv in Gv . Similarly for the reduced normaliser, noting that all of Gv is contained in NG′ (Zv ). Proposition 6.14. If e is an edge of S(G), then Ge is a non-pathological torus of G. Proof. Suppose first that e = [v, w] where v is a major vertex. First note that Ge is a maximal copy of Ẑ 2 . For if A = Ge were contained in a larger copy A′ of Ẑ 2 , then A′ would centralise Zv , hence be contained in Gv . The image of A′ in Gv /Zv would be abelian, containing a copy of Ẑ. By Proposition 4.5, maximal abelian subgroups of Gv /Zv are finite or projective as it is a free product of procyclic groups; so the image of A′ is a copy of Ẑ properly containing a boundary component. By Proposition 6.12, this is impossible. So these edge groups are maximal copies of Ẑ 2 . 25 Now suppose e = [v, w] where v is hyperbolic and w hyperbolic or minor, the only cases where e has no major endpoints. Assume A is contained in some strictly larger copy A′ of Ẑ 2 . Then A′ is contained in some vertex group Gu . The geodesic [u, v] thus has stabiliser containing A. If [u, v] has one edge then we are done as by Lemma 6.6 all edge groups are maximal in adjacent vertex groups. If [u, v] has more than two edges, recall that the peripheral subgroups of Gv are malnormal by Lemma 6.6; from which we deduce that [u, v] has at most two edges, those adjacent to the minor vertex w, and that A′ is contained in these edge groups. Thus A = A′ and again A is maximal. Suppose g ∈ G and that Ge ∩ Gge is not a subgroup of Ẑ. By the arguments in Proposition 6.8, an intersection of two edge groups is at most Ẑ unless the edges are equal or are the two edges incident to a minor vertex w. So either g −1 · e = e, whence g ∈ Ge and Gge = Ge , or g ∈ Gw and Ge is normal in Gw so that again Ge ∩ Gge = Ge . Proposition 6.15. If v is a major vertex of S(G), then Zv is a major fibre-like subgroup of G. Proof. Note that Zv is a direct factor of an edge group A = Ge (e = [v, w] ∈ S(G)) which is a non-pathological torus, and has centraliser which is not virtually abelian. It remains to show that Zv is maximal with these properties; but again, if it were contained in a larger procyclic subgroup C contained in a copy A′ of Ẑ 2 , this A′ would centralise Zv , hence lie in Gv . The image of A′ in Gv /Zv would then be infinite abelian, hence projective; but killing a non-maximal copy Zv of Ẑ inside A′ would introduce torsion. Hence Zv is major fibre-like. Proposition 6.16. Let C ∼ = Ẑ be a subgroup of G. If C is major fibre-like then C = Zv for some major vertex v. If C is contained in an edge group Ge then either C ≤ Zv for some (possibly minor) vertex v or ZG (C) ∼ = Ẑ 2 . Proof. If C is contained in an edge group, it suffices to replace C with a maximal copy of Ẑ such that C ≤ Ẑ ≤ Ge . Let A be a non-pathological torus containing C as a direct factor, choosing A = Ge when C is contained in an edge group. Note that A is contained in a vertex group by Corollary 6.9. Then C and hence its centraliser lie in a vertex group Gv . If the centraliser is not just A, then v is unique. If v is hyperbolic then A is a peripheral subgroup by Lemma 6.7; then if x ∈ ZG (C), then A∩Ax 6= 1 whence x ∈ A by malnormality. If v is minor, so that A is an index 2 subgroup of Gv , the result is easy; so suppose v is major. Note that, as a maximal abelian subgroup of Gv /Zv is procyclic, Zv is a direct factor of A, so that C × Zv is a finite-index subgroup of A unless C = Zv . So suppose C 6= Zv ; we will show that C is not major fibre-like, and that if C was in a boundary component, its centraliser is exactly A. Consider first the index 1 or 2 subgroup ZG (Zv ) = G′v ≤ Gv in which Zv is central. If x ∈ G′v ∩ ZG (C), then x commutes with both generators of both C and Zv ; so Ax ∩ A is at least the finite index subgroup C × Zv . Because A is non-pathological, Ax = A. Any action on A ∼ = Ẑ 2 which is trivial on a finite-index subgroup of A is trivial on all of A; so < x, A > is abelian. As before, taking the quotient gives an infinite abelian subgroup of Gv /Zv , which is thus procyclic. Hence < x, A > is a copy of Ẑ 2 ; by maximality this is A, hence x ∈ A and G′v ∩ ZG (C) = A. So ZG (C) is virtually abelian (with index 1 or 2), and C is not major fibre-like. 26 Let q : Gv → Gv /Zv be the quotient map. If C is a direct factor of a boundary component A = Ge other than Zv , then the image of C in B = Gv /Zv generates a finite-index subgroup of a peripheral subgroup D = q(Ge ) of the base orbifold. If x ∈ ZG (C), then from above either x ∈ Ge or x2 ∈ Ge . Then q(x) commutes with the finite-index subgroup of D generated by C; so Dq (x) intersects D non-trivially, and by Proposition 6.4 we find q(x) ∈ D so that x ∈ q −1 (D) = Ge . This last proposition shows that the property of being a canonical fibre subgroup Zv of a major vertex may defined intrinsically, as a ‘major fibre-like’ subgroup. We will use this to show invariance of the JSJ decomposition. Proof of Theorem 6.2. Let M , N be aspherical 3-manifolds with JSJ decompositions (X, M• ), (Y, N• ), let (X, G• ), (Y, H• ) be the corresponding graphs of profinite groups, and let S(G), S(H) be the standard graphs for these graphs of profid nite groups. Suppose there exists an isomorphism Φ : π[ 1 M = G → H = π1 N . Let ζ : S(G) → X be the projection. Let A be any maximal copy of Ẑ 2 in G. Then A is contained in a vertex group, and in the centraliser of any of its cyclic subgroups. In particular, if it has two major fibre-like subgroups, then it is contained in two distinct major vertex groups, hence A is some edge group Ge and ζ(e) ∈ XSF . Conversely, if Ge is any edge group where ζ(e) ∈ XSF , it has two major fibre-like subgroups; if e = [v, w] where v, w are major, then Zv , Zw are major fibre-like subgroups of Ge ; if w is minor, then it has another adjacent vertex v ′ with G[v,w] = G[v′ ,w] , and so Zv , Zv′ are major fibre-like subgroups of Ge . They are distinct, otherwise as in the proof of Proposition 6.8 they coincide with a fibre subgroup of Gw , giving a contradiction. Furthermore, the intersection of any three major vertex groups is at most cyclic, so Ge cannot contain three distinct major fibre-like subgroups. Now construct an (unoriented) abstract graph Γ as follows. The vertices of Γ are the major fibre-like subgroups Zv , and the edges are those maximal Ẑ 2 subgroups containing two major fibre-like subgroups, i.e. the edge groups Ge with ζ(e) ∈ XSF . The incidence maps are defined by inclusion. This incidence relation is not quite the same as incidence in S(G); two major vertex groups separated in S(G) by a minor vertex are now adjacent in Γ. We now rectify this. All maximal cyclic subgroups of an edge group Ge have either have centraliser Ẑ 2 or are Zv for some major or minor vertex v; so for each edge group Ge with a third maximal procyclic subgroup with centraliser larger than Ẑ 2 , subdivide the corresponding edge of Γ to get a new graph Γ′ with a vertex representing the minor vertex group whose canonical fibre subgroup is contained in Ge . Clearly Γ′ is isomorphic to ζ −1 (XSF ) as an abstract graph; the G-action on Γ′ induced from S(G) is determined by conjugation of the Zv . On the other hand, the graph Γ′ and G-action so constructed are invariants of the group, so the isomorphism Φ : G ∼ = H yields an equivariant isomorphism of Γ′ with the corresponding object for H; hence the quotient graphs XSF and YSF are isomorphic as claimed. Furthermore corresponding vertex stabilisers (i.e. the profinite completions of the Seifert fibred pieces of M and N ) are isomorphic. This completes the first part of the theorem. Now assume M , N are graph manifolds. Now Γ′ ∼ = S(G) as an abstract graph, hence we get an equivariant isomorphism Ψ between S(G) and S(H), in 27 the sense that Ψ(g · v) = Φ(g) · Ψ(v) for all g ∈ G, v ∈ V (S(G)). Note that this descends to an isomorphism X = G\S(G) ∼ = H\S(H) = Y We now check that the morphism of graphs thus constructed is in fact continuous, hence an isomorphism in the category of profinite graphs. For by Lemma 3.13, S(G) is the inverse limit of its quotients by finite index normal subgroups of G. However, for each such subgroup N , we know that Ψ induces a natural morphism of (abstract) graphs N \S(G) ∼ = Φ(N )\S(H) But these graphs, being finite covers of X and Y respectively (with covering groups G/N, H/Φ(N ) respectively) are finite, hence these morphisms are continuous; that is, we have isomorphisms of inverse systems S(G) ∼ N \S(G) ∼ Φ(N )\S(H) ∼ = lim = lim = S(H) ←− ←− so that our morphism Ψ is indeed continuous. Note that by Proposition 4.7, the restricted normaliser of each Zv is contained in a vertex group; as it contains Gv which is not contained in any edge group, we have that NG′ (Zv ) = Gv . We now have an equivariant isomorphism Ψ : S(G) → S(H) of profinite graphs such that ′ ′ (Φ(Zv )) = NH (ZΨ(v) ) = HΨ(v) Gv ∼ = Φ(Gv ) = Φ(NG′ (Zv )) = NH for v ∈ V (S(G)) and with each edge group the intersection of the adjacent vertex groups. This descends to an isomorphism X = G\S(G) ∼ = H\S(H) = Y such that corresponding vertices and edges of X and Y have isomorphic associated groups; that is, we have an isomorphism G ∼ = H of graphs of groups. The fundamental group of a graph of profinite groups is well-defined independently of any choice of maximal subtree of T and section T → S(G); so that, following an automorphism of H, we may assume that the isomorphism Φ sends each vertex group of G to the corresponding vertex group of H. See Section 5.2 of [RZ01] for details. 7 Graph manifolds versus mixed manifolds The results of the previous section are seen to give very good information about graph manifolds; however picking up the precise nature of any hyperbolic pieces that may exist seems rather more subtle. In this section we show that the profinite completion does detect the presence of a hyperbolic piece. This can be seen as an extension of [WZ17] in that we now know that the profinite completion determines which geometries arise in the geometric decomposition of a 3-manifold. 28 Theorem 7.1. Let M be a (closed) mixed or totally hyperbolic manifold and N be a graph manifold. Then π1 M and π1 N do not have isomorphic profinite completions. ∼ Proof. Let M, N have JSJ decompositions (X, M• ), (Y, N• ) and assume π[ 1M = ∼ d π1 N . Then by Theorem 6.2, XSF = YSF = Y which is connected as N is a graph manifold. Furthermore any finite-index cover of a graph manifold is a graph manifold and any finite-index cover of a mixed or totally hyperbolic manifold is mixed or totally hyperbolic. Hence any finite-index cover of M has connected (and non-empty) Seifert graph. We will show that this is impossible. Let M1 be a hyperbolic piece of M adjacent to XSF . Take a boundary torus T of M1 lying between M1 and a major Seifert fibred piece of M . (If M has only minor Seifert fibred pieces, it has a double cover with empty Seifert graph, which is forbidden). Note that some finite-sheeted cover of M1 has more than one boundary component which projects to T . The JSJ decomposition of M is efficient by Theorem A of [WZ10]; therefore some finite-sheeted cover M ′ of M induces a (possibly deeper) finite-sheeted cover M1′ of M1 , which will still have more than one boundary component projecting to T . One such boundary torus T ′ is now non-separating in M ′ . For all preimages of T are adjacent to a Seifert fibred piece of M ′ , so if T ′ were separating, the Seifert graph of M ′ would be disconnected, which is forbidden. Cut along T ′ , take two copies of the resulting 3-manifold, and glue these together to get a degree two cover M̃ of M ′ . Removing the two copies of M1′ from M̃ gives a disconnected manifold, each of whose components contains a Seifert fibred piece, so the Seifert graph of M̃ is disconnected as required. 8 Totally hyperbolic manifolds Theorem 6.2 does not give any information about those manifolds whose JSJ decomposition has no Seifert fibred pieces at all; we shall call such manifolds ‘totally hyperbolic’. In this section we show that the analysis in Section 6 does allow us to deduce some limited information about the JSJ decomposition of these manifolds, even without a way to detect what the vertex groups are. Specifically we will prove the following theorem. ∼ d Theorem 8.1. Let M , N be totally hyperbolic manifolds with G = π[ 1 M = π1 N and with JSJ decompositions (X, M• ), (Y, N• ). Then the graphs X and Y have equal numbers of vertices and edges and equal first Betti numbers. Proof. Note that by Proposition 4.5 and Lemma 6.7, the maximal copies of Ẑ 2 in G are precisely the conjugates of completions of the JSJ tori T of M . Thus immediately the profinite completion determines |E(X)| as the number of such conjugacy classes. The action of conjugation on the homology group H2 (G; Ẑ) being trivial, each such conjugacy class gives an element of H2 (G; Ẑ), the image of a generator of H2 (T ; Z) under the maps H2 (T ; Z) → H2 (M ; Z) = H2 (π1 M ; Z) → H2 (G; Ẑ) This element ξT is well-defined up to multiplication by an invertible element of Ẑ. Furthermore it is either primitive or zero since the classes in H2 (M ; Z) have 29 this property and H2 (G; Ẑ) ∼ H (G; Z/n) ∼ H (π M ; Z/n) ∼ = lim = lim = Ẑ b2 (M) ←− 2 ←− 2 1 where the middle isomorphism holds since 3-manifold groups are good in the sense of Serre (this is proved by a combination of the Virtual Fibring Theorem of Agol and Theorem B of Wilton-Zalesskii [WZ10]). See Proposition 6.5.7 of [RZ00b] for the inverse limit. Notice that the first Betti number of the graph X is equal to the maximal number of edges that can be removed without disconnecting the graph. On the level of the 3-manifold M , this equals the size of a maximal collection of JSJ tori that are together non-separating. A collection of these tori is non-separating if and only if the corresponding homology classes ηT1 , . . . , ηTk ∈ H2 (M ; Z) generate a subgroup of H2 (M ; Z) of rank k. The closure of a subgroup Zr of H2 (M ; Z) ∼ = Zn in H2 (G; Ẑ) ∼ = Ẑ n is isomorphic to Ẑ r . This closure is precisely the closed subgroup generated by the ζTi , hence the profinite completion detects whether a collection of tori is non-separating, hence the Betti numbers of X and Y must be equal. This completes the proof. 9 The pro-p JSJ decomposition Let p be a prime. We have focussed thus far on the full profinite completion of a graph manifold group because of the good separability results which hold for all graph manifolds, and because of the good profinite rigidity properties of Seifert fibre spaces. The pro-p topology on a graph manifold or Seifert fibre space is in general rather poorly behaved; indeed most are not even residually p. In this section we will note that when the pro-p topology is well-behaved, the arguments of the previous section still suffice to prove a pro-p version of Theorem 6.2. First let us discuss the pro-p topologies on Seifert fibre space groups. The following lemmas and proposition are well-known but are included for completeness. Lemma 9.1 (Grünberg [Grü57], Lemma 1.5). Let G be a group and suppose H is a subnormal subgroup of G with index a power of p. If H is residually p, so is G. Lemma 9.2. Let O be an orientable orbifold with non-positive Euler characteristic and such that each cone point of O has order a power of p. Then O has a subregular cover of degree a power of p which is a surface. Hence π1orb O is residually p. Proof. We will suppose that O has no boundary, as this is the more difficult case. We will construct a normal subgroup of π1orb O which is in some sense simpler than π1orb O; iterating this process will terminate in a subregular subgroup which is torsion-free, hence a surface group. A presentation for π1orb O is ni a1 , . . . , am , u1 , v1 , . . . , ug , vg api = 1, a1 · · · am [u1 , v1 ] · · · [ug , vg ] = 1 where the cone points have order pn1 ≤ pn2 ≤ · · · ≤ pnm . Consider the abelian p-group A = Z/(pn1 ) × · · · × Z/(pnm ) / (1, 1, . . . , 1) 30 and the map φ : π1orb O → A sending each generator ai to the ith coordinate vector and sending uj , vj to 0. Let K be the kernel of φ. Then if there are at least two cone points of maximal order pnm , no power of any ai (other than the identity) lies in the kernel of φ since no multiple of (1, 1, . . . , 1) has precisely one non-zero coordinate; hence K is torsion-free as required. If there is only one cone point, then since the Euler characteristic is nonpositive, g > 0 and we may pass to a regular cover of degree p with p cone points. Otherwise, if nm−1 < nm and there are at least two cone points, then any j torsion elements in K are conjugates of apm for j > 0, so that their order is at most pnm −1 ; thus the order of the maximal cone point of the cover corresponding to K is strictly smaller than that of O. Iterating this process will thus eliminate all cone points of O, giving the required subnormal subgroup. Proposition 9.3. Let p be a prime. Let M be a Seifert fibre space which is not of geometry S3 or S2 × R. Then π1 M is residually p if and only if all exceptional fibres of M have order a power of p, and M has orientable base orbifold when p 6= 2. That is, M has residually p fundamental group precisely when its base orbifold O is Z/p-orientable and has residually p fundamental group. Moreover, when this holds the following sequence is exact: \ orb 1 → Zp → π[ 1 M (p) → π1 O(p) → 1 where Zp is generated by a regular fibre of M . Proof. (⇐) By the above, such base orbifolds have a subregular cover of degree a power of p which is an orientable surface. Using this subregular cover we need only verify that if the base orbifold of M is an orientable surface Σ then the Seifert fibre space group is residually p. Since surface groups and free groups are p-good, for each n the map n 2 n H 2 (πd 1 Σ(p) ; Z/p ) → H (π1 Σ; Z/p ) is an isomorphism; hence the central extension n 1 → Z/pn → π1 (M )/ < hp >→ π1 Σ → 1 (where h represents a regular fibre of M ) is the pullback of a central extension n pn of πd 1 Σ(p) by Z/p ; whence each quotient π1 (M )/ < h > is residually p. This proves that π1 M is residually p and, moreover, that the canonical fibre subgroup is closed in the pro-p topology, so that we have the exact sequence as claimed. (⇒) Recall that a subgroup of a residually p group is residually p. Suppose first that O is non-orientable and p 6= 2. Then the subgroup of π1 M generated by g and h is Z⋊ < g > where the copy of Z is the fibre subgroup < h > and g acts by inversion. Then g 2 acts trivially on Z; but in any finite p-group quotient of π1 M , the subgroup generated by g 2 contains g, so the image of [g, h] vanishes in any p-group quotient; so π1 M is not residually p. Now let p be arbitrary and suppose some exceptional fibre a has order pn m n where m 6= 1 is coprime to p. Then if b = ap , in any finite p-group quotient the image of b is some power of the image of bm , which is central; so b is central in any finite p-group quotient of π1 M . So if π1 M were residually p, the centre of π1 M would contain b, which it does not. So all exceptional fibres of M have order pn for some n. 31 The pro-p completion of course does not determine the Seifert fibre space quite as strongly as the profinite completion. However once the fundamental group is residually p the techniques of [BCR16] and [Wil15], combined with the above proposition, yield the following surprisingly strong results: Theorem 9.4. Let O1 , O2 be 2-orbifolds whose fundamental groups are residorb orb ∼ ∼ \ ually p. If π\ 1 O1 (p) = π1 O2 (p) then O1 = O2 . Theorem 9.5. Let M1 , M2 be Seifert fibre spaces whose fundamental groups ∼\ \ are residually p. If π 1 M1 (p) = π1 M2 (p) then: • M1 , M2 have the same geometry; • M1 , M2 have the same base orbifold; and • the Euler numbers of M1 , M2 have equal p-adic norm. Moving on to graph manifolds, we must define what constitutes a ‘nice’ prop topology for a graph manifold group. A primary tool we used in Section 6 was the efficiency of the graph of groups representing a graph manifold group. There is a precisely analogous property in the pro-p world: Definition 9.6. A graph of discrete groups (X, G) is p-efficient if π1 (X, G) is residually p, each group Gx is closed in the pro-p topology on π1 (X, G), and π1 (X, G) induces the full pro-p topology on each Gx . Needless to say, this property does not hold for the majority of graph manifolds; in particular all the Seifert fibred pieces must be of the form specified in Proposition 9.3. However, the study of graph manifolds whose JSJ decomposition is p-efficient is by no means vacuous, as shown by the following theorem: Theorem (Aschenbrenner and Friedl [AF13], Proposition 5.2). Let M be a closed graph manifold and let p be a prime. Then M has some finite-sheeted cover with p-efficient JSJ decomposition. Notice that the profinite properties of graph manifolds used in Section 6 to prove Theorem 6.2 were: • efficiency of the JSJ decomposition; • Lemma 6.3 concerning intersections of boundary components; and • Proposition 6.12 concerning maximality of peripheral subgroups. For p-efficient graph manifolds, observe that in the proofs of the above propositions it suffices to use only regular covers of order a power of p and p-group quotients; and observe that the remainder of the results are applications of the above together with the theory of profinite groups acting on profinite trees, which works just as well (in fact better) in the category of pro-p groups. Hence the same arguments prove the following pro-p version of Theorem 6.2: Theorem 9.7. Let M , N be closed graph manifolds with p-efficient JSJ decompositions (X, M• ), (Y, N• ) respectively. Assume that there is an isomorphism d Φ : π[ 1 M (p) → π1 N (p) . Then, after possibly performing an automorphism of d π1 N (p) , the isomorphism Φ induces an isomorphism of JSJ decompositions in the following sense: 32 • there is an (unoriented) graph isomorphism ϕ : X → Y ; \ • Φ restricts to an isomorphism π\ 1 Mx(p) → π1 Nϕ(x) (p) for every x ∈ V (X)∪ E(X). 10 Graph manifolds with isomorphic profinite completions We will now address the question of when two graph manifold groups can have isomorphic profinite completions. We will first restrict attention to those graph manifolds whose vertex groups have orientable base space. Let us recall from the standard theory of graph manifolds how one obtains numerical invariants of a graph manifold M . Let the JSJ decomposition be (X, M• ). In this section we shall adopt the convention (from Serre) that each ‘geometric edge’ of a finite graph is a pair {e, ē} of oriented edges, with ē being the ‘reverse’ of e. Fix presentations in the standard form ha1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg , h | api i hqi , h central i for each Mx (x ∈ V X). This determines an ordered basis {h, ei } for the fundamental group of each boundary torus of Mx , where the final boundary component is described by e0 = (a1 · · · ar e1 · · · es [u1 , v1 ] · · · [ug , vg ])−1 Thus the gluing map along an edge e takes the form of a matrix (acting on the left of a column vector)   α(e) β(e) γ(e) δ(e) where γ(e), the intersection number of the fibre of d0 (e) with that of d1 (e), is non-zero by the definition of a graph manifold. The number γ(e) is welldefined up to a choice of orientation of the fibres of the two vertex groups. This matrix has determinant −1 from the requirement that the graph manifold be orientable. Once an orientation of the fibre and base are fixed, the number δ(e) becomes independent of the choice of presentation, modulo γ(e) (changing these orientations multiplies the matrix by −1). The ‘section’ of the fibre space determining δ(e) may be changed by a Dehn twist along an annulus which either joins two boundary components or joins the boundary component to an exceptional fibre. This however leaves the total slope X δ(e) X qi − τ (x) = γ(e) pi e:d0 (e)=x of the space invariant. Note also that these quantities are all invariant under the conjugation action of the group on itself, i.e. it does not matter which conjugate of each edge group we consider. Theorem 10.1. Let M , N be closed orientable graph manifolds with JSJ decompositions (X, M• ), (Y, N• ), where all major vertex spaces have orientable ∼ d base orbifold. Suppose π[ 1 M = π1 N and let φ : X → Y be the induced graph isomorphism from Theorem 6.2. 33 1. If X is not a bipartite graph, then M is homeomorphic to N via a homeomorphism inducing the graph isomorphism φ. 2. Suppose X is bipartite on vertex sets R, B. Then there exists an element κ ∈ Ẑ× such that the following conditions hold, for some choices of orientations of the fibres of each major vertex group of M or N : (a) For all e ∈ EX, we have γ(e) = γ(φ(e)) (b) For every vertex space of both M and N the total slope of that vertex is zero. (c1) For every vertex r ∈ R, (Mr , Nφ(r) ) is a Hempel pair of scale factor κ and for every edge e with d0 (e) = r we have δ(φ(e)) ≡ κδ(e) modulo γ(e). (c2) For every vertex b ∈ B, (Mb , Nφ(b) ) is a Hempel pair of scale factor κ−1 and for every edge e with d0 (e) = b we have δ(φ(e)) ≡ κ−1 δ(e) modulo γ(e). Remark. The conditions (a)-(c1) (or (c2)) in the above theorem have a rather neat interpretation in terms of the following object. Definition 10.2. Let M = (X, M• ) be a graph manifold with the given JSJ decomposition, and let x ∈ V X. Define the filled vertex space Mx of Mx as follows. For every edge e with d0 (e) = x, the fibre of Md1 (x) describes a meridian on the relevant boundary torus Te of Mv . There is a unique way to glue in a solid torus along Te with this meridian such that the fibring on Mv extends over the solid torus. Gluing in a solid torus in this way gives a closed Seifert fibre space Mx . Suppose that (Mr , Nφ(r) ) is a Hempel pair for scale factor κ, and for simplicity of notation suppose that Mr , Nφ(r) have the same base orbifold O. Now the filled vertex space Mr has an exceptional fibre with invariants (γ(e), −δ(e)) for each boundary torus e of M and has Euler number τ (e). Perform the same operation on Nφ(r) to obtain Nφ(r) . Then (a) becomes the statement that Mr , Nφ(r) still have the same base orbifold O, (b) states that both have Euler number zero, and (c1) states that they are still a Hempel pair! d Proof. Let Φ : π[ 1 M → π1 N be an isomorphism. By (the proof of) Theorem 6.2 \ we have an isomorphism φ : X → Y and isomorphisms Φx : π\ 1 Mx → π1 Nφ(x) for every x ∈ X. Choose some orientation of the fibres (i.e. generators of the fibre subgroups), giving an identification of the fibre subgroup with Ẑ. Then by Theorem 2.7 we may identify the base orbifolds of Mx and Nφ(x) in such a way that Φx splits as an isomorphism of short exact sequences 1 Ẑ ·λx 1 Ẑ π\ 1 Mx Φx π\ 1 Nφ(x) orb π\ 1 Ox 1 ψx orb π\ 1 Ox 1 where λx is some invertible element of Ẑ and ψx is an automorphism of B = µx orb π\ 1 O which sends each boundary component ei to a conjugate of ei and sends 34 each cone-point ai to a conjugate of aµi x , for some µ ∈ Ẑ× . That is, (Mx , Nφ(x) ) is a Hempel pair with scale factor λx /µx . Note that, given an orientation on M and of each fibre, the base orbifolds also inherit an orientation. First consider a major vertex x of X. As before, pick standard presentations of every major vertex group of M and N . Then the maps Φx induce a map   λx ρe 0 µx \ \ from π 1 Me to π1 Nφ(e) for each edge e with d0 (e) = x, where the ρe may be specified as follows. Let π1 Mx have presentation ha1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg , h | api i hqi , h central i and π1 Nφ(x) have presentation E D ′ p′ a1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg | ai i = hqi , h central where we use the same letters to denote various generators using the identification of the base orbifolds. Then we have Φx (ei ) ∼ ei µx hρei for each edge ei , where ∼ denotes conjugacy. For the remaining edge e0 = (a1 · · · ar e1 · · · es [u1 , v1 ] · · · [ug , vg ])−1 we have of necessity Φx (e0 ) ∼ e0 µx h−(ρe1 +···+ρes +ν1 +···νr ) where the νi are the unique elements of Ẑ such that µx qi′ = λx qi + νi pi or, in terms of the map Φx , given by Φx (ai ) ∼ ai µx hνi . These definitions of νi are equivalent due to the fact that Φx is an isomorphism. Hence we find X ρe = d0 (e)=x X λx qi X qi′ − µx pi pi (1) an analogue of the classic restrictions on Dehn twists taking one Seifert fibre space presentation to another. For minor pieces the isomorphism also induces a map on the single boundary component, this time represented by a diagonal matrix as the boundary component of the minor piece has a canonical basis (up to multiplication by ±1), where the second basis element is given by the unique maximal cyclic subgroup which is normal but not central. Equation (1) is still satisfied as all terms are zero. → commute with Φ Now, the fact that the gluing maps along any edge e = − xy forces the equation  α(φ(e)) γ(φ(e)) β(φ(e)) δ(φ(e))  =  λy 0 ρē µy 35  α(e) γ(e)  β(e) λx δ(e) 0 ρe µx −1 (2) to hold. To simplify notation, write α′ (e) = α(φ(e)) and so on, and suppress the edge e for the time being. In this notation we have  ′   −1  α β′ λx λy α + λ−1 [· · · ] x ρ̄γ = (3) −1 −1 γ ′ δ′ λ−1 µ−1 x µy γ x µy δ − λx µx µy ργ where the upper right entry is complicated and unimportant. The worried reader should note that both sides have determinant −1 and that the lower-left entry is not a zero-divisor in Ẑ; these considerations determine the last entry. ′ ′ Now we have λ−1 x µy γ = γ . Since γ, γ are non-zero elements of Z, this (by Lemma 2.2) forces λx = ±e µy . Consideration of the determinant yields λy = ±e µx ; that is, ±ē = ±e . Suppose that X admits a cycle of odd length. Then the above relations, tracked around this cycle, force λx = ±µx for some (and hence, by connectedness and the previous paragraph, every) vertex x. Here the ± sign is independent of x, so after changing the orientation on M we may assume it is 1. But then (Mx , Nφ(x) ) are a Hempel pair of stretch factor λx /µx = 1; that is, they are isomorphic Seifert fibre spaces. It follows that if we can find integers re ∈ Z for every edge such that  α(φ(e)) γ(φ(e)) β(φ(e)) δ(φ(e))  =  1 0 rē 1  α(e) γ(e)  β(e) 1 δ(e) 0 re 1 −1 and with these re realisable by Dehn twists- that is, with X re = d0 (e)=x X qi X q ′ i − pi p′i then π1 M , π1 N are isomorphic. But since for each edge we have ′ δ − µ−1 x ργ = δ the numbers re = µx−1 ρe are in fact integers by Lemma 2.2. Equation (1) now states that these re are actually realisable by Dehn twists. Hence M and N are homeomorphic (by a homeomorphism covering φ) and we have proved the theorem in the case when X is not bipartite. Now take X bipartite, on two sets R and B. We will first take care of the signs ±e by changing the fibre orientations of certain vertex groups of N . Pick some basepoint x0 ∈ R and a maximal subtree T of X and, moving outward from the basepoint along T , change such fibre orientations as are required to force ±e = + for every edge e of T . Now define λ = λx0 , µ = µx0 . We now have λr = λ, µr = µ, λb = µ, µb = λ for all vertices r ∈ R, b ∈ B. For every remaining edge e (with d0 (e) = r ∈ R and d1 (e) = b ∈ B, say) we have λ = λr = ±e µb = ±e λ, whence ±e = + for all e. → we have γ(φ(e)) = λ−1 µ γ(e) = Now define κ = λ/µ. For all edges e = − xy y x γ(e), so condition (a) of the theorem holds. By construction of κ and the matrix 36 equation (3), properties (c1) and (c2) also hold. Finally for any x ∈ R we have τ (φ(x)) = X δ(φ(e)) X qi′ − γ(φ(e)) p′i X X q′ κδ(e) − µ−1 x ρe γ(e) i − γ(e) p′i X κδ(e) X qi − κ = κτ (x) γ(e) pi d0 (e)=x = d0 (e)=x = d0 (e)=x where the deduction of the last line uses equation (1). A similar equation holds for vertices in B. Now (again by Lemma 2.2) this forces either κ = ±1 when, as in the non-bipartite case, M and N are isomorphic; or it forces τ (x) = τ (φ(x)) = 0 for all x, i.e. we have condition (b) of the theorem. This completes the proof in this direction. The above arguments make it clear that, unless graph manifolds are to be rigid, we must be able to realise non-trivial values of the quantity ‘µx ’, else κ would have to be ±1. That is, we must be able to find exotic automorphisms of type µ. The term ‘exotic automorphism’ was defined in Definition 2.6. We recall it here for convenience: Definition 2.6. Let O be an orientable 2-orbifold with boundary, with fundamental group B = ha1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg | api i i where the boundary components of O are represented by the conjugacy classes of the elements e1 , . . . , es together with e0 = (a1 · · · ar e1 · · · es [u1 , v1 ] · · · [ug , vg ]) −1 Then an exotic automorphism of O of type µ is an automorphism ψ : B̂ → B̂ such that ψ(ai ) ∼ aµi and ψ(ei ) ∼ eµi for all i, where ∼ denotes conjugacy in B̂. Similarly, let O′ be a non-orientable 2-orbifold with boundary, with fundamental group B ′ = ha1 , . . . , ar , e1 , . . . , es , u1 , . . . , ug | api i i where the boundary components of O′ are represented by the conjugacy classes of the elements e1 , . . . , es together with e0 = a1 · · · ar e1 · · · es u21 · · · u2g −1 Let o : B̂ ′ → {±1} be the orientation homomorphism of O′ . Let σ0 , . . . , σs ∈ {±1}. Then an exotic automorphism of O′ of type µ with signs σ0 , . . . , σs is an automorphism ψ : B̂ ′ → B̂ ′ such that ψ(ai ) ∼ aµi and ψ(ei ) = (eσi i µ )gi for all i where o(gi ) = σi for all i. Theorem 10.3 ([Bel80], see also Lemma 9 of [GDJZ15]). A sphere with three discs removed admits an exotic automorphism of type µ for every µ ∈ Ẑ× . 37 We will now extend this to all 2-orbifolds with boundary, and then describe the automorphisms of the profinite completions of Seifert fibre space groups that we will use. Proposition 10.4. For every n, a sphere with n discs removed admits an exotic automorphism of type µ, for every µ ∈ Ẑ× . Proof. The proof is by induction on n, starting at n = 3. Suppose that ψn−1 is an exotic automorphism of an (n − 1)-holed sphere Sn−1 ; by applying an inner automorphism we may assume that some boundary loop e0 is sent by ψn−1 to precisely eµ0 . Let ψ3 be an exotic automorphism of type µ of a 3-holed sphere S3 . Let the fundamental group of S3 be generated by a, b; again we may assume that for the third boundary component E = (ab)−1 we have ψ3 (E) = E µ . Now gluing e0 to E produces an n-holed sphere Sn with fundamental group G = π1 Sn−1 , π1 S3 | E = e−1 0 By construction, defining ψn : Ĝ → Ĝ by ψn−1 and ψ3 on the two vertex groups of the amalgam gives a well-defined map from Ĝ to Ĝ to itself. This map is an isomorphism by the universal property of amalgamated free products (or because Ĝ is Hopfian). We now have an exotic automorphism ψn as required. Proposition 10.5. Let O be an orientable 2-orbifold with boundary. Then O admits an exotic automorphism of type µ for any µ ∈ Ẑ. Moreover this automorphism may be induced by an automorphism of the orbifold O̊ obtained from O by removing a small disc about each cone point. Proof. Let the fundamental group of O have presentation B = ha1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg | api i i with notation as in Definition 2.6 and let F be a discrete free group of rank r + s + 2g on a generating set {a1 , . . . , ar , e1 , . . . , es , v1′ , v1 , . . . , vg′ , vg } realised as the fundamental group of an appropriately punctured sphere S. Let ψ be an exotic automorphism of S of type µ and let µ ψ(vi ) = (viµ )gi , ′ ψ(vi′ ) = (vi′ )gi Let G be the fundamental group of O̊ and write G as an iterated HNN extension F, u1 , . . . , ug | vi′ = (vi−1 )ui Then we may extend ψ over the iterated HNN extension Ĝ by setting ψ(ui ) = gi−1 ui gi′ Note that the map ψ so defined is actually a surjection, by the standard criterion for HNN extensions- we have a surjection on the vertex group and, on factoring out the vertex group, an epimorphism of free groups (in this case the 38 identity). Since all finitely generated profinite groups are Hopfian, we do have an isomorphism witnessing the fact that O̊ admits an exotic automorphism of type µ. Note that ui does not represent a boundary component of O, so it is of no concern that its conjugacy class is not preserved. Note that ψ preserves the normal subgroup generated by the api i , so descends to an automorphism of the quotient group of Ĝ by the normal subgroup generated by these elements. This quotient group is precisely the profinite completion of the fundamental group of O as required. Proposition 10.6. Let O be a non-orientable 2-orbifold with s + 1 boundary components. Let µ ∈ Ẑ× and let σ0 , . . . , σs ∈ {±1}. Then O admits an exotic automorphism of type µ with signs σ0 , . . . , σs ∈ {±1}. Moreover this automorphism may be induced by an automorphism of the orbifold O̊ obtained from O by removing a small disc about each cone point. Proof. Let the fundamental group of O′ be B ′ = ha1 , . . . , ar , e1 , . . . , es , u1 , . . . , ug | api i i with notation as in Definition 2.6. Write B ′ as an amalgamated free product a1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg | api i , u2i = vi Let F be a free group on r + s + g generators with generating set {a1 , . . . , ar , e1 , . . . , es , v1 , . . . , vg } considered as the fundamental group of a (r + s + g + 1)-punctured sphere S. Take an exotic automorphism of S of type µ and extend over the amalgam F̂ ′ = a1 , . . . , ar , e1 , . . . , es , u1 , v1 , . . . , ug , vg |, u2i = vi by sending each ui to (uµi )gi , where ψ(vi ) = (viµ )gi . Note that all conjugating elements gi lie in the completion of the fundamental group of the orientable surface S, which is contained in the kernel of the orientation homomorphism. To introduce the signs σi we may compose with automorphisms induced by automorphisms of the discrete group F ′ . Of course it suffices to change the signs one at a time. For instance to realise σ0 = −1 we may compose with the map given by 2 vg 7→ (a1 · · · ar e1 · · · es v12 · · · vg−1 )−1 vg−1 and by the identity on all other generators. This sends e0 = 7→ (a1 · · · ar e1 · · · es v12 · · · vg2 )−1 2 vg−1 (a1 · · · ar e1 · · · es v12 · · · vg−1 )−1 vg−1 = 2 vg a1 · · · ar e1 · · · es v12 · · · vg−1 vg = −1 vg e−1 0 vg −1 as required. Finally factoring out the relations api i gives the required exotic automorphism of O′ . 39 Theorem 10.7. Let M , N be orientable Seifert fibre spaces. Suppose that (M, N ) is a Hempel pair with scale factor κ = λ/µ for some λ, µ ∈ Ẑ× . Then we may identify the base orbifolds of M and N with the same O and choose ‘standard form’ presentations E D G = π1 M = a1 , . . . , ar , e1 , . . . , es , u1 , . . . , h | api i hqi , hg = ho(g) and E D ′ H = π1 N = a1 , . . . , ar , e1 , . . . , es , u1 , . . . , h | ai pi hqi , hg = ho(g) for the fundamental groups where qi′ is congruent to λµ−1 qi modulo pi and where o is the orientation homomorphism (see Definition 10.8 below). Let ρ0 , . . . , ρs be any elements of Ẑ such that X ρi = λ X qi X q′ i −µ pi pi (4) and let σ0 , . . . , σs ∈ {±1}. Suppose that all σi are +1 if the base orbifold is orientable. Let B = π1orb O. Then there exists an isomorphism of short exact sequences Ẑ 1 Ĝ Ψ ·λ Ẑ 1 B̂ Ĥ 1 ψ B̂ 1 where ψ is an exotic automorphism of type µ and where the map on each boundary component is described by Ψ(h) = hλ , Ψ(ei ) = (eσi i µ )gi hρi for some gi ∈ Ĥ mapping to σi under the orientation homomorphism on B̂. Proof. Define θi to be the unique element of Ẑ such that µqi′ = λqi + θi pi and note that the hypothesis of the theorem forces X X ρi + θj = 0 Let ψ̃ be an exotic automorphism of O r (nbhd of cone points) of type µ as in Proposition 10.5 or 10.6 such that ψ̃(ai ) = (ai µ )fi , ψ̃(ei ) = (ei σi µ )gi Let ι be the natural homomorphism to Ĥ from the free profinite group on the generators {ai , ei , ui , (vi )}. As in Propositions 10.5 and 10.6 the map ψ̃ induces an exotic automorphism of O. Now define Ψ : Ĝ → Ĥ as follows: Ψ(h) = hλ , Ψ(ai ) = ιψ̃(ai )hθi , 40 Ψ(ei ) = ιψ̃(ei )hρi and by ιψ̃ on the remaining generators. This map Ψ is well-defined by the definition of the θi and is an isomorphism as it induces isomorphisms on both fibre and base. It has all the advertised properties by construction, except possibly the condition on Ψ(e0 ). For O non-orientable we have Ψ(e0 ) = = Ψ(a1 · · · ar e1 · · · es u21 · · · u2g )−1  −1 X X  ιψ̃(a1 · · · u2g )h∧ θi + ρi  i6=0 = ιψ̃(e0 )hρ0 = (eσ0 0 µ )g0 hρ0 as required, noting that all elements ιψ̃(u2i ) et cetera commute with h. The case of orientable O is similar. Definition 10.8. If Mv is a closed Seifert fibre space, there is an orientation \ homomorphism from π 1 Mv to {±1} with kernel the centraliser of the canonical fibre subgroup. Let Mvor be the orientation cover, i.e. the cover of Mv corresponding to this subgroup. If M is a graph manifold with JSJ decomposition (X, M• ), let M or be the regular cover of M induced by taking the orientation cover of each major vertex with non-orientable base orbifold. Denote the JSJ decomposition by (X or , M•or ). Note that, since every loop in X may be realised by a loop in M which lifts to M or , the graph X is bipartite if and only if X or is bipartite, and the bipartition on X lifts to that on X or . Also note that (Mv )or = (Mvor ) where the bar denotes the filled vertex space. Suppose that we have two graph manifolds M and N be graph manifolds with JSJ decompositions (X, M• ) and (Y, N• ), and a graph isomorphism φ : X → Y taking vertices with non-orientable base orbifold to vertices with non-orientable base orbifold, and major vertices to major vertices. There is also a graph isomorphism φor : X or → Y or covering φ. If there is a homeomorphism of M or with N or covering the map φor , then M and N are homeomorphic. For the fact that the graph isomorphism covers φ and that the different sorts of vertices match up correctly implies that the Z/2 actions on each vertex space of M or and N or are matched up by this homeomorphism (or at least, one isotopic to it). We will now move towards the final theorem governing the profinite completions of graph manifold groups. As in the discussion preceding Theorem 10.1, choosing a generator of the fibre subgroup of each vertex group allows us to define a matrix representing the gluing maps on each edge e. Before this matrix was independent under conjugacy of the edge group. When base orbifolds can be non-orientable, all these invariants are independent of conjugacy only up to sign (unless both adjacent vertex groups have orientable base). The reader should not then be unduly surprised by the presence of sign indeterminacy in the following theorem- it is a consequence of ambiguities in the graph manifolds themselves, rather than anything mysterious concerning the profinite completions. Also note that the definition of ‘total slope’ only involved the ratios δ/γ so is well-defined. Theorem 10.9. Let M and N be graph manifolds with JSJ decompositions (X, M• ) and (Y, N• ) respectively. 41 1. If X is not bipartite, then π1 M is profinitely rigid. 2. If X is bipartite, on two sets R and B, then π1 M and π1 N have isomorphic profinite completions if and only if, for some choices of generators of fibre subgroups, there is a graph isomorphism φ : X → Y and some κ ∈ Ẑ× such that: (a) For each edge e of X, γ(φ(e)) = ±e γ(e), where the sign is positive if both end vertices of e have orientable base. (b) The total slope of every vertex space of M or N vanishes (c1) If d0 (e) = r ∈ R, δ(φ(e)) = ±e κδ(e) modulo γ(e), and (Mr , Nφ(r) ) is a Hempel pair of scale factor κ. (c2) If d0 (e) = b ∈ B, δ(φ(e)) = ±e κ−1 δ(e) modulo γ(e), and (Mb , Nφ(b) ) is a Hempel pair of scale factor κ−1 . Remark. As in Theorem 10.1, these conditions (a)-(c1) are almost equivalent to the requirement that the filled manifolds Mr and Nφ(r) form a Hempel pair. The only difference is that forming the filled manifold forgets the orientation of the fibre of the adjacent manifold; hence it would not guarantee that the signs may be fixed as in the final part of (a). This is a necessary condition, as was seen in Theorem 10.1. Proof. We will first deduce the ‘only if’ direction from Theorem 3.13. Let d Ψ : π[ 1 M → π1 N be an isomorphism and let φ : X → Y be the induced graph isomorphism. Since the isomorphism Ψ preserves centralisers, there is an induced isomorphism or → π or \ Ψ : π\ 1M 1N and an induced isomorphism φor : X or → Y or which covers φ. Suppose first that X is not bipartite. Then neither is X or , so by Theorem 10.1 there is a homeomorphism M or → N or covering φor . By the comments following Definition 10.8, it follows that M is homeomorphic to N . Now suppose that X is bipartite. We claim that the conclusion of Theorem 10.1 applied to M or and N or immediately forces the equations in (a)-(c2) to hold. For some choices of fibre orientations of the vertex spaces in the covers give the equations in the theorem statement for evey lift of an edge e of X, and different lifts of e have values of γ, δ et cetera equal to those of e, up to a choice of sign. Hence all the equations of the statement hold up to sign. It only remains to show that we may fix the signs on edges between two spaces of orientable or base as in (a). Consider the graphs AM and Aor M obtained from X and X by removing all major vertices with non-orientable base, and all preimages of those vertices. Of course, AM contains all the edges we are concerned with. The components of Aor M are homeomorphic copies of the components of A. Similarly or define AN and Aor and N or as in N . So choosing orientations on the fibres of M Theorem 10.1 gives a consistent choice of fibre orientations on the vertex spaces each component of AM or AN satisfying (a), simply by choosing some lift of the component to (for example) Aor M and inheriting orientations from there. Hence the theorem is true in this case as well. Now let us turn our attention to the ‘if’ direction of (2). Suppose that M and N are as in the conditions of that theorem. We will build a more or less explicit 42 isomorphism of profinite groups, defined with respect to a presentation of π1 M . We say ‘more or less’ explicit as we cannot describe precisely the conjugating elements in exotic automorphisms of orbifolds. This unfortunately requires a small hurricane of notation. First let us describe the presentations that we will use. We will use primes to denote the invariants γ(e), δ(e) et cetera deriving coming from N as opposed to M . That is, γ ′ (e) = γ(φ(e)). We may as well identify X and Y using the isomorphism φ. Choose a maximal subtree T in X. We may also identify the base orbifolds of Mx , Nx . Fix some presentation for each such orbifold. We will use the same letters to denote the generating sets of π1 Mx , π1 Nx in a presentation coming from some presentation for the orbifold group, with hx denoting the fibre subgroup (with the choice of generator in the theorem statement), and with the letter e denoting the element describing a meridian on the boundary torus if x representing the edge e (with d0 (e) = x). The meridian on the other vertex group adjacent to e will then be denoted ē, being e with the opposite orientation. Then the conditions of the theorem, and the definitions of the invariants involved, specify the relations in π1 M and π1 N coming from each edge e. For instance, for an edge e from x to y we have relations hx(te ) = hα(e) ēγ(e) , y e(te ) = hyβ(e) ēδ(e) in π1 M , where (te ) is either the identity if e ∈ T or a stable letter for the HNN extension over e if e ∈ / T . Similarly in π1 N we have ′ (e) γ hx(te ) = hα ē y ′ (e) , e(te ) = hyβ ′ (e) δ ′ (e) ē Now that we have fixed all the fibre orientations and a presentation, all these numbers become well-defined. To unify treatment of vertices in R and B, define λr = κ, µr = 1 for r ∈ R and λb = 1, µb = κ for b ∈ B. We therefore also have a well-defined sign ±e and well-defined ρ(e) ∈ Ẑ for each edge e such that γ ′ = ±e γ, µx δ ′ = ±e (λx δ − ργ) (5) when d0 (e) = x. The existence of ρ is guaranteed by (c1) or (c2), and its uniqueness from the fact that γ is not a zero-divisor in Ẑ. Note that, by inverting the relations above, we find ±ē = ±e and α(e) = −δ(ē) so that µy α′ = ±e (λy α + ρ̄γ) (6) for d1 (e) = y, where ρ̄(e) = ρ(ē). Finally for each edge e define σe ∈ {±1} as follows. If x = d0 (e) has orientable base, set σe = +1. If x ∈ R has non-orientable base, set σe = ±e 1. If x ∈ B has non-orientable base, set σe = ±e 1 if d1 (e) has orientable base, and +1 otherwise. Note that σe σē = ±e 1. [ Now define an isomorphism Ψx : π\ 1 Mx → π1 Nx using Theorem 10.7 with input values λx , µx , {ρ(e)}, {σe }. The condition (b) guarantees that the hypothesis (4) of Theorem 10.7 is satisfied because: X X λx δ(e) X ±e µx δ ′ (e) − ρi = γ(e) γ(e) X δ ′ (e) X δ(e) − µx = λx γ(e) γ ′ (e) X q′ X qi i − µx = λx pi p′i 43 We are at long last in a position to build the promised isomorphism Ω from [ π1 M to πd 1 N . First we will build a map defined on the vertex groups on the tree T , then deal with HNN extensions. Let G• = π1 M• and H• = π1 N• . Choose some basepoint t ∈ T and define Ω = Ψt on Ĝt . Order the vertices of X as {x1 , . . . , xn } starting with t such that each {x1 , . . . , xm } spans a subtree Tm of T . Suppose inductively that we have defined Ω coherently on the tree of groups (Tm , Ĝ• ) such that Ω is defined on Ĝxi by Ω(g) = Ψxi (g)fi where fi is an element of Ĥ of the form fi = ki ki−1 · · · k1 where kj ∈ Ĥj for j ≤ i. There is an edge e of T with d0 (e) = x = xj ∈ {x1 , . . . , xm } and with d1 (e) = y = xm+1 . By construction of Ψx there is ge ∈ Ĥx such that ge evaluates to σe under the orientation homomorphism on Ĥx and Ψx (e) = (eσe µx )ge hρxe = (eσe µx hσxe ρe )ge Ψx (hx ) = hλxx , Similarly we have gē ∈ Ĥy evaluating to σē under the orientation homomorphism, so that Ψy (hy ) = hλy y , Ψy (ē) = (ēσē µy hyσē ρ̄e )gē −1 Define Ω on Ĝy by Ω(g) = Ψy (g)gē ge f . Note that the conjugating element fm+1 = gē−1 ge f is of the form specified above. We must now check that this map is well-defined- that is, we must check that the relations in π1 M given by this edge are mapped to the trivial element of Ĥ = πd 1 N under Ω. This calculation is essentially the same as the matrix calculations leading to equation (3). To reassure the reader that all the signs check out, and to atone for my sins, I will give the computations anyway. The reader should note that throughout we will be heavily using the fact that, for example, every conjugate of e commutes with hx . We will drop e from much of the notation, adding bars when necessary (e.g. σē will be written σ̄). α γ Ω(h−1 x hy ē ) −1 = α γ gē fj Ψx (h−1 x ) Ψy (hy ē ) ∼f −1 y x (ēγ σ̄µy hyσ̄ρ̄γ )gē hαλ h−λ y x ∼g−1 e x σ̄αλy +σ̄ ρ̄γ γ σ̄µy hy ē h−σλ x = = γ −σλx σ̄αλy +σ̄ ρ̄γ γ σ̄µy hy ē (hα y ē ) ∧ ′ hy {−σα λx + σ̄αλy + σ̄ ρ̄γ}ē∧ {−σλx γ ′ + σ̄µy γ} = 1 ′ ge fj gē−1 ge ′ where ∼g denotes conjugation by g. In the last line we use the definitions (5), (6) of ρ and ρ̄ and the equalities σσ̄ = ±e 1 and λx = µy . Secondly, we have Ω(e−1 hβy ēδ ) = ∼f −1 ∼ge−1 = −1 Ψx (e−1 )fj Ψy (hβy ēδ )gē ge fj ge βλy δσ̄µy σ̄ ρ̄δ gē gē−1 ge e−σµx h−σρ hy ) hy (ē x  ′ ′ −σµx  ′ ′ −σρ γ hyσ̄βλy +σ̄ ρ̄δ ēδσ̄µy hα hβy ēδ y ē hy ∧ {−β ′ σµx − α′ σρ + σ̄βλy + σ̄ ρ̄δ} · ē∧ {−σγ ′ ρ − σµx δ ′ + δσ̄µy } 44 Now the exponent of ē vanishes by (5). To deal with the exponent of hy , recall that as M and N are orientable, maps on boundary tori have determinant −1. Hence βγ = 1 + αδ, and β ′ γ ′ = 1 + α′ δ ′ . Since −σγ ′ is not a zero-divisor in Ẑ, it suffices to check that the exponent vanishes when multiplied by −σγ ′ . −σγ ′ (Exponent of hy ) = β ′ γ ′ µx + α′ γ ′ ρ − βγ ′ σσ̄λy − δγ ′ σσ̄ ρ̄ = (1 + α′ δ ′ )µx − (1 + αδ)λy + α′ γ ′ ρ − δγ ρ̄ = ±e α′ (λx δ − ργ) − αδλy ±e α′ γρ − δγ ρ̄ = ±e δ (λx α′ ±e (−αλy − γ ρ̄)) = 0 where we have freely used (5) and (6), as well as µx = λy . Thus all relations are satisfied and we have defined Ω on the tree of groups (T, Ĝ• ). It remains to define Ω on the stable letters te for the HNN extensions over remaining edges. Let e be such an edge. By construction there are elements ge ∈ Hx , gē ∈ Hy and elements fx , fy in the subgroup generated by the vertex groups such that Ω|Ge = (Ψx )fj , Ψx (e) = (eσe µx hσxe ρ )ge and similarly for y. Then set Ω(te ) = fx−1 ge−1 te gē fy We must of course check that the relations on the edge e are satisfied. The verification of this is, up to conjugacy, almost identical with the verifications above and we will not punish the reader by writing it a second time. We now have a well-defined homomorphism Ω : Ĝ → Ĥ. We may check that is an isomorphism by a suitable application of the universal property of a graph of profinite groups. However, since Ω is not quite a morphism of graphs of groups on the nose- having various conjugating elements involved- we instead give another argument. Recall that Ĥ is generated by its vertex groups and the stable letters te . By induction, each vertex group Ĥxj lies in the image of Ω, g f since by construction the subgroup Ĥxje j lies in this image- where ge ∈ Ĥj and where fj is an element of Ĥ of the form fj = kj kj−1 · · · k1 where ki ∈ Ĥi for i ≤ j. By induction all the ki (i < j) are in the image of Ω, hence so is Ĥxgje fj = Ĥxgje kj = Ĥxj Finally, since we have Ω(te ) = l′ te l where l, l′ are in the subgroup generated by the Ĥi , it follows that each stable letter te is in the image of Ω. So Ω is surjective. Finally note that by symmetry we may also construct a surjective homomorphism Ω′ : Ĥ → Ĝ. Both groups being Hopfian, this forces both Ω and Ω′ to be isomorphisms. The proof is complete. 45 References []AF13 Matthias Aschenbrenner and Stefan Friedl. 3-manifold groups are virtually residually p. American Mathematical Society, 2013. []BCR16 Martin R. Bridson, Marston DE Conder, and Alan W. Reid. Determining Fuchsian groups by their finite quotients. Israel Journal of Mathematics, 214(1):1–41, 2016. []Bel80 G. V. Belyı̆. On Galois extensions of a maximal cyclotomic field. Mathematics of the USSR-Izvestiya, 14(2):247, 1980. []BF15 Michel Boileau and Stefan Friedl. The profinite completion of 3manifold groups, fiberedness and the Thurston norm. arXiv preprint arXiv:1505.07799, 2015. []BKS87 Robert G. Burns, Abe Karrass, and Donald Solitar. A note on groups with separable finitely generated subgroups. Bulletin of the Australian Mathematical Society, 36(01):153–160, 1987. []BP12 Riccardo Benedetti and Carlo Petronio. Lectures on hyperbolic geometry. Springer Science & Business Media, 2012. []BR15 Martin R. Bridson and Alan W. Reid. Profinite rigidity, fibering, and the figure-eight knot. arXiv preprint arXiv:1505.07886, 2015. []Bri07 Matthew G. Brin. Seifert fibered spaces: Notes for a course given in the spring of 1993. arXiv preprint arXiv:0711.1346, 2007. []BRW16 Martin R. Bridson, Alan W. Reid, and Henry Wilton. Profinite rigidity and surface bundles over the circle. arXiv preprint arXiv:1610.02410, 2016. []DFPR82 John D. Dixon, Edward W. Formanek, John C. Poland, and Luis Ribes. Profinite completions and isomorphic finite quotients. Journal of Pure and Applied Algebra, 23(3):227–231, 1982. []GDJZ15 Gabino González-Diez and Andrei Jaikin-Zapirain. The absolute Galois group acts faithfully on regular dessins and on Beauville surfaces. Proceedings of the London Mathematical Society, 111(4):775– 796, 2015. []GR78 Dion Gildenhuys and Luis Ribes. Profinite groups and Boolean graphs. Journal of Pure and Applied Algebra, 12(1):21–47, 1978. []Grü57 Karl W. Grünberg. Residual properties of infinite soluble groups. Proceedings of the London Mathematical Society, 3(1):29–62, 1957. []Ham01 Emily Hamilton. Abelian subgroup separability of Haken 3-manifolds and closed hyperbolic n-orbifolds. Proceedings of the London Mathematical Society, 83(03):626–646, 2001. []Hem14 John Hempel. Some 3-manifold groups with the same finite quotients. arXiv preprint arXiv:1409.3509, 2014. 46 []HWZ12 Emily Hamilton, Henry Wilton, and Pavel A. Zalesskii. Separability of double cosets and conjugacy classes in 3-manifold groups. Journal of the London Mathematical Society, pages –040, 2012. []HZ12 W. N. Herfort and Pavel A. Zalesskii. Addendum: Virtually free pro-p groups whose torsion elements have finite centralizer. arXiv preprint arXiv:0712.4244, 2012. []NS07 Nikolay Nikolov and Dan Segal. On finitely generated profinite groups, I: strong completeness and uniform bounds. Annals of mathematics, pages 171–238, 2007. []NW01 Graham Niblo and Daniel Wise. Subgroup separability, knot groups and graph manifolds. Proceedings of the American Mathematical Society, 129(3):685–693, 2001. []RZ96 Luis Ribes and Pavel A. Zalesskii. Conjugacy separability of amalgamated free products of groups. Journal of Algebra, 179(3):751–774, 1996. []RZ00a Luis Ribes and Pavel Zalesskii. Pro-p trees and applications. In Marcus du Sautoy, Dan Segal, and Aner Shalev, editors, New Horizons in pro-p Groups, Progess in Mathematics volume 184, pages 75–119. Birkhäuser Boston, 2000. []RZ00b Luis Ribes and Pavel Zalesskii. Profinite groups. Springer, 2000. []RZ01 L. Ribes and P. Zalesskii. Profinite Trees. Unpublished book, 2001. []Sco83 Peter Scott. The geometries of 3-manifolds. Bulletin of the London Mathematical Society, 15(5):401–487, 1983. []Ser03 Jean-Pierre Serre. Trees. Translated from the French original by John Stillwell. Corrected 2nd printing of the 1980 English translation. Springer Monographs in Mathematics. Springer-Verlag, Berlin, 2003. []Wil15 Gareth Wilkes. Profinite rigidity for Seifert fibre spaces. Geometriae Dedicata, pages 1–23, 2015. []WZ10 Henry Wilton and Pavel Zalesskii. Profinite properties of graph manifolds. Geometriae Dedicata, 147(1):29–45, 2010. []WZ17 Henry Wilton and Pavel Zalesskii. Distinguishing geometries using finite quotients. Geom. Topol., 21(1):345–384, 2017. []Zal89 P. A. Zalesskii. A geometric characterization of free formations of profinite groups. Siberian Mathematical Journal, 30(2):227–235, 1989. []ZM89a PA Zalesskii and Oleg Vladimirovich Mel’nikov. Subgroups of profinite groups acting on trees. Mathematics of the USSR-Sbornik, 63(2):405, 1989. 47 []ZM89b Pavel Aleksandrovich Zalesskii and Oleg Vladimirovich Mel’nikov. Fundamental groups of graphs of profinite groups. Algebra i Analiz, 1(4):117–135, 1989. 48
4math.GR
Optimal approximate matrix product in terms of stable rank arXiv:1507.02268v3 [cs.DS] 2 Mar 2016 Michael B. Cohen∗ Jelani Nelson† David P. Woodruff‡ Abstract We give two different characterizations of the type of dimensionality-reducing map Π that can be used for spectral error approximate matrix multiplication (AMM). Both imply a random data-oblivious Π with m = O(r̃/ε2 ) rows suffices, where r̃ is the maximum stable rank, i.e. squared ratio of Frobenius and operator norms, of the matrices being multiplied. This answers the main open question of [MZ11, KVZ14], and is optimal for any random oblivious map. Both characterizations apply to a general class of random Π, and one even to deterministic Π. Recall an (ε, δ, d)-oblivious subspace embedding (OSE) distribution D over matrices Π ∈ Rm×n is such that for any d-dimensional linear subspace E of Rn , P(k(ΠU )T (ΠU )− Ik > ε) < δ, where the columns of U form an orthonormal basis for E. In one characterization, we show if this tail bound was established via the moment method, then to obtain AMM it suffices that D be an (ε, δ, 2r̃)-OSE. That is, we show being an OSE for dimension (i.e. rank) k implies black box AMM for matrices of stable rank k. Once this is shown, our main result is then just a simple corollary of the fact that subgaussian maps with m = Ω((d + log(1/δ))/ε2 ) rows are (ε, δ, d)-OSE’s. Also, for all known OSE’s, the best analyses indeed are via the moment method (or tools such as matrix Chernoff, which themselves also imply moment bounds). Thus our theorem can be applied to a much more general class of sketching matrices than just the subgaussian sketches in [MZ11, KVZ14], in addition to achieving better bounds. This includes fast subspace embeddings such as the Subsampled Randomized Hadamard Transform [Sar06, LWM+ 07] or sparse subspace embeddings [CW13, MM13, NN13, Coh16], or even constructions that may be developed in the future, to show that rank bounds in their analyses in previous work can automatically be replaced with stable rank. Our second characterization identifies certain deterministic conditions which if satisfied imply the AMM guarantee. We show these conditions are sufficiently precise to yield optimal results for subgaussian maps and even a deterministic Π such as the truncated SVD. Our main theorem, via connections with spectral error matrix multiplication proven in previous work, implies quantitative improvements for approximate least squares regression and low rank approximation [Sar06], and implies faster low rank approximation for popular kernels in machine learning such as the gaussian and Sobolev kernels. Our main result has also already been applied to improve dimensionality reduction guarantees for k-means clustering [CEM+ 15], and also implies new results for nonparametric regression when combined with results in [YPW15]. Lastly, we point out a minor but interesting observation that the proof of the “BSS” deterministic row-sampling result of [BSS12] can be modified to show that for any matrices A, B of stable rank at most r̃, one can achieve the spectral norm guarantee for approximate matrix multiplication of AT B using a deterministic sampling matrix with O(r̃/ε2 ) non-zero entries which can be found in polynomial time. The original result of [BSS12] was for rank instead of stable rank. Our observation leads to a stronger version of a main theorem of [KMST10]. ∗ MIT. [email protected]. Supported by Akamai Presidential Fellowship and NSF grant CCF-1111109. Harvard. [email protected]. Supported by NSF grant IIS-1447471 and CAREER CCF-1350670, ONR grant N00014-14-1-0632 and Young Investigator N00014-15-1-2388, and a Google Faculty Research Award. ‡ IBM Almaden. [email protected]. Supported by XDATA program of the Defense Advanced Research Projects Agency (DARPA), administered through Air Force Research Laboratory FA8750-12-C-0323. † 1 Introduction Much recent work has successfully utilized randomized dimensionality reduction techniques to speed up solutions to linear algebra problems, with applications in machine learning, statistics, optimization, and several other domains; see the recent monographs [HMT11, Mah11, Woo14] for more details. In our work here, we give new spectral norm guarantees for approximate matrix multiplication (AMM). Aside from AMM being interesting in its own right, it has become a useful primitive in the literature for analyzing algorithms for other large-scale linear algebra problems as well. We show applications of our new guarantees to speeding up standard algorithms for generalized regression and low-rank approximation problems. We also describe applications of our results to k-means clustering (discovered in [CEM+ 15]) and nonparametric regression [YPW15]. In AMM we are given A, B each with a large number of rows n, and the goal is to compute some matrix C such that kC − AT BkX is “small”, for some norm k · kX . Furthermore, we would like to compute C much faster than the usual time required to exactly compute AT B. Work on randomized methods for AMM began with [DKM06], which focused on k · kX = k · kF , i.e., Frobenius norm error. They showed by picking an appropriate sampling matrix Π ∈ Rm×n , k(ΠA)T (ΠB) − AT BkF ≤ εkAkF kBkF (1) with good probability, if m = Ω(1/ε2 ). By a sampling matrix, we mean the rows of Π are independent, and each row is all zero except for a 1 in a random location according to some appropriate distribution. If A ∈ Rn×d and B ∈ Rn×p , note (ΠA)T (ΠB) can be computed in O(mdp) time once ΠA and ΠB are formed, as opposed to the straightforward O(ndp) time to compute AT B. The Frobenius norm error guarantee of Eq. (1) was also later achieved in [Sar06, Lemma 6] via a different approach, with some later optimizations to the parameters in [KN14, Theorem 6.2]. The approach of Sarlós was not via sampling, but rather to use a matrix Π drawn from a distribution satisfying an “oblivious Johnson-Lindenstrauss (JL)” guarantee, i.e. a distribution D over Rm×n satisfying the following condition for some ε, δ ∈ (0, 1/2):  ∀x ∈ Rn , P |kΠxk22 − kxk22 | > εkxk22 < δ. (2) Π∼D Such a matrix Π can be taken with m = O(ε−2 log(1/δ)) [JL84]. Furthermore, one can take Π to be a Fast JL transform [AC09] (or any of the follow-up improvements [AL13, KW11, NPW14, Bou14, HR16]) or a sparse JL transform [DKS10, KN14] to speed up the computation of ΠA and ΠB. One could also use the Thorup-Zhang sketch [TZ12] combined with a certain technique of [LBKW14] (see [Woo14, Theorem 2.10] for details) to efficiently boost success probability. Other than Frobenius norm error, the main other error guarantee investigated in previous work is spectral error. That is, we would like kC − AT Bk to be small, where kM k denotes the largest singular value of M . If one is interested in applying AT B to some set of input vectors then this type of error is the most meaningful, since kC − AT Bk being small is equivalent to kCxk ≈ kAT Bxk for any x. The first work along these lines was again by [DKM06], who gave a procedure based on entry-wise sampling of the entries of A and B. The works [DMM06, SS11] showed that row-sampling according to leverage scores also provides the desired guarantee with few samples. Then [Sar06], combined with a quantitative improvement in [CW13], showed that one can take a Π drawn from an oblivious JL distribution with δ = 2−Θ(r) where r(·) denotes rank and r = r(A) + r(B). Then for Π with m = O((r + log(1/δ))/ε2 ), with probability at least 1 − δ over Π, k(ΠA)T (ΠB) − AT Bk ≤ εkAkkBk. 1 (3) As we shall see shortly via a very simple lemma (Lemma 1), a sufficient deterministic condition implying Eq. (3) is that Π is an O(ε)-subspace embedding for the r-dimensional subspace spanned by the columns of A, B. The notion of a subspace embedding was introduced by [Sar06]. Definition 1. Π is an ε-subspace embedding for U ∈ Rn×r , U T U = I, if Π satisfies Eq. (3) with A = B = U , i.e. k(ΠU )T (ΠU ) − Ik ≤ ε. This is equivalent to ∀x ∈ Rr , (1 − ε)kxk22 ≤ kΠU xk22 ≤ (1 + ε)kxk22 , i.e. Π preserves norms of all vectors in the subspace spanned by the columns U . An (ε, δ, r)-oblivious subspace embedding (OSE) is a distribution D over Rm×n such that ∀U ∈ Rn×r , U T U = I, P (k(ΠU )T (ΠU ) − Ik > ε) < δ. Π∼D Fast subspace embeddings Π, i.e. such that the products ΠA and ΠB can be computed quickly, are known using variants on the Fast JL transform such as the Subsampled Randomized Hadamard Transform (SRHT) [Sar06, LWM+ 07, Tro11, LDFU13] (also see a slightly improved analysis of the SRHT in Section A.2) or via sparse subspace embeddings [CW13, MM13, NN13, LMP13, CLM+ 15, Coh16]. In most applications it is important to have a fast subspace embedding to shrink the time it takes to transform the input data to a lower-dimensional form. The SRHT is a construction of a Π such that ΠA can be computed in time O(nd log n) (see Section A.2 for details of the construction). The sparse subspace embedding constructions have some parameter m rows and exactly s non-zero entries per column, so that ΠA can be computed in time O(s · nnz(A)), where nnz(·) is the number of non-zero entries, and there is a tradeoff in the upper bounds between m and s. An issue addressed by the work of [MZ11] is that of robustness. As stated above, achieving Eq. (3) requires Π be a subspace embedding for an r-dimensional subspace. However, consider the case when A (and similarly for B) is of high rank but can be expressed as the sum of a low-rank matrix plus high-rank noise of small magnitude, i.e., A = à + EA for à of rank r(Ã) ≪ r, and where kEA k is very small but EA has high (even full) rank. One would hope the noise could be ignored, but standard results require Π to have a number of rows at least as large as r, regardless of how small the magnitude of the noise is. Another case of interest (as we will see in Section 3) is when A and B are each of high rank, but their singular values decay at some appropriate rate. As discussed in Section 3, in several applications where AMM is not the final goal but rather is used as a primitive in analyzing an algorithm for some other problem (such as k-means clustering or nonparametric regression), the matrices that arise do indeed have such decaying singular values. The work [MZ11] remedied this by considering the stable ranks r̃(A), r̃(B) of A and B. Define r̃(A) = kAk2F /kAk2 . Note r̃(A) ≤ r(A) always, but can be much less if A has a small tail of singular values. Let r̃ denote r̃(A) + r̃(B). Among other results, [MZ11] showed that to achieve Eq. (3) with good probability, one can take Π to be a random (scaled) sign matrix with either m = Ω(r̃/ε4 ) or m = Ω(r̃ log(d + p)/ε2 ) rows. As noted in follow-up work [KVZ14], both the 1/ε4 dependence and the log(d + p) factor are undesirable. In their data-driven low dimensional embedding application, they wanted a dimension m independent of the original dimensions, which are assumed much larger than the stable rank, and also wanted lower dependence on 1/ε. To this end, [KVZ14] defined the nuclear rank as nr(A) ˜ = kAk∗ /kAk and showed m = Ω(nr/ε ˜ 2 ) rows suffice for nr ˜ = nr(A) ˜ + nr(B). ˜ 2 Here kAk∗ is the nuclear norm, i.e., sum of singular values of A. Since kAkF is the sum of squared singular values, it is straightforward to see that nr(A) ˜ ≥ r̃(A) always. Thus there is a tradeoff: the stable rank guarantee is worsened to nuclear rank, but dependence on 1/ε is improved to quadratic. We show switching to the weaker nr ˜ guarantee is unnecessary by showing quadratic dependence on 1/ε holds even with stable rank. This answers the main open question of [MZ11, KVZ14]. 2 To state our results in a more natural way, we rephrase our main result to say that we achieve s   kAk2F kBk2F T T 2 2 kAk + kBk + . (4) k(ΠA) (ΠB) − A Bk ≤ ε k k for an arbitrary k ≥ 1, and we do so by using subspace embeddings for O(k)-dimensional subspaces in a certain black box way (which will be made precise soon) regardless of the ranks of A, B. Remark 1. Note that our previously stated main contribution is equivalent, since one could set k = r̃(A) + r̃(B) to arrive at the conclusion that subspace embeddings for O(r̃)-dimensional subspaces yield the guarantee in Eq. (3). Alternatively one could obtain the Eq. (4) guarantee via p ′ Eq. (3) with error parameter ε = Θ(ε · min{1, (r̃(A) · r̃(B))/k}). Henceforth, we use the following definition. Definition 2. For conforming matrices AT , B, we say Π satisfies the (k, ε)-approximate spectral norm matrix multiplication property ((k, ε)-AMM) for A, B if Eq. (4) holds. If Π is random and satisfies (k, ε)-AMM with probability 1−δ for any fixed A, B, then we say Π satisfies (k, ε, δ)-AMM. Our main contribution: We give two different characterizations for Π supporting (k, ε)-AMM, both of which imply (k, ε, δ)-AMM Π having m = O((k + log(1/δ))/ε2 ) rows. The first characterization applies to any OSE distribution for which a moment bound has been proven for k(ΠU )T (ΠU ) − Ik (which is true for the best analyses of all known OSE’s). In this case, we show a black box theorem: any (ε, δ, 2k)-OSE provides (k, ε, δ)-AMM. Since matrices with subgaussian entries and m = Ω((k + log(1/δ))/ε2 ) are (ε, δ, 2k)-OSE’s, our originally stated main result follows. This result is optimal, since [NN14] shows any randomized distribution over Π with m rows having the (k, ε, δ)-AMM property must have m = Ω((k + log(1/δ))/ε2 ) (the hard instance there is when A = B = U has orthonormal columns, and thus rank and stable rank are equal). Our second characterization identifies certain deterministic conditions which, if satisfied by Π, imply the desired (k, ε)-AMM property. These conditions are of the form: (1) Π should preserve a certain set of O(log(1/ε)) different subspaces of varying dimensions (all depending on k, ε and not on the ranks of A, B) with varying distortions, and (2) for a certain two matrices in our analysis, left-multiplication by Π should not increase their operator norms by more than an O(1) factor. These conditions are chosen carefully so that matrices with subgaussian entries and m = Ω(k/ε2 ) satisfy all conditions simultaneously with high probability, again thus proving our main result while also suggesting that the conditions we have identified are the “right” ones. Due to the black box reliance on the subspace embedding primitive in our proofs, Π need not only be a subgaussian map. Thus not only do we improve on m compared with previous work, but also in terms of the general class of Π our result applies to. For example given our first characterization, not only does it suffice to use a random sign matrix with Ω(k/ε2 ) rows, but in fact one can apply our theorem to more efficient subspace embeddings such as the SRHT or sparse subspace embeddings, or even constructions discovered in the future. That is, one can automatically transfer bounds proven for the subspace embedding property to the (k, ε)-AMM property. Thus, for example, the best known SRHT analysis (in our appendix, see Theorem 9) implies (k, ε, δ)-AMM for m = Ω((k + log(1/(εδ)) log(k/δ))/ε2 ) rows. For sparse subspace embeddings, the analysis in [Coh16] implies m = Ω(k log(k/δ)/ε2 ) suffices with s = O(log(k/δ)/ε) non-zeroes per column of Π. The only reason for the log k loss in m for these particular distributions is not due to our theorems, 3 but rather due to the best analyses for the simpler subspace embedding property in previous work already incurring the extra log k factor (note being a subspace embedding for a k-dimensional subspace is simply a special case of (k, ε)-AMM where A = B = U has k orthonormal columns). In the case of the SRHT, this extra log k factor is actually necessary [Tro11]; for sparse subspace embeddings, it is conjectured that the log k factor can be removed and that m = Ω((k+log(1/δ))/ε2 ) actually suffices to obtain an OSE [NN13, Conjecture 14]. We also discuss in Remark 3 that one can set Π to be Π1 · Π2 where Π1 has subgaussian entries with O(k/ε2 ) rows, and Π2 is some other fast OSE (such as the SRHT or sparse subspace embedding), and thus one could obtain the best of both worlds: (1) Π has O(k/ε2 ) rows, and (2) can be applied to any A ∈ Rn×d in time T + O(km′ d/ε2 ), where T is the (fast) time to apply Π2 to A, and m′ is the number of rows of Π2 . For example, by appropriate composition as discussed in Remark 3, Π can have O(k/ε2 ) rows and support multiplying ΠA for A ∈ Rn×d in time O(nnz(A)) + Õ(ε−O(1) (k3 + k2 d)). We also observe the proof of the main result of [BSS12] can be modified to show that given any A, B each with n rows, and given any ε ∈ (0, 1/2), there exists a diagonal matrix Π ∈ Rn×n with O(k/ε2 ) non-zero entries, and that can be computed by a deterministic polynomial time algorithm, achieving (k, ε)-AMM. The original work of [BSS12] achieved Eq. (3) with m = O(r/ε2 ) for r being the sum of ranks of A, B. The work [BSS12] stated their result for the case A = B, but the general case of potentially unequal matrices reduces to this case; see Section 4. Our observation also turns out to yield a stronger form of [KMST10, Theorem 3.3]; also see Section 4. As mentioned, aside from AMM being interesting on its own, it is a useful primitive widely used in analyses of algorithms for several other problems, including k-means clustering [BZMD15, CEM+ 15], nonparametric regression [YPW15], linear least squares regression and low-rank approximation [Sar06], approximating leverage scores [DMMW12], and several other problems (see [Woo14] for a recent summary). For all these, analyses of correctness for algorithms based on dimensionality reduction via some Π rely on Π satisfying AMM for certain matrices in the analysis. After making certain quantitative improvements to connections between AMM and applications, and combining them with our main result, in Section 3 we obtain the following new results. 1. Generalized regression: Given A ∈ Rn×d and B ∈ Rn×p , consider the problem of computing X ∗ = argminX∈Rd×p kAX − Bk. It is standard that X ∗ = (AT A)+ AT B where (·)+ is the Moore-Penrose pseudoinverse. The bottleneck here is computing AT A, taking O(nd2 ) time. A popular approach is to instead compute X̃ = ((ΠA)T (ΠA))+ (ΠA)T ΠB, i.e., the minimizer of kΠAX − ΠBk. Note that computing (ΠA)T (ΠA) (given ΠA) only takes a smaller O(md2 ) √ amount of time. We show that if Π satisfies (k, O( ε))-AMM for UA , PĀ B, and is also an O(1)-subspace embedding for a certain r(A)-dimensional subspace (see Theorem 3), then kAX̃ − Bk2 ≤ (1 + ε)kPA B − Bk2 + (ε/k)kPA B − Bk2F where PA is the orthogonal projection onto the column space of A, PĀ = I − PA , and UA has orthonormal columns forming a basis for the column space of A. The punchline is that if the regression error PĀ B has high actual rank but stable rank only on the order of r(A), then we obtain multiplicative spectral norm error with Π having fewer rows. Generalized regression is a natural extension of the case when B is a vector, and arises for example in Regularized Least Squares Classification, where one has multiple (non-binary) labels, and for each label one creates a column of B; see e.g. [CLL+ 10] for this and variations. 4 2. Low-rank approximation: We are given A ∈ Rn×d and integer k ≥ 1, and we want to compute Ak = argminr(X)≤k kA − Xk. The Eckart-Young theorem implies Ak is obtained by truncating the SVD of A to the top k singular vectors. The standard way to use dimensionality reduction for speedup, introduced in [Sar06], is to let S = ΠA then compute à = APS . Then return Ãk , the best rank-k approximation of Ã, instead of Ak (it is known Ãk can be computed √ more efficiently than Ak ; see [CW09, Lemma 4.3]). We show if Π satisfies (k, O( ε))-AMM for Uk and A − Ak , and is a (1/2)-subspace embedding for the column space of Ak , then kÃk − Ak2 ≤ (1 + ε)kA − Ak k2 + (ε/k)kA − Ak k2F . The punchline is that if the stable rank of the tail A − Ak is on the same order as the rank parameter k, then standard algorithms from previous work for Frobenius multiplicative error actually in fact also provide spectral multiplicative error. This property indeed holds for any k for popular kernel matrices in machine learning such as the gaussian and Sobolev kernels (see [RHV11] and Examples 2 and 3 of [YPW15]), and low-rank approximation of kernel matrices has been applied to several machine learning problems; see [GM13] for a discussion. We also explain in Section 3 how our result has already been applied in recent work on dimensionality reduction for k-means clustering [CLM+ 15], and how it generalizes results in [YPW15] on dimensionality reduction for nonparametric regression to use a larger class of embeddings Π. 1.1 Preliminaries and notation We frequently use the singular value decomposition (SVD). For a matrix A ∈ Rn×d of rank r, consider the compact SVD A = UA ΣA VAT where UA ∈ Rn×r and VA ∈ Rd×r each have orthonormal columns, and ΣA is diagonal with strictly positive diagonal entries (the singular values of A). We assume (ΣA )i,i ≥ (ΣA )j,j for i < j. We let PA = UA UAT denote the orthogonal projection operator onto the column space of A. We use span(A) to refer to the subspace spanned by A’s columns. Often for a matrix A we write Ak as the best rank-k approximation to A under Frobenius or spectral error (obtained by writing the SVD of A then setting all (ΣA )i,i to 0 for i > k). We often denote A − Ak as Ak̄ . For matrices with orthonormal columns, such as UA , (UA )k denotes the n × k matrix formed by removing all but the first k columns of U . When A is understood from context, we often write U ΣV T instead of UA ΣA VAT , and Uk to denote (UA )k (and Σk for (ΣA )k , etc.). 2 Analysis of matrix multiplication for stable rank First we record a simple lemma relating subspace embeddings and AMM. Lemma 1. Let E = span{A, B}, and let Π be an ε-subspace embedding for E. Then Eq. (3) holds. Proof. First, without loss of generality we may assume kAk = kBk = 1 since we can divide both sides of Eq. (3) by kAk · kBk. Let U be a matrix whose columns form an orthonormal basis for E. Then note for any x, y we can write Ax = U w, By = U z where kwk ≤ kxk, kzk ≤ kyk. Then k(ΠA)T (ΠB) − AT Bk = = sup kxk=kyk=1 sup kwk,kzk≤1 5 | hΠAx, ΠByi − hAx, Byi | | hΠU z, ΠU wi − hU z, U wi | = k(ΠU )T (ΠU ) − Ik <ε  Lemma 1 implies that if A, B each have rank at most r, it suffices for Π to have Ω(r/ε2 ) rows. In the following two subsections, we give two different characterizations for Π to provide (k, ε)AMM, both only requiring Π to have Ω(k/ε2 ) rows, independent of r. 2.1 Characterization for (k, ε, δ)-AMM via a moment property Here we provide a way to obtain (k, ε)-AMM for any Π whose subspace embedding property has been established using the moment method, e.g. sparse subspace embeddings [MM13, NN13, Coh16], dense subgaussian matrices as analyzed in Section A.1, or even the SRHT as analyzed in Section A.2. Our approach in this subsection is inspired by the introduction of the “JL-moment property” in [KN14] to analyze approximate matrix multiplication with Frobenius error. The following is a generalization of [KN14, Definition 6.1], which was only concerned with d = 1. Definition 3. A distribution D over Rm×n has (ε, δ, d, ℓ)-OSE moments if for all matrices U ∈ Rn×d with orthonormal columns, E Π∼D (ΠU )T (ΠU ) − I ℓ < εℓ · δ Note that this is just a special case of bounding the expectation of an arbitrary function of k(ΠU )T (ΠU ) − Ik. The arguments below will actually apply to any nonnegative, convex, increasing function of k(ΠU )T (ΠU ) − Ik2 , but we restrict to moments for simplicity of presentation. The acronym “OSE” refers to oblivious subspace embedding, a term coined in [NN13] to refer to distributions over Π yielding a subspace embedding for any fixed subspace of a particular bounded dimension with high probability. We start with a simple lemma. Lemma 2. Suppose D satisfies the (ε, δ, 2d, ℓ)-OSE moment property and A, B are matrices with (1) the same number of rows, and (2) sum of ranks at most 2d. Then E Π∼D (ΠA)T (ΠB) − AT B ℓ < εℓ kAkℓ kBkℓ · δ Proof. First, we apply Lemma 1 to A and B, where U forms an orthonormal basis for the subspace span{columns(A), columns(B)}, showing that (ΠA)T (ΠB) − AT B ≤ (ΠU )T (ΠU ) − I kAkkBk. Therefore E Π∼D (ΠA)T (ΠB) − AT B ℓ ≤ E Π∼D (ΠU )T (ΠU ) − I ℓ kAkℓ kBkℓ < εℓ kAkℓ kBkℓ · δ  Then, just as [KN14, Theorem 6.2] showed that having OSE moments with d = 1 implies approximate matrix multiplication with Frobenius norm error, here we show that having OSE moments for larger d implies approximate matrix multiplication with operator norm error. 6 Theorem 1. Given k, ε, δ ∈ (0, 1/2), let D be any distribution over matrices with n columns with the (ε, δ, 2k, ℓ)-OSE moment property for some ℓ ≥ 2. Then, for any A, B,   q T T 2 2 2 2 (5) P k(ΠA) (ΠB) − A Bk > ε (kAk + kAkF /k)(kBk + kBkF /k) < δ Π∼D Proof. We can assume A, B each have orthogonal columns. This is since, via the full SVD, there exist orthogonal matrices RA , RB such that ARA and BRB each have orthogonal columns. Since neither left nor right multiplication by an orthogonal matrix changes operator norm, k(ΠA)T (ΠB) − AT Bk = k(ΠARA )T (ΠBRB ) − (ARA )T BRB k. Thus, we replace A by ARA and similarly for B. We may also assume the columns a1 , a2 , . . . of A are sorted so that kai k2 ≥ kai+1 k2 for all i. Henceforth we assume A has orthogonal columns in this sorted order (and similarly for B, with columns bi ). Now, treat A as a block matrix in which the columns are blocked into groups of size k, and similarly for B (if the number of columns of either A or B is not divisible by k, then pad them with all-zero columns until they are, which does not affect the claim). Let the spectral norm of the ith block of A be si = ka(i−1)·k+1 k2 , and for B denote the spectral norm of the ith block as ti = kb(i−1)·k+1 kP 2 . These equalities for A, B hold since 2 2 2 their columns are orthogonal and sorted by norm. We claim i si ≤ kAk + kAkF /k (and similarly P 2 for i ti ). To see this, let the blocks of A be A′1 , . . . , A′q where si = kA′i k. Note s21 = kA′1 k ≤ kAk. Also, for i > 1 we have s2i = ka(i−1)·k+1 k22 ≤ Thus 1 k X (i−2)·k+1≤j≤(i−1)·k X i>1 kaj k22 = 1 ′ kA k2 . k i−1 F s2i ≤ kAk2F /k. Define C = (ΠA)T (ΠB) − AT B. Let v{i} denote the ith block of a vector v (the k-dimensional vector whose entries consist of entries (i − 1) · k + 1 to i · k of v), and C{i},{j} the (i, j)th block of C, a k × k matrix (the entries in C contained in the ith block of rows and jth block of columns). Now, kCk = supkxk=kyk=1 xT Cy. For any such vectors x and y, we define new vectors x′ and ′ y whose coordinates correspond to entire blocks: we let x′i = kx{i} k, with y ′ defined analogously. ′ = kC We similarly define C ′ with entries corresponding to blocks of C, where Ci,j {i},{j} k. Then T ′T ′ ′ x Cy ≤ x C y , simply by bounding the contribution of each block. Thus it suffices to upper bound kC ′ k, which we bound by its Frobenius norm kC ′ kF . Now, recalling for a random variable X that kXkℓ denotes (E |X|ℓ )1/ℓ and using Minkowski’s inequality (that k · kℓ is a norm for ℓ ≥ 1), kkC ′ k2F kℓ/2 = ≤ ≤ X i,j X i,j X i,j ′ 2 k(ΠA′i )T (ΠBj′ ) − A′T i Bj k ℓ/2 kk(ΠA′i )T (ΠBj′ ) − ′ 2 A′T i Bj k kℓ/2 ε2 s2i t2j · δ2/ℓ (Lemma 2) 7 = ε2 X i  !  X s2i ·  t2j  δ2/ℓ j 2  q 1/ℓ 2 2 2 2 ≤ ε (kAk + kAkF /k)(kBk + kBkF /k)δ ℓ/2 Now, E kC ′ kℓF = kkC ′ k2F kℓ/2 , implying ! ! r 2 2 2 2 kBk kBk kAk kAk ′ F F F F P kC k > ε (kAk2 + )(kBk2 + ) ≤ P kC kF > ε (kAk2 + )(kBk2 + ) k k k k ′ r < q ε (kAk2 + E kC ′ kℓF kAk2F k )(kBk2 + ≤ δ. kBk2F k ℓ )  We now discuss the implications of applying Theorem 1 to specific OSE’s. Subgaussian maps: In Section A.1 we show that if Π has independent subgaussian entries and m = Ω((k+log(1/δ))/ε2 ) rows, then it satisfies the (ε, δ, 2k, Θ(k+log(1/δ))) OSE moment property. Thus Theorem 1 applies to show that such Π will satisfy (k, ε, δ)-AMM. SRHT: The SRHT is the matrix product Π = SHD where D ∈ Rn×n is n × n diagonal with independent ±1 entries on the diagonal, H is a “bounded orthonormal system” (i.e. an orthogonal √ matrix in Rn×n with maxi,j |Hi,j | = O(1/ n)), and the m rows of S are independent and each samples a uniformly random element of [n]. Bounded orthonormal systems include the discrete Fourier matrix and the Hadamard matrix; thus such Π exist supporting matrix-vector multiplication in O(n log n) time. Thus when computing ΠA for some n × d matrix A, this takes time O(nd log n) (by applying Π to A column by column). In Theorem 9 we show that the SRHT with m = Ω((k + log(1/(εδ)) log(k/δ))/ε2 ) satisfies the (ε, δ, 2k, log(k/δ))-OSE moment property, and thus provides (k, ε, δ)-AMM. Interestingly our analysis of the SRHT in Section A.2 seems to be asymptotically tighter than any other analyses in previous work even for the basic subspace embedding property, and even slightly improves the by now standard analysis of the Fast JL transform given in [AC09]. Sparse subspace embeddings: The sparse embedding distribution with parameters m, s is as follows [CW13, NN13, KN14]. The matrix Π has m rows and n columns. The columns are independent, and for each column exactly s uniformly random entries are chosen without replacement and √ set to ±1/ s independently; other entries in that column are set to zero. Alternatively, one could use the CountSketch [CCF04]: the m rows are equipartitioned into s sets of size m/s each. The columns are independent, and in each column we pick exactly one row from each of the s partitions √ and set the corresponding entry in that column to ±1/ s uniformly; the rest of the entries in the column are set to 0. Note ΠA can be multiplied in time O(s · nnz(A)), and thus small s is desirable. It was shown in [MM13, NN13], slightly improving [CW13], that either of the above distributions satisfies the (ε, δ, k, 2)-OSE moment property for m = Ω(k2 /(ε2 δ)), s = 1, and hence (k, ε, δ)-AMM 8 (though this particular conclusion follows easily from [KN14, Theorem 6.2]). It was also shown in [Coh16], improving upon [NN13], that they satisfy the (ε, δ, k, log(k/δ))-OSE moment property, and hence also (k, ε, δ)-AMM, for m = Ω(Bk log(k/δ)/ε2 ), s = Ω(logB (k/δ)/ε) for any B > 2. It is conjectured that for B = O(1), m = Ω((k + log(1/δ))/ε2 ) should suffice [NN13, Conjecture 14]. Remark 2. The work [Coh16] does not explicitly discuss the OSE moment property for sparse subspace embeddings. Rather, [Coh16] bounds E eE2ℓ/ε = O(k) for E = k(ΠU )T (ΠU ) − Ik and ℓ = log(k/δ). Note though for x ≥ 0 and integer ℓ ≥ 1, xℓ ≤ ℓ! · ex ≤ ℓℓ · ex by Taylor expansion of the exponential. Setting x = 2ℓE/ε, [Coh16] thus implies E(2ℓE/ε)ℓ ≤ ℓℓ · E eE2ℓ/ε = O(k). Thus E E ℓ = O(k) · (ε/2)ℓ < δ by choice of ℓ, which is the (ε, δ, k, log(k/δ))-OSE moment property. Remark 3. Currently there appears to be a tradeoff: one can either use Π such that ΠA can be computed quickly, such as sparse subspace embeddings or the SRHT, but then the number of rows m is at least k log k. Alternatively one could achieve the optimal m = O(k/ε2 ) using subgaussian Π, but then multiplying by Π is slower: O(mnd) time for A ∈ Rn×d . However, settling for a tradeoff is unnecessary. One can actually obtain the “best of both worlds” by composition, i.e. the multiplication Π = Π1 · Π2 of two matrices both supporting AMM. Thus Π2 could be a fast matrix providing AMM to low (but suboptimal) dimension, and Π1 a “slow” (e.g. subgaussian) matrix with the optimal O(k/ε2 ) number of rows. In fact one can even set Π = Π1 Π2 Π3 where Π3 is the sparse subspace embedding with O(k2 /ε2 ) rows and s = 1, Π2 is the SRHT, and Π1 is a subgaussian matrix. Then ΠA will have the desired O(k/ε2 ) rows and can be computed in time O(nnz(A)) + Õ(ε−O(1) (k3 + k2 d)); see Section A.3 for justification. 2.2 Characterization for (k, ε, )-AMM via deterministic events Here we provide a different characterization for achieving (k, ε)-AMM. Without loss of generality we assume max{kAk2 , kAk2F /k} = max{kBk2 , kBk2F /k} = 1 (so kAk2 , kBk2 ≤ 1 and kAk2F , kBk2F ≤ k). Let w, w′ each be minimal such that kAw̄ k, kBw̄′ k ≤ ε/C ′ for some sufficiently large constant C ′ (which will be set in the proof of Theorem 2). It was shown that w, w′ = O(k/ε2 ) in the proof of Theorem 3.2 (i.b) in [MZ11]. Write the SVDs Aw = UAw ΣAw VATw , Bw′ = UBw′ ΣBw′ VBT ′ . w For 0 ≤ i ≤ log2 (1/ε2 ) define Di′ as set of all columns of UAw , UBw′ whose corresponding squared singular values (from ΣAw , ΣBw′ ) are at least 1/2i . Let DAw be the set of min{k, w} largest singular vectors from UAw , and define DBw′ similarly. Define Di = Di′ ∪ DAw ∪ DBw′ . Let si denote the dimension of span(Di ), and note the si are non-decreasing. Let s̃i be si after rounding up to the nearest power of 2. Group all i with the same value of s̃i into groups G1 , G2 , . . . , Glog2 (1/ε2 ) . For example if for i = 0, 1, 2, 3 the si are 3, 4, 15, 16 then the s̃i are 4, 4, 16, 16 and G1 = {0, 1}, G2 = {2, 3}. Let vj be the common value of s̃i for i in Gj . P i Lemma 3. i si /2 ≤ 8k. Proof. Define s = |DAw ∪ P DBw′ | ≤ 2k and let s′i denote the dimension of span(Di′ ). Then the P above summation is at most i (s/2i + s′i /2i ) ≤ 4k + i s′i /2i . It thus suffices to bound the second summand by 4k. Note that we can find a basis for Di′ among the columns of UAw , UBw′ with corresponding squared singular value at least 1/2i , so let ai + bi = s′i , where ai is the number of columns of UAw in by averaging, if the inequality the basis and bi the number of columns of UBw′ inPthe basis. Then P i of the lemma statement does not hold then either i ai /2 > 2k or i bi /2i > 2k. Without loss of generality assume the former. 9 Consider an arbitrary column of UAw , and suppose it has squared singular P valuei in the range i i−1 ′ [1/2 , 1/2 ). Then it is in span(Dj ) for all j ≥ i. Its contribution to i ai /2 is therefore P i ≤ 2k, since the squared 1/2i + 1/2i+1 + . . . which is at most 2/2i = 1/2i−1 . It follows that a /2 P i i Frobenius norm of Aw is at most k. This is a contradiction to i ai /2i > 2k.  Now we prove the main theorem of this subsection. Theorem 2. Suppose that the following conditions hold: (1) If w + w′ ≤ k, then Π is an ε/C-subspace embedding for the subspace spanned by the columns of Aw , Bw′ . Otherwise if w + w′ > k, then for each 0 ≤ i ≤ log2 (1/ε2 ), Π is an εi /C-subspace embedding for span(Di′ ) with r   vj 1 ,ε εi = min 2 k where i′ is the largest i with si in Gj . (2) kΠAw̄ k, kΠBw̄′ k ≤ ε/C. Then Eq. (4) holds as long as C is smaller than some fixed universal constant. Proof. We would like to bound k(ΠA)T (ΠB) − AT Bk ≤ k(ΠAw )T ΠBw′ − ATw Bw′ k + k(ΠAw̄ )T ΠBw′ k + k(ΠAw )T ΠBw̄′ k | {z } | {z } | {z } α T + k(ΠAw̄ ) {z | γ β ΠBw̄′ k + kATw̄ Bw′ k + kATw Bw̄′ k + kATw̄ Bw̄′ k ∆ } | {z ζ } | {z } η | {z Θ (6) } Using kXY k ≤ kXk · kY k for any conforming matrices X, Y , we see ∆ ≤ ε2 /C 2 by condition (2). Furthermore by the definition of w, w′ we know kAw̄ k, kBw̄′ k ≤ ε/C ′ , and thus ζ + η + Θ ≤ 2ε/C ′ + (ε/C ′ )2 . Note condition (1) implies that Π is a (1/2)-subspace embedding for the subspace spanned by columns of Aw , Bw′ (by taking i maximal). Thus by both conditions we have β, γ ≤ (ε/C)(1 + 1/2). It only remains to bound α. If w + w′ ≤ k, then we are done by condition (1) and Lemma 1. Thus assume w + w′ > k. Then we have k(ΠAw )T ΠBw′ − ATw Bw′ k = sup kxk=kyk=1 ΠUAw ΣAw x, ΠUBw′ ΣBw′ y − UAw ΣAw x, UBw′ ΣBw′ y Let x, y be any unit norm vectors. Write x = x1 + x2 + . . . + xb for b = log2 (1/ε2 ), where xi is the restriction of x to coordinates for which the corresponding squared singular values in ΣAw are in (1/2i , 1/2i−1 ]. Similarly define y 1 , . . . , y b . Then | ΠUAw ΣAw x, ΠUBw′ ΣBw′ y − UAw ΣAw x, UBw′ ΣBw′ y | equals b X b X i=1 j=1 ≤ ΠUAw ΣAw xi , ΠUBw′ ΣBw′ y j − UAw ΣAw xi , UBw′ ΣBw′ y j b X i=1 * i ΠUAw ΣAw x , ΠUBw′ ΣBw′ X j≤i 10 y j + − * i UAw ΣAw x , X j≤i UBw′ ΣBw′ y j + + b X j=1 * ΠUAw ΣAw X xi , ΠUBw′ ΣBw′ y j i≤j + − * X i≤j xi , y j + (7) P We bound the first sum, as bounding the second is similar. Note UAw ΣAw xi , UBw′ ΣBw′ j≤i y j ∈ Di . Therefore by property (1) and Lemma 1, + + * * X X εi j i j i · kxi k · kyk ≤ y ΠUAw ΣAw x , ΠUBw′ ΣBw′ y − UAw ΣAw x , UBw′ ΣBw′ (i−1)/2 C2 j≤i j≤i r ε 2si ≤ · · kxi k (8) (i−1)/2 k C2 where Eq. (8) used that the corresponding v value in property (1) is at most 2si . Returning to Eq. (7) and applying Cauchy-Schwarz and Lemma 3, + + * * r b b X X X X ε 2si i j j i ≤ UBw′ ΣBw′ y y − UAw ΣAw x , ΠUAw ΣAw x , ΠUBw′ ΣBw′ · kxi k · (i−1)/2 k C2 i=1 j≤i j≤i i=1 ! ! 1/2 1/2 b b X X 2ε si i 2 ≤ √ · kx k · 2i C k i=1 i=1 √ 2 8ε ≤ C √ We thus finally have that Eq. (6) is at most (2 8 + 3)ε/C + +(ε/C)2 + 2ε/C ′ + (ε/C ′ )2 , which is at most ε for C, C ′ sufficiently large constants.  Now we discuss some implications of Theorem 2 for specific Π. Example 1: Let Π have O(k/ε2 ) rows forming an orthonormal basis for the span of the columns of Aw , Bw′ . Property (1) is satisfied for every i in fact with εi = 0. Property (2) is also satisfied since kΠAw̄ k ≤ kΠk · kAw̄ k ≤ ε, and similarly for bounding kΠBw̄′ k. Example 2: Let Π be a random m×n matrix with independent entries that are subgaussian with √ √ variance 1/m. For example, the entries of Π may be N (0, 1/m), or uniform in {−1/ m, 1/ m}. Let m be Θ((k + log(1/δ))/ε2 ). As mentioned in Section A.1, such Π is an ε-subspace embedding for a k-dimensional subspace with failure probability δ. For property (1) of Theorem 2, if w+w′ ≤ k then we would like Π to be an ε-subspace embedding for a subspace of dimension at most k, which holds with failure probability δ. If w + w′ > k then we would like Π to be an εi -subspace embedding for span(Di′ ) for all 1 ≤ i ≤ log2 (1/ε2 ) simultaneously. Note maxj vj ≤ 2(w + w′ ) = O(k/ε2 ), and thus maxj vj ≤ m. Thus for a subspace under consideration Di′ for i′ ∈ Gj , we have failure probability δvj /k for our choice of m. By construction every vj is at least k, and the vj increase at least P P j−1 = O(δ). geometrically. Thus our total failure probability is, by a union bound, j δvj /k ≤ j δ2 Property (2) of Theorem 2 is satisfied with failure probability δ by [RV13, Theorem 3.2]. 11 3 Applications Spectral norm approximate matrix multiplication with dimension bounds depending on stable rank has immediate applications for the analysis of generalized regression and low-rank approximation problems. We also point out to the reader recent applications of this result to kernelized ridge regression [YPW15] and k-means clustering [CEM+ 15]. 3.1 Generalized regression Here we consider generalized regression: attempting to approximate a matrix B as AX, with A of rank at most k. Let PA be the orthogonal projection operator to the column space of A, with PĀ = I − P ; then the natural best approximation will satisfy AX = PA B. This minimizes both the Frobenius and spectral norms of AX − B. A standard approximation algorithm for this is to replace A and B with sketches ΠA and ΠB, then solve the reduced problem exactly (see e.g. [CW09], Theorem 3.1). This will produce X̃ = ((ΠA)T ΠA)−1 (ΠA)T ΠB AX̃ = A((ΠA)T ΠA)−1 (ΠA)T ΠB = UA ((ΠUA )T ΠUA )−1 (ΠUA )T ΠB. Below we give a lemma on the guarantees of the sketched solution in terms of properties of Π. Theorem 3. If Π 1. satisfies the (k, p ε/8)-approximate spectral norm matrix multiplication property for UA , PĀ B 2. is a (1/2)-subspace embedding for the column space of A (which is implied by Π satisfying the spectral norm approximate matrix multiplication property for UA with itself ) then kAX̃ − Bk2 ≤ (1 + ε)kPA B − Bk2 + (ε/k) · kPA B − Bk2F . (9) Proof. We may write: kAX̃ − Bk22 = kUA ((ΠUA )T ΠUA )−1 (ΠUA )T ΠB − Bk2 = kUA ((ΠUA )T ΠUA )−1 (ΠUA )T Π(PA B + PĀ B) − PA B − PĀ Bk2 = kPA B + UA ((ΠUA )T ΠUA )−1 (ΠUA )T ΠPĀ B − PA B − PĀ Bk2 = kUA ((ΠUA )T ΠUA )−1 (ΠUA )T ΠPĀ B − PĀ Bk2 . So far, we have shown that the error depends only on PĀ B and not PA B (with the third line following from the fact that the sketched regression is exact on PA B). Now, in the last line, we can see that the two terms lie in orthogonal column spaces (the first in the span of A, the second orthogonal to it). For matrices X and Y with orthogonal column spans, kX + Y k2 ≤ kXk2 + kY k2 , so this is at most kUA ((ΠUA )T ΠUA )−1 (ΠUA )T ΠPĀ Bk2 + kPĀ Bk2 . 12 Spectral submultiplicativity then implies the first term is at most (kUA k · k((ΠUA )T ΠUA )−1 k · k(ΠUA )T ΠPĀ Bk)2 . kUA k is 1, since UA is orthonormal. ((ΠUA )T ΠUA )−1 is at most 2, since Π is a subspace embedding for UA . Finally, k(ΠUA )T ΠPĀ Bk is at most q p p ε/8· (kUA k2 + kUA k2F /k)(kPĀ Bk2 + kPĀ Bk2F /k) = (ε/8) · 2 · (kPA B − Bk2 + kPA B − Bk2 /k). Multiplying these together, squaring, and adding the remaining kPĀ Bk2 term gives a bound of (1 + ε)kPA B − Bk2 + (ε/k) · kPA B − Bk2F as desired. 3.2  Low-rank approximation Now we apply the generalized regression result from Section 3.1 to obtain a result on low-rank approximation: approximating a matrix A in the form Ũk Σ̃k ṼkT , where Ũk has only k columns and both Ũk and Ṽk have orthonormal columns. Here, we consider a previous approach (see e.g. [Sar06]): 1. Let S = ΠA. 2. Let PS be the orthogonal projection operator to the row space of S. Let à = APS . 3. Compute a singular value decomposition of Ã, and keep only the top k singular vectors. Return the resulting low rank approximation Ãk of Ã. It turns out computing Ãk can be done much more quickly than computing Ak ; see details in [CW09, Lemma 4.3]. Let Ak be the exact k-truncated SVD approximation of A (and thus the best rank-k approximation, in the spectral and Frobenius norms), and let Uk be the top k column singular vectors, and Ak̄ = A − Ak be the tail. Theorem 4. If Π 1. satisfies the (k, p ε/8)-approximate spectral norm matrix multiplication property for Uk , Ak̄ 2. is a (1/2)-subspace embedding for the column space of Uk then kA − Ãk k2 ≤ (1 + ε)kA − Ak k2 + (ε/k)kA − Ak k2F (10) Proof. Note that this procedure chooses the best possible (in the spectral norm) rank-k approximation to A subject to the constraint of lying in the row space of S. Thus, the spectral norm error can be no worse than the error of a specific such matrix we exhibit. We simply choose the matrix obtained by running our generalized regression algorithm from A onto Uk , with Π: Uk ((ΠUk )T ΠUk )−1 (ΠUk )T ΠA This is rank-k by construction, since it is multiplied by Uk , and it lies in the row space of S = ΠA since that is the rightmost factor. On the other hand, it is an application of the regression algorithm to A where the optimum output is Ak (since that is the projection of A onto the space of Uk ). Plugging this into Eq. (9) gives the desired result.  13 3.3 Kernelized ridge regression In nonparametric regression one is given data yi = f ∗ (xi ) + wi for i = 1, . . . , n, and the goal is to recover a good estimate for the function f ∗ . Here the yi are scalars, the xi are vectors, and the wi are independent noise, often assumed to be distributed as mean-zero gaussian with some variance σ 2 . Unlike linear regression where f ∗ (xi ) is assumed to take the form hβ, xi for some vector β, in nonparametric regression we allow f ∗ to be an arbitrary function from some function space. Naturally the goal then is to recover some f˜ from the data so that, as n grows, the probability that f˜ is “close” to f ∗ increases at some good rate. The recent work [YPW15] considers the well studied problem of obtaining f˜ so that kf˜ − f ∗ k2n is small with high probability over the noise w, where one uses the definition n kf − gk2n = 1X (f (xi ) − g(xi ))2 . n i=1 The work [YPW15] considers the case where f ∗ comes from a Hilbert space H of functions f such that f is guaranteed to be square integrable, and the map x 7→ f (x) is a bounded linear functional. The function f˜ is then defined to be the optimal solution to the Kernel Ridge Regression (KRR) problem of computing ) ( n X 1 (11) (yi − f (xi ))2 + λn · kf k2H f LS = argmin 2n f ∈H i=1 for some parameter λn . It is known that any H as above can be written as the closure of the set of all functions N X αi k(·, zi ), (12) g(·) = i=1 RN over all α ∈ and vectors z1 , . . . , zN for some positive semidefinite function k. FurtherPn kernel LS LS more, the optimal solution to Eq. (11) can be expressed as f = i=1 αi · k(·, xi ) for some choice of weight vector αLS , and it is known that kf LS − f ∗ kn will be small with high probability, over the randomness in w, if λn is chosen appropriately (see [YPW15] for background references and precise statements). After rewriting Eq. (11) using Eq. (12) and defining a matrix K with Ki,j = k(xi , xj ), one arrives at a reformulation for KRR of computing   −1  1 1 2 1 T 1 T 2 T LS · Ky, α K α − α Ky + λn α Kα = K + 2λn K α = argmin 2n n n n α∈Rn which can be computed in O(n3 ) time. The work [YPW15] then focuses on speeding this up, by instead computing a solution to the lower-dimensional problem   −1  1 1 1 1 T · ΠKy α ΠK 2 ΠT α − αT ΠKy + λn αT ΠKΠT α = ΠK 2 ΠT + 2λn ΠKΠT α̃LS = argmin m 2n n n n α∈R and then returning as f˜ the function specified by the weight vector α̃ = ΠT α̃LS . Note that once various matrix products are formed (where the running time complexity depends on the Π being used), one only needs to invert an m × m matrix thus taking O(m3 ) time. They then prove that kf˜ − f ∗ kn is small with high probability as long as Π satisfies two deterministic conditions (see the proof of Lemma 2 [YPW15, Section 4.1.2], specifically equation (26) in that work): 14 • Π is a (1/2)-subspace embedding for a particular low-dimensional subspace • kΠBk = O(kBk) for a particular matrix B of low stable rank (B is U D2 in [YPW15]). Note 1/2 ≤ k(ΠB)T ΠB−B T Bk1/2 +kBk, kΠBk = k(ΠB)T ΠBk1/2 ≤ k(ΠB)T ΠB − B T Bk + kB T Bk and thus it suffices for Π to provide the approximate matrix multiplication property for the product B T B, where B has low stable rank. The first bullet simply requires a subspace embedding in the standard sense, and for the second bullet [YPW15] avoided AMM by obtaining a bound on kΠBk directly by their own analyses for gaussian Π and the SRHT (in the gaussian case, it also follows from [RV13, Theorem 3.2]). Our result thus provides a unifying analysis which works for a larger and general class of Π, including for example sparse subspace embeddings. 3.4 k-means clustering In the works [BZMD15, CEM+ 15], the authors considered dimensionality reduction methods for k-means clustering. Recall in k-means clustering one is given n points x1 , . . . , xn ∈ Rd , as well as an integer k ≥ 1, and the goal is to find k points y1 , . . . , yk ∈ Rd minimizing n X i=1 k min kxi − yj k22 . j=1 That is, the n points can be partitioned arbitrarily into k clusters, then a “cluster center” should be assigned to each cluster so as to minimize sums of squared Euclidean distances of each of the n points to their cluster centers. It is a standard fact that once a partition P = {P1 , . . . , Pk } of the n points into clusters is fixed, the optimal cluster P centers to choose are the centroids of the points in each of the k partitions, i.e. yj = (1/|Pj |) · i∈Pj xi . One key observation common to both of the works [BZMD15, CEM+ 15] is that k-means clustering is closely related to the problem of low-rank approximation. More specifically, given a partition P = {P1 , . . . , Pk }, define the n × k matrix XP by   √ 1 , if i ∈ Pj |Pj | (XP )i,j = 0, otherwise Let A ∈ Rn×d have rows x1 , . . . , xn . Then the k-means problem can be rewritten as computing argminP kA − XP XPT Ak2F where P ranges over all partitions of {1, . . . , n} into k sets. It is easy to verify that the non-zero columns of XP are orthonormal, so XP XPT is the orthogonal projection onto the column space of XP . Thus if one defines S as the set of all rank at most k orthogonal projections obtained as XP XPT for some k-partition P, then the above can be rewritten as the constrained rank-k projection problem of computing argminP ∈S k(I − P )Ak2F . (13) 15 One can verify this by hand, since the rows of A are the points xi , and the ith row of P A for P = XP XPT is the centroid of the points in i’s partition in P. The work [CEM+ 15] showed that if S is any subset of projections of rank at most k (henceforth rank-k projections) and Π ∈ Rm×d satisfies certain technical conditions to be divulged soon, then if P̃ ∈ S satisfies k(I − P̃ )AΠT k2F ≤ γ · minP ∈S k(I − P )AΠT k2F , (14) then k(I − P̃ )Ak2F ≤ (1 + ε) · γ · minP ∈S k(I − P )Ak2F . (1 − ε) (15) One set of sufficient conditions for Π is as follows (see [CEM+ 15, Lemma 10]). Let Ak denote the best rank-k approximation to A and let Ak̄ = A − Ak . Define Z ∈ Rd×r for r = 2k by Z = Vr√, i.e. the top r right singular vectors of A are the columns of Z. Define B1 = Z T and B2 = kA kkF · (A − AZZ T ). Define B ∈ R(n+r)×d as having B1 as its first r rows and B2 as its lower k̄ n rows. Then [CEM+ 15, Lemma 10] states that Eq. (14) implies Eq. (15) as long as k(ΠB T )T (ΠB T ) − BB T k < ε, and kΠB2 k2F − kB2 k2F ≤ εk (16) (17) One can easily check kBk2 = 1 and kBk2F ≤ 3k, so the stable rank r̃(B) is at most 3k. Thus Eq. (16) is implied by the (3k, ε/2)-AMM property for B T , B T , and our results apply to show that Π can be taken to have m = O((k +log(1/δ))/ε2 ) rows to have success probability 1−δ for Eq. (16). Obtaining Eq. (17) is much simpler and can be derived from the JL moment property (see the proof of [KN14, Theorem 6.2]). Without our results on stable-rank AMM provided in this current work, [CEM+ 15] gave a different analysis, avoiding [CEM+ 15, Lemma 10], which required Π to have m = Θ(k · log(1/δ)/ε2 ) rows (note the product between k and log(1/δ) instead of the sum). 4 Stable rank and row selection As well as random projections, approximate matrix multiplication (and subspace embeddings) by row selection are also common in algorithms. This corresponds to setting Π to a diagonal matrix S with relatively few nonzero entries. Unlike random projections, there are no oblivious distributions of such matrices S with universal guarantees. Instead, S must be determined (either randomly or deterministically) from the matrices being embedded. There are two particularly algorithmically useful methods for obtaining such S. The first is importance sampling: independent random sampling of the rows, but with nonuniform sampling probabilities. This is analyzed using matrix Chernoff bounds [AW02], and for the case of k-dimensional subspace embedding or approximate matrix multiplication of rank-k matrices, it can produce O(k(log k)/ε2 ) samples [SS11]. The second method is the deterministic selection method given in [BSS12], often called “BSS”, choosing only O(k/ε2 ) rows. This still runs in polynomial time, but originally required many relatively expensive linear algebra steps and thus was slower in general; see [LS15] for runtime improvements. The matrix Chernoff methods can be extended to the stable-rank case, making even the log factor depend only on the stable rank, using “intrinsic dimension” variants of the bounds as presented in Chapter 7 of [Tro15]. Specifically, Theorem 6.3.1 of that work can be applied with each 16   n summands each equal to n1 p1i aTi bi − AT B , where ai is the ith row of A, and i is random with the probability of choosing a particular row i equal to kai k2 + kbi k2 pi = P 2 2 j kaj k + kbj k We here give an extension of BSS that covers low stable rank matrices as well. Theorem 5. Given an n by d matrix A such that kAk2 ≤ 1 and kAk2F ≤ k, and an ε ∈ (0, 1), there exists a diagonal matrix S with O(k/ε2 ) nonzero entries such that k(SA)T (SA) − AT Ak ≤ ε Such an S can be computed by a polynomial-time algorithm. When AT A is the identity, this is just the original BSS result. It ispalso stronger than Theorem 3.3 of [KMST10], implying it when A is the combination of the rows N/T · vi from that theorem statement with an extra column containing the costs, and a constant ǫ. The techniques in that paper, on the other hand, can prove a result comparable to Theorem 5, but with the row count scaling as k/ε3 rather than k/ε2 . Proof. The proof closely follows the original proof of BSS. However, for simplicity, and because the tight constants are not needed for most applications, we do not include [BSS12, Claim 3.6] and careful parameter-setting. At each step, the algorithm will maintain a partial approximation Z = (SA)T (SA) (the matrix “A” in [BSS12]), with S beginning as 0. Additionally, we keep track of upper and lower “walls” Xu and Xl ; in the original BSS these are just multiples of the identity. The final S will be returned by the algorithm (rescaled by a constant so that the average of the upper and lower walls is AT A). We will maintain the invariants tr(A(Xu − Z)−1 AT ) ≤ 1 tr(A(Z − Xl )−1 AT ) ≤ 1. (18) (19) These are the so-called upper and lower potentials from BSS. We also require Xu ≺ Z ≺ Xl ; recall M ≺ M ′ means that M ′ − M is positive definite. Note that unlike [BSS12], here we do not apply a change of variables making AT A the identity (to avoid confusion, since that would change the Frobenius norm). This is the reason for the slightly more complicated form of the potentials. In the original BSS, Xu and Xl were always scalar multiples of the identity (here, without the change of variables, that would correspond to always being multiples of AT A). [BSS12] thus simply represented them with scalars. Like BSS, we will increase Xu and Xl by multiples of AT A–however, the key difference from BSS is that they are initialized to multiples of the identity, rather than AT A. In particular, we may initialize Xu to kI and Xl to −kI. This is still good enough to get the spectral norm bounds we require here (as opposed to the stronger multiplicative approximation guaranteed by BSS). We will have two scalar values, δu and δl , depending only on ε; they will be set later. One step consists of 1. Choose a row ai from A and a positive scalar t, and add tai aTi to Z (via increasing the i component of S). 17 2. Add δu AT A to Xu and δl AT A to Xl . We will show that with suitable values of δu and δl , for any Z obeying the invariants there always exists a choice of i and t such that the invariants will still be true after the step is complete. This corresponds to Lemmas 3.3 through 3.5 of BSS. For convenience, we define, at a given step, the matrix functions of y Mu (y) = ((Xu + yAT A) − Z)−1 Ml (y) = (Z − (Xl + yAT A))−1 . The upper barrier value, after making a step of tai aTi and increasing Xu , is tr(A((Xu + δu AT A) − (Z + tai aTi ))−1 AT ). Applying the Sherman-Morrison formula, and cyclicity of trace, to the rank-1 update tai aTi , this can be rewritten as taT Mu (δu )AT AMu (δu )ai . tr(AMu (δu )AT ) + i 1 − taTi Mu (δu )ai Since the function f (y) = tr(AMu (y)AT ) is a convex function of y with derivative f ′ (y) = − tr(AMu (y)AT AMu (y)AT ), we have f (δu ) − f (0) ≤ −δu tr(AMu (δu )AT AMu (δu )AT ). Then the difference between the barrier before and after the step is at most taTi Mu (δu )AT AMu (δu )ai − δu tr(AMu (δu )AT AMu (δu )AT ). 1 − taTi Mu (δu )ai Constraining this to be no greater than zero, rewriting in terms of 1 t and pulling it out gives aTi Mu (δu )AT AMu (δu )ai 1 ≥ + aTi Mu (δu )ai . t δu tr(AMu (δu )AT AMu (δu )AT ) Furthermore, as long as 1t is at least this, Z will remain below Xu , since the barrier must approach infinity as t approaches the smallest value passing Xu . For the lower barrier value after the step, we get tr(A((Z + tai aTi ) − (Xl + δl AT A))−1 AT ). Again, applying Sherman-Morrison rewrites it as tr(AMl (δl )AT ) − taTi Ml (δl )AT AMl (δl )ai . 1 + taTi Ml (δl )ai Again, due to convexity the increase in the barrier from raising Xl is at most δl times the local derivative. The difference in the barrier after the step is then at most − taTi Ml (δl )AT AMl (δl )ai + δl tr(AMl (δl )AT AMl (δl )AT ). 1 + taTi Ml (δl )ai 18 This is not greater than zero as long as 1 aTi Ml (δl )AT AMl (δl )ai ≤ − aTi Ml (δl )ai . t δl tr(AMl (δl )AT AMl (δl )AT ) There is some value of t that works for ai as long as the lower bound for 1t is no larger than the upper bound. To show that there is at least one choice of i for which this holds, we look at the sum of all the lower bounds and compare to the sum of all the upper bounds. Summing the former over all i gets tr(AMu (δu )AT AMu (δu )AT ) + tr(AMu (δu )AT ) δu tr(AMu (δu )AT AMu (δu )AT ) and the latter gets tr(AMl (δl )AT AMl (δl )AT ) − tr(AMl (δl )AT ). δl tr(AMl (δl )AT AMl (δl )AT ) Finally, note that tr(AMu (δu )AT ) = tr(A((Xu + δu AT A) − Z)−1 AT ) ≤ tr(A(Xu − Z)−1 AT ) ≤ 1 and the lower barrier implies Z − Xl ≻ AT A, implying that as long as δl ≤ 12 , tr(AMl (δl )AT ) = tr(A(Z − (Xl + δl AT A))−1 AT ) ≤ 2 tr(A(Z − Xl )−1 AT ) ≤ 2. Thus, we can always make a step as long as δu and δl are set so that 1 1 +1 ≤ −2 δu δl and δl ≤ 12 . This is satisfied by δu = ε + 2ε2 δl = ε − 2ε2 . Before the first step, Xu and Xl can be initialized as kI and −kI, respectively. If the algorithm is then run for εk2 steps, we have: k T A A + 2kAT A + kI ε k  AT A + 3kI ε k T Xl = A A − 2kAT A − kI ε k T  A A − 3kI. ε pε ε ε ε T k Xu and k Xl both end up within 3εI of A A, so k Z (from k S) satisfies the requirements of the output for 3ε (one can simply apply this argument for ε/3). Furthermore, all the computations required to verify the preservation of invariants and compute explicit ts can be performed in polynomial time.  Xu = This obtains more general AMM as a corollary: 19 Corollary 1. Given two matrices A and B, each with n rows, and an ε ∈ (0, 1), there exists a diagonal matrix S with O(k/ε2 ) nonzero entries satisfying the (k, ε)-AMM property for A, B. Such an S can be computed by a polynomial-time algorithm. Proof. Apply Theorem 5 to a matrix X consisting of the columns of B √ , √ 2 max(kBk2 ,kBkF / k) √ A √ 2 max(kAk2 ,kAkF / k) appended to the columns of and use the resulting S. Note that X satisfies the conditions of that theorem, since concatenating the sets of columns at most adds the squares norms. (SA)T (SB) − AT B is a submatrix of √ of their spectral and√Frobenius T 2 max(kAk2 , kAkF / k) max(kBk2 , kBkF / k)((SX) (SX) − X T X), so its spectral norm is upper bounded by the spectral norm of that matrix, which in turn is bounded by the guarantee of Theorem 5.  Acknowledgments We thank Jaroslaw Blasiok for pointing out the connection between low stable rank approximate matrix multiplication and the analyses in [YPW15]. References [AC09] Nir Ailon and Bernard Chazelle. The fast Johnson-Lindenstrauss transform and approximate nearest neighbors. SIAM J. Comput., 39(1):302–322, 2009. [AL13] Nir Ailon and Edo Liberty. An almost optimal unrestricted fast Johnson-Lindenstrauss transform. ACM Transactions on Algorithms, 9(3):21, 2013. [AW02] Rudolf Ahlswede and Andreas J. Winter. Strong converse for identification via quantum channels. IEEE Transactions on Information Theory, 48(3):569–579, 2002. [Bou14] Jean Bourgain. An improved estimate in the restricted isometry problem. Geometric Aspects of Functional Analysis, 2116:65–70, 2014. [BSS12] Joshua D. Batson, Daniel A. Spielman, and Nikhil Srivastava. Twice-Ramanujan sparsifiers. SIAM J. Comput., 41(6):1704–1721, 2012. [BZMD15] Christos Boutsidis, Anastasios Zouzias, Michael W. Mahoney, and Petros Drineas. Randomized dimensionality reduction for k-means clustering. IEEE Transactions on Information Theory, 61(2):1045–1062, 2015. [CCF04] Moses Charikar, Kevin C. Chen, and Martin Farach-Colton. Finding frequent items in data streams. Theor. Comput. Sci., 312(1):3–15, 2004. [CEM+ 15] Michael B. Cohen, Sam Elder, Cameron Musco, Christopher Musco, and Mădălina Persu. Dimensionality reduction for k-means clustering and low rank approximation. In Proceedings of the 47th ACM Symposium on Theory of Computing (STOC), 2015. Full version at http://arxiv.org/abs/1410.6801v3. 20 [CLL+ 10] Pei-Chun Chen, Kuang-Yao Lee, Tsung-Ju Lee, Yuh-Jye Lee, and Su-Yun Huang. Multiclass support vector classification via coding and regression. Neurocomputing, 73(7-9):1501–1512, 2010. [CLM+ 15] Michael B. Cohen, Yin Tat Lee, Cameron Musco, Christopher Musco, Richard Peng, and Aaron Sidford. Uniform sampling for matrix approximation. In Proceedings of the 6th Annual Conference on Innovations in Theoretical Computer Science (ITCS), pages 181–190, 2015. [Coh16] Michael B. Cohen. Simpler and tighter analysis of sparse oblivious subspace embeddings. In Proceedings of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), to appear, 2016. [CW09] Kenneth L. Clarkson and David P. Woodruff. Numerical linear algebra in the streaming model. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing (STOC), pages 205–214, 2009. Full version at http://researcher.watson.ibm.com/researcher/files/us-dpwoodru/cw09.pdf. [CW13] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the 45th ACM Symposium on Theory of Computing (STOC), pages 81–90, 2013. Full version at http://arxiv.org/abs/1207.6365v4. [DKM06] Petros Drineas, Ravi Kannan, and Michael W. Mahoney. Fast Monte Carlo algorithms for matrices I: approximating matrix multiplication. SIAM J. Comput., 36(1):132–157, 2006. [DKS10] Anirban Dasgupta, Ravi Kumar, and Tamás Sarlós. A sparse Johnson-Lindenstrauss transform. In Proceedings of the 42nd ACM Symposium on Theory of Computing (STOC), pages 341–350, 2010. [DMM06] Petros Drineas, Michael W. Mahoney, and S. Muthukrishnan. Sampling algorithms for ℓ2 regression and applications. In Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1127–1136, 2006. [DMMW12] Petros Drineas, Malik Magdon-Ismail, Michael W. Mahoney, and David P. Woodruff. Fast approximation of matrix coherence and statistical leverage. Journal of Machine Learning Research, 13:3475–3506, 2012. [FR13] Simon Foucart and Holger Rauhut. A Mathematical Introduction to Compressive Sensing. Applied and Numerical Harmonic Analysis. Birkhäuser, 2013. [GM13] Alex Gittens and Michael W. Mahoney. Revisiting the nystrom method for improved large-scale machine learning. In Proceedings of the 30th International Conference on Machine Learning (ICML), pages 567–575, 2013. [HMT11] Nathan Halko, Per-Gunnar Martinsson, and Joel A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53(2):217–288, 2011. 21 [HR16] Ishay Haviv and Oded Regev. The restricted isometry property of subsampled Fourier matrices. In Proceedings of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), to appear, 2016. [HW71] David Lee Hanson and Farroll Tim Wright. A bound on tail probabilities for quadratic forms in independent random variables. Ann. Math. Statist., 42(3):1079–1083, 1971. [JL84] William B. Johnson and Joram Lindenstrauss. Extensions of Lipschitz mappings into a Hilbert space. Contemporary Mathematics, 26:189–206, 1984. [KMN11] Daniel M. Kane, Raghu Meka, and Jelani Nelson. Almost optimal explicit johnsonlindenstrauss families. In Proceedings of the 14th International Workshop on Randomization and Computation (RANDOM), pages 628–639, 2011. [KMST10] Alexandra Kolla, Yury Makarychev, Amin Saberi, and Shang-Hua Teng. Subgraph sparsification and nearly optimal ultrasparsifiers. In Proceedings of the Forty-second ACM Symposium on Theory of Computing, STOC ’10, pages 57–66, New York, NY, USA, 2010. ACM. [KN14] Daniel M. Kane and Jelani Nelson. Sparser Johnson-Lindenstrauss transforms. J. ACM, 61(1):4, 2014. [KVZ14] Anastasios T. Kyrillidis, Michail Vlachos, and Anastasios Zouzias. Approximate matrix multiplication with application to linear embeddings. CoRR, abs/1403.7683, 2014. [KW11] Felix Krahmer and Rachel Ward. New and improved Johnson-Lindenstrauss embeddings via the Restricted Isometry Property. SIAM J. Math. Anal., 43(3):1269–1281, 2011. [LBKW14] Yingyu Liang, Maria-Florina Balcan, Vandana Kanchanapally, and David P. Woodruff. Improved distributed principal component analysis. In Proceedings of the 27th Annual Conference on Advances in Neural Information Processing Systems (NIPS), pages 3113–3121, 2014. [LDFU13] Yichao Lu, Paramveer Dhillon, Dean Foster, and Lyle Ungar. Faster ridge regression via the subsampled randomized Hadamard transform. In Proceedings of the 26th Annual Conference on Advances in Neural Information Processing Systems (NIPS), 2013. [LMP13] Mu Li, Gary L. Miller, and Richard Peng. Iterative row sampling. In Proceedings of the 54th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 127–136, 2013. [LP86] François Lust-Piquard. Inégalités de Khintchine dans Cp (1 < p < ∞). C. R. Math. Acad. Sci. Paris, 303(7):289–292, 1986. [LPP91] François Lust-Piquard and Gilles Pisier. Noncommutative Khintchine and Paley inequalities. Ark. Mat., 29(2):241–260, 1991. 22 [LS15] Yin Tat Lee and He Sun. Constructing linear sized spectral sparsification in almost linear time. In Proceedings of the 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 250–269, 2015. [LWM+ 07] Edo Liberty, Franco Woolfe, Per-Gunnar Martinsson, Vladimir Rokhlin, and Mark Tygert. Randomized algorithms for the low-rank approximation of matrices. Proceedings of the National Academy of Sciences, 104(51):20167–20172, 2007. [Mah11] Michael W. Mahoney. Randomized algorithms for matrices and data. Foundations and Trends in Machine Learning, 3(2):123–224, 2011. [MM13] Xiangrui Meng and Michael W. Mahoney. Low-distortion subspace embeddings in input-sparsity time and applications to robust linear regression. In Proceedings of the 45th ACM Symposium on Theory of Computing (STOC), pages 91–100, 2013. [MZ11] Avner Magen and Anastasios Zouzias. Low rank matrix-valued Chernoff bounds and approximate matrix multiplication. In Proceedings of the 22nd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1422–1436, 2011. [NN13] Jelani Nelson and Huy L. Nguy˜ên. OSNAP: Faster numerical linear algebra algorithms via sparser subspace embeddings. In Proceedings of the 54th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 117–126, 2013. [NN14] Jelani Nelson and Huy L. Nguy˜ên. Lower bounds for oblivious subspace embeddings. In Proceedings of the 41st International Colloquium on Automata, Languages, and Programming (ICALP), pages 883–894, 2014. [NPW14] Jelani Nelson, Eric Price, and Mary Wootters. New constructions of RIP matrices with fast multiplication and fewer rows. In Proceedings of the 25th Annual ACMSIAM Symposium on Discrete Algorithms (SODA), 2014. [RHV11] Nima Reyhani, Hideitsu Hino, and Ricardo Vigário. New probabilistic bounds on eigenvalues and eigenvectors of random kernel matrices. In Proceedings of the TwentySeventh Conference on Uncertainty in Artificial Intelligence (UAI), pages 627–634, 2011. [RV13] Mark Rudelson and Roman Vershynin. Hanson-Wright inequality and sub-gaussian concentration. Electronic Communications in Probability, 18:1–9, 2013. [Sar06] Tamás Sarlós. Improved approximation algorithms for large matrices via random projections. In Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 143–152, 2006. [SS11] Daniel A. Spielman and Nikhil Srivastava. Graph sparsification by effective resistances. SIAM J. Comput., 40(6):1913–1926, 2011. [Tro11] Joel A. Tropp. Improved analysis of the subsampled randomized Hadamard transform. Adv. Adapt. Data Anal., 3(1–2):115–126, 2011. [Tro15] Joel A Tropp. An introduction to matrix concentration inequalities. arXiv preprint arXiv:1501.01571, 2015. 23 [TZ12] Mikkel Thorup and Yin Zhang. Tabulation-based 5-independent hashing with applications to linear probing and second moment estimation. SIAM J. Comput., 41(2):293– 331, 2012. [Woo14] David P. Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10(1-2):1–157, 2014. [YPW15] Yun Yang, Mert Pilanci, and Martin J. Wainwright. Randomized sketches for kernels: Fast and optimal non-parametric regression. CoRR, abs/1501.06195, 2015. Appendix A OSE moment property In the following two subsections we show the OSE moment property for both subgaussian matrices and the SRHT. A.1 Subgaussian matrices In this section, we show the OSE moment property for distributions satisfying a JL condition, namely the JL moment property. This includes matrices with i.i.d. entries that are mean zero and subgaussian with variance 1/m. Definition 4. [KMN11] Let D be a distribution over Rm×n . We say D has the (ε, δ, p)-JL moment property if for all x ∈ Rn of unit norm, E |kΠxk2 − 1|p < εp · δ. Π∼D The following theorem follows from the proof of Lemma 8 in the full version of [CW13]. We give a different proof here inspired by the proof of [FR13, Theorem 9.9], which is slightly shorter and more self-contained. A weaker version appears in [Sar06, Lemma 10], where the size bound on X is (Cd/ε)d for a constant C ≥ 1 instead of simply C d . Theorem 6. Let U ∈ Rn×d with orthonormal columns be arbitrary. Then there exists a set X ⊂ Rn , |X| ≤ 9d , each of norm at most 1 such that k(ΠU )T (ΠU ) − Ik ≤ 2 · sup |kΠxk2 − 1| x∈X Proof. We will show that if supx∈X |kΠxk2 − 1| < ε/2 then k(ΠU )T (ΠU ) − Ik < ε, where ε > 0 is some positive real. Define A = (ΠU )T (ΠU ) − I. Since A is symmetric, kAk = sup |xT Ax| = sup | hAx, xi | kxk=1 kxk=1 Let Tγ be a finite γ-net of ℓd2 , i.e. Tγ ⊂ ℓd2 and for every x ∈ Rd of unit norm there exists a y ∈ Tγ such that kx − yk2 ≤ γ. As we will see soon, there exists such a Tγ of size at most (1 + 2/γ)d . We will show that if Π satisfies the JL condition on T ′ = {U y : y ∈ T1/4 } with error ε/2, then kAk < ε; that is, (1 − ε/2)kxk22 ≤ kΠxk22 ≤ (1 + ε/2)kxk22 for all x ∈ T ′ . 24 Let x be a unit norm vector that achieves the sup above, i.e. kAk = | hAx, xi |. Then, letting y be the closest element of Tγ to x, kAk = | hAx, xi | = | hAy, yi + hA(x + y), x − yi | ε ≤ + kAk · kx + yk · kx − yk 2 ε ≤ + 2γkAk. 2 Rearranging gives kAk ≤ ε/(2(1 − 2γ)), which is ε for γ = 1/4. Now we must show that we can take |Tγ | ≤ (1 + 2/γ)d . The following is a standard covering/packing argument for bounding metric entropy. Imagine packing as many radius-(γ/2) ℓ2 balls as possible into Rd , centered at points with at most unit norm and such that these balls do not intersect each other. Then these balls all fit into a radius-(1 + γ/2) ℓ2 ball centered at the origin, and thus the number of balls we have packed is at most the ratio of the volume of a (1 + γ/2) ball to the volume of a γ/2 ball, which is ((1 + γ/2)/(γ/2))d = (1 + 2/γ)d . Now, take those maximally packed radius-(γ/2) balls and double each of their radii to be radius γ. Then every point in the unit ball is contained in at least one of these balls by the triangle inequality, which is exactly the property we wanted from Tγ (Tγ is just the centers of these balls). To see why every point is in at least one such ball, if some x ∈ Rd of unit norm is not contained in any doubled ball then a γ/2-ball about x would be disjoint from our maximally packed γ/2 balls, a contradiction.  Lemma 4. If D satisfies the (ε, δ, p)-JL moment property, then D satisfies the (2ε, 9d δ, d, p)-OSE moment property Proof. By Theorem 6, there exists a subset X ⊂ Rn of at most 9d points such that E k(ΠU )T (ΠU ) − Ikp ≤ 2p · E sup |kΠxk2 − 1|p x∈X X p ≤2 · E |kΠxk2 − 1|p p x∈X d p ≤2 ·9 ·ε ·δ = (2ε)p · 9d δ.  Rm×n Ω(log(1/δ)/ε2 ) It is known that if D is a distribution over with m = and for Π ∼ D, the entries of Π are independent subgaussians with mean zero and variance 1/m, then D has the (ε/2, δ, Θ(log(1/δ)))-JL moment property [KMN11]. Thus such a matrix has the (ε, δ, d, Θ(d + log(1/δ)))-OSE moment property for δ < 2−d by Lemma 4. A.2 Subsampled Randomized Hadamard Transform (SRHT) √ Recall the SRHT is the m × n matrix Π = (1/ m) · SHD for n a power of 2 where D has diagonal entries α1 , . . . , αn that are independent and uniform in {−1, 1}, H is the unnormalized Hadamard log n transform with Hi,j = (−1)hi,ji (treating i, j as elements of the vector space F2 2 ), and S is a sampling matrix. That is, the rows of S are independent, and each row has a 1 in a uniformly 25 random location and zeroes elsewhere. A similar construction is where S is an n × n diagonal matrix with Si,i = ηi being independent Bernoulli random variables each of expectation m/n (so that, in expectation, S selects m rows from HD). We will here show the moment property for this latter variant since it makes the notation a tad cleaner, though the analysis we present holds essentially unmodified for the former variant as well. Our analysis below implies that the SRHT provides an ε-subspace embedding for d-dimensional subspaces with failure probability δ for m = O(ε−2 (d + log(1/(εδ))) log(d/δ)). This is an improvement over analyses we have found in previous works. The analysis in [Tro11] only considers constant ε and δ = O(1/d) and for these settings achieves m = O((d+log n) log d), which is still slightly worse than our bound for this setting of ε, δ (our bound removes the log n and achieves any 1/ poly(d) failure probability with the same m). The analysis in [LDFU13] only allows failure probabilities greater than n/ed . They show failure probability δ + n/ed is achieved for m = O(d log(d/δ)/ε2 ), which is also implied by our result if m ≤ n (which is certainly the case in applications for the SRHT to be useful, since otherwise one could use the n × n identity matrix as a subspace embedding). The reason for these differences is that previous works operate by showing HDU has small row norms with high probability over D; since there are n rows, some logarithmic dependence on n shows up in a union bound. After this conditioning, one then shows that S works. Our analysis does not do any such conditioning at all. Interestingly, such a lossy conditioning approach was done even for the case d = 1 [AC09]. As we see below, these analyses can be improved (essentially the log n terms that appear from the conditioning approach can be very slightly improved to log m). Our main motivation in re-analyzing the SRHT was not to improve the bounds, but simply to clearly demonstrate that the SRHT satisfies the OSE moment property. The fact that our moment based analysis below (very slightly) improved m was a fortunate accident. Before we present our proof of the OSE moment property for the SRHT, we state a theorem we will use. For a random matrix M , we henceforth use kM kp to denote (E kM kpSp )1/p where kM kSp is the Schatten-p norm, i.e. the ℓp norm of the singular values of M . Theorem 7 (Non-commutative Khintchine inequality [LP86, LPP91]). Let X1 , . . . , Xn be fixed real matrices and σ1 , . . . , σn be independent Rademachers. Then ( ) X X X √ T 1/2 T 1/2 Xi Xi ) kSp , k( Xi Xi ) kSp . σi Xi kp . p · max k( ∀p ≥ 1, k i i i We will also make use of the Hanson-Wright inequality. Theorem 8 (Hanson-Wright [HW71]). For (σi ) independent Rademachers and A symmetric, ∀p ≥ 1, kσ T Aσ − E σ T Aσkp . √ p · kAkF + p · kAk. We now present our main analysis of this subsection. Theorem 9. The SRHT satisfies the (ε, δ, d, p)-moment property for p = log(d/δ) as long as m & ε−2 (d log(d/δ) + log(d/δ) log(m/δ)) ≃ ε−2 (d + log(1/(εδ)) log(d/δ)). Proof. For a fixed U ∈ Rn×d with orthonormal columns, we would like to bound E k α,η 1 (SHDU )T (SHDU ) − Ikp . m 26 Since p ≥ log d we have k 1 1 (SHDU )T (SHDU ) − Ik ≃ k (SHDU )T (SHDU ) − IkSp m m (20) by Hölder’s inequality. Also, let z1 , . . . , zn be the rows of HDU , as column vectors, so that n 1 1 X (SHDU )T (SHDU ) = ηi zi ziT . m m (21) i=1 P Note also i zi ziT = (HDU )T HDU = n · I for any D, so the identity matrix is the expectation, over η, of the right hand side of Eq. (21) for any D. Thus we are left wanting to bound k 1 X ′ T 1 X ηi zi ziT − E′ ηi zi zi kp η m m i i where the ηi′ are identically distributed as the ηi but independent of them. Below we use kf (X)kLp (X) to denote (EX |f (X)|p )1/p . Also we assume p is an integer multiple of 4, so that kAkSp for real symmetric A equals (tr(Ap ))1/p and kAkSp/2 = (tr(Ap/2 ))2/p . Thus for (σi ) independent Rademachers, k 1 X 1 X ′ T 1 X ηi zi ziT −Ikp = k ηi zi ziT − E′ ηi zi zi kp η m m m i i i 1 X 1 X ′ T T = kk ηi zi zi − E′ ηi zi zi kLp (η) kLp (α) η m m i i X 1 X ≤ kk ηi zi ziT − ηi′ zi ziT kLp (η,η′ ) kLp (α) (Jensen’s inequality) m i i X 1 ·k (ηi − ηi′ )zi ziT kp = m i X 1 = ·k σi (ηi − ηi′ )zi ziT kp (equal in distribution) m i X 2 ≤ ·k σi ηi zi ziT kp (triangle inequality) m i √ X p . · k( ηi kzi k22 · zi ziT )1/2 kp (Theorem 7) m i !1/p √ X p p T p/2 (kM kpSp = tr(M p )) · E (max ηi kzi k2 ) · tr(( ηi zi zi ) ) ≤ i m i √ X p ≤ · k max ηi kzi k22 k1/2 · (E tr(( ηi zi ziT )p/2 )2 )1/2p (Cauchy-Schwarz) p i m i √ X p · k max ηi kzi k22 k1/2 ηi zi ziT )p ))1/2p (Cauchy-Schwarz) ≤ p · (d · E tr(( i m i √ X p . · k max ηi kzi k22 k1/2 ηi zi ziT kp1/2 (since d1/p ≤ 2) p ·k i m i 27 (22) (23) ≤ r 1 X p 1/p ηi zi ziT − Ik1/2 · k max ηi kzi k22 k1/2 +k p ) (triangle inequality) p · (d i m m i (24) P T p/2 )2 = Eq. (23) follows since if βi are the singular values of M = i ηi zi zi , then tr(M P p/2 2 ( i βi ) , and the rank of M , and hence the number of summands βi , is at most d. Letting p 1/2 1/2 1 P T Q = km and R = p/m · k maxi ηi kzi k22 kp , combining Eq. (22) and Eq. (24) i ηi zi zi − Ikp Q2 . R + RQ implying that for some fixed constant C > 0, we have Q2 − CRQ − CR ≤ 0.√This implies that Q is at most the larger root of the associated quadratic equation, i.e. Q . max{ R, R}, or equivalently k 1 X ηi zi ziT − Ikp . max{R, R2 } m (25) i 1/2 It only remains to bound R, which in turn amounts to bounding k maxi ηi kzi k22 kp . Define q = max{p, log m}, and note k · kp ≤ k · kq . Then k max ηi kzi k22 kq i =  ≤ E max ηiq (kzi k22 )q α,η i E α,η = ≤ = =   !1/q E η q (kzi k22 )q α,η i !1/q i i  ηiq (kzi k22 )q X X 1/q 1/q n · max E ηiq (kzi k22 )q i α,η n · max(E ηiq ) · (E(kzi k22 )q ) η α i 1/q m · max E(kzi k22 )q ) i 1/q (α, η independent) α ≤ 2 · max kkzi k22 kq (m1/q ≤ 2 by choice of q) i = 2 · max kαT Ũi ŨiT αkq i = 2 · max(d + kαT Ũi ŨiT α − E αT Ũi ŨiT αkq ) (triangle inequality) i (26) where Ũi is the matrix with (Ũi )k,j = Hi,k · Uk,j . Of particular importance for us is the identity ŨiT Ũi = I. Then by Eq. (26) and Theorem 8, √ q · kŨi ŨiT kF + q · kŨi ŨiT k p = d + qd + q k max ηi kzi k22 kq . d + i 28 ≤ 3 · (d + q) (AM-GM inequality) 2 so that R. r which when combined with Eq. (25) gives 1 X ηi zi ziT − Ikp . k m i p p · d + q, m r p p · (d + q) + · (d + q). m m Thus the OSE moment property is satisfied by our choices of m, p in the theorem statement. A.3  Composing dimensionality reducing maps supporting AMM As discussed in Remark 3, to obtain both a good number of rows for Π as well as fast multiplication for ΠA, ΠB, one may wish to set Π as the composition Π = Π1 Π2 , where Π1 has the correct number m1 = O(k/ε2 ) of rows (e.g. a matrix of subgaussian entries), whereas Π2 maps to a small but suboptimal number m2 of rows (e.g. the SRHT) but supports fast embedding to compute Π2 A. We show here that composing maps each supporting AMM yields a final map also giving AMM. As discussed in Corollary 1, without loss of generality we can assume A = B. Also, as discussed in Remark 1, we can focus on achieving Eq. (3) where the number of rows of Π should depend on the stable rank r̃ and not rank r of A. The key is to note the following simple triangle inequality: k(ΠA)T (ΠA) − AT Ak ≤ k(Π1 Π2 A)T (Π1 Π2 A) − (Π2 A)T (Π2 A)k + k(Π2 A)T (Π2 A) − AT Ak . (27) {z } | {z } | α β The results of this work show that to achieve the desired β ≤ εkAk2 , it suffices that the number of rows of Π2 need only depend on r̃ and not r, as desired. The trouble is that for α, the number of rows of Π1 will need to depend on the stable rank r̃ ′ of Π2 A and not r̃. Furthermore, the error will be α ≤ εkΠ2 Ak2 and not α ≤ εkAk2 . Thus, we must obtain good bounds on both r̃ ′ and kΠ2 Ak. To achieve this, note kΠ2 Ak = k(Π2 A)T (Π2 A)k1/2 = kAk ± k(Π2 A)T (Π2 A) − AT Ak1/2 (28) kΠ2 AkF = tr((Π2 A)T (Π2 A))1/2 = kAkF ± k(Π2 A)T (Π2 A) − AT AkF (29) and Thus, if we condition on β = k(Π2 A)T (Π2 A) − AT Ak ≤ εkAk2 (which we already discussed above), then indeed we have kΠ2 Ak = Θ(kAk) by Eq. (28). Also, [KN14, Theorem 6.2] implies k(Π2 A)T (Π2 A) − AT AkF ≤ εkAk2F with probability 1 − δ as long as Π comes from a distribution satisfying the (O(ε), δ, ℓ)-JL moment property for some ℓ ≥ 2 (which is just the (O(ε), δ, 1, ℓ)-OSE moment property in the terminology of this work). If this holds, then kΠ2 AkF = Θ(kAkF ) by Eq. (29), and thus r̃ ′ = Θ(r̃), as desired. Then overall, we have that the left hand side of Eq. (27) is at most ε · kΠ2 Ak2 + ε · kAk2 = O(ε) · kAk2 as desired, in which both Π1 and Π2 need only provide AMM with error ε for matrices both of stable rank O(r̃). 29 Remark 4. An even slicker argument that works in the case when Π1 , Π2 are both drawn from distributions satisfying the (ε, δ, k, ℓ)-OSE moment property is to observe that the distribution of the product Π1 Π2 itself satisfies the OSE moment property. Indeed, letting kZkp denote (E |Z|p )1/p for a scalar random variable Z, and letting U ∈ Rn×k denote a matrix with orthonormal columns, kk(Π1 Π2 U )T Π1 Π2 U − Ikkℓ < εδ1/ℓ kkΠ2 U k2 kℓ (Lemma 2) = εδ1/ℓ kk(Π2 U )T Π2 U kkℓ ≤ εδ1/ℓ (1 + kk(Π2 U )T Π2 U − Ikkℓ ) (triangle inequality) ≤ εδ1/ℓ (1 + εδ1/ℓ ) In the first line we used that when A = B in Lemma 2, Π1 need only satisfy the OSE moment property with parameter k instead of 2k (since then the span of the columns of both A and B has dimension at most k). Thus the distribution of the product Π1 Π2 satisfies the (O(ε), O(δ), k, ℓ)-OSE moment property. 30
8cs.DS
Observation of implicit complexity by non confluence Guillaume Bonfante Nancy University guillaume(dot)bonfante(at)loria(dot)fr We propose to consider non confluence with respect to implicit complexity. We come back to some well known classes of first-order functional program, for which we have a characterization of their intentional properties, namely the class of cons-free programs, the class of programs with an interpretation, and the class of programs with a quasi-interpretation together with a termination proof by the product path ordering. They all correspond to PTIME. We prove that adding non confluence to the rules leads to respectively PTIME, NPTIME and PSPACE. Our thesis is that the separation of the classes is actually a witness of the intentional properties of the initial classes of programs. In implicit complexity theory, one of the issues is to characterize large classes of programs, not extensionally but intentionally. That is, for a given class of functions, to delineate the largest set of programs computing this class. One of the issues with this problem is that it is hard to compare (classes of) programs. Indeed, strict syntactical equality is definitely too restrictive, but larger (the interesting ones) relations are undecidable. So, comparing theories (defining their own class of programs) is rather complicated. Usually, one gives a remarkable example, illustrating the power of the theory. We propose here an other way to compare sets of programs. The idea is to add a new feature–in the present settings, non determinism– to two programming languages. Intuitively, if a function can be computed with this new feature in a language L1 but non in the language L2 , we say that L1 is more powerful than L2 . Let us formalize a little bit our intuition. Suppose for the discussion that programs are written as rewriting systems, that is, programming languages are classes of rewriting systems. Let us say furthermore that a program p is simulated by ℓ→r ℓ′ →r ′ q whenever each step of rewriting in t → u ∈ p can be simulated by a rewriting step t ′ → u′ ∈ q. Equivalence of languages L1 and L2 states that any program in L1 is simulated by a program in L2 and vice versa. Given a programming language L, its non deterministic extension L.n is the programming language obtained by adding to L an oracle choose(r1 , r2 ) which, given two rules r1 and r2 which can be defined in L, applies the ”right” rule depending on the context. So, given some p ∈ L, both p ∪ {r1 } and p ∪ {r2 } are supposed to be in L, but not necessarily p ∪ {r1 , r2 }. Suppose now, that we are given two programming languages L1 and L2 such that functions computed in L1 .n are strictly included in those in L2 .n. Then, L1 cannot simulate L2 . Ad absurdum, suppose that L1 can simulate L2 , take f computed by p2 ∈ L2 .n but not in L1 .n. Then, each rule ℓ → r in p2 is simulated by a rule ℓ′ → r′ in some program p1 ∈ L1 . But then, the derivation t1 → t2 → · · · → tn in L2 .n can be simulated by some derivation t1′ → t2′ → · · · → tn′ in L1 .n. This leads to the contradiction. It is clear that the notion of equivalence we took for the discussion is very strong. However, we believe that the argument would hold in a larger context. In this paper, we observe three programming languages, • programs with a polynomially bounded constructor preserving interpretation (F.cons) which extend cons-free programs, 0 Work partially supported by project ANR-08-BLANC-0211-01 (COMPLICE) P. Baillot (Ed.): Workshop on Developments in Implicit Computational complExity (DICE 2010). EPTCS 23, 2010, pp. 15–29, doi:10.4204/EPTCS.23.2 Observation of implicit complexity by non confluence 16 • programs with (polynomial) strict interpretation (F.SI) and • programs with a quasi-interpretation together with a proof of termination by PPO, written F.QI.PPO. These three languages characterize P TIME . The first one is a new result, the two latter ones are respectively proved in [2] and [3]. F.QI.PPO F.cons F.SI    = P TIME P TIME = P TIME Their non deterministic observation characterize P TIME , NP TIME and P SPACE . The second characterization has been proven in [2]. F.QI.PPO.n F.cons.n F.SI.n  P TIME   ? 6= NP TIME ? 6= P SPACE The issue of confluence of Term Rewriting Systems has been largely studied, see for instance [19]. It benefits from some nice properties, for instance it is modular and algorithms are given to automatically compute the confluence up to termination. It is clear that there is also an intrinsic motivation for a study of non confluent programs. It would not be reasonable to cover all the researches dealing with this issue. But, let us make three remarks. First, since non-confluence can give us some freedom to write programs, it is of interest to observe what new functions this extra feature allows us to compute. From our result about non-confluent programs in F.cons.n, one may extract a compilation procedure to compute them ”deterministically”. Second, Kristiansen and Mender in [15, 16] have proposed a scale –a la Grzegorczyk, using non determinism, to characterize LINSPACE . Finally, one should keep in mind characterizations in the logical framework. Let us mention for instance the characterization of P SPACE given in [7]. It is an extension of a characterization of P TIME , and thus, we think that their construction is a good candidate for observation as presented above. 1 Preliminaries We suppose that the reader has familiarity with first-order rewriting. We briefly recall the context of the theory, essentially to fix the notations. Dershowitz and Jouannaud’s survey [6] of rewriting is a good entry point for beginners. Let X denote a (countable) set of variables. Given a signature Σ, the set of terms over Σ and X is denoted by T(Σ, X ) and the set of ground terms, that is terms without variables, by T(Σ). The size |t| of a term t is defined as the number of symbols in t. For example the size of the term f (a, x) is 3. A context is a term C with a particular variable ♦. If t is a term, C[t] denotes the term C where the variable ♦ has been replaced by t. 1.1 Syntax of programs Let C be a (finite) signature of constructor symbols and F a (finite) signature of function symbols. Thus, we are given an algebra of constructor terms T(C , X ). A rule is a pair (ℓ, r), next written ℓ → r, where: Guillaume Bonfante 17 • ℓ = f(p1 , · · · , pn ) where f ∈ F and pi ∈ T(C , X ) for all i = 1, . . . , n, • and r ∈ T(C ∪ F , X ) is a term such that any variable occuring in r also occurs in ℓ. Definition 1. A program is a quadruplet f = hX , C , F , E i such that E is a finite set of rules. We distinguish among F a main function symbol whose name is given by the program name f. F denotes the set of programs. ∗ + The set of rules induces a rewriting relation →. The relation → is the transitive closure of →, and → is the reflexive and transitive closure of →. Finally, we say that a term t is a normal form if there is no ! ∗ term u such that t → u. Given two terms t and u, t →u denotes the fact that t →u and u is a normal form. All along, when it is not explicitly mentioned, we suppose programs to be confluent, that is, the rewriting relation is confluent. The domain of the computed functions is the constructor term algebra T(C ). The program f = hX , C , F , E i computes a partial function JfK : T(C )n → T(C ) defined as follows. For every u1 , · · · , un ∈ ! T(C ), JfK(u1 , · · · , un ) = v iff f(u1 , · · · , un )→v and v is a constructor term. Definition 2 (Call-tree). Suppose we are given a program hX , C , F , E i. Let ( f ,t1 , . . . ,tn ) be the relation ∗ (g, u1 , . . . , um ) ⇔ f (t1 , . . . ,tn ) → C[g(v1 , . . . , vm )]→C[g(u1 , . . . , um )] where f and g are function symbols, C is a context and t1 , . . . ,tn , u1 , . . . , um are constructor terms. Given a function symbol f and constructor terms t1 , . . . ,tn , the relation defines a tree whose root is ( f ,t1 , . . . ,tn ) η ′ . The relation + is the transitive closure of . and η ′ is a daughter of η iff η 1.2 Interpretations of programs Given a signature Σ, a Σ-algebra on a domain A is a mapping L− M which associates to every n-ary symbol f ∈ Σ an n-ary function L f M : An → A. Such a Σ-algebra can be extended to terms by: • Lx M = 1A , that is the identity on A, for x ∈ X , • L f (t1 , . . . ,tm ) M = comp(L f M, Lt1 M, . . . , Ltm M) where comp is the composition of functions. Given a term t with n variables, Lt M is a function An → A. Definition 3. Given an ordered set (A, <) and a program hX , C , F , E i, let us consider a (C ∪ F )algebra L− M on A. It is said to: 1. be strictly monotonic if for any symbol f , the function L f M is a strictly monotonic function, that is if xi > x′i , then L f M(x1 , . . . , xn ) > L f M(x1 , . . . , x′i , . . . , xn ), 2. be weakly monotonic if for any symbol f , the function L f M is a weakly monotonic function, that is if xi ≥ x′i , then L f M(x1 , . . . , xn ) ≥ L f M(x1 , . . . , x′i , . . . , xn ), 3. have the weak sub-term property if for any symbol f , the function L f M verifies L f M(x1 , . . . , xn ) ≥ xi with i ∈ 1, . . . , n, 4. to be strictly compatible (with the rewriting relation) if for all rules ℓ → r, Lℓ M > Lr M, 5. to be weakly compatible if for all rules ℓ → r, Lℓ M ≥ Lr M, Observation of implicit complexity by non confluence 18 Definition 4. Given an ordered set (A, <) and a program hX , C , F , E i, a (C ∪ F )-algebra on A is said to be a strict interpretation whenever it verifies (1), (3), (4). It is a quasi-interpretation whenever it verifies (2), (3), (5). It is a monotone interpretation whenever it verifies (2) and (5). Clearly, a strict interpretation is a quasi-interpretation which itself is a monotone interpretation.When we want to speak arbitrarily of one of those concepts, we use the generic word ”interpretation”. We also use this terminology to speak about the function L f M given a symbol f . Finally, by default, A is chosen to be the set of real non negative numbers with its usual ordering. Moreover, we restrict the interpretations over the real numbers to be Max-Poly functions, that is functions obtained by finite compositions of the constant functions, maximum, addition and multiplication. MaxPoly denotes the set of these functions. Example 1. Equality on binary words in {0, 1}∗ , boolean operations, membership in a list (built on cons, nil) are computed as follows. ε =ε i(x) = i(y) i(x) = j(y) or(tt, y) or(ff, y) and(tt, y) and(ff, y) if tt then y else z if ff then y else z in(a, nil) in(a, cons(b, l)) → tt → x = y with i ∈ {0, 1} → ff with i 6= j ∈ {0, 1} → tt → y → y → ff → y → z → ff → if a = b then tt else in(a, l) Such a program has the strict interpretation1 given by: Lε M = Ltt M = Lff M = Lnil M = 1 Li M(x) = x + 1 with i ∈ {0, 1} Lcons M(x, y) = x + y + 1 L=M(x, y) = Lor M(x, y) = Land M(x, y) = x + y Lif then else M(x, y, z) = x + y + z Lin M(x, y) = (x + 2) × y Definition 5. The interpretation of a symbol f is said to be additive if it has the shape ∑i xi + c. A program with an interpretation is said to be additive when its constructors are additive. 1.3 Termination by Product Path Ordering Let us recall that the Product Path Ordering is a particular form of the Recursive Path Orderings, a class of simplification orderings (and so well-founded). Pioneers of this subject include Plaisted [17], Dershowitz [5], Kamin and Lévy [12]. 1 To simplify the verification of inequalities, interpretations are taken in [1, ∞[. Guillaume Bonfante 19 s = ti or s ≺ ppo ti s ≺ ppo f(. . . ,ti , . . .) f∈F ∀i si ≺ ppo f(t1 , · · · ,tn ) c(s1 , · · · , sm ) ≺ ppo f(t1 , · · · ,tn ) ∀i si ≺ ppo f(t1 , · · · ,tn ) f ≈F g C f ∈ F,c ∈ C g ≺F f g(s1 , · · · , sm ) ≺ ppo f(t1 , · · · ,tn ) (s1 , · · · , sn ) ≺ pppo (t1 , · · · ,tn ) S f, g ∈ F ∀i si ≺ ppo f(t1 , · · · ,tn ) g(s1 , · · · , sn ) ≺ ppo f(t1 , · · · ,tn ) f, g ∈ F Figure 1: Definition of ≺ ppo Finally, let us mention that Krishnamoorthy and Narendran in [14] have proved that deciding whether a program terminates by Recursive Path Orderings is a NP-complete problem. Let Σ be a preorder on a signature Σ, called quasi-precedence or simply precedence. We write ≺Σ for the induced strict precedence and ≃Σ for the induced equivalence relation on Σ. Usually, the context makes clear what Σ is, and thus, we drop the subscript Σ. Definition 6. Given an ordering  over terms T(Σ), the product extension of  over sequences, written  p , is defined as (s1 , . . . , sk ) ≺ p (t1 , . . . ,tk ) iff • for all i ≤ k : si  ti and, • there is some j ≤ k such that si ≺ ti . where ≺ is the strict part of . Definition 7. Given a program hX , C , F , E i and a precedence F over function symbols, the Product Path Ordering ≺ ppo is defined as the least ordering verifying rules given in Figure 1. 1.4 Characterizations in the confluent case Theorem 1 (Bonfante, Cichon, Marion and Touzet [2]). Functions computed by programs with additive strict interpretation are exactly P TIME functions. It is Theorem 4 in [2], first item. Theorem 2 (Bonfante, Marion and Moyen [3]). Functions computed by programs with • an additive quasi-interpretation and • a termination proof by PPO are exactly P TIME functions. The programs of this latter theorem are mentioned as RPOQI Pro -programs in [3], Theorem 48. 20 2 Observation of implicit complexity by non confluence Constructor preserving interpretations It is well known that the interpretations above can be used to bound both the length of the computations and the size of terms during the computations (see for instance [9, 18]). Here we show that interpretations also cope with syntactic constraints. More precisely, programs with polynomial constructor preserving interpretations generalize cons-free programs [11]. Let us consider a signature C , the signature of constructors in the sequel. S(C ) denotes the set of finite non-empty sets of terms in T(C ). Let E denotes the sub-term relation on terms. On S(C ), we define E∗ as follows: m E∗ m′ iff ∀t ∈ m : ∃t ′ ∈ m′ : t E t ′ . As an ordering on sets, for interpretations, we will use the inclusion relation. One may observe that m ⊆ m′ =⇒ m E∗ m′ . Definition 8. Let us consider a monotone interpretation L− M of a program hX , C , F , E i over (S(C ), ⊆). We say that it preserves constructors if 1. for any constructor symbol c ∈ C , Lc M(m1 , . . . , mk ) = {c(t1 , . . . ,tk ) | ti ∈ mi , i = 1, . . . , k}. 2. given a rule f (p1 , · · · , pn ) → r and a ground substitution σ , for all u E r, Lσ (u) M E∗ Lσ ( f (p1 , · · · , pn )) M ∪ni=1 Lσ (pi ) M. By extension, we say that a program is constructor preserving if it admits a constructor preserving monotone interpretation. The fact that a program preserves constructors fixes the definition of the interpretation over constructors. Moreover, (1) below gives a simple characterization of the interpretations of constructor terms. Proposition 1. For any constructor preserving interpretation L− M, the following holds: 1. for any ground constructor term t, Lt M = {t}, 2. given a ground substitution σ , for any constructor terms u E v, Lσ (u) M E∗ Lσ (v) M. Proof. (1) is proved by induction on the structure of terms. (2) is by induction on the structure of v. Suppose v is a variable, if u E v, then u = v and the property holds trivially. Suppose v = c(v1 , . . . , vk ). The case u = v is as above. Otherwise, u E v j for some j ≤ k. In that case, for all t ∈ Lσ (u) M, by induction, there is a w j ∈ Lσ (v j ) M such that t E w j . Let us choose some wi ∈ Lσ (vi ) M for all i 6= j. Then, t E c(w1 , . . . , wk ) ∈ Lσ (c(v1 , . . . , vk )) M. Proposition 2. Given a program hX , C , F , E i and a constructor preserving monotone interpretation L− M, for all constructor terms t1 , . . . ,tn and all symbols f of arity n, if J f K(t1 , . . . ,tn ) = t, then t ∈ L f (t1 , . . . ,tn ) M. ! Proof. For a monotone interpretation, if u → v, then Lv M ⊆ Lu M. Suppose that f (t1 , . . . ,tn )→t with t a constructor term, then, Lt M ⊆ L f (t1 , . . . ,tn ) M. But, due to Proposition 1-(1), Lt M = {t}. The conclusion follows. Definition 9. In the present context, an interpretation is said to be polynomially bounded if for any symbol f , for any sets m1 , . . . , mn , the set L f M(m1 , . . . , mn ) has a size polynomially bounded w.r.t. to the size of the mi ’s. The size of a set m is defined to be |m| = ∑t∈m |t|. Proposition 3. Given a constructor preserving program, then, for all constructors c, the size of the set Lc M(m1 , . . . , mn ) is polynomially bounded w.r.t. the size of the mi ’s. Guillaume Bonfante 21 Proof. Let us write M = ∑ni=1 |mi |. Then, |Lc M(m1 , . . . , mn )| ≤ ∑ |c(t1 , . . . ,tn )| ∑ n×M+1 i≤n,ti ∈mi ≤ i≤n,ti ∈mi n ≤ M × (n × M + 1) since |ti | ≤ |mi | ≤ M by a rough enumeration of the indices of the sum. Example 2. Let us come back to Example 1, it has a polynomially bounded constructor preserving monotone interpretation. Apart from the generic interpretation on constructors, we define: L= M(m, m′ ) = Lin M(m, m′ ) = {tt, ff} Land M(m, m′ ) = Lor M(m, m′ ) = m′ ∪ {tt, ff} Lif then else M(mb , my , mz ) = my ∪ mz It is clear that this interpretation is polynomially bounded. Actually, the notion of constructor preserving programs generalizes the notion of constructor-free programs as introduced by Jones (see for instance [11]). He has shown how constructor-free programs characterize P TIME and L OGSPACE . We recall that a program is constructor-free whenever, for any rule f (p1 , · · · , pn ) → r, for any subterm t E r, • if t is a constructor term, then t E f (p1 , · · · , pn ), • otherwise, the root of t is not a constructor symbol. Proposition 4. Any constructor-free program hX , C , F , E i has a polynomially bounded constructor preserving monotone interpretation L− M. Proof. We use the generic definition for constructor symbols. For functions, let L f M(m1 , . . . , mn ) = {u | ∃i ≤ n,t ∈ mi : u E t}. We have to prove a) that it is a monotone interpretation over S(C ), b) that it preserves constructors and c) that it is polynomially bounded. Proof of c). Due to Proposition 1, it is sufficient to verify the size condition on function symbols. Given some sets m1 , . . . , mn , we define m = {u | ∃i ≤ n,t ∈ mi : u E t} and K = | ∪ni=1 mi |. From the definition of the size of a set, for all j ≤ n, |m j | ≤ K ≤ ∑ni=1 |mi |. Let Sm1 ,...,mn = {t | ∃i ≤ n : t ∈ mi }. Then, n #Sm1 ,...,mn ≤ ∑ #mi ≤ n × K (1) i=1 where #m denotes the cardinality of a set m (recall that for any set m : #m ≤ |m|!). For each term t, let Dt = {u | u E t}. Since m = ∪t∈Sm1 ,...,mn Dt , |m| ≤ ∑t∈Sm ,...,mn |Dt |. It is clear that for all t, #Dt = |t|. 1 Moreover, each u E t has a size smaller than t. Consequently, |Dt | ≤ |t|2 . Since for all terms t ∈ Sm1 ,...,mn , |t| ≤ K, we have |m| ≤ ∑t∈Sm ,...,mn K 2 . Combining this latter equation with Equation 1, we can state that 1 |m| ≤ n × K 3 ≤ n × (∑ni=1 |mi |)3 . Observation of implicit complexity by non confluence 22 Proof of b). Let us come back to the Definition 8. The first item comes from our generic choice for the interpretations of constructor symbols. Concerning the second item, let us consider a rule f (p1 , · · · , pn ) → r, a ground substitution σ and a subterm u E r. We prove actually a stronger fact than condition 2, namely: Lσ (u) M ⊆ Lσ ( f (p1 , · · · , pn )) M. By induction on u. If u is a variable or more generally a constructor term, since the program is constructor-free, u E p j for some j. Take t ∈ Lσ (u) M. Due to Proposition 1-(2), there is t ′ ∈ Lσ (p j ) M such that t E t ′ . Then, recalling the definition of L f M, t belongs to L f M(Lσ (p1 ) M, . . . , Lσ (pn ) M) = Lσ ( f (p1 , · · · , pn )) M. Otherwise, u = g(v1 , . . . , vk ) and, since the program is constructor-free, g is a function symbol. Take t ∈ Lσ (u) M = Lg M(Lσ (v1 ) M, . . . , Lσ (vk ) M). Recall that g is a function symbol. Then, by definition of Lg M, there is a j ≤ k and a term t ′ ∈ Lσ (v j ) M such that t E t ′ . By induction, t ′ ∈ Lσ ( f (p1 , · · · , pn )) M. But then, by definition of L f M, t ∈ L f (p1 , · · · , pn ) M. Proof of a), Item (2) of Definition 3 is a direct consequence of the definition of the interpretation. Let us justify now (5). As seen above, for all rules f (p1 , · · · , pn ) → r, ground substitutions σ and subterms u E r, Lσ (u) M ⊆ Lσ ( f (p1 , · · · , pn ) M. In particular, the result holds for r. Do those kind of interpretations really go beyond constructor-freeness? Here is an example of a program which is not constructor-free, but with a constructor preserving interpretation. Example 3. Using the tally numbers 0, s, and lists, the function f builds the list of the first n − 1 integers given the argument n. f(0) = nil f(s(n)) = cons(n, f(n)) Such a program has a constructor preserving interpretation. Let L f M(m) = {cons(n1 , cons(n2 , · · · (cons(nk , nil)) · · · )) | ∃n1 , . . . , nk ∈ m : ∀ j ≤ k − 1 : n j = s(n j+1 )} ∪{nil}. It is clear that this program is not constructor-free. But, there is a stronger difference: the function computed by this program cannot be computed by any constructor-free program. Indeed, recall that the output of functions computed by constructor-free programs are subterms of the inputs. Since this is not the case of f, the conclusion follows. Let us make one last observation about the example. Actually, the interpretation is polynomially bounded. Indeed, a list of the shape cons(n1 , cons(n2 , · · · (cons(nk , nil)) · · · )) is fixed by the choice of n1 and k. Since k ≤ |n1 | ≤ |m|, there are at most |m|2 such lists, each of which has a polynomial size. Theorem 3. Predicates computed by programs with a polynomially bounded constructor preserving interpretation are exactly P TIME predicates. Proof. From Jones’s result and Proposition 4, it is clear that P TIME predicates can be computed by constructor preserving programs. Guillaume Bonfante 23 In the other direction, suppose we want to evaluate f (t1 , . . . ,tn ) where t1 , . . . ,tn are some constructor terms. First, due to Propostion 2, one observes that the set of constructor terms L f (t1 , . . . ,tn ) M = L f M(Lt1 M, . . . , Ltn M) contains the normal form of f (t1 , . . . ,tn ). Moreover, this set has a polynomial size w.r.t. the size of Lti M’s. Due to Proposition 1, Lti M = {ti } and consequently |Lti M| = |ti |. That is L f (t1 , . . . ,tn ) M has a polynomial size w.r.t. the size of inputs. As this is done by Jones, we use a call-by-value semantics with cache, that is: • we restrict substitutions to ground constructor substitutions, • each time a term g(u1 , . . . , um ) is evaluated, it is put in a map (g, u1 , . . . , um ) 7→ JgK(u1 , . . . , um ). This map is called the cache. The key point to prove that computations can be done in polynomial time is to show that the cache has a polynomial size w.r.t. the size of the inputs. We begin to establish that for all constructor term ui such + that f (t1 , . . . ,tn )→C[g(u1 , . . . , um )]: • there is a term t ∈ L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn } such that ui E t, • Lg(u1 , . . . , um ) M E∗ L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn }. One will have noticed that {t1 , . . . ,tn } = ∪ni=1 Lti M, so that L f (t1 , . . . ,tn ) M∪{t1 , . . . ,tn } = L f (t1 , . . . ,tn ) M∪ni=1 Lti M. Second remark, terms like f (t1 , . . . ,tn ), g(u1 , . . . , um ) as above correspond to nodes in the call tree with ( f ,t1 , . . . ,tn ) + (g, u1 , . . . , um ). So, we work by induction on + . Base case. Suppose that ( f ,t1 , . . . ,tn ) (g, u1 , . . . , um ). In other words, there is a context C such that: ∗ f (t1 , . . . ,tn ) → C[g(v1 , . . . , vm )]→C[g(u1 , . . . , um )]. By Lemma 1 below, ui E t for some term t ∈ L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn } as required. For the second item, notice that g(v1 , . . . , vm ) EC[g(v1 , . . . , vm )]. Then, Lg(u1 , . . . um ) M ⊆ Lg(v1 , . . . , vm ) M E∗ L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn } ∗ since g(v1 , . . . , vm )→g(u1 , . . . , um ) by Definition 8, second item Induction step. Otherwise, ( f ,t1 , . . . ,tn ) + (g, u1 , . . . , um ) (h, w1 , . . . , wk ). By induction, we have Lg(u1 , . . . , um ) ME∗ L f (t1 , . . . ,tn ) M∪{t1 , . . . ,tn } and for all i ≤ m, {ui } = Lui ME∗ L f (t1 , . . . ,tn ) M∪{t1 , . . . ,tn }. Consequently, ∗ Lg(u1 , . . . , um ) M ∪m (2) i=1 Lui M E L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn }. By Lemma 1, for all wi , there is a term v ∈ Lg(u1 , . . . , um ) M ∪m i=1 Lui M. By Equation 2, there is a term t ∈ L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn } such that wi E t. For the second item, ∗ h(w1 , . . . , wk ) E∗ Lg(u1 , . . . , um ) M ∪m i=1 Lui M E L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn }. where the first relation is due to Definition 8-(2). After this preliminary work, we are ready to bound the size of the cache. As a consequence of what precedes, the arguments of all the calls g(u1 , . . . , um ) in the call tree are contained in the set S = {u | ∃t ∈ L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn } : u E t}. Observation of implicit complexity by non confluence 24 Since L f (t1 , . . . ,tn ) M∪ {t1 , . . . ,tn } has a polynomial size, S itself has cardinality bounded by a polynomial, say P(|t1 |, . . . , |tn |). As a consequence, since the ui ’s are in S, the cache has at most |F |× P(|t1 |, . . . , |tn |)D entries, where D is a bound on the arity of symbols. Since each elements ui and each normal form of g(u1 , . . . , um ) are subterms of L f (t1 , . . . ,tn ) M ∪ {t1 , . . . ,tn }, they have a polynomial size. Then, the cache itself has a polynomial size. Lemma 1. Let hX , C , F , E i be a program with a polynomially bounded constructor preserving interpretation L− M. Suppose given a rewriting step f (t1 , . . . ,tn ) → w with t1 , . . . ,tn some constructor terms ! and v E w. If v→u with u a constructor term, then there is a term t ∈ L f (t1 , . . . ,tn ) M ∪ni=1 Lti M such that u E t. Proof. Let f (p1 , · · · , pn ) → r and σ be such that f (t1 , . . . ,tn ) = σ ( f (p1 , · · · , pn )) → σ (r) = w. There are two cases: if v E σ (x) for some variable x ∈ p j . Since the ti are constructor terms, v is necessarily a constructor term, and consequently a normal form. So, v = u. As a matter of fact, v E σ (p j ) = t j . We conclude taking t = ti . ! Otherwise, v = σ (v′ ) for some v′ E r. Since v→u, we have Lu M ⊆ Lv M. By Proposition 1-(1), u ∈ Lv M. Due to Definition 8, second item, there is t ∈ L f (t1 , . . . ,tn ) M ∪ni=1 Lti M such that u E t. 3 Observation by non confluence 3.1 Semantics We first have to define what we mean when we say that a function is computed by a non-confluent rewriting system. Computations lead to several normal forms, depending on the reductions applied. At first sight, we shall regard a non-confluent rewrite system as a non-deterministic algorithm. In this section, given a program, we do not suppose its underlying rewriting system to be confluent. By extension, we say that such programs are not confluent (even if they may be so). Example 4. A 3-SAT formula is given by a set of clauses, written ∨(x1 , x2 , x3 ) where the xi have either the shape ¬(ni ) or e(ni ).2 The ni ’s which are the identifiers of the variables are written in binary, with unary constructors 0, 1 and the constant ε . To simplify the program, we suppose all identifiers to have the same length. tt, ff represent the boolean values true and false. ∨ serves for the disjunction. Since we focus on 3-SAT formulae, we take it to be a ternary function. For instance the formula (x1 ∨ x2 ∨ x3 )∧ (x1 ∨ x2 ∨ x1 ) is represented as: cons(∨(e(0(1(ε ))), e(1(0(ε ))), ¬(1(1(ε )))), cons(∨(e(0(1(ε ))), ¬(1(0(ε ))), ¬(0(1(ε )))), nil)). Recalling rules given in Example 1, the following program computes the satisfiability of a formula. Let us suppose that ℓ denotes the list of variables with the valuation ”true”, we have: ver(nil, ℓ) ver(cons(∨(x1 , x2 , x3 ), ψ ), ℓ) eval(¬(n), ℓ) eval(e(n), ℓ) 2 → tt → and(or(or(eval(x1 , ℓ), eval(x2 , ℓ)), eval(x3 , ℓ)), ver(ψ , ℓ)) → if in(n, ℓ) then ff else tt → if in(n, ℓ) then tt else ff e corresponds to a positive occurrence of a variable. It is introduced for a question of uniformity. Guillaume Bonfante 25 It is sufficient to compute the set of ”true” variable. This is done by the rules: hyp(nil) = nil hyp(cons(∨(a(x1 ), b(x2 ), c(x3 )), ℓ)) → hyp(ℓ) hyp(cons(∨(a(x1 ), b(x2 ), c(x3 )), ℓ)) → cons(xi , hyp(ℓ)) hyp(cons(∨(a(x1 ), b(x2 ), c(x3 )), ℓ)) → cons(xi , cons(x j , hyp(ℓ))) hyp(cons(∨(a(x1 ), b(x2 ), c(x3 )), ℓ)) → cons(xi , cons(x j , cons(xk , hyp(ℓ)))) f(ψ ) → ver(ψ , hyp(ψ )) with a, b, c ∈ {¬, e} and i 6= j 6= k ∈ {1, 2, 3}. The main function is f. The rules involving hyp are not confluent, and correspond exactly to the non-deterministic choice. (By Newman’s Lemma, the systems considered are not weakly confluent since they are terminating.) Such a program has an interpretation, given by: L¬ M(x) = Le M(x) = x + 1 L∨ M(x1 , x2 , x3 ) = x1 + x2 + x3 + 10 Leval M(x, y) = (x + 1) × y + 3 Lver M(x, y) = (x + 1) × (y + 1) Lhyp M(x) = x + 1 Lf M(x) = Lver(x, hyp(x)) M + 1 Our notion of computation by a non-confluent system appears in Krentel’s work [13], in a different context. It seems appropriate and robust, as argued by Grädel and Gurevich [8]. We suppose given a linear order ≺ on symbols, this order can be extended to terms using the lexicographic ordering. We use the same notation ≺ for this order. Then, we say that a (partial) function ϕ : T(C )m → T(C ) is computed by a program hX , C , F , Ri if for all t1 , . . . ,tm ∈ T(C ): ! ϕ (t1 , . . . ,tn ) is defined ⇔ ϕ (t1 , . . . ,tn ) = max{v | f (t1 , . . . ,tn )→v} ≺ In some case, we get the expected result: non-confluence corresponds exactly to non-determinism. Confluent programs with an interpretation compute P TIME , and the non-confluent ones compute NP TIME . Theorem 4 (Bonfante, Cichon, Marion and Touzet [2]). Functions computed by non confluent programs with an additive polynomial interpretation are exactly NP TIME functions; 3.2 Non confluent programs with a polynomial quasi-interpretation The following result is more surprising. Theorem 5. Functions computed by non confluent programs that admit a quasi-interpretation and a PPO proof of termination are exactly P SPACE functions. The proof of the theorem essentially relies on the following example: Example 5. [Quantified Boolean Formula] Let us compute the problem of the Quantified Boolean Formula. The principle of the algorithm is in two steps, the first one is top-down, the second one is bottomup. In the first part, we span the computation to the leaves where we make an hypothesis on the value 26 Observation of implicit complexity by non confluence of (some of) the variables. In the second part, coming back at the top, we compute the truth value of the formula and verify that the hypotheses chosen in the different branches are compatible between them. As above, we suppose that variables are represented by binary strings on constructors 0, 1, ε . To them, we add the constructors cons, nil to build lists, H, , N to decorate variables. Given a variable n, the decorations give the truth value of the variables. (n) corresponds to an unchosen value, that is true or false, N(n) corresponds to false, and H(n) to true. The booleans are tt, ff and ⊥ serves for trash. T and F are two (unary) constructors representing booleans within computations. To help the reader, we give an informal type to the key functions: Ψ corresponds to formulae, Λ to lists (of decorated variables) and B to truth values. Truth values are terms of the shape T(Λ) or F(Λ). Finally, V is the type of variables and B = {tt, ff}. The following rules correspond to the first step of the computation. f : Ψ → B, ver : Ψ × Λ → B, not : B → B, or : B × B → B, vhyp : B ×V × B → B, put : Λ ×V × B → Λ and hypList : Ψ → Λ: f(ϕ ) → ver(ϕ , hypList(ϕ )) ver(Var(x), h) → T(put(h, x, tt)) ver(Var(x), h) → F(put(h, x, ff)) ver(Or(ϕ1 , ϕ2 ), h) → or(ver(ϕ1 , h), ver(ϕ2 , h)) ver(Not(ϕ ), h) → not(ver(ϕ , h)) ver(Exists(x, ϕ ), h) → or(vhyp(ver(ϕ , h), x, tt), vhyp(ver(ϕ , h), x, ff)) where h is a valuation of the variables. The rules ver(Var(x), h) → T(put(h, x, tt)) and ver(Var(x), h) → F(put(h, x, ff)) are the unique rules responsible of the non confluence of the program. This is the step where the value of variables is actually chosen. Concerning the valuations, they are written as lists cons(tv(n), cons(· · · )) where the truth value tv of a variable is in {, H, N}. Suppose that x is a variable ocuring in Or(ϕ1 , ϕ2 ). One key feature is that in a computation of ver(Or(ϕ1 , ϕ2 ), h) → or(ver(ϕ1 , h), ver(ϕ2 , h)), the choice of the truth value of the variable x can be different in the two sub-computation ver(ϕ1 , h) and ver(ϕ2 , h). Then, the role of the bottom-up part of the computation is to verify that these choices are actually compatible. The two functions put and hypList are computed by: hypList(Var(x)) → nil hypList(Or(ϕ1 , ϕ2 )) → append(hypList(ϕ1 ), hypList(ϕ2 )) hypList(Not(ϕ )) → hypList(ϕ ) hypList(Exists(x, ϕ )) → cons((x), hypList(ϕ )) put(cons((n), l), m, tt) → if n = m then cons(H(n), l) else cons((n), put(l, m, tt)) put(cons((n), l), m, ff) → if n = m then cons(N(n), l) else cons((n), put(l, m, ff)) Then, the computation returns back. The top-down part of the computation returned a “tree” whose interior nodes are labeled with “or” and “not”. At the leaves, we have T(l) or F(l) where l stores the truth value of variables. The logical rules are: Guillaume Bonfante 27 not(F(x)) → T(x) not(T(x)) → F(x) or(T(x), T(y)) or(F(x), T(y)) or(T(x), F(y)) or(F(x), F(y)) → → → → T(match(x, y)) T(match(x, y)) T(match(x, y)) F(match(x, y)) where x and y correspond to the list of hypothesis. The function match takes two lists and verify that they made compatible hypotheses on the truth value of variables. (n) is compatible with both N(n) and H(n). But N(n) and H(n) are not compatible. match(nil, nil) → nil match(cons(x, l), cons(x, l ′ )) → cons(x, match(l, l ′ )) match(cons(H(x), l), cons((x), l ′ )) → cons(H(x), match(l, l ′ )) match(cons(N(x), l), cons((x), l ′ )) → cons(N(x), match(l, l ′ )) match(cons((x), l), cons(H(x), l ′ )) → cons(H(x), match(l, l ′ )) match(cons((x), l), cons(N(x), l ′ )) → cons(N(x), match(l, l ′ )) match(cons(H(x), l), cons(N(x), l ′ )) → ⊥ match(cons(N(x), l), cons(H(x), l ′ )) → ⊥ The matching process runs only for lists of equal length and variables must be presented in the same order. This hypothesis is fulfilled for our program. The last verification corresponds to the Exists constructor. For the left branch of the or, the variable x is supposed to be true, for the second branch it is supposed to be false. This verification is performed by the vhyp function. vhyp(T(h), x, y) → T(vhyp(h, x, y)) vhyp(F(h), x, y) → F(vhyp(h, x, y)) vhyp(cons(H(y), l), x, tt) → if x = y then l else cons(H(y), vhyp(l, x, tt)) vhyp(cons(N(y), l), x, tt) → if x = y then ⊥ else cons(N(y), vhyp(l, x, tt)) vhyp(cons(N(y), l), x, ff) → if x = y then l else cons(N(y), vhyp(l, x, ff)) vhyp(cons(H(y), l), x, ff) → if x = y then ⊥ else cons(H(y), vhyp(l, x, ff)) The rules for if then else , for = and for append are omitted. It is then routine to verify that this program is ordered by PPO. The order f ≻ ver ≻ vhyp ≻ put ≻ or ≻ not ≻ hypList ≻ match ≻ if ≻ append ≻= is compatible with the rules. To end the Example, we provide a quasi-intepretation. Lver M(X , H) = X + H, Lf M(Φ) = 2Φ, and for all other function symbols we take L f M(X1 , . . . , Xn ) = max(X1 , . . . , Xn ). For constructors, we take for all of them Lc M(X1 , . . . , Xn ) = ∑ni=1 Xi + 1. Observation of implicit complexity by non confluence 28 of Theorem 5. Let us begin with the following proposition. Proposition 5. F.QI.PPO is closed by composition. That is if f , g1 , . . . gk are computable with programs in F.QI.PPO, then, the function λ x1 , . . . , xn . f (g1 (x1 , . . . , xn ), . . . , gk (x1 , . . . , xn )) is computable by a program in F.QI.PPO. Proof. One adds a new rule h(x1 , . . . , xn ) → f (g1 (x1 , . . . , xn ), . . . , gk (x1 , . . . , xn )) with precedence h ≻ f and h ≻ gi for all i ≤ k. The rule is compatible with the interpretation: Lh M(x1 , . . . , xn ) = L f (g1 (x1 , . . . , xn ), . . . , gk (x1 , . . . , xn )) M. The Example 5 shows that a P SPACE -complete problem can be solved in the considered class of programs. By composition of QBF with the reduction, since polynomial time functions can be computed in F.QI.PPO.n, any P SPACE predicate can be computed in F.QI.PPO.n. Let us recall now that computing bit ith of the output of a P SPACE function is itself computable in P SPACE . Since, building the list of the first integers below some polynomials can be computed in polynomial time, by composition, the conclusion follows. 3.3 Non confluent constructor preserving programs Theorem 6. Predicates computed by non confluent programs with a polynomially bounded constructor preserving interpretation are exactly the P TIME -computable predicates. This result is close to the one of Cook in [4] (Theorem 2). He gives a characterization of P TIME by means of auxiliary pushdown automata working in logspace, that is a Turing Machine working in logspace plus an extra (unbounded) stack. It is also the case that the result holds whether or not the auxiliary pushdown automata is deterministic. The proof follows the line of [1], we propose thus just a sketch of the proof. The key observation is that arguments of recursive calls are sub-terms of the initial interpretation, a property that holds for confluent programs. As a consequence, following a call-by-value semantics, any arguments in subcomputations are some sub-terms of the initial interpretations. From that, it is possible to use memoization, see [10]. The original point is that we have to manage non-determinism. The proof of Proposition 2 holds for non confluent computations. So, normal forms of a term t are in Lt M. As we have seen in the proof of Theorem 3, this set has a polynomial size wrt the size of the inputs. In the non deterministic case, the cache is still a map, with the same keys, but the values of the map enumerate the list of normal forms. With the preceding observation, we can state that the map has still a polynomial size. Acknowledgement. I’d like to thank the anonymous referees for their precious help. Their sharp reading has been largely valuable to rewrite some part of the draft. Guillaume Bonfante 29 References [1] Guillaume Bonfante (2006): Some programming languages for LOGSPACE and PTIME. In: 11th International Conference on Algebraic Methodology and Software Technology - AMAST’06, Kuresaare/Estonie. [2] Guillaume Bonfante, Adam Cichon, Jean-Yves Marion & Hélène Touzet (2001): Algorithms with polynomial interpretation termination proof. J. Funct. Program. 11(1), pp. 33–53. [3] Guillaume Bonfante, Jean-Yves Marion & Jean-Yves Moyen (2009): Quasi-interpretations: a way to control resources. Theoretical Computer Science To appear. [4] Stephen Cook (1971): Characterizations of pushdown machines in terms of time-bounded computers. Journal of the ACM 18(1), pp. 4–18. [5] Nachum Dershowitz (1982): Orderings for term-rewriting systems. Theoretical Computer Science 17(3), pp. 279–301. [6] Nachum Dershowitz & Jean-Pierre Jouannaud (1990): Handbook of Theoretical Computer Science vol.B, chapter Rewrite systems, pp. 243–320. [7] Marco Gaboardi, Jean-Yves Marion & Simona Ronchi Della Rocca (2008): A logical account of pspace. SIGPLAN Not. 43(1), pp. 121–131. [8] Erich Grädel & Yuri Gurevich (1995): Tailoring recursion for complexity. Journal of symbolic logic 60(3), pp. 952–69. [9] Dieter Hofbauer & Clemens Lautemann (1988): Termination proofs and the length of derivations. Lecture Notes in Computer Science 355, pp. 167–177. [10] Neil Jones (1997): Computability and complexity, from a programming perspective. MIT Press. [11] Neil Jones (1999): LOGSPACE and PTIME characterized by programming languages. Theroretical Computer Science 228, pp. 151–174. [12] Samuel Kamin & Jean-Jacques Lévy (1980): Attempts for generalising the recursive path orderings. Technical Report, Univerity of Illinois, Urbana. Unpublished note. Accessible on http://perso.enslyon.fr/pierre.lescanne/not accessible.html. [13] Mark W. Krentel (1988): The complexity of optimization problems. Journal of computer and system sciences 36, pp. 490–519. [14] Mukkai S. Krishnamoorthy & Paliath Narendran (1985): On recursive path ordering. Theoretical Computer Science 40(2-3), pp. 323–328. [15] Lars Kristiansen (2006): Complexity-Theoretic Hierarchies. In: CiE, Lecture Notes in Computer Science 3988, Springer, pp. 279–288. [16] Lars Kristiansen & Bedeho Mender (2009): The Semantics and Complexity of Successor-free non deterministic Gödel T and PCF. In: Computability in Europe, CIE ’09, Heidelberg, Germany. [17] D. Plaisted (1978): A recursively defined ordering for proving termination of term rewriting systems. Technical Report R-78-943, Department of Computer Science, University of Illinois. [18] Olha Shkaravska, Marko van Eekelen & Ron van Kesteren (2009): Polynomial Size Analysis of First-Order Shapely Functions. CoRR abs/0902.2073. Available at http://arxiv.org/abs/0902.2073. [19] TeReSe (2003): Term Rewriting Systems, Cambridge Tracks in Theoretical Computer Science 55. Cambridge University Press.
6cs.PL
arXiv:1610.06974v1 [cs.SY] 21 Oct 2016 Optimal Control for Network Coding Broadcast Emmanouil Skevakis Ioannis Lambadaris Department of Systems and Computer Engineering Carleton University, Ottawa, Ontario K1S 5B6 Canada [email protected] Department of Systems and Computer Engineering Carleton University, Ottawa, Ontario K1S 5B6 Canada [email protected] Abstract—Random linear network coding (RLNC) has been shown to efficiently improve the network performance in terms of reducing transmission delays and increasing the throughput in broadcast and multicast communications. However, it can result in increased storage and computational complexity at the receivers end. In our previous work we considered the broadcast transmission of large file to N receivers. We showed that the storage and complexity requirements at the receivers end can be greatly reduced when segmenting the file into smaller blocks and applying RLNC to these blocks. To that purpose, we proposed a packet scheduling policy, namely the Least Received. In this work we will prove the optimality of our previously proposed policy, in terms of file transfer completion time, when N = 2. We will model our system as a Markov Decision Process and prove the optimality of the policy using Dynamic Programming. Our intuition is that the Least Received policy may be optimal regardless of the number of receivers. Towards that end, we will provide experimental results that verify that intuition. I. I NTRODUCTION In recent years, there has been a growing concern on efficient utilization of wireless network resources. Bandwidth intensive (downloading music and video files) and delay sensitive (IPTV, video and audio communications) applications are widely deployed in cellular and wireless networks. Such applications require reliable and efficient transmission of packets with strict deadline constraints over unreliable channels. This has intensified the need of developing cost efficient packet transmission techniques that increase the network reliability and throughput. Towards that goal, communication protocols that utilize network coding are widely studied in the past years. Network coding is a technique that extends traditional routing; the nodes can combine the information to be transmitted either among flows or within the same flow. In order to do so, the nodes must have the ability to perform coding operations at the packet level based on an encoding scheme (such as linearly combine a number of packets) and transmit the encoded packets. In such cases, the transmitted packets may be useful to receivers with different received packets, unlike traditional scheduling. This is greatly beneficial in broadcast and multicast communications where the same information must be transmitted to a number of receivers. Recent work has shown that network coding can provide significant gains over traditional queueing ([1],[2]). Many encoding schemes can be found in the literature such as Maximum-Distance Separable codes (MDS) ([3],[4]), Fountain codes ([5],[6]), Instantly Decodable Network Coding (IDNC) ([7],[8]) and Random Network Coding (RNC) ([6],[9]), each one with its own advantages and drawbacks. In our study we will focus on a specific case of RNC, the Random Linear Network Coding (RLNC). RLNC is one of the simplest, yet efficient, encoding schemes of network coding. It has been shown, in [10], that RLNC can approach system capacity with negligible overhead. In RLNC, K packets, commonly referred to as the coding window size, are linearly combined in order to produce one encoded packet. After the successful reception of K encoded packets (given that the packets are linearly independent), a receiver is able to decode them via Gaussian Elimination. The achievable completion time of K packets is asymptotically optimal and higher than any scheduling policy ([6],[11]). We note here that RLNC can be either applied for the transmission of all of the senders packets ([6], [11]) or for the retransmission of lost packets as in [12]. In this work, we focus on the first method. The main drawback of RLNC lies in the selection of the coding window size. Larger K achieves lower completion time, but increased storage and complexity requirements for the receivers. The above-mentioned drawback has been addressed in our previous study ([13]). We have shown that our proposed policy, namely the Least Received (LR) can achieve almost optimal file transfer completion time (optimal completion time in RLNC is achieved when the whole file is used as the coding window) with a coding window size much smaller than the file size. Furthermore, we developed a closed form formula for the minimum coding window size that can achieve completion time ǫ times greater than the optimal one. In this work we will a) prove the optimality of our proposed LR policy, with regards to the file transfer completion time, in small systems (when the number of receivers is 2) and b) provide experimental comparisons of the LR policy with two other policies in larger systems (when there are more than 2 receivers). We will model a system with 2 receivers as a Markov Decision Process (MDP). A MDP is stochastic model for decision making where the outcome of a decision is partially random and partially depends on the decision maker. Optimization objectives in a MDP are solved using Dynamic Programming (DP) ([14], [15]). In this manner, we will describe the DP formulation and find the optimal policy of such systems. Our intuition is that the same policy is optimal regardless of the number of receivers. To that purpose, we will present experimental results comparing the LR policy with other policies, when the number of receivers is greater than 2. To the best of our knowledge no other work has focused on similar objectives. The majority of the studies either overlooks the selection of the coding window size or considers the whole file as the coding window. Recent studies mainly focus on quantifying the gains of network coding over traditional scheduling. Eryilmaz et al. [6] and [16] thoroughly analyses network coding broadcast and provides mathematical formulas for the file transfer completion time and throughput of the system as well as comparisons with traditional scheduling techniques. In [17], the authors consider the whole file as the coding window and analyse a system with cooperation among the receivers (the receivers can exchange packets with unicast transmissions). For such a system they design near-optimal heuristics for packet transmissions based on an optimal policy found by Stochastic Shortest Path (SSP) analysis. The authors of [18] design an optimization scheme for packet coding in order to avoid redundant packet transmissions in the absence of per-packet acknowledgements. The rest of the paper is organized as follows : In Section II we will introduce our system model. In section III the optimality of the LR policy will be proven. At first we will model our system as a MDP and then we will prove the optimality of our policy using DP. In section IV our experiments will be presented and in the last section our conclusions and future research directions. II. S YSTEM M ODEL Our system consists of a single source (base station) transmitting one file to N receivers over unreliable channels in a one-hop setting. The file consists of F packets and the receivers are connected with the base station over independent (across time and receivers) and identical time-varying ON/OFF channels. The state of each channel is represented by a Bernoulli random variable with mean p. We assume that the base station has knowledge of every connected receiver at the beginning of each time slot. Moreover, only one packet can be transmitted at each time slot. No arrivals occur in our system. Our system model is the same as in [6] with the only difference being that we segment the file to be transmitted and apply RLNC within those segments and not on the entire file. The file is split into consecutive and non overlapping subsets of packets (batches), each one containing K packets. K is referred to as the coding window size. For the purpose of this F to be an integer. The packets within each study, we assume K batch are linearly combined/encoded using RLNC. The ith batch refers to packets i ∗ K to (i + 1) ∗ K − 1. We let b = F K − 1; therefore the number of batches is b + 1 for a file of F packets and coding window size K. At each time slot, the base station selects a batch of K packets to encode via RLNC and broadcasts the encoded packet to the connected receivers. Each receiver stores in a queue the received encoded packets. Upon successful reception of K such packets (of the same batch), the packets are decoded and deleted from that queue. Linear independence of the encoded packets is assumed1 . The coding overhead (the coefficients of the linear combinations) is considered negligible as in [6]. In order to distinguish any out of order packets, each receiver is assigned an attribute, namely the batch ID. This attribute represents the batch from which a receiver expects the encoded packets. At the beginning of the system (t = 0) the batch ID is set to 0, for all receivers. As soon as a receiver decodes a batch, its batch ID increases by 1. Any out of order packets (encoded packets of batch i received by a receiver with batch ID j, where i 6= j) are discarded by the receiver. As described in our previous work ([13]), RLNC can be applied either over the whole file or over subsets of the file. The first option achieves lower file transfer completion time but requires more computational and storage complexity at the receivers. In [13], it is shown that the latter case (coding over subsets of the file) can achieve near optimal completion time while keeping the computational and storage requirements low. In this case, a policy must be defined in order to select a batch that will be encoded (and thus transmitted) at certain time slots. In such time slots, a subset of the connected receivers will have successfully decoded a batch (received all K encoded packets) that another disjoint subset of the connected receivers has yet to decode. Any policy should act at these time slots only since, in the rest of the slots all of the receivers will expect encoded packets from the same batch. Figure 1 shows an example of this case. Receivers R1 and R2 have successfully received K (i.e. 3) packets and are thus expecting encoded packets of the second batch. Receiver R3 has received 2 packets and is expecting an encoded packet of the first batch. The goal of our study is to find the optimal policy as to which the base station should act (i.e. which batch should be selected for encoding (and thus transmitted) at time t) in order to minimize the file transmission time. In [13], we developed and evaluated a policy, namely the Least Received (LR). The rationale of this policy is that the file transfer completion time should be minimized when the receivers queues are balanced. LR selects, at each time slot, the ith batch to encode, where i − 1 is the minimum batch ID of the connected receivers (batch ID starts from 0), i.e. the receiver with the smallest number of received packets is selected to be served (R3 in Figure 1). We note here, that when a receiver is selected to be served, all receivers with the same batch ID will also be served. In this work we will prove the optimality of our policy in the case of a system with 2 receivers (N = 2). Our intuition is that this policy is optimal for any number of receivers. However, the investigation of the optimal packet scheduling policy for such systems will be addressed in future research. III. O PTIMALITY OF THE LR P OLICY In this section we will describe the system with 2 receivers as a Markov Decision Process (MDP) and the elements of the 1 Linear independence is justified due to a large enough field F from where q the coefficients will be picked [6] can be formulated as : Let Π be the set of all policies, S the set of all states and π ∗ the optimal policy. For objective minimization, Packet 5 Batch 1 Packet 4 Packet 3 ∗ V π (s) ≤ V π (s), ∀s ∈ S and ∀π ∈ Π. Packet 2 Batch 0 Packet 1 Packet 0 BS p R1 p p R2 R3 Batch 1 Batch 0 Figure 1: System at time t. K = 3, N = 3 Dynamic Programming (DP) formulation. Moreover, we will prove that the LR policy is optimal in such a system. A. MDP and DP formulation A MDP is stochastic model for decision making where the outcome depends both on an action (decision) and on randomness ([14], [19]). In a MDP the transition from a state s to a state s′ may depend on the state s, the action defined by the decision maker and a probabilistic model. A MDP is described by the 5-tuple (S, U , P , R, γ), where • S is a finite set of states, • U is a finite set of actions (defined for each state), ′ ′ • Pu (s, s ) = P rob(St+1 = s |S(t) = s, u(t) = u) is the transition probability from state s to state s′ when taking action u, • R(s, u) is a real valued reward (or cost) function, • γ ∈ [0, 1] is a discount factor representing the difference in immediate and future rewards. A policy π is a mapping from S to U . Every policy is evaluated using the Value function V , where V π : S → R. X V π (s) = R(s, π(s)) + γ Pπ(s) (s, s′ )V π (s′ ) (I) s′ ∈S The optimal policy in a MDP can be found with DP [14]. Various algorithms are used in the literature for this purpose such as value iteration and policy iteration ([15]) that solve the optimality objective with the aid of Bellman equation [20]. Regardless of the method used for finding the optimal policy, the optimal policy will have one characteristic : Let the current state be s. Then for the optimal policy, regardless of the past controls that led us to s, the remaining control decisions will constitute an optimal policy with regards to s ([20],[21]). Since the optimality of a policy is directly related with the optimality of the value function, this statement The MDP parameters of our system follow : • S = {s : s = (x0 , x1 ), 0 ≤ x0 , x1 ≤ F }. x0 and x1 refer to the number of received packets of receiver 0 and 1, respectively. Given the state s of the system, we can deduct the batch ID of each receiver, though the function h(x), where h(x) = ⌊x/K⌋ and K is the given coding window size. • U = {u :u ∈ {−1, 0, 1}}. u = 0 refers to the action when the base station does not have to make a decision, i.e. when both receivers have the same batch ID (h(x0 ) = h(x1 )) or when one receiver has received the whole file. When h(x0 ) 6= h(x1 ), the possible actions are -1 or 1. u = 1 refers to the action of serving the receiver with the least received packets and u = −1 refers to the action of serving the receiver with the most received packets. ′ • Pu (s, s ) can be seen from Figure 2. Figure 2a refers to the case when h(x0 ) = h(x1 ) and figures 2b, 2c refer the case when h(x0 ) < h(x1 ) and h(x0 ) > h(x1 ), respectively. Figures 2d, 2e refer to the case when x1 = F or x0 = F , respectively. In this figure, u/a means that given that the action is u, the probability is a. • R(s, u), in our system, depends only on the current state s and thus we will drop the parameter u. R(s) is defined to be the additional delay incurred by state s, in terms of time slots. Thus, R(s) = 0 when s = (F, F ) and R(s) = 1 for all other states. The resulting V (s) will be the average file transfer completion time starting from state s. In this case, the optimal policy will minimize the value function. • γ = 1. In our study, future rewards are as important as immediate rewards. Our system satisfies the Markovian property since a transition from state s to s′ does not depend on previous decisions or past states. Furthermore, the MDP is useful in our system since the outcome (next state) depends on the current state, the decision of the policy and the randomness of the channels between the base station and the receivers. In the next subsection we will prove that the LR policy is optimal (i.e. the value function at each state is minimized when following the LR policy). B. Proof of Optimality Figure 3 shows a graphical representation of the state space S. The states where no decision needs to made are depicted with a circle (u = 0 for all these states and will thus be omitted for the rest of the paper). These states occur when h(x0 ) = h(x1 ) (figure 2a) and when at least one receiver has received all the packets (figure 2d, where x1 = F and figure 2e, where x0 = F ). States where a decision needs to made are depicted with squares (figure 2b, where h(x0 ) < h(x1 ) and figure 2c, where h(x0 ) > h(x1 )). This classification is x0, x1 + 1 in cases b, c, p1 = p in d and p1 = 0 in e, p2 = pq in case a, p2 = pq or p depending on the action in cases b, c, p2 = 0 in d and p2 = p in e, • p3 = pp in case a and p3 = 0 in the rest of the cases. Assume that the current state is s = (x0 , x1 ) and we are interested in finding the best decision (the one that results in smaller V (s)). Then, from eq. I and figure 2: 1 x0 +1 + pqVxx10+1 ), Vxx10 (1) = 1−q 2 (1 + pVx1 1 x0 +1 + pVxx10+1 ) ⇒ Vxx10 (−1) = 1−q 2 (1 + pqVx1 p x0 x0 +1 Vxx10 (−1) − Vxx10 (1) = 1−q )⇒ 2 (1 − q)(Vx1 +1 − Vx1 F, x1 + 1 Vxx10 (1) < Vxx10 (−1) ⇔ Vxx10+1 > Vxx10 +1 . x0 + 1, x1 • x0, x1 x0, x1 + 1 qq (a) x0 + 1, x1 + 1 x0 + 1, x1 x0 + 1, x1 qq qq x0, x1 x0, x1 (b) x0, x1 + 1 (c) q q x0 +1, F x0, F F, x1 (e) (d) Figure 2: Pu (s, s′ ) S2 x0 S1 S4 S3 S6 S5 x1 x1 Figure 3: Graphical representation of the state space S, when F = 12 (K = 4). necessary due to differences in calculating the value function on these states. All further results are for lower triangle of figure 3 (when x0 ≤ x1 ). Due to symmetry all of those results can be applied for the rest of the states if we substitute x0 with x1 and vice versa. The value function of each state is derived from equation I. In the examined system, one hop transitioning from state s = (x0 , x1 ) to state s′ = (x′0 , x′1 ) implies that x′0 ≥ x0 and x′1 ≥ x1 . Thus, we only need to know the value function of the states s′ (when Pu (s, s′ ) 6= 0) in order to calculate the value function of s. For the rest of the paper, due to space restrictions, Vxx10 ≡ V (s), where s = (x0 , x1 ) and Vxx10 (1) (Vxx10 (−1)) is the value function of state s = (x0 , x1 ) when the decision of the policy is 1 (-1). For any s = (x0 , x1 ) ∈ S : +1 Vxx10 = R(s) + (p0 Vxx10 + p1 Vxx10 +1 + p2 Vxx10+1 + p3 Vxx10+1 )⇒ x0 +1 x0 1 x0 x0 +1 Vx1 = 1−p0 (R(s) + p1 Vx1 + p2 Vx1 +1 + p3 Vx1 +1 ), where (based on the 5 cases of Figure 2) • p0 = qq in the cases a, b, c and p0 = q in the rest of the cases, • p1 = pq in case a, p1 = pq or p depending on the action (II) In order to use eq. II, we will need to find the relations of the value function between adjacent states. The value function of each state depends on the reward function of this state and on the value function of the next states. Thus, in order to compare the value function of two adjacent states s and s′ , it is enough to know the relation of the next states of s and s′ . Some parts of the proof are omitted due to space restrictions. As a first step, the state space is divided into subsets (S 1 − 6 S in our example of figure 3). The number of the subsets of S depends on the selection of b (i.e. the number of batches minus 1). We will show that regardless of the number of subsets the same rules apply to all of them. Starting from the top right corner of figure 3 (i.e. s = (F, F )), we will examine every state using a specific pattern : The subsets will be examined with increasing superscript number and for each subset, before any state s is examined, the next states of s must be examined. We remind the reader that due to symmetry Vyx = Vxy and as a result, it is enough to examine only the states below the dashed diagonal of figure 3. 1) Subsets S 1 and S 2 : The value function of the state (F, F ) equals the reward value at this state (i.e. VFF = 0). The value function of the states in S 1 will be : VFF −1 = (1/p)(1 + pVFF ) = 1/p, F −2 VF = (1/p)(1 + pVFF −1 ) = 2/p, and so on. Thus, VFx0 = (F − x0 )/p, (i.e. VFx0 Furthermore, −1 VFF−1 = > VFx0 +1 ∀x0 ∈ {0, F } (1) ∀x0 ∈ {0, F − 1}) F −1 1 F + ppVFF ) 1−q2 (1 + pqVF −1 + pqVF F −1 F −1 1 + pqVF ) ⇒ 1−q2 (1 + pqVF −1 1 VFF−1 = 1−q 2 (1 + 2q). = We can conclude that : −1 VFF −1 < VFF−1 < VFF −2 (2) 1 since 1/p < 1−q 2 (1 + 2q) < 2/p. It is easy to prove (by following the pattern that we mentioned earlier) that the same rules apply to the rest of the states of S 2 , i.e : Vxx10 > Vxx10 +1 , ∀(x0 , x1 ) : x0 ∈ {bK, F − 1}, x1 ∈ {bK + 1, F }, x0 + 1 ≤ x1 Vxx10 < Vxx10−1 , ∀(x0 , x1 ) : x0 ∈ {bK, F − 1}, x1 ∈ {bK + 1, F }, x0 ≤ x1 − 1 (3a) (3b) −1 Vxx10 < Vxx10+1 , ∀(x0 , x1 ) : x0 ∈ {bK + 1, F − 1}, x1 ∈ {bK + 1, F − 1}, x0 ≤ x1 − 1 and (x0 , x1 ) = (bK, F − 1) (3c) 2) Subset S 3 : Starting from the top right state of subset S 3 (i.e., (bK − 1, F − 1)), and using eq. II and 3c we can see that : bK−1 VFbK−1 −1 (1) < VF −1 (1) Let x0 = bK − 1. 0 +1 VFx0 − 1/p = VFx0 +1 < VFx−1 (eq. 1 and eq. 3b). Thus, x0 x0 +1 x0 1 1 VF −1 = 1−q2 (1 + pVF −1 + pqVFx0 ) > 1−q + 2 (pVF x0 x0 x0 x0 pqVF ) = VF ⇒ VF −1 > VF . x0 +1 x0 x0 1 0 Moreover, VFx−1 −VFx0 = 1−q < 2 (1+pVF −1 +pqVF )−VF x0 −1 x0 1 < 1/p = V − V . Iteratively, we can see that F F 1−q2 0 VFx−1 < VFx0 −1 ∀x0 ∈ S 3 . Thus, from eq. II : 0 0 VFx−1 (1) < VFx−1 (−1) ∀x0 ∈ {0, bK − 1} (4a) Furthermore, with the aid of eq. 3b, 3c and II it can be shown that : bK−1 bk−1 Vx1 (1) < Vx1 (−1) ∀x1 ∈ {(b − 1)K, F − 2} (4b) L EMMA 1 x0 +1 x0 +1 If a) Vx1 (1) < Vx1 (−1) and x0 x0 b) Vx1+1 (1) < Vx1+1 (−1) then : x0 x0 Vx1 (1) < Vx1 (−1) Proof of LEMMA 1 : From the two conditions, we can conclude that : x0 +1 Vx1 = x0 Vx1+1 = 1 1−q2 (1 1 1−q2 (1 x0 +2 x0 +1 + pVx1 + pqVx1+1 ), x0 +1 x0 + pVx1+1 + pqVx1+2 ). Moreover, x0 +2 x0 +1 Vx1 < Vx1+1 (condition a) and eq. II) and x0 +1 x0 Vx1+1 < Vx1+2 (condition b) and eq. II). 3) Subsets S 4 - S 6 : Finally, it can be seen that the same relations apply to the states of S 4 (and S 6 ) as the ones in S 2 . Using the same steps as before, we can see that Vxx10 (1) < Vxx10 (−1) for any state s = (x0 , x1 ), where h(x0 ) 6= h(x1 ). Those results can be extended to any number of batches and any coding window size. Thus, the Least Received policy is optimal (i.e., results in minimizing the value function) in terms of file transfer completion time, for any system with 2 receivers regardless of the file size F and the Coding Window Size K. IV. E XPERIMENTS In this section we will experimentally verify our intuition for using the specific reward function. That is, the resulting value function at state s will show the average file transfer completion time from state s. Moreover, we will experimentally compare our LR policy with 2 other policies (a variation of the Round Robin policy and a Random selection policy) in terms of file transfer completion time in systems with more than 2 receivers. These 2 policies are described below : Round Robin (RRNC) : We define as a ’conflict slot’ a time slot t where at least 2 receivers have a different batch ID. These are the time slots that a policy must act on since for the rest of the slots, all receivers will have the same batch ID and will thus be expecting an encoded packet from the same batch. RRNC works as follows : At the first conflict slot, RRNC will pick the connected receiver with the smallest ID to serve (connected receivers with the same batch ID will also be served). At the next conflict slot, RRNC will pick the connected receiver with the smallest ID that is greater than the last choice it made and will continue for the rest of the conflict slots in a round robin fashion. Random Selection (RS) : This heuristic is based on randomly selecting one batch to encode. Each batch i is selected Ni with probability N c , where N i is the number of connected receivers with batch ID i and N c is the total number of connected receivers. x0 +1 x0 Thus, Vx1 < Vx1+1 and from eq. II : < Using eq. 4a, 4b and Lemma 1, we can see that : x0 x0 (−1) (1) < Vx1 Vx1 ∀(x0 , x1 ) ∈ S 3 (5) Additionally, it is easy to see that eq. 3a - 3c can be extended to include the states of S 3 , i.e., Vxx10 > Vxx10 +1 , ∀(x0 , x1 ) : x0 ∈ {0, F − 1}, x1 ∈ {bK + 1, F }, x0 + 1 ≤ x1 Vxx10 < Vxx10−1 , ∀(x0 , x1 ) : x0 ∈ {0, F − 1}, x1 ∈ {bK + 1, F }, x0 ≤ x1 − 1 −1 Vxx10 < Vxx10+1 , ∀(x0 , x1 ) : x0 ∈ {1, F − 1}, x1 ∈ {bK, F − 1}, x0 ≤ x1 − 1 LR delay DP delay 190 x0 Vx1 (−1). Delay x0 Vx1 (1) Delay of Least Received vs Optimal DP policy 195 (5a) (5b) (5c) 185 180 175 170 0 20 40 60 80 100 Coding Window Size K Figure 4: Comparison of LR delay with value function Figure 4 shows the experimental delay of the LR policy (LR delay) compared to the value function of state s = (0, 0) of the Dynamic Programming problem (DP delay). The experimental delay is reasonable close to V00 and it always falls within the 95% confidence interval. These results verify our intuition for the chosen the reward function. That is, that the resulting 3 ×10 4 Delay of 3 policies, N =5, p =0.6, F =5000 LR RS RRNC Delay 2.5 2 1.5 R EFERENCES 1 0.5 0 200 400 600 800 1000 1200 Coding Window Size K Figure 5: Comparison of 3 policies based on file transfer completion time - 5 receivers 5 ×10 4 Delay of 3 policies, N =20, p =0.8, F =2500 LR RS RRNC Delay 4 3 2 1 0 Our future research will focus on proving the optimality of the LR policy in larger systems. Our goal is to prove the the LR policy is optimal regardless of the number of receivers in the system. Furthermore, we will focus on expanding our research for multicast communications. 0 100 200 300 400 500 600 Coding Window Size K Figure 6: Comparison of 3 policies based on file transfer completion time - 20 receivers value function represents the file transfer completion time and that the policy which minimizes the value function will also minimize the file transfer completion time. Figures 5 and 6 compare the file transfer completion time under the LR, RS and RRNC policies for 2 different scenarios. In figure 5, the number of receivers N is 5, the file size F is 5000 packets and the connectivity probability p of each receiver is 0.6. In figure 6, N = 20, F = 2500, p = 0.8. As we can see from both figures, the LR policy largely outperforms both policies. This verifies our intuition that the the LR policy is suspected to be optimal regardless of the number of receivers. Moreover, it can be seen that as the coding window size increases, the difference between the policies decreases. This is expected, since when the coding window size increases, the conflict slots will decrease. In such cases, the policy will act on less slots and thus its effect on the file transfer completion time will decrease. V. C ONCLUSIONS In our previous paper, we applied Random Linear Network Coding in a single-hop network for broadcast communications where a base station transmits one file to N receivers. We presented, analysed and evaluated a policy, namely the Least Received (LR). In this work, we proved that our proposed policy is optimal for small systems (i.e., when the number of receivers is 2), regardless of the values of F , K, p. We suspect that the LR policy is optimal in larger systems too. For that matter, we presented an experimental comparison with two other policies. Our experiments verified our suspicion. [1] S. Bhadra and S. Shakkottai, “Looking at large networks: Coding vs. queueing.” in INFOCOM, 2006. [2] J. Sundararajan, D. Shah, and M. Medard, “Queueing Advantages of Network Coding,” MIT, Cambridge, MA, Tech. Rep., 2007. [3] C. Fragouli and E. Soljanin, “Information flow decomposition for network coding,” Information Theory, IEEE Transactions on, vol. 52, no. 3, pp. 829–848, 2006. [4] A. G. Dimakis, P. Godfrey, Y. Wu, M. J. Wainwright, and K. Ramchandran, “Network coding for distributed storage systems,” Information Theory, IEEE Transactions on, vol. 56, no. 9, pp. 4539–4551, 2010. [5] C. Fragouli, J.-Y. Le Boudec, and J. Widmer, “Network coding: an instant primer,” ACM SIGCOMM Computer Communication Review, vol. 36, no. 1, pp. 63–68, 2006. [6] A. Eryilmaz, A. Ozdaglar, M. Médard, and E. Ahmed, “On the delay and throughput gains of coding in unreliable networks,” Information Theory, IEEE Transactions on, vol. 54, no. 12, pp. 5511–5524, 2008. [7] A. Le, A. S. Tehrani, A. G. Dimakis, and A. Markopoulou, “Instantly decodable network codes for real-time applications,” in Network Coding (NetCod), 2013 International Symposium on. IEEE, 2013, pp. 1–6. [8] S. Sorour and S. Valaee, “Minimum broadcast decoding delay for generalized instantly decodable network coding,” in Global Telecommunications Conference (GLOBECOM 2010). IEEE, 2010, pp. 1–5. [9] T. Ho, M. Médard, R. Koetter, D. R. Karger, M. Effros, J. Shi, and B. Leong, “A random linear network coding approach to multicast,” Information Theory, IEEE Transactions on, vol. 52, no. 10, pp. 4413– 4430, 2006. [10] T. Ho, “Networking from a network coding perspective,” Ph.D. dissertation, Citeseer, 2004. [11] R. Cogill, B. Shrader, and A. Ephremides, “Stable throughput for multicast with random linear coding,” Information Theory, IEEE Transactions on, vol. 57, no. 1, pp. 267–281, 2011. [12] D. Nguyen, T. Tran, T. Nguyen, and B. Bose, “Wireless broadcast using network coding,” IEEE Transactions on Vehicular technology, vol. 58, no. 2, pp. 914–925, 2009. [13] E. Skevakis and I. Lambadaris, “Decoding and file transfer dealy balancing in network coding broadcast,” in International Conference on Communications (ICC). IEEE, 2016 - not yet published. (can be found at http://arxiv.org/abs/1603.07650). [14] M. L. Puterman, Markov Decision Processes : Discrete Stochastic Dynammic Programming. University of British Columbia: John Wiley, 1994. [15] D. P. Bertsekas, D. P. Bertsekas, D. P. Bertsekas, and D. P. Bertsekas, Dynamic programming and optimal control. Athena Scientific Belmont, MA, 1995, vol. 1, no. 2. [16] E. Ahmed, A. Eryilmaz, M. Médard, and A. E. Ozdaglar, “On the scaling law of network coding gains in wireless networks,” in Military Communications Conference, 2007. MILCOM 2007. IEEE. IEEE, 2007, pp. 1–7. [17] H. Khamfroush, D. E. Lucani, P. Pahlevani, and J. Barros, “On optimal policies for network-coded cooperation: theory and implementation,” Selected Areas in Communications, IEEE Journal on, vol. 33, no. 2, pp. 199–212, 2015. [18] Y. Shi, Y. E. Sagduyu, J. Zhang, and J. H. Li, “Adaptive coding optimization in wireless networks: Design and implementation aspects,” Wireless Communications, IEEE Transactions on, vol. 14, no. 10, pp. 5672–5680, 2015. [19] L. Kallenberg, Markov Decision Processes. lecture notes: http://www.math.leidenuniv.nl/k̃allenberg/Lecture-notes-MDP.pdf. [20] R. Bellman, “The theory of dynamic programming,” DTIC Document, Tech. Rep., 1954. [21] R. Weber, Optimization and Control. Univeristy of Cambridge, 2010.
3cs.SY
This is the accepted version (not the IEEE-published version) of the paper that was accepted for presentation at the 2016 IEEE PES General Meeting, July 17-21, 2016. The IEEE published version of the paper can be obtained from ieeexplore using this url: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7741235&isnumber=7741056/ Citation of the Published Version: H. Jain, K. Rahimi, A. Tbaileh, R. P. Broadwater, Akshay Kumar Jain and M. Dilek, "Integrated transmission & distribution system modeling and analysis: Need & advantages," 2016 IEEE Power and Energy Society General Meeting (PESGM), Boston, MA, USA, 2016, pp. 1-5. Digital Object Identifier (DOI) of the Published Version: 10.1109/PESGM.2016.7741235 As per section 8.1.9 of the IEEE PSPB Operations manual, the following copyright notice is being added here: IEEE Copyright Notice: ©2016 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. Integrated Transmission & Distribution System Modeling and Analysis: Need & Advantages Himanshu Jain, Kaveh Rahimi, Ahmad Tbaileh, Robert P. Broadwater Electrical and Computer Engineering Virginia Tech Blacksburg, VA, USA - 24061 [email protected], [email protected], [email protected], [email protected] Akshay Kumar Jain Murat Dilek Electrical Engineering Indian Institute of Technology, Roorkee Roorkee, Uttarakhand, India 247667 [email protected] Electrical Distribution Design (EDD) Blacksburg, VA, USA – 24060 [email protected] Abstract—The primary objective of this paper is to highlight the need for and benefits of studying the steady state and dynamic response of power systems using three phase integrated transmission and distribution (T&D) system models (hereafter referred to as hybrid models). Modeling and simulation requirements for building and analyzing hybrid models are also discussed. Finally, results from steady state and dynamic simulations of a large hybrid model are presented to demonstrate insights that can be obtained from hybrid models which cannot be obtained from the study of transmission and distribution systems separately. Index Terms-- distributed power generation, power distribution, power system dynamics, power system simulation, smart grids I. INTRODUCTION: NEED FOR HYBRID MODELS Power systems are typically divided into high voltage transmission (typically 69 kV and above) and low voltage distribution systems for planning and operations. The sheer size of power systems, jurisdiction of state and federal bodies on various aspects of their planning and operations, and the hitherto reliable operation of separately designed T&D systems are some of the factors due to which the planning and operations of power systems as a single entity has not received much attention. However, it is time that the separated approach for planning and operating power systems be revisited because of reasons that will now be considered. Asymmetry of Transmission Lines: The conventional approach for studying steady-state and dynamic response of the bulk power system is to assume that the transmission network is balanced. One of the driving factors behind this assumption is the presumed symmetry of transmission lines due to transposition. However, many high voltage transmission lines are not transposed [1], [2] and assuming transposition for such lines during planning and operations may cause adverse events to be missed. [2] lists several instances when asymmetry of transmission lines resulted in adverse impacts on the power system such as sequential tripping of generators due to excessive negative sequence voltage and extensive damage to customer rotating machinery. Decentralized Power Generation: Distributed generation (DG), particularly solar photovoltaic (PV) based DG, connected to the distribution system is gradually reaching a penetration level at which its impact on the transmission system cannot be overlooked. Fig. 1 obtained from [3] shows the expected rapid growth in solar PV based DG over the next decade. As the penetration of DG increases, its impact on the steady state and dynamic response of power systems needs to be thoroughly reviewed. The following excerpt from [4] echoes this concern: “Interviews with IOU [Investor Owned Utilities] engineers identified the need to conduct studies to determine the level of penetration [of variable generation] that may adversely impact such issues as system stability” Figure 1. Projected impact of distributed generation at peak load in eastern interconnection [3] Besides displacing central power plants, single phase rooftop solar PV based DG can aggravate imbalance in the power system. The imbalance can result from asymmetrical placement of DG on the three phases, and cloud movement that may not affect DG placed on different phases identically. The potential for increased imbalance due to DG is highlighted in the following excerpt from [4]: “These [procedures used by transmission operators] would need to be expanded to include how to manage imbalances caused by increased DG on the system as this would be a new phenomenon” To model the asymmetry of transmission lines, three phase modeling and simulation of transmission networks is required. Similarly, accurate assessment of the impact of DG on power systems would require combined models of transmission and distribution networks. Both these requirements can be met by developing hybrid models of power systems and software that can simulate their steady state and dynamic response. Therefore, section II discusses the key features of hybrid models and the software needed to analyze them. In section III, results of simulating the steady state and dynamic response of a hybrid model using algorithms developed by the authors are discussed to demonstrate the insights about power systems behavior that are revealed by hybrid models. II. BUILDING AND ANALYZING HYBRID MODELS Two key ingredients are required for building hybrid models: (i) three phase equipment models (e.g., transformers, transmission lines, distributed generation); and (ii) three phase network topology of T&D networks. Once the hybrid model is built, software that can simulate its steady state and dynamic response is needed. This section discusses the challenges, and potential ways of meeting the challenges, in building and analyzing hybrid models. A. Three Phase Equipment Models Steady state and dynamic models for conventional power system equipment, such as transmission lines, transformers, voltage regulators, synchronous and induction machines, can be found in several textbooks and research papers [5]-[7]. The models for these equipment are largely standardized and will not be discussed here. Instead, focus will be on modeling of inverter based DG as solar PV based DG is expected to dominate the DG portfolio in the foreseeable future. To study the steady state behavior of hybrid models, solar PV based DG can be interfaced with the network as a controlled current source [8]. Modeling inverter based DG for studying the dynamic response of hybrid models is, however, more difficult. Inverter based DGs are different from generators that interface with the network through electric machines. While the interaction of electric machines with the network is governed by their physics, interaction of inverter based DGs is governed by the controller built into the inverter. Since the controllers are proprietary, it is difficult to obtain generic dynamic models for inverter based DGs which makes coordination with inverter vendors and utilities important for building accurate dynamic models. In recent years, the Western Electricity Coordinating Council (WECC) has developed generic dynamic models for large solar PV power plants [9]. However, these models are recommended for use under balanced network conditions and it is assumed that the solar power input to the plant does not change over the study duration which is about 20-30 seconds. The National Renewable Energy Laboratory (NREL) has also published several reports and research papers that can be used as guidelines for developing dynamic models of three phase and single phase inverter based DGs [8], [10], [11]. An interesting observation from both [11] and [12] is that when the objective of a study is to assess the impact of solar PV based DG on power system dynamic response, an average model for solar PV inverter may suffice. This property greatly simplifies the dynamic models of inverter based DG as the high frequency switching dynamics of inverters do not need to be modeled. B. Three Phase Network Topology of T&D Networks Many programs (e.g., DEW, CYME, EMTP-RV, GridlabD, Open DSS and ATP) have the capability to model three phase network topologies. Predominantly, three phase network topologies are built for distribution networks since transmission networks are assumed to be balanced. As discussed earlier, asymmetry of transmission networks must also be included in hybrid models. References [13]-[15] discuss an approach for developing hybrid models where such models are automatically built from multiple data sources available within a utility. Manual intervention for developing the models is kept to a minimum. To the best of our knowledge, the hybrid models developed using this approach are assumed to be balanced. Later in the paper an Integrated System Modeling (ISM) approach for building and analyzing hybrid models is discussed. Hybrid models built using the ISM approach can be unbalanced and include equipment with one, two or three phases. C. Software for Simulating Steady State and Dynamic Response of Hybrid Models Simulating the steady state response of power systems (power flow analysis) using hybrid models is challenging because numerical methods that are stable for transmission networks, do not work well for distribution networks [7], [16]. Therefore, power flow analysis methods that can solve both transmission and distribution networks together are needed. [17] discusses one such method which is used in the Distributed Engineering Workstation (DEW) software. Calculating the dynamic response of hybrid models is also challenging. Dynamic response simulation of balanced transmission networks is performed by solving a set of Differential Algebraic Equations (DAEs), where the components with fast dynamics, such as transmission lines, are modeled using algebraic equations (frequency domain), while components with slower dynamics, such as synchronous machines and their controllers, are modeled using differential equations (time domain) [5], [6], [18]. Solving a similar set of DAEs under network imbalance becomes challenging because at the interface of time and frequency domains, six phasor variables (three magnitudes and three angles) should be calculated from three time domain values. References [19]-[21] discuss this problem in detail and present a method for solving the problem which has been implemented in the Three Phase Dynamics Analyzer (TPDA) application of DEW. Electromagnetic Transient Simulation Programs (EMTP), such as EMTP-RV and the Alternative Transients Program (ATP), can also be used to simulate the dynamic response of hybrid models. These programs model the entire power system using differential equations. Reference [22] discusses the application of an EMTP program for simulating the transient response of an actual distribution circuit in New York. However, we do not know of any application of EMTP programs for simulating the dynamic response of hybrid models, which may contain hundreds of distribution circuits besides the transmission network. D. Integrated System Modeling (ISM) Approach In order to build an accurate hybrid model of a power system it is critical that data and models are seamlessly shared between transmission and distribution domains. Moreover, various algorithms that use the hybrid model should also be able to easily share their results. For example, a Monte Carlo method based reliability analysis application should be able to call the power flow analysis application repeatedly for accurately calculating the load unserved due to probabilistically generated contingencies. The ISM approach introduced in [23] enables seamless sharing of data and analysis results. In the ISM approach, a common object oriented modeling architecture is made available to various utility departments to build and maintain equipment and network topology models. Changes made to the models by a department immediately become available to all the analysis algorithms. For example, in a utility that uses the ISM approach to model their power system, changes made to the configuration of transmission or distribution lines can be added to the model by the concerned department and the impact of modified impedances on power flow can be immediately evaluated by the power flow analysis application being used by the operations department. Using the ISM approach a utility can build and maintain accurate and up-to-date hybrid models of their network, and use these models for more efficient planning and operations. III. configuration used in the hybrid model while Table 1 lists the number and types of components in the hybrid model. More details about the hybrid model can be found in [26]. Figure 2. Substation configuration used in the hybrid model TABLE I COMPONENTS OF THE HYBRID MODEL Component Quantity Component Distribution Feeders 96 Breakers/Switches 1-Phase Lines 5,280 1-Phase Loads 2-Phase Lines 288 2-Phase Loads 3-Phase Lines 5,280 3-Phase Loads 3-Phase Underground 480 Voltage Regulators Cables Transformers 134 Shunt Capacitors Quantity 1,154 7,584 96 500 384 384 B. Steady State Simulation (Power Flow Analysis) DEW uses two approaches for building hybrid models, and detailed substation models that tie transmission, subtransmission, and distribution networks together can be included in models built using either approach as shown in Fig. 3. Also shown in Fig. 3 is the difference in interaction during the power flow between the T&D networks of the hybrid models built using the two approaches. A brief description of the two approaches is given below. SIMULATING THE STEADY STATE AND DYNAMIC RESPONSE OF A HYBRID MODEL The primary focus of this section is to demonstrate the advantages of using hybrid models to study the steady state and dynamic response of power systems. The simulations are performed using power flow and dynamic simulation applications (TPDA) of DEW. Detailed discussion on the power flow analysis application used in DEW can be found in [17] while the theory behind TPDA, its key features, and validation with PSLF and ATP can be found in [19]-[21]. A. Description of the Hybrid Model The hybrid model used in the paper consists of the IEEE 39 bus transmission system [24] whose 12 of the 19 loads are modeled using the IEEE 123 bus distribution feeders [25]. At each of these 12 transmission load buses, the lumped load is replaced by a distribution circuit that contains 8 IEEE 123 bus distribution feeders. Fig. 2 shows the substation Figure 3. Illustration of two approaches used in DEW to build and simulate hybrid models In one modeling approach transmission lines come directly into the substation model and distribution lines leave. This modeling approach is very direct and corresponds to how the system is actually built. Hybrid models built using this approach are solved as one large system by the power flow application of DEW. In the second modeling approach there is no physical connection between the transmission and distribution systems, and they interact through three phase transmission system load buses that are tied to three phase distribution system sources as shown in Fig. 3. The steady state solution of the hybrid models built using this approach begins with the power flow solving all the distribution systems by assuming nominal voltages at their distribution sources. Once the distribution systems are solved, the power flowing through the distribution sources are assigned to the corresponding transmission load buses. Next, the transmission system is solved and voltages at the transmission load buses are assigned to the corresponding distribution sources for solving the distribution systems in the next iteration. Therefore, for the models built using the second approach, the transmission and distribution systems are iteratively solved separately, with results being exchanged by boundary components (i.e., transmission load buses and distribution sources) till convergence criteria are met. In DEW the second modeling approach has the advantage of easier extraction of distribution circuits from the hybrid model, as each circuit has its own source. It has also been observed that, in general, the power flow converges faster in hybrid models built using the second approach. For example, while the power flow converged in 16 seconds in the hybrid model of a utility that was built in DEW using the first approach, convergence was achieved in 4 seconds when the model was built using the second approach. However, for the hybrid model described in section III.A, power flow converged in about 5 seconds for both modeling approaches. The results of power flow analysis of this hybrid model are discussed below. a.) The transmission bus voltage is almost balanced with only 0.26% imbalance. On the other hand, minimum voltage imbalance in the distribution buses is 0.49%, and almost 50% of them have greater than 1% voltage imbalance. A transmission only model would not have revealed this variation in voltage imbalance in the distribution feeder. b.) Hybrid models improve the efficiency of steady state analysis. Insights about voltage imbalance at the transmission and distribution buses were obtained in a single step without the need for separate analysis of transmission and distribution systems using different simulation platforms. C. Dynamic Simulation To simulate the dynamic response of the hybrid model, the approach discussed in [19] and [21] is used. The 10 synchronous generators connected to the transmission system are modeled using the GENROU model, while their exciters are modeled using the ST1A model. The parameters used for these dynamic models can be found in [26]. For simulating the transient response of the hybrid model an 18 ohm single line to ground fault on Phase A was initiated at bus 12 (same as bus 12 of the IEEE 39 bus transmission system) of the hybrid model, slightly right to the breaker B2 of Fig. 2 (bus 12 has the same substation configuration as shown in Fig. 2). The fault was initiated at the end of the 10th cycle and was cleared after 10 cycles by opening breakers B1 and B2. Voltages at locations M1 (bus 12) and M2 (2.4 kV single phase load in one of the feeders supplied by bus 12) of Fig. 2 were recorded. Fig. 5 plots the phase A voltages at M1 and M2 along with the under voltage region of the ITI curve which is drawn based on [27]. Fig. 4 plots the voltages of three phase buses (voltage imbalance increases from left to right) in one feeder of the distribution circuit which is supplied by transmission bus 18 of the hybrid model (same as bus 18 of the IEEE 39 bus transmission system). Figure 5. Phase A voltage sag at bus 12 & at a distribution load supplied by bus 12 Figure 4. Three phase bus voltages in a feeder of the distribution circuit supplied by transmission bus 18 The following observations can be made from Fig. 4 which highlight the advantages of using hybrid models for steady state analysis of power systems: From Fig. 5 it can be seen that while the transmission bus voltage suggests that loads connected to Phase A of bus 12 can experience power quality issues such as stalling of air conditioners, and restarting of computers as the voltage remains below 0.4 p.u. for 10 cycles [27], the distribution bus voltage suggests that no such problem should be encountered by the loads, as the voltage is within the “no effect of sag” region of the ITI curve. While not shown here, all the distribution bus voltages were found to be within the “no effect of sag” region of the ITI curve. These observations show the benefits that utility engineers can derive by performing dynamic simulations using hybrid models. In the present case utility engineers will not need to spend time and resources for addressing the power quality problems that the transmission only model would have flagged, but which were found to be non-existent by the hybrid model. IV. CONCLUSION The primary objective of this paper was to highlight the need for and benefits of studying the behavior of power systems using hybrid models. Challenges that may be encountered in building and analyzing hybrid models were discussed, and potential ways for meeting these challenges were identified. In the last section the steady state and dynamic response of a large hybrid model that contained over 10,000 lines and over 8,000 loads was simulated. The simulation results demonstrated that interesting insights into the behavior of power systems can be easily obtained by analyzing hybrid models which would be difficult, if not impossible, to obtain by studying transmission and distribution systems separately. The authors are currently working on studying the impact of high penetration distributed generation, particularly solar PV based DG, on the power system of a utility using the hybrid model of their system. The authors plan to share the results of this study with the power systems community in the near future. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] K.Rahimi, H. Jain, R. Broadwater, J. Hambrick, "Application of Distributed Series Reactors in Voltage Balancing," in Proc IEEE Power & Energy Society General Meeting, 26-30 July 2015. M.M. Adibi, D.P. Milanicz, T.L. Volkmann, "Asymmetry issues in power system restoration," IEEE Trans Power Systems, vol.14, no.3, pp.1085-1091, Aug. 1999. Navigant Consulting, "Assessment of Demand-Side Resources within the Eastern Interconnection," EISPC and NARUC, Mar. 2013. [Online]. Available EISPC website: http://www.naruc.org/grants/Documents/Assessment%20of%20Deman d%20Side%20Resources%20within%20EISPC%20%20Final%20Report%20March%202013%20Revised%20(2)1.pdf. Black & Veatch, "Biennial Report on Impacts of Distributed Generation," California Public Utilities Commission, B&V Project No. - 176365, May 2013. [Online]. Available: http://www.cpuc.ca.gov/NR/ rdonlyres/BE24C491-6B27-400C-A174-85F9B67F8C9B/0 /CPUCDGImpactReportFinal2013_05_23.pdf. P.W. Sauer and M.A. Pai, Power System Dynamics and Stability, Illinois: Stipes Publishing L.L.C, 2006. P. Kundur, Power System Stability and Control, New Delhi: Tata McGraw Hill, 2012. W.H. Kersting, “Distribution System Modeling and Analysis”, CRC Press LLC, 2002. C. Schauder, "Advanced inverter technology for high concentration levels of PV generation in distribution systems," National Renewable Energy Laboratory, Mar. 2014. [Online]. Available NREL website: http://www.nrel.gov/docs/fy14osti/60737.pdf. Western Electricity Coordinating Council Modeling and Validation Work Group, “WECC solar plant dynamic modeling guide”, Western Electricity Coordinating Council, Apr. 2014. [Online] Available at WECC website: https://www.wecc.biz/_layouts/15/WopiFrame.aspx?sourcedoc=/Reliab ility/WECC%20Solar%20Plant%20Dynamic%20Modeling%20Guideli nes.pdf&action=default&DefaultItemOpen=1. [10] E. Muljadi, M. Singh, R. Bravo, and V. Gevorgian, "Dynamic model validation of PV inverters under short-circuit conditions," in Proc. 2013 IEEE Green Technologies Conference, pp.98-104, 4-5 Apr. 2013 [11] E. Muljadi, M. Singh, and V. Gevorgian, "User guide for PV dynamic model simulation written on PSCAD platform," National Renewable Energy Laboratory, NREL/TP-5D00-62053, Nov. 2014. [Online]. Available NREL website: http://www.nrel.gov/docs/fy15osti/62053.pdf [12] P. Forsyth, O. Nzimako, C. Peters, M. Moustafa, “Challenges of modeling electrical distribution networks in real-time”, unpublished, presented at the International Symposium on Smart Electric Distribution Systems and Technologies, Vienna, Austria, 8-11 Sept., 2015. [13] P.B. Evans, S. Hamilton, T. Dossey, “High-Definition modeling of electric power delivery networks”, in Proc. DistribuTECH, 3-5 Feb., 2009. [14] P. Evans, “Verification of Energynet® methodology”, California Energy Commission, CEC-500-2010-021, Dec. 2010. [Online]. Available: http://www.energy.ca.gov/2010publications/CEC-500-2010021/CEC-500-2010-021.PDF. [15] P. Evans, “Integrated transmission and distribution model for assessment of distributed wholesale photovoltaic generation”, California Energy Commission, CEC‐200‐2013‐003, Apr. 2013. [Online]. Available: http://www.energy.ca.gov/2013publications/CEC200-2013-003/CEC-200-2013-003.pdf. [16] D. Shirmohammadi, H.W. Hong, A. Semlyen, G.X. Luo, “A compensation-based power flow method for weakly meshed distribution and transmission networks”, IEEE Trans Power Systems, vol.3, no.2, pp. 753-762, May 1988. [17] M. Dilek, F. de Leon, R. Broadwater, and S. Lee, “A Robust Multiphase Power Flow for General Distribution Networks”, IEEE Trans. Power Systems, vol. 25, pp. 760-768, May 2010. [18] B. Stott, "Power system dynamic response calculations," in Proc. of the IEEE, vol.67, no.2, pp.219-241, Feb. 1979. [19] H. Jain, A. Parchure, R.P. Broadwater, M. Dilek and J. Woyak, “ThreePhase Dynamics Simulation of Power Systems Using Combined Transmission and Distribution System Models”, arXiv:1505.06225v1 [cs.SY], May, 2015. [Online]. Available: http://arxiv.org/abs/1505.06225/. [20] A.H. Parchure, "Towards three-phase dynamic analysis of large electric power systems," Master of Science Thesis, Dept. Elect. Eng., Virginia Tech, Blacksburg, 2015. [21] H. Jain, A. Parchure, R.P. Broadwater, M. Dilek and J. Woyak,” Three phase dynamics analyzer - a new program for dynamic simulation using three phase models of power systems”, in Proc. IEEE ICPS/PCIC Conference, Hyderabad, India, 19-21 Nov. 2015. [22] V. Spitsa, R. Salcedo, Ran Xuanchang, J.F. Martinez, R.E. Uosef, F. de Leon, D. Czarkowski and Z. Zabar, "Three–Phase time–domain simulation of very large distribution networks," IEEE Trans. Power Delivery, vol.27, pp.677-687, April 2012. [23] R.P. Broadwater, “Model-centric smart grid: Using ISM to enable intelligent infrastructure”, Utility Horizons, 2015. [Online]. Available at Utility Horizon website: http://www.nxtbook.com/nxtbooks/utilityhorizons/2015q2/index.php?st artid=9#/42 [24] IEEE 39 Bus System, Illinois Center for a Smarter Electric Grid (ICSEG). [Online]. Available: http://publish.illinois.edu/smartergrid/ieee-39-bus-system/ [25] Distribution Test Feeders, IEEE Power and Energy Society. [Online]. Available: http://ewh.ieee.org/soc/pes/dsacom/testfeeders/ [26] Hybrid Model built from IEEE Transmission and Distribution Systems and Dynamic Parameters of Power Plant Equipment for the IEEE 39 bus Transmission System. [Online]. Available: https://www.scribd.com/doc/297265604/ [27] G.G. Karady, S. Saksena, B. Shi, N. Senroy, "Effects of Voltage Sags on Loads in a Distribution System," Power Systems Energy Research Center, Ithaca, NY, PSERC Publication 05-63, Oct. 2005.
3cs.SY
Quotients of mapping class groups from Out(Fn ) 1 arXiv:1608.03868v3 [math.GR] 27 Mar 2018 Quotients of mapping class groups from Out(Fn) Khalid Bou-Rabee∗ Christopher J. Leininger † March 29, 2018 Abstract We give a short proof of Masbaum and Reid’s result that mapping class groups involve any finite group, appealing to free quotients of surface groups and a result of Gilman, following Dunfield–Thurston. keywords: mapping class groups, involve, finite groups Let Σg be a closed oriented surface of genus g and Fn a nonabelian free group of rank n. The fundamental group, π1 (Σg ), is residually free [Bau62] and Fn has a wealth finite index subgroups [MKS04, pp. 116]. In [DT06], N. Dunfield and W. Thurston consider the action of the mapping class group Mod(Σg ) on the set of finite index normal subgroups of π1 (Σg ) with finite simple quotients, and in particular those containing the kernel of an epimorphism π1 (Σg ) → Fg . Their observations relating to work of R. Gilman [Gil77], give rise to finite index subgroups of Mod(Σg ) that surjects symmetric groups of arbitrarily large order; see the discussion following the proof of [Bau62, Theorem 7.4]. Theorem 1 (Dunfield–Thurston). For all g ≥ 3, r ≥ 1, there exists an epimorphism φ : π1 (Σg ) → Fg and a prime q, so that  N ⊳ π1 (Σg ) | ker φ < N and π1 (Σg )/N ∼ = PSL(2, q) has at least r elements, and its (finite index) stabilizer in Mod(Σg ) acts as the full symmetric group on this set. We explain the proof of this in Section 1.2. In this note, we observe that since every finite group embeds in some finite symmetric group, Theorem 1 provides a new elementary proof of a result of G. Masbaum and A. Reid [MR12]. Recall that a group G involves a group H if there exists a finite index subgroup L ≤ G and a surjective map φ : L → H. Corollary 2 (Masbaum–Reid). Let Σg,m be a surface of genus g with m punctures. If 3g − 3 + m ≥ 1 (or g = 1 and m = 0) then Mod(Σg,m ) involves any finite group. The few mapping class groups not covered by the corollary are finite groups; see, e.g. [FM12]. Corollary 2 is also proved using arithmetic methods by F. Grunewald, M. Larsen, A. Lubotzky, and J. Malestein [GLLM15]. Further applications of the quotients from Theorem 1 include new proofs of residual finiteness and separability of handlebody groups; see §3 for theorem statements and proofs. Acknowledgements. The authors would like to thank Alan Reid and Alex Lubotzky for helpful conversations and Benson Farb for suggesting improvements on an earlier draft. ∗ K.B. † C.L. supported in part by NSF grant DMS-1405609 supported in part by NSF grant DMS-1510034. Quotients of mapping class groups from Out(Fn ) 2 1 Preliminaries 1.1 G-defining subgroups Here we collect some results surrounding definitions and discussions in R. Gilman [Gil77]. Let G and F be groups. A G-defining subgroup of F is a normal subgroup N of F such that F/N is isomorphic to G. Let X(F, G) denote the set of all G–defining subgroups of F. The automorphism group Aut(F) acts on normal subgroups of F while preserving their quotients, and hence on the set X(F, G) of G-defining subgroups of F. Since inner automorphisms act trivially, the action descends to an action of the outer automorphism group of F, Out(F), on X(F, G). If G is finite, and F is finitely generated, one obtains a finite permutation representation of Out(F). Let Fn be the free group of rank n. The following is Theorem 1 of [Gil77]. Theorem 3 (Gilman). For any n ≥ 3 and prime p ≥ 5, Out(Fn ) acts on the PSL(2, p)-defining subgroups of Fn as the alternating or symmetric group, and both cases occur for infinitely many primes. From the proof, Gilman obtains the following strengthened form of residual finiteness for Out(Fn ). Corollary 4 (Gilman). For any n ≥ 3, the group Out(Fn ) is residually finite alternating and residually finite symmetric via the quotients from Theorem 3. This means that for any φ ∈ Out(Fn ) − {1}, there exist primes p so that the action of Out(Fn ) on X(Fn , PSL(2, p)) is alternating (and also primes p so that the action is symmetric), and φ acts nontrivially. We will also need the following well-known fact, obtained from the classical embedding of a free group into PSL(2, Z) as a subgroup of finite index, (c.f. A. Peluso [Pel66]). Lemma 5. For any n ≥ 2, any element α ∈ Fn − {1}, and all but finitely many primes p, there exists a PSL(2, p)–defining subgroup of Fn not containing α . Proof. Let Fn be a finite index, free subgroup of rank n in the free group F2 := ha, bi. Identify Fn with its image in PSL(2, Z) under the injective homomorphism F2 → PSL(2, Z) given by     1 2 1 0 a 7→ , and b 7→ . 0 1 2 1 Let α ∈ Fn − {1} be given and let A ∈ SL(2, Z) be a matrix representing α . Since α 6= 1, we may assume that either A has a nonzero off-diagonal entry d 6= 0, or else a diagonal entry d > 1. Then for any prime p not dividing d in the former case, or d ± 1 in the latter, we have that π p (α ) is nontrivial in the quotient π p : PSL(2, Z) → PSL(2, p); that is, α ∈ / ker π p . Since Fn has finite index in F2 , there exists m ≥ 1 so that the matrices     1 m 1 0 and 0 1 m 1 represent elements of Fn in PSL(2, Z). For any prime p not dividing m, the π p –image of these elements generate PSL(2, p). Thus, for all but finitely many primes p, ker π p ∩ Fn is a PSL(2, p)– defining subgroup not containing α . 1.2 Handlebody subgroups and maps to free groups Let Σ = Σg be a closed surface of genus g ≥ 2 and let H = Hg be a handlebody of genus g. Given a homeomorphism φ : Σ → ∂ H ⊂ H, the induced homomorphism is a surjection φ∗ : π1 (Σ) → π1 (H) ∼ = Fg . As is well-known, every epimorphism π1 (Σ) → Fg arises in this way (see e.g. Lemma 2.2 in [LR02]). The kernel, ∆φ = ker(φ∗ ) is an Fg –defining subgroup, and is the subgroup generated by the Quotients of mapping class groups from Out(Fn ) 3 simple closed curves on Σ whose φ –images bound disks in H. We write Hφ for the handlebody H, equipped with the homeomorphism φ : Σ → ∂ H. Let Mod(Hφ ) denote the subgroup of the mapping class group Mod(Σ) consisting of the isotopy classes of homeomorphisms that extend over Hφ (via the identification φ : Σ → ∂ H). Equivalently, Mod(Hφ ) consists of those mapping classes [ f ] such that f∗ (∆φ ) = ∆φ ; that is Mod(Hφ ) is the stabilizer in Mod(Σ) of ∆φ . Any element [ f ] ∈ Mod(Hφ ) induces an automorphism we denote Φ∗ ([ f ]) ∈ Out(Fg ), which defines a homomorphism Φ∗ : Mod(Hφ ) → Out(Fg ). The main result of [Gri64] implies the next proposition. Proposition 6. For any g ≥ 0, and homeomorphism φ : Σ → ∂ H, Φ∗ : Mod(Hφ ) → Out(Fg ) is surjective. The kernel of Φ∗ , the set of mapping classes in Mod(Hφ ) that act trivially on π1 (H) is also a well-studied subgroup denoted Mod0 (Hφ ). Recall that X(Fg , G) and X(π1 (Σ), G) are the sets of G–defining subgroups of Fg and π1 (Σ), respectively. Define X φ (π1 (Σ), G) := {φ∗−1 (N) | N ∈ X(Fg , G)} ⊂ X(π1 (Σ), G), Alternatively, this is precisely the set of G–defining subgroups containing ∆φ : X φ (π1 (Σ), G) = {N ∈ X(π1 (Σ), G) | ∆φ < N}. Lemma 7. The handlebody subgroup is contained in the stabilizer Mod(Hφ ) < stab X φ (π1 (Σ), G). Moreover, if Out(Fg ) acts on X(Fg , G) as the full symmetric group, then Mod(Hφ ) (and hence stab X φ (π1 (Σ), G)) acts on X φ (π1 (Σ), G) as the full symmetric group. Proof. Let N ∈ X φ (π1 (Σ), G) and let [ f ] ∈ Mod(Hφ ), where f is a representative homeomorphism. Since f∗ (∆φ ) = ∆φ , we have ∆φ < f∗ (N), and f∗ (N) ∈ X φ (π1 (Σ), G). Thus, f∗ preserves X φ (π1 (Σ), G), as required. The last statement follows immediately from Proposition 6 and the fact that the bijection from the correspondence theorem X φ (π1 (Σ), G) → X(Fg , G) is Φ∗ –equivariant. 2 Mapping class groups involve any finite group: The proofs of Theorem 1 and Corollary 2. Here we give the proof of Theorem 1, following Dunfield–Thurston (see [DT06, pp. 505-506]). Proof of Theorem 1. Fix g ≥ 3 and let Π be the infinitely many primes for which Out(Fg ) acts on the PSL(2, p)-defining subgroups as the symmetric group, guaranteed by Theorem 3. As a consequence of Corollary 4, the cardinality of X(Fg , PSL(2, p)) is unbounded over any infinite set of primes p, and hence there exists a prime p ∈ Π where the number of PSL(2, p)-defining subgroups is R ≥ r. By Lemma 7, stab X φ (π1 (Σ), PSL(2, p)) acts on X φ (π1 (Σ), PSL(2, p)) as the symmetric group, defining a surjective homomorphism stab X φ (π1 (Σ), PSL(2, p)) → Sym(X φ (π1 (Σ), PSL(2, p))) ∼ = SR . Since X(π1 (Σ), PSL(2, p)) is a finite set, stab X φ (π1 (Σ), PSL(2, p)) < Mod(Σ) has finite index, completing the proof. Quotients of mapping class groups from Out(Fn ) 4 Proof of Corollary 2. For g, m as in the statement and any r ∈ N, we show that there is a finite index subgroup of Mod(Σg,m ) that surjects a symmetric group on at least r elements. Since any finite subgroup is isomorphic to a subgroup of some such symmetric group, this will prove the theorem. First observe that for any m, g ≥ 0, the kernel of the action of Mod(Σg,m ) on the m punctures of Σg,m is a finite index subgroup Mod′ (Σg,m ) < Mod(Σg,m ). Furthermore, if 0 ≤ m < m′ , there is a surjective homomorphism Mod′ (Σg,m′ ) → Mod′ (Σg,m ) obtained by “filling in” m′ − m of the punctures; see [FM12]. Now, because Mod′ (Σ0,4 ) ∼ = F2 , and the symmetric group on r elements is 2–generated, it follows that Mod′ (Σ0,4 ) surjects Sr . From the previous paragraph, it follows that Mod′ (Σ0,m ) surjects Sr for all m ≥ 4. Similarly, Mod(Σ1,0 ) ∼ = SL(2, Z), which has a finite index subgroup isomorphic to F2 , and so there is a finite index subgroup of Mod(Σ1,m ) that surjects Sr for all m ≥ 0. As shown in [BH71], there is a surjective homomorphism Mod(Σ2,0 ) → Mod(Σ0,6 ), and consequently, we may find surjective homomorphisms from finite index subgroups of Mod(Σ2,m ) to Sr for all m ≥ 0. From this and the previous paragraph, it suffices to assume g ≥ 3 and m = 0. The required surjective homomorphism to a symmetric group in this case follows from Theorem 1, completing the proof. 3 Separating handlebody subgroups and residual finiteness The finite quotients of Mod(Σ) coming from surjective homomorphisms π1 (Σg ) → Fg also allow us to deduce the following result of [LM07]. Recall that a subgroup K < F is said to be separable in F if for any α ∈ F − K, there exists a finite index subgroup G < F containing K and not containing α . Theorem 8 (Leininger-McReynolds). For any g ≥ 2 and homeomorphism to the boundary of a handlebody, φ : Σ → ∂ H, the groups Mod(Hφ ) and Mod0 (Hφ ) are separable in Mod(Σg ). While the proof of separability of Mod(Hφ ) in Mod(Σg ) works for all g ≥ 2, separability of Mod0 (Σg ) only follows from the discussion here when g ≥ 3. Proof. Suppose Σ = Σg for g ≥ 2, and observe that for any p, any [h] ∈ stab X φ (π1 (Σ), PSL(2, p)), and any α ∈ ∆φ , we have h∗ (α ) ∈ K for all K ∈ X φ (π1 (Σ), PSL(2, p)). By Lemma 7 this is true for all [h] ∈ Mod(Hφ ). Now let [ f ] ∈ Mod(Σ) − Mod(Hφ ), so that f∗ (∆φ ) 6< ∆φ . Let γ ∈ ∆φ be an element such that (the conjugacy class of) f∗ (γ ) is not in ∆φ . (In fact, well-defining f∗ (γ ) requires a choice of basepoint preserving representative homeomorphisms for the mapping class of f , which we make arbitrarily.) Then φ∗ ( f∗ (γ )) ∈ Fg − {1}, and so by Lemma 5, we can find a prime p and a PSL(2, p)–defining subgroup N ∈ X(Fg , PSL(2, p)) so that φ∗ ( f∗ (γ )) 6∈ N. Therefore, f∗ (γ ) 6∈ φ∗−1 (N) ∈ X φ (π1 (Σ), PSL(2, p)), and hence [ f ] 6∈ stab X φ (π1 (Σ), PSL(2, p)). Since stab X φ (π1 (Σ), PSL(2, p)) is a finite index subgroup containing Mod(Hφ ) (by Lemma 7) and not containing [ f ], and since [ f ] was arbitrary, it follows that Mod(Hφ ) is separable. Since Mod0 (Hφ ) < Mod(Hφ ) and since Mod(Hφ ) is separable, it suffices to consider an element [ f ] ∈ Mod(Hφ ) \ Mod0 (Hφ ), and produce a finite index subgroup of Mod(Σ) containing Mod0 (Hφ ) and not containing [ f ]. For all p, Mod0 (Hφ ) is contained in the subgroup of stab X φ (π1 (Σ), PSL(2, p)) consisting of those mapping classes that act trivially on X φ (π1 (Σ), PSL(2, p)). Since [ f ] 6∈ Mod0 (Hφ ), Φ∗ ([ f ]) 6= 1 in Out(Fg ). For g ≥ 3, Corollary 4 implies that for some p, Φ∗ ([ f ]) acts nontrivially on X(Fg , PSL(2, p)). Therefore, [ f ] acts nontrivially on X φ (π1 (Σ), PSL(2, p)), and so the finite index subgroup G < Mod(Σ) consisting of those mapping classes preserving the subset X φ (π1 (Σ), PSL(2, p)) and acting trivially on this does not contain [ f ], proving that Mod0 (Hφ ) is separable. Mapping class groups were shown to be residually finite by Grossman as a consequence of the fact that surface groups are conjugacy separable; see [Gro75]. Quotients of mapping class groups from Out(Fn ) 5 Theorem 9 (Grossman). Mapping class groups are residually finite. Residual finiteness of Mod(Σg ) follows immediately from separability of the handlebody subgroups Mod(Hφ ), and the following. Lemma 10. The intersection of all handlebody subgroups Mod(Hφ ), over all homeomorphisms φ : Σg → ∂ H is trivial if g ≥ 3, and isomorphic to Z/2Z if g = 2. The intersection of handlebody subgroups Mod0 (Hφ ) is trivial for all g ≥ 2. Proof. In [Mas86], Masur proved that the limit set of the handlebody subgroup in the Thurston boundary of Teichmüller space is a nowhere dense subset. The intersection of all handlebody subgroups is a normal subgroup and so is either finite, or else has limit set equal to the entire Thurston boundary. By Masur’s result, we must be in the former case, and hence the intersection of handlebody subgroups is finite. But Mod(Σg ) has no nontrivial finite, normal subgroups if g ≥ 3, while for g = 2, the only nontrivial, finite normal subgroup is the order-two subgroup generated by the hyperelliptic involution. This proves the first statement. The second follows from the first and the fact that the hyperelliptic involution of Σ2 induces a nontrivial automorphism of F2 ∼ = π1 (H), for any homeomorphism φ : Σ2 → H. Proof of Theorem 9 for Mod(Σg ), with g ≥ 2. An equivalent formulation of residual finiteness is that the intersection of all finite index subgroups is trivial. Therefore Theorem 8 and Lemma 10 immediately implies the result. References [Bau62] Gilbert Baumslag, On generalised free products, Math. Z. 78 (1962), 423–438. MR 0140562 [BH71] Joan S. Birman and Hugh M. Hilden, On the mapping class groups of closed surfaces as covering spaces, Advances in the theory of Riemann surfaces (Proc. Conf., Stony Brook, N.Y., 1969), Princeton Univ. Press, Princeton, N.J., 1971, pp. 81–115. Ann. of Math. Studies, No. 66. MR 0292082 [DT06] Nathan M. Dunfield and William P. Thurston, Finite covers of random 3-manifolds, Invent. Math. 166 (2006), no. 3, 457–521. MR 2257389 [FM12] Benson Farb and Dan Margalit, A primer on mapping class groups, Princeton Mathematical Series, vol. 49, Princeton University Press, Princeton, NJ, 2012. MR 2850125 [Gil77] Robert Gilman, Finite quotients of the automorphism group of a free group, Canad. J. Math. 29 (1977), no. 3, 541–551. MR 0435226 [GLLM15] Fritz Grunewald, Michael Larsen, Alexander Lubotzky, and Justin Malestein, Arithmetic quotients of the mapping class group, Geom. Funct. Anal. 25 (2015), no. 5, 1493– 1542. MR 3426060 [Gri64] H. B. Griffiths, Automorphisms of a 3-dimensional handlebody, Abh. Math. Sem. Univ. Hamburg 26 (1963/1964), 191–210. MR 0159313 [Gro75] Edna K. Grossman, On the residual finiteness of certain mapping class groups, J. London Math. Soc. (2) 9 (1974/75), 160–164. MR 0405423 [LM07] Christopher J. Leininger and D. B. McReynolds, Separable subgroups of mapping class groups, Topology Appl. 154 (2007), no. 1, 1–10. MR 2271769 Quotients of mapping class groups from Out(Fn ) 6 [LR02] Christopher J. Leininger and Alan W. Reid, The co-rank conjecture for 3-manifold groups, Algebr. Geom. Topol. 2 (2002), 37–50 (electronic). MR 1885215 [Mas86] Howard Masur, Measured foliations and handlebodies, Ergodic Theory Dynam. Systems 6 (1986), no. 1, 99–116. MR 837978 [MKS04] Wilhelm Magnus, Abraham Karrass, and Donald Solitar, Combinatorial group theory, second ed., Dover Publications, Inc., Mineola, NY, 2004, Presentations of groups in terms of generators and relations. MR 2109550 [MR12] Gregor Masbaum and Alan W. Reid, All finite groups are involved in the mapping class group, Geom. Topol. 16 (2012), no. 3, 1393–1411. MR 2967055 [Pel66] Ada Peluso, A residual property of free groups, Comm. Pure Appl. Math. 19 (1966), 435–437. MR 0199245 Khalid Bou-Rabee Department of Mathematics, CCNY CUNY E-mail: [email protected] Christopher Leininger Department of Mathematics, University of Illinois Urbana-Champaigne E-mail: [email protected]
4math.GR
ON MAXIMAL SUBALGEBRAS arXiv:1501.03753v2 [math.AC] 3 May 2017 STEFAN MAUBACH AND IMMANUEL STAMPFLI Abstract. Let k be an algebraically closed field. We classify all maximal k-subalgebras of any one-dimensional finitely generated k-domain. In dimension two, we classify all maximal k-subalgebras of k[t, t−1 , y]. To the authors’ knowledge, this is the first such classification result for an algebra of dimension > 1. In the course of this study, we classify also all maximal k-subalgebras of k[t, y] that contain a coordinate. Furthermore, we give examples of maximal k-subalgebras of k[t, y] that do not contain a coordinate. 1. Introduction All rings in this article are commutative an have a unity. A minimal ring extension is a non-trivial ring extension that does not allow a proper intermediate ring. A good overview of minimal ring extensions can be found in [PPL06]. A first general treatment of minimal ring extensions was done by Ferrand and Olivier in [FO70]. They came up with the following important property of minimal ring extensions. Theorem 1.0.1 (see [FO70, Théorème 2.2]). Let A ( R be a minimal ring extension and let ϕ : Spec(R) → Spec(A) be the induced morphism on spectra. Then there exists a unique maximal ideal m of A such that ϕ induces an isomorphism ≃ Spec(R) \ ϕ−1 (m) −→ Spec(A) \ {m} . Moreover, the following statements are equivalent: i) The morphism ϕ : Spec(R) → Spec(A) is surjective; ii) The ring R is a finite A-module; iii) We have m = mR. Let A ( R be a minimal ring extension. Then A is called a maximal subring of R. In the case where Spec(R) → Spec(A) is non-surjective, we call A an extending 1 maximal subring of R and otherwise, we call it a non-extending 2 maximal subring. Moreover, the unique maximal ideal m of A (from the theorem above) is called the crucial maximal ideal. In this article we are interested in the description of all maximal subrings of a given ring R. Since in the non-extending case R is a finite A-module, one might suspect, that this is not such a difficult case. Indeed, in Section 2 we provide a classification of all non-extending maximal subrings of an arbitrary ring (up to the classification of all maximal subfields of a given field). In fact, Dobbs, Mullins, Picavet and PicavetL’Hermitte gave in [DMPPL05] already such a classification. The novelty of our approach is that we explicitly construct all the non-extending maximal subrings of a given ring. 2010 Mathematics Subject Classification. 13B02, 13B30, 13G05, 13A18 (primary), and 14R10, 14H50 (secondary). Key words and phrases. Commutative Algebra, Integral Domains, Valuations. 1Since [FO70] proves that in this case f is a flat epimorphism, the literature calls this sometimes the “flat epimorphism case”. 2The literature calls this sometimes the “finite case”. 1 2 STEFAN MAUBACH AND IMMANUEL STAMPFLI Thus, we are left with the extending case. One can reduce the study to the case where R is an integral domain, and this is explained in Section 3. Moreover, in the same section, we give some general properties of maximal subrings that we will use often in the course of this article. As the classification of all extending maximal subrings of an arbitrary integral domain still seems to be a difficult task, we restrict ourselves to the case where R is a finitely generated domain over an algebraically closed field k (of any characteristic). Thus our guiding problem is the following. Problem. Classify all extending maximal subalgebras of a given affine k-domain where k is an algebraically closed field. If the affine k-domain is one-dimensional, then we are able to describe all extending maximal k-subalgebras. This description is provided in Section 4. Let us give a simple example. Example 1.0.1. If R = k[t, t−1 ], then the only extending maximal k-subalgebras are k[t] and k[t−1 ]. In fact, P1k is a smooth projective closure of A∗k . If we identify A∗k with the image under the open immersion A∗k −→ P1k , t 7−→ (t : 1) , then k[t] is the subring of functions on A∗k that are defined at (0 : 1) ∈ P1k and k[t−1 ] is the subring of those functions on A∗k that are defined at (1 : 0). This example is an instance of the general description. Theorem 1.0.2 (see Theorem 4.0.2). Let R be a finitely generated one-dimensional k-domain. Take a projective closure X of the affine curve X = Spec(R) such that X is non-singular at every point of X \ X. If X \ X contains just a single point, then R has no extending maximal k-subalgebra. Otherwise, for any point p ∈ X \ X, { f ∈ R | f is defined at p } is an extending maximal k-subalgebra of R and every extending maximal k-subalgebra of R is of this form. In dimension two, the most natural algebra to study is the polynomial algebra in two variables k[t, y]. Using the classification of extending maximal subalgebras of a one-dimensional affine k-domain, we give in Section 5 plenty examples of extending maximal subalgebras of k[t, y] that do not contain a coordinate of k[t, y], i.e. they do not contain a polynomial in k[t, y] which is the component of an automorphism of A2k . These examples indicate that it is difficult to classify all extending maximal subalgebras of k[t, y]. Therefore, we impose more structure in the problem. Namely, we search for all extending maximal subalgebras of k[t, y] that contain a coordinate of k[t, y]. Another natural 2-dimensional affine k-domain beside the polynomial algebra k[t, y] is the localization of it in t, i.e. the 2-dimensional domain k[t, t−1 , y]. This algebra is directly related to our former problem, as it is isomorphic to the localization of k[t, y] in any coordinate of k[t, y]. In fact, in this article we classify all extending maximal subalgebras of k[t, t−1 , y] and get in the course of this classification all extending maximal subalgebras of k[t, y] that contain a coordinate. This is the bulk of this article. To the authors’ knowledge, this is the first such classification result for an algebra of dimension > 1. Let us give an instructive example, before we give more details on our results. Example 1.0.2 (see Lemma 3.2.2). Let k be an algebraically closed field and let R = k[t, t−1 , y]. The ring A = k[t] + y k[t, t−1 , y] = k[t, y, y/t, y/t2, y/t3 , . . .] ON MAXIMAL SUBALGEBRAS 3 is an extending maximal subalgebra of k[t, t−1 , y]. The crucial maximal ideal of A is given by m = (t, y, y/t, y/t2, . . .) . Thus A ⊆ k[t, t−1 , y] induces an open immersion A∗k × A1k → Spec(A) and the complement of the image is just {m}. Moreover, the morphism Spec(A) → A2k induced by k[t, y] ⊆ A, sends the crucial maximal ideal m to the origin (0, 0). So in some sense we “added” to A∗k × A1k the point (0, 0) ∈ {0} × A1k . Another description of the affine scheme Spec(A) is the following: It is the inverse ϕ ϕ limit of . . . −→A2k −→ A2k −→ A2k inside the category of affine schemes, where ϕ(t, x) = (t, tx). A little more general, for any α ∈ k[t], the ring k[t] + (y − α) k[t, t−1 , y] is also an extending maximal subalgebra of k[t, t−1 , y]. Towards the classification of all extending maximal subalgebras of k[t, t−1 , y], we describe in Section 6 all extending maximal k-subalgebras of k[t, t−1 , y] that contain k[t, y]. To formulate our results we introduce some notation. Let k[[tQ ]] be the Hahn field over k with rational exponents, i.e. the field of formal power series X α= as ts such that supp(α) = { s ∈ Q | as 6= 0 } is well ordered. s∈Q Moreover, we denote by k[[tQ ]]+ the subring of elements α ∈ k[[tQ ]] that satisfy supp(α) ⊆ [0, ∞). By extending the scalars k[t, t−1 ] to the Hahn field k[[tQ ]] one has a simple classification: Theorem 1.0.3 (see Corollary 6.3.8 and Remark 6.3.6). We have a bijection   extending maximal   k[[tQ ]]+ −→ k-subalgebras of k[[tQ ]][y] , α 7−→ k[[tQ ]]+ + (y − α) k[[tQ ]][y]   Q + that contain k[[t ]] [y] With the aid of this theorem, we are able to classify all extending maximal k-subalgebras of k[t, t−1 , y] that contain k[t, y]. Theorem 1.0.4 (see Theorem 6.5.1). Let S be the set of α ∈ k[[tQ ]]+ such that supp(α) is contained in a strictly increasing sequence of Q. Then we have a surjection   extending maximal   k-subalgebras of k[t, t−1 , y] , α 7−→ Aα ∩ k[t, t−1 , y] S −→   that contain k[t, y] where Aα = k[[tQ ]]+ + (y − α) k[[tQ ]][y] . Moreover, two elements of S are sent to the same k-subalgebra, if and only if they lie in the same orbit under the natural action of Hom(Q/Z, k∗ ) on S . In Section 7 we start with the description of all maximal k-subalgebras of k[t, t−1 , y]. Our main result of that section is the following. Theorem 1.0.5 (see Proposition 7.0.1). Let A ⊆ k[t, t−1 , y] be an extending maximal k-subalgebra. Then, exactly one of the following cases occur: i) There exists an automorphism σ of k[t, t−1 , y] such that σ(A) contains k[t, y]; ii) A contains k[t, t−1 ]. The maximal k-subalgebras of case i) are described by Theorem 1.0.4. Thus, we are left with the description of the extending maximal k-subalgebras of k[t, t−1 , y] that contain k[t, t−1 ]. This will be done in Section 8. In order to state our result let us introduce some notation. Let M be the set of extending maximal k-subalgebras 4 STEFAN MAUBACH AND IMMANUEL STAMPFLI of k[t, y] that contain k[t]. Moreover, let N be the set of extending maximal ksubalgebras A of k[t, y, y −1 ] that contain k[t, y −1 ] and such that A −→ k[t, y, y −1 ]/(t − λ) is surjective, where λ is the unique element in k such that the crucial maximal ideal of A contains t − λ (this λ exists by Remark 8.0.1). The set N is described by Theorem 1.0.4. Then, the maximal k-subalgebras of case ii) in Theorem 1.0.5 are described by the following result. Theorem 1.0.6 (see Theorem 8.0.1 and Proposition 7.0.2). With the definitions of M and of N from above, we have bijections Θ and Φ      B in M s.t. the crucial   extending maximal k-  Θ Φ N −→ M ⊇ maximal ideal of B ←− subalgebras of k[t, t−1 , y]     does not contain t that contain k[t, t−1 ] given by Θ(A) = A ∩ k[t, y] and Φ(A′ ) = A′ ∩ k[t, y]. In particular, with the aid of the bijection Θ : N → M in Theorem 1.0.6 we get a description of the extending maximal k-subalgebras of k[t, y] that contain a coordinate of k[t, y]. 2. Classification of the non-extending maximal subrings Let R be any ring and denote by X = Spec(R) the corresponding affine scheme. In the sequel, we describe three procedures to construct a non-extending maximal subring of R. a) Glueing two closed points transversally. Choose two different closed points x1 , x2 ∈ X such that their residue fields κ(x1 ), κ(x2 ) are isomorphic and choose some isomorphism σ : κ(x1 ) → κ(x2 ). Let Rx1 ,x2 = { f ∈ R | σ(f (x1 )) = f (x2 ) } (note that Rx1 ,x2 depends on σ). Then Rx1 ,x2 is a non-extending maximal subring of R with crucial maximal ideal mx1 ,x2 = { f ∈ R | σ(f (x1 )) = f (x2 ) = 0 } , the homomorphisms on residue fields Rx1 ,x2 /mx1 ,x2 → κ(xi ) are isomorphisms and the fiber of X → Spec(Rx1 ,x2 ) over mx1 ,x2 contains only the points x1 and x2 . Moreover, the natural linear map on tangent spaces Tx1 X ⊕ Tx2 X −→ Tmx1 ,x2 Spec(Rx1 ,x2 ) is an isomorphism. Proof. For i = 1, 2, let mi ⊆ R be the maximal ideal corresponding to xi . The injective homomorphism Rx1 ,x2 /mx1 ,x2 −→ R/mi is surjective. Indeed, let f ∈ R. By symmetry, we can assume that i = 1. Then there exists h ∈ m1 such that h(x2 ) = σ(f (x1 )) − f (x2 ). Thus f + h ∈ Rx1 ,x2 , which proves the surjectivity. Let κ = Rx1 ,x2 /mx1 ,x2 . Since mx1 ,x2 = m1 ∩ m2 , the homomorphism Rx1 ,x2 /mx1 ,x2 ⊆ R/mx1 ,x2 = R/m1 ∩ m2 = R/m1 × R/m2 identifies with the diagonal homomorphism κ → κ × κ. Since mx1 ,x2 = mx1 ,x2 R, it follows that Rx1 ,x2 is a maximal subring of R, see Lemma 3.2.2. Moreover, the fiber of X → Spec(Rx1 ,x2 ) over mx1 ,x2 consists of x1 and x2 . For the last statement we prove that the κ-linear map on cotangent spaces mx1 ,x2 /m2x1 ,x2 −→ m1 /m21 ⊕ m2 /m22 (1) ON MAXIMAL SUBALGEBRAS 5 is an isomorphism. Let f1 ∈ m1 such that f1 (x2 ) = 1. The ideals m21 and m22 are coprime, since m1 and m2 are coprime, and thus we get m21 ∩ m22 = m21 · m22 ⊆ m2x1 ,x2 . This proves the injectivity of (1). Let h ∈ m2 . Then f12 h ∈ mx1 ,x2 , f12 h − h ∈ m22 and f12 h ∈ m21 , which proves that {0} ⊕ m2 /m22 lies in the image of (1). By symmetry we get the surjectivity of (1).  b) Deleting a tangent direction at a closed point. Choose a closed point x ∈ X and a derivation δ : OX,x → κ(x) that induces a non-zero tangent vector in Tx X. Let Rx,δ = { f ∈ R | δ(f ) = 0 } . Then Rx,δ is a non-extending maximal subring of R with crucial maximal ideal mx,δ = { f ∈ R | δ(f ) = 0 , f (x) = 0 } . The morphism X → Spec(Rx,δ ) is bijective, maps x on mx,δ and induces an isomorphism on residue fields Rx,δ /mx,δ → κ(x). Moreover there is an induced exact sequence 0 −→ κ(x)v −→ Tx X −→ Tmx,δ Spec(Rx,δ ) where v ∈ Tx X denotes the non-zero tangent vector induced by δ. Proof. Let m ⊆ R be the maximal ideal corresponding to x in X. Since δ induces a non-zero κ(x)-linear map m/m2 → κ(x), there exists e ∈ m such that δ(e) = 1. The injective homomorphism Rx,δ /mx,δ −→ κ(x) is surjective. Indeed, if f ∈ R, then there exists r ∈ R such that δ(f ) − r(x) = 0 inside κ(x). Hence, f − er ∈ Rx,δ and er ∈ m, which proves the surjectivity. Let κ = Rx,δ /mx,δ . Since mx,δ is an ideal of R, we get a κ-algebra isomorphism κ[ε]/(ε2 ) −→ R/mx,δ , ε 7−→ e and the map Rx,δ /mx,δ → R/mx,δ identifies with the κ-linear map κ → κ[ε]/(ε2 ). By Lemma 3.2.2, it follows that Rx,δ is a maximal subring of R. Clearly, the induced map X → Spec(R) is bijective and maps x to mx,δ . The last statement follows from the exact sequence of κ-vector spaces δ mx,δ /m2x,δ −→ m/m2 −→ κ −→ 0 .  Remark 2.0.1. i) There are affine schemes X such that for some closed point x ∈ X the tangent space Tx X 6= 0, even though there exists no non-zero derivation OX,x → κ(x). Take for example X = Spec(Z) and x = pZ where p is some prime number. ii) There are affine schemes X such that for some closed point x ∈ X there exists a non-zero derivation δ : OX,x → κ(x) that induces the zero vector in Tx X. Take for example any affine scheme X and take any closed point x ∈ X such that there exists a non-zero derivation δ0 : κ(x) → κ(x). Then δ 0 κ(x) OX,x −→ κ(x) −→ is a non-zero derivation that induces the zero vector in Tx X. 6 STEFAN MAUBACH AND IMMANUEL STAMPFLI c) Shrinking the residue field at a closed point. Choose a closed point x ∈ X and choose a maximal subfield k of the residue field κ(x), i.e. a subfield k ⊆ κ(x) such that there exists no proper intermediate field between k and κ(x). Let Rx,k = { f ∈ R | f (x) ∈ k } . Then Rx,k is a non-extending maximal subring of R with crucial maximal ideal mx,k = { f ∈ R | f (x) = 0 } and the residue field Rx,k /mx,k is k. Moreover, the morphism X → Spec(Rx,k ) is bijective and maps x on mx,k . Proof. Note, that a maximal subfield of a field is automatically a maximal subring of that field. Thus, the maximality of Rx,v in R follows from the fact that k = Rx,v /mx,v −→ R/mx,v = κ(x) is a maximal subfield, see Lemma 3.2.2. The other statements are clear.  The next result shows, that every non-extending maximal subring arises by one of the three constructions above. In fact, a version of this result can be found in [DMPPL05, Corollary II.2]. However, for the sake of completeness and the shortness of the argument, we provide a proof. The main ingredient will be an easy, but very important Lemma of Ferrand and Olivier [FO70]. Proposition 2.0.1. If A ⊆ R is a non-extending maximal subring, then it is one of the maximal subrings constructed in a), b) or c). Proof. By assumption, the map Spec(R) → Spec(A) is surjective and there exists a unique maximal ideal m ⊆ A such that m = mR. By Lemma 3.2.2, the field K = A/m is a maximal subring of R/m. By [FO70, Lemme 1.2] one of the following possibilities occur: i) The map K ⊆ R/m identifies with the diagonal map K → K × K. ii) The map K ⊆ R/m identifies with the K-homomorphism K → K[ε]/(ε2 ). iii) R/m is a field. If we are in case i), then A = Rx1 ,x2 where x1 , x2 ∈ Spec(R) correspond to the two maximal ideals {0} × K, K × {0} of R/m ≃ K × K and σ is given by ≃ ≃ κ(x1 ) ←− A/m −→ κ(x2 ) . If we are in case ii), then A = Rx,δ where x ∈ Spec(R) corresponds to the maximal ideal (ε) of R/m ≃ K[ε]/(ε2 ) and δ is given by δ′ δ : R −→ R/m ≃ K[ε]/(ε2 ) −→ K where δ ′ is the K-derivation that maps ε to 1. If we are in case iii), then A = Rx,k where x corresponds to the maximal ideal m of R and k is the subfield K of R/m. This finishes the proof.  To the authors’ knowledge there is no complete description of the maximal subfields of a given field. Partial results in this direction can be found in [PPL06, Proposition 2.2]. However, if we restrict ourselves to the case, where R is a finitely generated algebra over an algebraically closed field and if we consider only subalgebras, then we can exclude the construction c). More precisely, we get the following result. Corollary 2.0.2. Let k be an algebraically closed field and let R be a finitely generated k-algebra. Denote X = Spec(R). Then i) { f ∈ R | f (x1 ) = f (x2 ) inside k } (where x1 6= x2 ∈ X are closed points) ON MAXIMAL SUBALGEBRAS 7 ii) { f ∈ R | Dv (f ) = 0 } (where 0 6= v ∈ Tx X and x ∈ X is a closed point) are non-extending maximal k-subalgebras of R. Moreover, every non-extending maximal k-subalgebra of R is one of the above. Proof. For closed points x1 6= x2 ∈ X, it follows by the construction in a) that the k-subalgebra in i) is equal to Rx1 ,x2 (we define σ : k → k as the identity). For a closed point x ∈ X and for a non-zero tangent vector 0 6= v ∈ Tx X, it follows by the construction in b) that the k-subalgebra in ii) is equal to Rx,δ where we define δ as the k-derivation v Dv : OX,x = mx ⊕ k ·1 −→ mx −→ mx /m2x −→ k and where mx ⊆ OX,x denotes the unique maximal ideal. Conversely, let A ⊆ R be a non-extending maximal k-subalgebra. By Proposition 2.0.1, A is one of the maximal subrings of R constructed in a), b) or c). Since R is a finitely generated k-algebra and since k is algebraically closed, it follows that the residue field of every closed point of X is k. Since R is a finitely generated Amodule, it follows that X → Spec(A) is surjective, and therefore the residue field of every closed point of Spec(A) is k. Thus A cannot be one of the maximal subrings constructed in c). We distinguish two cases. • A is the maximal subring constructed in a). Then there exist two different closed points x1 6= x2 in X and an isomorphism σ : κ(x1 ) → κ(x2 ) such that A = { f ∈ R | σ(f (x1 )) = f (x2 ) } . Since k ⊆ A, σ commutes with the canonical isomorphisms k ≃ κ(xi ). Thus by identifying κ(xi ) with k, the isomorphism σ is the identity. • A is the maximal subring constructed in b). Then there exist a closed point x ∈ X and a derivation δ : OX,x → k (that induces a non-zero tangent vector at x) such that A = { f ∈ R | δ(f ) = 0 } . Since k ⊆ A, it follows that δ is a k-derivation. There exists a k-linear isomorphism from Tx X to the vector space of k-derivations OX,x → k, given by v 7→ Dv . Hence, there exists 0 6= v ∈ Tx X such that δ = Dv . This finishes the proof.  3. Some general considerations about maximal subrings 3.1. Reduction to integral domains. The aim of this subsection is to show that one can reduce the classification of the extending maximal subrings of a ring R to the case, where R is an integral domain. Let p be a minimal prime ideal of R and denote by π : R → R/p the canonical projection. If A is an extending maximal subring of R, such that the crucial maximal ideal contains A ∩ p, then one can easily see, that π(A) is an extending maximal subring of R/p. On the other hand, if B is an extending maximal subring of R/p, then one can easily see π −1 (B) is an extending maximal subring of R and its crucial maximal ideal contains π −1 (B) ∩ p. Thus we established a bijective correspondence:      extending maximal subrings A ( R  extending maximal 1:1 such that the crucial maximal ←→ . subrings of R/p   ideal contains A ∩ p Note that for every extending maximal subring A of R there exists a minimal prime ideal p of R such that the crucial maximal ideal contains A∩p. Thus we are reduced to the case, where R is an integral domain. 8 STEFAN MAUBACH AND IMMANUEL STAMPFLI 3.2. Some properties of maximal subrings. In this subsection we gather some general properties of maximal subrings, that we will constantly use in the course of this article. The first lemma says that maximal subrings behave well under localization. Lemma 3.2.1 (see [FO70, Lemme 1.3]). Let A ⊆ R be a maximal subring and let S be a multiplicatively closed subset of A. Then the localization AS is either a maximal subring of the localization RS or AS = RS . The second lemma gives us the possibility for certain cases to reduce to quotient rings, while searching for maximal subrings. It is a direct consequence of [FO70, Lemme 1.4]. Lemma 3.2.2. Let A ⊆ R be a ring extension and let I ⊆ A be an ideal such that I = IR. Then A is a maximal subring of R if and only if A/I is a maximal subring of R/I. In particular, for every ring extension A ⊆ R, the conductor ideal I = { a ∈ A | aR ⊆ A } satisfied I = IR. Note that every ideal J of A with J = JR is contained in the conductor ideal I. Lemma 3.2.3 (see [FO70, Lemme 3.2]). Let A ( R be an extending maximal subring. Then the conductor ideal of A in R is a prime ideal of R. Samuel introduced in [Sam57] the P2 -property for ring extensions. This property will be crucial for our classification result. Definition 3.2.1. Let A ⊆ R be a subring. We say that A satisfies the property P2 in R, if for all r, q ∈ R with rq ∈ A we have either r ∈ A or q ∈ A. Lemma 3.2.4 (see [FO70, Proposition 3.1]). Let A ( R be an extending maximal subring. Then A satisfies the property P2 in R. The next lemma shows, that the extending maximal subrings of a field have a well known characterization. It is a direct consequence of [FO70, Proposition 3.3]. Lemma 3.2.5. Let K be a field and let R ( K be a subring. Then, R is an extending maximal subring of K if and only if R is a one-dimensional valuation ring of K. Let us state and prove the following rather technical lemma for future use. Lemma 3.2.6. Let C be a Noetherian domain such that the quotient field Q(C) is not a finitely generated C-algebra. Let A ( C[y] be an extending maximal subring that contains C and denote by m the crucial maximal ideal of A. Then m ∩ C 6= 0. Proof. Assume that m ∩ C = 0. Then we have the following commutative diagram C // A  Q(C)  // A/m . // C[y] π As A is a maximal subring of C[y], we have A 6⊆ C and thus there exists f ∈ A with degy (f ) > 0. Let f = fn y n + . . . + f1 y + f0 where fi ∈ C, fn 6= 0. We have y(fn y n−1 + . . . + f1 ) = f − f0 ∈ A . ON MAXIMAL SUBALGEBRAS 9 Since A satisfies the property P2 in C[y] and since y 6∈ A we get fn y n−1 +. . .+f1 ∈ A. Proceeding in this way it follows that there exists 0 6= c ∈ C such that cy ∈ A. Let us define the C-algebra homomorphism σ by π(cy) . σ : C[y] −→ A/m , y 7→ π(c) We claim that σ and π coincide on A. We proceed by induction on the y-degree of the elements in A. By definition, σ and π coincide on C, i.e. they coincide on the elements of y-degree equal to zero. Let g = gn y n +. . .+g1 y+g0 ∈ A and assume that gn 6= 0, n > 0. As before, we get y(gn y n−1 + . . .+ g1 ) ∈ A and gn y n−1 + . . .+ g1 ∈ A. Thus we have π(g) = π(y(gn y n−1 + . . . + g1 )) + π(g0 ) π(cy(gn y n−1 + . . . + g1 )) + π(g0 ) π(c) π(cy) π(gn y n−1 + . . . + g1 ) + π(g0 ) = π(c) = = σ(y)σ(gn y n−1 + . . . + g1 ) + σ(g0 ) = σ(g) , where we used in the second last equality the induction hypothesis. This proves the claim. Since π is surjective, σ is surjective too. Hence there exists a ∈ A/m which is algebraic over Q(C) such that A/m is generated by a as a C-algebra. Let h0 + h1 x + . . . + hm xm + xm+1 be the minimal polynomial of a over Q(C) and let C0 = C[h0 , . . . , hm ] ⊆ Q(C) . As C is Noetherian, C0 is Noetherian. Moreover, A/m is generated by 1, a, . . . , am as a C0 -module. Hence, Q(C) is a finitely generated C0 -module. Thus Q(C) is a finitely generated C-algebra, a contradiction.  4. The one-dimensional case Let k be an algebraically closed field. The purpose of this section is to classify all extending maximal k-subalgebras of a given one-dimensional affine k-domain R. The key ingredient is the following observation. Lemma 4.0.1. Let A be a k-subalgebra of the one-dimensional affine k-domain R. Then either A = k or A is a one-dimensional affine k-domain. Proof. We can assume that A 6= k. Then there exists a ∈ A \ k, which is transcendental over k. By the Krull-Akizuki-Theorem applied to k[a] ⊆ A, it follows that A is Noetherian, see for example [Nag75, Theorem 33.2]. By [OY82, Corollary 1.2], we have dim A = tr.degk A = 1 . Let A′ be the integral closure of A in its quotient field. By [Mat86, Theorem 9.3] it follows that dim A′ = 1. In particular, A′ is equidimensional. [OY82, Theorem 3.2] implies now, that A is an affine k-domain.  The next Theorem classifies all extending maximal k-subalgebras of R. Theorem 4.0.2. Take a projective closure X of the affine curve X = Spec(R) such that X is non-singular at every point of X \ X (such an X is unique up to isomorphism). Let U ( X be a proper open subset that contains X and the complement U \ X is just a single point. Then the image of the map on sections Γ(U, OU ) → R is an extending maximal k-subalgebra of R and every extending maximal k-subalgebra of R is of this form. 10 STEFAN MAUBACH AND IMMANUEL STAMPFLI Proof. First, note that U ( X is an affine curve, see [Har77, Chp. IV, Ex. 1.4]. Let A ⊆ R be the image of Γ(U, OU ) → R and consider an intermediate ring A ⊆ B ( R. By Lemma 4.0.1, B is a one-dimensional affine k-domain. Consider the induced maps f X −→ Spec(B) −→ U . As this composition is an open immersion, the first map is an open immersion. As f is not an isomorphism, the complement Spec(B) \ f (X) is non-empty. As U \ X is a single point, this implies that Spec(B) → U is surjective. In fact, since U is non-singular in U \ X, this map is an isomorphism and thus we get A = B. This proves that A is an extending maximal k-subalgebra of R. Conversely, let A ( R be an extending maximal k-subalgebra. By Lemma 4.0.1, A is an affine k-domain. Let g : X → Spec(A) be the induced map on affine varieties. It is an open immersion and Spec(A) \ X consists only of the crucial maximal ideal m of A. Consider the birational map g−1 Spec(A) 99K X −→ X , (2) which is an open immersion on g(X). We have to show, that this map is an open immersion on Spec(A). By [FO70, Proposition 3.3], the localization Am is a onedimensional valuation ring. Since Am is Noetherian, it is a discrete valuation ring. Thus Spec(A) is non-singular at m and therefore the birational map (2) is an injective morphism, which is an open immersion locally at m (note that X is smooth at  every point of X \ X). Thus the morphism (2) is an open immersion. Example 4.0.1. Consider R = k[x, y]/(y−x3 +xy 2 ). The closure of X = Spec(R) ⊆ A2 in P2 consists of the three smooth points p1 = (0 : 1 : 0) , p2 = (1 : 1 : 0) , p3 = (−1 : 1 : 0) . The corresponding extending maximal k-subalgebras of R are given by the images on sections of the following maps (all maps are seen as restrictions of maps A2x,y → A2s,t ) p1 : p2 : p3 : X −→ { t − s4 + t2 } , (x, y) 7−→ (x, xy) 2 2 2 (x, y) 7−→ (x − y, (x − y)x) 2 2 2 (x, y) 7−→ (x + y, (x + y)x) . X −→ { s − t + 2t − ts } , X −→ { s − t − 2t + ts } , 5. Examples of extending maximal k-subalgebras of k[t, y] that do not contain a coordinate It is thus natural to ask, whether all extending maximal k-subalgebras of k[t, y] contain a coordinate. In this section we construct plenty of examples, which give a non-affirmative answer to this question. These examples indicate that it is difficult to classify all maximal subalgebras of k[t, y]. For the construction of these examples we use techniques of birational geometry of surfaces and the classification of extending maximal subalgebras of onedimensional affine k-domains. As we fix the algebraically closed field k, we write Pn for Pnk and An for Ank . Definition 5.0.1. Let L ⊆ P2 be a line, let p ∈ L be a point and let Γ ⊆ P2 be an irreducible curve with Γ 6= L which passes through p. We say that Γ is tangent to L at p of order at least m, if there exists a sequence of blow-ups π πm−1 π π 1 2 m P2 S1 −→ Sm−1 −→ . . . −→ Sm −→ ON MAXIMAL SUBALGEBRAS 11 such that π1 is centered at p, πi is centered at a point on the exceptional divisor of πi−1 for i = 2, . . . , m and the strict transforms of L and of Γ under π1 ◦ · · · ◦ πm have an intersection point on the exceptional divisor of πm . The following Lemma is crucial for our construction. Lemma 5.0.1. Let Γ ⊆ P2 be an irreducible curve and let L 6= Γ be a line in P2 . Fix some p ∈ Γ ∩ L. If Γ is tangent to L at p of order at least 2 and if Γ is smooth at p, then there exists no coordinate f : A2 = P2 \ L → A1 such that the rational map f |Γ : Γ 99K A1 is defined at p. Proof. Let ϕ : P2 99K P2 be a birational map that restricts to an automorphism on P2 \ L = A2 . Let pr : A2 → A1 be the projection given by pr(x, y) = x. We have to prove that the rational map pr ◦ϕ|Γ : Γ 99K A1 is not defined at p. Let a ∈ P2 be the image of p under the rational map ϕ|Γ : Γ 99K P2 , which is defined at p since Γ is smooth at p. We have a ∈ L, since either ϕ contracts the line L to some point on L or ϕ maps L isomorphically onto itself. If a 6= (0 : 1 : 0), then the map pr ◦ϕ|Γ : Γ 99K A1 is not defined at p. Thus we can assume that a = (0 : 1 : 0). Let σ : Bla (P2 ) → P2 be the blow-up of P2 centered at a. Then, pr ◦ϕ|Γ : Γ 99K A1 is not defined at p if and only if ϕ σ−1 Γ ⊆ P2 99K P2 99K Bla (P2 ) maps p to the intersection point of the exceptional divisor of σ and the strict transform of L under σ. In other words, we have to prove that ϕ(Γ) is tangent to L at a of order at least 1. If ϕ is an automorphism, then the result is obvious, so we can assume that there exist base-points of ϕ. By [Bla09, Lemma 2.2] there exist birational morphisms ε : Y → P2 and η : Y → P2 such that the following is satisfied: • we have η = ϕ ◦ ε; • no curve of self-intersection −1 of Y is contracted by both, ε and η; • there are decompositions ε = ε1 ◦ · · · ◦ εn : Y −→ P2 and η = η1 ◦ · · · ◦ ηn : Y −→ P2 where ε1 (respectively η1 ) is a blow-up centered at a point on L and εi (respectively ηi ) is a blow-up centered at a point on the exceptional divisor of εi−1 (respectively ηi−1 ) for i > 1; • the integer n is greater than or equal to 3; • the strict transform of L under ε (respectively η) has self-intersection −1. Let qi−1 be the center of εi and let Ei be the exceptional divisor of εi for i = 1, . . . , n. Moreover, we denote by Li the strict transform of L under εi ◦ · · · ◦ ε1 for i = 1, . . . , n. Since (Ln )2 = −1, we see that L passes through q0 , that L1 passes through q1 , but Li passes not through qi for i > 1. By assumption, Γ is tangent to L at p of order at least 2, so there exists a sequence of blow-ups π1 π2 P2 S1 −→ S2 −→ such that π1 is centered at p, π2 is centered at some point on the exceptional divisor of π1 and the strict transforms of L and of Γ under π1 ◦ π2 intersect at one point of the exceptional divisor. Denote this intersection point on S2 by p2 . Consider the birational map −1 ψ = ε−1 2 ◦ ε1 ◦ π1 ◦ π2 . This map is defined at p2 and we denote by p′2 its image under ψ. Since p′2 ∈ L2 and since q2 6∈ L2 there exists exactly one point r ∈ Ln that is mapped onto p′2 via εn ◦ · · · ◦ ε3 (note that n ≥ 3). Remark that the strict transform of Γ under ε passes through r. 12 STEFAN MAUBACH AND IMMANUEL STAMPFLI Let ri−1 be the center of ηi and let Fi be the exceptional divisor of ηi for i = 1, . . . , n. Since En and Ln are the only curves of self-intersection −1 lying in Y \ ε−1 (P2 \ L), it follows that En is the strict transform of L under η and that ηn contracts Ln i.e. Fn = Ln . Hence we have for i = 2, . . . , n ηi ◦ · · · ◦ ηn (r) = ri−1 ∈ Fi−1 . As r ∈ Ln , the curve Ln is contracted by η onto η(r); this point being also the point where ϕ contracts L, we get η(r) = a ∈ L. Since the strict transform of L under η has self-intersection −1, it follows that r1 is the intersection point of F1 and the strict transform of L under η1 . As the strict transform of Γ under ε passes through r, its image passes through all the points ri and thus also through r1 . So the curve ϕ(Γ) is tangent to L at a ∈ P2 of order at least 1.  With this lemma we can construct plenty of examples of extending maximal k-subalgebras of k[t, y] that do not contain a coordinate of k[t, y]. Let X be an irreducible curve of A2 , which is defined by some polynomial f in k[t, y]. Let Γ be the closure of X in P2 . Assume that there exists a smooth point p on Γ that lies not in X and assume that Γ \ X contains more than one point. Then the ring A = { h ∈ Γ(X, OX ) | h is defined at p } is an extending maximal k-subalgebra of Γ(X, OX ), which is finitely generated over k, see Theorem 4.0.2 and Lemma 4.0.1. Let a1 , . . . , ak ∈ A be a set of generators and let r1 , . . . , rk ∈ k[t, y] be elements such that ri |X = ai . If Γ is tangent to L = P2 \ A2 at p of order at least 2, then k[r1 , . . . , rk ] + f k[t, y] is an extending maximal k-subalgebra of k[t, y] that does not contain a coordinate of k[t, y], see Lemma 3.2.2 and Lemma 5.0.1. 6. Classification of maximal subrings of k[t, t−1 , y] that contain k[t, y] The goal of this section is the classification of all maximal subrings of k[t, t−1 , y] that contain k[t, y]. Let us start with a simple example. Example 6.0.1. By using Lemma 3.2.2 one can see that A = k[t, y] + (y 2 − t) k[t, t−1 , y] is a maximal subring of k[t, t−1 , y], which contains k[t, y]. Another description of this ring is the following A = B ∩ k[t, t−1 , y] , where B = k[t1/2 , y] + (y − t1/2 ) k[t1/2 , t−1/2 , y] . By using Lemma 3.2.2, one can see that B is a maximal subring of k[t1/2 , t−1/2 , y], which contains k[t1/2 , y]. However, the ring B is of a simpler form than A (we replaced y 2 − t by a linear polynomial in y). The general strategy works in a similar way. First we “enlarge” the coefficients k[t] to some ring F in such a way, that all maximal subrings of Ft [y] that contain F [y] have a simple form (in the example, we replaced k[t] by F = k[t1/2 ]). Then we prove that the intersection of such a simple maximal subring with k[t, t−1 , y] yields a maximal subring of k[t, t−1 , y] that contains k[t, y] and that we receive by this intersection-process every maximal subring that contains k[t, y]. For the “enlargement” of the coefficients we have to introduce some notation and terminology. ON MAXIMAL SUBALGEBRAS 13 6.1. Notation and terminology. Let k be an algebraically closed field (of any characteristic). We denote by k[[tQ ]] the Hahn field over k with exponents in Q, i.e. the field of all formal power series X α= a s ts s∈Q with coefficients as ∈ k and with the property that the support supp(α) = { s ∈ Q | as 6= 0 } is a well ordered subset of Q. There exists a natural valuation on k[[tQ ]], namely ν : k[[tQ ]] −→ Q , α 7−→ min supp(α) . The valuation ring of ν we denote by k[[tQ ]]+ . More generally, for any subring B ⊆ k[[tQ ]] we denote by B + the subring of elements with ν-valuation ≥ 0, i.e. B + = { b ∈ B | ν(b) ≥ 0 } . Finally, for any subring A ⊆ k[[tQ ]][y] we denote by A1 the subset of degree one elements, i.e. A1 = { a ∈ A | degy (a) = 1 } . 6.2. Organisation of the section. In Subsection 6.3, we classify all maximal subrings of K[y] that contain K + [y] for any algebraically closed field K ⊆ k[[tQ ]] that contains the field of rational functions k(t) and satisfies the so called cutoffproperty Definition 6.3.2). For example, the Hahn field k[[tQ ]], the Puiseux S (see1/n field n k((t )) or the algebraic closure of k(t) enjoy the cutoff-property (see Example 6.3.3). In Subsection 6.4, we prove that for any maximal subring A ( K[y] containing K + [y], the intersection A ∩ k[t, t−1 , y] is again a maximal subring of k[t, t−1 , y]. Moreover, we prove that any maximal subring of k[t, t−1 , y] that contains k[t, y] can be constructed as an intersection like above. Thus we are left with the question, which of the maximal subrings of K[y] that contain K + [y] give the same ring, after intersection with k[t, t−1 , y]. We give an answer to this question in Subsection 6.5. 6.3. Classification of maximal subrings of K[y] that contain K + [y]. Throughout this subsection, we fix an algebraically closed subfield K ⊆ k[[tQ ]] that contains the field of rational functions k(t). Proposition 6.3.1. Let K + [y] ⊆ A ( K[y] be an intermediate ring and assume that A ( K[y] satisfies the property P2 in K[y]. Then A = K + [A1 ]. Proof. Let a ∈ A. After multiplying a with a unit of K + , we can assume that yn a = s + lower degree terms in y , t where s ∈ Q and n ≥ 0 is an integer. We have to show that a ∈ K + [A1 ]. We proceed by induction on n. If n = 0, then a ∈ A ∩ K = K + . So let us assume n > 0. As K is algebraically closed and contains t, there exist α1 , . . . , αn ∈ K with      y − α2 y − αn y − α1 ··· . a= ts/n ts/n ts/n Since A ⊆ K[y] satisfies the property P2 , we have (y − αi )/(ts/n ) ∈ A for some i. This implies that (y − αi )n ∈ K + [A1 ] . ts Thus q = a − (y − αi )n /ts ∈ A. By induction hypothesis we have q ∈ K + [A1 ] and thus a ∈ K + [A1 ]. Hence A ⊆ K + [A1 ], which implies the result.  14 STEFAN MAUBACH AND IMMANUEL STAMPFLI Lemma 6.3.2. Let K + [y] ⊆ E ( K[y] be a proper subring. Then there exists a proper subring E ′ ( K[y] that satisfies the property P2 and contains E. Proof. Denote by Ẽ ⊆ K[y] the integral closure of E in K[y]. As E 6= K[y], it follows that tE is a proper ideal of E. In particular, ϕ : Spec(K[y]) → Spec(E) is nonsurjective. Since Spec(Ẽ) → Spec(E) is surjective (see [Mat86, Theorem 9.3]), it follows that Ẽ 6= K[y]. Hence there exists an intermediate ring Ẽ ⊆ E ′ ( K[y] that satisfies the property P2 in K[y], by [Sam57, Théorème 8].  Now, we give an application of these two results to maximal subrings. Roughly speaking, the proposition says, that for rings which are generated by degree one elements, one can see the maximality already on the level of degree one elements. Proposition 6.3.3. Let K + [y] ⊆ A ( K[y] be a proper subring that satisfies A = K + [A1 ]. Then A is maximal in K[y] if and only if for all f ∈ K[y] \ A of degree 1 we have A[f ] = K[y] . (3) Proof. Assume that A satisfies (3). Let A ⊆ E ( K[y] be an intermediate ring. We want to prove A = E. By Lemma 6.3.2, there exists a proper subring E ′ ( K[y] that satisfies the property P2 and contains E. Now, if there would exist f ∈ (E ′ )1 \ A1 , then we would have by (3) K[y] = A[f ] ⊆ E ′ ⊆ K[y] . This would imply that E ′ = K[y], a contradiction. Thus we have A1 = (E ′ )1 . According to Proposition 6.3.1 we have A = E ′ and therefore A = E. The other implication is clear.  Definition 6.3.1. Let S = { s1 < s2 < . . . } be a strictly monotone sequence in Q≥0 and let Λ = { α1 , α2 , . . . } be a sequence in K such that supp(αi ) ⊆ [0, si ) and supp(αi+1 − αi ) ⊆ [si , si+1 ) for all i > 0. We call then (S, Λ) an admissible pair of K. If α is an element of K such that supp(α − αi ) ⊆ [si , ∞) for all i > 0, then we call α a limit of the admissible pair (S, Λ). Lemma 6.3.4. Let (S, Λ) be an admissible pair of k[[tQ ]]. Then there exists a limit in k[[tQ ]]. Moreover, if lim si = ∞, then α is unique. P P s Proof. Let αi = ais ts . Now, we define α = as t , where as = ais for some i with si > s. One can easily check, that as is well defined. Moreover, ∞ [ supp(αi ) and supp(α) ∩ [0, si ) = supp(αi ) for i = 1, 2, . . . supp(α) = i=1 and thus supp(α) is well ordered. It follows that α ∈ k[[tQ ]]+ and that supp(α − αi ) ⊆ [si , ∞) for all i > 0. The uniqueness statement is clear.  Definition 6.3.2. The subfield K ⊆ k[[tQ ]]P satisfies the cutoff property, if for all P s α = s as t ∈ K and for all u ∈ Q we have s≥u as ts ∈ K. Example 6.3.3. An important example of an algebraically closed field inside k[[tQ ]] that contains k(t) and satisfies the cutoff property is the Puiseux field ∞ [ k((t1/n )) . n=1 Q Clearly, the Hahn field k[[t ]] itself is an example. Another example is the algebraic closure of k(t) (inside the Puiseux field). This follows from the fact that P m i/n is algebraic over k(t) where ai ∈ k and n, m ∈ N (it is the sum of i=−m ai t algebraic elements). ON MAXIMAL SUBALGEBRAS 15 In the next proposition we classify all P2 -subrings of K[y] under the additional assumption, that K satisfies the cutoff property. Proposition 6.3.5. Assume that K satisfies the cutoff property. Let K + [y] ⊆ E ( K[y]. Then E satisfies the property P2 in K[y] if and only if   y − αi E = K+ i = 1, 2, . . . tsi for an admissible pair (S, Λ) of K or E = K + [e] for some element e ∈ K[y] of degree 1. Proof. Assume that K + [y] ⊆ E ( K[y] is a subring that satisfies the property P2 in K[y]. We consider the following subset of E1 :   y−α N= ∈ E | s ∈ Q , α ∈ K and supp(α) ⊆ [0, s) . >0 ts Using the fact, that E ∩ K = K + and that K satisfies the cutoff property, one can see that N has the following two properties: ′ i) If (y − α)/ts , (y − α′ )/ts ∈ N and s ≤ s′ , then supp(α′ − α) ⊆ [s, s′ ). s ii) If (y − α)/t ∈ E, s ∈ Q>0 and α ∈ K, then α ∈ K + and there exists n ∈ N , such that ((y − α)/ts ) − n ∈ K + . Property ii) of N implies K + [N, y] = K + [E1 ] . (4) + Let U ⊆ Q>0 be the set of all s ∈ Q>0 such that there exists α ∈ K with (y − α)/ts ∈ N . Property i) of N implies that for every s ∈ U there exists a unique αs ∈ K + such that (y − αs )/ts ∈ N . Now, we make the following distinction. sup(U ) ∈ U : Let u = sup(U ). It follows from property i) of N , that (y − αs )/ts ∈ K + [(y − αu )/tu ] for all s ∈ U . This implies K + [N, y] ⊆ K + [(y − αu )/tu ]. Clearly, we have K + [(y − αu )/tu ] ⊆ K + [N, y]. With (4) and Proposition 6.3.1, we get the equality E = K + [(y − αu )/tu ]. sup(U ) ∈ / U : Let S = { s1 < s2 < . . . } be a sequence in U such that lim si = sup(U ). If we set αi = αsi and Λ = { α1 , α2 , . . . }, then (S, Λ) is an admissible pair. Let s ∈ U . As sup(U ) ∈ / U , there exists i with si > s. With property i) of N , we get now (y − αs )/ts ∈ K + [(y − αi )/tsi ]. Thus K + [N, y] is generated over K + by (y − αi )/tsi , i = 1, 2, . . . . By (4) and Proposition 6.3.1 we get K + [N, y] = K + [E1 ] = E. Thus E has the claimed form. Now, we prove that K + [e] satisfies the property P2 in K[y], provided that e ∈ K[y] has degree 1. By applying a K-algebra automorphism of K[y], we can assume that e = y. Consider the following extension of the valuation ν|K on K to K[y] µ : K[y] −→ Q , f0 + . . . + fn y n 7−→ min{ν(f0 ), . . . , ν(fn )} , which extends (uniquely) to K(y). Then K + [y] is exactly the set of elements in K[y] with µ-valuation ≥ 0. From this it follows readily that K + [y] satisfies the property P2 in K[y]. Now, let (S, Λ) be an admissible pair of K. Then   y − αi + K i = 1, 2, . . . tsi satisfies the property P2 in K[y] as it is the union of the increasing P2 -subrings     + y − α2 + y − α1 ⊆K ⊆ ··· . K ts1 ts2  16 STEFAN MAUBACH AND IMMANUEL STAMPFLI With this classification result at hand, we can now achieve a classification of all maximal subrings of K[y] that contain K + [y]. Proposition 6.3.6. Assume that K satisfies the cutoff property. Let (S, Λ) be an admissible pair of K. Assume that either lim si = ∞ or (S, Λ) has no limit in K. Then   y − αi + i = 1, 2, . . . (5) K tsi is a maximal subring of K[y] that contains K + [y]. On the other hand, every maximal subring of K[y] that contains K + [y] is of this form. Proof. Let B ⊆ K[y] be the ring of (5). We claim that B 6= K[y]. Otherwise, there exists i such that 1/t ∈ K + [(y − αi )/tsi ], as (S, Λ) is an admissible pair. This would imply 1/t ∈ K + , a contradiction. Note, that we have B = K + [B1 ]. Thus, according to Proposition 6.3.3 it is enough to show, that B[f ] = K[y] for all f ∈ K[y]\B of degree 1. Up to multiplying f with a unit of K + , we can assume that f = (y − α)/ts for some α ∈ K and s ∈ Q. First, assume that s < lim si . Hence there exists i with s < si . Thus we have αi − α y − α y − αi = − ∈ K[y] \ B . s t ts ts So this last element lies in K \ K + . Hence we have B[f ] = K[y]. Now, assume s ≥ lim si (and thus lim si is finite). As (S, Λ) has no limit in K, there exists i such that supp(α − αi ) is not contained in [si , ∞). Thus, αi − α y − α y − αi − = ∈ K \ K+ , tsi tsi tsi and hence we get B[f ] = K[y] again. Now, let A ( K[y] be a maximal subring that contains K + [y], which must be an extending maximal subring. By Lemma 3.2.4, A ⊆ K[y] satisfies the property P2 . Since K + [e] ⊆ K[y] is not a maximal subring for all e ∈ K[y] of degree 1, it follows from Proposition 6.3.5 that there exists an admissible pair (S, Λ), such that   y − αi + A=K i = 1, 2, . . . . tsi It remains to prove that lim si = ∞ or (S, Λ) has no limit in K. Assume towards a contradiction that s = lim si < ∞ and α ∈ K is a limit of (S, Λ). Then, it follows that A ⊆ K + [(y − α)/ts ]. As K + [(y − α)/ts ] is certainly not a maximal subring of K[y], we get a contradiction. This finishes the proof.  Remark 6.3.4. Let A be the maximal subring (5) in the Proposition 6.3.6. We describe the crucial maximal ideal of A. Let n ⊆ K + be the unique maximal ideal. P q + ′ si In fact, n = q∈Q>0 t K . For i ∈ N, let αi = αi + t ai+1 where ai+1 ∈ k denotes the coefficient of tsi in αi+1 . Thus A is generated over K + by the elements (y − α′i )/tsi . We have the following inclusion of ideals in A n+ ∞ X y − α′ i i=0 tsi A⊆ X tq A . q∈Q>0 As every element of A is an element of k ·1 modulo the left hand ideal and the right hand ideal is proper in A, these ideals are the same. It follows, that this ideal is maximal, has residue field k and it is the crucial maximal ideal. Proposition 6.3.7. For α ∈ K + , the ring K + + (y − α)K[y] is a maximal subring of K[y] that contains K + [y], with non-zero conductor ideal (y − α)K[y]. Moreover, all maximal subrings K + [y] ⊆ A ( K[y] with non-zero conductor are of this form. ON MAXIMAL SUBALGEBRAS 17 Proof. The first statement follows from Lemma 3.2.2. For the second statement, let K + [y] ⊆ A ( K[y] be a maximal subring and assume there exists 0 6= f ∈ A such that f K[y] ⊆ A. We can assume that f is monic in y. Let f = f1 · · · fk be the decomposition of f into monic linear factors inside K[y]. As A ⊆ K[y] satisfies the property P2 , for all n ∈ N there exists i = i(n) such that fi /(tn/k ) ∈ A. This implies that there exists i such that fi /tn ∈ A for all n ∈ N. Let fi = y − αi . Hence, K + [y] + (y − αi )K[y] ⊆ A. Since A ( K[y] is a proper subring, we get αi ∈ K + and thus A = K + + (y − αi )K[y].  Remark 6.3.5. Assume that K satisfies the cutoff property. Let A ⊆ K[y] be a maximal subring that contains K + [y], I ⊆ K[y] the conductor ideal of A in K[y] (which could be zero), and let m ⊆ A be the crucial maximal ideal. By [FO70, Proposition 3.3], the localization (A/I)m is a one-dimensional valuation ring. Let (S, Λ) be an admissible pair in K such that A is generated over K + by (y − αi )/tsi for i = 1, 2, . . . , see Proposition 6.3.6. Let α ∈ k[[tQ ]]+ be a limit of (S, Λ), which is not unique (however, it exists by Lemma 6.3.4). Using Proposition 6.3.6 and Proposition 6.3.7 one can check that the K-homomorphism K[y]/I −→ k[[tQ ]] , f 7−→ f (α) is injective. Hence, ω : Q(K[y]/I) −→ Q , f 7−→ ν(f (α)) is a valuation on the quotient field of K[y]/I. With the aid of Remark 6.3.4 one can see, that the valuation on (A/I)m is given by ω. In particular we have for f ∈ K[y] f ∈A ⇐⇒ ω(f¯) ≥ 0 , where f¯ denotes the residue class modulo I. Moreover, we get for the crucial maximal ideal f ∈ m ⇐⇒ ω(f¯) > 0 . This characterization of A and m will be very important for us. As a consequence of Proposition 6.3.6 and Lemma 6.3.4 we can now classify all the maximal subrings of k[[tQ ]][y] which contain k[[tQ ]]+ [y]. Corollary 6.3.8. If K = k[[tQ ]], then for all α ∈ K + the ring   y−α s = 1, 2, . . . K+ ts is maximal in K[y] and contains K + [y]. On the other hand, every maximal subring of K[y] that contains K + [y] is of this form. Remark 6.3.6. The maximal subring of K[y] in Corollary 6.3.8 is the ring K + + (y − α)K[y]. Its crucial maximal ideal is n + (y − α)K[y], where n ⊆ K + denotes the unique maximal ideal. With Proposition 6.3.6 and Proposition 6.3.7 at hand, we can now give another description of the maximal subrings of K[y] that contain K + [y] in the case where K is the algebraic closure of k(t). We just want to stress the following definition in advance. Definition 6.3.7. A subset S of Q is called a strictly increasing sequence if there exists an isomorphism of the natural numbers to S that preserves the given orders. 18 STEFAN MAUBACH AND IMMANUEL STAMPFLI Proposition 6.3.9. Let K be the algebraic closure of k(t) inside k[[tQ ]] and let S be the set of α ∈ k[[tQ ]]+ such that supp(α) is contained in a strictly increasing sequence. Then we have bijections   maximal subrings of K[y] with + Ξ1 : K −→ non-zero conductor that contain K + [y]   maximal subrings of K[y] with + Ξ2 : S \ K −→ zero conductor that contain K + [y] given by Ξ1 (α) = K + + (y − α)K[y] and Ξ2 (β) = K +  y − βi tsi i∈N  where { s1 < s2 < . . . } = supp(β) and βi is the sum of the first i − 1 non-zero terms of β. Proof. Proposition 6.3.7 implies that Ξ1 is bijective. Let β ∈ S \ K + and let S = { s1 < s2 < . . . }, Λ = { β1 , β2 , . . . }. Then (S, Λ) is an admissible pair and β is a limit of it. Since β 6∈ K + and since K satisfies the cutoff property, there exists no limit of (S, Λ) in K + . Hence, by Proposition 6.3.6 the subring Ξ2 (β) is maximal in K[y]. Thus Ξ2 is well-defined. Let A ⊆ K[y] be a maximal subring with zero conductor that contains K + [y]. By Proposition 6.3.6 there exists an admissible pair (S ′ , Λ′ ) in K such that   y − βi′ + i∈N A=K ′ tsi where S ′ = { s′1 < s′2 < . . . } and Λ′ = { β1′ , β2′ , . . . }, and either lim s′i = ∞ or (S ′ , Λ′ ) has no limit in K. If (S ′ , Λ′ ) has a limit in K, then the conductor of A ⊆ K[y] is non-zero. Thus (S ′ , Λ′ ) has no limit in K. Since K is the algebraic closure of k(t), the support supp(βi′ ) is finite for all i. Hence the pair (S ′ , Λ′ ) has a limit β ′ inside S \ K + . Moreover, this limit satisfies Ξ2 (β ′ ) = A, which proves the surjectivity of Ξ2 . Let γ1 , γ2 ∈ S \ K + such that Ξ2 (γ1 ) = Ξ2 (γ2 ) and denote this ring by D. For k = 1, 2, let { sk1 < sk2 < . . . } = supp(γk ) and let γki ∈ K be the sum of the first i − 1 non-zero terms of γk . Let i > 0 be an integer. Without loss of generality we can assume that s1i ≤ s2i . Since (y − γki )/tski ∈ D for k = 1, 2, it follows that γ2i − γ1i y − γ1i y − γ2i = − s1i ∈ D ∩ K = K + . ts1i ts1i t + s1i Hence γ2i = γ1i + t η where η ∈ K . However, since supp(γ1i ) and supp(γ2i ) have the same number of elements, it follows that η = 0. Thus γ1i = γ2i for all i. This implies that γ1 = γ2 and hence Ξ2 is injective.  6.4. Description of all maximal subrings of k[t, t−1 , y] that contain k[t, y] by “intersection”. In this subsection we still fix an algebraically closed subfield K ⊆ k[[tQ ]] that contains the field of rational functions k(t). Moreover, we fix a subring L ⊆ K that contains k[t, t−1 ]. Recall that L+ (respectively K + ) denotes the elements in L (respectively K) of ν-valuation ≥ 0. Lemma 6.4.1. The ring extension L+ ⊆ K + is flat. Proof. Let n be the unique maximal ideal of the valuation ring K + . This ideal consists of all elements in K with ν-valuation > 0. Denote by L′ the localization (L+ )n∩L+ . We show that K + is a flat L′ -module, which implies then the result. Clearly, K + is a torsion-free L′ -module. By [Bou72, Chp. I, §2, no. 4, Proposition 3], it is thus enough to prove that L′ is a valuation ring. ON MAXIMAL SUBALGEBRAS 19 Let g, h ∈ L+ and assume that g 6= 0, ν(h/g) ≥ 0. As the value group of ν is Q, there exist integers a ≥ 0, b > 0 such that ν(g) = a/b. Thus we get  b  b−1  g hg ≥ 0 and ν a = 0 ν ta t and therefore hg b−1 /ta ∈ L+ , g b /ta ∈ L+ \ n. This implies h/g ∈ L′ . Hence, L′ is a valuation ring (with valuation ν|Q(L+ ) ).  Our first result says that one can construct every maximal subring of L[y] that contains L+ [y] by intersecting L[y] with some maximal subring of K[y] that contains K + [y] under a certain assumption. Proposition 6.4.2. Assume that L+ is a maximal subring of L. If L+ [y] ⊆ B ( L[y] is a maximal subring, then there exists a maximal subring K + [y] ⊆ A ( K[y] such that B = A ∩ L[y]. Remark 6.4.1. The assumption, that L+ is a maximal subring of L is satisfied for example if L = k[t, t−1 ] or L = k(t). Proof. Let M be the L+ -module L[y]/B. By assumption, M is non-zero. In fact, since L+ is a maximal subring of L, we have an injection L+ /tL+ −→ M , λ 7−→ λt−1 . Since K + is a flat L+ -module (see Lemma 6.4.1), we get an injection K + /tK + ≃ K + ⊗L+ (L+ /tL+ ) −→ K + ⊗L+ M . Thus K + ⊗L+ M is non-zero. Again, since K + is a flat L+ -module, this implies that K + ⊗L+ B ( K + ⊗L+ L[y] . Therefore, K + [B] is a proper subring of K[y], which contains K + [y]. Applying Zorn’s Lemma to { A ⊆ K[y] | A ⊇ K + [B] and t−1 6∈ A } yields a maximal subring A in K[y] that lies over K + [B]. Thus B = A ∩ L[y].  In the next proposition we prove that any maximal subring of K[y] that lies over K + [y] gives a maximal subring of L[y] after intersection with L[y]. Proposition 6.4.3. Assume that K satisfies the cutoff property. Let K + [y] ⊆ A ( K[y] be a maximal subring and let B = A ∩ L[y]. Then i) If I denotes the conductor ideal of A in K[y], then I ∩ B is the conductor ideal of B in L[y]. ii) The subring B ( L[y] is maximal. Moreover, if m denotes the crucial maximal ideal of A, then m ∩ L[y] is the crucial maximal ideal of B. Proof. i) Let b ∈ I ∩ B. Then bL[y] ⊆ A ∩ L[y] = B. Thus b lies in the conductor of B in L[y]. Now, let f ∈ B be an element of the conductor of B in L[y]. Then we have f L[y] ⊆ B and in particular, f /tn ∈ B ⊆ A for all n ∈ N. As K[y] = At , this implies that f K[y] ⊆ A. Thus f ∈ I ∩ B. ii) Let I ⊆ K[y] be the conductor ideal of A in K[y]. By i) the intersection J = I ∩ B is the conductor ideal of B in K[y]. Let m ⊆ A be the crucial maximal ideal and let n = m ∩ B. We divide the proof in several steps 20 STEFAN MAUBACH AND IMMANUEL STAMPFLI a) We claim that (B/J)n is a one-dimensional valuation ring. Since (A/I)m is a one-dimensional valuation ring (see [FO70, Proposition 3.3]), it is enough to prove that (B/J)n = (A/I)m ∩ Q(L[y]/J) inside Q(K[y]/I) (see also [Mat86, Theorem 10.7]). Let g, h ∈ L[y]/J be non-zero elements and assume that h/g ∈ (A/I)m . Thus it follows for the valuation ω defined in Remark 6.3.5 that ω(h/g) ≥ 0. There exist integers a, b such that ω(g) = a/b and we can assume that b > 0. Thus we have ω(g b /ta ) = 0. Since ω(h) ≥ ω(g) we get ω(hg b−1 /ta ) ≥ 0. Thus g b /ta and hg b−1 /ta both lie inside A/I. Using the fact that B/J = A/I ∩ L[y]/J ⊆ K[y]/I we get h h · (g b−1 /ta ) ∈ (B/J)n . = g g b /ta Thus we have (A/I)m ∩ Q(L[y]/J) = (B/J)n . Note that the reasoning is similar to the proof of Lemma 6.4.1. b) We claim that the complement of the image of Spec L[y] → Spec B is just the point n. By Remark 6.3.4, the residue field of the crucial maximal ideal m ⊆ A is k and thus n is a maximal ideal of B. Let b ∈ n. By Remark 6.3.4 we have m = rad(tA) and thus there exists an integer q ≥ 1 such that bq ∈ tA. Therefore bq /t ∈ A. Since bq /t ∈ L[y], we get bq ∈ tB. Thus we proved n ⊆ rad(tB). If p ⊆ B is a prime ideal such that pL[y] = L[y], then we get t ∈ p (since Bt = L[y]). Thus we have n ⊆ rad(tB) ⊆ p and by the maximality of n we get n = p. c) Now, we prove that B/J is a maximal subring of L[y]/J. Let C ( L[y]/J be a subring that lies over B/J. Using b), the fact that J ⊆ n and that (B/J)t = L[y]/J, we get the following commutative diagram Spec C ◗ ◗◗◗ ♠♠66 ◗◗ϕ ◗◗◗ ♠ ♠ ◗◗◗ ♠♠ ♠ ♠ ♠ ≃ ((  // Spec B/J . // (Spec B/J) \ {n} Spec L[y]/J 6≃ ♠♠♠♠ open From this, one can easily deduce that ϕ is surjective. Let p ∈ Spec C with ϕ(p) = n. By a) and Lemma 3.2.5, (B/J)n is a maximal subring of Q(L[y]/J). Since t ∈ p, this implies (B/J)n = Cp . Hence we have B/J = C by [Mat86, Theorem 4.7]. From c) and from Lemma 3.2.2 it follows that B is a maximal subring of L[y]. From b) it follows that n = m ∩ L[y] is the crucial maximal ideal of B.  Remark 6.4.2. If the conductor ideal of A in K[y] is non-zero, then there exists α ∈ K + such that this ideal is (y − α)K[y]. Now, if L is a field and L ⊆ K an algebraic field extension, then the conductor of B = A ∩ L[y] is the ideal mα L[y] where mα ∈ L[y] is the minimal polynomial of α over L. In the future we will need the following consequence of the last two propositions. Corollary 6.4.4. We have a bijective   maximal subrings of k[t, t−1 , y] that contain ϕ:  k[t, y] correspondence      maximal subrings of  1:1 k(t)[y] that contain −→    k(t)+ [y] given by ϕ(B) = BS and ϕ−1 (A) = A ∩ k[t, t−1 , y], where S denotes the multiplicative subset k[t] \ (t) of k[t]. ON MAXIMAL SUBALGEBRAS 21 Proof. Let B ( k[t, t−1 , y] be a maximal subring that contains k[t, y]. By Lemma 3.2.1, the localization BS is a maximal subring of k[t, t−1 , y]S , since S = k[t] \ (t). Moreover, we have B ⊆ BS ∩ k[t, t−1 , y] ( k[t, t−1 , y] and thus by the maximality of B we get the equality B = BS ∩ k[t, t−1 , y]. This proves the injectivity of ϕ. Let A ( k(t)[y] be a maximal subring that contains k(t)+ [y]. By Proposition 6.4.2 there exists a maximal subring K + [y] ⊆ A′ ⊆ K[y] such that A′ ∩k(t)[y] = A. By Proposition 6.4.3, it follows that A ∩ k[t, t−1 , y] is a maximal subring of k[t, t−1 , y]. Clearly, A ∩ k[t, t−1 , y] contains k[t, y]. Moreover, (A ∩ k[t, t−1 , y])S ⊆ A and by the maximality of (A ∩ k[t, t−1 , y])S we get equality. This proves the surjectivity of ϕ.  6.5. Classification of the maximal subrings of k[t, t−1 , y] that contain k[t, y]. Throughout this subsection K denotes the algebraic closure of k(t) inside the Hahn field k[[tQ ]]. In this subsection we give a classification of all maximal subrings of k[t, t−1 , y] that contain k[t, y]. Let α be in k[[tQ ]]+ . In this subsection we denote Aα = k[[tQ ]]+ + (y − α) k[[tQ ]][y] . Thus α 7→ Aα is a bijective correspondence between k[[tQ ]]+ and the maximal subrings of k[[tQ ]][y] that contain k[[tQ ]]+ [y] by Corollary 6.3.8 and Remark 6.3.6. Let (Q/Z)∗ be the group of group homomorphisms Q/Z → k∗ . There exists a natural action of this group on the Hahn field, given by the homomorphism   X X (Q/Z)∗ −→ Aut(k[[tQ ]]/ k((t))) , σ 7−→  as ts 7→ as σ(s)ts  , (6) s∈Q s∈Q where Aut(k[[tQ ]]/ k((t))) denotes the group of field automorphisms of k[[tQ ]] that fix the subfield k((t)) pointwise (note that k((t)) ⊆ k[[tQ ]] is a Galois extension if and only if the characteristic of k is zero). The action (6) commutes with the valuation ν on k[[tQ ]]. In particular we have for all σ ∈ (Q/Z)∗ and for all α ∈ k[[tQ ]]+ Aα ∩ k[t, t−1 , y] = Aσ(α) ∩ k[t, t−1 , y] . The following result is the main theorem of this section. Theorem 6.5.1. Let S be the set of α ∈ k[[tQ ]]+ such that supp(α) is contained in a strictly increasing sequence (see Definition 6.3.7). Then we have a bijection   maximal subrings of ∗ Ψ : S /(Q/Z) −→ , α 7−→ Aα ∩ k[t, t−1 , y] . k[t, t−1 , y] that contain k[t, y] Moreover, Ψ(α) has non-zero conductor in k[t, t−1 , y] if and only if α ∈ K + where K denotes the algebraic closure of k(t) inside the Hahn field k[[tQ ]]. For the proof we need some preparation. First, we reformulate the action of (Q/Z)∗ on the Hahn field. Let k(tQ ) be the subfield of the Hahn field generated by the ground field k and the elements ts , s ∈ Q. Then, (Q/Z)∗ is isomorphic to the group Aut(k(tQ )/ k(t)) of field automorphisms of k(tQ ) that fix k(t) pointwise. An isomorphism is given by (Q/Z)∗ −→ Aut(k(tQ )/ k(t)) , σ 7−→ (ts 7→ σ(s)ts ) , 22 STEFAN MAUBACH AND IMMANUEL STAMPFLI and the homomorphism (6) identifies then under this isomorphism with   X X Aut(k(tQ )/ k(t)) −→ Aut(k[[tQ ]]/ k((t))) , ϕ 7−→  as ts 7→ as ϕ(ts ) s∈Q s∈Q ∗ (note that ϕ(ts ) is a multiple of ts with some element of k ). For proving the injectivity of the map Ψ in Theorem 6.5.1 we need two lemmas. Lemma 6.5.2. Let q ∈ Q≥0 and let α, α′ ∈ k[[tQ ]]+ . Assume that we have decompositions α = α0 + α1 , α′ = α0 + ctq + α′1 with α0 , α1 , α′1 ∈ k[[tQ ]] , c∈k such that supp(α0 ) ⊆ [0, q] , supp(α1 ) , supp(α′1 ) ⊆ (q, ∞) , supp(α0 ) is finite . If ν(f (α)) = ν(f (α′ )) for all f ∈ k(t)[y], then α0 + ctq = σ(α0 ) for some σ ∈ Aut(k(tQ )/ k(t)). Proof. Let m0 ∈ k(t)[y] be the minimal polynomial of α0 over k(t). Note that α0 is algebraic over k(t) since the support of α0 is a finite set. Denote by α0 = β0 , . . . , βr the different elements of the set { σ(α0 ) | σ ∈ Aut(k(tQ )/ k(t)) } . As the field extension k(t) ⊆ k(tQ ) is normal, there exist integers k0 > 0 and k1 , . . . , kr ≥ 0 such that m0 = (y − β0 )k0 (y − β1 )k1 · · · (y − βr )kr , see [Mor96, Theorem 3.20]. Assume towards a contradiction that α0 + ctq 6= βj for all 0 ≤ j ≤ r. Let i be an integer with 1 ≤ i ≤ r. Since ν(α0 − βi ) ≤ q, we get ν(α1 + α0 − βi ) = ν(α0 − βi ) = ν(ctq + α0 − βi ) = ν(α′1 + ctq + α0 − βi ) where we used in the second and third equality the fact that ctq + α0 6= βi . Since α0 = β0 6= α0 + ctq , the constant c is non-zero. Thus we have ν(α1 ) > ν(α′1 + ctq ). In summary we get X ν(m0 (α)) = k0 ν(α1 ) + ki ν(α1 + α0 − βi ) i6=0 > k0 ν(α′1 + ctq ) + X ki ν(α′1 + ctq + α0 − βi ) = ν(m0 (α′ )) i6=0 and thus we arrive at a contradiction.  Lemma 6.5.3. Let α, α′ ∈ k[[tQ ]]+ and assume that supp(α), supp(α′ ) are contained in strictly increasing sequences (see Definition 6.3.7). Then ν(f (α)) = ν(f (α′ )) for all f ∈ k(t)[y] if and only if there exists σ ∈ Aut(k(tQ )/ k(t)) such that α′ = σ(α). Proof. Assume that ν(f (α)) = ν(f (α′ )) for all f ∈ k(t)[y]. By assumption, there exists a strictly increasing sequence 0 < s1 < s2 < . . . in Q such that α = a0 + ∞ X j=1 asj tsj and α′ = a′0 + ∞ X j=1 a′sj tsj . ON MAXIMAL SUBALGEBRAS 23 For i ≥ 1 let αi = a0 + i−1 X asj tsj and α′i = a′0 + i−1 X a′sj tsj . j=1 j=1 We define inductively σ1 , σ2 , . . . ∈ Aut(k(t )/ k(t)) such that σi (αi ) = α′i . Since ν(α − a0 ) = ν(α′ − a0 ) by assumption, it follows that a′0 = a0 . Hence σ1 = id satisfies σ1 (α1 ) = α′1 . Assume that σi ∈ Aut(k(tQ )/ k(t)) with σi (αi ) = α′i is already constructed. For all f ∈ k(t)[y] we have Q ν(f (σi (α))) = ν(σi (f (α))) = ν(f (α)) = ν(f (α′ )) . Since α′i = σi (αi ), Lemma 6.5.2 implies that there exists ϕ ∈ Aut(k(tQ )/ k(t)) such that α′i+1 = ϕ(σi (αi+1 )). Thus we can define σi+1 = ϕ ◦ σi . By construction, σi+1 and σi coincide on the field Ki = k ({ ts | s ∈ supp(αi ) }) . S Thus we get a well defined automorphism of the field ∞ i=0 Ki that restricts to σi on Ki . By the normality of the extension k(t) ⊆ k(tQ ) we we can extend this automorphism to an automorphism σ of k(tQ ) and we have σ(α) = α′ (see [Mor96, Theorem 3.20]). The converse of the statement is clear.  Proof of Theorem 6.5.1. Consider the bijections   maximal subrings of K[y] with + Ξ1 : K −→ non-zero conductor that contain K+ [y]   maximal subrings of K[y] with Ξ2 : S \ K+ −→ . + zero conductor that contain K [y] of Proposition 6.3.9. For α ∈ K+ and β ∈ S \ K+ we have Ξ1 (α) ∩ k[t, t−1 , y] = Ψ(α) and Ξ2 (β) ∩ k[t, t−1 , y] = Ψ(β) . Using Proposition 6.4.3 and Remark 6.4.2 we see that Ξ1 (α) ∩ k[t, t−1 , y] is a maximal subring of k[t, t−1 , y] with non-zero conductor and Ξ2 (β) ∩ k[t, t−1 , y] is a maximal subring of k[t, t−1 , y] with zero conductor. Thus Ψ is a well-defined map. Using Proposition 6.4.2, we see that Ψ is surjective. For proving the injectivity, let α1 , α2 ∈ S such that the rings Aα1 ∩ k[t, t−1 , y], Aα2 ∩ k[t, t−1 , y] are the same subsets of k[t, t−1 , y]. For i = 1, 2, Aαi ∩ k(t)[y] is a maximal subring of k(t)[y], see Proposition 6.4.3. By Corollary 6.4.4, we get the equality Aα1 ∩ k(t)[y] = Aα2 ∩ k(t)[y] . Let B = Aα1 ∩ k(t)[y] = Aα2 ∩ k(t)[y]. Let n be the crucial maximal ideal of B and let J be the conductor ideal of B in k(t)[y]. With Remark 6.3.5 we get for i = 1, 2 B = { f ∈ k(t)[y] | ωi (f¯) ≥ 0 } and n = { f ∈ k(t)[y] | ωi (f¯) > 0 } , where f¯ denotes the residue class modulo J and ωi denotes the valuation ωi : Q(k(t)[y]/J) −→ Q , g 7−→ ν(g(αi )) . By [FO70, Proposition 3.3], (B/J)n is a one-dimensional valuation ring of the field Q(k(t)[y]/J) and therefore it is a maximal subring of Q(k(t)[y]/J), see Lemma 3.2.5. The description above of B and n implies that (B/J)n is the valuation ring with respect to ω1 and with respect to ω2 . Therefore, the valuations ω1 , ω2 are the same up to an order preserving isomorphism of (Q, +, <). However, since ω1 (t) = 1 = ω2 (t), these valuations must then be the same. Thus by Lemma 6.5.3 there exists σ ∈ Aut(k(tQ )/ k(t)) such that α1 = σ(α2 ). This proves the injectivity of Ψ.  24 STEFAN MAUBACH AND IMMANUEL STAMPFLI 7. Classification of the maximal k-subalgebras of k[t, t−1 , y] The goal of this section is to classify all maximal k-subalgebras of k[t, t−1 , y]. In fact, we reduce this problem in this section to another classification result, which we will solve then in the next section. Proposition 7.0.1. Let A ⊆ k[t, t−1 , y] be an extending maximal k-subalgebra. Then, exactly one of the following cases occur: i) There exists and automorphism σ of k[t, t−1 , y] such that σ(A) contains k[t, y]; ii) A contains k[t, t−1 ]. Proof of Proposition 7.0.1. Note that A satisfies the property P2 in k[t, t−1 , y], see Lemma 3.2.4. Since t · t−1 = 1 ∈ A, it follows that either t ∈ A or t−1 ∈ A. Assume that we are not in case ii), i.e. assume that k[t, t−1 ] is not contained in A. By applying an appropriate automorphism of k[t, t−1 , y], we can assume that t ∈ A and hence t−1 6∈ A. Therefore we get At = A[t−1 ] = k[t, t−1 , y], since A is maximal. This implies that there exists an integer k ≥ 0 such that tk y ∈ A. Thus the k[t, t−1 ]-automorphism σ : k[t, t−1 , y] −→ k[t, t−1 , y] , y 7−→ t−k y satisfies y ∈ σ(A). Hence we get σ(A) ⊇ k[t, y] and therefore we are in case i).  The extending maximal k-subalgebras in case i) of Proposition 7.0.1 are then described by Theorem 6.5.1. Thus we are left with the description of the extending maximal k-subalgebras in case ii). In fact, they can be characterized in the following way: Proposition 7.0.2. There is a bijection    extending maximal   extending maximal    k-subalgebras of k[t, y] that k-subalgebras of k[t, t−1 , y] Φ: −→ contain k[t] and t lies not in     that contain k[t, t−1 ]  the crucial maximal ideal given by Φ(A) = A ∩ k[t, y].        Proof. Let A be an extending maximal k-subalgebra of k[t, t−1 , y] that contains k[t, t−1 ]. By Lemma 3.2.6, there exists λ ∈ k∗ such that t − λ lies in the crucial maximal ideal m of A. Thus At−λ = k[t, t−1 , y]t−λ . Hence there exists k ≥ 1 such that (t − λ)k y ∈ A and thus we get k[t, t−1 , (t − λ)k y] ⊆ A ( k[t, t−1 , y] . This implies k[t, (t − λ)k y] ⊆ A ∩ k[t, y] ( k[t, y] . We claim, that A ∩ k[t, y] is a maximal subring of k[t, y]. Let therefore A ∩ k[t, y] ⊆ B ⊆ k[t, y] be an intermediate ring. Thus we get B = Bt−λ ∩ Bt ⊇ k[t, y] ∩ Bt ⊇ B . One can check that A = (A ∩ k[t, y])t . Since A is maximal in k[t, t−1 , y], we get either Bt = A or Bt = k[t, t−1 , y] and the claim follows. This proves that Φ is well-defined and injective. Let A′ be an extending maximal k-subalgebra of k[t, y] that contains k[t] and the crucial maximal ideal does not contain t. By Lemma 3.2.1 it follows that A′t is an extending maximal k-subalgebra of k[t, t−1 , y] that contains k[t, t−1 ]. Moreover, we have A′t ∩ k[t, y] = A by the maximality of A in k[t, y]. This proves the surjectivity of Φ.  ON MAXIMAL SUBALGEBRAS 25 After this proposition, one is now reduced to the problem of the description of all maximal k-subalgebras of k[t, y] that contain k[t]. 8. Classification of the maximal k-subalgebras of k[t, y] that contain k[t] Let M be the set of extending maximal k-subalgebras of k[t, y] that contain k[t]. The goal of this section is to describe the set M with the aid of the classification result Theorem 6.5.1. For this we introduce a subset N of the maximal k-subalgebras of k[t, y, y −1 ] that contain k[t, y −1 ]. Remark 8.0.1. If A is an extending maximal k-subalgebra of k[t, y, y −1 ] that contains k[t, y −1 ], then the residue field of the crucial maximal ideal is isomorphic to k, by Remark 6.3.4 and Theorem 6.5.1. Hence there exists a unique λ ∈ k such that t − λ lies in the crucial maximal ideal of A. Define N to be the set of extending maximal k-subalgebras A of k[t, y, y −1 ] that contain k[t, y −1 ] and such that A −→ k[t, y, y −1 ]/(t − λ) (7) is surjective where λ denotes the unique element in k such that the crucial maximal ideal contains t − λ (see Remark 8.0.1). Now, we can formulate the main result of this section. Theorem 8.0.1. The map Θ : N → M , A 7→ A ∩ k[t, y] is bijective. Remark 8.0.2. As we classified already all maximal subrings of k[t, y, y −1 ] that contain k[t, y −1 ] (see Theorem 6.5.1), Theorem 8.0.1 gives us a description of all extending maximal k-subalgebras of k[t, y] that contain a coordinate of k[t, y] (up to automorphisms of k[t, y]). Remark 8.0.3. Lemma 3.2.6 implies the following: If A is an extending maximal k-subalgebra of k[t, y] which contains k[t], then there exists a unique λ ∈ k such that t − λ lies in the crucial maximal ideal of A. Thus M is the disjoint union of the sets M λ = { A ∈ M | t − λ lies in the crucial maximal ideal of A } , λ∈k. By Remark 8.0.1, N is the disjoint union of the sets N λ = { A ∈ N | t − λ lies in the crucial maximal ideal of A } , λ∈k. Note that we have canonical bijections M 0 7−→ M λ , A 7−→ σλ (A) and N 0 −→ N λ , A 7−→ σλ (A) −1 where σλ is the automorphism of k[t, y, y ] given by σλ (t) = t − λ and σλ (y) = y. Using the fact that for all A ∈ M 0 we have σλ (A) ∩ k[t, y] = σλ (A ∩ k[t, y]) , one is reduced for the proof of Theorem 8.0.1 to proving the following proposition. Proposition 8.0.2. The map N 0 → M 0 , A 7→ A ∩ k[t, y] is bijective. For the proof of Proposition 8.0.2 we need several (technical) lemmas. Lemma 8.0.3. Let k[t] ⊆ Q ( k[t, y] be an intermediate ring that satisfies the P2 property in k[t, y] and assume that Q −→ k[t, y]/t k[t, y] is surjective. If p ⊆ Q is an ideal that contains t and that does not contain t k[t, y] ∩ Q, then there exists h ∈ Q \ p such that y −1 ∈ Qh . 26 STEFAN MAUBACH AND IMMANUEL STAMPFLI Proof. By assumption, there exists g ∈ k[t, y] \ y k[t, y] and n ≥ 0 such that ty n g ∈ Q \ p . (8) r ′ ′ Let g0 ∈ k[t], g ∈ k[t, y] \ y k[t, y] and r ≥ 1 such that g − g0 = y g . If n = 0, we get ty r g ′ = tg − tg0 ∈ Q \ p . Thus we can and will assume that n ≥ 1. Now, choose g ∈ k[t, y] \ y k[t, y] of minimal y-degree such that (8) is satisfied for some n ≥ 1. We claim that g ∈ Q. Otherwise, degy (g) > 0 and ty n ∈ Q, since Q satisfies the P2 property in k[t, y]. In fact, since g is of minimal y-degree, we get ty n ∈ p. Thus we get a contradiction to the fact that ty n+r g ′ = ty n g − ty n g0 ∈ Q \ p and degy (g ′ ) < degy (g) . Let h = ty n g ∈ Q \ p. Since t, g ∈ Q, it follows that y −n = tg/h ∈ Qh . Since Q satisfies the property P2 in k[t, y], the localization Qh satisfies the property P2 in k[t, y]h = k[t, t−1 , y, y −1 ]g . Hence, we get y −1 ∈ Qh .  Lemma 8.0.4. Let A ∈ N 0 and let m be the crucial maximal ideal of A. Then the inclusion A ∩ k[t, y] ⊆ k[t, y] defines an open immersion ϕ : A2k −→ Spec A ∩ k[t, y] on spectra and the complement of the image of ϕ consists only of the maximal ideal m ∩ k[t, y] of A ∩ k[t, y]. Remark 8.0.4. The proof will show the following: a) the maximal ideal m ∩ k[t, y] of A ∩ k[t, y] contains t and does not contain t k[t, y] ∩ A ∩ k[t, y] (see iii) in the proof); b) the homomorphism A∩k[t, y] → k[t, y]/t k[t, y] is surjective (see i) in the proof). Proof of Lemma 8.0.4. Let A′ = A ∩ k[t, y] and let m′ = m ∩ k[t, y]. Due to Remark 8.0.1, the residue field A/m is isomorphic to k. Hence, m′ is a maximal ideal of A′ . We divide the proof in several steps. i) We claim that ϕ induces a closed immersion {0} × A1k → VSpec(A′ ) (t). Due to the surjection (7), there exists f ∈ k[t, y, y −1 ], a ∈ A such that y = a + tf . Let f = f + + f − where f + ∈ k[t, y] and degy (f − ) < 0. We have a + tf − ∈ A and tf + ∈ t k[t, y]. Thus we get a + tf − = y − tf + ∈ A ∩ k[t, y] = A′ . This implies that A′ /tA′ −→ k[t, y]/t k[t, y] = k[y] is surjective, which implies the claim. ii) We claim that ϕ induces an isomorphism A∗k × A1k ≃ Spec(A′ ) \ VSpec(A′ ) (t). Since t ∈ m, we have At = k[t, t−1 , y, y −1 ] and thus tk y ∈ A for some integer k. This implies tk y ∈ A′ and thus A′t = k[t, t−1 , y]. iii) We claim that Spec(A′ ) \ ϕ(A2k ) = {m′ }. Using i) and ii) this is equivalent to show that m′ is the only prime ideal of A′ that contains t and does not contain t k[t, y] ∩ A′ . Since m contains t it follows that m′ contains t. Since there exists no prime ideal of k[t, y, y −1 ] that lies over m, the surjection (7) implies that m does not contain t k[t, y, y −1 ]∩A. Hence there exists f ∈ k[t, y, y −1 ] such that tf ∈ A\m. Since t k[t, y −1 ] ⊆ m, we can even assume that f ∈ k[t, y]. Hence tf ∈ A′ \ m′ and therefore m′ does not contain t k[t, y] ∩ A′ . ON MAXIMAL SUBALGEBRAS 27 As A ⊆ k[t, y, y −1 ] induces an isomorphism A1k × A∗k ≃ Spec(A) \ {m} and since t ∈ m, we have rad(tA) = t k[t, y, y −1 ] ∩ A ∩ m . Intersecting with k[t, y] yields rad(tA′ ) = t k[t, y] ∩ A′ ∩ m′ . Thus every prime ideal of A′ that contains t and does not contain t k[t, y] ∩ A′ must be equal to m′ (note that m′ is a maximal ideal of A′ ). iv) We claim that ϕ is an open immersion. According to Theorem 6.5.1 and Remark 6.3.5, there exists α ∈ k[[(y −1 )Q ]]+ such that A = { f ∈ k[y −1 , y, t] | ν(f (α)) ≥ 0 } . Note that y −1 corresponds to the t in Theorem 6.5.1 and t corresponds to the y in Theorem 6.5.1. In particular we have ν(y −1 ) = 1. If α = 0, then A = k[y −1 ] + t k[y −1 , y, t] and thus (7) is not surjective. Hence α 6= 0. Let ν(α) = a/b for integers a ≥ 0, b > 0 and let λ ∈ k∗ be the coefficient of y −a/b of α. There exists k ≥ 1 such that y(λb − tb y a )k ∈ A′ . (9) Indeed, ν(λb − αb y a ) > 0, since α is equal to λ(y −1 )a/b plus higher oder terms in y −1 . Hence, there exists k ≥ 1 such that ν(y(λb − αb y a )k ) = −1 + kν(λb − αb y a ) ≥ 0 , which yields (9). As A satisfies the property P2 in k[y −1 , y, t] (see Lemma 3.2.4), it follows that ′ A satisfies the property P2 in k[y, t]. Since y ∈ / A′ we get thus λb − tb y a ∈ A′ ′ by (9). Again by (9) we have y ∈ Aλb −tb ya , which implies A′λb −tb ya = k[t, y]λb −tb ya . As the zero set of λb − tb y a and of t in A2k = Spec k[t, y] are disjoint, it follows with ii) that ϕ : A2k → Spec(A′ ) is locally an open immersion. However, i) and ii) imply that ϕ is injective and thus ϕ is an open immersion.  Lemma 8.0.5. Let A ∈ N 0 and let m be the crucial maximal ideal of A. Moreover, we denote A′ = A ∩ k[t, y] and m′ = m ∩ k[t, y]. Then the following holds: a) A′ is a maximal subring of k[t, y]; b) m′ is the crucial maximal ideal of A′ ; c) For all h ∈ A′ \ m′ such that y −1 ∈ A′h we have A = A′h ∩ k[t, y, y −1 ] and A′h = Ah . Moreover, there exist h ∈ A′ \ m′ with y −1 ∈ A′h . Proof of Lemma 8.0.5. As A satisfies the P2 property in k[t, y, y −1 ], A′ satisfies the P2 property in k[t, y]. By Remark 8.0.4, m′ contains t and does not contain t k[t, y]∩ A′ . Moreover, the homomorphism A′ → k[t, y]/t k[t, y] is surjective according to Remark 8.0.4. Let h ∈ A′ \ m′ such that y −1 ∈ A′h (by Lemma 8.0.3 there exists such an h). We claim that A′h = Ah . (10) Indeed, if a = a+ + a− ∈ A and a+ ∈ k[t, y], degy (a− ) < 0, then we get a+ = a − a− ∈ A ∩ k[t, y] = A′ . 28 STEFAN MAUBACH AND IMMANUEL STAMPFLI However, a− ∈ k[t, y −1 ] ⊆ A′h and thus a = a+ + a− ∈ A′h , which implies the claim. Using Lemma 3.2.1 and the fact that h ∈ A′ \ m′ , the claim implies that A′h ( k[t, y, y −1 ]h = k[t, y]h is an extending maximal subring. Now, let A′ ⊆ B ( k[t, y] be an intermediate ring. Since ϕ : A2k → Spec(A′ ) is an open immersion and Spec(A′ ) \ ϕ(A2k ) = {m′ } (see Lemma 8.0.4), it follows that m′ lies in the image of the morphism Spec(B) → Spec(A′ ). Hence, there exists a prime ideal in B that lies over m′ . Since h ∈ A′ \ m′ , it follows that there exists a prime ideal of Bh that lies over m′ A′h . In particular, Bh 6= k[t, y]h . By the maximality of A′h in k[t, y]h we get A′h = Bh . Thus B ⊆ Bh ∩ k[t, y] = A′h ∩ k[t, y] = Ah ∩ k[t, y] = A′ where the last equality follows from the fact that Ah ∩ k[t, y, y −1 ] = A k (11) ′ (note that y 6∈ Ah , since otherwise yh ∈ A ∩ k[t, y] = A for a certain integer k and thus y ∈ A′h , contradicting the maximality of A′h in k[t, y]h ). This proves the maximality of A′ in k[t, y], which is a). Equations (10) and (11) say, that c) is satisfied. Statement b) is a consequence of statement a) and Lemma 8.0.4.  Proof of Proposition 8.0.2. From Lemma 8.0.5 a),b) it follows that N 0 → M 0 is well-defined. From Lemma 8.0.5 c) it follows that N 0 → M 0 is injective. Now, we prove the surjectivity. Let Q ∈ M 0 . We have the following inclusion Q/t k[t, y] ∩ Q ⊆ k[t, y]/t k[t, y] = k[y] . (12) On spectra, this map yields an open immersion, since Spec k[t, y] → Spec Q is an open immersion. Hence, (12) is a finite ring extension, and thus (12) must be an equality. This implies that the crucial maximal ideal p of Q does not contain t k[t, y] ∩ Q (note that Spec Q \ Spec k[t, y] = {p}). By assumption, t ∈ p. Moreover, Q satisfies the P2 property in k[t, y] by Lemma 3.2.4. By Lemma 8.0.3 there exists h ∈ Q \ p such that y −1 ∈ Qh . Thus, Lemma 3.2.1 implies that Qh ( k[t, y]h = k[t, y, y −1 ]h is an extending maximal subring. Since y −1 ∈ Qh , the ring Q′ = Qh ∩ k[t, y, y −1 ] ( k[t, y, y −1 ] contains k[t, y −1 ]. Now, we divide the proof in several steps. i) We claim that Q′ is a maximal subring of k[t, y, y −1 ]. Therefore, take an intermediate ring Q′ ⊆ B ( k[t, y, y −1 ]. By the maximality of Q in k[t, y] we get Q = B ∩ k[t, y] and hence Qh = (B ∩ k[t, y])h . If y would be in Bh , then y would be in (B ∩ k[t, y])h = Qh , a contradiction to the fact that Qh 6= k[t, y, y −1 ]h . Hence we have Bh 6= k[t, y, y −1 ]h . The maximality of Qh in k[t, y, y −1 ]h implies that Bh = Qh . Hence, we have B ⊆ Bh ∩ k[t, y, y −1 ] = Q′ ⊆ B , which proves the maximality of Q′ in k[t, y, y −1 ]. ii) We claim that pQh ∩ k[t, y, y −1 ] is the crucial maximal ideal of Q′ . Clearly, pQh is the crucial maximal ideal of Qh . If pQh ∩ k[t, y, y −1 ] would not be the crucial maximal ideal of Q′ , then Spec Qh → Spec Q′ would send pQh to a point of the open subset Spec k[t, y, y −1 ] of Spec Q′ . This would imply that k[t, y, y −1 ] ⊆ Qh , a contradiction. ON MAXIMAL SUBALGEBRAS 29 iii) We claim that Q′ ∈ N 0 . By ii), pQh ∩ k[t, y, y −1 ] is the crucial maximal ideal of Q′ and it contains t. By the equality (12) we get y = q + tf for some q ∈ Q, f ∈ k[t, y]. Since Q ⊆ Q′ and k[t, y −1 ] ⊆ Q′ , the homomorphism Q′ −→ k[t, y, y −1 ]/t k[t, y, y −1 ] is surjective. With i) we get Q′ ∈ N 0 . iv) We claim that Q′ ∩k[t, y] = Q. This follows from the fact that Q ⊆ Q′ ∩k[t, y] ( k[t, y] and from the maximality of Q in k[t, y]. This proves the surjectivity.  Let us interpret the map N 0 → M 0 , A 7→ A ∩ k[t, y] in geometric terms. For this we introduce the following terminology. Definition 8.0.5. We call a dominant morphism Y → X of affine schemes an (extending) minimal morphism, if Γ(X, OX ) is an (extending) maximal subring of Γ(Y, OY ). Moreover, the point in X which corresponds to the crucial maximal ideal of Γ(X, OX ) we call the crucial point of X. Let us denote by pr : A2k → A1k the projection (t, y) 7→ t. The set M 0 corresponds to the extending minimal morphisms ψ : A2k → X such that pr : A2k → A1k factorizes as ψ A2k −→ X −→ A1k , and such that the crucial point of X is sent onto 0 ∈ A1k via X → A1k . The set N 0 corresponds to the extending minimal morphisms ϕ : A1k × A∗k → Y such that the open immersion A1k × A∗k → A2k , (t, y) 7→ (t, y −1 ) factorizes as ϕ A1k × A∗k −→ Y −→ A2k and such that the image of {0} × A∗k under ϕ is closed in Y . Proposition 8.0.6. Let ϕ : A1k × A∗k → Y be an extending minimal morphism corresponding to an element A ∈ N 0 . Then Spec A ∩ k[t, y] = Y ∪ϕ A2k ϕ σ where Y ∪ϕ A2k denotes the glueing via A2k ←− A1k × A∗k −→ Y where σ is the open immersion defined by σ(t, y) = (t, y). Proof. By Theorem 8.0.1 we have the following commutative diagram A1k × A∗k _ ϕ extend. minimal mor. // Y σ  A1k × A1k extend. minimal mor.  // Spec A ∩ k[t, y] . By Lemma 8.0.5, there exists a regular function h on Spec A ∩ k[t, y] that does not vanish at the crucial point of Spec A ∩ k[t, y] and we have Ah = (A ∩ k[t, y])h . Thus Y → Spec A ∩ k[t, y] restricts to an open immersion on Yh . By the commutativity of the diagram, it follows that Y → Spec A ∩ k[t, y] restricts to an open immersion on ϕ(A1k × A∗k ). By Lemma 8.0.5, the morphism Y → Spec A ∩ k[t, y] maps the crucial point of Y to that one of Spec A ∩ k[t, y]. Hence, Yh contains the crucial point of Y . In summary, we get that Y → Spec A ∩ k[t, y] is an open immersion. Thus all morphisms in the diagram above are open immersions. Moreover, ϕ induces an isomorphism A1k × A∗k → Y ∩ A1k × A1k where we consider Y ∩ A1k × A1k as an open subset of Spec A ∩ k[t, y]. Hence Spec A ∩ k[t, y] is the claimed glueing.  30 STEFAN MAUBACH AND IMMANUEL STAMPFLI 9. Acknowledgement We would like to thank Jérémy Blanc for showing us Lemma 5.0.1. 10. Funding The second author gratefully acknowledge support by the Swiss National Science Foundation (Schweizerischer National Fonds) [148627]. References [Bla09] Jérémy Blanc, The correspondence between a plane curve and its complement, J. Reine Angew. Math. 633 (2009), 1–10. MR 2561193 (2010k:14050) [Bou72] Nicolas Bourbaki, Elements of mathematics. Commutative algebra, Hermann, Paris; Addison-Wesley Publishing Co., Reading, Mass., 1972, Translated from the French. MR 0360549 (50 #12997) [DMPPL05] David E. Dobbs, Bernadette Mullins, Gabriel Picavet, and Martine PicavetL’Hermitte, On the FIP property for extensions of commutative rings, Comm. Algebra 33 (2005), no. 9, 3091–3119. MR 2175382 (2006g:13012) [FO70] D. Ferrand and J.-P. Olivier, Homomorphisms minimaux d’anneaux, J. Algebra 16 (1970), 461–471. MR 0271079 (42 #5962) [Har77] Robin Hartshorne, Algebraic geometry, Springer-Verlag, New York-Heidelberg, 1977, Graduate Texts in Mathematics, No. 52. MR 0463157 (57 #3116) [Mat86] Hideyuki Matsumura, Commutative ring theory, Cambridge Studies in Advanced Mathematics, vol. 8, Cambridge University Press, Cambridge, 1986. [Mor96] Patrick Morandi, Field and Galois theory, Graduate Texts in Mathematics, vol. 167, Springer-Verlag, New York, 1996. MR 1410264 (97i:12001) [Nag75] Masayoshi Nagata, Local rings, Robert E. Krieger Publishing Co., Huntington, N.Y., 1975, Corrected reprint. MR 0460307 (57 #301) [OY82] Nobuharu Onoda and Ken-ichi Yoshida, On Noetherian subrings of an affine domain, Hiroshima Math. J. 12 (1982), no. 2, 377–384. MR 665501 (83i:13016) [PPL06] Gabriel Picavet and Martine Picavet-L’Hermitte, About minimal morphisms, Multiplicative ideal theory in commutative algebra, Springer, New York, 2006, pp. 369–386. MR 2265820 (2007h:13010) [Sam57] P. Samuel, La notion de place dans un anneau, Bull. Soc. Math. France 85 (1957), 123–133. MR 0100588 (20 #7018) Jacobs University Bremen gGmbH, School of Engineering and Science, Department of Mathematics, Campus Ring 1, 28759 Bremen, Germany E-mail address: [email protected], [email protected]
0math.AC
arXiv:1708.05440v1 [math.AC] 17 Aug 2017 RECURSIVE STRATEGY FOR DECOMPOSING BETTI TABLES OF COMPLETE INTERSECTIONS COURTNEY R. GIBBONS, ROBERT HUBEN, AND BRANDEN STONE Abstract. We introduce a recursive decomposition algorithm for the Betti diagram of a complete intersection using the diagram of a complete intersection defined by a subset of the original generators. This alternative algorithm is the main tool that we use to investigate stability and compatibility of the Boij-Söderberg decompositions of related diagrams; indeed, when the biggest generating degree is sufficiently large, the alternative algorithm produces the Boij-Söderberg decomposition. We also provide a detailed analysis of the BoijSöderberg decomposition for Betti diagrams of codimension four complete intersections where the largest generating degree satisfies the size condition. 1. Introduction Since its conception [BS08, ES09], Boij-Söderberg theory has blossomed into an active area of research in commutative algebra. One part of the dual nature of this theory allows us to analyze numerical invariants of graded finite free resolutions. Applications include the proof of the multiplicity conjecture [HS98, ES09], a special case of Horrocks’ conjecture [Erm10], and constraints on regularity [McC12]. There are current efforts to extend Boij-Söderberg theory to Grassmannians [FLS16] as well as expository notes on open questions and the state of the field [ES16, Flø12]. In the case of complete intersections, it was shown in [AGHS17] that the diagrams of complete intersections behave similarly to pure diagrams, creating a non-trivial sub-cone of the Boij-Söderberg cone. Further, in [GJM+ 15], a complete structure theorem is given for complete intersections of codimension at most three. Recent work shows decompositions of homogeneous ideal powers stabilize in a meaningful way [MT15, Whi14], and in [NS13], the authors give some combinatorial interpretations of the decompositions produced by the Boij-Söderberg decomposition algorithm. Despite all of this, not much is generally known about the structure of the decompositions for specific classes of modules; our understanding of the structure of Boij-Söderberg decompositions remains extremely limited. In fact, even studying the Boij-Söderberg decomposition of a complete intersection defined by forms of degrees a1 , . . . , ac raises nuanced questions, and the decomposition depends on delicate relations among the ai . Our main result provides new insight into the way that these relations–in particular, the relationship between the largest degree to the smaller degrees–affect the decomposition. Consider a homogeneous complete intersection ideal I in a polynomial ring S = k[x1 , . . . , xn ]. The goal of this paper is to find a relationship between the 2010 Mathematics Subject Classification. Primary: 13D02; Secondary: 13C99. Key words and phrases. Boij-Söderberg Theory, Betti diagrams, complete intersections, decomposition algorithms. 1 2 GIBBONS, HUBEN, AND STONE decompositions of diagrams β(S/I) and β(S/I ⊗ k[y]/(g)). In particular, Theorem 2.10 indicates that the decomposition β(S/I ⊗ k[y]/(g)) can be obtained from the decomposition of the diagram β(S/I) under certain conditions, including a lower bound on the degree of g. The main tool we use to link the decompositions of these two diagrams is an alternative decomposition technique introduced in Algorithm 2.2. We discuss this new algorithm in Section 2 while the rest of Section 1 develops the necessary notation and tools. In particular, Subsection 1.3 develops the concept of an “elimination order” as a prelude to the new algorithm. Section 3 shows that the Boij-Söderberg decomposition of β(S/I ⊗ k[y]/(g)) stabilizes similarly to the ideal powers seen in [MT15]. A case study in codimension four is given in Section 4, extending the results of [GJM+ 15] and giving a partial structure theorem for the Boij-Söderberg decomposition of a complete intersection in codimension four. 1.1. Notation. Over the polynomial ring S = k[x1 , . . . , xn ], every finite-length S-module M has a minimal graded free resolution of the form M M M S(−j)β0,j o S(−j)β1,j o S(−j)βp,j o ··· o 0 0o M o j j j where the projective dimension p is at most n by Hilbert’s Syzygy Theorem. The integer βi,j is the number of degree j generators of a basis of the free module in the ith step of the resolution. These βi,j are independent of the choice of minimal free resolution, and they are called the graded Betti numbers. The Betti diagram of M is defined to be   .. .. .. .. . . . .   β0,−1 β1,0 β2,1 · · ·     β(M ) =   β0,0 β1,1 β2,2 · · ·  .  β0,1 β1,2 β2,3 · · ·    .. .. .. .. . . . . Throughout we consider β(M ) as an element of the vector space V = n M M Q. i=0 j∈Z If D ∈ V , then we say that D is a diagram. In this paper, we are concerned with Betti diagrams of homogeneous complete intersection modules over the ring S viewed as a standard graded k-algebra where n  0. Such a module is a quotient of S by an ideal I generated by a regular sequence f1 , . . . , fc , and its free resolution is given by the Koszul complex K• (f1 , . . . , fc ) = K• (f1 ) ⊗ · · · ⊗ K• (fc ). Because tensor products commute, we may assume that I = (f1 , . . . , fc ) is written in such a way that the degrees of the forms fi are nondecreasing from left to right. In particular, letting ai = deg fi , the combinatorial construction of the Koszul complex makes it easy to verify that βi,j (S/I) is the number i-element subsets of {a1 , . . . , ac } that sum to j. As such, we simplify notation by setting β(a1 , . . . , ac ) := β(S/I). RECURSIVE DECOMPOSITIONS 3 Observe that β0,0 (a1 , . . . , ac ) = β0,0 (S/I) = 1. Moreover, the projective dimension and regularity can be calculated as, respectively, c X pd(S/I) = codim(S/I) = c and reg(S/I) = ak − c. k=1 1.2. Boij-Söderberg Theory. Let M be an S-module of finite length. We say d ∈ Zn+1 is a degree sequence if di < di+1 for all i and that d ≤ d0 if di ≤ d0i for all i. A chain of degree sequences is a totally ordered collection {· · · < d0 < d1 < · · · < ds < · · · }. Viewing β(M ) as a diagram, we say that β(M ) is a pure diagram if β(M ) has at most one non-zero entry in each column. For example, if S = k[x, y, z] and M = k[x, y, z]/(x2 , y 2 , z 2 ) then   1 − − − − 3 − −  β(M ) =   − − 3 − − − − 1 is a pure diagram. If β(M ) is a pure diagram, then for each nonnegative integer i ≤ pd(M ) there exists an integer di for which βi,j (M ) 6= 0 if and only if j = di . In this case we say that β(M ) is a pure diagram of type d = (d0 , d1 , . . . , dn ). Further, if d is a degree sequence and M is any finite length module with a pure diagram of type d, then entries of β(M ) are an integer multiple of the diagram π(d) given by (Q 1 k6=i |di −dk | , j = di π(d)ij = 0, j 6= di (see [HK84]), and in [ES09], the authors show such a module exists for each degree sequence d. For example, if d = (0, 2, 4, 6), then   1/48 − − −  − 1/16 − −  . π(d) =   − − 1/16 −  − − − 1/48 In proving the conjectures of M. Boij and J. Söderberg [BS12], D. Eisenbud and F.O. Schreyer show there is a unique decomposition of Betti tables in terms of π(d) [ES09]. Theorem 1.1 ([BS08, ES09]). Let S = k[x1 , . . . , xn ] and M an S-module of finite length. Then there is a unique chain of degree sequences {d1 < · · · < ds } and a unique set of scalars zi ∈ Q>0 such that β(M ) = s X zi π(di ). i=1 The unique decomposition in Theorem 1.1 respects the partial order (see [BS12, Definition 2]) of the degree sequences di and is obtained by applying the greedy algorithm to a special chain of degree sequences. We formalize this algorithm as follows. Algorithm 1.2 (Totally Ordered Decomposition Algorithm [ES09]). Let S be k[x1 , . . . , xn ] and M be a finitely generated S-module of finite length. Set β = β(M ). 4 GIBBONS, HUBEN, AND STONE Step 1: Identify the minimal degree sequence d of β; Step 2: Choose q > 0 ∈ Q maximal with respect to the condition that β − qπ(d) has non-negative entries; Step 3: Set β = β − qπ(d); Step 4: Repeat Steps 1-3 until β is a pure diagram; Step 5: Write β(M ) as a sum of the the qπ(d) obtained in the above steps. Example 1.3. Consider D = β(2, 3, 4). The algorithm above produces the output D = 42π(0, 2, 5, 9) + 12π(0, 3, 5, 9) + 36π(0, 3, 6, 9) + 12π(0, 4, 6, 9) + 42π(0, 4, 7, 9), with degree sequences chosen by the algorithm in order from left to right. We note that our choice of π(d) differs from the choices used in [BS08] and [ES09]. In [BS08], they choose the pure diagram with β0,0 = 1; in [ES09], they choose the smallest possible pure diagram with integral entries. Since the pure diagrams with degree sequence d form a one-dimensional vector space, this different choice only affects the coefficients that arise in the algorithm. Let D ∈ V be a diagram. Define the dual of D, denoted D∗ , via the formula (D∗ )ij = Dn−i,−j , and define twist D(r) via the formula D(r)ij = Di,r+j . These definitions mimic the functors HomS (−, S) = −∗ and − ⊗ S(r) for modules; one may check that β(M ∗ ) = β(M )∗ and β(M (r)) = (β(M ))(r). In particular, if M is a Gorenstein module of finite length, the Betti diagram will be self-dual up to shift by reg(M ). Theorem 1.4 (Symmetric Decomposition [EKKS15],[NS13]). Let S = k[x1 , . . . , xn ] and M be a Gorenstein S-module of finite length. Then the decomposition of β(M ) via Algorithm 1.2 is symmetric; i.e., β(M ) = a1 π(d1 ) + a2 π(d2 ) + · · · + a2 π(d2 )∗ (r) + a1 π(d1 )∗ (r) where r = reg(M ). 1.3. Elimination Order. The concept of an elimination order was first introduced in [GJM+ 15]. We give the basics here. Definition 1.5. Given a diagram D ∈ V , its elimination table has as its (i, j)th entry the integer k such that the k th iteration of Algorithm 1.2 applied to D is the first iteration such that the (i, j)th entry of D becomes zero. The elimination order of D is the sequence E(D) with k th entry {(ik1 , jk1 ), . . . , (ik` , jk` )} th where the k step of Algorithm 1.2 eliminates Dik1 ,jk1 , . . . , Dik` ,jk` . We denote by ε(D) the number of pure diagrams in the chain used by Algorithm 1.2; ε(D) is therefore the maximal integer appearing in the elimination table of D. The elimination table is a means of recording the elimination order of the row and column position according to Algorithm 1.2. Given any diagram D ∈ V , the sequence of pure diagrams appearing in the Boij-Söderberg decomposition of D can be obtained recursively from the elimination table. Indeed, in Algorithm 1.2, the degree sequence of the pure diagram corresponding to the tth iteration is given by RECURSIVE DECOMPOSITIONS 5 the sequence of least degrees in each column after t − 1 eliminations. We may read this in the elimination table as entries of least degree in each column (i.e., highest up on the page) among those with value at least t. Example 1.6. Let D = β(2, 3, 4). Algorithm 1.2 gives the elimination table   5 . . . . 1 . .   . 3 . .   . 5 2 .   . . 4 .   . . 5 . . . . 5 and elimination order  E(D) = {(1, 2)}, {(3, 5)}, {(2, 3)}, {(4, 6)}, {(0, 0), (3, 4), (5, 7), (6, 9)} . Observe that the only entry of E(D) in Example 1.6 that isn’t a singleton set is the fifth and final entry; this corresponds to the last step of Algorithm 1.2, where the bottom line of D is removed with the final pure diagram. This behavior is quite nice, but not guaranteed. Indeed, one may check that D = β(2, 3, 5, 7) has elimination order E(D) = {(1, 2)}, {(2, 5)}, {(2, 7)}, {(1, 3), (3, 10)}, {(2, 8)}, {(1, 5), (3, 12)},  {(2, 9)}, {(2, 10)}, {(3, 14)}, {(0, 0), (1, 7), (2, 12), (3, 15), (4, 17)} , so that #(E(D)4 ) = #(E(D)6 ) = 2, but 4 < 6 < ε(D) = 10. We give this behavior a name below. Definition 1.7. Given a diagram D ∈ V , we say that mass elimination occurs if # (E(D)k ) > 1 for some k ε(D). Note that mass elimination does not occur for complete intersections of codimension at most three. At each stage of Algorithm 1.2, the choice of q will only eliminate one entry. This is not the case for codimension four and above. 2. Decomposing Complete Intersections For the rest of the paper, we assume a1 ≤ a2 ≤ · · · ≤ ac ≤ ac+1 and we set a = a1 + · · · + ac . In this section, we create a decomposition algorithm for β(a1 , . . . , ac , ac+1 ) that uses the decomposition of β(a1 , . . . , ac ) from Algorithm 1.2 and ac+1 as initial inputs. We then describe when the new algorithm produces the traditional BoijSöderberg decomposition of β(a1 , . . . , ac+1 ) that arises via Algorithm 1.2. Remark 2.1 (Notation). Given a degree sequence d = (d0 , d1 , . . . , dc ), we define concat(d, N ) = (d0 , . . . , dc , N ); when N > dc , this is a degree sequence in codimension c + 1. When it is understood that we are working with a complete intersection of generating degrees a1 ≤ a2 ≤ · · · ≤ ac ≤ ac+1 , we use the notation β ` = β(a1 , . . . , a` ), where ` ≤ c + 1, to simplify notation in prose and inductive arguments. In order to designate specific entries of the input diagram β c and its decomposition via Algorithm 1.2, we set up the following notational conventions. Suppose β c has no instances of mass elimination. Let ε = ε(β c ). Then E(β c )s = {(is , js )} for 1 ≤ s ≤ ε − 1. We set bs = (β c )is ,js so that it is the entry of 6 GIBBONS, HUBEN, AND STONE β c that is eliminated in step s. For s = ε, we define bε = β c c,a so that iε = c and jε = a. Finally, for 1 ≤ s ≤ ε, we define ps = π(ds )is ,js , the relevant entry of the s pure diagram used  to eliminate bs . It is useful to notice that d is = js , and when c+1 ac+1 ≥ a, β = bs . i ,j s s 2.1. New Algorithm. Our goal is to create an algorithm that decomposes β c+1 that respects the elimination order of β c . For ease of discussion, we divide it into three phases. Phase 1 consists of three steps, where the algorithm follows the previous elimination order to eliminate the top left entries. That is, the entries bk from β(a1 , . . . , ac ) appear as entries in the new diagram β(a1 , . . . , ac+1 ), and we eliminate them in the same order (taking care to choose a specific entry to eliminate at step ε). Phase 2 consists of the next c − 1 steps, where the degree sequences are chosen to eliminate specific entries of the diagram from right to left. Phase 3 consists of the remainder of the algorithm and uses degree sequences symmetric to those in Phase 1 to eliminate as many of the remaining elements as possible. A priori, it is possible that this algorithm terminates with an error diagram E, by which we mean that Phase 3 is not assumed to finish eliminating the bottom of the diagram. Thus, we say that Algorithm 2.2 decomposes β(a1 , . . . , ac+1 ) provided E is the zero diagram. Algorithm 2.2 (New Algorithm). Let c > 1. Consider a complete intersection R = k[x1 , . . . , xc , xc+1 ]/(f1 , . . . , fc , fc+1 ), where deg(fi ) = ai and a1 ≤ a2 ≤ · · · ≤ ac ≤ ac+1 with a = a1 + a2 + · · · + ac . A decomposition of β c+1 = β(a1 , . . . , ac , ac+1 ) is given as follows. Phase 1: Elimination of β c+1 with respect to E(β c ). Step 1.1: Consider the decomposition of β c according to Algorithm 1.2 and let ε = ε(β(a1 , . . . , ac )) In particular, let βc = ε X zs π(ds ). s=1 Step 1.2: Make new degree sequences es = concat(ds , a + ac+1 ) for 1 ≤ s ≤ ε. Step 1.3: Use each new es degree sequence to eliminate the entries of β c+1 according to the elimination order E(β c ). That is, in step s, eliminate β c+1 is ,js = bs . Set the respective coefficients in Q equal to yσ . In particular, let ε X P1 = ys π(es ). s=1 c+1 Then we have that β = P1 + E for some error diagram E. Phase 2: Eliminate from right to left along the columns. Step 2.1: If ac = ac+1 , proceed to Phase 3. Otherwise define the degree sequences as ( eε+k−1 , for i 6= c − k + 1 ε+k i ei = P i−1 l=1 al + ac+1 , for i = c − k + 1 for 1 ≤ k ≤ c − 1. RECURSIVE DECOMPOSITIONS 7 Step 2.2: Use the degree sequences in Step 2.1 and choose each ys to eliminate the top entry in the c − k th column, starting with k = 1. In particular, let ε+c−1 X P2 = ys π(es ), s=ε+1 where eε is defined in Step 1.2. Then we have β c+1 = P1 + P2 + E for some error diagram E. Phase 3: Eliminate using the dual of the degree sequences in Phase 1. Step 3.1: Complete the elimination according to Theorem 1.4. Letting P3 = 2ε+c−1 X ys π(es ), s=ε+c where π(es ) = π(e2ε+c−1−s )∗ (a+ac+1 −c−1) from Phase 1. Here, each ys is chosen to eliminate the position given by the elimination order of βc. Step 3.2: Combining all three Phases, we have β c+1 = P1 + P2 + P3 + E for some error diagram E. For a general understanding of Algorithm 2.2, consider the following example. The full details are given in Example 3.3. Example 2.3. Let D = β(2, 3, 4, a4 ) where a4 ≥ 4. From Example 1.6 we know the elimination order of β(2, 3, 4). With this information, we can run Algorithm 2.2 on the diagram D; the table in Figure 1 is the elimination table of this process.  12                                    . . . 1 3 . . . . . . . . . . 7 2 . . . . 4 . . . . 6 . . . . . . . . . . . . . . 5 . . . . . . . . . . . . . . . . . . 12 . . . . 8 . . . 10 . . . 12 9 . . . 11 . . . 12 . . . . 12                                     Figure 1. A pictorial representation of Algorithm 2.2. Phase 1 entries are marked with . Similarly Phase 2 and Phase 3 are marked with and respectively. Given the diagram D, in Phase 1 we calculate the decomposition and the elimination order of β(2, 3, 4). Using this information, we form new degree sequences 8 GIBBONS, HUBEN, AND STONE and choose coefficients to target the entries that line up with the elimination order of β(2, 3, 4). In Phase 2, we target the rest of the “old” diagram β(2, 3, 4) working from right to left. In Phase 3, we form degree sequences by calculating the dual of the pure diagrams from Phase 1 and choose positions to eliminate by reversing the elimination sequence from Phase 1. In fact, Algorithm 2.2 decomposes β(2, 3, 4, a4 ) as long as a4 ≥ 4. When a4 > 12, the degree sequences form a chain and the coefficients are all positive, so the algorithm produces the traditional BoijSöderberg decomposition of the diagram. Thus E(β(2, 3, 4, 13)) is compatible with E(β(2, 3, 4)). However, when 4 ≤ a4 ≤ 12, the elimination order is different and some of the coefficients produced by Algorithm 2.2 will be negative or, in the case of a4 = 12, zero. Despite the fact that Algorithm 2.2 can produce negative coefficients, it will always decompose the diagram. Theorem 2.4. Algorithm 2.2 decomposes β(a1 , . . . , ac+1 ). In particular, E is always the zero diagram. Proof. At each stage of Algorithm 2.2 a scalar multiple of a pure diagram is subtracted from the previous diagram, eliminating at least one entry. After the penultimate step, the non-zero entries of the resulting diagram D corresponds to the degree sequence e2ε+c−1 . It is enough to show that s · π(e2ε+c−1 ) = D for some scalar s. To do this, notice each stage of Algorithm 2.2 produces a diagram satisfying the Herzog-Kuhl equations [BS08] where our codimension is c + 1, X (−1)i j 0 βi,j = 0 i,j X (−1)i j 1 βi,j = 0 i,j .. . X (−1)i j c βi,j = 0. i,j Since each column of D has at most one non-zero entry we can write the above system as the following matrix equation,      1 1 ··· 1 d0 0 e0 e1 · · · ec+1   −d1  0  2     e0 e21 · · · e2c+1   d2  0    =  ,  .. .. ..   ..   ..  .   . . .  . c c c e0 e1 · · · ec+1 ±dc+1 0 where e2ε+c−1 = (e0 , e1 , . . . , ec+1 ) and di are the entries of D in column i, degree ei . The last step of the algorithm chooses an s such that D0 = D − sπ(e2ε+c−1 ) has an entry greedily eliminated from D, say di . As the shape of D0 still corresponds to e2ε+c−1 , the entries d00 , d01 , . . . , d0c+1 satisfy the matrix problem above. Since d0i = 0, we can ignore the ith column of the matrix, obtaining an invertible Vandermonde matrix. This new homogeneous system has only the trivial solution, forcing D0 = 0.  RECURSIVE DECOMPOSITIONS 9 The following results are useful in determining when the decomposition lines up with the Boij-Söderberg decomposition, as described in Corollary 2.12. Definition 2.5 ([EKKS15]). For a degree sequence e = (e0 , e1 , . . . , ec+1 ) with e0 = 0, set e∨ = (ec+1 − ec+1 , ec+1 − ec , . . . , ec+1 − ec+1−k , . . . , ec+1 − e0 ). {z } | position c + 1 + k From [EKKS15, Proposition 2.4], it follows that π(e)∗ (a + ac+1 − c) = π(e∨ ). (1) Lemma 2.6. The degree sequences and coefficients from Algorithm 2.2 are symmetric. That is, es = (eN −s+1 )∨ and ys = yN −s+1 where N = 2ε + c − 1. Proof. Assume that ε + k ≤ N − ε − k, this forces k + 1 < c − k + 1. Starting the index of the degree sequence at 0, we have eε+k = 0, ac , ac + ac−1 , . . . , c X a` , `=k+1 | {z } index c−k c X ac+1 + a − a` , . . . , ac+1 + a − `=c−k+1 {z | c X ! a` , ac+1 + a . `=c } index c−k+1 After applying the dual we should have the following degree sequence, eε+(c−k) = c X 0, ac , ac + ac−1 , . . . , a` , `=c−k+1 | {z index k ac+1 + a − } c X a` , . . . , ac+1 + a − `=k+1 | {z index k+1 c X ! a` , ac+1 + a . `=c } Calculating the dual, we find that (eε+k )∨ = eε+(c−k) . Next, we show ys = yN −s+1 . ∗ ∗ Since β c+1 = β c+1 (a + ac+1 − c), we have that β c+1 (a + ac+1 − c) = ∗ P P ys π(es ). However, β c+1 (a + ac+1 − c) = ys π(es )∗ (a + ac+1 − c) as well. s ∗ N −s+1 Since π(e ) (a + ac+1 − c) = π(e ) and the set {π(es )} is a basis for V , it follows that ys = yN −s+1 .  Proposition 2.7. If ac+1 ≥ a, then the set of degree sequences {es } is totally ordered. Proof. The degree sequences e1 , . . . , eε in Phase 1 form a chain because the degree sequences d1 , . . . , dε were obtained from Algorithm 1.2 and thus form a chain themselves. ε+1 ε The degree Pc−1 sequences e Pc and e may differ only in position c. There, we have ε+1 ec = i=1 ai + ac+1 ≥ i=1 ai . If ac+1 = ac , the algorithm skips Phase 2 and there is nothing to show. 10 GIBBONS, HUBEN, AND STONE Otherwise, ac+1 ≥ a > ac implies that eε+1 > eε . Further, the degree sequences e and eε+k+1 differ only in position c − k. There, we have ε+k eε+k+1 = c−k ≥ k X ai + ac+1 i=1 c X ai = eε+k c−k i=c−k Pc since ac+1 ≥ a > i=c−k ai . Therefore, the degree sequences from Phase 1 and Phase 2 are totally ordered. By Lemma 2.6, it follows that the degree sequences from all three phases form a totally ordered set.  Corollary 2.8. If ac+1 ≥ a and Algorithm 2.2 produces a decomposition of β(a1 , . . . , ac+1 ) where each ys is non-negative, then that decomposition agrees with the decomposition of β(a1 , . . . , ac+1 ) obtained by Algorithm 1.2. We next formalize a relationship between coefficients in the Algorithm 1.2 decompositions of β(a1 , . . . , ac ) and β(a1 , . . . , ac+1 ), using Phase 1 and Phase 3 of Algorithm 2.2. Definition 2.9. Consider a diagram D = β(a1 , . . . , ac ) with decomposition ε X zs π(ds ), β(a1 , . . . , ac ) = s=1 obtained from Algorithm 1.2. We define the remainders of D relative to ac+1 to be the numbers rs such that ys = ac+1 zs − rs , where the ys are the coefficients obtained by applying Algorithm 2.2 to β(a1 , . . . , ac+1 ). Theorem 2.10. Consider β(a1 , . . . , ac ), the Betti diagram of the complete intersection ideal generated in degrees a1 ≤ . . . ≤ ac of elimination size ε, for which the decomposition obtained from Algorithm 1.2, ε X zs π(ds ), β(a1 , . . . , ac ) = s=1 has no instances of mass elimination. Pc Let β c+1 = β(a1 , . . . , ac , ac+1 ) for ac+1 ≥ ac , and set a = i=1 ai . Given the decomposition obtained from Algorithm 2.2 and the remainders rs of β(a1 , . . . , ac ) relative to ac+1 , then N X β c+1 = ys π(es ), s=1 and for 1 ≤ s ≤ ε, ys = zs ac+1 − rs with rs defined recursively in terms of the previous remainders. Indeed, r1 = (j1 − a)z1 and ! k−1 X π(ds )i ,j jk − a k k bk − rs rk = pk pk s=1 for 2 ≤ k ≤ ε, where bk , ik , jk and pk are described in Remark 2.1. Furthermore, ac+1 > max{a, zr11 , . . . , zrεε } implies ys > 0. First we collect a few useful observations. RECURSIVE DECOMPOSITIONS 11 Lemma 2.11. Given the hypotheses and notation of Theorem 2.10, (a) there is an inequality a − jk > 0, and (b) π(es )ik ,jk = 0 or π(es )ik ,jk = π(ds )ik ,jk /(a + ac+1 − jk ). Proof. For ((a)), notice that if jk is in column ik , then jk is a sum of ik elements of {a1 , . . . , ac }, so jk < a. For ((b)), observe that π(es )ik ,jk = 0 if esik 6= jk , while if esik = jk (which means that dsik = jk as well), π(es )ik ,jk = Q 1 s s − es | = π(d )ik ,jk /(a + ac+1 − jk ). |e ik `6=ik `  Proof of Theorem 2.10. Observe that Algorithm 2.2 gives b1 = z1 p1 and b1 = y1 p1 /(a + ac+1 − j1 ). Thus y1 = (a + ac+1 − j1 )z1 = ac+1 z1 − (j1 − a)z1 ; that is, r1 = (j1 − a)z1 . Fix 1 < k < ε and suppose that yk−1 = zk−1 ac+1 − rk−1 . Pk Using Algorithm 2.2, we have that bk = s=1 ys π(es )ik ,jk . Hence yk qk = bk − (2) k−1 X ys π(es )ik ,jk . s=1 pk From these equations and Lemma 2.11, we obtain ! k−1 X a + ac+1 − jk s bk − ys π(e )ik ,jk yk = pk s=1 Furthermore, qk = a+ac+1 −jk . = k−1 a + ac+1 − jk a + ac+1 − jk X ys π(es )ik ,jk bk − pk pk s=1 = k−1 X π(ds )i ,j a + ac+1 − jk k k bk − ys . pk p k s=1 Now we apply the induction hypothesis: k−1 X π(ds )i ,j a + ac+1 − jk k k bk − (zs ac+1 − rs ) pk p k s=1 ! ! k−1 k−1 X π(ds )i ,j bk X π(ds )ik ,jk a − jk k k = − zs ac+1 + bk + rs pk s=1 pk pk p k s=1 ! k−1 X π(ds )i ,j jk − a k k = zk ac+1 − bk − rs . pk pk s=1  Pk−1 π(ds )ik ,jk  Hence rk = jkp−a b − rs is recursively defined, and if ac+1 > k s=1 pk k ri , we have that y > 0.  i zi n o Corollary 2.12. When ac+1 > max a, zr11 , . . . , zrεε , then Algorithm 2.2 produces the Boij-Söderberg decomposition as in Algorithm 1.2. yk = Proof. By Theorem 2.4 and Proposition 2.7, we have a decomposition with degree sequences that form a chain. It is enough to show that the coefficients in the decomposition are positive. 12 GIBBONS, HUBEN, AND STONE By choice of ac+1 , the coefficients ys for 1 ≤ s ≤ ε are positive and eliminate the top part of the diagram. If this elimination order differs from the Boij-Söderberg decomposition, then at some step s, ys was not the greedy choice. However, es is the necessary degree sequence because it is the topmost degree sequence at this step. Together, these statements mean that, by Algorithm 1.2, there exists a maximal q > ys ∈ Q such that when subtracting qπ(es ) the resulting diagram has nonnegative entries. But since subtracting ys π(es ) eliminates entry bs , then any q > ys results in a diagram with a negative entry in this position, a contradiction. As such, up to ε, the algorithm respects the Boij-Söderberg decomposition. Further, our choice of ac+1 forces the Phase 2 elimination order to also respect the Boij-Söderberg decomposition, as any other order would create non-pure degree sequences. This forces all of the coefficients to be positive rational values and hence must be the Boij-Söderberg decomposition.  By Theorem 2.10, for sufficiently large ac+1 , we have characterized the behavior of the degree sequences in all phases of the algorithm, as well as the coefficients in Phase 1 and Phase 3. In particular, we know both the degree sequences and the known coefficients are completely determined by the decomposition of β(a1 , . . . , ac ). Unfortunately, the coefficients in Phase 2 are still elusive. Using [GS] we were able to generate enough examples to form the following conjecture. We also show this conjecture holds for codimension at most 3 in Corollary 4.3. Conjecture 2.13. Assume the notation of Theorem 2.10. If   rε r1 , ac+1 > max a, , . . . , z1 zε then for ε < s < ε + c, (3) ys = c! · a1 · · · ac · ac+1 − s−n X ! (ac+1−i − ai ) . i=1 3. Compatibility and Stability The stable behavior of the Boij-Söderberg decompositions of ideal powers has been studied by S. Mayes-Tang [MT15] when the ideal I in question is homogeneous in a single degree. In particular, for k  0 the decompositions of I k have the following properties: the number of terms in the decompositions are constant; the shapes of the pure diagrams in the decompositions are the same; the coefficients in the decompositions are given by polynomials in k. Given this result, D. Erman and S.V. Sam [ES16] ask if similar asymptotic stabilization results can be expected in other contexts. In Proposition 3.2 we show a positive answer in relation to the elimination order. Definition 3.1. The elimination order of β(a1 , . . . , ac+1 ) is compatible with the elimination order of β(a1 , . . . , ac ) if E(β(a1 , . . . , ac )) is the beginning of the sequence E(β(a1 , . . . , ac+1 )). Proposition 3.2. Let S = k[x1 , . . . , xn ] and I = (f1 , . . . , fc+1 ) be an ideal generated by a homogeneous regular sequence with deg(fi ) = ai . If the Boij-Söderberg decomposition of β(a1 , . . . , ac ) has no instance of mass elimination, then there exists an N > 0 such that for all ac+1 > N , RECURSIVE DECOMPOSITIONS 13 (1) the number of terms in the Boij-Söderberg decomposition of β(S/I) is constant; (2) the elimination order of β(S/I) is compatible with that of β(a1 , . . . , ac ); (3) the elimination order of β(S/I) stabilizes; (4) if ε is the number of terms in the decomposition of β(a1 , . . . , ac ), then the first and last ε coefficients in the Boij-Söderberg decomposition of β(S/I) are given by linear polynomials in ac+1 . Proof. We know by Corollary 2.12 that Algorithm 2.2 is the Boij-Söderberg decomposition when ac+1 is chosen large enough. From Phase 3 we see there are 2ε + c − 1 terms for all choices of ac+1 , hence (1) holds. Similarly, (2) can be seen from Phase 1, and for (3), the elimination order is fixed by Algorithm 2.2. Finally, for (4), Theorem 2.10 shows that the appropriate coefficients are linear polynomials in ac+1 .  It is worth noting that Conjecture 2.13 implies all the coefficients in the BoijSöderberg decomposition of β(S/I) are given by polynomials in ac+1 . This is the case for c + 1 = 4. Example 3.3. Let I = (x21 , x32 , x43 , xa4 4 ) in the polynomial ring S = k[x1 , x2 , x3 , x4 ]. Using the results from Theorem 4.2, we are able to determine the decomposition of β(S/I) as a function of a4 . β(S/I) = (42 a4 + 294) · π(e1 ) + (12 a4 − 36) · π(e2 ) + (36 a4 + 378) · π(e3 ) + (12 a4 − 144) · π(e4 ) + (42 a4 − 204) · π(e5 ) + (144 a4 − 288) · π(e6 ) + (144 a4 − 288) · π(e7 ) + (42 a4 − 204) · π(e8 ) + (12 a4 − 144) · π(e9 ) + (36 a4 + 378) · π(e10 ) + (12 a4 − 36) · π(e11 ) + (42 a4 + 294) · π(e12 ) Observe that all the coefficients are linear in a4 and the number of terms is constant (provided a4 6= 12). In this example, a = 9 and the maximum given in Theorem 2.10 is 12, and we give a brief analysis of the behavior of the decomposition around this bound. First, when a4 = 12, observe that we have the traditional Boij-Söderberg decomposition with mass elimination: y4 = y9 = 0, ys > 0 otherwise, and the degree sequences form a chain. An analysis of the degree sequences will show that both compatibility and stability occur when a4 ≥ 13, confirming the assertions in Example 2.3. When 9 ≤ a4 < 12, we see that some of the coefficients are negative (but none are zero). Thus, in each case, the traditional Boij-Söderberg decomposition uses a different chain of degree sequences. However, given such an a4 , there exists a change-of-basis map from the pure diagrams used in Algorithm 2.2 to the pure diagrams used in Algorithm 1.2. Indeed, both sets of pure diagrams form a basis for the support of β(S/I). Determining the change-of-basis map is an area for further study. Although we do not study diagrams for which 4 ≤ a4 < 9 much in this paper, we note Algorithm 2.2 does provide a decomposition in these cases by Theorem 2.4, and in these cases the coefficients are positive rational numbers (though the degree sequences do not form a chain). In codimension three, the structure theorem in [GJM+ 15] shows there are exactly two non-trivial elimination orders for the diagram β(a1 , a2 , a3 ). In particular, 14 5 .   .  .  .  . .  GIBBONS, HUBEN, AND STONE . 1 3 . . .  . .  .   .  .  . 5 2 . . . 4 5 . 5 12 . . . .  . .   . 1 .   . .   . 5 .    . 8 2 . .       . . 3 . .     . 12 6 . .     . . 9 4 .     . . 10 . .     . . 12 7 .     . . . 11 .    . . . 12 . . . . . 12 12 . . . .  . .   . 1 .    . 4 . . .       . 7 2 . .     . . 3 . .     . . 6 . .     . .  . 5 .    . . . . .     . . . . .     . .  . . .    . 12 .  . .    . . 9 . .     . . 10 . .     . . 12 8 .     . . . 11 .    . . . 12 . . . . . 12 Figure 2. Elimination tables for β(2, 3, 4), β(2, 3, 4, 11), and β(2, 3, 4, 13) respectively.  12  .   .   .    .   .   .   .   .   .   .   .    .  .   .   .   .  . . . 1 3 . . . . . . . . . 7 2 . .                                   . 4 . . . 6 . . . . 5 . . . . . . . . . . . . . . . . . . . . . 12 . . . . 8 . . . 10 . . . 12 9 . . . 11 . . . 12 . . . . 12 β(2, 3, 4, 6), the case when a1 = a2 < a3 has a different elimination order than all other cases. In codimension four, even if we avoid mass elimination, there are still plenty of different elimination orders as detailed in [GJM+ 15]. However according to Proposition 3.2, if we avoid mass elimination and ac+1  0, then the elimination order stabilizes. When mass elimination does occur, compatibility fails when decomposing β(4, 5, 7, 9, a5 ) with large values of a5 , but the other results seem to hold. This begs the following open question: When does a complete intersection of codimension c have mass elimination, and why does it affect the stability of the related codimension c + 1 diagram? 4. Case Study: Codimension Four When c = 3, we describe the remainders relative to a4 when it satisfies the hypotheses in Theorem 2.10, which then allows us to find a closed formula for bound on a4 in terms of a1 , a2 , and a3 . Recall that no mass elimination occurs in codimension three, thus trivially satisfying that hypothesis of Theorem 2.10. Lemma 4.1. The remainders of β(a1 , a2 , a3 , a4 ) with respect to a4 are given by the following when a1 < a2 < a3 : r1 = −a1 a2 (a2 + a3 )2 , r2 = a1 a2 (a1 a2 + 2a1 a3 − a23 ), r3 = −a1 a2 (a1 − a2 + a3 )(a1 + a2 + 4a3 ), r4 = a1 a2 (a21 + 4a1 a3 − a2 a3 ), r5 = −a21 a2 (a2 − 5a3 ). When a1 < a2 = a3 we have: r10 = r1 a2 =a3 = −4a1 a32 , r20 = (r2 + r3 + r4 ) r30 = r5 a2 =a3 = a2 =a3 2 2 4a1 a2 . = 2a21 a22 − 2a1 a32 , RECURSIVE DECOMPOSITIONS 15 When a1 = a2 < a3 we have: r100 = −2a21 a23 , r200 = −2a31 a3 − 4a21 a23 , r300 = 8a31 a3 . Finally, when a1 = a2 = a3 , we have: r1000 = (r1 + r2 + r3 + r4 + r5 ) a1 =a2 =a3 = 0. Proof. Recall from Theorem 2.10 that rk is defined recursively in terms of the previous rs . In the case of codimension four we have r1 = (j1 − a)z1 and ! k−1 X π(ds )i ,j jk − a k k rk = bk − rs pk pk s=1 for 2 ≤ k ≤ 5, where a = a1 + a2 + a3 and bk , ik , jk , pk are described in Remark 2.1. From [GJM+ 15] we have the degree sequences and coefficients from the decomposition of the Betti diagram of a codimension three complete intersection, d1 = (0, a1 , a1 + a2 , a1 + a2 + a3 ), z1 = a1 a2 (a2 + a3 ), 2 d = (0, a2 , a1 + a2 , a1 + a2 + a3 ), z2 = a1 a2 (a3 − a1 ), d3 = (0, a2 , a1 + a3 , a1 + a2 + a3 ), z3 = 2a1 a2 (a1 + a3 − a2 ), 4 z2 = a1 a2 (a3 − a1 ), 5 z5 = a1 a2 (a2 + a3 ). d = (0, a3 , a1 + a3 , a1 + a2 + a3 ), d = (0, a3 , a2 + a3 , a1 + a2 + a3 ), Notice the elimination order in codimension three is not fixed. When a1 < a2 < a3 , we have the elimination order i1 = 1, j1 = a1 , i2 = 2, j2 = a1 + a2 , i3 = 1, j3 = a2 , i4 = 2, j4 = a1 + a3 , i5 = 3, j5 = a1 + a2 + a3 . When a1 < a2 = a3 , the degree sequences above collapse into three degree sequences 0 d1 = (0, a1 , a1 + a2 , a1 + 2a2 ), 0 d2 = (0, a2 , a1 + a2 , a1 + 2a2 ), 0 d3 = (0, a2 , 2a2 , a1 + 2a2 ), with elimination order: i1 = 1, j1 = a1 ; i2 = 2, j2 = a1 + a2 ; i3 = 3, j3 = a1 + 2a2 . These are consistent with the elimination order for a1 < a2 < a3 . When a1 = a2 = a3 , we are in the special case where ε = 1, d1 000 = (0, a1 , 2a1 , 3a1 ), and i1 = 3, j3 = 3a1 . This is trivially consistent with the elimination order for a1 < a2 < a3 . 16 GIBBONS, HUBEN, AND STONE However, when a1 = a2 < a3 , the degree sequences above collapse into three degree sequences 00 d1 = (0, a1 , 2a1 , 2a1 + a3 ), 00 d2 = (0, a1 , a1 + a3 , 2a1 + a3 ), 00 d3 = (0, a3 , a1 + a3 , 2a1 + a3 ), with an elimination order that begins in column 2 instead of column 1: i1 = 2, j1 = 2a1 ; i2 = 1, j2 = a1 ; i3 = 3, j3 = 2a1 + a3 . We proceed via two cases: when the elimination order is consistent with the general case a1 < a2 < a3 and when it isn’t, i.e., when a1 = a2 < a3 . Using the recursive formula, each rs can be explicitly written. The zeros below represent the instances in the sum where the respective degree sequence contained a zero in the position is , js . r1 = (j1 − a)z1 , (j2 − a) π(d1 )i2 ,j2 b2 − r1 , p2 p2 π(d2 )i3 ,j3 (j3 − a) b3 − 0 − r2 , r3 = p3 p3 (j4 − a) π(d3 )i4 ,j4 r4 = b4 − 0 −0 − r3 , p4 p4 π(d1 )i5 ,j5 π(d2 )i5 ,j5 π(d3 )i5 ,j5 π(d4 )i5 ,j5 (j5 − a) b5 − r1 − r2 − r3 − r4 . r5 = p5 p5 p5 p5 p5 Applying the appropriate recursive substitutions results in the desired formulas. When a1 < a2 = a3 we have d2 = d3 = d4 and ε(β 3 ) = 3 as described above. From this we have the following formulas for the remainders. r2 = r10 = (j1 − a)z1 , 0 r20 (j2 − a) π(d1 )i2 ,j2 = ·2− r1 , p2 p2 0 0 (j3 − a) π(d1 )i3 ,j3 π(d2 )i3 ,j3 − r1 − r2 . p3 p3 p5 Making the appropriate substitutions we obtain the desired formulas. When a1 = a2 = a3 , similar rote manipulations yield that r1000 = 0. For the case when a1 = a2 < a3 notice that d1 = d2 and d4 = d5 above. Once again we have ε(β 3 ) = 3 but the elimination order is different than the previous two cases; in this case we start eliminating in the first column instead of the second column. The details of the proof are similar to the previous cases.  r30 = In order to simplify the next result, we define the following ratios between the remainders in Lemma 4.1 and the coefficients of the codimension three decomposition where a1 < a2 < a3 [GJM+ 15] as r = −(a2 + a3 ), z 1 r a1 (a2 + 2a3 ) − a23 = , z 2 a3 − a1 RECURSIVE DECOMPOSITIONS 17 a3 (a2 + a3 ) − a1 (a1 + 3a3 ) , z 3 2a1 r a1 (a1 + 4a3 ) − a2 (a1 + 2a3 ) = , z 4 (a3 − a1 ) r a2 (5a1 a3 + a22 ) − (a1 a22 + a21 a3 + a1 a23 + a2 a23 ) = . z 5 a2 (a2 + a3 ) r = Similarly, when a1 < a2 = a3 ,  r 0 = −2a2 , z 1  r 0 1 = (a1 − a2 ), z 2 2  r 0 = 2a1 . z 3 When a1 = a2 < a3 ,  r 00 = −a3 , z 1  r 00 = −(a1 + 2a3 ), z 2  r 00 = 4a1 . z 3 Finally, when a1 = a2 = a3 ,  r 000 = 0. z 1 Using the above notation, we state the following partial classification theorem for the Boij-Söderberg decomposition of complete intersections in codimension four. Theorem 4.2. Let S = k[x1 , x2 , x3 , x4 ] and I = (f1 , f2 , f3 , f4 ) be an ideal generated by a homogeneous regular sequence with deg(fi ) = ai , where ai < ai+1 for all i. If a4  0, then the decomposition of β(S/I) obtained from Algorithm 1.2 is completely determined by the degrees a1 , a2 , a3 , a4 . In particular, we have the following decompositions broken down by cases. Case 1: a1 < a2 ≤ a3 or a1 = a2 = a3 ; when n r r r r r o a4 > max a1 + a2 + a3 , , , , , z 1 z 2 z 3 z 4 z 5 (note that if a1 ≤ a2 = a3 , this maximum is a1 + 2a2 ), then: β(S/I) = a1 a2 (a2 + a3 )(a2 + a3 + a4 ) · π(e1 ) − a1 a2 (a1 a2 + 2a1 a3 − a23 + a1 a4 − a3 a4 ) · π(e2 ) + a1 a2 (a1 − a2 + a3 )(a1 + a2 + 4a3 + 2a4 ) · π(e3 ) − a1 a2 (a21 + 4a1 a3 − a2 a3 + a1 a4 − a3 a4 ) · π(e4 ) + a1 a2 (a1 a2 − 5a1 a3 + a2 a4 + a3 a4 ) · π(e5 ) + 6a1 a2 a3 (a1 − a3 + a4 ) · π(e6 ) + 6a1 a2 a3 (a1 − a3 + a4 ) · π(e7 ) 18 GIBBONS, HUBEN, AND STONE + a1 a2 (a1 a2 − 5a1 a3 + a2 a4 + a3 a4 ) · π(e8 ) − a1 a2 (a21 + 4a1 a3 − a2 a3 + a1 a4 − a3 a4 ) · π(e9 ) + a1 a2 (a1 − a2 + a3 )(a1 + a2 + 4a3 + 2a4 ) · π(e10 ) − a1 a2 (a1 a2 + 2a1 a3 − a23 + a1 a4 − a3 a4 ) · π(e11 ) + a1 a2 (a2 + a3 )(a2 + a3 + a4 ) · π(e12 ) where the degree sequences es are given by e1 = (0, a1 , a1 + a2 , a1 + a2 + a3 , a1 + a2 + a3 + a4 ), e2 = (0, a2 , a1 + a2 , a1 + a2 + a3 , a1 + a2 + a3 + a4 ), e3 = (0, a2 , a1 + a3 , a1 + a2 + a3 , a1 + a2 + a3 + a4 ), e4 = (0, a3 , a1 + a3 , a1 + a2 + a3 , a1 + a2 + a3 + a4 ), e5 = (0, a3 , a2 + a3 , a1 + a2 + a3 , a1 + a2 + a3 + a4 ), e6 = (0, a3 , a2 + a3 , a1 + a2 + a4 , a1 + a2 + a3 + a4 ), e7 = (0, a3 , a1 + a4 , a1 + a2 + a4 , a1 + a2 + a3 + a4 ), e8 = (0, a4 , a1 + a4 , a1 + a2 + a4 , a1 + a2 + a3 + a4 ), e9 = (0, a4 , a2 + a4 , a1 + a2 + a4 , a1 + a2 + a3 + a4 ), e10 = (0, a4 , a2 + a4 , a1 + a3 + a4 , a1 + a2 + a3 + a4 ), e11 = (0, a4 , a3 + a4 , a1 + a3 + a4 , a1 + a2 + a3 + a4 ), e12 = (0, a4 , a3 + a4 , a2 + a3 + a4 , a1 + a2 + a3 + a4 ). Case 2: a1 = a2 < a3 and a4 ≥ max{2a1 + a3 , 4a1 }, we have β(S/I) = 2a21 a3 (a3 + a4 ) · π(e1 ) + 2a21 a3 (a1 + 2a3 + a4 ) · π(e2 ) − 2a21 a3 (4a1 − a4 ) · π(e3 ) + 6a21 a3 (a1 − a3 + a4 ) · π(e4 ) + 6a21 a3 (a1 − a3 + a4 ) · π(e5 ) − 2a21 a3 (4a1 − a4 ) · π(e6 ) + 2a21 a3 (a1 + 2a3 + a4 ) · π(e7 ) + 2a21 a3 (a3 + a4 ) · π(e8 ) where the degree sequenes es are given by e1 = (0, a1 , 2a1 , 2a1 + a3 , 2a1 + a3 + a4 ), e2 = (0, a1 , a1 + a3 , 2a1 + a3 , 2a1 + a3 + a4 ), e3 = (0, a3 , a1 + a3 , 2a1 + a3 , 2a1 + a3 + a4 ), e4 = (0, a3 , a1 + a3 , 2a1 + a4 , 2a1 + a3 + a4 ), e5 = (0, a3 , a1 + a4 , 2a1 + a4 , 2a1 + a3 + a4 ), e6 = (0, a4 , a1 + a4 , 2a1 + a4 , 2a1 + a3 + a4 ), RECURSIVE DECOMPOSITIONS 19 e7 = (0, a4 , a1 + a4 , a1 + a3 + a4 , 2a1 + a3 + a4 ), e8 = (0, a4 , a3 + a4 , a1 + a3 + a4 , 2a1 + a3 + a4 ). Proof. Before showing that correct decompositions, we observe that n these are the 0 0 0 o when a1 < a2 = a3 , max a1 + 2a2 , zr 1 , zr 2 , zr 3 = a1 + 2a2 ; when a1 = a2 < n 00 00 00 o a3 , max 2a1 + a3 , zr 1 , zr 2 , zr 3 = max {2a1 + a3 , 4a1 } ; and when a1 = a2 = n 000 o a3 , max 3a1 , zr 1 = 3a1 . Thus, in each case, a4 satisfies the hypotheses of Theorem 2.10. This means that the elimination order has stabilized and Algorithm 2.2 aligns with Algorithm 1.2. To calculate the degree sequences es , we use the degree sequences from the decomposition of β(S/(f1 , f2 , f3 )) found in [GJM+ 15], d1 = (0, a1 , a1 + a2 , a1 + a2 + a3 ), d2 = (0, a2 , a1 + a2 , a1 + a2 + a3 ), d3 = (0, a2 , a1 + a3 , a1 + a2 + a3 ), d4 = (0, a3 , a1 + a3 , a1 + a2 + a3 ), d5 = (0, a3 , a2 + a3 , a1 + a2 + a3 ). These degree sequences are what defines the two cases above. In particular, Case 1 and Case 2 are derived from the different elimination orders of codimension three complete intersections. Focusing on Case 1, notice when a1 < a2 < a3 , Phase 1 of Algorithm 2.2 produces the desired es for 1 ≤ s ≤ 5, while Phase 2 produces e6 . By duality we see that es = (e13−s )∨ for 7 ≤ s ≤ 12. Similar observations produce the results for the remaining instances of Case 1. Because the coefficients are symmetric, we only need to calculate the first six to show Case 1. By Theorem 2.10 we know that the coefficients from Phase 1 are positive and are a function of the degrees. In particular, for 1 ≤ s ≤ 5: y1 = a1 a2 (a2 + a3 ) · a4 − r1 = a1 a2 (a2 + a3 ) · a4 − (−a1 a2 (a2 + a3 )2 ) = a1 a2 (a2 + a3 )(a2 + a3 + a4 ); y2 = a1 a2 (a3 − a1 ) · a4 − r2 = a1 a2 (a3 − a1 ) · a4 − (a1 a2 (a1 a2 + 2a1 a3 − a23 )) = −a1 a2 (a1 a2 + 2a1 a3 − a23 + a1 a4 − a3 a4 ); y3 = 2a1 a2 (a1 + a3 − a2 ) · a4 − r3 = 2a1 a2 (a1 + a3 − a2 ) · a4 − (−a1 a2 (a1 − a2 + a3 )(a1 + a2 + 4a3 )) = a1 a2 (a1 − a2 + a3 )(a1 + a2 + 4a3 + 2a4 ); y4 = a1 a2 (a3 − a1 ) · a4 − r4 = a1 a2 (a3 − a1 ) · a4 − (a1 a2 (a21 + 4a1 a3 − a2 a3 )) = −a1 a2 (a21 + 4a1 a3 − a2 a3 + a1 a4 − a3 a4 ); 20 GIBBONS, HUBEN, AND STONE y5 = a1 a2 (a2 + a3 ) · a4 − r5 = a1 a2 (a2 + a3 ) · a4 − (−a21 a2 (a2 − 5a3 )) = a1 a2 (a1 a2 − 5a1 a3 + a2 a4 + a3 a4 ). To complete the proof of Case 1, we only need to show the coefficient y6 aligns with Conjecture 2.13. According to the elimination order, y6 · π(e6 ) targets the entry of β4 in the third column with degree a2 + a3 . As a1 < a2 < a3 , only two degree sequences in the chain contribute to this entry, e5 and e6 . The desired entries π(e5 )2,a2 +a3 and π(e6 )2,a2 +a3 are 1 1 and a2 a1 (a2 + a3 )(a1 + a4 ) a2 (a2 + a3 )(a1 − a3 + a4 )(a1 + a4 ) respectively. Summing these quantities y5 · π(e5 )2,a2 +a3 + y6 · π(e6 )2,a2 +a3 gives 6a1 a2 a3 (a1 − a3 + a4 ) a1 a2 (a1 a2 − 5a1 a3 + a2 a4 + a3 a4 ) + = 1, a2 a1 (a2 + a3 )(a1 + a4 ) a2 (a2 + a3 )(a1 − a3 + a4 )(a1 + a4 ) the desired result. 0 0 When a1 < a2 = a3 , e3 = e5 , e4 = e6 are the only relevant sequences. As such, the above calculations produce the desired result. For the remaining instance of Case 1, a1 = a2 = a3 , we have ε = 1 and hence 0 e1 = e1 = e2 = e3 = e4 = e5 ; 0 e2 = e6 are the only contributing degree sequences to the position 2, a2 +a3 . The respective 0 coefficients to π(e1 ) is y1 + y1 + y3 + y4 + y5 = 6a31 a4 . 0 0 Summing 6a31 a4 · π(e1 )2,a2 +a3 and y6 · π(e2 )2,a2 +a3 gives 6a31 a4 3 2a1 (a1 + a4 ) + 6a1 a2 a3 (a1 − a3 + a4 ) = 3, 2a21 a4 (a1 + a4 ) the desired result. Similar computations complete Case 2.  Combining the results from [GJM+ 15] with the above theorem yields the following. Corollary 4.3. Conjecture 2.13 holds in codimension c ≤ 3. References [AGHS17] Michael T. Annunziata, Courtney R. Gibbons, Cole Hawkins, and Alexander J. Sutherland, Rational combinations of betti diagrams of complete intersections, Journal of Algebra and Its Applications to appear (2017). [BS08] Mats Boij and Jonas Söderberg, Graded Betti numbers of Cohen-Macaulay modules and the multiplicity conjecture, J. Lond. Math. Soc. (2) 78 (2008), no. 1, 85–106. MR 2427053 (2009g:13018) , Betti numbers of graded modules and the multiplicity conjecture in the non[BS12] Cohen-Macaulay case, Algebra Number Theory 6 (2012), no. 3, 437–454. MR 2966705 RECURSIVE DECOMPOSITIONS 21 [EKKS15] Sabine El Khoury, Manoj Kummini, and Hema Srinivasan, Bounds for the multiplicity of Gorenstein algebras, Proc. Amer. Math. Soc. 143 (2015), no. 1, 121–128. MR 3272737 [Erm10] Daniel Erman, A special case of the Buchsbaum-Eisenbud-Horrocks rank conjecture, Math. Res. Lett. 17 (2010), no. 6, 1079–1089. MR 2729632 [ES09] David Eisenbud and Frank-Olaf Schreyer, Betti numbers of graded modules and cohomology of vector bundles, J. Amer. Math. Soc. 22 (2009), no. 3, 859–888. MR 2505303 (2011a:13024) [ES16] Daniel Erman and Steven V Sam, Questions about Boij-Söderberg theory, Algebraic geometry, bootcamp volume, Proc. Sympos. Pure Math., To appear, 2016. [Flø12] Gunnar Fløystad, Boij-Söderberg theory: introduction and survey, Progress in commutative algebra 1, de Gruyter, Berlin, 2012, pp. 1–54. MR 2932580 [FLS16] Nicolas Ford, Jake Levenson, and Steven V Sam, Towards Boij-Söderberg theory for Grassmannians: the case of square matrices, arXiv:1608.04058v1 (2016). [GJM+ 15] Courtney Gibbons, Jack Jeffries, Sarah Mayes, Claudiu Raicu, Branden Stone, and Bryan White, Non-simplicial decompositions of Betti diagrams of complete intersections, J. Commut. Algebra 7 (2015), no. 2, 189–206. MR 3370483 [GS] Daniel R. Grayson and Michael E. Stillman, Macaulay2, a software system for research in algebraic geometry, Available at http://www.math.uiuc.edu/Macaulay2/. [HK84] J. Herzog and M. Kühl, On the Betti numbers of finite pure and linear resolutions, Comm. Algebra 12 (1984), no. 13-14, 1627–1646. MR 743307 [HS98] Jürgen Herzog and Hema Srinivasan, Bounds for multiplicities, Trans. Amer. Math. Soc. 350 (1998), no. 7, 2879–2902. MR 1458304 (99g:13033) [McC12] Jason McCullough, A polynomial bound on the regularity of an ideal in terms of half of the syzygies, Math. Res. Lett. 19 (2012), no. 3, 555–565. MR 2998139 [MT15] Sarah Mayes-Tang, Stabilization of Boij-Söderberg decompositions of ideal powers, arXiv:1509.08544v1 (2015). [NS13] Uwe Nagel and Stephen Sturgeon, Combinatorial interpretations of some Boij– Söderberg decompositions, J. Algebra 381 (2013), 54–72. MR 3030509 [Whi14] Gwyneth Whieldon, Stabilization of Betti tables, J. Commut. Algebra 6 (2014), no. 1, 113–126. MR 3215565 Courtney R. Gibbons, Mathematics Department, Hamilton College, 198 College Hill Road, Clinton, NY 13323 E-mail address: [email protected] Robert Huben, Department of Mathematics, University of Nebraska–Lincoln, P.O. Box 880130, Lincoln, NE 68588-0130 E-mail address: [email protected] Branden Stone, Department of Mathematics and Computer Science, Adelphi University, 1 South Avenue, Garden City, NY 11530-0701 E-mail address: [email protected]
0math.AC
A Bayesian Filtering Algorithm for Gaussian Mixture Models Adrian G. Wills∗1 , Johannes Hendriks†2 , Christopher Renton‡3 , and Brett Ninness§4 arXiv:1705.05495v1 [stat.ML] 16 May 2017 1,2,3,4 School of Engineering, University of Newcastle, Australia. Abstract A Bayesian filtering algorithm is developed for a class of state-space systems that can be modelled via Gaussian mixtures. In general, the exact solution to this filtering problem involves an exponential growth in the number of mixture terms and this is handled here by utilising a Gaussian mixture reduction step after both the time and measurement updates. In addition, a square-root implementation of the unified algorithm is presented and this algorithm is profiled on several simulated systems. This includes the state estimation for two non-linear systems that are strictly outside the class considered in this paper. 1 INTRODUCTION The problem of estimating the state of a system based on noisy observations of the system outputs has received significant research attention for more than half a century [1]. This attention stems from the fact that state estimation is used in many areas of science and engineering, including—for example—guidance, navigation and control of autonomous vehicles [2], target tracking [3], fault diagnosis [4], system identification [5] and many other related areas. This research has resulted in many approaches to the state-estimation problem including the much celebrated Kalman filter [6], extended Kalman filter [7], Unscented Kalman filter [8] and Sequential Monte-Carlo (SMC) approaches [9]. Each of these variants exploits different structural elements of the state-space model and each has known strengths and associated weaknesses. For example, if the system is linear and Gaussian, then the Kalman filter is the most obvious choice. On the other hand, if the system is highly non-linear then SMC methods may be the most suitable choice. In this paper, we consider state estimation for a class of state-space models that can be described by Gaussian mixture models, for both the process and measurement models. This model class captures a broad range of systems including, for example, stochastically switched linear Gaussian systems, systems that exhibit multi-modal state and/or measurement noise, and systems that exhibit long–tailed stochastic behaviour, to name a few. In theory, Gaussian mixtures are suitable for modelling a large class of probability distributions [10]. Inclusion of Gaussian mixtures in the Bayesian filtering framework dates at least back the work in [11], where a mixture was employed to represent the predicted and filtered densities for general non-linear systems. As identified in [11], a significant drawback of this approach is that the number of mixture components can grow rapidly as the filter progresses. Subsequent work in this area has concentrated efforts towards ameliorating this problem by reducing the mixture. This includes approaches based on SMC methods, Expectation Maximisation (EM) clustering, Unscented transforms and many related methods [12, 13, 14, 15]. A common theme among these contributions is that they employ particle resampling techniques to reduce the number of components that need to be tracked. This is either achieved directly by removing highly unlikely components of the mixture, or numerically via resampling algorithms. Gaussian mixtures are also employed within the area of multiple target tracking problems [3]. Within this field, the methods of Multiple-Hypothesis Kalman Trackers (MHT) and Gaussian Mixture Probability Hypothesis Density filters ∗ [email protected][email protected][email protected] § [email protected] 1 (GM-PHD) rely on similar ideas presented here, albeit for the target tracking problem [3]. The key idea here is remove unlikely targets from the list of possible targets using a pruning mechanism. Closely related to these ideas is the independent area of Gaussian mixture model reduction. The recent review in [16] compares several of the main contenders in this field. The methods are compared based on accuracy of the reduced mixture relative to the original one, and the efficiency of each algorithm. The conclusion notes that the Kullback– Leibler reduction method of [17] is both efficient and appears to perform well in terms of accurately reducing the Gaussian mixture. The contribution of this paper is to unite the GMM state-space model structure together with the Kullback-Leibler reduction algorithm to deliver a new Bayesian filtering algorithm for state estimation of GMM state-space models. An important aspect of this algorithm is the numerically stable and efficient implementation by propagating covariance information in square-root form. This relies on the novel contribution of a square-root form Kullback-Leibler GMM reduction algorithm. 2 PROBLEM DESCRIPTION Consider a general state-space model expressed via a state transition probability and measurement likelihood xt+1 ∼ p(xt+1 |xt ), (1) yt ∼ p(yt |xt ), (2) where the state xt ∈ Rn and the output yt ∈ Rp . The state transition probability distribution (1) and the likelihood (2) may be parameter dependent and may also be time-varying, although these embellishments have been ignored for ease of exposition. Given a collection of observations YN = {y1 , . . . , yN }, then the general Bayesian filtering problem can be solved recursively via the well known time and measurement equations p(yt |xt ) p(xt |Yt−1 ) , p(yt |Yt−1 ) Z p(xt+1 |Yt ) = p(xt+1 |xt ) p(xt |Yt ) dxt . p(xt |Yt ) = (3) (4) Solving equations (3)–(4) has attracted enormous attention for many decades and this general approach has been successfully employed across disparate areas of science and engineering. In the general case, the solutions to equations (3) and (4) cannot be expressed in closed form, and this has been the focus of significant research activity. Indeed, this difficulty has led to many approximation methods including the employment of Extended Kalman Filters, Unscented Kalman Filters and Sequential Monte-Carlo (Particle) Filters to name but a few. In this paper, we restrict our attention to a class of state-space systems that are not as general as (1)–(2), yet—in theory—have the potential to approximate general state-space systems arbitrarily well[10]. More precisely, we will consider state-space systems that can be described by a Gaussian Mixture Model (GMM) in the following manner. The prior is described by Np Np X X i i p(x1 ) = αi N (x1 ; µ1 , P1 ), αi = 1. (5) i=1 i=1 The process model is of the form p(xt+1 |xt ) = Nx X βtj N (xt+1 ; Ajt xt + ujt , Qjt ), j=1 Nx X βtj = 1. (6) j=1 The measurement model is of the form p(yt |xt ) = Ny X γtk N (yt ; Ctk xt k=1 + vtk , Rtk ), Ny X k=1 2 γtk = 1. (7) In the above, the form N (x; µ, P ) is used to denote a standard multivariate Gaussian distribution. The mean offset terms ujt and vtk allow for the inclusion of input signals or other generated signals that do not depend on xt . The model in (5)–(7) is not as general as (1)–(2). However, the primary advantage of restricting attention to this Gaussian mixture model class is that the time and measurement update equations can be expressed in closed form. Indeed, this fact has already been exploited by many authors dating back to the work of [11]. Therein, the Authors raise a serious issue with this approach, which can be observed by following the recursions in (3)–(4) for just a few steps. Specifically, starting with the prior (5), then the first measurement update can be expressed as p(x1 |Y1 ) = N p Ny X X αi γk i=1 k=1 N (y1 ; C1k x1 + v1k , R1k ) N (x1 ; µi1 , P1i ) , p(y1 |Y0 ) (8) and updating this filtered state distribution to the predicted state via (4) results in Np Nx Ny X XX p(x2 |Y1 ) = αi β1j γ1k Z f1i,j,k (x2 , x1 , Y1 ) dx1 , (9) i=1 j=1 k=1 where f1i,j,k (x2 , x1 , Y1 ) , N (y1 ; C1k x1 + v1k , R1k ) p(y1 |Y0 ) × N (x2 ; Aj1 x1 + uj1 , Qj1 ) N (x1 ; µi1 , P1i ). (10) Therefore, the predicted state distribution is already a GMM with Np Nx Ny components. This becomes unmanageable whenever either Nx or Ny are greater than 1, and the number of measurements N becomes large. For example, if Np = 1, Nx = 1 and Ny = 2, then a very modest N = 100 measurements would result in the predicted state density composed of Ny100 = 2100 ≈ 1030 Gaussian components—of the same order as the estimated number of bacterial cells on Earth [18]. Clearly this is not practical and the Authors in [11] suggest that the number of terms should be reduced after each iteration of the filter, but do not provide a suitable mechanism for achieving this. In the current paper, we adopt the approach of maintaining a prediction and filtering Gaussian mixture and utilise the work in [17] to reduce the mixture at each stage via a Kullback-Leibler discrimination approach. Akin to resampling, this approach compresses the distribution while maintaining the most prominent aspects of the mixture model. This approach will be outlined in the following section. 3 3.1 FILTERING ALGORITHM A Kullback-Leibler GMM Reduction Method In this section, we will outline the important aspects of a Kullback-Leibler Gaussian Mixture Model reduction method proposed in [17] and show how this can be utilised within a Bayesian filtering framework in the following subsection. Importantly, we extend the work in [17] in a trivial manner to allow for a reduction of the GMM based on a user-defined threshold, and this has the effect of adapting the mixture to a maximum acceptable loss of information. The main idea in [17] is to reduce a GMM π(x) = N X wi πi (x), πi = N (x; µi , Pi ), i=1 N X wi = 1, (11) vi = 1, (12) i=1 to another mixture model η(x) = M X vi ηi (x), πi = N (x; νi , Qi ), i=1 M X i=1 3 where 1 ≤ M ≤ N and in this subsection the variables x, P and Q and others are to be treated as general variables and are not meant to represent states and covariance matrices defined elsewhere. The mechanism proposed in [17] to achieve this reduction is to form a component of η(x) by merging two components from π(x), that is, ηk (x) = f (πi (x), πj (x)). (13) This is repeated until the desired number of components M is achieved. How to merge these two components from π(x) and which two to choose are detailed in [17], but here we present the salient features. In terms of the merging function f (·, ·), the Authors in [17] employ the following merge that preserves the first- and second-order moments of the original two components f (πi (x), πj (x)) = wij N (x; µij , Pij ), (14) where wij = wi + wj , (15) µij = wi|ij µi + wj|ij µj , (16) Pij = wi|ij Pi + wj|ij Pj wi|ij wj|ij + wi|ij wj|ij (µi − µj )(µi − µj )T , wi , = wi + wj wj . = wi + wj (17) (18) (19) It is possible (see Section IV in [17]) to bound the Kullback-Leibler discrimination between η(x) and π(x) for each reduction. This is not a bound on the difference between η(x) and π(x), but provides a bound on the discrimination between the mixtures before and after reduction of a component pair. This bound is denoted B(i, j) and is defined as i 1h B(i, j) , wij log |Pij | − wi log |Pi | − wj log |Pj | . (20) 2 In the above, we have used the notation | · | to represent the matrix determinant. The utility of the bound B(i, j) is that we can choose among the possible i’s and j’s to find the combination that generates the smallest value B(i, j), which therefore represents a bound on the smallest Kullback-Leibler discrimination among the possible components. That is, merging the (i, j) mixture components results in the smallest change to the mixture according to the Kullback-Leibler discrimination bound. Importantly, B(i, j) = B(j, i) and B(i, i) = 0 so it is only necessary to search 21 N (N − 1) combinations—less than half of all possible (i, j) pairs. Once the minimising (i, j)-pair is found, then the corresponding components can be merged and the process can be repeated on the new, reduced, mixture. It is worth noting that this approach is completely deterministic in that the N resulting data {vi , νi , Qi }M i=1 that describes the reduced mixture is only a function the original data {wi , µi , Pi }i=1 that describes the starting mixture. In the current paper, we are less concerned with a priori fixing the number M of components in the reduced mixture, and are more concerned with minimising the number of components at each iteration of the filter. To that end, here we will detail an algorithm that continues to merge components until the bound B(i, j) exceeds a given threshold. This may be related back to an acceptable loss of accuracy and, although not explored here, it may be possible to compensate for this decrease in entropy by increasing the corresponding covariance terms. This aside, Algorithm 1 produces a new mixture by successive merging until a threshold in B(i, j) is exceeded, or, a desired minimum number of components is achieved. 3.2 Filtering Algorithm In this section we will detail the combination of the Bayesian filtering recursions (3)–(4) for the class of Gaussian mixture state-space models defined in (5)–(7), where the number of components in the filtering and predicted mixtures 4 Algorithm 1 Kullback-Leibler GMM Reduction Require: Integers Ml > 0 and Mu > 0 that determine a minimum and maximum, respectively, number of components in the reduced mixture, and a threshold λ > 0, and the initial mixture data {wi , µi , Pi }N i=1 . 1: Set k = N and define a set of integers S , {1, . . . , N }. 2: Calculate the bound matrix entries B(i, j) using (20) for i ∈ S and j ∈ S noting that B(i, i) = 0 and B(i, j) = B(j, i). 3: while k > Mu or (k > Ml and mini,j B(i, j) < λ) do 4: Find (i? , j ? ) = arg mini,j B(i, j). 5: Merge components (i? , j ? ) using (15)–(19) so that the i? ’th component data is replaced with {wi? , µi? , Pi? } ← {wi? j ? , µi? j ? , Pi? j ? }. (21) Remove j ? from the set S so that S ← S \ j ? . Set k ← k − 1. Re-calculate the bound matrix entries B(i, j) using (20) for i ∈ S and j ∈ S noting that B(i, i) = 0 and B(i, j) = B(j, i) and noting that only the i? ’th row and column will have changed. 9: end while 6: 7: 8: will be reduced at each stage by utilising Algorithm 1. Recall that the reduction is necessary in order to combat the exponential growth in the number of mixture components. To this end, assume that we have available a prediction mixture given by Nt|t−1 p(xt |Yt−1 ) = X ` ` wt|t−1 N (xt ; x b`t|t−1 , Pt|t−1 ), (22) `=1 Nt|t−1 X ` wt|t−1 = 1. `=1 Note that the prior (5) is already in this form at t = 1. Consider the measurement update (3), which can be expressed in the current GMM setting as Nt|t−1 Ny p(xt |Yt ) = X X `=1 ` wt|t−1 γtk k=1 N (yt ; Ctk xt + vtk , Rtk ) p(yt |Yt−1 ) ` × N (xt ; x b`t|t−1 , Pt|t−1 ). (23) Due to the linear Gaussian structure, this can be expressed as (see Section III in [11]) Nt|t p(xt |Yt ) = X Nt|t s wt|t X s N (xt ; x bst|t , Pt|t ), s=1 s wt|t = 1, (24) s=1 where for each k = 1, . . . , Ny and ` = 1, . . . , Nt|t−1 it holds that Nt|t = Nt|t−1 Ny , (25) s , Ny (` − 1) + k, x bst|t est = x b`t|t−1 = yt − + Ctk x b`t|t−1 5 (26) Kts est , − (27) vtk , (28) and ` Σst = Ctk Pt|t−1 (Ctk )T + Rtk , (29) ` Ctk (Σst )−1 , Pt|t−1 (30) Kts = s ` = Pt|t−1 − Kts Σst (Kts )T , Pt|t s w̄t|t s = PN wt|t t|t s w̄t|t s=1 s w̄t|t (31) , (32) ` wt|t−1 γtk exp(− 21 (est )T (Σst )−1 est ) = (2π)n/2 |Σst |1/2 . (33) With this filtering distribution in place, then we can proceed with the time update (4), which can be expressed as p(xt+1 |Yt ) = Nt|t Nx XX s βtj wt|t s=1 j=1 Z × s N (xt+1 ; Ajt xt + ujt , Qjt ) N (xt ; x bst|t , Pt|t ) dxt . (34) Again, due to the linear Gaussian densities involved, we can express this predicted mixture via Nt+1|t p(xt+1 |Yt ) = X ` ` wt+1|t N (xt+1 ; x b`t+1|t , Pt+1|t ), (35) `=1 Nt+1|t X ` wt+1|t = 1, `=1 where for each s = 1, . . . , Nt|t and j = 1, . . . , Nx we have that Nt+1|t = Nt|t Nx , (36) ` , Nx (s − 1) + j, x bt+1|t = Ajt x bst|t Pt+1|t = Ajt Pt|t (Ajt )T s wt|t βtj . ` wt+1|t = + (37) ujt , (38) + Qjt , (39) (40) Therefore, we have arrived back at our initial starting assumption in (22), albeit one time step ahead. Hence, the recursion can repeat. What remains is to reduce the filtered mixture p(xt |Yt ) and the predicted mixture p(xt+1 |Yt ) at each iteration in order to avoid exponential growth in computational load. To this end, below we define an algorithm that combines the above filtering recursions with Algorithm 1 to provide a practical Bayesian Filtering algorithm for Gaussian Mixture Model state-space systems. 4 NUMERICALLY STABLE IMPLEMENTATION The above discussion outlines Algorithm 2, which produces estimates of the filtering and prediction mixture densities. The main computational tools employed are those common to Kalman Filtering and those introduced in Algorithm 1 to perform the required mixture reduction. It is well known [19] that when implementing Kalman Filters, care should be taken in ensuring that the covariance matrices remain positive definite and symmetric. Unfortunately, the equations in (25)–(33) and (36)–(40) are not guaranteed to maintain this requirement if implemented naively. To circumvent this problem, we have employed a square-root version of the filtering recursions. 6 Algorithm 2 GMM Filter Require: Integers Mf l > 0, Mf u > 0, Mpl > 0, Mpu > 0 that determine the minimum and maximum number of components in the filtering and prediction mixtures after reduction, and threshold values λf > 0 and λp > 0 that represent the filtering and prediction thresholds, respectively, for Algorithm 1. 1: Set t = 1 and define the initial prediction mixture at t = 1 according to the prior (5) so that for each i = 1, . . . , Np i , αi , w1|0 N1|0 , Np , x bi1|0 , µi1 , i , P1i . P1|0 (41) 2: while k ≤ N do 3: Calculate p(xt |Yt ) according to (24) and (25)–(33). 4: Replace p(xt |Yt ) with a reduced mixture using Algorithm 1 with Ml = Mf l and Mu = Mf u , λ = λf and where the N t|t s s mixture data corresponds to {wt|t ,x bst|t , Pt|t }s=1 . 5: Calculate the prediction mixture p(xt+1 |Yt ) according to (35) and (36)–(40). 6: Replace p(xt+1 |Yt ) using Algorithm 1 with Ml = Mpl and Mu = Mpu , λ = λp and where the mixture data corresponds Nt+1|t ` ` to {wt+1|t ,x b`t+1|t , Pt+1|t }`=1 . 7: end while We present the essential idea here in order to help explain a square-root implementation of Algorithm 1 that relies on the mixture being provided in square-root form. To this end, it is assumed that we have access to square-root versions of the covariance matrices P1i = (P1i )T /2 (P1i )1/2 , (42) Qjt Rtk (43) = = (Qjt )T /2 (Qjt )1/2 , (Rtk )T /2 (Rtk )1/2 . (44) The measurement update equations (25)–(33) can then be calculated by employing a QR factorisation as follows   s   0 (Rtk )1/2 R11 Rs12 s . (45) ,Q ` ` )1/2 (Pt|t−1 )1/2 (Ctk )T (Pt|t−1 0 Rs22 In the above Qs is an orthonormal matrix and Rs11 and Rs22 are upper triangular matrices. Note that we have dropped the time reference from these matrices for ease of exposition. This then allows for the computation of the remaining terms via (Σst )1/2 = Rs11 , s 1/2 (Pt|t ) = (46) Rs22 , (47)   ẽt = (Rs11 )−T yt − Ctk x b`t|t−1 − vtk , (48) x bst|t = x b`t|t−1 + (Rs12 )T ẽst , (49) s w̄t|t s , wt|t = PN t|t s s=1 w̄t|t (50) and the weights can be calculated via s w̄t|t = σts , ` wt|t−1 γtk exp(− 21 (ẽst )T ẽst ) p Y (2π)n/2 σts !1/2 |Σst (i, i)|2 i=1 7 . , (51) (52) Similar arguments can be employed in the prediction step with " #  ` s 1/2 (Ajt )T R̄ ` (Pt|t ) , Q̄ , 0 (Qjt )1/2 (53) ` )1/2 = R̄` . (Pt+1|t (54) The remaining prediction equations in (36)–(40) are unchanged. Therefore, we can compute all the required filtering and prediction covariances in square-root form. Aside from the numerical stability that this brings, we can also exploit the square-root form in Algorithm 1. Specifically, referring to the steps in Algorithm 1, it is important that we can compute the bound B(i, j) efficiently and robustly. To this end, note that according to (15)–(19), if the covariance matrices {Pi , Pj } are provided in square-root form then we can compute the following QR factorisation   √ 1/2   wi|ij Pi R̃   √ 1/2 (55) = Q̃  , wj|ij Pj 0 √ wi|ij wj|ij (µi − µj )T so that T   √ √ 1/2 1/2 wi|ij Pi wi|ij Pi     √ √ 1/2 1/2 R̃T R̃ =     wj|ij Pj wj|ij Pj √ √ wi|ij wj|ij (µi − µj )T wi|ij wj|ij (µi − µj )T  T /2 = wi|ij Pi T /2 Pi + wj|ij Pj 1/2 Pj + wi|ij wj|ij (µi − µj )(µi − µj )T = Pij . (56) Therefore, 1/2 Pij = R̃ (57) is a square-root factor for the merged component. In addition, the bound B(i, j) can be readily calculated by exploiting the fact that for any upper triangular matrix A ∈ Rm×m log AT A = 2 m X log |A(i, i)| (58) i=1 to deliver B(i, j) = n X 1/2 1/2 wij log |Pij (i, i)| − wi log |Pi 1/2 | − wj log |Pj |. (59) i=1 Therefore, we have shown that the square-root form of the Kalman filter covariance matrices will be maintained after calling the mixture reduction algorithm by employing (55) and (57). We have further shown how to readily compute B(i, j) that exploits this square-root form. The QR factorisation involved in (55) can also exploit the special sparse structure arising from two stacked upper triangular matrices and one row vector. This feature has been exploited in our implementation, but not detailed here further. 5 EXAMPLES In this section, we present a collection of examples that profile the proposed Algorithm 2, henceforth referred to as the GMMF approach. We move from a simple linear state-space model with additive Gaussian noise, through to a non-linear and time-varying system that falls outside the modelling assumptions in this paper. 8 5.1 Linear State-Space Model In this example, we profile Algorithm 2 on a well known and studied problem of filtering for linear state-space systems with additive Gaussian noise on both the state and measurements. Clearly this falls within our model assumptions (5)–(7) and our purpose here is to observe that even if we deliberately start with more mixture components in the prior p(x1 ) than are strictly necessary, the algorithm will very quickly reduce the number of mixture terms in both the predicted and filtered densities. To this end, consider the state-space model   1 0.01 xt + ut + wt , 0 1   yt = 1 0 xt + et , xt+1 =  where the input was chosen as ut = 0 (60) (61) T 1 ūt with ūt ∼ N (0, 0.04) and x1 ∼ N (0, 1), wt ∼ N (0, 0.01), et ∼ N (0, 0.1), (62) We simulated N = 100 samples from the system and then ran both a Kalman Filter and the GMMF method according to Algorithm 2. The predicted mean of the first state is shown in Figure 1. Notice that the GMMF predicted mean initially differs from the Kalman predicted mean. This was a deliberate choice where the GMMF was initialised with an incorrect prior, as depicted in Figure 2a. This was generated by choosing 25 components in the prior that were evenly spaced between (−10, 10) in both states. The purpose here is to demonstrate that the GMMF approach can quickly converge to the correct number of modes and correct for the model mismatch. Indeed, after just t = 7 steps, the GMMF algorithm had converged to one mixture component in both the predicted and filtered mixtures. The convergence of the predicted PDFs can be observed in Figure 2 as time progresses. 5.2 Gaussian Mixture Model In this example, we are interested in profiling the GMMF algorithm for a model that satisfies the assumptions (5)–(7), and yet is not easily amenable to Extended Kalman filtering or Unscented Kalman filtering. Specifically, consider the following GMM state process model with Np = 1, µ1 = 0,  1 A1 = 0 Nx = 2, P1 = I2×2 ,   0.1 0.01 A2 = , 0 0.1  0.1 , 1 Q1 = 0.12 I2×2 , β 1 = 0.99, Q2 = 0.0032 I2×2 ,   sin(4πt/N ) u1t = u2t = , 0 β 2 = 0.01, and where the measurement model is described by Ny = 2,  C1 = 1 vt1 = 12.5, R1 = 0.1,  C2 = 1  0 ,  0 , vt2 = −12.5, R2 = 0.1, γ 1 = 0.1, γ 2 = 0.9. We simulated N = 200 samples from this system and used the GMMF method to estimate the state distribution. Figure 3 shows the predicted mean of the first state. For comparison, we also ran a Kalman filter for the most likely model (according to the weight β 1 , β 2 , γ 1 , γ 2 ). Note that when the modelling assumption is correct, e.g., from t = 100 to t = 130, the Kalman mean aligns very well with the GMMF mean as expected. 9 Figure 1: Plot of the predicted mean for the first state from both the Kalman Filter (red) and GMM Filter (green) against the true state (solid blue). Measurements are indicated as crosses. 5.3 Bi-modal Filtered Density Model In this example, we demonstrate the GMMF algorithm on a model that, due to its measurement equation, has a bi-modal filtered density. The prior and process models satisfy assumptions (5) and (6). Specifically, consider the following GMM state process model: Nx = 1, 20 , P1i = 0.1, 49 u1t = 5 cos(tk ), µi1 = −10 + (i − 1) Np = 50, A1 = 1, Q1 = 0.01, β1 = 1. (63) (64) (65) Here, however, we use a nonlinear measurement model that does not strictly satisfy the structural assumption in (7). Specifically, the measurement model is of the form yk = h(xt ) + ek , h(xt ) = x2k , ek ∼ N (0, 25). (66) This particular measurement model was chosen to create ambiguity in the filtered state between positive and negative values. The nonlinear measurement model can be dealt with in the GMMF framework by considering the Laplace approxima- 10 (a) Time t = 1. (b) Time t = 5. (c) Time t = 20. (d) Time t = 100. Figure 2: Predicted state densities for different times. Kalman predicted (blue solid) and GMM predicted (red solid). tion of the function for each mixture component. In this case, the measurement model for each component becomes Ctk,` = ∂h(x) ∂x x=x̂`t|t−1 , vtk,` = h(x̂`t|t−1 ) − Ctk,` x̂`t|t−1 . (67) This approximates the filtered density in a similar way to a first-order extended Kalman filter. In cases where the mixture components have high variance, the approximation may be poor. In this case, we are able to represent the prediction mixture by a greater number of components than in (9) by splitting each component of the mixture into Ns components. Note that the GMM model class easily accommodates this splitting process. We simulated N = 100 input/output samples from this system, and ran both the GMMF method and a Sequential Monte-Carlo (SMC) method to estimate the state distribution. The filtered state densities from the GMMF estimator are shown in Figure 4. The predicted and filtered densities at various times are shown in Figure 5. The GMMF was initialised with a prior of 50 components evenly spaced between (−10, 10). Figure 5a shows that the GMMF and SMC generated densities are closely matched in this case, despite the GMMF approach using no more than 35 components in the filtering mixture after the very first filtering step. 11 Figure 3: Plot of the predicted mean for the first state from both the Kalman Filter (red) and GMM Filter (green) against the true state (solid blue). Measurements are indicated as crosses. 5.4 Non-linear and Time Varying Model In this example, we demonstrate the GMMF algorithm on an model that has both a nonlinear process and measurement model. The purpose here is to show that the GMMF filter has potential utlity for cases where the model strictly violates the structural assumptions (5)–(7). The chosen model has received significant attention due it being recognised as a difficult state estimation problem [20, 21]. The process and measurement equations are given by xt+1 = f (xt ) + wt , f (xt ) = axt + bxt + c cos(1.2t) h(xt ) = dx2t , yt = h(xt ) + vt , where wt ∼ N (0, 1) and et ∼ N (0, 1), and the parameter values used are a = 0.5, b = 25, c = 8, d = 0.05. As in Section 5.3, the non-linearities are dealt with by taking the Laplace approximations about the mean of each mixture component via Aj,s t = ∂f (x) ∂x x=x̂st|t Ctk,` = ∂h(x) ∂x x=x̂`t|t−1 j,s s s uj,s t = f (x̂t|t ) − At x̂t|t , , , vtk,` = h(x̂`t|t−1 ) − Ctk,` x̂`t|t−1 . In order to improve the approximation of the PDFs given by the prediction and measurement steps, we represent the prediction and filtering densities by a greater number of components than given by (9) and (10), respectively. As in Section 5.3, this is achieved by splitting each mixture component into Ns components. 12 Figure 4: The filtered state density as predicted by the GMMF (contour), against the true state (solid black), and the true state mirrored about x = 0 (dashed black). We simulated N = 100 input/output samples from the system and ran both the GMMF algorithm and, for comparison, a Sequential Monte-Carlo method to estimate the state distributions. Figure 6 shows the predicted mean of the state. The predicted and filtered state densities are shown in Figure 7 for a selection of time samples, where we note the close match between these densities. 6 CONCLUSIONS AND FUTURE WORKS In this paper we present a novel square-root form Bayesian filtering algorithm for state-space models that can be described using a Gaussian mixture for both the process and measurement PDFs. The main attraction of restricting attention to this class of models is that the time and measurement update equations can be solved in closed form. This comes at the expense of exponential growth in computational load, which we combat by employing a Kullback–Leibler reduction method at each stage of the filter. The proposed algorithm is profiled on several examples including nonlinear models that fall strictly outside the model class. Interestingly, this does not appear to pose a serious problem for the algorithm. References [1] B. Ristic, S. Arulampalam, and N. Gordon, Beyond the Kalman Filter: Particle Filters for Tracking Applications. Boston, MA, USA: Artech house, 2004. 13 [2] S. Thrun, W. Burgard, and D. Fox, Probabilistic Robotics. Intelligent robotics and autonomous agents, MIT Press, 2005. [3] T. Ardeshiri, U. Orguner, C. Lundquist, and T. B. Schön, “On mixture reduction for multiple target tracking,” in Information Fusion (FUSION), 2012 15th International Conference on, pp. 692–699, IEEE, 2012. [4] J. Yu, “A particle filter driven dynamic gaussian mixture model approach for complex process monitoring and fault diagnosis,” Journal of Process Control, vol. 22, no. 4, pp. 778–788, 2012. [5] T. B. Schön, A. Wills, and B. Ninness, “System identification of nonlinear state-space models,” Automatica, vol. 37, pp. 39–49, jan 2011. [6] R. E. Kalman, “A new approach to linear filtering and prediction problems,” Trans. ASME Series D: J. Basic Eng., vol. 82, pp. 35–45, 1960. [7] G. Smith, S. Schmidt, and L. McGee, “Application of statistical filter theory to the optimal estimation of position and velocity on board a circumlunar vehicle,” tech. rep., NASA,Tech. Rep. NASA TR-135„ 1962. [8] S. J. Julier, J. K. Uhlmann, and H. F. Durrant-Whyte, “A new approach for filtering nonlinear systems,” in American Control Conference, Proceedings of the 1995, vol. 3, pp. 1628–1632, IEEE, 1995. [9] N. J. Gordon, D. J. Salmond, and A. F. M. Smith, “A novel approach to nonlinear/non-Gaussian Bayesian state estimation,” in IEE Proceedings on Radar and Signal Processing, vol. 140, pp. 107–113, 1993. [10] A. Bacharoglou, “Approximation of probability distributions by convex mixtures of gaussian measures,” Proceedings of the American Mathematical Society, vol. 138, no. 7, pp. 2619–2628, 2010. [11] D. Alspach and H. Sorenson, “Nonlinear bayesian estimation using gaussian sum approximations,” IEEE transactions on automatic control, vol. 17, no. 4, pp. 439–448, 1972. [12] M. Simandl and J. Dunik, “Sigma point gaussian sum filter design using square root unscented filters,” IFAC Proceedings Volumes, vol. 38, no. 1, pp. 1000–1005, 2005. [13] J. H. Kotecha and P. M. Djuric, “Gaussian sum particle filtering,” IEEE Transactions on signal processing, vol. 51, no. 10, pp. 2602–2612, 2003. [14] D. Raihan and S. Chakravorty, “Particle gaussian mixture (pgm) filters,” in Information Fusion (FUSION), 2016 19th International Conference on, pp. 1369–1376, IEEE, 2016. [15] P. Fearnhead, “Particle filters for mixture models with an unknown number of components,” Statistics and Computing, vol. 14, no. 1, pp. 11–21, 2004. [16] D. Crouse, P. Willett, K. Pattipati, and L. Svensson, “A look at gaussian mixture reduction algorithms,” in in Proceedings of the 14th International Conference on Information Fusion (FUSION), 2011. [17] A. R. Runnalls, “Kullback-leibler approach to gaussian mixture reduction,” IEEE Transactions on Aerospace and Electronic Systems, vol. 43, no. 3, 2007. [18] W. B. Whitman, D. C. Coleman, and W. J. Wiebe, “Prokaryotes: the unseen majority,” Proceedings of the National Academy of Sciences, vol. 95, no. 12, pp. 6578–6583, 1998. [19] T. Kailath, A. H. Sayed, and B. Hassibi, Linear Estimation. Prentice Hall, 2000. [20] A. Doucet, S. J. Godsill, and C. Andrieu, “On sequential Monte Carlo sampling methods for Bayesian filtering,” Statistics and Computing, vol. 10, no. 3, pp. 197–208, 2000. [21] S. J. Godsill, A. Doucet, and M. West, “Monte Carlo smoothing for nonlinear time series,” Journal of the American Statistical Association, vol. 99, pp. 156–168, Mar. 2004. 14 (a) Predicated, Time t = 0.1. (b) Filtered, Time t = 0.1. (c) Predicted, Time t = 3. (d) Filtered, Time t = 3. (e) Predicted, Time t = 5. (f) Filtered, Time t = 5. (g) Predicted, Time t = 6. (h) Filtered, Time t = 6. Figure 5: The predicted and filtered state densities. In each case, the GMMF density (blue) is compared against the density from a SMC method (red). 15 Figure 6: Plot of the predicted state mean from both the GMM Filter (red crosses) and the Particle filter (green squares) against the true state (solid blue). 16 (a) Predicated, Time t = 1. (b) Filtered, Time t = 1. (c) Predicted, Time t = 5. (d) Filtered, Time t = 5. (e) Predicted, Time t = 50. (f) Filtered, Time t = 50. (g) Predicted, Time t = 80. (h) Filtered, Time t = 80. Figure 7: The predicted and filtered state densities. In each case, the GMMF density (blue) is compared against the density from a SMC method (red). 17
3cs.SY
1 Tools for Improving Resilience of Electric Distribution Systems with Networked Microgrids arXiv:1705.08229v1 [cs.CE] 22 May 2017 Arthur Barnes∗ , Harsha Nagarajan† , Emre Yamangil† , Russell Bent∗ and Scott Backhaus∗ Abstract—In the electrical grid, the distribution system is the most vulnerable to severe weather events. Well-placed and coordinated upgrades, such as the combination of microgrids, system hardening and additional line redundancy, can greatly reduce the number of electrical outages during extreme events. Indeed, it has been suggested that resilience is one of the primary benefits of networked microgrids. We formulate a resilient distribution grid design problem as a two-stage stochastic program and make use of decomposition-based heuristic algorithms to scale to problems of practical size. We demonstrate the feasibility of a resilient distribution design tool on a model of an actual distribution network. We vary the study parameters, i.e., the capital cost of microgrid generation relative to system hardening and target system resilience metrics, and find regions in this parametric space corresponding to different distribution system architectures, such as individual microgrids, hardened networks, and a transition region that suggests the benefits of microgrids networked via hardened circuit segments. I. I NTRODUCTION Hurricane Sandy demonstrated shortcomings in the resilience of the North American power grid. Resilience is defined as the ability to operate the grid reliably under disaster conditions. Such disasters include earthquakes, tornadoes, ice storms, tsunamis, and wildfires [1]. The transmission network is generally quite resilient because of redundancy from meshed lines and generation reserves. In contrast, the distribution grid is much less resilient. It is estimated that 80% of all outages originate at the distribution level [2]. This resilience is lower mainly because the networks are typically operated in a radial configuration, the components are more susceptible to damage, and there is little controllable generation in such networks [3]. Hurricane Sandy caused prolonged outages for consumer, commercial, industrial and public loads alike. In response, the US Department of Energy has identified electric distribution grid resilience under severe weather as a research area to pursue, with the objective of improving resilience through advanced technologies such as microgrids, and has recognized the need for design tools that include resilience metrics [4]. Microgrids are collections of co-located generation and loads that are capable of appearing to the main electrical grid as a single controllable load or generator, and which can be disconnected to operate as standalone grids [5]. Multiple options are available to improve resilience in distribution systems, including improved vegetation management, physical reinforcement of overhead structures, and addition of new lines and switching to increase circuit redundancy. Other potential ∗ Information Systems and Modeling (A-1 division), Los Alamos National Laboratory, NM, USA. ([email protected]) † Center for Nonlinear Studies, Los Alamos National Laboratory, NM, USA. options include reconfiguration, spare component stockpiling, improved scheduling of line crew dispatch, and installation of microgrids at critical customer locations [1], [3], [5]. Several studies have investigated using microgrids to supply critical loads during extended outages on distribution systems [6]–[10]. However, the cost of installing microgrids at all critical loads is prohibitive. We propose that microgrids exploit existing or upgraded network infrastructure and use switching to connect microgrids to each other or to other critical loads via hardened overhead or underground lines [11], [12]. Such a design philosophy takes advantage of the economies of scale and load diversity that make the bulk power grid costeffective and more resilient than existing distribution grid design paradigms [13]. This manuscript describes a resilient design software tool (RDT) to determine an optimal design of distribution system upgrades combined with system operations to enable meeting resilience performance targets during extreme events. In our previous work [14], the approach was applied to small test systems using very simplified representations of power flow physics which neglected voltages, losses and reactive flows. In the current manuscript, the design tool is extended to use the linearized approximation of unbalanced three-phase power flow and is applied to a very large model of an actual distribution network. To address this problem, we use a stochastic programming approach [12], [14] that requires the upgraded distribution network to meet minimum resilience requirements over many samples of widespread network damage corresponding to an extreme weather event. The formulation and algorithms for expanding and hardening distribution networks for resilience are similar to approaches used for transmission networks [15]; however, distribution systems present unique challenges. The first is that distribution networks are typically operated in a radial fashion. In the worst case, enforcing this topological constraint requires enumerating all cycles (loops) in the network and eliminating them systematically—an NP-complete problem [16]. In the literature of distribution system expansion planning, researchers have proposed various methods based on flow formulations to enforce radial requirements on smallscale, single-phase networks [17]. However, it is known in the optimization literature that flow-based formulations are computationally inefficient when compared with cut-based formulations [18]. Thus, in this paper, we extend the latter to enforce radial operations in three-phase, large-scale networks. Second, it is challenging to handle the non-convex power flows of unbalanced multi-phase distribution networks in conjunction with topology design options. For a given radial topology, 2 a number of relaxations and linear approximation methods have been proposed in the literature to make the nonconvex power flow equations tractable [19]–[22]. Here, for unbalanced radial networks, we employ the linear approximation presented in [21], [22] but extend the method to handle the line on/off constraints via disjunctions. Further, we verify the quality of the solutions obtained with approximations using OpenDSS [23], a comprehensive distribution system simulation tool, and demonstrate that the solutions are physically valid. Literature Review Recently, [24] addressed the problem of placing microgrids for optimal restoration by topology reconfiguration using a Viterbi algorithm. Their approach is a heuristic-based method that is limited to balanced systems and was demonstrated on small-scale networks (up to 69 buses). In a closely related paper [25], a method was developed to design resilient distribution systems by multiple microgrid formations (up to 615 buses). Their work focused on topology re-configuration of grids with balanced “Lin-Dist” power flow models and do not consider upgrade options considered in this paper. Further, to enforce topology requirements, they consider the single-commodity flow formulation, which can have weak lower bounds [18]. Related approaches such as [3], [26] use a defender-attacker-defender (DAD) model that is suited to finding a small set of critical upgrades that enable resilience to targeted attacks. In principle, the DAD approach can be used for widespread extreme weather event damage, but, in practice, the computational complexity of a DAD approach grows quickly with the number of allowable failed components and is often intractable for our network design problem. To summarize, though there has been a great deal of interest in resilient design of distribution systems, there has not been much focus on upgrading existing large-scale grids subject to natural disasters with practical design options as the respective mathematical formulation of this problem crosses the frontiers of tractability. Hence, in this paper, we address this issue by applying various state-of-the-art optimization techniques. This rest of this manuscript is structured as follows: Section II describes the design criteria used as inputs to the resilient design problem, the fragility model used to generate sets of line outages based on a disaster scenario and the optimization problem formulation for resilient design. Section III describes the computer implementation of the resilient design tool and the case study systems it is applied to. Section IV presents results in terms of solutions produced by the RDT tool on the case study systems and variation in results by varying the user input parameters (as the trade-off between favoring construction of microgrids vs. construction of new lines). Section V presents conclusions and directions for future work. II. N OMENCLATURE Note that complex quantities (variables and constants) are denoted in bold. Given any two complex numbers z 1 and z 2 , z 1 ≥ z 2 implies <(zz 1 ) ≥ <(zz 2 ) and =(zz 1 ) ≥ =(zz 2 ). Parameters N set of nodes (buses). E Pi set of edges (lines and transformers). set of phases allowed to consume or inject power at bus i. Pij set of phases for the line (i, j). L set of all loads. K set of all critical loads. G set of existing and candidate microgrids. S set of disaster scenarios. Ds set of edges that are inoperable during s ∈ S. C set of sets of nodes that includes a cycle. S dl,k S̄ complex power demand in kVA for load on phase k of load l. k S̄ij line capacity in kVA between bus i and bus j on phase k. λ fraction of critical load power that must be served. γ fraction of total load power that must be served. S gl,k S̄ generation capacity on phase k of microgrid l in kVA. βij parameter for controlling how much variation in flow between the phases is allowed. k1 k2 Rij resistance in Ω between phases k1 and k2 of line (i, j). k1 k2 Xij reactance in Ω between phases k1 and k2 of line (i, j). Vmax maximum magnitude-squared voltage in kV. Vmin minimum magnitude-squared voltage in kV. M valid constant for disabling voltage constraints on nonexistent or open line (i, j). cij cost in $ to build line (i, j); 0 if line already exists. ψij cost in $ to harden line (i, j). αl cost in $ to build microgrid l. N performance period of a microgrid in years. η depreciation rate of a microgrid. r yearly revenue from operating a microgrid per kVA of installed capacity. S k,s,l complex power point used to inner approximate therij,0 mal constraint l on phase k of line (i, j) during disaster s. Variables S ds load delivered at bus i on phase k during disaster s. i,k yls determines if the lth load is served or not during disaster s. S gs complex power generated at bus i on phase k during i,k disaster s. S k,s Pijk,s + iQk,s ij ij : complex power flow on phase k of line (i, j) during disaster s. esij determines if line (i, j) is used during disaster s. esij,0 determines if flow exists on line (i, j) from j to i during disaster s. esij,1 determines if flow exists on line (i, j) from i to j during disaster s. bij determines if line (i, j) is built. hij determines if line (i, j) is hardened. ul determines if generator l is constructed. hsij determines if line (i, j) is hardened during disaster s. b̄sij determines if at least one edge (i, j) is used during disaster s. s Vi,k magnitude-squared of voltage on phase k in kV at node i during disaster s. 3 III. F ORMULATION AND ALGORITHMS The high-level objective of the resilient design problem is to select a set of network upgrades that will reduce the maximum number of outages during an extreme event. This paper considers severe ice and wind storms. The objective selects the least expensive combination of possible upgrade options for a feeder, consisting of (i) adding new lines, (ii) hardening lines and (iii) adding microgrids that allows the feeder to meet resilience requirements. The resilience requirements are defined over a set of disaster scenarios. Each disaster scenario describes the power system after the event has disabled lines or other equipment. The scenarios are the result of a stochastic calculation, in this case sampling from a probability distribution of pole failure due to an ice and wind storm [27]. A. Metrics The design criteria for resilient design are (i) constraints for load served and (ii) costs for the upgrades. The problem is formulated to upgrade an electrical distribution system to meet load constraints at a minimal cost. Load constraints consist of critical load served and noncritical load served. The load served criteria are defined in terms of the total power supplied to critical and noncritical loads in each damage scenario. In a typical design scenario, a large majority (90– 100%) of critical load is selected to be met and 10–50% of noncritical load is selected to be met. The noncritical load constraint encourages the optimizer to find a solution that will help improve resiliency for ordinary customers while ensuring resilient power for critical loads. Without loss of generality, new lines are constructed underground at a cost that is linear with respect to their length [28], [29]. Because the threat model is an ice and wind storm rather than flooding, new lines are perfectly reliable. See [14] for how to model situations when new lines are not perfectly reliable. To ensure that the distribution system is operated radially, new lines always come with a switch. This work assumes that hardening lines involves removal of the existing overhead line and replacement with an underground line. As with new lines, hardened lines are also perfectly reliable. It is also assumed that the cost of removal of the overhead line is small compared to that of the new underground line, so the cost is the same as adding a new underground line, with the exception that a switch is not added. It is assumed that the existing feeder has sufficient switches to always operate in a radial configuration. Each microgrid consists of generation connected directly to the critical load it serves plus a transfer switch connecting the microgrid to the primary system. The cost of installing a microgrid consists of a fixed cost plus a variable cost that is linear in the power rating of the microgrid generation. The fixed cost includes balance-of-system costs, the generator fuel tank, the transfer switch cost, and the fixed portion of the generator cost [30]. B. Fragility Model This study is based on an ice and wind storm [31]. The failure mode is ice accumulation on conductors and com- munications cables increasing the cross-sectional area such that wind pressure on the cables is sufficient to exceed the breaking strength of the pole. The probability of pole failure is assumed to be uniform for each pole in the system. This uniform pole failure model is used to trivially derive a line failure model in which each overhead line span can fail with the same probability. Given a failure probability pi for each pole, the line failure probability, given by 1 − (1 − pi )2 , is the likelihood of one of the poles supporting a line span failing. For each line span, a weighted coin is flipped to determine whether the line fails in a particular disaster scenario. This is repeated for each disaster scenario. C. Optimization for Design The set of scenarios S includes a set of disaster scenarios and the baseline scenario. Given a scenario s ∈ S, Q(s) in Eqs. 1 and 2 defines the set of feasible distribution networks. In this model, Eqs. 1a to 1c model an inner approximation of the capacity constraint on phase flows based on a polygon enclosed by eight lines. This approximation is illustrated in Figure 1. In the figure, the outer circle is the actual line thermal limit. The inner circle is the thermal limit scaled such that an octagon whose edges are tangent to the inner circle and whose vertices intersect the outer circle exists. This octagon describes a feasible region for Q(s), and the bold points mark k,s,l the (Pij,0 , Qk,s,l ij,0 ) points in 1a to 1c. When the line is not used, the flow is forced to 0 by esij . Eq. 1d forces all phases to flow in the same direction, an engineering constraint. Eq. 1e states that the flow on a line is 0 when the line is not available (switch open or not built). Eq. 1f limits the fractional flow imbalance between the phases to a value smaller than βij . Imbalance between phases cannot be extreme otherwise equipment may be damaged. Here, we use βij = 0.15 for transformers and βij = 1.0 otherwise. Eq. 1g states that the flow on a line is 0 when the line is damaged and not hardened (recall that only existing lines are damageable here). Eq. 1h requires all or none of the load at a bus to be served. Once again, this is an engineering limitation of most networks. Eq. 1i limits the microgrid generation output by the generation capacity and caps the generation capacity that can be installed at each microgrid. Eq. 1j ensures flow balance at the nodes for all phases. The summation of j ∈ N collects edges oriented in the “from” direction connecting its neighboring nodes. Eq. 1k eliminates network cycles, forcing a tree or forest topology. Eq. 1l ensures that a minimum fraction λ of critical load is served. Eq. 1m ensures that a minimum fraction of non critical load is served. Eqs. 1l and 1m are the resilience criteria that must be met by Q(s) and are similar to the n − k −  criteria of [32]. Eq. 1n states which variables are discrete. k,s,l k,s k,s,l −esij,0 Pij,0 6 Pij 6 esij,1 Pij,0 ∀ij ∈ E, k ∈ Pij , l ∈ {3, 7} (1a) k,s −esij,0 Qk,s,l 6 esij,1 Qk,s,l ∀ij ∈ E, k ∈ Pij , l ∈ {1, 5} (1b) ij,0 6 Qij ij,0 k,s,l k,s k,s k,s,l 2 2 Pij,0 Pij + Qk,s,l 6 ((Pij,0 ) + (Qk,s,l ij,0 Qij ij,0 ) ) esij,0 + esij,1 6 esij ∀ij ∈ E, k ∈ Pij , l ∈ {2, 4, 6, 8} (1c) ∀ij ∈ E (1d) 4 Qk,s ij (kVar) Thermal Limit Scaled Thermal Limit Inner Approximation The cycle constraint of Eq. 1k is implemented as Eqs. 3a to 3b to reduce the combinatorial growth of constraints. 1 8 2 7 X 3 Pijk,s (kW) 4 6 5 Fig. 1: Inner approximation of line thermal limit constraints. esij = bsij ∀ij ∈ / Ds S k,s ij X X k∈Pij X S ds i,k = k ,s S ij (1e) S k,s ij k∈Pij 0 (1f) ∀ij ∈ Ds (1g) S dl,k yls S̄ ∀i ∈ N , k ∈ Pi (1h) S gl,k ul S̄ ∀i ∈ N , k ∈ Pi (1i) ∀i ∈ N , k ∈ Pi (1j) ∀C ∈ C (1k) 6 |Pij | (1+βij ) l∈Li S gs i,k 6 X ∀C ∈ C (3a) ∀ij ∈ E (3b) The number of cycles in the graph is significantly reduced by collecting each line between nodes into a single edge. A set of binary variables for the edges of the corresponding singleedge graph is introduced to enumerate the possible cycles in that graph (Eq. 3a). Eq. 3b links the artificial cycle variables with the line and switch variables. For each s ∈ S, Q(s) is the set of feasible networks. The optimal network upgrade is the minimum cost design that satisfies Q(s) (Eqs. 4a to 4e). min ∀ij ∈ E, k ∈ Pij 6 |Pij | (1−βij ) esij = hsij 0 (b̄sij ) 6 |E(C)| − 1 ij∈E(C) bsij 6 b̄sij X (cij bij + ψij hij ) + ij∈E X αl ul (4a) l∈G s.t. bsij 6 bij ∀ij ∈ E, s ∈ S hsij = hij ∀ij ∈ E, s ∈ S (4c) bij , hij , ul ∈ {0, 1} (bsij , hsij , ul ) ∈ Q(s) ∀ij ∈ E, l ∈ G ∀s ∈ S (4d) (4e) (4b) l∈Gi ds S gs i,k − S i,k − X S k,s ij = 0 j∈N X esij 6 |E(C)| − 1 ij∈E(C) X S ds i,k > λ i∈N (K),k∈Pi X S ds i,k > γ X S dl,k S̄ (1l) l∈K,k∈Pl X S dl,k S̄ i∈N ,k∈Pi l∈L,k∈Pl s bsij , hsij , wij , esij , yls , ul ∈ {0, 1} (1m) (1n) Eqs. 2a to 2e define the linearized voltage drops across lines s where the variables Vi,k model the voltage magnitude squared on phase k of node i under scenario s [21]. Eq. 2f defines the allowable voltage range at each phase. Z ij = Zij ei2π/3 ; Z ij = Zij e−i2π/3 , where, Z̄ ¯ Z ij = R̄ij + iX̄ij , Z ij = Rij + iXij Z̄ ¯ ¯ ¯ M = Vmax − Vmin ∀i ∈ N (2a) (2b) esij ) s aa a,s aa a,s ≤ − Vi,a + 2(Rij Pij + Xij Qij ab b,s ab b,s ac c,s ac c,s Qij ) + R̄ij Pij + X̄ij Pij + Rij Pij + Xij ¯ ¯ s ≤ M (1 − eij ) ∀i ∈ N (2c) −M (1 − esij ) ba a,s s s ba a,s ≤ Vj,b − Vi,b + 2(Rij Pij + Xij Qij ¯ ¯ bb b,s bb b,s bc c,s bc c,s + Rij Pij + Xij Pij + R̄ij Pij + X̄ij Qij ) s ≤ M (1 − eij ) ∀i ∈ N (2d) −M (1 − s Vj,a s s ca a,s ca a,s −M (1 − esij ) ≤ Vj,c − Vi,c + 2(R̄ij Pij + X̄ij Qij cb b,s cb b,s cc c,s cc c,s + Rij Pij + Xij Pij + Rij Pij + Xij Qij ) ¯ ¯ s ≤ M (1 − eij ) ∀i ∈ N s Vmin ≤ Vi,k ≤ Vmax ∀i ∈ N , k ∈ Pi Eq. 4a minimizes the cost of constructing new lines, hardening existing lines, and installing microgrids. The microgrids have fixed sizes and the cost of each microgrid is split into a fixed installation cost and a cost based on its capacity. Eqs. 4b through 4e link the first stage and second stage variables (Q(s)). The inequality in Eqs. 4b allows new lines to be switched. Eq. 4e states that the vector of continuous and discrete variables (esij , yls , ul , hsij ) is a feasible network for scenario s. Note that bsij = 1 for all existing lines in the network. Similarly, hsij = 0 for all candidate new lines. The problem is solved using scenario-based decomposition (SBD) [14]. SBD solves the mixed-integer network upgrade problem for the base case and a single scenario and then evaluates the designed network on the remaining scenarios to verify whether it is feasible. If the designed network is not feasible on any one of the remaining disaster scenarios, one of the infeasible scenarios is added to the upgrade problem and the process is repeated until feasibility is reached. SBD exploits the property of the problem that once the network is designed, the solutions for each scenario are independent of each other. A heuristic variable neighborhood search (VNS) is also applied to reduce computation time. VNS is used in the mixed-integer programs constructed by SBD. VNS reduces the number of binary variables in the upgrade problem by fixing a subset of them based on their values resulting from a linear programming relaxation of the problem [33]. IV. N UMERICAL E XPERIMENTS (2e) (2f) The case studies in this paper are based on two feeders from a distribution system in the northeast United States that are relatively compact. Each feeder is served by a different 5 substation, and the feeders are meshed so that they can be backfed from substations (networked microgrids) on adjacent feeders. A. Implementation All results are based on a C++ implementation using CPLEX 12.6.2 as the native mixed-integer linear programming solver. All studies were carried out on a server with 64 GB of memory and two 2.6 GHz Intel Xeon Processor E5-2660 v3 processors, where 32 of 40 available threads were used. The number of usable threads was limited by the CPLEX license. B. Case Study Systems Three case studies are considered here. The first two case studies consider each feeder independently. The third case study combines the two feeders. The combined case study focuses on the advantages of meshing systems as networked microgrids. Table I summarizes the salient characteristics of the two feeders, which are illustrated in Fig. 2. The utility systems are unmodified with the exception that shunt capacitances are not included. Case Study 1 focuses on the smaller of the two feeders. The feeder consists of two three-phase trunks connected to the substation by an underground line. It feeds a mix of mostly overhead and underground single-phase laterals with occasional three-phase laterals. The feeder in Case Study 1 serves a relatively small number of critical loads, including a mall that serves as an emergency shelter, a gas station near an interstate exit, and a small grocery store. Case Study 2 considers the larger of the two feeders. The critical loads this feeder serves consist of one cluster of three grocery stores and three pharmacies distributed throughout the feeder. The feeder in Case Study 2 has a long looping overhead three-phase trunk connected to a second main trunk following a major road. As in the feeder in Case Study 1, it serves a mix of mostly overhead and underground single-phase laterals. Case Study 1 Case Study 2 Fig. 2: Case Study 1 and Case Study 2 feeder. Table II summarizes the upgrade options for the three case studies. Locations where microgrids can be built are limited to the critical load locations. In Fig. 2, line segments that TABLE I: Case Study System Properties Parameter Number of Buses Number of Lines Total Number of Loads Total Load Power Number of Critical Loads Total Critical Load Power Approximate Span East-West Approximate Span North-South Case Study 1 271 281 125 5.50 MW 3 359 kW 1.5 km 1.2 km Case Study 2 945 940 333 7.64 MW 6 972 kW 2.1 km 2.3 km TABLE II: Problem Setup Properties Parameter Microgrids Candidate Lines Upgradeable Lines Case Study 1 3 6 148 Case Study 2 6 6 462 Case Study 1 + 2 9 12 610 can be hardened via undergrounding are highlighted in green. These portions correspond to segments on three-phase trunks or segments that could form part of an alternate path to supply critical loads. Candidate new lines are indicated with violet dashed lines. Only a small number of these are present, and they are placed only if they are well suited to provide alternate paths of power between a substation and critical loads or between critical loads. The criteria and costs used in the case studies are summarized in Table III. The critical load–served requirements for each case study are as follows: 1) Case Study 1: 98% 2) Case Study 2: 90% 3) Case Study 1 + 2: 90% The amount of noncritical load that must be served varies between 10 and 50%. Depending on the amount of noncritical load, the optimizer will select a solution that can also provide power to noncritical loads (low amount of noncritical load required to be served) or a solution that adds additional hardening specifically to provide power to a sufficient amount of noncritical loads (high amount of noncritical load required to be served). Each potential microgrid location has the choice of 10 possible microgrids sized between 100 KW and 1 MW in 100 KW increments. As described earlier, the cost of adding microgrids consists of a fixed portion and a capacity-based portion that is linear in the power rating. For the purposes of this study, we perform a sensitivity analysis on the capacitybased portion of the cost. In practice, this cost (or benefit) could be calculated based on net-present-value (NPV) over the performance period of thePmicrogrid. For example, given S gl,k kW, yearly revenue a microgrid power rating of k∈Pl S̄ in dollars per kVA r, depreciation rate η, and a performance period of N years, the capacity cost of a microgrid at node i could be calculated as an NPV: ζl,k n N  X 1 S gl,k . = rS̄ 1 + η n=0 (5) The cost of new lines and upgrading lines remains constant across all design cases studied. Lastly, each of 50 damage 6 TABLE III: Constant Parameters for All Case Studies TABLE IV: Comparison of Calculation Times for Feeders Parameter Phase Variation Critical Load Served Noncritical Load Served Microgrid Sizing Increment1 Microgrid Fixed Cost Maximum Microgrid Size Microgrid Variable Cost2 Line Hardening Cost New (Underground) Cost Damage Probability per Line Number of Damage Scenarios Item Avg. Time Std. Dev. Worst-Case Time No. of Replicates Value 15% 90%, 98% 10%, 20%, ... 50% 100 kW $25k 1 MW $100/kW, $200/kW, ... $500/kW $1M/mile $1M/mile + $25k 20% 50 scenarios is constructed by damaging lines with a 20% probability. Note that on average 20% of lines will be damaged but that the actual number will vary across damage scenarios. For Case Study 1 and Case Study 2, we perform a sensitivity analysis on the noncritical load served and microgrid capacity cost parameters. For Case Study 1, 5 values are used for each parameter, giving a total of 25 design cases. For Case Study 2, 9 values are used for each parameter, giving a total of 81 design cases. For the combined Case Study 1 + 2 feeder, a single design case is discussed. V. R ESULTS Results from the sensitivity analysis for Case Study 1 are shown in Fig. 3. The center contour plot depicts the difference between the amount of microgrid generation installed in tens of kW and the total number of hardened/new lines. As the amount of noncritical load required to be served increases, the optimizer chooses to harden the feeder trunk. As the cost of installing a microgrid increases, the optimizer chooses to add hardened paths to critical loads instead of installing microgrids. The overall trend from the bottom left to the top right increasingly favors lines over microgrids. The critical load closest to the substation never receives a microgrid because it is connected via a three-phase underground line to the substation and is never damaged under the studied threat scenario. In case (b) at the top right of the figure, one critical load receives neither a microgrid nor a hardened path. The result is reasonable given that this critical load comprises a relatively small portion of the total critical load, i.e., the 98% critical load served criteria is not violated. Results from the sensitivity analysis for Case Study 2 are displayed in Fig. 4. The behavior in this case is a little more complicated. The number of new and hardened lines increases as the noncritical load served increases and the microgrid variable cost increases. However, total microgrid power rating becomes more sensitive with respect to microgrid variable cost as the amount of noncritical load served increases. In case (a), inexpensive microgrid generation is used to provide resilient power to noncritical loads instead of installing new or hardened lines, as shown in case (b). In all cases, the critical loads in the top left of the network figure are connected via hardened lines as a collection of networked microgrids. In 1 Power 2 Costs is given per phase. are given in terms of dollars per average power per phase. Case Study 1 2.91 min 1.97 min 6.32 min 81 Case Study 2 1.12 h 1.09 h 3.25 h 25 Case Study 1 + 2 2.64 h — — 1 TABLE V: Comparison of Costs for Feeders Item Cost New Lines Hardened Lines No. of Gens Gen Power (kW) Case Study 1 $224k 0 12 1 100 Case Study 2 $1.72M 2 82 1 100 Case Study 1 + 2 $720k 1 24 3 300 TABLE VI: Validation of Voltage Constraints with Unbalanced Distribution System Solver Case Case Case Case Study Study 1 Study 2 Study 1 + 2 Lowest Voltage (pu) 1.019 0.993 1.026 Highest Voltage (pu) 1.030 1.031 1.030 case (b), the optimizer chooses to build new lines to provide resilient power to noncritical loads and the critical load at the bottom right of the network diagram. Results for the Case Study 1 + 2 meshed system are illustrated in Fig. 5 using the following parameters: 1) Microgrid variable cost: $500/kW 2) Noncritical load served: 33% This solution has a smaller set of networked microgrids shown at the top left of the figure. Also of interest is that a new line is constructed to increase meshing of the two feeders, allowing a critical load in Case Study 2 to be supplied resilient power from the Case Study 1 substation with only a small amount of hardening of the Case Study 1 feeder trunk. The three combinations of feeders are compared in Tables IV and V. For this comparison, the previous parameters of $500/kW microgrid cost and 33% noncritical load served are used. Additionally, 90% of critical load is served for all combinations. This table supports one of the key contributions of this manuscript: A demonstration on utility data that networked microgrids can bring strong resilience benefits. The cost of making each microgrid resilient independently is roughly $2M. However, meshing the feeders and allowing them to support each other results in a resilient system that costs roughly one third of the independent solutions. Results from OpenDSS validating that voltage limits are met on the designed solution are presented in Table VI. VI. C ONCLUSIONS In this paper we developed a model for assessing the value of introducing networked microgrids to improve distribution system resiliency. We applied the approach on two distribution feeders from a northeastern United States electric utility. Under a selection of upgrade options, approximations of power flow physics, an ice/wind fragility model and heuristic search, our approach was demonstrated to scale to problems of practical size. 7 (a) $100/kW, 50% load a b c d (c) $100/kW, 10% load (b) $500/kW, 50% load (d) $500/kW, 10% load Fig. 3: Case Study 1 microgrid construction metric and solutions. (a) $100/kW, 50% load (c) $100/kW, 10% load a b c d (b) $500/kW, 50% load (d) $500/kW, 10% load Fig. 4: Case Study 2 microgrid construction metric and solutions. The results of this study indicate that there is good motivation for networking microgrids for resiliency needs. In particular, the value of networked microgrids is apparent when there are clusters of critical loads that are distant from a substation and the cost of hardening lines is relatively higher than the cost of installing microgrids. It is important to note that when hardening is less expensive, this may reduce the benefit of using networked microgrids. More importantly, perhaps, we also showed the cost of upgrading the resilience of two or more feeders together can be significantly less costly than upgrading the feeder resilience individually. There remain a number of interesting future directions. For example, resilient distribution system design remains a computationally difficult problem. Thus, there is room to develop algorithms that improve the performance and scalability of the approach that was discussed here. For example, future work could aggregate lines into upgrade sets where all lines in the set share a single decision variable to harden or build. Similarly, we could allow nonradial operation during extreme events which would cut down on the cycle constraint 8 Fig. 5: Case Study 2 + Case Study 1 solution. enumeration. There are also a number of natural parallel computing approaches that could exploit the decomposable structure of this problem. Finally, communication and control are increasingly becoming a part of distribution system design and these will play a critical role in the future resilience of distribution feeders. Thus, there is a need for model development that includes communication pathways and controls. ACKNOWLEDGEMENTS The work was funded by the DOE-OE Smart Grid R&D Program in the Office of Electricity in the US Department of Energy. R EFERENCES [1] Y. Wang, C. Chen, J. Wang, and R. Baldick, “Research on resilience of power systems under natural disasters; a review,” IEEE Transactions on Power Systems, vol. 31, no. 2, pp. 1604–1613, Mar. 2016. [2] T. Gonen, Electric Power Distribution Engineering. CRC press, 2016. [3] S. Ma, B. Chen, and Z. Wang, “Resilience enhancement strategy for distribution systems under extreme weather events,” IEEE Transactions on Smart Grid, vol. PP, no. 99, pp. 1–1, 2016. [4] D. T. Ton and W. P. Wang, “A more resilient grid: The US department of energy joins with stakeholders in an R&D plan,” IEEE Power and Energy Magazine, vol. 13, no. 3, pp. 26–34, 2015. [5] M. Shahidehpour, x. liu, Z. Li, and Y. Cao, “Microgrids for enhancing the power grid resilience in extreme conditions,” IEEE Transactions on Smart Grid, vol. PP, no. 99, pp. 1–1, 2016. [6] R. Arghandeh, M. Brown, A. D. Rosso, G. Ghatikar, E. Stewart, A. Vojdani, and A. v. Meier, “The local team: leveraging distributed resources to improve resilience,” IEEE Power and Energy Magazine, vol. 12, no. 5, pp. 76–83, Sep. 2014. [7] M. Panteli and P. Mancarella, “The grid: stronger, bigger, smarter?: Presenting a conceptual framework of power system resilience,” IEEE Power and Energy Magazine, vol. 13, no. 3, pp. 58–66, May 2015. [8] C. Abbey, D. Cornforth, N. Hatziargyriou, K. Hirose, A. Kwasinski, E. Kyriakides, G. Platt, L. Reyes, and S. Suryanarayanan, “Powering through the storm: microgrids operation for more efficient disaster recovery,” IEEE Power and Energy Magazine, vol. 12, no. 3, pp. 67–76, May 2014. [9] S. Bahramirad, A. Khodaei, J. Svachula, and J. R. Aguero, “Building resilient integrated grids: one neighborhood at a time.” IEEE Electrification Magazine, vol. 3, no. 1, pp. 48–55, Mar. 2015. [10] A. Gholami, F. Aminifar, and M. Shahidehpour, “Front lines against the darkness: enhancing the resilience of the electricity grid through microgrid facilities,” IEEE Electrification Magazine, vol. 4, no. 1, pp. 18–24, Mar. 2016. [11] C. Chen, J. Wang, F. Qiu, and D. Zhao, “Resilient distribution system by microgrids formation after natural disasters,” IEEE Transactions on Smart Grid, vol. 7, no. 2, pp. 958–966, Mar. 2016. [12] H. Gao, Y. Chen, Y. Xu, and C. C. Liu, “Resilience-oriented critical load restoration using microgrids in distribution systems,” IEEE Transactions on Smart Grid, vol. PP, no. 99, pp. 1–1, 2016. [13] L. Che, M. Shahidehpour, A. Alabdulwahab, and Y. Al-Turki, “Hierarchical coordination of a community microgrid with ac and dc microgrids,” IEEE Transactions on Smart Grid, vol. 6, no. 6, pp. 3042– 3051, Nov. 2015. [14] E. Yamangil, R. Bent, and S. Backhaus, “Resilient upgrade of electrical distribution grids,” in Proceedings of the Association for the Advancement of Artificial Intelligence, 2015, pp. 1233–1240. [15] H. Nagarajan, E. Yamangil, R. Bent, P. V. Hentenryck, and S. Backhaus, “Optimal resilient transmission grid design,” in 2016 Power Systems Computation Conference (PSCC), Jun. 2016, pp. 1–7. [16] L. G. Valiant, “The complexity of enumeration and reliability problems,” SIAM Journal on Computing, vol. 8, no. 3, pp. 410–421, 1979. [17] R. A. Jabr, “Polyhedral formulations and loop elimination constraints for distribution network expansion planning,” IEEE Transactions on Power Systems, vol. 28, no. 2, pp. 1888–1897, 2013. [18] H. Nagarajan, S. Rathinam, and S. Darbha, “On maximizing algebraic connectivity of networks for various engineering applications,” in European Control Conference. IEEE, 2015, pp. 1626–1632. [19] M. E. Baran and F. F. Wu, “Optimal capacitor placement on radial distribution systems,” IEEE Transactions on power Delivery, vol. 4, no. 1, pp. 725–734, 1989. [20] E. Dall’Anese, H. Zhu, and G. B. Giannakis, “Distributed optimal power flow for smart microgrids,” IEEE Transactions on Smart Grid, vol. 4, no. 3, pp. 1464–1475, Sep. 2013. [21] L. Gan and S. H. Low, “Convex relaxations and linear approximation for optimal power flow in multiphase radial networks,” in Power Systems Computation Conference (PSCC), 2014. IEEE, 2014, pp. 1–9. [22] M. D. Sankur, R. Dobbe, E. Stewart, D. S. Callaway, and D. B. Arnold, “A linearized power flow model for optimization in unbalanced distribution systems,” arXiv preprint arXiv:1606.04492, 2016. [23] R. C. Dugan and T. E. McDermott, “An open source platform for collaborating on smart grid research,” in Power and Energy Society General Meeting. IEEE, 2011, pp. 1–7. [24] C. Yuan, M. S. Illindala, and A. S. Khalsa, “Modified viterbi algorithm based distribution system restoration strategy for grid resiliency,” IEEE Trans. on Power Delivery, vol. 32, no. 1, pp. 310–319, Feb. 2017. [25] T. Ding, Y. Lin, G. Li, and Z. Bie, “A new model for resilient distribution systems by microgrids formation,” IEEE Transactions on Power Systems, vol. PP, no. 99, pp. 1–1, 2017. [26] W. Yuan, J. Wang, F. Qiu, C. Chen, C. Kang, and B. Zeng, “Robust optimization-based resilient distribution network planning against natural disasters,” IEEE Transactions on Smart Grid, vol. PP, no. 99, pp. 1–10, 2016. [27] Y. Sa, “Reliability analysis of electric distribution lines,” Master’s thesis, McGill University, Montreal, Canada, Jul. 2002. [Online]. Available: http://digitool.library.mcgill.ca/R/?func= dbin-jump-full&object id=29546&local base=GEN01-MCG02 [28] S. S. J. Kurtz, G. Saur and C. Ainscough, “Utilization of underground and overhead power lines in the city of new york,” Office of Long-Term Planning and Sustainability, Office of the Mayor, City of New York, Tech. Rep. NREL/TP-5400-60732, Dec. 2013. [29] C. M. Theodore V. Morrison and M. C. Christie, “Placement of utility distribution lines underground,” Governor and General Assembly of Virginia, Tech. Rep. House Document No. 30, Jan. 2005. [30] S. S. J. Kurtz, G. Saur and C. Ainscough, “Backup power cost of ownership analysis and incumbent technology comparison,” National Renewable Energy Lab, Tech. Rep. NREL/TP-5400-60732, Sep. 2014. [31] Y. Sa, “Reliability analysis of electric distribution lines,” Master’s thesis, McGill University, 2002. [32] W. Yuan, L. Zhao, and B. Zeng, “Optimal power grid protection through a defender–attacker–defender model,” Reliability Engineering & System Safety, vol. 121, pp. 83–89, 2014. [33] J. Lazić, S. Hanafi, N. Mladenović, and D. Urošević, “Variable neighbourhood decomposition search for 0–1 mixed integer programs,” Computers & Operations Research, vol. 37, no. 6, pp. 1055–1067, 2010.
5cs.CE
Logical Methods in Computer Science Vol. 8 (1:09) 2012, pp. 1–47 www.lmcs-online.org Submitted Published Dec. 1, 2009 Feb. 23, 2012 SEMANTICS AND ALGORITHMS FOR PARAMETRIC MONITORING ∗ GRIGORE ROŞU a AND FENG CHEN b a,b Department of Computer Science, University of Illinois at Urbana-Champaign e-mail address: [email protected] Abstract. Analysis of execution traces plays a fundamental role in many program analysis approaches, such as runtime verification, testing, monitoring, and specification mining. Execution traces are frequently parametric, i.e., they contain events with parameter bindings. Each parametric trace usually consists of many meaningful trace slices merged together, each slice corresponding to one parameter binding. For example, a Java program creating iterator objects i1 and i2 over collection object c1 may yield a trace createIterhc1 i1i nexthi1i createIterhc1 i2i updateCollhc1i nexthi1i parametric in collection c and iterator i, whose slices corresponding to instances “c, i 7→ c1 , i1 ” and “c, i 7→ c1 , i2 ” are createIterhc1 i1 i nexthi1 i updateCollhc1 i nexthi1 i and, respectively, createIterhc1 i2 i updateCollhc1 i. Several approaches have been proposed to specify and dynamically analyze parametric properties, but they have limitations: some in the specification formalism, others in the type of trace they support. Not unexpectedly, the existing approaches share common notions, intuitions, and even techniques and algorithms, suggesting that a fundamental study and understanding of parametric trace analysis is necessary. This foundational paper aims at giving a semantics-based solution to parametric trace analysis that is unrestricted by the type of parametric property or trace that can be analyzed. Our approach is based on a rigorous understanding of what a parametric trace/property/monitor is and how it relates to its non-parametric counter-part. A generalpurpose parametric trace slicing technique is introduced, which takes each event in the parametric trace and dispatches it to its corresponding trace slices. This parametric trace slicing technique can be used in combination with any conventional, non-parametric trace analysis technique, by applying the later on each trace slice. As an instance, a parametric property monitoring technique is then presented, which processes each trace slice online. Thanks to the generality of parametric trace slicing, the parametric property monitoring technique reduces to encapsulating and indexing unrestricted and well-understood nonparametric property monitors (e.g., finite or push-down automata). The presented parametric trace slicing and monitoring techniques have been implemented and extensively evaluated. Measurements of runtime overhead confirm that the generality of the discussed techniques does not come at a performance expense when compared with existing parametric trace monitoring systems. 1998 ACM Subject Classification: D.1.5, D.2.1, D.2.4, D.2.5, D.3.1, F.3.1, F.3.2 . Key words and phrases: runtime verification, monitoring, trace slicing. ∗ A preliminary version of this paper was published as a 2008 technical report [30], and an extended abstract was presented at TACAS 2009 and published in its conference proceedings [16]. a Supported in part by NSF grants CCF-0448501, CNS-0509321, CNS-0720512 and CCF-0916893, and by NASA contract NNL08AA23C.. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-8 (1:09) 2012 CC G. Roşu and F. Chen Creative Commons 2 G. ROŞU AND F. CHEN start hasnext() unknown hasnext() == true == false more next() none hasnext() hasnext() next() next() error Figure 1: Typestate property describing the correct use of the next() and hasnext() methods. 1. Introduction and Motivation Parametric traces, i.e., traces containing events with parameter bindings, abound in program executions, because they naturally appear whenever abstract parameters (e.g., variable names) are bound to concrete data (e.g., heap objects) at runtime. In this section we first discuss some motivating examples and describe the problem addressed in this paper, then we recall related work and put the work in this paper in context, and then we explain our contributions and finally the structure of the paper. 1.1. Motivating examples and highlights. We here describe three examples of parametric properties, in increasing difficulty order, and use them to highlight and motivate the semantic results and the algorithms presented in the rest of the paper. Typestates [34] refine the notion of type by stating not only what operations are allowed by a particular object, but also what operations are allowed in what contexts. Typestates are particular parametric properties with only one parameter. Figure 1 shows the typestate description for a property saying that it is invalid to call the next() method on an iterator object when there are no more elements in the underlying collection, i.e., when hasnext() returns false, or when it is unknown if there are more elements in the collection, i.e., hasnext() is not called. From the unknown state, it is always an error to call the next() method because such an operation could be unsafe. If hasnext() is called and returns true, it is safe to call next(), so the typestate enters the more state. If, however, the hasnext() method returns false, there are no more elements, and the typestate enters the none state. In the more and none states, calling the hasnext() method provides no new information. It is safe to call next() from the more state, but it becomes unknown if more elements exist, so the typestate reenters the initial unknown state. Finally, calling next() from the none state results in an error. For simplicity, we here assume that next() is the only means to modify the state of an iterator; concurrent modifications are discussed in other examples shortly. It is straightforward to represent the typestate property in Figure 1, and all typestate properties, as particular (one-parameter) parametric properties. Indeed, the behaviors described by the typestate in Figure 1 are intended to be obeyed by all iterator object instances; that is, we have a property parametric in the iterator. To make this more precise, PARAMETRIC MONITORING 3 let us look at the problem from the perspective of observable program execution traces. A trace can be regarded as a sequence of events relevant to the property of interest, in our case calls to next() or to hasnext(); the latter can be further split into two categories, one when hasnext() returns true and the other when it returns false. Since the individuality of each iterator matters, we must regard each event as being parametric in the iterator yielding it. Formally, traces relevant to our typestate property are formed with three parametric events, namely nexthii, hasnexttruehii, and hasnextfalsehii. A possible trace can be hasnexttruehi1i hasnextfalsehi2i nexthi1 i nexthi2 i..., which violates the typestate property for iterator instance i2 . How to obtain execution traces is not our concern here (several runtime monitoring systems use AspectJ instrumentation). Our results in this paper are concerned with how to specify properties over parametric traces, what is their meaning, and how to monitor them. Let us first briefly discuss our approach to specifying properties over parametric execution traces, that is, parametric properties. To keep it as easy as possible for the user and to leverage our knowledge on specifying ordinary, non-parametric properties, we build our specification approach on top of any formalism for specifying non-parametric properties. More precisely, all one has to do is to first specify the property using any conventional formalism as if there were only one possible instance of its parameters, and then use a special Λ quantifier to make it parametric. For our typestate example, suppose that typestate is the finite state machine in Figure 1, modified by replacing the method calls on edges with actual events as described above. Then the desired parametric property is Λi . typestate. The meaning of this parametric property is that whatever was intended for its non-parametric counterpart, typestate, must hold for each parameter instance; that is, the error state must not be reached for any iterator instance, which is precisely the desired meaning of this typestate. Another way to specify the same property is using a regular expression matching all the good behaviors, each bad prefix for any instance thus signaling a violation: Λi . (hasnexttruehii+ nexthii | hasnextfalsehii∗ )∗ Yet another way to specify its non-parametric part is with a linear-temporal logic formula: Λi . (nexthii =⇒ ◦· hasnexttruehii) The above LTL formula says “it is always () the case that each nexthii event is preceded (◦· ) by a hasnexttruehii. The LTL formula must hold for any iterator instance. In general, if ΛX . P is a parametric property, where X is a set of one or more parameters, we may call P its corresponding base or root or non-parametric property. In this paper we develop a mathematical foundation for specifying such parametric properties independently of the formalism used for specifying their non-parametric part, define their precise semantics, provide algorithms for online monitoring of parametric properties, and finally bring empirical evidence showing that monitoring parametric properties is in fact feasible. Parametric properties properly generalize typestates in two different directions. First, parametric properties allow more than one parameter, allowing us to specify not only properties about a given object such as the typestate example above, but also properties that capture relationships between objects. Second, they allow us to specify infinite-state root properties using formalisms like context-free grammars (see Sections 2.4, 2.5 and 2.6). Let us now consider a two-parameter property. Suppose that one is interested in analyzing collections and iterators in Java. Then execution traces of interest may contain events createIterhc ii (iterator i is created for collections c), updateCollhci (c is modified), and nexthii (i is accessed using its next element method), instantiated for particular collection 4 G. ROŞU AND F. CHEN and iterator instances. Most properties of parametric traces are also parametric; for our example, a property may be “collections are not allowed to change while accessed through iterators”, which is parametric in a collection and an iterator. The parametric property above expressed as a regular expression (here matches mean violations) can be Λc, i . createIterhc ii nexthii∗ updateCollhci+ nexthii From here on, when we know the number and types of parameters of each event, we omit writing them in parametric properties, because they are redundant; for example, we write Λc, i . createIter next∗ updateColl+ next Parametric properties, unfortunately, are very hard to formally verify and validate against real systems, mainly because of their dynamic nature and potentially huge or even unlimited number of parameter bindings. Let us extend the above example: in Java, one may create a collection from a map and use the collection’s iterator to operate on the map’s elements. A similar safety property is: “maps are not allowed to change while accessed indirectly through iterators”. Its violation pattern is: Λm, c, i . createColl (updateMap | updateColl)∗ createIter next∗ (updateMap | updateColl)+ next with two new parametric events createCollhm ci (collection c is created from map m) and updateMaphmi (m is updated). All the events used in this property provide only partial parameter bindings (createColl binds only m and c, etc.), and parameter bindings carried by different events may be combined into larger bindings; e.g., createCollhm1 c1 i can be combined with createIterhc1 i1 i into a full binding hm1 c1 i1 i, and also with createIterhc1 i2 i into hm1 c1 i2 i. It is highly challenging for a trace analysis technique to correctly and efficiently maintain, locate and combine trace slices for different parameter bindings, especially when the trace is long and the number of parameter bindings is large. This paper addresses the problem of parametric trace analysis from a foundational, semantic perspective: Given a parametric trace τ and a parametric property ΛX . P , what does it mean for τ to be a good or a bad trace for ΛX . P ? How can we show it? How can we leverage, to the parametric case, our knowledge and techniques to analyze conventional, non-parametric traces against conventional, nonparametric properties? In this paper we first formulate and then rigorously answer and empirically validate our answer to these questions, in the context of runtime verification. In doing so, a technique for trace slicing is also presented and shown correct, which we regard as one of the central results in parametric trace analysis. In short, our overall approach to monitor a parametric property ΛX . P is to observe the parametric trace as it is being generated by the running system, slice it online with respect to the used parameter instances, and then send each slice piece-wise to a non-parametric monitor corresponding to the base property P ; this way, multiple monitor instances for P can and typically do coexist, one for each trace slice. The main conceptual limitation of our approach is that the parametrization of properties is only allowed at the top-level, that is, the base property P in the parametric property ΛX . P cannot have any Λ binders. In other words, we do not consider nested parameters. To allow nested parameters one needs a syntax for properties, so that one can incorporate the syntax for parameters within the syntax for properties. However, one of our major goals is to be formalism-independent, which means that, by the nature of the problem that we PARAMETRIC MONITORING 5 are attempting to solve, we can only parameterize properties at the top. Many runtime verification approaches deliberately accept the same limitation, as discussed below, because arbitrarily nested parameters are harder to understand and turn out to generate higher runtime overhead in the systems supporting them. Our concrete contributions are explained after the related work. 1.2. Related Work. We here discuss several major approaches that have been proposed so far to specify and monitor parametric properties, and relate them to our subsequent results in this paper. It is worth mentioning upfront that, except for the MOP approach [28] which motivated and inspired the work in this paper, the existing approaches do not follow the general methodology proposed by our approach in this paper. More precisely, they employ a monolithic monitoring approach, where one monitor is associated to each parametric property; the monitor receives and handles each parametric event in a formalism-specific way. In contrast, our approach is to generate multiple local monitors, each keeping track of one parameter instance. Our approach leads not only to a lower runtime overhead as empirically shown in Section 9, but it also allows us to separate concerns (i.e., the parameter handling from the specification formalism and monitor synthesis for the basic property) and thus potentially enabling a broader spectrum of optimizations that work for various different property specification formalisms and corresponding monitors. Tracematches [1, 4] is an extension of AspectJ [2] supporting parametric regular patterns; when patterns are matched during the execution, user-defined advice can be triggered. J-LO [9] is a variation of Tracematches that supports a first-order extension variant of linear temporal logic (LTL) that supports data parametrization by means of quantifiers [33]; the user-provided actions are executed when the LTL properties are violated. Also based on AspectJ, [24] proposes Live Sequence Charts (LSC) [17] as an inter-object scenario-based specification formalism; LSC is implicitly parametric, requiring parameter bindings at runtime. Tracematches, J-LO and LSC [24] support a limited number of parameters, and each has its own approach to handle parameters, specific to its particular specification formalism. Our semantics-based approach in this paper is generic in the specification formalism and admits, in theory, a potentially unlimited number of parameters. In spite of the generality of our theoretical results, we chose in our current implementations (see Section 9) to also support only a bounded number of parameters, like in the aforementioned approaches. JavaMOP [28, 14] (http://javamop.org) is a parametric specification and monitoring system that is generic in the specification formalism for base properties, each formalism being included as a logic plugin. Monitoring code is generated from parametric specifications and woven within the original Java program, also using AspectJ, but using a different approach that allows it to encapsulate monitors for non-parametric properties as blackboxes. Until recently, JavaMOP’s genericity came at a price: it could only monitor execution traces in which the first event in each slice instantiated all the property parameters. This limitation prevented the JavaMOP system presented in [14] from monitoring some basic parametric properties, including ones discussed in this paper. Our novel approach to parametric trace slicing and monitoring discussed in this paper does not have that limitation anymore. The parametric slicing and monitoring technique discussed in this paper has been incorporated both in JavaMOP [28] and in its commercial-grade successor RV [27], together with several optimizations that we do not discuss here; Section 9 discusses experiments done with both these systems, as well as with Tracematches, for comparison, because Tracematches has proven to be the most efficient runtime verification system besides JavaMOP. 6 G. ROŞU AND F. CHEN Program Query Language (PQL) [25] allows the specification and monitoring of parametric context-free grammar (CFG) patterns. Unlike the approaches above that only allow a bounded number of property parameters, PQL can associate parameters with sub-patterns that can be recursively matched at runtime, yielding a potentially unbounded number of parameters. PQL’s approach to parametric monitoring is specific to its particular CFGbased specification formalism. Also, PQL’s design does not support arbitrary execution traces. For example, field updates and method begins are not observable; to circumvent the latter, PQL allows for observing traces local to method calls. Like PQL, our technique also allows an unlimited number of parameters (but as mentioned above, our current implementation supports only a bounded number of parameters). Unlike PQL, our semantics and techniques are not limited to particular events, and are generic in the property specification formalism; CFGs are just one such possible formalism. Eagle [5], RuleR [6], and Program Trace Query Language (PTQL) [19] are very general trace specification and monitoring systems, whose specification formalisms allow complex properties with parameter bindings anywhere in the specification (not only at the beginning, like we do). Eagle and RuleR are based on fixed-point logics and rewrite rules, while PTQL is based on SQL relational queries. These systems tackle a different aspect of generality than we do: they attempt to define general specification formalisms supporting data binding among many other features, while we attempt to define a general parameterization approach that is logic-independent. As discussed in [4, 26, 14] (Eagle and PQL cases), the very general specification formalisms tend to be slower; this is not surprising, as the more general the formalism the less the potential for optimizations. Our techniques can be used as an optimization for certain common types of properties expressible in these systems: use any of these to specify the base property P , then use our generic techniques to analyze ΛX . P . 1.3. Contributions. Besides proposing a formal semantics to parametric traces, properties, and monitoring, we make two theoretical contributions and discuss implementations that validate them empirically: (1) Our first result is a general-purpose online parametric trace slicing algorithm (algorithm AhXi in Section 6) together with its proof of correctness (Theorem 1), positively answering the following question: given a parametric execution trace, can one effectively find the slices corresponding to each parameter instance without having to traverse the trace for each instance? (2) Our second result, building upon the slicing algorithm, is an online monitoring technique (algorithms BhXi and ChXi in Section 8) together with its proof of correctness (Theorems 2 and 3), which positively answers the following question: is it possible to monitor arbitrary parametric properties ΛX . P against parametric traces, provided that the root property P is monitorable using conventional monitors? (3) Finally, our implementation of these techniques in the JavaMOP and RV systems positively answers the following question: can we implement general purpose and unrestricted parametric property monitoring tools which are comparable in performance with or even outperform existing parametric property monitoring tools on the restricted types of properties and/or traces that the latter support? Preliminary results reported in this paper have been published in a less polished form as a technical report in summer 2008 [30]. Then a shorter, conference paper was presented at TACAS 2009 in York, U.K. [16]. This extended paper differs from [16] as follows: PARAMETRIC MONITORING 7 (1) It defines all the mathematical infrastructure needed to prove the results claimed in [16]. For example, Section 3 is new. (2) It expands the results in [16] and includes all their proofs, as well as additional results needed for those proofs. For example, Section 5 is new. (3) It discusses more examples of parametric properties. For example, Section 2 is new. (4) The implementation section in [16] presented an incipient implementation of our technique in a prototype system called PMon there (from Parametric Monitoring). In the meanwhile, we have implemented the technique described in this paper as an integral part of the runtime verification systems JavaMOP (http://javamop.org) and RV [27]. The implementation section (Section9) now refers to these systems. 1.4. Paper Structure. Section 2 discusses examples of parametric properties. Section 3 provides the mathematical background needed to formalize the concepts introduced later in the paper. Section 4 formalizes parametric events, traces and properties, and defines trace slicing. Section 5 establishes a tight connection between the parameter instances in a trace and the parameter instance used for slicing. Sections 6, 7 and 8 discuss our main techniques for parametric trace slicing and monitoring, and prove them correct. Section 9 discusses implementations of these techniques in two related systems, JavaMOP and RV. Section 10 concludes and proposes future work. 2. Examples of Parametric Properties In this section we discuss several examples of parametric properties. Our purpose here is twofold. On the one hand we give the reader additional intuition and motivation for the subsequent semantics and algorithms, and, on the other hand, we justify the generality of our approach with respect to the employed specification formalism for trace properties. The discussed examples of parametric properties are defined using various trace specification formalisms, some with more than one parameter and some with more than validating and/or violating categories of behaviors. For each of the examples, we give hints on how our subsequent techniques in Sections 6 and 8 work. In order to explain the examples in this section we also informally introduce necessary notions, such as events and traces (both parametric and non-parametric); all these notions will be formally defined in Section 4. For each example, we also discuss which of the existing runtime verification systems can support it. Note that JavaMOP [28] and its commercial-grade successor RV [27], which build upon the trace slicing and monitoring techniques presented in this paper, are the only runtime verification systems that support all the parametric properties discussed below. 2.1. Releasing acquired resources. Consider a certain type of resource (e.g., synchronization objects) that can be acquired and released by a given procedure, and suppose that we want the resources of this type to always be explicitly released by the procedure whenever acquired and only then. This example will be broken in subparts and used as a running example in Section 4 to introduce our main notions and notations. Let us first consider the non-parametric case in which we have only one resource. Supposing that the four events of interest, i.e., the begin/end of the procedure and the acquire/release of the resource, are E = {begin, end, acquire, release}, then the following regular 8 G. ROŞU AND F. CHEN pattern P captures the desired behavior requirements: P = (begin(ǫ | (acquire(acquire | release)∗ release))end)∗ The above regular pattern states that the procedure can take place multiple times and, if the resource is acquired then it is released by the end of the procedure (ǫ is the empty word). For simplicity, we here assume that the procedure is not recursive and that the resource can be acquired and released multiple times, with the effect of acquiring and respectively releasing it precisely once; Section 2.4 shows how to use a context-free pattern to specify possibly recursive procedures with matched acquire/release events within each procedure invocation. One matching execution trace for this property is, e.g., begin acquire acquire release end begin end. Let us now consider the parametric case in which we may have more than one resource and we want each of them to obey the requirements specified above. Now the events acquire and release are parametric in the resource being acquired or released, that is, they have the form acquirehr1 i, releasehr2 i, etc. The begin/end events take no parameters, so we write them beginhi and endhi. A parametric trace τ for our running example can be the following: τ = beginhi acquirehr1 i acquirehr2 i acquirehr1 i releasehr1 i endhi beginhi acquirehr2 i releasehr2 i endhi This trace involves two resources, r1 and r2 , and it really consists of two trace slices merged together, one for each resource: hr1 i : begin acquire acquire release end begin end hr2 i : begin acquire end begin acquire release end The begin and end events belong to both trace slices. Since we know the parameter instance for each trace slice and we know the types of parameters for each event, to avoid clutter we do not mention the redundant parameter bindings of events in trace slices. Our trace slicing algorithm discussed in Section 6 processes the parametric trace only once, traversing it from the first parametric event to the last, incrementally calculating a collection of meaningful trace slices so that it can quickly identify and report the slice corresponding to any parameter instance when requested. Note that the hr1 i trace slice matches the specification P above, while the hr2 i trace slice does not. To distinguish parametric properties referring to multiple trace slices from ordinary properties, we explicitly list the parameters using a special Λ binder. For example, our property above parametric in the resource r is Λr . P , or Λr . (begin (ǫ | (acquire (acquire | release)∗ release)) end)∗ Both Tracematches [1, 4] and JavaMOP [28] can specify/monitor such parametric regular properties, the latter using its extended-regular expression (ERE) plugin. For the sake of a terminology, P is called a non-parametric, or a root, or a basic property, in contrast to Λr . P , which is called a parametric property. As detailed in Section 4, parametric properties are functions taking a parametric trace (e.g., τ ) and a parameter instance (e.g., r 7→ r1 or r 7→ r2 ) into a verdict category for the basic property P (e.g., match or fail). In our case, the semantics of our parametric property Λr . P takes parametric trace τ and parameter instance r 7→ r1 to match, and takes τ and r 7→ r2 to fail, that is, (Λr . P )(τ )(r → 7 r1 ) = match (Λr . P )(τ )(r → 7 r2 ) = fail Our parametric monitoring algorithm in Section 8 reports a fail for instance r 7→ r2 precisely when the first end event is encountered. PARAMETRIC MONITORING 9 We would like to make two observations at this stage. First, as we already mentioned, we only parameterize a property at the top, that is, the Λ binder cannot be used inside the basic property. Indeed, since we do not enforce any particular syntax for basic properties, it is not clear how to mix the Λ binder with the inexistent property constructs. Second, one should not confuse our parameters with universally quantified variables. While in our example above Λ may feel like a universal quantifier, note that one may prefer to specify the same parametric property in a more negative fashion, for example to specify the bad behaviors instead of the positive ones. Relying on the fact that the begin and end events must be correctly matched, one can only state the bad patterns, which are a begin followed by a release and an acquire followed by an end: Λr . (E ∗ (begin release | acquire end) E ∗ ) The right way to regard a parametric property is as one indexed by all possible instances of the parameters, each instance having its own interpretation of the trace (only caring of the events relevant to it), which is orthogonal to the other instances’ interpretations. 2.2. Authenticate before use. Consider a server authenticating and using keys, say k1 , k2 , k3 , etc., whose execution traces contain events authenticatehk1 i, usehk2 i, etc. A possible trace of such a system can be τ = authenticatehk1 i authenticatehk3 i usehk3 i usehk2 i authenticatehk2 i usehk1 i usehk2 i usehk3 i A parametric property for such a system can be “each key must be authenticated before use”, which, using linear temporal logic (LTL) as a specification formalism for the corresponding base property, can be expressed as Λk . (use → ⋄· authenticate) Such parametric LTL properties can be expressed in both J-LO [9] and JavaMOP [28, 14] (the later using its LTL logic plugin). For the trace above, the trace slice corresponding to k3 is authenticate use use corresponding to the parametric subtrace authenticatehk3 i usehk3 i usehk3 i of events relevant to k3 in τ , but keeping only the base events; also, the trace slice corresponding to k2 is use authenticate use. Our trace slicing algorithmin Section 6 can detect these slices. Moreover, with the finite trace LTL semantics in [32], (Λk . (use → ⋄· authenticate))(τ )(k 7→ k3 ) = true (Λk . (use → ⋄· authenticate))(τ )(k 7→ k2 ) = false Our parametric monitoring algorithm in Section 8 reports a violation for instance k 7→ k2 precisely when the first usehk2 i is encountered. 2.3. Safe iterators. Consider the following property for iterators created over vectors: when an iterator is created for a vector, one is not allowed to modify the vector while its elements are traversed using the iterator. The JVM usually throws a runtime exception when this occurs, but the exception is not guaranteed in a multi-threaded environment. Supposing that parametric event createhv ii is generated when iterator i is created for vector v, updatehvi is generated when v is modified, and nexthii is generated when i is accessed using its “next element” interface, then one can write it as the parametric regular property Λv, i . create next∗ update+ next. 10 G. ROŞU AND F. CHEN Such parametric regular expression properties can be expressed in both Tracematches [1] and JavaMOP [28, 14] (the latter using its ERE plugin). We here assumed that the matching of the regular expression corresponds to violation of the base property. Thus, the parametric property is violated by a given trace and a given parameter instance whenever the regular pattern above is matched by the corresponding trace slice. For example, if τ = createhv1 i1 i nexthi1 i createhv1 i2 i updatehv1 i nexthi1 i is a parametric trace where two iterators are created for a vector, then the slice corresponding to hv1 i1 i is create next update next and the one corresponding to hv1 i2 i is create update, so τ violates the parametric property (i.e., matches the regular pattern above) on instance hv1 i1 i, but not on instance hv1 i2 i. Note that in this example there are more than one parameters in events, traces and property, namely a vector and an iterator. Indeed, the main difficulty of our techniques in Sections 6 and 8 was precisely to handle general purpose parametric properties with an arbitrary number of parameters. The slicing algorithm in Section 6 processes parametric traces and maintains enough slicing information so that, when asked to produce slices corresponding to particular parameter instances, e.g., to hv1 i2 i, it can do so without any further analysis of the trace. Also, in this case, the monitoring algorithm in Section 8 reports a match each time a parameter instance yields a matching trace slice. 2.4. Correct locking. Consider a custom implementation of synchronization in which one can acquire and release locks manually (like in Java 5 and later versions). A basic property is that each function releases each lock as many times as it acquires it. Assuming that the executing code is always inside some function (like in Java, C, etc.), that beginhi and endhi events are generated whenever function executions are started and terminated, respectively, and that acquirehli and releasehli events are generated whenever lock l is acquired or released, respectively, then one can specify this safety property using the following parametric context-free grammar (CFG) pattern: Λl . S → S begin S end | S acquire S release | ǫ Such parametric CFG properties can be expressed in both PQL [25] and JavaMOP [28, 26] (the later using its CFG plugin). We here borrow the CFG property semantics of the CFG plugin of JavaMOP (and also RV [27]) in [26], that is, this parametric property is violated by a parametric execution with a given parameter instance (i.e., concrete lock) whenever the corresponding trace slice cannot be completed into one accepted by the grammar language. While this property can be expressed in JavaMOP and even monitored in its non-parametric form, the previous implementation of JavaMOP in [26] cannot monitor it as a parametric property because its violating traces most likely start with a property-relevant beginhi event, which does not contain a lock parameter; therefore, the previous limitation of JavaMOP (allowing only events that instantiate all property’s parameters to create a monitor instance) did not allow us to monitor this natural CFG property. To circumvent this limitation, [26] proposed a different way to specify this property, in which the violating traces started with an acquirehli event. We do not need such artificial encodings anymore in the new version of JavaMOP, and they were never needed in RV (RV improves the new JavaMOP). For profiling reasons, one may also want to take notice of validations, or matches of the property, as well as matches followed by violation, etc.; one can therefore have different interpretations of CFG patterns as base properties, classifying traces into various categories. What is different in this example, compared to the previous ones, is that the non-parametric property cannot be implemented as a finite state machine. With the CFG monitoring PARAMETRIC MONITORING 11 algorithm proposed in [26] used to monitor the base property, our parametric monitoring algorithm in Section 8 reports a violation of this parametric CFG property as soon as a parameter instance is detected for which the corresponding trace slice has no future, that is, it admits no continuation into a trace in the language of the grammar. 2.5. Safe resource use by safe client. A client can use a resource only within a given procedure and, when that happens, both the client and the resource must have been previously authenticated as part of that procedure. Assuming the procedure fixed and given, this is a property over traces with five types of events: begin and end of the procedure (beginhi and endhi), authenticate of client (auth-clienthci) or of resource (auth-resourcehri), and use of resource by client (usehr ci). Using the past time linear temporal logic with calls and returns (ptCaRet) in [31], one would write it as follows: Λr, c . use → ((⋄· begin) ∧ ¬((¬auth-client) S begin) ∧ ¬((¬auth-resource) S begin)) The overlined operators are abstract variants of temporal operators, in the sense that they are defined on traces that collapse terminated procedure calls (erase subtraces bounded by matched begin/end events). For example, “⋄· begin” holds only within a procedure call, because all the nested and terminated procedure calls are abstracted away. In words, the above says: if one sees the use of the resource (use) then that must take place within the procedure and it is not the case that one did not see, within the main procedure since its latest invocation, the authentication of the client or the authentication of the resource. JavaMOP can express this property using its ptCaRet logic plugin [31]. However, until recently [28], JavaMOP could again only monitor it in its non-parametric form, because of its previous limitation allowing only completely parameterized events to create monitors. Even though it may appear that this property can only be violated when a completely parameterized usehr ci event is observed, in fact, the monitor must already exist at that point in the execution and “know” whether the client and the resource have authenticated since the begin of the current procedure; all the other events involved in the property are incompletely parameterized, so, unfortunately, this parametric property could not be monitored using the previous JavaMOP system, but it can be monitored with the new one. 2.6. Success ratio. Consider now parametric traces with events successhai and failhai, saying whether a certain action a was successful or not. For a given action, a meaningful property can classify its (non-parametric) traces into an infinite number of categories, each representing a success ratio of the given action, which is a (rational) number s/t between 0 and 1, where s is the number of success events in the trace and t is the total number of events in the trace. Then the corresponding parametric property over such parametric traces gives a success ratio for each action. We can specify such a property in JavaMOP and RV by making use of monitor variables and event actions [28]. Indeed, one can add two monitor variables, s and t, and then increment t in each event action and increment s only in the event action of the success event. The underlying parametric monitoring algorithm keeps separation between the various s and t monitor variables, one such pair for each distinct action a, guaranteeing that the correct ones will be accessed. 12 G. ROŞU AND F. CHEN 3. Mathematical Background: Partial Functions, Least Upper Bounds (lubs) and lub Closures In this section we first discuss some basic notions of partial functions and least upper bounds of them, then we introduce least upper bounds of sets of partial functions and least upper bound closures of sets of partial functions. This section is rather mathematical. We need these mathematical notions because it turns out that parameter instances are partial maps from the domain of parameters to the domain of parameter values. As shown later, whenever a new parametric event is observed, it needs to be dispatched to the interested parts (trace slices or monitors), and those parts updated accordingly: these informal operations can be rigorously formalized as existence of least upper bounds and least upper bound closures over parameter instances, i.e., partial functions. We recommend the reader who is only interested in our algorithms but not in the details of our subsequent proofs, to read the first two definitions and then jump to Section 4, returning to this section for more mathematical background only when needed. 3.1. Partial Functions. This section discusses partial functions and (least) upper bounds over sets of partial functions. The notions and the results discussed in this section are broadly known, and many of their properties are folklore. They can be found in one shape or another in virtually any book on denotational semantics or domain theory. Since we need only a small subset of notions and results on partial functions and (least) upper bounds in this paper, and since we need to fix a uniform notation anyway, we prefer to define and prove everything we need and hereby also make our paper self-contained. We think of partial functions as “information carriers”: if a partial function θ is defined on an element x of its domain, then “θ carries the information θ(x) about x ∈ X”. Some partial functions can carry more information than others; two or more partial functions can, together, carry compatible information, but can also carry incompatible information (when two or more of them disagree on the information they carry for a particular x ∈ X). Definition 1. We let [X → V ] and [X ⇁ V ] denote the sets of total and of partial functions from X to V , respectively. The domain of θ ∈ [X ⇁ V ] is the set Dom(θ) = {x ∈ X | θ(x) is defined}. Let ⊥ ∈ [X ⇁ V ] be the map undefined everywhere, that is, Dom(⊥) = ∅. If θ, θ ′ ∈ [X ⇁ V ] then: (1) θ and θ ′ are are compatible if and only if θ(x) = θ ′ (x) for any x ∈ Dom(θ) ∩ Dom(θ ′ ); (2) θ is less informative than θ ′ , written θ ⊑ θ ′ , if for any x ∈ X, θ(x) defined implies θ ′ (x) also defined and θ ′ (x) = θ(x); (3) θ is strictly less informative than θ ′ , written θ ⊏ θ ′ , when θ ⊑ θ ′ and θ 6= θ ′ . The relation of compatibility is reflexive and symmetric, but not transitive. When ∈ [X ⇁ V ] are compatible, we let θ ⊔ θ ′ ∈ [X ⇁ V ] denote the partial function whose domain is Dom(θ) ∪ Dom(θ ′ ) and which is defined as θ or θ ′ in each element in its domain. The partial function θ ⊔ θ ′ is called the least upper bound of θ and θ ′ . We define least upper bounds more generally below. Also, note that θ ⊑ θ ′ and, respectively, θ ⊏ θ ′ , iff θ, θ ′ compatible and Dom(θ) ⊆ Dom(θ ′ ) and, respectively, Dom(θ) ⊂ Dom(θ ′ ). θ, θ ′ Definition 2. Given Θ ⊆ [X ⇁ V ] and θ ′ ∈ [X ⇁ V ], (1) θ ′ is an upper bound of Θ iff θ ⊑ θ ′ for any θ ∈ Θ; Θ has upper bounds iff there is a θ ′ which is an upper bound of Θ; PARAMETRIC MONITORING 13 (2) θ ′ is the least upper bound (lub) of Θ iff θ ′ is an upper bound of Θ and θ ′ ⊑ θ ′′ for any other upper bound θ ′′ of Θ; (3) θ ′ is the maximum (max) of Θ iff θ ′ ∈ Θ and θ ′ is a lub of Θ. A set of partial functions has an upper bound iff the partial functions in the set are pairwise compatible, that is, no two of them disagree on the value of any particular element in their domain. Least upper bounds and maximums may not always exist for any Θ ⊆ [X ⇁ V ]; if a lub or a maximum for Θ exists, then it is, of course, unique, because ⊑ is a partial order, so antisymmetric. It is known that ([X ⇁ V ], ⊑, ⊥) is a complete (i.e., any ⊑-chain has a least upper bound) partial order with bottom (i.e., ⊥). Definition 3. Given Θ ⊆ [X ⇁ V ], let ⊔Θ and max Θ be the lub and the max of Θ, respectively, when they exist. When Θ is finite, one may write θ1 ⊔ θ2 ⊔ · · · ⊔ θn instead of ⊔{θ1 , θ2 , . . . , θn }. If Θ has a maximum, then it also has a lub and ⊔Θ = max Θ. Here are several common properties that we use frequently in Sections 3.2 and 3.3 (these sections will present less known results with specific to our particular approach to parametric slicing and monitoring): Proposition 1. The following hold (θ, θ1 , θ2 , θ3 ∈ [X ⇁ V ]): ⊥ ⊔ θ exists and ⊥ ⊔ θ = θ; θ1 ⊔ θ2 exists iff θ2 ⊔ θ1 exists, and, if they exist then θ1 ⊔ θ2 = θ2 ⊔ θ1 ; θ1 ⊔ (θ2 ⊔ θ3 ) exists iff (θ1 ⊔ θ2 ) ⊔ θ3 exists, and if they exist then θ1 ⊔ (θ2 ⊔ θ3 ) = (θ1 ⊔ θ2 ) ⊔ θ3 . Proposition 2. Let Θ ⊆ [X ⇁ V ]. Then (1) Θ has an upper bound iff for any θ1 , θ2 ∈ Θ and x ∈ X, if θ1 (x) and θ2 (x) are defined then θ1 (x) = θ2 (x); (2) If Θ has an upper bound then ⊔Θ exists and, for any x ∈ X,  undefined if θ(x) is undefined for any θ ∈ Θ (⊔Θ)(x) = θ(x) if there is a θ ∈ Θ with θ(x) defined. Proof. Since Θ has an upper bound θ ′ ∈ [X ⇁ V ] iff θ ⊑ θ ′ for any θ ∈ Θ, if θ1 , θ2 ∈ Θ and x ∈ X are such that θ1 (x) and θ2 (x) are defined then θ ′ (x) is also defined and θ1 (x) = θ2 (x) = θ ′ (x). Suppose now that for any θ1 , θ2 ∈ Θ and x ∈ X, if θ1 (x) and θ2 (x) are defined then θ1 (x) = θ2 (x). All we need to show in order to prove both results is that we can find a lub for Θ. Let θ ′ ∈ [X ⇁ V ] be defined as follows: for any x ∈ X, let  undefined if θ(x) is undefined for any θ ∈ Θ ′ θ (x) = θ(x) if there is a θ ∈ Θ with θ(x) defined First, θ ′ above is indeed well-defined, because we assumed that for any θ1 , θ2 ∈ Θ and x ∈ X, if θ1 (x) and θ2 (x) are defined then θ1 (x) = θ2 (x). Second, θ ′ is an upper bound for Θ: indeed, if θ ∈ Θ and x ∈ X such that θ(x) is defined, then θ ′ (x) is also defined and θ ′ (x) = θ(x), that is, θ ⊑ θ ′ for any θ ∈ Θ. Finally, θ ′ is a lub for Θ: if θ ′′ is another upper bound for Θ and θ ′ (x) is defined for some x ∈ X, that is, θ(x) is defined for some θ ∈ Θ and θ ′ (x) = θ(x), then θ ′′ (x) is also defined and θ ′ (x) = θ(x) (as θ ⊑ θ ′′ ), so θ ′ ⊑ θ ′′ . Proposition 3. The following hold: (1) The empty set of partial functions ∅ ⊆ [X ⇁ V ] has upper bounds and ⊔∅ = ⊥; (2) The one-element sets have upper bounds and ⊔{θ} = θ for any θ ∈ [X ⇁ V ]; 14 G. ROŞU AND F. CHEN (3) The bottom “⊥” does not influence the least upper bounds: ⊔({⊥} ∪ Θ) = ⊔Θ for any Θ ⊆ [X ⇁ V ]; (4) If Θ, Θ′ ⊆ [X ⇁ V ] such that ⊔Θ′ exists and for any θ ∈ Θ there is a θ ′ ∈ Θ′ with θ ⊑ θ ′ , then ⊔Θ exists and ⊔Θ ⊑ ⊔Θ′ ; for example, if ⊔Θ′ exists and Θ ⊆ Θ′ then ⊔Θ exists and ⊔Θ ⊑ ⊔Θ′ ; (5) Let {Θi }i∈I be a family of sets of partial functions with Θi ⊆ [X ⇁ V ]. Then ⊔ ∪ {Θi | i ∈ I} exists iff ⊔{⊔Θi | i ∈ I} exists, and, if both exist, ⊔ ∪ {Θi | i ∈ I} = ⊔{⊔Θi | i ∈ I}. Proof. 1., 2. and 3. are straightforward. For 4., since for each θ ∈ Θ there is some θ ′ ∈ Θ′ with θ ⊑ θ ′ , and since θ ′ ⊑ ⊔Θ′ for any θ ′ ∈ Θ′ , it follows that θ ⊑ ⊔Θ′ for any θ ∈ Θ, that is, that ⊔Θ′ is an upper bound for Θ. Therefore, by Proposition 2 it follows that ⊔Θ exists and ⊔Θ ⊑ ⊔Θ′ (the latter because ⊔Θ is the least upper bound of Θ). We prove 5. by double implication, each implication stating that if one of the lub’s exist then the other one also exists and one of the inclusions holds; that indeed implies that one of the lub’s exists if and only if the other one exists and, if both exist, then they are equal. Suppose first that ⊔ ∪ {Θi | i ∈ I} exists, that is, that ∪{Θi | i ∈ I} has an upper bound, say u. Since Θi ⊆ ∪{Θi | i ∈ I} for each i ∈ I, it follows first that each Θi also has u as an upper bound, so all ⊔Θi for all i ∈ I exist, and second by 4. above that ⊔Θi ⊑ ⊔∪{Θi | i ∈ I} for each i ∈ I. Item 4. above then further implies that ⊔{⊔Θi | i ∈ I} exists and ⊔{⊔Θi | i ∈ I} ⊑ ⊔{⊔ ∪ {Θi | i ∈ I}} = ⊔ ∪ {Θi | i ∈ I} (the last equality follows by 2. above). Conversely, suppose now that ⊔{⊔Θi | i ∈ I} exists. Since for each θ ∈ ∪{Θi | i ∈ I} there is some i ∈ I such that θ ⊑ ⊔Θi (an i ∈ I such that θ ∈ Θi ), item 4. above implies that ⊔ ∪ {Θi | i ∈ I} also exists and ⊔ ∪ {Θi | i ∈ I} ⊑ ⊔{⊔Θi | i ∈ I}. 3.2. Least Upper Bounds of Families of Sets of Partial Maps. Motivated by requirements and optimizations of our trace slicing and monitoring algorithms in Sections 6 and 8, in this section and the next we define several less known notions and results. We are actually not aware of other places where these notions are defined, so they could be novel and specific to our approach to parametric trace slicing and monitoring. We first extend the notion of least upper bound (lub) from one associating a partial function to a set of partial functions to one associating a set of partial functions to a family (or set) of sets of partial functions: Definition 4. If {Θi }i∈I is a family of sets in [X ⇁ V ], then we let the least upper bound (also lub) of {Θi }i∈I be defined as: def ⊔{Θi | i ∈ I} = {⊔{θi | i ∈ I} | θi ∈ Θi for each i ∈ I such that ⊔ {θi | i ∈ I} exists}. As before, we use the infix notation when I is finite, e.g., we may write Θ1 ⊔ Θ2 ⊔ · · · ⊔ Θn instead of ⊔{Θi | i ∈ {1, 2, . . . , n}}. Therefore, ⊔{Θi | i ∈ I} is the set containing all the lub’s corresponding to sets formed by picking for each i ∈ I precisely one element from Θi . Unlike for sets of partial functions, the lub’s of families of sets of partial functions always exist; ⊔{Θi | i ∈ I} is the empty set when no collection of θi ∈ Θi can be found (one θi ∈ Θi for each i ∈ I) such that {θi | i ∈ I} has an upper bound. PARAMETRIC MONITORING 15 There is an admitted slight notational ambiguity between the two least upper bound notations introduced so far. We prefer to purposely allow this ambiguity instead of inventing a new notation for the lub’s of families of sets, hoping that the reader is able to quickly disambiguate the two by checking the types of the objects involved in the lub: if partial functions then the first lub is meant, if sets of partial functions then the second. Note that such notational ambiguities are actually common practice elsewhere; e.g., in a monoid (M, ∗ : M ×M → M, 1) with binary operation ∗ and unit 1, the ∗ is commonly extended to sets of elements M1 , M2 in M as expected: M1 ∗ M2 = {m1 ∗ m2 | m1 ∈ M1 , m2 ∈ M2 }. Proposition 4. The following facts hold, where Θ, Θ1 , Θ2 , Θ3 ⊆ [X ⇁ V ]: (1) ⊔∅ = {⊥}, where, in this case, the empty set ∅ ⊆ P([X ⇁ V ]) is meant; (2) ⊔{Θ} = Θ; in particular ⊔{∅} = ∅ when the empty set ∅ ⊆ [X ⇁ V ] is meant;  {⊔Θ} if Θ has a lub, and (3) ⊔{{θ} | θ ∈ Θ} = ∅ if Θ does not have a lub; (4) ∅ ⊔ Θ = ∅, where the empty set ∅ ⊆ [X ⇁ V ] is meant; (5) {⊥} ⊔ Θ = Θ; (6) If Θ1 ⊆ Θ2 then Θ1 ⊔ Θ3 ⊆ Θ2 ⊔ Θ3 ; in particular, if ⊥ ∈ Θ2 then Θ3 ⊆ Θ2 ⊔ Θ3 ; (7) (Θ1 ∪ Θ2 ) ⊔ Θ3 = (Θ1 ⊔ Θ3 ) ∪ (Θ2 ⊔ Θ3 ). Proof. Recall that the least upper bound ⊔{Θi | i ∈ I} of sets of sets of partial functions is built by collecting all the lubs of sets {θi | i ∈ I} containing one element θi from each of the sets Θi . When |I| = 0, that is when I is empty, there is precisely one set {θi | i ∈ I}, the empty set of partial functions. Then 1. follows by 1. in Proposition 3. When |I| = 1, that is when {Θi | i ∈ I} = {Θ} for some Θ ⊆ [X ⇁ V ] like in 2., then the sets {θi | i ∈ I} are precisely the singleton sets corresponding to the elements of Θ, so 2. follows by 2. in Proposition 3. 3. holds because there is only one way to pick an element from each singleton set {θ}, namely to pick the θ itself; this also shows how the notion of a lub of a family of sets generalizes the conventional notion of lub. When |I| ≥ 2 and at least one of the involved sets of partial functions is empty, like in 4., then there is no set {θi | i ∈ I}, so the least upper bound of the set of sets is empty (regarded, again, as the empty set of sets of partial functions). 5. follows by 1. in Proposition 1. The first part of 6. is immediate and the second part follows from the first using 5.. Finally, 7. follows by double implication: (Θ1 ⊔ Θ3 ) ∪ (Θ2 ⊔ Θ3 ) ⊆ (Θ1 ∪ Θ2 ) ⊔ Θ3 follows by 6. because Θ1 and Θ2 are included in Θ1 ∪ Θ2 , and (Θ1 ∪ Θ2 ) ⊔ Θ3 ⊆ (Θ1 ⊔ Θ3 ) ∪ (Θ2 ⊔ Θ3 ) because for any θ1 ∈ Θ1 ∪ Θ2 , say θ1 ∈ Θ1 , and any θ3 ∈ Θ3 , if θ1 ⊔ θ3 exists then it also belongs to Θ1 ⊔ Θ3 . Proposition 5. Let {Θi }i∈I be a family of sets of partial maps in [X ⇁ V ] and let I = {Ij }j∈J be a partition of I: I = ∪{Ij | j ∈ J} and Ij1 ∩ Ij2 = ∅ for any different j1 , j2 ∈ J. Then ⊔{Θi | i ∈ I} = ⊔{⊔{Θij | ij ∈ Ij } | j ∈ J}. Proof. For each j ∈ J, let Qj denote the set ⊔{Θij | ij ∈ Ij }. Definition 4 then implies def the following: Qj = {⊔{θij | ij ∈ Ij } | θij ∈ Θij for each ij ∈ Ij , such that ⊔ {θij | ij ∈ def Ij } exists}. Definition 4 also implies the following: ⊔{Qj | j ∈ J} = {⊔{qj | j ∈ J} | qj ∈ Qj for each j ∈ J, such that ⊔ {qj | j ∈ J} exists}. Putting the two equalities above together, we get that ⊔{⊔{Θij | ij ∈ Ij } | j ∈ J} equals the following: { ⊔{⊔{θij | ij ∈ Ij } | j ∈ J} | θij ∈ Θij for each j ∈ J and ij ∈ Ij , such that ⊔{θij | ij ∈ Ij } exists for each j ∈ J and ⊔{⊔{θij | ij ∈ Ij } | j ∈ J} exists }. 16 G. ROŞU AND F. CHEN Since {Ij }j∈J is a partition of I, the indexes ij generated by “for each j ∈ J and ij ∈ Ij ” cover precisely all the indexes i ∈ I. Moreover, picking partial functions θij ∈ Θij for each j ∈ J and ij ∈ Ij is equivalent to picking partial functions θi ∈ Θi for each i ∈ I, and, in this case, {θi | i ∈ I} = ∪{{θij | ij ∈ Ij } | j ∈ J}. By 5. in Proposition 3 we then infer that ⊔{θi | i ∈ I} exists if and only if ⊔{⊔{θij | ij ∈ Ij } | j ∈ J} exists, and if both exist then ⊔{θi | i ∈ I} = ⊔{⊔{θij | ij ∈ Ij } | j ∈ J}; if both exist then ⊔{θij | ij ∈ Ij } also exists for each j ∈ J (because {θij | ij ∈ Ij } ⊆ {θi | i ∈ I} = ∪{{θij | ij ∈ Ij } | j ∈ J}). Therefore, we can conclude that ⊔{⊔{Θij | ij ∈ Ij } | j ∈ J} equals {⊔{θi | i ∈ I} | θi ∈ Θi for each i ∈ I, such that ⊔ {θi | i ∈ I} exists}, which is nothing but ⊔{Θi | i ∈ I}. Corollary 1. The following hold: (1) {⊥} ⊔ Θ = Θ (already proved as 5. in Proposition 4); (2) Θ1 ⊔ Θ2 = Θ2 ⊔ Θ1 ; (3) Θ1 ⊔ (Θ2 ⊔ Θ3 ) = (Θ1 ⊔ Θ2 ) ⊔ Θ3 ; Proof. These follow from Proposition 5 for various index sets I and partitions of it: for 1. take I = {1} and its partition I = ∅ ∪ I, take Θ1 = Θ, and then use 1. in Proposition 4 saying that ⊔∅ = {⊥}; for 2. take partitions {1} ∪ {2} and {2} ∪ {1} of I = {1, 2}, getting Θ1 ⊔ Θ2 = Θ2 ⊔ Θ1 = ⊔{Θi | i ∈ {1, 2}}; finally, for 3. take partitions {1} ∪ {2, 3} and {1, 2}∪{3} of I = {1, 2, 3}, getting Θ1 ⊔(Θ2 ⊔Θ3 ) = (Θ1 ⊔Θ2 )⊔Θ3 = ⊔{Θi | i ∈ {1, 2, 3}}. 3.3. Least Upper Bound Closures. We next define lub closures of sets of partial maps, a crucial operation for the algorithms discussed next in the paper. Definition 5. Θ ⊆ [X ⇁ V ] is lub closed if and only if ⊔Θ′ ∈ Θ for any Θ′ ⊆ Θ admitting upper bounds. Proposition 6. {⊥} and {⊥, θ} are lub closed (θ ∈ [X ⇁ V ]). Proof. It follows easily from Definition 5, using the facts that ⊔∅ = ⊥ (1. in Proposition 3), ⊔{θ} = θ (2. in Proposition 3), and ⊔{⊥, θ} = θ (3. in Proposition 3 for Θ = {θ}). Proposition 7. If Θ ⊆ [X ⇁ V ] and {Θi }i∈I is a family of sets of partial functions in [X ⇁ V ], then: (1) If Θ is lub closed then ⊥ ∈ Θ; in particular, ∅ is not lub closed; (2) If Θ has upper bounds and is lub closed then it has a maximum; (3) Θ is lub closed iff ⊔{Θ | i ∈ I} = Θ for any I; (4) If Θ is lub closed and Θi ⊆ Θ for each i ∈ I then ⊔{Θi | i ∈ I} ⊆ Θ; (5) If Θi is lub closed for each i ∈ I then ⊔{Θi | i ∈ I} is lub closed and ∪{Θi | i ∈ I} ⊆ ⊔{Θi | i ∈ I}; (6) If I finite and Θi finite for all i ∈ I, then ⊔{Θi | i ∈ I} finite; (7) If Θi lub closed for all i ∈ I then ∩{Θi | i ∈ I} is lub closed; (8) ∩{Θ′ | Θ′ ⊆ [X ⇁ V ] with Θ ⊆ Θ′ and Θ′ is lub closed} is the smallest lub closed set including Θ. Proof. 1. follows taking Θ′ = ∅ in Definition 5 and using ⊔∅ = ⊥ (1. in Proposition 3). 2. follows taking Θ′ = Θ in Definition 5: ⊔Θ ∈ Θ, so max Θ exists (and equals ⊔Θ). 3. Definition 4 implies that ⊔{Θ | i ∈ I} equals {⊔{θi | i ∈ I} | θi ∈ Θ for each i ∈ I, such that ⊔ {θi | i ∈ I} exists}, which is nothing but {⊔Θ′ | Θ′ ⊆ Θ such that ⊔ PARAMETRIC MONITORING 17 Θ′ exists}; the later can be now shown equal to Θ by double inclusion: {⊔Θ′ | Θ′ ⊆ Θ such that ⊔ Θ′ exists} ⊆ Θ because Θ is lub closed, and Θ ⊆ {⊔Θ′ | Θ′ ⊆ Θ such that ⊔ Θ′ exists} because one can pick Θ′ = {θ} for each θ ∈ Θ and use the fact that ⊔{θ} = θ (2. in Proposition 3). 4. Let θ be an arbitrary partial function in ⊔{Θi | i ∈ I}, that is, θ = ⊔{θi | i ∈ I} for some θi ∈ Θi , one for each i ∈ I, such that {θi | i ∈ I} has upper bounds. Since Θ is lub closed and Θi ⊆ Θ for each i ∈ I, it follows that θ ∈ Θ. Therefore, ⊔{Θi | i ∈ I} ⊆ Θ. 5. Let Θ′ be a set of partial functions included in ⊔{Θi | i ∈ I} which admits an ′ ′ upper bound; moreover, for each θ ′ ∈ Θ′ , let us fix a set {θiθ | i ∈ I} such that θiθ ∈ Θi ′ for each i ∈ I and θ ′ = ⊔{θiθ | i ∈ I} (such sets exist because θ ′ ∈ Θ′ ⊆ ⊔{Θi | i ∈ I}). ′ ′ ′ Let Θθ be the set {θiθ | i ∈ I} for each θ ′ ∈ Θ′ , let Θ′i be the set {θiθ | θ ′ ∈ Θ′ } ′ ′ for each i ∈ I, and let Θ be the set {θiθ | θ ′ ∈ Θ′ , i ∈ I θ }. It is easy to see that ′ Θ = ∪{Θθ | θ ′ ∈ Θ′ } = ∪{Θ′i | i ∈ I} and that Θ′i ⊆ Θi for each i ∈ I. Since ⊔Θ′ exists ′ (because Θ′ has upper bounds) and ⊔Θ′ = ⊔{θ ′ | θ ′ ∈ Θ′ } = ⊔{⊔Θθ | θ ′ ∈ Θ′ }, by 5. in Proposition 3 it follows that ⊔Θ exists and ⊔Θ′ = ⊔Θ. Since Θ = ∪{Θ′i | i ∈ I} and ⊔Θ exists, by 5. in Proposition 3 again we get that ⊔{⊔Θ′i | i ∈ I} exists and is equal to ⊔Θ, which is equal to ⊔Θ′ . Since Θ′i ⊆ Θi and Θi is lub closed, we get that ⊔Θ′i ∈ Θi . That means that ⊔{⊔Θ′i | i ∈ I} ∈ ⊔{Θi | i ∈ I}, that is, that ⊔Θ′ ∈ ⊔{Θi | i ∈ I}. Since Θ′ ⊆ ⊔{Θi | i ∈ I} was chosen arbitrarily, we conclude that ⊔{Θi | i ∈ I} is lub closed. To show that ∪{Θi | i ∈ I} ⊆ ⊔{Θi | i ∈ I}, let us pick an i ∈ I and let us partition I as {i} ∪ (I\{i}). By Proposition 5, ⊔{Θi | i ∈ I} = Θi ⊔ (⊔{Θj | j ∈ I\{i}}). The proof above also implies that ⊔{Θj | j ∈ I\{i}} is lub closed, so by 1. we get that ⊥ ∈ ⊔{Θj | j ∈ I\{i}}. Finally, 6. in Proposition 4 implies Θi ⊑ Θi ⊔ (⊔{Θj | j ∈ I\{i}}), so Θi ⊆ ⊔{Θi | i ∈ I} for each i ∈ I, that is, ∪{Θi | i ∈ I} ⊆ ⊔{Θi | i ∈ I}. 6. Recall from Definition 4 that ⊔{Θi | i ∈ I} contains the existing least upper bounds of sets of partial functions containing precisely one partial function Q in each Θi . If I and each of the Θ for each i ∈ I is finite, then | ⊔ {Θ | i ∈ I}| ≤ i i i∈I |Θi |, because there Q at most i∈I |Θi | combinations of partial functions, one in each Θi , that admit an upper bound. Therefore, ⊔{Θi | i ∈ I} is also finite. 7. Let Θ′ ⊆ ∩{Θi | i ∈ I} be a set of partial functions admitting an upper bound. Then ′ Θ ⊆ Θi for each i ∈ I and, since each Θi is lub closed, ⊔Θ′ ∈ Θi for each i ∈ I. Therefore, ⊔Θ′ ∈ ∩{Θi | i ∈ I}. 8. Anticipating the definition of and notation for lub closures (Definition 5), we let Θ denote the set ∩{Θ′ | Θ′ ⊆ [X ⇁ V ] with Θ ⊆ Θ′ and Θ′ is lub closed}. It is clear that Θ ⊆ Θ and, by 7., that Θ is lub closed. It is also the smallest lub closed set including Θ, because all such sets Θ′ are among those whose intersection defines Θ. Definition 6. Given θ ′ ∈ [X ⇁ V ] and Θ ⊆ [X ⇁ V ], let def (θ ′ ]Θ = {θ | θ ∈ Θ and θ ⊑ θ ′ } be the set of partial functions in Θ that are less informative than θ ′ . Proposition 8. If θ, θ ′ , θ ′′ , θ1 , θ2 ∈ [X ⇁ V ] and if Θ ⊆ [X ⇁ V ] is lub closed, then: (1) (θ ′ ]Θ is lub closed and max (θ ′ ]Θ exists; (2) If θ ′ ∈ {θ} ⊔ Θ then {θ ′′ | θ ′′ ∈ Θ and θ ′ = θ ⊔ θ ′′ } has maximum and that equals max (θ ′ ]Θ ; (3) If θ1 , θ2 ∈ {θ} ⊔ Θ such that θ1 = max (θ2 ]Θ , then θ1 = θ2 . 18 G. ROŞU AND F. CHEN Proof. 1. First, note that θ ′ is an upper bound for (θ ′ ]Θ as well as for any subset Θ′ of it, so any Θ′ ⊆ (θ ′ ]Θ has upper bounds, so by 2. in Proposition 2, ⊔Θ′ exists for any Θ′ ⊆ (θ ′ ]Θ . Moreover, if Θ′ ⊆ (θ ′ ]Θ then ⊔Θ′ ⊑ θ ′ , and since Θ is lub closed it follows that ⊔Θ′ ∈ Θ, so ⊔Θ′ ∈ (θ ′ ]Θ . Therefore, (θ ′ ]Θ is lub closed. 2. in Proposition 7 now implies that (θ ′ ]Θ has maximum; to be concrete, max (θ ′ ]Θ is nothing but ⊔ (θ ′ ]Θ , which belongs to (θ ′ ]Θ (because one can pick Θ′ = (θ ′ ]Θ above). 2. Let Q be the set of partial functions {θ ′′ | θ ′′ ∈ Θ and θ ′ = θ ⊔ θ ′′ }. Note that Q is non-empty (because θ ′ ∈ {θ} ⊔ Θ, so there is some θ ′′ ∈ Θ such as θ ′ = θ ⊔ θ ′′ ) and has upper-bounds (because θ ′ is an upper bound for it), but that it is not necessarily lub closed (because, unless θ ′ = θ, Q does not contain ⊥, contradicting 1. in Proposition 7). Hence Q has a lub (by 2. in Proposition 2), say q, and q = ⊔ Q ⊑ θ ′ ; since θ ⊑ θ ′ , it follows that θ ⊔ q ⊑ θ ′ . On the other hand θ ′ ⊑ θ ⊔ q by 4. in Proposition 3, because there is some θ ′′ ∈ Q such that θ ′ = θ ⊔ θ ′′ and θ ′′ ⊑ q. Therefore, θ ′ = θ ⊔ q. Since Θ is lub closed, it follows that q ∈ Θ. Therefore, q ∈ Q, so q is the maximum element of Q. Let us next show that q = max (θ ′ ]Θ . The relation q ⊑ max (θ ′ ]Θ is immediate because q ∈ (θ ′ ]Θ (we proved above that q ∈ Θ and q ⊑ θ ′ ). For max (θ ′ ]Θ ⊑ q it suffices to show that max (θ ′ ]Θ ∈ Q, that is, that θ ⊔ max (θ ′ ]Θ = θ ′ : θ ⊔ max (θ ′ ]Θ ⊑ θ ′ follows because θ ⊑ θ ′ and max (θ ′ ]Θ ⊑ θ ′ , while θ ′ ⊑ θ ⊔ max (θ ′ ]Θ follows because there is some θ ′′ ∈ Θ such that θ ′ = θ ⊔ θ ′′ and, since θ ′′ ⊑ max (θ ′ ]Θ , θ ⊔ θ ′′ ⊑ θ ⊔ max (θ ′ ]Θ (by 4. in Proposition 3). 3. admits a direct proof simpler than that of 2.; however, since 2. is needed anyway, we prefer to use 2. Note that θ ⊑ θ1 ⊑ θ2 . By 2., θ1 = max {θ ′′ | θ ′′ ∈ Θ and θ2 = θ ⊔ θ ′′ }, which implies θ2 = θ ⊔ θ1 = θ1 . Definition 7. Given Θ ⊆ [X ⇁ V ], we let Θ, the least upper bound (lub) closure of Θ, be defined as follows: def Θ = ∩{Θ′ | Θ′ ⊆ [X ⇁ V ] with Θ ⊆ Θ′ and Θ′ is lub closed}. Proposition 9. The next hold (Θ ⊆ [X ⇁ V ], θ ∈ [X ⇁ V ]): (1) Θ is the smallest lub closed set including Θ; (2) ∅ = {⊥} = {⊥}; (3) {θ} = {⊥, θ}. Proof. 1. follows by 7. in Proposition 7. For 2. and 3., first note that {⊥} and {⊥, θ} are lub closed by Proposition 6; second, note that they are indeed the smallest lub closed sets including ⊥ and resp. θ, as any lub closed set must include ⊥ (1. in Proposition 7). Proposition 10. The lub closure map · : 2[X⇁V ] → 2[X⇁V ] is a closure operator, that is, for any Θ, Θ1 , Θ2 ⊆ [X ⇁ V ], (1) (extensivity) Θ ⊆ Θ; (2) (monotonicity) If Θ1 ⊆ Θ2 then Θ1 ⊆ Θ2 ; (3) (idempotency) Θ = Θ. Proof. Extensivity and idempotency follow immediately from the definitions of Θ and Θ (which are lub closed by 1. in Proposition 9). For monotonicity, one should note that Θ2 satisfies the properties of Θ1 (i.e., Θ1 ⊆ Θ2 and Θ2 is lub closed); since Θ1 is the smallest with those properties, it follows that Θ1 ⊆ Θ2 . PARAMETRIC MONITORING 19 Proposition 11. ∪{Θi | i ∈ I} = ⊔{Θi | i ∈ I} for any family {Θi }i∈I of partial functions in [X ⇁ V ]. Proof. Since Θi is lub closed for any i ∈ I, 5. in Proposition 7 implies that ⊔{Θi | i ∈ I} is lub closed and ∪{Θi | i ∈ I} ⊆ ⊔{Θi | i ∈ I}. Since 1. in Proposition 10 implies Θi ⊆ Θi for each i ∈ I and since ∪{Θi | i ∈ I} is the smallest lub closed set including ∪{Θi | i ∈ I} (1. in Proposition 9), the inclusion ∪{Θi | i ∈ I} ⊆ ⊔{Θi | i ∈ I} holds. Conversely, 2. in Proposition 10 implies that Θi ⊆ ∪{Θi | i ∈ I} for any i ∈ I, so ⊔{Θi | i ∈ I} ⊆ ∪{Θi | i ∈ I} holds by 4. in Proposition 7. Corollary 2. For any θ ∈ [X ⇁ V ] and Θ ⊆ [X ⇁ V ], equality {θ} ∪ Θ = {⊥, θ} ⊔ Θ holds. Proof. {θ} ∪ Θ = {θ} ⊔ Θ by Proposition 11, and {θ} = {⊥, θ} by 3. in Proposition 9. Corollary 3. If Θ ⊆ [X ⇁ V ] is finite then Θ is also finite. Proof. Suppose that Θ = {θ1 , θ2 , . . . , θn } for some n ≥ 0. Iteratively applying Corollary 2, Θ = {⊥, θ1 } ⊔ {⊥, θ2 } ⊔ · · · {⊥, θn }; in obtaining that, we used 2. in Proposition 9 and 1. in Corollary 1. The result follows now by 6. in Proposition 7. 4. Parametric Traces and Properties Here we introduce the notions of event, trace and property, first non-parametric and then parametric. Traces are sequences of events. Parametric events can carry data-values as instances of parameters. Parametric traces are traces over parametric events. Properties are trace classifiers, that is, mappings partitioning the space of traces into categories (violating traces, validating traces, don’t know traces, etc.). Parametric properties are parametric trace classifiers and provide, for each parameter instance, the category to which the trace slice corresponding to that parameter instance belongs. Trace slicing is defined as a reduct operation that forgets all the events that are unrelated to the given parameter instance. 4.1. The Non-Parametric Case. We next introduce non-parametric events, traces and properties, which will serve as an infrastructure for their parametric variants in Section 4.2. Definition 8. Let E be a set of (non-parametric) events, called base events or simply events. An E-trace, or simply a (non-parametric) trace when E is understood or not important, is any finite sequence of events in E, that is, an element in E ∗ . If event e ∈ E appears in trace w ∈ E ∗ then we write e ∈ w. Our parametric trace slicing and monitoring techniques in Sections 6 and 8 can be easily adapted to also work with infinite traces. Since infinite versus finite traces is not an important aspect of the work reported here, we keep the presentation free of unnecessary technical complications and consider only finite traces. Example. (part 1 of simple running example) Like in Section 2.1, consider a certain resource (e.g., a synchronization object) that can be acquired and released during the lifetime of a given procedure (between its begin and end). Then the set of events E is {acquire, release, begin, end} and execution traces corresponding to this resource are sequences 20 G. ROŞU AND F. CHEN begin acquire acquire release end begin end, begin acquire acquire, begin acquire release acquire end, etc. For the time being, there are no “good” or “bad” execution traces.  There is a plethora of formalisms to specify trace requirements. Many of these result in specifying at least two types of traces: those validating the specification (i.e, correct traces), and those violating the specification (i.e., incorrect traces). Example. (part 2) Consider a regular expression specification, (begin(ǫ | (acquire(acquire | release)∗ release))end)∗ stating that the procedure can (non-recursively) take place multiple times and, if the resource is acquired during the procedure then it is released by the end of the procedure. Assume that the resource can be acquired and released multiple times, with the effect of acquiring and respectively releasing it precisely once. The validating (or matching) traces for this property are those satisfying the pattern, e.g., begin acquire acquire release end begin end. At first sight, one may say that all the other traces are violating (or failing) traces, because they are not in the language of the regular expression. However, there are two interesting types of such “failing” traces: ones which may still lead to a matching trace provided the right events will be received in the future, e.g., begin acquire acquire, and ones which have no chance of becoming a matching trace, e.g., begin acquire release acquire end.  In general, traces are not enforced to correspond to terminated programs (this is particularly useful in monitoring); if one wants to enforce traces to correspond to terminated programs, then one can have the system generate a special end-of-trace event and have the property specification require that event at the end of each trace. Therefore, a trace property may partition the space of traces into more than two categories. For some specification formalisms, for example ones based on fuzzy logics or multiple truth values, the set of traces may be split into more than three categories, even into a continuous space of categories. Section 2.6 showed an example of a property where the space of trace categories was the set of rational numbers between 0 and 1. Definition 9. An E-property P , or simply a (base or non-parametric) property, is a function P : E ∗ → C partitioning the set of traces into (verdict) categories C. It is common, though not enforced, that the set of property verdict categories C in Definition 9 includes validating (or similar), violating (or similar), and don’t know (or ?) categories. In general, C can be any set, finite or infinite. We believe that the definition of non-parametric trace property above is general enough that it can easily accommodate any particular specification formalism, such as ones based on linear temporal logics, regular expressions, context-free grammars, etc. All one needs to do in order to instantiate the general results in this paper for a particular specification formalism is to decide upon the desired categories in which traces are intended to be classified, and then define the property associated to a specification accordingly. For example, if the specification formalism of choice is that of regular expressions over E and one is interested in classifying traces in three categories as in our example above, then one can pick C to be the set {match, fail, don’t know} and, for a given regular expression E, define its associated property PE : E ∗ → C as follows: PE (w) = match iff w is in the language of E, PE (w) = fail iff there is no w′ ∈ E ∗ such that w w′ is in the language of E, and PE (w) = don’t know otherwise; this is the monitoring semantics of regular expressions in the JavaMOP and RV systems [28, 14, 27]. PARAMETRIC MONITORING 21 Other semantic choices are possible even for the simple case of regular expressions; for example, one may choose C to be the set {match, don’t care} and define PE (w) = match iff w is in the language of E, and PE (w) = don’t care otherwise; this is the semantics of regular expressions in Tracematches [1], where, depending upon how one writes the regular expression, matching can mean either a violation or a validation of the desired property. Similarly, one can have various verdict categories for linear temporal logic (LTL). For example, one can report violation when a bad prefix is encountered, can report validation when a good prefix is encountered, and can report inconclusive when neither of the above; this is the current monitoring semantics of monitoring LTL in JavaMOP and RV [28, 27]. Semantical and algorithmic aspects regarding LTL monitoring can be found, e.g., in [21, 32, 33, 7]. In some applications, one may not be interested in certain categories of traces, such as in those classified as don’t know, don’t care, or inconclusive; if that is the case, then those applications can simply ignore these, like Tracematches, JavaMOP and RV do. It may be worth making it explicit that in this paper we do not attempt to propose or promote any particular formalism for specifying properties about execution traces. Instead, our approach is to define properties as generally as possible to capture the various specification formalisms that we are aware of as special cases, and then to develop our subsequent techniques to work with such general properties. We believe that our definition of property in Definition 9 is general enough to allow us to claim that our results are specification-formalism-independent. An additional benefit of defining properties so generally, as mappings from traces to categories, is that parametric properties, in spite of their much more general flavor, are also properties (but, obviously, over different traces and over different categories). 4.2. The Parametric Case. Events often carry concrete data instantiating parameters. Example. (part 3) In our running example, events acquire and release are parametric in the resource being acquired or released; if r is the name of the generic resource parameter and r1 and r2 are two concrete resources, then parametric acquire/release events have the form acquirehr 7→ r1 i, releasehr 7→ r2 i, etc. Not all events need carry instances for all parameters; e.g., the begin/end parametric events have the form beginh⊥i and endh⊥i, where ⊥, the partial map undefined everywhere, instantiates no parameter.  Recall from Definition 1 that [A → B] and [A ⇁ B] denote the sets of total and, respectively, partial functions from A to B. Definition 10. (Parametric events and traces). Let X be a set of parameters and let V be a set of corresponding parameter values. If E is a set of base events like in Definition 8, then let EhXi denote the set of corresponding parametric events ehθi, where e is a base event in E and θ is a partial function in [X ⇁ V ]. A parametric trace is a trace with events in EhXi, that is, a word in EhXi∗ . Therefore, a parametric event is an event carrying values for zero, one, several or even all the parameters, and a parametric trace is a finite sequence of parametric events. In practice, the number of values carried by an event is finite; however, we do not need to enforce this restriction in our theoretical developments. Also, in practice the parameters may be typed, in which case the set of their corresponding values is given by their type. To simplify writing, we occasionally assume the set of parameter values V implicit. Example. (part 4) A parametric trace for our running example can be the following: beginh⊥i acquirehθ1 i acquirehθ2 i acquirehθ1 i releasehθ1 i endh⊥i beginh⊥i acquirehθ2 i releasehθ2 i endh⊥i, 22 G. ROŞU AND F. CHEN where θ1 maps r to r1 and θ2 maps r to r2 . To simplify writing, we take the freedom to only list the parameter instance values when writing parameter instances, that is, hr1 i instead of hr 7→ r1 i, or τ↾r2 instead of τ↾r7→r2 , etc. This notation is formally introduced in the next section, as Notation 1. With this notation, the above trace becomes beginhi acquirehr1 i acquirehr2 i acquirehr1 i releasehr1 i endhi beginhi acquirehr2 i releasehr2 i endhi. This trace involves two resources, r1 and r2 , and it really consists of two trace slices, one for each resource, merged together. The begin and end events belong to both trace slices. The slice corresponding to θ1 is begin acquire acquire release end begin end, while the one for θ2 is begin acquire end begin acquire release end.  Recall from Definition 1 that two partial maps of same source and target are compatible when they do not disagree on any of the elements on which they are both defined, and that one is less informative than another, written θ ⊑ θ ′ , when they are compatible and the domain of the former in included in the domain of the latter. With the notation in the example above we have, for our running example, that hi is compatible with hr1 i and with hr2 i, but hr1 i and hr2 i are not compatible; moreover, hi ⊑ hr1 i and hi ⊑ hr2 i. Definition 11. (Trace slicing) Given parametric trace τ ∈ EhXi∗ and partial function θ in [X ⇁ V ], we let the θ-trace slice τ↾θ ∈ E ∗ be the non-parametric trace in E ∗ defined as: • ǫ↾θ = ǫ, where ǫ is the empty trace/word, and (τ↾θ ) e when θ ′ ⊑ θ • (τ ehθ ′ i)↾θ = τ↾θ when θ ′ 6⊑ θ Therefore, the trace slice τ↾θ first filters out all the parametric events that are not relevant for the instance θ, i.e., which contain instances of parameters that θ does not care about, and then, for the remaining events relevant to θ, it forgets the parameters so that the trace can be checked against base, non-parametric properties. It is crucial to discard parameter instances that are not relevant to θ during the slicing, including those more informative than θ, in order to achieve a correct slice for θ: in our running example, the trace slice for hi should contain only begin and end events and no acquire or release. Otherwise, the acquire and release of different resources will interfere with each other in the trace slice for hi. One should not confuse extracting/abstracting traces from executions with slicing traces. The former determines the events to include in the trace, as well as parameter instances carried by events, while the latter dispatches each event in the given trace to corresponding trace slices according to the event’s parameter instance. Different abstractions may result in different parametric traces from the same execution and thus may lead to different trace slices for the same parameter instance θ. For the (map, collection, iterator) example in Section 1, X = {m, c, i} and an execution may generate the following parametric trace: createCollhm1 , c1 i createIterhc1 , i1 i nexthi1 i updateMaphm1 i. The trace slice for hm1 i is updateMap for this parametric trace. Now suppose that we are only interested in operations on maps. Then X = {m} and the trace abstracted from the execution generating the above trace is createCollhm1 i updateMaphm1 i, in which events and parameter bindings irrelevant to m are removed. Then the trace slice for hm1 i is createColl updateMap. In this paper we focus only on trace slicing; more discussion about trace abstraction can be found in [15]. Specifying properties over parametric traces is rather challenging, because one may want to specify a property for one generic parameter instance and then say “and so on for all the other instances”. In other words, one may want to specify a sort of a universally quantified property over base events, but, unfortunately, the underlying specification formalism may not allow such quantification over data; for example, none of the conventional PARAMETRIC MONITORING 23 formalisms to specify properties on linear traces listed above (i.e, linear temporal logics, regular expressions, context-free grammars) or mentioned in the rest of the paper has data quantification by default. We say “by default” because, in some cases, there are attempts to add data quantification; for example, [23] investigates the implications and the necessary restrictions resulting from adding quantifiers to LTL, and [33] investigates a finite-trace variant of parametric LTL together with a translation to parametric alternating automata. Definition 12. Let X be a set of parameters together with their corresponding parameter values V , like in Definition 10, and let P : E ∗ → C be a non-parametric property like in Definition 9. Then we define the parametric property ΛX . P as the property (over traces EhXi∗ and categories [[X ⇁ V ] → C]) ΛX . P : EhXi∗ → [[X ⇁ V ] → C] defined as (ΛX . P )(τ )(θ) = P (τ↾θ ) for any τ ∈ EhXi∗ and any θ ∈ [X ⇁ V ]. If X = {x1 , ..., xn } we may write Λx1 , ..., xn . P instead of (Λ{x1 , ..., xn } . P . Also, if Pϕ is defined using a pattern or formula ϕ in some particular trace specification formalism, we take the liberty to write ΛX . ϕ instead of ΛX . Pϕ . Parametric properties ΛX . P over base properties P : E ∗ → C are therefore properties taking traces in EhXi∗ to categories [[X ⇁ V ] → C], i.e., to function domains from parameter instances to base property categories. ΛX . P is defined as if many instances of P are observed at the same time on the parametric trace, one property instance for each parameter instance, each property instance concerned with its events only, dropping the unrelated ones. Example. (part 5) Let P be the non-parametric property specified by the regular expression in the second part of our running example above (using the mapping of regular expressions to properties discussed in the second part of our running example and after Definition 9 – i.e., the JavaMOP/RV semantic approach to parametric monitoring [14]). Since we want P to hold for any resource instance, we define the following parametric property: Λr . (begin (ǫ | (acquire (acquire | release)∗ release)) end)∗ . If τ is the parametric trace and θ1 and θ2 are the parameter instances in the fourth part of our running example, then the semantics of the parametric property above on trace τ is validating for parameter instance θ1 and violating for parameter instance θ2 .  5. Slicing With Less Consider a parametric trace τ in EhXi∗ and a parameter instance θ. Since there is no apriori correlation between the parameters being instantiated by θ and those by the various parametric events in τ , it may very well be the case that θ contains parameter instances that never appear in τ . In this section we show that slicing τ by θ is the same as slicing it by a “smaller” parameter instance than θ, namely one containing only those parameters instantiated by θ that also appear as instances of some parameters in some events in τ . Formally, this smaller parameter instance is the largest partial map smaller than θ in the lub closure of all the parameter instances of events in τ ; this partial function is proved to indeed exist. We first formalize a notation used informally so far in this paper: 24 G. ROŞU AND F. CHEN Notation 1. When the domain of θ is finite, which is always the case in our examples in this paper and probably will also be the case in most practical uses of our trace slicing algorithm, and when the corresponding parameter names are clear from context, we take the liberty to write partial functions compactly by simply listing their parameter values; for example, we write a partial function θ with θ(a) = a2 , θ(b) = b1 and θ(c) = c1 as the sequence “a2 b1 c1 ”. The function ⊥ then corresponds to the empty sequence. Example. Here is a parametric trace with events parametric in {a, b, c}, where the parameters take values in the set {a1 , a2 , b1 , c1 }: τ = e1 ha1 i e2 ha2 i e3 hb1 i e4 ha2 b1 i e5 ha1 i e6 hi e7 hb1 i e8 hc1 i e9 ha2 c1 i e10 ha1 b1 c1 i e11 hi. It may be the case that some of the base events appearing in a trace are the same; for example, e1 may be equal to e2 and to e5 . It is actually frequently the case in practice (at least in PQL [25], Tracematches [1], JavaMOP [14] and RV [27]) that parametric events are specified apriori with a given (sub)set of parameters, so that each event in E is always instantiated with partial functions over the same domain, i.e., if ehθi and ehθ ′ i appear in a parametric trace, then Dom(θ) = Dom(θ ′ ). While this restriction is reasonable and sometimes useful, our trace slicing and monitoring algorithms in this paper do not need it.  Recall from Definition 11 that the trace slice τ ↾θ keeps from τ only those events that are relevant for θ and drops their parameters. Example. Consider again the sample parametric trace above with events parametric in {a, b, c}: τ = e1 ha1 i e2 ha2 i e3 hb1 i e4 ha2 b1 i e5 ha1 i e6 hi e7 hb1 i e8 hc1 i e9 ha2 c1 i e10 ha1 b1 c1 i e11 hi. Several slices of τ are listed below: τ↾a1 = e1 e5 e6 e11 τ↾a2 = e2 e6 e11 τ↾a1 b1 = e1 e3 e5 e6 e7 e11 τ↾a2 b1 = e2 e3 e4 e6 e7 e11 τ↾ = e6 e11 τ↾a1 b1 c1 = e1 e3 e5 e6 e7 e8 e10 e11 τ↾a2 b1 c1 = e2 e3 e4 e6 e7 e8 e9 e11 τ↾a1 b2 c1 = e1 e5 e6 e8 e11 τ↾b2 c2 = e6 e11 In order for the partial functions above to make sense, we assumed that the set V in which parameters X = {a, b, c} take values includes {a1 , a2 , b1 , c1 }.  Definition 13. Given parametric trace τ ∈ EhXi∗ , we let Θτ denote the lub closure of all the parameter instances appearing in events in τ , that is, Θτ = {θ | θ ∈ [X ⇁ V ], ehθi ∈ τ }. Proposition 12. For any parametric trace τ ∈ EhXi∗ , the set Θτ is a finite lub closed set. Proof. Θτ is already defined as a lub closed set; since τ is finite, Corollary 3 implies that Θτ is finite. Proposition 13. Given τ ehθi ∈ EhXi∗ , the following equality holds: Θτ ehθi = {⊥, θ} ⊔ Θτ . PARAMETRIC MONITORING 25 Proof. It follows by the following sequence of equalities: Θτ ehθi = = = = = {θ ′ | θ ′ ∈ [X ⇁ V ], e′ hθ ′ i ∈ τ ehθi} {θ} ∪ {θ ′ | θ ′ ∈ [X ⇁ V ], e′ hθ ′ i ∈ τ } {θ} ∪ Θτ {⊥, θ} ⊔ Θτ {⊥, θ} ⊔ Θτ . The first equality follows by Definition 13, the second by separating the case e′ hθ ′ i = ehθi, the third again by Definition 13, the fourth by Corollary 2, and the fifth by Proposition 12. Therefore, Θτ ehθi is the smallest lub closed set that contains θ and includes Θτ . Proposition 14. Given τ ∈ EhXi∗ and θ ∈ [X ⇁ V ], the equality τ↾θ = τ↾max (θ]Θτ holds. Proof. We prove the following more general result: “Let Θ ⊆ [X ⇁ V ] be lub closed and let θ ∈ [X ⇁ V ]; then τ↾θ = τ↾max (θ]Θ for any τ ∈ EhXi∗ with Θτ ⊆ Θ.” First note that the statement above is well-formed because max (θ]Θ exists whenever Θ is lub closed (1. in Proposition 8), and that it is indeed more general than the stated result: for the given τ ∈ EhXi∗ and θ ∈ [X ⇁ V ], we pick Θ to be Θτ . We prove the general result by induction on the length of τ : - If |τ | = 0 then τ = ǫ and ǫ↾θ = ǫ↾max (θ]Θ = ǫ. - Now suppose that τ ↾θ = τ ↾max (θ]Θ for any τ ∈ EhXi∗ with Θτ ⊆ Θ and |τ | = n ≥ 0, and let us show that τ ′ ↾θ = τ ′ ↾max (θ]Θ for any τ ′ ∈ EhXi∗ with Θτ ′ ⊆ Θ and |τ ′ | = n + 1. Pick such a τ ′ and let τ ′ = τ ehθ ′ i for a τ ∈ EhXi∗ with |τ | = n and an ehθ ′ i ∈ EhXi. Since Θτ ′ ⊆ Θ, by 6. in Proposition 4 and by Proposition 13 it follows that Θτ ⊆ {⊥, θ ′ }⊔Θτ ⊆ Θ, so the induction hypothesis implies τ↾θ = τ↾max (θ]Θ . The rest follows noticing that θ ′ ⊑ θ iff θ ′ ⊑ max (θ]Θ , which is a consequence of the definition of max (θ]Θ because θ ′ ∈ {⊥, θ ′ } ⊆ {⊥, θ ′ } ⊔ Θτ ⊆ Θ (again by 6. in Proposition 4 and by Proposition 13). Alternatively, one could have also done the proof above by induction on τ , not on its length, but the proof would be more involved, because one would need to prove that the domain over which the property is universally quantified, namely “any τ ∈ EhXi∗ with Θτ ⊆ Θ” is inductively generated. We therefore preferred to choose a more elementary induction schema. 6. Algorithm for Online Parametric Trace Slicing Definition 11 illustrates a way to slice a parametric trace for given parameter bindings. However, it is not suitable for online trace slicing, where the trace is observed incrementally and no future knowledge is available, because we cannot know all possible parameter instances θ apriori. We next define an algorithm AhXi that takes a parametric trace τ ∈ EhXi∗ incrementally (i.e., event by event), and builds a partial function T ∈ [[X ⇁ V ] ⇁ E ∗ ] of finite domain that serves as a quick lookup table for all slices of τ . More precisely, Theorem 1 shows that, for any θ ∈ [X ⇁ V ], the trace slice τ↾θ is T(max (θ]Θ ) after AhXi processes τ , where Θ = Θτ is the domain of T, a finite lub closed set of partial functions also calculated by AhXi incrementally (see Definition 13 for Θτ ). Therefore, assuming that AhXi is run on trace τ , all one has to do in order to calculate a slice τ ↾θ for a given θ ∈ [X ⇁ V ] is to calculate max (θ]Θ followed by a lookup into T. This way the trace τ , which can 26 G. ROŞU AND F. CHEN Algorithm AhXi Input: parametric trace τ ∈ EhXi∗ Output: map T ∈ [[X ⇁ V ] ⇁ E ∗ ] and 1 2 3 4 5 6 7 set Θ ⊆ [X ⇁ V ] T ← ⊥; T(⊥) ← ǫ; Θ ← {⊥} foreach parametric event ehθi in order (first to last) in τ do .. foreach θ ′ ∈ {θ} ⊔ Θ do ... .. .. . T(θ ′ ) ← T(max (θ ′ ]Θ ) e . endfor ... . Θ ← {⊥, θ} ⊔ Θ endfor Figure 2: Parametric trace slicing algorithm AhXi. be very long, is processed/traversed only once, as it is being generated, and appropriate data-structures are maintained by our algorithm that allow for retrieval of slices for any parameter instance θ, without having to traverse the trace τ again, as an algorithm blindly following the definition of trace slicing (Definition 11) would do. Figure 2 shows our trace slicing algorithm AhXi. In spite of AhXi’s small size, its proof of correctness is surprisingly intricate, making use of almost all the mathematical machinery developed so far in the paper. The algorithm AhXi on input τ , written more succinctly AhXi(τ ), traverses τ from its first event to its last event and, for each encountered event ehθi, updates both its data-structures, T and Θ. After processing each event, the relationship between T and Θ is that the latter is the domain of the former. Line 1 initializes the datastructures: T is undefined everywhere (i.e., ⊥) except for the undefined-everywhere function ⊥, where T(⊥) = ǫ; as expected, Θ is then initialized to the set {⊥}. The code (lines 3 to 6) inside the outer loop (lines 2 to 7) can be triggered when a new event is received, as in most online runtime verification systems. When a new event is received, say ehθi, the mapping T is updated as follows: for each θ ′ ∈ [X ⇁ V ] that can be obtained by combining θ with the compatible partial functions in the domain of the current T, update T(θ ′ ) by adding the non-parametric event e to the end of the slice corresponding to the largest (i.e., most “knowledgeable”) entry in the current table T that is less informative or as informative as θ ′ ; the Θ data-structure is then extended in line 6 (see Proposition 13 for why this way). Example. Consider again the sample trace in Section 5 with events parametric in {a, b, c}, namely τ = e1 ha1 i e2 ha2 i e3 hb1 i e4 ha2 b1 i e5 ha1 i e6 hi e7 hb1 i e8 hc1 i e9 ha2 c1 i e10 ha1 b1 c1 i e11 hi. Table 1 shows how AhXi works on τ . An entry of the form hθi : w in a table cell corresponding to a current parametric event ehθi means that T(θ) = w after processing all the parametric events up to and including the current one; T is undefined on any other partial function. Obviously, the Θ corresponding to a cell is the union of all the θ’s that appear in pairs hθi : w in that cell. Note that, as each parametric event ehθi is processed, the non-parametric event e is added at most once to each slice, and that Θ stays lub closed.  AhXi computes trace slices for all combinations of parameter instances observed in parametric trace events. Its complexity is therefore O(n × m) where n is the length of the trace and m is the number of all possible parameter combinations. However, AhXi is not intended to be implemented directly; it is only used as a correctness backbone for other trace analysis algorithms, such as the monitoring algorithms discussed below. An alternative and PARAMETRIC MONITORING e1 ha1 i hi: ǫ ha1 i: e1 e2 ha2 i hi: ǫ ha1 i: e1 ha2 i: e2 e3 hb1 i hi: ǫ ha1 i: e1 ha2 i: e2 hb1 i: e3 ha1 b1 i: e1 e3 ha2 b1 i: e2 e3 e8 hc1 i hi: e6 ha1 i: e1 e5 e6 ha2 i: e2 e6 hb1 i: e3 e6 e7 ha1 b1 i: e1 e3 e5 e6 e7 ha2 b1 i: e2 e3 e4 e6 e7 hc1 i: e6 e8 ha1 c1 i: e1 e5 e6 e8 ha2 c1 i: e2 e6 e8 hb1 c1 i: e3 e6 e7 e8 ha1 b1 c1 i: e1 e3 e5 e6 e7 e8 ha2 b1 c1 i: e2 e3 e4 e6 e7 e8 e4 ha2 b1 i hi: ǫ ha1 i: e1 ha2 i: e2 hb1 i: e3 ha1 b1 i: e1 e3 ha2 b1 i: e2 e3 e4 e9 ha2 c1 i hi: e6 ha1 i: e1 e5 e6 ha2 i: e2 e6 hb1 i: e3 e6 e7 ha1 b1 i: e1 e3 e5 e6 e7 ha2 b1 i: e2 e3 e4 e6 e7 hc1 i: e6 e8 ha1 c1 i: e1 e5 e6 e8 ha2 c1 i: e2 e6 e8 e9 hb1 c1 i: e3 e6 e7 e8 ha1 b1 c1 i: e1 e3 e5 e6 e7 e8 ha2 b1 c1 i: e2 e3 e4 e6 e7 e8 e9 e5 ha1 i hi: ǫ ha1 i: e1 e5 ha2 i: e2 hb1 i: e3 ha1 b1 i: e1 e3 e5 ha2 b1 i: e2 e3 e4 27 e6 hi hi: e6 ha1 i: e1 e5 e6 ha2 i: e2 e6 hb1 i: e3 e6 ha1 b1 i: e1 e3 e5 e6 ha2 b1 i: e2 e3 e4 e6 e10 ha1 b1 c1 i hi: e6 ha1 i: e1 e5 e6 ha2 i: e2 e6 hb1 i: e3 e6 e7 ha1 b1 i: e1 e3 e5 e6 e7 ha2 b1 i: e2 e3 e4 e6 e7 hc1 i: e6 e8 ha1 c1 i: e1 e5 e6 e8 ha2 c1 i: e2 e6 e8 e9 hb1 c1 i: e3 e6 e7 e8 ha1 b1 c1 i: e1 e3 e5 e6 e7 e8 e10 ha2 b1 c1 i: e2 e3 e4 e6 e7 e8 e9 e7 hb1 i hi: e6 ha1 i: e1 e5 e6 ha2 i: e2 e6 hb1 i: e3 e6 ha1 b1 i: e1 e3 e5 e6 ha2 b1 i: e2 e3 e4 e6 e11 hi hi: e6 e11 ha1 i: e1 e5 e6 e11 ha2 i: e2 e6 e11 hb1 i: e3 e6 e7 e11 ha1 b1 i: e1 e3 e5 e6 e7 e11 ha2 b1 i: e2 e3 e4 e6 e7 e11 hc1 i: e6 e8 e11 ha1 c1 i: e1 e5 e6 e8 e11 ha2 c1 i: e2 e6 e8 e9 e11 hb1 c1 i: e3 e6 e7 e8 e11 ha1 b1 c1 i: e1 e3 e5 e6 e7 e8 e10 e11 ha2 b1 c1 i: e2 e3 e4 e6 e7 e8 e9 e11 Table 1: A run of the trace slicing algorithm AhXi (top-left table first, followed by bottomleft table, followed by the right table). apparently more efficient solution is to only record trace slices for parameter instances that actually appear in the trace (instead of for all combinations of them), and then construct the slice for a given parameter instance by combining such trace slices for compatible parameter instances. However, the complexity of constructing all possible trace slices at the end using such an algorithm is also O(n × m), so it would not bring any benefit overall compared to AhXi. In addition, AhXi is more suitable as a backbone for developing online monitoring algorithms such as those in Section 7, because each event is sent to its slices (that will be consumed by corresponding monitors) and never touched again. AhXi compactly and uniformly captures several special cases and subcases that are worth discussing. The discussion below can be formalized as an inductive (on the length of τ ) proof of correctness for AhXi, but we prefer to keep this discussion informal and give a rigorous proof shortly after. The role of this discussion is twofold: (1) to better explain the algorithm AhXi, providing the reader with additional intuition for its difficulty and compactness, and (2) to give a proof sketch for the correctness of AhXi. Let us first note that a partial function added to Θ will never be removed from Θ; that’s because Θ ⊆ {⊥, θ} ⊔ Θ. The same holds true for the domain of T, because line 4 can only add new elements to Dom(T); in fact, the domain of T is extended with precisely the set {θ} ⊔ Θ after each event parametric in θ is processed by AhXi. Moreover, since Dom(T) = Θ = Θǫ = {⊥} initially and since 5. and 7. in Proposition 4 imply Θ∪({θ}⊔Θ) = {⊥, θ} ⊔ Θ while Proposition 13 states that Θτ ehθi = {⊥, θ} ⊔ Θτ , we can inductively show that Dom(T) = Θ = Θτ each time after AhXi is executed on a parametric trace τ . Each θ ′ considered by the loop at lines 3-5 has the property that θ ⊑ θ ′ , and at (precisely) one iteration of the loop θ ′ is θ; indeed, θ ∈ {θ} ⊔ Θ because ⊥ ∈ Θ. Thanks to Proposition 14, Theorem 1 holds essentially iff T(θ ′ ) = τ↾θ′ after T(θ ′ ) is updated in line 4. A tricky observation which is crucial for this is that 3. in Proposition 8 implies that the 28 G. ROŞU AND F. CHEN updates of T(θ ′ ) do not interfere with each other for different θ ′ ∈ {θ} ⊔ Θ; otherwise the non-parametric event e may wrongly be added multiple times to some trace slices T(θ ′ ). Let us next informally argue, inductively, that it is indeed the case that T(θ ′ ) = τ↾θ′ after T(θ ′ ) is updated in line 4 (it vacuously holds on the empty trace). Since max (θ ′ ]Θ ∈ Θ, the inductive hypothesis tells us that T(max (θ ′ ]Θ ) = τ↾max (θ′ ]Θ ; these are further equal to τ↾θ′ by Proposition 14. Since θ ⊑ θ ′ , the definition of trace slicing implies that (τ ehθi)↾θ′ = τ↾θ′ e. Therefore, T(θ ′ ) is indeed (τ ehθi)↾θ′ after line 4 of AhXi is executed while processing the event ehθi that follows trace τ . This concludes our informal proof sketch; let us next give a rigorous proof of correctness for our trace slicing algorithm AhXi. Definition 14. Let AhXi(τ ).T and AhXi(τ ).Θ be the two data-structures (T and Θ) maintained by the algorithm AhXi in Figure 2 after it processes τ . Theorem 1. With the notation in Definition 14, the following hold for any τ ∈ EhXi∗ : (1) Dom(AhXi(τ ).T) = AhXi(τ ).Θ = Θτ ; (2) AhXi(τ ).T(θ) = τ↾θ for any θ ∈ AhXi(τ ).Θ; (3) τ↾θ = AhXi(τ ).T(max (θ]AhXi(τ ).Θ ) for any θ ∈ [X ⇁ V ]. Proof. Since AhXi processes the events in the input trace in order, when given the input τ ehθi, the Θ and T structures after AhXi processes τ but before it processes ehθi (i.e., right before the last iteration of the loop at lines 2-7) are precisely AhXi(τ ).Θ and AhXi(τ ).T, respectively. Further, the loop at lines 3-5 updates T on all θ ′ ∈ {θ} ⊔ Θ; in case T was not defined on such a θ ′ , then it will be defined after ehθi is processed. The definitional domain of T is thus continuously growing or potentially remains stationary as parametric events are processed, but it never decreases. With these observations, we can prove 1. by induction on τ . If τ = ǫ then Dom(AhXi(ǫ).T) = AhXi(ǫ).Θ = Θǫ = {⊥}. Suppose now that Dom(AhXi(τ ).T) = AhXi(τ ).Θ = Θτ holds for τ ∈ EhXi∗ , and let ehθi ∈ EhXi be any parametric event. Then the following concludes the proof of 1.: Dom(AhXi(τ ehθi).T) = = = = = = = Dom(AhXi(τ ).T) ∪ ({θ} ⊔ AhXi(τ ).Θ) AhXi(τ ).Θ ∪ ({θ} ⊔ AhXi(τ ).Θ) ({⊥} ⊔ AhXi(τ ).Θ) ∪ ({θ} ⊔ AhXi(τ ).Θ) {⊥, θ} ⊔ AhXi(τ ).Θ AhXi(τ ehθi).Θ {⊥, θ} ⊔ Θτ Θτ ehθi where the first equality follows from how the loop at lines 3-5 updates T, the second by the induction hypothesis, the third by 5. in Proposition 4, the fourth by 7. in Proposition 4, the fifth by how Θ is updated at line 6, the sixth again by the induction hypothesis, and, finally, the seventh by Proposition 13. Before we continue, let us first prove the following property: AhXi(τ ehθi).T(θ ′ ) = AhXi(τ ).T(max (θ ′ ]AhXi(τ ).Θ ) e for any ehθi ∈ EhXi and any θ ′ ∈ {θ} ⊔ AhXi(τ ).Θ. One should be careful here to not get tricked thinking that this property is straightforward, because it says only what line 4 of AhXi does. The complexity comes from the fact that if there were two different θ1 , θ2 ∈ {θ} ⊔ AhXi(τ ).Θ such that θ1 = max (θ2 ]AhXi(τ ).Θ , then an unfortunate enumeration of the partial functions θ ′ in {θ} ⊔ AhXi(τ ).Θ by the loop at lines 3-5 may lead to the non-parametric event e to be added twice to a slice: indeed, if θ1 is PARAMETRIC MONITORING 29 processed before θ2 , then e is first added to the end of T(θ1 ) when θ ′ = θ1 , and then T(θ1 ) e is assigned to T(θ2 ) when θ ′ = θ2 ; this way, T(θ2 ) ends up accumulating e twice instead of once, which is obviously wrong. Fortunately, since AhXi(τ ).Θ is lub closed (by 1. above and Proposition 12), 3. in Proposition 8 implies that there are no such different θ1 , θ2 ∈ {θ} ⊔ AhXi(τ ).Θ. Therefore, there is no interference between the various assignments at line 4, regardless of the order in which the partial functions θ ′ ∈ {θ} ⊔ Θ are enumerated, which means that, indeed, AhXi(τ ehθi).T(θ ′ ) = AhXi(τ ).T(max (θ ′ ]AhXi(τ ).Θ ) e for any ehθi ∈ EhXi and for any θ ′ ∈ {θ} ⊔ AhXi(τ ).Θ. This lack of interference between updates of T also suggests an important implementation optimization: The loop at lines 3-5 can be parallelized without duplicating the table T! Of course, the loop can be parallelized anyway if the table is duplicated and then merged within the original table, in the sense that all the writes to T(θ ′ ) are done in a copy of T. However, experiments show that the table T can be literally huge in real applications, in the order of billions of entries, so duplicating and merging it can be prohibitive. 2. can be now proved by induction on the length of τ . If τ = ǫ then AhXi(ǫ).Θ = {⊥}, so θ ′ ∈ AhXi(ǫ).Θ can only be ⊥; then AhXi(ǫ).T(⊥) = τ ↾⊥ = ǫ. Suppose now that AhXi(τ ).T(θ ′ ) = τ ↾θ′ for any θ ′ ∈ AhXi(τ ).Θ and let us show that AhXi(τ ehθi).T(θ ′ ) = (τ ehθi)↾θ′ for any θ ′ ∈ AhXi(τ ehθi).Θ. As shown in the proof of 1. above, AhXi(τ ehθi).Θ = AhXi(τ ).Θ ∪ ({θ} ⊔ AhXi(τ ).Θ), so we have two cases to analyze. First, if θ ′ ∈ {θ} ⊔ AhXi(τ ).Θ then θ ⊑ θ ′ and so (τ ehθi)↾θ′ = τ↾θ′ e; further, AhXi(τ ehθi).T(θ ′ ) = = = = AhXi(τ ).T(max (θ ′ ]AhXi(τ ).Θ ) e τ↾max (θ′ ]AhXi(τ ).Θ e τ↾θ′ e (τ ehθi)↾θ′ , where the first equality follows by the auxiliary property proved above, the second by the induction hypothesis using the fact that max (θ ′ ]AhXi(τ ).Θ ∈ AhXi(τ ).Θ, and the third by Proposition 14. Second, if θ ′ ∈ AhXi(τ ).Θ but θ ′ 6∈ {θ} ⊔ AhXi(τ ).Θ then θ 6⊑ θ ′ and so (τ ehθi)↾θ′ = τ↾θ′ ; furthermore, AhXi(τ ehθi).T(θ ′ ) = AhXi(τ ).T(θ ′ ) = τ↾θ′ = (τ ehθi)↾θ′ , where the first equality holds because θ ′ is not considered by the loop in lines 3-5 in AhXi, that is, θ ′ 6∈ {θ} ⊔ AhXi(τ ).Θ, and the second equality follows by the induction hypothesis, as θ ′ ∈ AhXi(τ ).Θ. Therefore, AhXi(τ ehθi).T(θ ′ ) = (τ ehθi)↾θ′ for any θ ′ ∈ AhXi(τ ehθi).Θ, which completes the proof of 2. 3. is the main result concerning our trace slicing algorithm and it follows now easily: τ↾θ = τ↾max (θ]Θτ = τ↾max (θ]AhXi(τ ).Θ = AhXi(τ ).T(max (θ]AhXi(τ ).Θ ) The first equality follows by Proposition 14, the second equality by 1. above, and the third equality by 2. above, because max (θ]AhXi(τ ).Θ ∈ AhXi(τ ).Θ. This concludes the correctness proof of our trace slicing algorithm AhXi. 30 G. ROŞU AND F. CHEN 7. Monitors and Parametric Monitors In this section we first define monitors M as a variant of Moore machines with potentially infinitely many states; then we define parametric monitors ΛX . M as monitors maintaining one state of M per parameter instance. Like for parametric properties, which turned out to be just properties over parametric traces, we show that parametric monitors are also just monitors, but for parametric events and with instance-indexed states and output categories. We also show that a parametric monitor ΛX . M is a monitor for the parametric property ΛX . P , with P the property monitored by M . 7.1. The Non-Parametric Case. We start by defining non-parametric monitors as a variant of (deterministic) Moore machine [29] that allows infinitely many states: Definition 15. A monitor M is a tuple (S, E, C, ι, σ : S × E → S, γ : S → C), where S is a set of states, E is a set of input events, C is a set of output categories, ι ∈ S is the initial state, σ is the transition function, and γ is the output function. The transition function is extended to σ : S × E ∗ → S as expected: σ(s, ǫ) = s and σ(s, we) = σ(σ(s, w), e) for any s ∈ S, e ∈ E, and w ∈ E ∗ . The notion of a monitor above is rather conceptual. Actual implementations of monitors need not generate all the state space apriori, but on a “by need” basis. Consider, for example, a monitor for a property specified using an NFA which performs an NFA-to-DFA construction on the fly, as events are received. Such a monitor generates only those states in the DFA that are needed by the monitored execution trace. Moreover, the monitor only needs to store one such state of the DFA, i.e., set of states in the NFA, namely the current one: once an event is received, the next state is (deterministically) computed and the old one is discarded. Therefore, assuming that one needs constant space to store a state of the original NFA, then the memory needed by this monitor is linear in the number of states of the NFA. An alternative and probably more conventional monitor could be one which generates the corresponding DFA statically, paying upfront the exponential price in both time and space. As empirically suggested by [35], if one is able to statically generate and store the corresponding DFA then one should most likely take this route, because in practice it tends to be much faster to jump to a known next state than to compute it. Allowing monitors with infinitely many states is a necessity in our context. Even though only a finite number of states is reached during any given (finite) execution trace, there is, in general, no bound on how many states are reached. For example, monitors for context-free grammars like the ones in [26] have potentially unbounded stacks as part of their state. Also, as shown shortly, parametric monitors have domains of functions as state spaces, which are infinite as well. Nevertheless, what is common to all monitors is that they can classify traces into categories. When a monitor does not have enough information about a trace to put it in a category of interest, we can assume that it actually categorizes it as a “don’t know” trace, where “don’t know” can be regarded as a special category; this is similar to regarding partial functions as total functions by adding a special “undefined” value in their codomain. The following is therefore natural: Definition 16. Monitor M = (S, E, C, ι, σ, γ) is a monitor for property P : E ∗ → C if and only if γ(σ(ι, w)) = P (w) for each w ∈ E ∗ . A property can be associated to each monitor, in a similar style to which we can associate a language to each automaton: PARAMETRIC MONITORING 31 Definition 17. Monitor M = (S, E, C, ι, σ, γ) defines the M -property PM : E ∗ → C as follows: PM (w) = γ(σ(ι, w)) for each w ∈ E ∗ . The following result is straightforward, it follows immediately from Definitions 16 and 17. The only reason we frame it as a numbered proposition is because we need to refer to it in the proof of Corollary 5. Proposition 15. With the notation in Definition 17, monitor M is indeed a monitor for its corresponding M -property PM . Moreover, a monitor can only be a monitor for one property, that is, if M is a monitor for property P then P = PM . Since we allow monitors to have infinitely many states, there is a strong correspondence between properties and monitors: Definition 18. Property P : E ∗ → C defines the P -monitor MP = (SP , E, C, ιP , σP , γP ) as follows: SP = E ∗ , ιP = ǫ, σP (w, e) = we for each w ∈ SP = E ∗ and e ∈ E, γP (w) = P (w) for each w ∈ SP = E ∗ . Thus, MP w holds traces as states, appends events to them as transition and, as output, it looks up the category of the corresponding trace using P . The following results are also straightforward and, again, we frame them as numbered propositions only because we will refer to them later. Proposition 16. With the notation in Definition 18, the monitor MP is indeed a monitor for property P . Proof. It follows from the sequence of equalities γP (σP (ιP , w)) = γP (σP (ǫ, w)) = γP (ǫw) = γP (w) = P (w). Proposition 17. With the notations in Definitions 17 and 18, PMP = P for any property P : E ∗ → C. Proof. PMP (w) = γP (σP (ιP , w)) = P (w) for any w ∈ E ∗ . The equality of monitors MPM = M does not hold for any monitor M ; it does hold when M = MP for some property P , though. Definition 19. Monitors M and M ′ are property equivalent, or just equivalent, written M ≡ M ′ , iff they are monitors for the same property (see Definition 16). With the notation in Definition 17, we have that M ≡ M ′ iff PM = PM ′ . Proposition 18. With the notations in Definitions 17 and 18, MPM ≡ M for any monitor M = (S, E, C, ι, σ, γ). Proof. By Definition 19, MPM ≡ M iff PMPM = PM , and the latter follows by Proposition 16 taking P to be PM . 32 G. ROŞU AND F. CHEN 7.2. The Parametric Case. We next define parametric monitors in the same style as the other parametric entities defined in this paper: starting with a base monitor and a set of parameters, the corresponding parametric monitor can be thought of as a set of base monitors running in parallel, one for each parameter instance. Definition 20. Given parameter set X with corresponding values V and a monitor M = (S, E, C, ι, σ : S × E → S, γ : S → C), we define the parametric monitor ΛX . M as the monitor ([[X ⇁ V ] → S], EhXi, [[X ⇁ V ] → C], λθ.ι, ΛX . σ, ΛX . γ), with defined as ΛX . σ : [[X ⇁ V ] → S] × EhXi → [[X ⇁ V ] → S] ΛX . γ : [[X ⇁ V ] → S] → [[X ⇁ V ] → C]  σ(δ(θ), e) if θ ′ ⊑ θ (ΛX . σ)(δ, ehθ ′ i)(θ) = δ(θ) if θ ′ 6⊑ θ (ΛX . γ)(δ)(θ) = γ(δ(θ)) for any δ ∈ [[X ⇁ V ] → S] and any θ, θ ′ ∈ [X ⇁ V ]. Therefore, a state δ of parametric monitor ΛX . M maintains a state δ(θ) of M for each parameter instance θ, takes parametric events as input, and outputs categories indexed by parameter instances (one output category of M per parameter instance). Proposition 19. If M is a monitor for P then parametric monitor ΛX . M is a monitor for parametric property ΛX . P , or, with the notation in Definition 17, PΛX . M = ΛX . PM . Proof. We show that (ΛX . γ)((ΛX . σ)(λθ.ι, τ )) = (ΛX . P )(τ ) for any τ ∈ EhXi∗ , i.e., after application on θ ∈ [X ⇁ V ], that γ((ΛX . σ)(λθ.ι, τ )(θ)) = P (τ ↾θ ) for any τ ∈ EhXi∗ and θ ∈ [X ⇁ V ]. Since M is a monitor for P , it suffices to show that (ΛX . σ)(λθ.ι, τ )(θ) = σ(ι, τ↾θ ) for any τ ∈ EhXi∗ and θ ∈ [X ⇁ V ]. We prove it by induction on τ . If τ = ǫ then (ΛX . σ)(λθ.ι, ǫ)(θ) = (λθ.ι)(θ) = ι = σ(ι, ǫ) = σ(ι, ǫ↾θ ). Suppose that (ΛX . σ)(λθ.ι, τ )(θ) = σ(ι, τ ↾θ ) for some arbitrary but fixed τ ∈ EhXi∗ and for any θ ∈ [X ⇁ V ], and let ehθ ′ i be any parametric event in EhXi and let θ ∈ [X ⇁ V ] be any parameter instance. The inductive step is then as follows: (ΛX . σ)(λθ.ι, τ ehθ ′ i)(θ) = (ΛX . σ)((ΛX . σ)(λθ.ι, τ ), ehθ ′ i)(θ) ′ = (ΛX  . σ)(σ(ι, τ↾θ ), ehθ i)(θ) σ(σ(ι, τ↾θ ), e) if θ ′ ⊑ θ = if θ ′ 6⊑ θ  σ(ι, τ↾θ ) σ(ι, τ↾θ e) if θ ′ ⊑ θ = σ(ι, τ↾θ ) if θ ′ 6⊑ θ ′ = σ(ι, (τ ehθ i)↾θ ) The first equality above follows by the second part of Definition 15), the second by the induction hypothesis, the third by Definition 20, the fourth again by the second part of Definition 15, and the fifth by Definition 11. This concludes our proof. PARAMETRIC MONITORING Algorithm BhXi(M = (S, E, C, ι, σ, γ)) Input: finite parametric trace τ ∈ EhXi∗ Output: mapping Γ : [[X ⇁ V ] ⇁ C] and set 1 2 3 4 5 6 7 8 33 Θ ⊆ [X ⇁ V ] ∆ ← ⊥; ∆(⊥) ← ι; Θ ← {⊥} in order in τ do foreach parametric event ehθi .. . foreach θ ′ ∈ {θ} ⊔ Θ do .. ... ... ... . .. ∆(θ ′ ) ← σ(∆(max (θ ′ ]Θ ), e) ... // a message may be output here . Γ(θ ′ ) ← γ(∆(θ ′ )) endfor Θ ← {⊥, θ} ⊔ Θ endfor Figure 3: Parametric monitoring algorithm BhXi 8. Algorithms for Parametric Trace Monitoring We next propose two monitoring algorithms for parametric properties. Our unoptimized but easier to understand algorithm is easily derived from the parametric trace slicing algorithm in Figure 2. Our second algorithm is an online optimization of the first, which significantly reduces the size of the search space for compatible parameter instances when a new event is received. 8.1. Unoptimized but Simpler Algorithm. Analyzing the definition of a parametric monitor (Definition 20), the first thing we note is that its state space is not only infinite, but it is not even enumerable. Therefore, a first challenge in monitoring parametric properties is how to represent the states of the parametric monitor. Inspired by the algorithm for trace slicing in Figure 2, we encode functions [[X ⇁ V ] ⇁ S] as tables with entries indexed by parameter instances in [X ⇁ V ] and with contents states in S. Following similar arguments as in the proof of the trace slicing algorithm, such tables will have a finite number of entries provided that each event instantiates only a finite number of parameters. Figure 3 shows our monitoring algorithm for parametric properties. Given parametric property ΛX . P and M a monitor for P , BhXi(M ) yields a monitor that is equivalent to ΛX . M , that is, a monitor for ΛX . P . Section 9 shows one way to use this algorithm: a monitor M is first synthesized from the base property P , then that monitor M is used to synthesize the monitor BhXi(M ) for the parametric property ΛX . P . BhXi(M ) follows very closely the algorithm for trace slicing in Figure 2, the main difference being that trace slices are processed, as generated, by M : instead of calculating the trace slice of θ ′ by appending base event e to the corresponding existing trace slice in line 4 of AhXi, we now calculate and store in table ∆ the state of the monitor instance corresponding to θ ′ by sending e to the corresponding existing monitor instance (line 4 in BhXi(M )); at the same time we also calculate the output corresponding to that monitor instance and store it in table Γ. In other words, we replace trace slices in AhXi by local monitors processing online those slices. In our implementation in Section 9, we also check whether Γ(θ ′ ) at line 5 violates the property and, if so, an error message including θ ′ is output to the user. 34 G. ROŞU AND F. CHEN Definition 21. Given τ ∈ EhXi∗ , let BhXi(M )(τ ).Θ and BhXi(M )(τ ).∆ and BhXi(M )(θ).Γ be the three data-structures maintained by the algorithm BhXi(M ) in Figure 3 after processing τ . Let ⊥ 7→ ι = BhXi(M )(ǫ).∆ ∈ [[X ⇁ V ] ⇁ S] be the partial map taking ⊥ ∈ [X ⇁ V ] to ι and undefined elsewhere. Corollary 4. The following hold for any τ ∈ EhXi∗ : (1) Dom(BhXi(M )(τ ).∆) = BhXi(M )(τ ).Θ = Θτ ; (2) BhXi(M )(τ ).∆(θ) = σ(ι, τ↾θ ) and BhXi(M )(τ ).Γ(θ) = γ(σ(ι, τ↾θ )) for any θ ∈ BhXi(M )(τ ).Θ; (3) σ(ι, τ↾θ ) = BhXi(M )(τ ).∆(max (θ]BhXi(M )(τ ).Θ ) and γ(σ(ι, τ↾θ )) = BhXi(M )(τ ).Γ(max (θ]BhXi(M )(τ ).Θ ) for any θ ∈ [X ⇁ V ]. Proof. Follows from Theorem 1 and the discussion above. We next show how to associate a formal monitor to the algorithm BhXi(M ) in Figure 3: Definition 22. For the algorithm BhXi(M ) in Figure 3, let MBhXi(M ) = (R, EhXi, [[X ⇁ V ] → C], ⊥ 7→ ι, next, out) be the monitor defined as follows: • R ⊆ [[X ⇁ V ] ⇁ S] is the set {BhXi(M )(τ ).∆ | τ ∈ EhXi∗ } of reachable ∆’s in BhXi(M ), and • next : R × EhXi → R and out : R → [[X ⇁ V ] → C] are functions defined as follows, where τ ∈ EhXi∗ , e ∈ E, and θ ∈ [X ⇁ V ]: next(BhXi(M )(τ ).∆, ehθi) = BhXi(M )(τ ehθi).∆, and out(BhXi(M )(τ ).∆)(θ) = BhXi(M )(τ ).Γ(max (θ]BhXi(M )(τ ).Θ ). Theorem 2. MBhXi(M ) ≡ ΛX . M for any monitor M . Proof. All we have to do is to show that, for any τ ∈ EhXi∗ , out(next(⊥ 7→ ι, τ )) and (ΛX . γ)((ΛX . σ)(λθ.ι, τ )) are equal as total functions in [[X ⇁ V ] → C]. Let θ ∈ [X ⇁ V ]; then: out(next(⊥ 7→ ι, τ ))(θ) = out(BhXi(M )(τ ).∆)(θ) = BhXi(M )(τ ).Γ(max (θ]BhXi(M )(τ ).Θ ) = γ(σ(λθ.ι, τ↾θ )) = γ((ΛX . σ)(λθ.ι, τ )(θ)) = (ΛX . γ)((ΛX . σ)(λθ.ι, τ ))(θ). The first equality above follows inductively by the definition of next (Definition 22), noticing that ⊥ 7→ ι = BhXi(M )(ǫ).∆. The second equality follows by the definition of out (Definition 22) and the third by 3. in Corollary 4. The fourth equality above follows inductively by the definition of ΛX . σ (Definition 20) and has already been proved as part of the proof of Proposition 19. Finally, the fifth equality follows by the definition of ΛX . γ (Definition 20). Therefore, MBhXi(M ) and ΛX . M define the same property. PARAMETRIC MONITORING 35 Algorithm ChXi(M = (S, E, C, ι, σ, γ)) Globals: mapping ∆ : [[X ⇁ V ] ⇁ S] and mapping U : [X ⇁ V ] → Pf ([X ⇁ V ]) and mapping Γ : [[X ⇁ V ] ⇁ C] Initialization: U (θ) ← ∅ for any θ ∈ [X ⇁ V ], ∆(⊥) ← ι function main(ehθi) 1 if ∆(θ)undefined then . 2 .. foreach θmax ⊏ θ (in reversed topological order) do .. .. 3 . . if ∆(θmax ) defined then . . . 4 .. .. .. goto 7 . . 5 .. .. endif .. 6 . endfor . 7 .. defineTo(θ, θmax ) . 8 .. foreach θmax ⊏ θ (in reversed topological order) do . . 9 .. .. foreach θcomp ∈ U (θmax ) that is compatible with θ do .. .. .. 10 . . . if ∆(θcomp ⊔ θ) undefined then . . . . 11 .. .. .. .. defineTo(θcomp ⊔ θ, θcomp ) . . . 12 .. .. .. endif . . 13 .. .. endfor .. 14 . endfor 15 endif 16 foreach θ ′ ∈ {θ} ∪ U (θ) do 17 18 19 .. ∆(θ ′ ) ← σ(∆(θ ′ ), e) ... . Γ(θ ′ ) ← σ(∆(θ ′ )) endfor function defineTo(θ, θ ′ ) 1 2 3 4 ∆(θ) ← ∆(θ ′ ) foreach θ ′′ ⊏ θ do .. . U (θ ′′ ) ← U (θ ′′ ) ∪ {θ} endfor Figure 4: Online parametric monitoring algorithm ChXi Corollary 5. If M is a monitor for P and X is a set of parameters, then MBhXi(M ) is a monitor for parametric property ΛX . P . Proof. With the notation in Definition 17, Theorem 2 implies that PMBhXi(M ) = PΛX . M . By Proposition 19 we have that PΛX . M = ΛX . PM . Finally, since P = PM by Proposition 15, we conclude that PMBhXi(M ) = ΛX . P . 8.2. Optimized Algorithm. Algorithm ChXi in Figure 4 refines Algorithm BhXi in Figure 3 for efficient online monitoring. Since no complete trace is given in online monitoring, ChXi focuses on actions to carry out when a parametric event ehθi arrives; in other words, it essentially expands the body of the outer loop in BhXi (lines 3 to 7 in Figure 3). The 36 G. ROŞU AND F. CHEN direct use of BhXi would yield prohibitive runtime overhead when monitoring large traces, because its inner loop requires search for all parameter instances in Θ that are compatible with θ; this search can be very expensive. ChXi introduces an auxiliary data structure and illustrates a mechanical way to accomplish the search, which also facilitates further optimizations. While BhXi did not require that θ in ehθi be of finite domain, ChXi needs that requirement in order to terminate. Note that in practice Dom(θ) is always finite (because the program state is finite). ChXi uses three tables: ∆, U and Γ. ∆ and Γ are the same as ∆ and Γ in BhXi, respectively. U is an auxiliary data structure used to optimize the search “for all θ ′ ∈ {θ} ⊔ Θ” in BhXi (line 3 in Figure 3). It maps each parameter instance θ into the finite set of parameter instances encountered in ∆ so far that are strictly more informative than θ, i.e., U (θ) = {θ ′ | θ ′ ∈ Dom(∆) and θ ⊏ θ ′ }. Another major difference between BhXi and ChXi is that ChXi does not maintain Θ during computation; instead, Θ is implicitly captured by the domain of ∆ in ChXi. Intuitively, the Θ at the beginning/end of the body of the outer loop in BhXi is the Dom(∆) at the beginning/end of ChXi, respectively. However, Θ is fixed during the loop at lines 3 to 6 in BhXi and updated atomically in line 7, while Dom(∆) can be changed at any time during the execution of ChXi. ChXi is composed of two functions, main and defineTo. The defineTo function takes two parameter instances, θ and θ ′ , and adds a new entry corresponding to θ into ∆ and U . Specifically, it sets ∆(θ) to ∆(θ ′ ) and adds θ into the set U (θ ′′ ) for each θ ′′ ⊏ θ. The main function differentiates two cases when a new event ehθi is received and processed. The simpler case is that ∆ is already defined on θ, i.e., θ ∈ Θ at the beginning of the iteration of the outer loop in BhXi. In this case, {θ} ⊔ Θ = {θ ′ | θ ′ ∈ Θ and θ ⊑ θ ′ } ⊆ Θ, so the lines 3 to 6 in BhXi become precisely the lines 16 to 19 in ChXi. In the other case, when ∆ is not already defined on θ, main takes two steps to handle e. The first step searches for new parameter instances introduced by {θ} ⊔ Θ and adds entries for them into ∆ (lines 2 to 14). We first add an entry to ∆ for θ at lines 2 to 7. Then we search for all parameter instances θcomp that are compatible with θ, making use of U (lines 8 and 9); for each such θcomp , an appropriate entry is added to ∆ for its lub with θ, and U updated accordingly (lines 10 to 12). This way, ∆ will be defined on all the new parameter instances introduced by {θ} ⊔ Θ after the first step. In the second step, the related monitor states and outputs are updated in a similar way as in the first case (lines 16 to 19). It is interesting to note how ChXi searches at lines 2 and 8 for the parameter instance max (θ]Θ that BhXi refers to at line 4 in Figure 3: it enumerates all the θmax ⊏ θ in reversed topological order (from larger to smaller); 1. in Proposition 8 guarantees that the maximum exists and, since it is unique, our search will find it. Correctness of ChXi. We prove the correctness of ChXi by showing that it is equivalent to the body of the outer loop in BhXi. Suppose that parametric trace τ has already been processed by both ChXi and BhXi, and a new event ehθi is to be processed next. Let us first note that ChXi terminates if Dom(θ) is finite. Indeed, if Dom(θ) is finite then there is only a finite number of partial maps less informative than θ, that is, only a finite number of iterations for the loops at lines 2 and 8 in main; since U is only updated at line 3 in defineTo, U (θ) is finite for any θ ∈ [X ⇁ V ] and thus the loop at line 9 in main also terminates. Assuming that running the base monitor M takes constant time, the worst case complexity of ChXi(M ) is O(k × l) to process ehθi, where k is 2|Dom(θ)| and l is the number of incompatible parameter instances in τ . Parametric properties often have a fixed and PARAMETRIC MONITORING 37 small number of parameters, in which case k is not significant. Depending on the trace, l can unavoidably grow arbitrarily large; in the worst case, each event may carry an instance incompatible with the previous ones. Lemma 1. In the algorithm ChXi in Figure 4, U (θ) = {θ ′ | θ ′ ∈ Dom(∆) and θ ⊏ θ ′ } before and after each execution of defineTo, for all θ ∈ [X ⇁ V ]. Proof. By how ChXi is initialized, for any θ ∈ [X ⇁ V ] we have ∅ = U (θ) = {θ ′ | θ ′ ∈ Dom(∆) and θ ⊏ θ ′ } before the first execution of defineTo. Now suppose that U (θ) = {θ ′ | θ ′ ∈ Dom(∆) and θ ⊏ θ ′ } for any θ ∈ [X ⇁ V ] before an execution of defineTo and show that it also holds after the execution of defineTo. Since defineTo(θ, θ ′ ) adds a new parameter instance θ into Dom(∆) and also adds θ into the set U (θ ′′ ) for any θ ′′ ∈ [X ⇁ V ] with θ ′′ ⊏ θ, we still have U (θ) = {θ ′ | θ ′ ∈ Dom(∆) and θ ⊏ θ ′ } for any θ ∈ [X ⇁ V ] after the execution of defineTo. Also, the only way ChXi can add a new parameter instance θ into Dom(∆) is by using defineTo. Therefore the lemma holds. The next theorem proves the correctness of ChXi. Before we state and prove it, let us recall some previously introduced notation and also introduce some new useful notation. First, recall from Definition 21 that BhXi(M )(τ ).∆ and BhXi(M )(τ ).Γ are the ∆ and Γ data-structures of BhXi(M ) after it processes trace τ . Also, recall that we fixed parametric trace τ and event ehθi. For clarity, let UC , ∆C , and ΓC be the three data-structures maintained by ChXi(M ) (in other words, we index the data-structures with the symbol C). Let ∆bC and ΓbC be the ∆C and ΓC when main(ehθi) begins (“b” stays for “at the beginning”); let ∆eC and ΓeC be the ∆C and ΓC when main(ehθi) ends (“e” stays for “at the end”; and let ∆m C and UCm be the ∆C and UC when main(ehθi) reaches line 16 (“m stays for “in the middle”). Theorem 3. The following hold: b (1) Dom(∆m C ) = {⊥, θ} ⊔ Dom(∆C ); ′ m ′ m ′ (2) ∆m C (θ ) = ∆C (max(θ ]Dom(∆b )), for all θ ∈ Dom(∆C ); C (3) If ∆bC = BhXi(M )(τ ).∆ and ΓbC = BhXi(M )(τ ).Γ, then ∆eC = BhXi(M )(τ ehθi).∆ and ΓbC = BhXi(M )(τ ehθi).Γ. Proof. Let ΘC = Dom(∆bC ) = Dom(∆B (τ )) and ∆B (τ ) = BhXi(M )(τ hθi).∆ for simplicity. 1. There are two cases to analyze, depending upon whether θ is in ΘC or not. If θ ∈ ΘC then the lines 2 to 14 are skipped and Dom(∆C ) remains unchanged, that is, {⊥, θ} ⊔ ΘC = ΘC = Dom(∆bC ) = Dom(∆m / ΘC then lines 2 to 14 C ) when main(ehθi) reaches line 16. If θ ∈ are executed to add new parameter instances into Dom(∆C ). First, an entry for θ will be added to ∆C at line 7. Second, an entry for θcomp ⊔ θ will be added to ∆C at line 11 (if ∆C not already defined on θcomp ⊔ θ) eventually for any θcomp ∈ ΘC compatible with θ: that is because θmax can also be ⊥ at line 8, in which case Lemma 1 implies that U (θmax ) = ΘC . Therefore, when line 16 is reached, Dom(∆m C ) is defined on all the parameter instances in {θ} ∪ ({θ} ⊔ ΘC ). Since ⊥ ∈ ΘC , the latter equals {θ} ⊔ ΘC , and since ∆m C remains defined on ΘC , we conclude that ∆m is defined on all instances in ({θ} ⊔ Θ ) ∪ ΘC , which by 5. C C and 7. in Proposition 4 equals {⊥, θ} ⊔ ΘC . 2. We analyze the same two cases as above. If θ ∈ ΘC then lines 2 to 14 are skipped and Dom(∆C ) remains unchanged. Then max (θ ′ ]ΘC = θ ′ for each θ ′ ∈ Dom(∆m C ), so the result follows. Suppose now that θ ∈ / ΘC . By 1. and its proof, each θ ′ ∈ Dom(∆m C ) is either in ΘC or otherwise in ({θ} ⊔ ΘC ) − ΘC . The result immediately holds when θ ′ ∈ ΘC as 38 G. ROŞU AND F. CHEN max (θ ′ ]ΘC = θ ′ and ∆(θ ′ ) stays unchanged until line 16. If θ ′ ∈ ({θ} ⊔ ΘC ) − ΘC then ∆(θ ′ ) is set at either line 7 (θ ′ = θ) or at line 11 (θ ′ 6= θ): (a) For line 7, the loop at lines 2 to 6 checks all the parameter instances that are less informative than θ to find the first one in ΘC in reversed topological order (i.e., if θ1 ⊏ θ2 then θ2 will be checked before θ1 ). Since by 1. in Proposition 8 we know that max (θ]ΘC ∈ ΘC exists (and it is unique), the loop at lines 2 to 6 will break precisely when θmax = max (θ]ΘC , so the result holds when θ ′ = θ because of the entry introduced for θ in ∆C at line 7 and because the remaining lines 8 to 14 do not change ∆C (θ). (b) When ∆C (θ ′ ) is set at line 11, note that the loop at lines 8 to 14 also iterates over all θmax ⊏ θ in reversed topological order, so θ ′ = θcomp ⊔ θ for some θcomp ∈ ΘC compatible ′ with θ such that θmax ⊏ θcomp , where θmax ⊏ θ is such that there is no other θmax with ′ ′ ′ ′ θmax ⊏ θmax ⊏ θ and θ = θcomp ⊔ θ for some θcomp ∈ ΘC compatible with θ such that ′ ′ . We claim that there is only one such θcomp , which is precisely max (θ ′ ]ΘC : ⊏ θcomp θmax ′ ′ Let θcomp be the parameter instance max (θ ′ ]ΘC . The above implies that θcomp ⊑ θcomp ⊑ θ′. ′ ′ ′ ′ Also, θcomp ⊔ θ = θ ′ because θ ′ = θcomp ⊔ θ ⊑ θcomp ⊔ θ ⊑ θ ′ . Let θmax be θcomp ⊓ θ, that is, ′ ′ ′ the largest with θmax ⊑ θcomp and θmax ⊑ θ (we let its existence as exercise). It is relatively ′ ′ easy to see now that θcomp ⊏ θcomp implies θmax ⊏ θmax (we let it as an exercise, too), which contradicts the assumption of this case that ∆C was not defined on θ ′ . Therefore, θcomp = max (θ ′ ]ΘC before line 11 is executed, which means that, after line 11 is executed, ∆C (θ ′ ) = ∆C (max (θ ′ ]ΘC ); moreover, none of these will be changed anymore until line 16 is reached, which proves our result. 3. Since Γ is updated according to ∆ in both ChXi and BhXi, it is enough to prove that ∆eC = ∆B (τ e). For BhXi, we have 1) Dom(∆B (τ e)) = {⊥, θ} ⊔ ΘC = ({θ} ⊔ ΘC ) ∪ ΘC ; 2) ∀ θ ′ ∈ {θ} ⊔ ΘC , ∆B (τ e)(θ ′ ) = σ(∆B (τ )(max, (θ ′ ]ΘC ), e); 3) ∀ θ ′ ∈ ΘC − {θ} ⊔ ΘC , ∆B (τ e)(θ ′ ) = ∆B (τ )(θ ′ ). So we only need to prove that 1) Dom(∆eC ) = {⊥, θ} ⊔ ΘC ; 2) ∀ θ ′ ∈ {θ} ⊔ ΘC , ∆eC (θ ′ ) = σ(∆bC (max, (θ ′ ]ΘC ), e); 3) ∀ θ ′ ∈ ΘC − {θ} ⊔ ΘC , ∆eC (θ ′ ) = ∆bC (θ ′ ). By 1., we have Dom(∆m C ) = {⊥, θ} ⊔ ΘC . Since lines 16 to 19 do not change Dom(∆C ), Dom(∆eC ) = Dom(∆m ) = {⊥, θ} ⊔ ΘC . 1) holds. C ′ b ′ ′ m By 2. and Lemma 1, ∆m C (θ ) = ∆C (max, (θ ]ΘC ) for any θ ∈ Dom(∆C ). Also, notice that line 17 sets ∆C (θ ′ ) to σ(∆C (θ ′ ), e), which is σ(∆bC (max, (θ ′ ]ΘC ), e), for the θ ′ in the loop. So, to show 2) and 3), we only need to prove that the loop at line 16 to 19 iterates over {θ} ⊔ ΘC . Since lines 16 to 19 do not change UC , we need to show {θ} ∪ UCm (θ) = {θ} ⊔ ΘC . m Since Dom(∆m C ) = {⊥, θ} ⊔ ΘC , we have {θ} ⊔ Dom(∆C ) = {θ} ⊔ ({⊥, θ} ⊔ ΘC ) = {θ} ⊔ m (({θ} ⊔ ΘC ) ∪ ΘC ). By Proposition 4, {θ} ⊔ Dom(∆C ) = ({θ} ⊔ ({θ} ⊔ ΘC )) ∪ ({θ} ⊔ ΘC ) = m ′ ({θ} ⊔ ΘC ) ∪ ({θ} ⊔ ΘC) = {θ} ⊔ ΘC. Also, as θ ∈ Dom(∆m C ), we have {θ} ⊔ Dom(∆C ) = {θ | ′ m ′ m m θ ∈ Dom(∆C ) and θ ⊑ θ } = {θ} ⊔ UC (θ) by Lemma 1. So {θ} ∪ UC (θ) = {θ} ⊔ ΘC . We conclude this section with a discussion on the complexity of the parametric monitoring algorithms AhXi and ChXi above. Note that, in the worst case, to process a newly received parametric event ehθi after AhXi or ChXi has already processed a parametric trace τ , each of AhXi or ChXi takes at least linear time/space in the number of θ-compatible parameter instances occurring in events in τ . Indeed, AhXi iterates explicitly through all PARAMETRIC MONITORING 39 such parameter instances (line 3 in Figure 3), while ChXi optimizes this traversal by only enumerating through maximal parameter instances; in the worst case, we can assume that τ is such that each event comes with a new parameter instance which is maximal, so in the worst case AhXi and ChXi can take linear time/space in τ to process ehθi, which is, nevertheless, bad. Indeed, it means that monitoring some traces is incrementally slower (with no upper bound) as events are received, until the monitor eventually runs out of resources. Unfortunately, there is nothing to be fundamentally done to avoid the problem above. It is an inherent problem of parametric monitoring. Consider, for example, the “authenticate before use” parametric property specified in Section 2.2 using parametric LTL as Λk . (usehki → ⋄· authenticatehki); to make it clear that events depend on the parameter key k, we tagged them with the key. Without any knowledge about the semantics of the program to monitor, any monitor for this property must store all the authenticated keys, i.e., all the instances of the parameter k. Indeed, without that, there is no way to know whether a key instance has been authenticated or not when a use event is observed on that key. The number of such key instances is theoretically unbounded, so, in the worst case, any monitor for this property can be incrementally slower and eventually run out of resources. As seen in Section 9, the runtime overhead due to opaque monitoring of parametric properties tends to be manageable in practice. By “opaque” we mean that no semantic information about the source code of the monitored program is used. If the lack of an efficiency guarantee is a problem in some applications, then the alternative is to statically analyze the monitored program and to use the obtained semantic information to eliminate the need for monitoring. For example, static analyses like those in [25, 10, 12, 18] may significantly reduce the need for instrumentation, even eliminate it completely. Moreover, model-checking techniques for parametric properties could also be used for actually proving that the properties hold and thus they need not be monitored; however, we are not aware of model checking approaches to verifying parametric properties as presented in this paper. 9. Implementation in JavaMOP and RV The discussed parametric monitoring technique is now fully implemented in two runtime verification systems, namely in JavaMOP (see http://javamop.org) and in RV [27] (developed by a startup company, Runtime Verification, Inc.; the RV system is currently publicly unavailable – contact the first author for an NDA-protected version of RV). Here we first informally discuss several optimizations implemented in the two runtime verification systems, and then we discuss our experiments and the evaluation of the two systems. 9.1. Implementation Optimizations. Both JavaMOP and RV apply several optimizations to the algorithm ChXi in Section 8.2, to reduce its runtime overhead. These are not discussed in depth here, because they are orthogonal to the main objective of this paper. 9.1.1. Optimizations in JavaMOP. Note that ChXi iterates through all the possible parameter instances that are less informative than θ in three different loops: at lines 2 and 8 in the main function, and at line 2 in the defineTo function. Hence, it is important to reduce the number of such instances in each loop. Even though our semantics and theoretical algorithms for parametric monitoring in this paper work with infinite sets of parameters, our current implementation in JavaMOP assumes that the set of parameters X is bounded and fixed apriori (declared as part of the specification to monitor). A simple analysis of the 40 G. ROŞU AND F. CHEN events appearing in the specification allows to quickly detect parameter instances that can never appear as lubs of instances of parameters carried by events; maintaining any space for those in ∆, or Γ, or iterating over them in the above mentioned loops, is a waste. For example, if a specification contains only two event definitions, e1 hp1 i and e2 hp1 , p2 i, parameter instances defining only parameter p2 can never appear as lubs of observed parameter instances. A static analysis of the specification, discussed in [13, 10], exhaustively explores all possible event combinations that can lead to situations of interest to the property, such as to violation, validation, etc. Such information is useful to reduce the number of loop iterations by skipping iterations over parameter instances that cannot affect the result of monitoring. These static analyses are currently used at compile time in our new JavaMOP implementation to unroll the loops in ChXi and reduce the size of ∆ and U . Another optimization is based on the observation that it is convenient to start the monitoring process only when certain events are received. Such events are called monitor creation events in [14]. The parameter instances carried by such creation events may also be used to reduce the number of parameter instances that need to be considered. An extreme, yet surprisingly common case is when creation events instantiate all the property parameters. In this case, the monitoring process does not need to search for compatible parameter instances even when an event with an incomplete parameter instance is observed. The old JavaMOP [14] supported only traces whose monitoring started with a fully instantiated monitor creation event; this was perceived (and admitted) as a performance-tradeoff limitation of JavaMOP [4] (and [14]). Interestingly, it now becomes just a common-case optimization of our novel, general and unrestricted technique presented here. 9.1.2. Optimizations in RV. The RV system implements all the optimizations in JavaMOP and adds two other important optimizations that significantly reduce the overhead. The first additional optimization of RV is a non-trivial garbage-collector [20]. Note that JavaMOP also has a garbage collector, but it only does the obvious: it garbage collects a monitor instance only when all its corresponding parameter instances are collected. RV performs a static analysis of the property to monitor and, based on that, it garbage collects a monitor instance as soon as it realizes that it can never trigger in the future. This can happen when any triggering behavior needs at least one event that can only be generated in the presence of a parameter instance that is already dead. Consider, for example, the safe iterator example in Section 2.3, and consider that iterator i7 is created for collection c3 . Then a monitor instance corresponding to the parameter instance hc3 i7 i is created and manged. Suppose that, at some moment, the iterator i7 is garbage collected by the JVM. Can the monitor instance corresponding to hc3 i7 i be garbage collected? Not in JavaMOP, because, for safety, JavaMOP collects a monitor only when all its parameter instances are collected, and in this case c3 is still alive. However, this monitor is flagged for garbage collection in RV. The rationale for doing so is that the only way for the monitor to trigger is to eventually encounter a next event with i7 as parameter, but that event can never be generated because i7 is dead. Note, on the other hand, that the monitor hc3 i7 i cannot be garbage collected if c3 is collected but i7 is still alive, because the iterator alone can still violate the safe-iterator property, even if its corresponding collection is already dead. Runtime verification systems like JavaMOP and Tracematches use off-the-shelf weak reference libraries to implement their garbage collectors. However, it turns out that these libraries, in order to be general and thus serve their purpose, perform many checks that are unnecessary in the context of monitoring. The second optimization of RV in addition PARAMETRIC MONITORING 41 to those of JavaMOP consists of a collection of data structures based on weak references, which was carefully engineered to take full advantage of the particularities of monitoring parametric properties. These data structures allow for effective indexing and lazy collection of monitors, to minimize the number of expensive traversals of the entire pool of monitors. Moreover, RV caches monitor instances to save time when the same monitor instances are accessed frequently. For example, there is a high chance that the same iterator is accessed several times consecutively by a program, in which case saving and then retrieving the same corresponding monitor instances from the data-structures at each iterator access can take considerable unnecessary overhead. 9.2. Experiments and Evaluation. We next discuss our experience with using the two runtime verification systems that implement optimized variants of the parametric property monitoring techniques describe in this paper. Also, we compare their performance with that of Tracematches, which is, at our knowledge, the most efficient runtime verification system besides JavaMOP and RV. Recall that Tracematches achieves virtually the same semantics of parametric monitoring like ours, but using a considerably different approach. 9.2.1. Experimental Settings. We used a Pentium 4 2.66GHz / 2GB RAM / Ubuntu 9.10 machine and version 9.12 of the DaCapo (DaCapo 9.12) benchmark suite [8], the most upto-date version. We also present some of the results of our experiments using the previous version of DaCapo, 2006-10 MR2 (DaCapo 2006-10), namely those for the bloat and jython benchmarks. DaCapo 9.12 does not provide the bloat benchmark from the DaCapo 2006-10, which we favor because it generates large overheads when monitoring iterator-based properties. The bloat benchmark with the UnsafeIter specification causes 19194% runtime overhead (i.e., 192 times slower) and uses 7.7MB of heap memory in Tracematches, and causes 569% runtime overhead and uses 147MB in JavaMOP, while the original program uses only 4.9MB. Also, although the DaCapo 9.12 provides jython, Tracematches cannot instrument jython due to an error that we were not able to understand or fix. Thus, we present the result of jython from the DaCapo 2006-10. The default data input for DaCapo was used and the -converge option to obtain the numbers after convergence within ±3%. Instrumentation introduces a different garbage collection behavior in the monitored program, sometimes causing the program to slightly outperform the original program; this accounts for the negative overheads seen in both runtime and memory. We used the Sun JVM 1.6.0 for the entire evaluation. The AspectJ compiler (ajc) version 1.6.4 is used for weaving the aspects generated by JavaMOP and RV into the target benchmarks. Another AspectJ compiler, abc [3] 1.3.0, is used for weaving Tracematches properties because Tracematches is part of abc and does not work with ajc. For JavaMOP, we used the most recent release version, 2.1.2. For Tracematches, we used the most recent release version, 1.3.0, from [36], which is included in the abc compiler as an extension. To figure out the reason that some examples do not terminate when using Tracematches, we also used the abc compiler for weaving aspects generated by JavaMOP and RV. Note that JavaMOP and RV are AspectJ compiler-independent. They show similar overheads and terminate on all examples when using the abc compiler for weaving as when ajc is used. Because the overheads are similar, we do not present the results of using abc to weave JavaMOP and RV generated aspects in this paper. However, using abc to weave 42 G. ROŞU AND F. CHEN Orig (sec) (A) bloat jython avrora batik eclipse fop h2 luindex lusearch pmd sunflow tomcat tradebeans tradesoap xalan (B) bloat jython avrora batik eclipse fop h2 luindex lusearch pmd sunflow tomcat tradebeans tradesoap xalan 3.6 8.9 13.6 3.5 79.0 2.0 18.7 2.9 25.3 8.3 32.7 13.8 45.5 94.4 20.3 4.9 5.3 4.7 79.1 95.9 20.7 265.0 6.8 4.6 18.0 4.4 11.6 63.2 64.1 4.9 HasNext UnsafeIter UnsafeMapIter TM MOP RV TM MOP RV TM MOP RV 2119 448 116 19194 569 251 ∞ 1203 178 13 0 0 11 0 1 150 18 3 45 54 55 637 311 118 ∞ 113 42 3 2 3 355 9 8 ∞ 8 5 -2 4 -1 0 -1 -1 5 -3 0 200 49 48 350 21 13 ∞ 58 14 89 17 13 128 9 4 1350 21 6 0 0 1 0 0 1 1 4 1 -1 1 0 1 2 2 2 2 0 176 84 59 1423 162 123 ∞ 571 188 47 5 3 7 2 0 9 4 1 8 1 1 37 1 1 3 1 1 0 -1 1 1 1 2 5 3 -1 1 3 0 2 1 1 2 0 1 4 2 2 27 7 2 10 5 2 TM MOP RV TM MOP RV TM MOP RV 56.8 19.3 13.2 7.7 146.8 79.0 ∞ 173.4 56.1 5.7 4.6 4.8 4.9 4.6 4.8 6.0 19.5 4.7 4.6 12.4 9.1 4.4 136.2 15.8 ∞ 14.7 8.5 79.2 78.7 79.3 75.2 93.6 86.6 ∞ 91.2 79.6 100.8 107.6 97.1 98.3 100.0 110.3 106.9 93.8 101.1 97.4 47.1 52.5 24.3 24.2 29.4 ∞ 69.2 28.1 267.8 598.5 565.2 267.2 266.2 262.4 312.4 688.3 268.2 5.6 5.5 5.6 6.3 6.9 6.8 7.4 8.2 6.9 4.7 4.4 4.8 4.6 4.8 4.2 4.0 4.3 4.8 56.9 59.8 48.5 17.2 146.3 86.4 ∞ 212.7 93.6 4.5 4.8 4.9 4.8 4.3 4.7 4.7 4.4 4.4 11.4 12.3 11.4 12.5 11.0 11.5 11.9 11.4 11.0 62.9 62.7 62.1 63.7 63.9 64.1 63.3 62.5 62.7 61.8 62.3 63.3 63.4 63.1 64.4 64.1 63.5 62.0 4.9 5.0 5.1 4.9 4.9 4.9 4.9 4.5 4.9 UnsafeSyncColl TM MOP RV 1359 746 212 11 1 1 75 144 80 208 9 9 -4 2 1 ∞ 78 25 868 21 4 1 1 1 4 0 1 1818 192 76 13 6 5 2 0 1 -1 1 2 0 0 1 3 2 3 TM MOP RV 6.8 127.9 48.3 5.3 4.5 4.4 4.3 28.0 12.6 78.2 93.2 85.1 100.4 109.2 90.1 ∞ 54.8 24.8 271.4 690.3 265.5 7.4 7.4 7.5 4.5 4.5 4.6 20.3 238.4 84.6 5.1 4.3 4.9 11.3 11.3 11.3 63.2 62.8 62.0 60.7 65.0 65.9 5.0 4.8 5.0 UnsafeSyncMap TM MOP RV 1942 716 130 10 0 0 54 74 16 5 3 0 ∞ -1 -1 ∞ 71 19 83 20 5 2 0 0 3 1 1 ∞ 144 26 17 6 6 2 1 3 3 1 5 2 2 5 4 4 3 TM MOP RV 6.9 55.4 12.7 5.9 4.8 5.1 4.4 13.0 4.9 79.9 86.9 76.7 ∞ 98.6 98.7 ∞ 55.9 25.2 271.0 718.3 270.0 7.1 7.4 11.0 4.6 4.8 4.7 ∞ 117.1 32.9 4.5 4.7 4.5 11.4 11.4 11.8 64.0 62.8 64.0 65.5 64.5 65.6 5.1 4.9 4.9 All RV 982 4 275 28 0 133 23 1 3 620 6 1 2 1 4 RV 340.9 4.7 22.3 104.3 98.9 47.5 283.7 11.8 4.7 420.0 4.6 11.8 62.5 64.5 5.0 Figure 5: Comparison of Tracematches (TM), JavaMOP (MOP), and RV: (A) average percent runtime overhead; (B) total peak memory usage in MB. (convergence within 3%, ∞: not terminated after 1 hour) JavaMOP and RV properties confirms that the high overhead and non-termination come from Tracematches itself, not from the abc compiler. The following properties are used in our experiments. Some of them were already discussed in Sections 1.1 and 2, others are borrowed from [10, 11, 26, 13]. • HasNext: Do not use the next element in an iterator without checking for the existence of it; • UnsafeIter: Do not update a collection when using the iterator interface to iterate its elements; • UnsafeMapIter: Do not update a map when using the iterator interface to iterate its values or its keys; • UnsafeSyncColl: If a collection is synchronized, then its iterator also should be accessed synchronously; • UnsafeSyncMap: If a collection is synchronized, then its iterators on values and keys also should be accessed synchronized. All of them are tested on Tracematches, JavaMOP, and RV for comparison. We also monitored all five properties at the same time in RV, which was not possible in other monitoring systems for performance reasons or structural limitations. PARAMETRIC MONITORING E bloat 155M jython 106 avrora 1.5M batik 49K eclipse 226K fop 1.0M h2 27M luindex 371 lusearch 1.4K pmd 8.3M sunflow 2.7M tomcat 25 tradebeans 11 tradesoap 11 xalan 11 HasNext M FM 1.9M 1.9M 50 47 909K 850K 24K 21K 7.6K 5.3K 184K 74K 6.5M 6.0M 66 40 131 196 789K 694K 101K 101K 6 0 3 0 3 0 3 0 CM 1.8M 26 765K 21K 2.9K 151K 5.6M 2 114 571K 100K 0 0 0 0 UnsafeIter UnsafeMapIter E M FM CM E M FM CM 81M 1.9M 1.8M 1.6M 74M 3.6M 43K 3.4M 179K 50 38 38 179K 101K 94 101K 1.4M 909K 860K 808K 1.3M 1.2M 18 1.2M 125K 24K 21K 10K 55K 33K 140 27K 119K 6.6K 5.1K 2.6K 113K 22K 2.2K 7.8K 709K 7.7K 7.2K 1.8K 499K 177K 67 160K 12M 3.7K 3.3K 1.3K 12M 6.6M 9 6.5M 4.4K 65 39 0 378 183 2 59 748K 130 210 18 20K 944 338 1.4K 6.4M 551K 473K 382K 4.3M 1.3M 110K 1.1M 1.3M 2 0 0 1.3M 83K 0 83K 132 4 0 0 68 26 0 0 31 2 0 0 29 13 0 0 31 2 0 0 29 13 0 0 8.9K 2 0 0 119K 20K 0 20K 43 UnsafeSyncColl E M FM CM 143M 4.1M 0 3.7M 156 100 0 83 2.4M 1.8M 0 1.7M 73K 50K 0 34K 233K 15K 0 7.5K 1.2M 239K 0 217K 27M 6.5M 0 6.5M 436 132 0 30 1.7K 262 0 402 8.8M 1.5M 0 1.3M 2.7M 101K 0 101K 29 10 0 0 13 5 0 0 13 5 0 0 13 5 0 0 UnsafeSyncMap E M FM CM 161M 3.4M 0 3.4M 256 150 0 122 1.5M 909K 0 904K 50K 26K 0 26K 241K 18K 0 9.2K 1.2M 231K 0 213K 27M 6.5M 0 6.5M 472 125 0 25 1.8K 263 0 158 8.6M 1.1M 0 999K 2.7M 101K 0 101K 33 12 0 0 15 6 0 0 15 6 0 0 15 6 0 0 Figure 6: Monitoring statistics: number of events (E), number of created monitors (M), number of flagged monitors (FM), number of collected monitors (CM). 9.2.2. Results and Discussions. Figures 5 and 6 summarize the results of the evaluation. Note that the structure of the DaCapo 9.12 allows us to instrument all of the benchmarks plus all supplementary libraries that the benchmarks use, which was not possible for DaCapo 2006-10. Therefore, fop and pmd show higher overheads than the benchmarks using DaCapo 2006-10 from [13]. While other benchmarks show overheads less than 80% in JavaMOP, bloat, avrora, and pmd show prohibitive overhead in both runtime and memory performance. This is because they generate many iterators and all properties in this evaluation are intended to monitor iterators. For example, bloat creates 1,625,770 collections and 941,466 iterators in total while 19,605 iterators coexist at the same time at peak, in an execution. avrora and pmd also create many collections and iterators. Also, they call hasNext() 78,451,585 times, 1,158,152 times and 4,670,555 times and next() 77,666,243 times, 352,697 times and 3,607,164 times, respectively. Therefore, we mainly discuss those three examples in this section, although RV shows improvements for other examples as well. Figure 5 (A) shows the percent runtime overhead of Tracematches, JavaMOP, and RV. Overall, RV averages two times less runtime overhead than JavaMOP and orders of magnitude less runtime overhead than Tracematches (recall that these are the most optimized runtime verification systems). With bloat, RV shows less than 260% runtime overhead for each property, while JavaMOP always shows over 440% runtime overhead and Tracematches always shows over 1350% for completed runs and crashed for UnsafeMapIter. With avrora, on average, RV shows 62% runtime overhead, while JavaMOP shows 139% runtime overhead and Tracematches shows 203% and hangs for UnsafeMapIter. With pmd, on average, RV shows 94% runtime overhead, while JavaMOP shows 231% runtime overhead and Tracematches shows 1139% and hangs for UnsafeMapIter and UnsafeSyncMap. Also, RV was tested with all five properties together and showed 982%, 275%, and 620% overhead, respectively, which are still faster or comparable to monitoring one of many properties alone in JavaMOP or Tracematches. The overhead for monitoring all the properties simultaneously can be slightly larger than the sum of their individual overheads since the additional memory pressure makes the JVM’s garbage collection behave differently. Figure 5 (B) shows the peak memory usage of the three systems. RV has lower peak memory usage than JavaMOP in most cases. The cases where RV does not show lower peak memory usage are within the limits of expected memory jitter. However, memory usage of 44 G. ROŞU AND F. CHEN RV is still higher than the memory usage of Tracematches in some cases. Tracematches has several finite automata specific memory optimizations [4], which cannot be implemented in formalism-independent systems like RV and JavaMOP. Although Tracematches is sometimes more memory efficient, it shows prohibitive runtime overhead monitoring bloat and pmd. There is a trade-off between memory usage and runtime overhead. If RV more actively removes terminated monitors, memory usage will be lower, at the cost of runtime performance. Overall, the monitor garbage collection optimization in RV achieves the most efficient parametric monitoring system with reasonable memory performance. Figure 6 shows the number of triggered events, of created monitors, of monitors flagged as unnecessary by RV’s optimization, and of monitors collected by the JVM. Among the DaCapo examples, bloat, avrora, h2, pmd and sunflow generated a very large number of events (millions) in all properties, resulting in millions of monitors created in most cases. h2 does not exhibit large overhead because monitor instances in h2 have shorter lifetimes, therefore the created monitor instances are not used heavily like in bloat. sunflow has millions of events but does not create as many monitor instances as as other benchmarks. When monitoring the HasNext and UnsafeIter properties, RV’s garbage collector effectively flagged monitors as unnecessary and most were collected by the JVM. The experimental evaluation in this section shows that the approach to parametric trace slicing and monitoring discussed in this paper is indeed feasible, provided that it is not implemented naively. Indeed, as seen in the tables in this section, implementation optimizations make a huge difference in the runtime and memory overhead. This paper was not dedicated to optimizations and implementations; its objective was to only introduce the mathematical notions, notations, proofs and abstract algorithms underlying the semantical foundation of parametric properties and their monitoring. Current and future implementations are and will build on this foundation, applying specific optimizations and heuristics to reduce the runtime or the memory overhead caused by monitoring. 10. Concluding Remarks, Future Work and Acknowledgments A semantic foundation for parametric traces, properties and monitoring was proposed. A parametric trace slicing technique, which was discussed and proved correct, allows the extraction of all the non-parametric trace slices from a parametric slice by traversing the original trace only once and dispatching each parametric event to its corresponding slices. It thus enables the leveraging of any non-parametric, i.e., conventional, trace analysis techniques to the parametric case. A parametric monitoring technique, also discussed and proved correct, makes use of it to monitor arbitrary parametric properties against parametric execution traces using and indexing ordinary monitors for the base, non-parametric property. Optimized implementations of the discussed techniques in JavaMOP and RV reveal that their generality, compared to the existing similar but ad hoc and limited techniques in current use, does not come at a performance expense. Moreover, further static analysis optimizations like those in [25, 10, 12, 18] may significantly reduce the runtime and memory overheads of monitoring parametric properties based on the techniques and algorithms discussed in this paper. The parametric trace slicing technique in Section 6 enables the leveraging of any nonparametric, i.e., conventional, trace analysis techniques to the parametric case. We have only considered monitoring in this paper. Another interesting and potentially rewarding use of our technique could be in the context of property mining. For example, one could run PARAMETRIC MONITORING 45 the trace slicing algorithm on large benchmarks making intensive use of library classes, and then, on the obtained trace slices corresponding to particular classes or groups of classes of interest, run property mining algorithms. The mined properties, or the lack thereof, may provide insightful formal documentation for libraries, or even detect errors. Preliminary steps in this direction are reported in [22]. Acknowledgments. We would like to warmly thank the other members of the MOP team who contributed to the implementation of the new and old JavaMOP system, as well as of extensions of it, namely to Dennis Griffith, Dongyun Jin, Choonghwan Lee and Patrick Meredith. We are also grateful to Klaus Havelund, who found several errors in our new JavaMOP implementation while using it in teaching a course at Caltech, and who recommended us several simplifications in its user interface. We are also grateful to Matt Dwyer and to Tewfik Bultan for using JavaMOP in their classes at the Universities of Nebraska and of California, respectively. We express our thanks also to Eric Bodden for his lead of the static analysis optimization efforts in [10], and to the Tracematches [1, 4], PQL [25], Eagle [5] and RuleR [6] teams for inspiring debates and discussions. The research presented in this paper was generously funded by the NSF grants NSF CCF-0916893, NSF CNS-0720512, and NSF CCF-0448501, by NASA grant NASA-NNL08AA23C, by a Samsung SAIT grant and by several Microsoft gifts and UIUC research board awards. Sadly, the second author, Feng Chen, passed away on August 8, 2009, in the middle of this project, due to an undetected blood clot. Feng was the main developer of JavaMOP and a co-inventor of most of its underlying techniques and algorithms, including those in this paper. His results and legacy will outlive him. May his soul rest in peace. References [1] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhotak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Adding trace matching with free variables to AspectJ. In OOPSLA’05, 2005. [2] AspectJ. http://eclipse.org/aspectj/. [3] P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhotak, O. Lhotak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. ABC: an extensible AspectJ compiler. In Aspect-Oriented Software Development (AOSD’05), pages 87–98. ACM, 2005. [4] P. Avgustinov, J. Tibble, and O. de Moor. Making trace monitoring feasible. In R. P. Gabriel, editor, OOPSLA’07. ACM, 2007. [5] H. Barringer, A. Goldberg, K. Havelund, and K. Sen. Rule-based runtime verification. In VMCAI, volume 2937 of LNCS, pages 44–57, 2004. [6] H. Barringer, D. E. Rydeheard, and K. Havelund. Rule systems for run-time monitoring: From Eagle to RuleR. In Runtime Verification (RV’07), volume 4839 of LNCS, pages 111–125, 2007. [7] A. Bauer, M. Leucker, and C. Schallhart. Runtime verification for LTL and TLTL. ACM Transactions on Software Engineering and Methodology, 20, 2011. [8] S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA’06, pages 169–190. ACM, 2006. [9] E. Bodden. J-lo, a tool for runtime-checking temporal assertions. Master’s thesis, RWTH Aachen University, 2005. [10] E. Bodden, F. Chen, and G. Roşu. Dependent advice: A general approach to optimizing history-based aspects. In AOSD’09, pages 3–14. ACM, 2009. 46 G. ROŞU AND F. CHEN [11] E. Bodden, L. Hendren, and O. Lhoták. A staged static program analysis to improve the performance of runtime monitoring. In European Conference on Object Oriented Programming (ECOOP’07), volume 4609 of LNCS, pages 525–549. Springer, 2007. [12] E. Bodden, P. Lam, and L. Hendren. Clara: A framework for partially evaluating finite-state runtime monitors ahead of time. In Runtime Verification (RV’10), volume 6418 of LNCS, pages 183–197. Springer, 2010. [13] F. Chen, P. Meredith, D. Jin, and G. Rosu. Efficient formalism-independent monitoring of parametric properties. In ASE’09. IEEE/ACM, 2009. [14] F. Chen and G. Roşu. MOP: An Efficient and Generic Runtime Verification Framework. In OOPSLA’07, pages 569–588. ACM, 2007. [15] F. Chen and G. Roşu. Mining Parametric State-Based Specifications from Executions. Technical Report UIUCDCS-R-2008-3000, Dept. of Computer Science at UIUC, 2008. [16] F. Chen and G. Roşu. Parametric trace slicing and monitoring. In TACAS’09, volume 5505 of LNCS, pages 246–261, 2009. [17] W. Damm and D. Harel. LSCs: Breathing life into message sequence charts. Formal Methods in System Design, 19(1):45–80, 2001. [18] M. Dwyer, R. Purandare, and S. Person. Runtime verification in context: Can optimizing error detection improve fault diagnosis. In Runtime Verification (RV’10), volume 6418 of LNCS, pages 36–50. Springer, 2010. [19] S. Goldsmith, R. O’Callahan, and A. Aiken. Relational queries over program traces. In OOPSLA’05, 2005. [20] D. Jin, P. O. Meredith, D. Griffith, and G. Roşu. Garbage collection for monitoring parametric properties. In Programming Language Design and Implementation (PLDI’11), pages 415–424. ACM, 2011. [21] O. Kupferman and M. Y. Vardi. Model checking of safety properties. Form. Methods Syst. Des., 19:291– 314, October 2001. [22] C. Lee, F. Chen, and G. Roşu. Mining parametric specifications. In Proceeding of the 33rd International Conference on Software Engineering (ICSE’11), pages 591–600. ACM, 2011. [23] Z. Manna and A. Pnueli. The temporal logic of reactive and concurrent systems. Springer-Verlag New York, Inc., New York, NY, USA, 1992. [24] S. Maoz and D. Harel. From multi-modal scenarios to code: compiling lscs into aspectj. In FSE’06, pages 219–230, 2006. [25] M. Martin, V. B. Livshits, and M. S. Lam. Finding application errors and security flaws using PQL: a program query language. In OOPSLA’05, 2005. [26] P. Meredith, D. Jin, F. Chen, and G. Roşu. Efficient monitoring of parametric context-free patterns. In ASE’08. IEEE/ACM, 2008. [27] P. Meredith and G. Roşu. Runtime verification with the RV system. In First International Conference on Runtime Verification (RV’10), volume 6418 of Lecture Notes in Computer Science, pages 136–152. Springer, 2010. [28] P. O. Meredith, D. Jin, D. Griffith, F. Chen, and G. Roşu. An overview of the mop runtime verification framework. Journal on Software Tools for Technology Transfer (J. of STTT), 2010. To appear. [29] E. F. Moore. Gedanken-experiments on sequential machines. Automata Studies, Annals of Mathematical Studies, 34:129–153, 1956. [30] G. Roşu and F. Chen. Parametric Trace Slicing and Monitoring. Technical Report UIUCDCS-R-20082977, University of Illinois at Urbana-Champaign, 2008. [31] G. Roşu, F. Chen, and T. Ball. Synthesizing monitors for safety properties – this time with calls and returns –. In Runtime Verification (RV’08), volume 5289 of LNCS, pages 51–68, 2008. [32] G. Rosu and K. Havelund. Rewriting-based techniques for runtime verification. Automated Software Engineering, 12(2):151–197, 2005. [33] V. Stolz. Temporal assertions with parameterized propositions. In O. Sokolsky and S. Tasiran, editors, Runtime Verification, volume 4839 of Lecture Notes in Computer Science, pages 176–187. Springer Berlin / Heidelberg, 2007. [34] R. E. Strom and S. Yemeni. Typestate: A programming language concept for enhancing software reliability. IEEE Transactions on Software Engineering, 12:157–171, January 1986. [35] D. Tabakov and M. Vardi. Optimized temporal monitors for systemc. In First International Conference on Runtime Verification (RV’10), volume 6418 of Lecture Notes in Computer Science. Springer, 2010. PARAMETRIC MONITORING 47 [36] Tracematches Benchmarks. http://abc.comlab.ox.ac.uk/tmahead. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 171 Second St, Suite 300, San Francisco, CA 94105, USA, or Eisenacher Strasse 2, 10777 Berlin, Germany
6cs.PL
Design Automation for Binarized Neural Networks: A Quantum Leap Opportunity? Manuele Rusci∗ , Lukas Cavigelli† , Luca Benini†∗ arXiv:1712.01743v1 [cs.OH] 21 Nov 2017 ∗ Energy-Efficient Embedded Systems Laboratory, University of Bologna, Italy – [email protected] † Integrated Systems Laboratory, ETH Zurich, Switzerland – {cavigelli, benini}@iis.ee.ethz.ch Abstract—Design automation in general, and in particular logic synthesis, can play a key role in enabling the design of application-specific Binarized Neural Networks (BNN). This paper presents the hardware design and synthesis of a purely combinational BNN for ultra-low power near-sensor processing. We leverage the major opportunities raised by BNN models, which consist mostly of logical bit-wise operations and integer counting and comparisons, for pushing ultra-low power deep learning circuits close to the sensor and coupling it with binarized mixed-signal image sensor data. We analyze area, power and energy metrics of BNNs synthesized as combinational networks. Our synthesis results in GlobalFoundries 22 nm SOI technology shows a silicon area of 2.61 mm2 for implementing a combinational BNN with 32×32 binary input sensor receptive field and weight parameters fixed at design time. This is 2.2× smaller than a synthesized network with re-configurable parameters. With respect to other comparable techniques for deep learning nearsensor processing, our approach features a 10× higher energy efficiency. I. I NTRODUCTION Bringing intelligence close to the sensors is an effective strategy to meet the energy requirement of battery-powered devices for always-ON applications [1]. Power-optimized solutions for near-sensor processing aim at reducing the amount of data to be dispatched out from the sensors. Local data analysis can compress the data down to even a single bit in case of a binary classifier, hence massively reducing the output bandwidth and energy consumption over raw sensor data communication [2]. In the context of visual sensing, novel computer vision chips feature embedded processing capabilities to reduce the overall energy consumption [3]. By placing computational modules within the sensor, mid- and low- level visual features can be directly extracted and transferred to a processing unit for further computation or used to feed a first stage classifier. Moreover, by integrating analog processing circuits on the focal-plane, the amount of data crossing the costly analogto-digital border is reduced [4]. If compared with a camerabased system featuring a traditional imaging technology, this approach has a lower energy consumption because of (a) a reduced sensor-to-processor bandwidth and (b) a lower demand for digital computation [5]. Relevant examples of mixed-signal smart capabilities include the extraction of spatial and temporal features, such as edges or frame-difference maps, This project was supported in part by the EU’s H2020 programme under grant no. 732631 (OPRECOMP) and by the Swiss National Science Foundation under grant 162524 (MicroLearn). or a combination of them [6]. Because of the employed highly optimized architectures, the power consumption of smart visual chips results to be more than one order of magnitude lower than off-the-shelf traditional image sensors [7]. However, to favor the meeting between smart ultra-low power sensing and deep learning, which is nowadays the leading technique for data analytics, a further step is required. At present, the high computational and memory requirement of deep learning inference models have prevented a full integration of these approaches close to the sensor at an ultra low power cost [4], [8]. A big opportunity for pushing deep learning into low-power sensing come from recently proposed Binarized Neural Networks (BNNs) [9], [10]. When looking at the inference task, a BNN consists of logical XNOR operations, binary popcounts and integer thresholding. Therefore, major opportunities arise for hardware implementation of these models as part of the smart sensing pipeline [11]. In this paper, we explore the feasibility of deploying BNNs as a front-end for an ultra-low power smart vision chip. The combination of mixed-signal processing and hardware BNN implementation represents an extremely energy-efficient and powerful solution for always-ON sensing, serving as an early detector of interesting events. Therefore, we design and synthesize a purely combinational hard-wired BNN, which is fed with the binary data produced by a mixed-signal ultra-low power imager [7]. The main contributions of this paper are: • • The hardware design and logic synthesis of a combinational BNN architecture for always-ON near-sensor processing. The area and energy evaluation of the proposed approach, for varying network models and configurations. We evaluate two BNN models with 16×16 and 32×32 binary input size, either with fixed or variable parameters. In case of a combinational BNN with 32×32 input data and hardwired parameters, our synthesis results in GlobalFoundries 22 nm SOI technology shows an area occupancy of 2.61 mm2 , which is 2.2× smaller than the model with variable parameters, and features a 10× higher energy efficiency with respect to comparable techniques for deep learning-based near-sensor processing. Moreover, our study paves the way for exploring a new generation of logic synthesis tools—aimed at aggressively optimizing deep binarized networks and enabling focal-plane processing of images with higher resolution. II. R ELATED W ORK Several proposed smart imaging chips for always-ON applications embed mixed-signal processing circuits for extracting basic spatial and temporal features directly on the sensor die [6], [12], [13]. Recent approaches tried to push deep learning circuits to the analog sensor side to exploit the benefits of focal-plane processing [3]. The work presented in [14] makes use of angle-sensitive pixels, integrating diffraction gratings on the focal plane. Based on the different orientations of the pixel-level filters, multiple feature maps are locally computed as the first layer of a convolutional network. A sensing frontend supporting analog multiplication is proposed in [15]. They introduce a MAC unit composed of only passive switches and capacitors to realize a switched-capacitor matrix multiplier, which achieves an energy efficiency of 8.7 TOp/s/W when running convolution operations. RedEye [4] embeds columnwise processing pipelines in the analog domain to perform 3D convolutions before of the digital conversion. The chip is implemented in 0.18 µm technology and needs 1.4 mJ to process the initial 5 layers of GoogLeNet, leading to an energy efficiency of less than 2 TOp/s/W. With respect to these focal-plane analog approaches, we leverage the potentiality of BNNs to deploy a digital and optimized purely combinational network to notably increase the energy efficiency of nearsensor processing circuits. Many neural network accelerators have been reported in the literature, most of them with an energy efficiency in the range of few TOp/s/W [16]–[18]. Several recent approaches have focused on quantizing the weights down to binarization in order to gain a significant advantage in memory usage and energy efficiency [8], [18], pushing it up to around 60 TOp/s/W while advances in training methods have achieved accuracy losses of less than 1% for this setup. A new approach has been to quantize also the activations down to binary with initial accuracy losses of up to 30% on the ILSVRC dataset, these have improved to around 11% over the last two years and even less for smaller networks on datasets such as CIFAR10 and SVHN [9], [10], [18]. During this time, some VLSI implementations have been published, most of them targeting FPGAs such as the FINN framework [11], [19]. Only few ASIC implementations exist [19]–[21], of which XNOR-POP uses in-memory processing and reports the highest energy efficiency of 21.1 TOp/s/W and thus less than the best binaryweight-only implementation. III. C OMBINATIONAL H ARDWARE BNN D ESIGN BNNs feature a single-bit precision for both the weights and the activation layers when performing inference. This makes the approach promising for resource-constrained devices, also considering the intrinsic 32× memory footprint reduction with respect to baseline full-precision models. When applying the binarization scheme to a Convolutional Neural Network (CNN), a BNN features a stacked architecture of binary convolutional layers. Every layer transforms the IF binary input feature maps into the OF binary output feature maps through the well-known convolution operation. Because of the Fig. 1. Binary convolution flow for every convolutional layer. For any of the OF output feature maps, the binary value at position (x, y) is produced by overlapping the m-th weight filter to the array of the receptive field of the input feature map centered at the spatial position (x, y). binary domain {0,1} of both the input data and the weight filters, the convolution kernel can be rewritten as ϕ(m, x, y) = popcount(weights(m) xnor recField(x,y)), (1) where ϕ(m, x, y) is the result of the convolution, weights(m) is the array of binary filter weights and recField(x,y) is the receptive field of the output neuron located at position (x, y) of the m-th output feature map. The popcount(·) function returns the numbers of asserted bits of the argument. Note that the convolution output ϕ(m, x, y) is an integer value. As presented by [9], the popcount result is binarized after a batch normalization layer. However, the normalization operation can be reduced to a comparison with an integer threshold,  ϕ(m, x, y) ≥ thresh(m)    ϕ(m, x, y) ≤ thresh(m) outM ap(m, x, y) =  1 if γ = 0 and β ≥ 0    0 if γ = 0 and β < 0 if γ > 0 if γ < 0 , (2) where thresh(m) is the integer threshold that depends on the convolution bias b and on the parameters learned by the batch normalization layer µ, γ, σ and β. After training the network, the thresh(m) parameters are computed offline as bµ − b − β · σ/γc if γ > 0 or dµ − b − β · σ/γe if γ < 0. Fig. 1 graphically schematizes the binary convolution kernel. The BinConv module applies (1) and (2) over the receptive field values of the output neuron outM ap(m, x, y). To build a convolutional layer, the BinConv is replicated for every output neuron. The hardware architecture of a BinConv element is shown in Fig. 2. The input signals recField(x,y), weights(m) and thresh(m) and the output signal outMap(m,x,y) of the block refer to (1) and (2). Additionally, the sign(m) signal drives the selection of the correct output neuron’s value depending on the batch normalization parameters (eq. (2)). The network parameters, weights, thresh and sign, highlighted in red, can be stored in a memory block, to allow online reconfiguration, or can be fixed at design time. In total, the memory footprint TABLE I VGG- LIKE BNN M ODELS1 Fig. 2. Hardware architecture of the combinational building block for computing binary convolutions. Every binConv(m,x,y) module instantiated within a convolutional layer produces the binary value of the output neuron at location (x, y) of the m-th output feature map. required to store the parameters of a convolutional layer is OF · (IF · kw · kh + blog2 (IF · kw · kh)c + 3) bits. Despite the reduced reconfigurability, relevant benefits in terms of silicon occupation arise when hard-wiring the binary weights. In this case, the synthesis tool plays a major role to enable the implementability of the model. The synthesis tool has to exploit the optimizations based on a high-level abstract HDL description of the network. To explore the feasibility of deep combinational BNNs, we focus on VGG-like network topologies as in [9]. These networks include convolutional layers with a small filter size (typically kw = kh = 3) and an increasing feature dimension going deeper into the network. The spatial dimension tends to decrease by means of strided pooling operations placed after the binary convolution of (1). Following the intuition of [11], a MaxPooling layer can be moved behind the binarization by replacing the MAX with an OR operation among the binary values passing through the pooling filter. The VGG-like topology features multiple fully-connected layers. Their hardware implementation is similar to the binConv module of Fig. 2, where the convolutional receptive field contains all the input neurons of the layer. The last fullyconnected layer generates a confidence score for every class. Differently from the original BNN scheme, our network architecture is fed with a binary single-layer signal coming from a mixed-signal imager [7]. However, the presented approach also holds for multi-channel imagers. A. Estimating Area Before looking at synthesis results, we estimate the area of a binary convolutional layer. For each output value (output pixel and feature map, Nout = H · W · OF ), we have a receptive field of size NRF = IF · kw · kh and thus need a total of Nout NRF XNOR gates. These are followed by layer Model with a 16×16 input map Model with a 32×32 input map 1 2 3 4 5 6 bConvLyr3x3( 1,16)+MaxP2x2 bConvLyr3x3(16,32)+MaxP2x2 bConvLyr3x3(32,48)+MaxP2x2 bFcLyr(192,64) bFcLyr( 64, 4) bConvLyr3x3( 1,16)+MaxP2x2 bConvLyr3x3(16,32)+MaxP2x2 bConvLyr3x3(32,48)+MaxP2x2 bConvLyr3x3(48,64)+MaxP2x2 bFcLyr(256,64) bFcLyr( 64, 4) popcount units—adder trees summing over all NRF values in the receptive field. The resulting full-precision adder trees Plog2 (NRF ) require NRF 2−i = NRF − 1 half-adders and Plog2 (NRF )i=1 (i−1)NRF 2−i = NRF −log2 (NRF )−1 full-adders i=1 each, and are replicated for every output value. The subsequent threshold/compare unit is insignificant for the total area. To provide an example, we look at the first layer of the network for 16 × 16 pixel images with 1 input and 16 output feature maps and a 3×3 filter (NRF = 9, Nout = 4096). Evaluating this for the GF22 technology with AXNOR = 0.73 µm2 , AHA = 1.06 µm2 and AFA = 1.60 µm2 , we obtain an area of AXNOR,tot = 0.027 mm2 , AHA,tot = 0.033 mm2 and AFA,tot = 0.029 mm2 —a total of 0.089 mm2 . Note that this implies that the area scales faster than linearly with respect to the size of the receptive field NRF since the word width in the adder tree increases rapidly. This is not accounted for in the widely used GOp/img complexity measure for NNs, as it is becoming only an issue in this very low word-width regime. IV. E XPERIMENTAL R ESULTS A. BNN Training The experimental analysis focuses on two VGG-like network topologies described in Tbl. I to investigate also the impact of different input and network size. As a case-study, we trained the networks with labelled patches from the MIOTCD dataset [22] belonging to one of the following classes: cars, pedestrians, cyclist and background. The images from the dataset are resized to fit the input dimension before applying a non-linear binarization, which simulates the mixed-signal preprocessing of the sensor [7]. By training the BNNs with ADAM over a training set of about 10ksamples/class (original images are augmented by random rotation), the classification accuracy against the test-set achieves 64.7% in case of the model with 32×32 input data, while a 50% is measured for the 16×16 model because of the smaller input size and network. Since this work focuses on hardware synthesis issues of BNN inference engines, we do not explore advanced training approaches for NNs with non-traditional input data, which have been discussed in the literature [23]. 1 bConvLyr3x3(x,y) indicates a binary convolutional layer with a 3×3 filter, x input and y output feature maps, MaxP2x2 is a max pooling layer of size 2×2, bFcLyr(x, y) is a binary fully connected layer with x binary input y binary output binary neurons. TABLE II S YNTHESIS AND P OWER R ESULTS FOR D IFFERENT C ONFIGURATIONS netw. —— area —— type [mm2 ] [MGE]† 16×16 16×16 32×32 32×32 var. fixed var. fixed † ‡ 1.17 0.46 5.80 2.61 5.87 2.32 29.14 13.13 — time/img — E/img leak. E-eff. [ns] [FO4]‡ [nJ] [µW] [TOp/J] 12.82 12.40 17.27 21.02 560 541 754 918 2.40 945 1.68 331 11.14 4810 11.67 1830 470.8 672.6 479.4 457.6 TABLE IV E NERGY AND L EAKAGE B REAKDOWN FOR THE 16×16 N ETWORK layer 1 2 3 4 ——– var. weights ——– energy/img [pJ] leakage 38 ( 1.6%) 806 (33.7%) 1440 (60.2%) 107 ( 4.5%) 68 µW 547 µW 310 µW 20 µW ——– fixed weights ——– energy/img [pJ] leakage 9 ( 0.5%) 478 (28.5%) 1037 (61.9%) 151 ( 9.0%) 8 µW 152 µW 163 µW 7 µW Two-input NAND-gate size equivalent: 1 GE = 0.199 µm2 Fanout-4 delay: 1 FO4 = 22.89 ps TABLE III A REA B REAKDOWN FOR THE 16×16 N ETWORK layer 1 2 3 4 compute [kOp/img] area estim. [mm2 ] var. weights area [mm2 ] fixed weights area [mm2 ] 74 ( 6.5%) 590 (52.2%) 442 (39.1%) 25 ( 2.2%) 0.093 0.971 0.738 0.041 0.077 ( 6.6%) 0.647 (55.4%) 0.417 (35.8%) 0.026 ( 2.2%) 0.008 ( 1.7%) 0.204 (44.3%) 0.241 (52.3%) 0.008 ( 1.7%) B. Synthesis Results We analyze both aforementioned networks for two configurations, with weights fixed at synthesis time and with variable weights (excl. storage, modeled as inputs). The fixed weights are taken from the aforementioned trained models. We provide an overview of synthesis results for different configurations in Tbl. II. We synthesized both networks listed in Tbl. I in GlobalFoundries 22 nm SOI technology with LVT cells in the typical case corner at 0.65 V and 25◦ C. The configuration with variable weights scales with the computational effort associated with the network (1.13 MOp/img and 5.34 MOp/img for the 16×16 and 32×32 networks) with 0.97 and 0.92 MOp/cycle/mm2 , respectively. The variable parameters/weights configuration does not include the storage of the parameters themselves, which would add 1.60 µm2 (8.0 GE) per FF which could be loaded through a scan-chain without additional logic cells (from some flash memory elsewhere on the device). Alternatively, non-volatile memory cells could be used to store them. The number of parameters is 33 and 65 kbit and thus 0.05 mm2 (264 kGE) and 0.10 mm2 (520 kGE) for the 16×16 and 32×32 network, respectively. Looking at the more detailed area breakdown in Tbl. III, we can see that there is a massive reduction when fixing the weights before synthesis. Clearly, this eliminates all the XNOR operations which become either an inverter or a wire, and even the inverter can now be shared among all units having this particular input value in their receptive field. However, based on the estimates described in Sec. III-A, this cannot explain all the savings. Additional cells can be saved through the reuse of identical partial results, which not only can occur randomly but must occur frequently. For example, consider 16 parallel popcount units summing over 8 values each. We can split the value into 4 groups with 2 values each. Two binary values can generate 22 = 4 output combinations. Since we have 16 units of which each will need one of the combinations, they will on average be reused 4 times. This is only possible with fixed weights, otherwise the values to reuse would have to be multiplexed, thereby loosing all the savings. Generally, we can observe that these already small networks for low-resolution images require a sizable amount of area, such that more advanced ad-hoc synthesis tools exploiting the sharing of weights and intermediate results are needed. C. Energy Efficiency Evaluations We have performed post-synthesis power simulations using 100 randomly selected real images from the dataset as stimuli. The results are also reported in Tbl. II while a detailed per-layer breakdown is shown in Tbl. IV. We see that the model with 32×32 input has lower energy-efficiency and higher latency when fixing the weights, while the opposite is observed for the smaller model. We attribute this to the fact that synthesis is set to optimize for area and both, the critical path length and target power are unconstrained. These energy efficiency numbers are in the order of 10× higher than those of the next competitor YodaNN [8]. However, they are fundamentally different in the sense that YodaNN (a) runs the more complex binary weight networks, (b) requires additional off-chip memory for the weights and intermediate results, (c) can run large networks with a fixed-size accelerator, and (d) is in an older technology but doing aggressive voltage scaling. Given these major differences, a more in-depth comparison would require a redesign of YodaNN in 22 nm and re-tuning to the single-channel input architecture we are using for comparison. Nevertheless, is is clear that these combinational BNNs are by far more efficient. When heavily duty-cycling a device, leakage can become a problem. In this case, we see 945 µW and 331 µW of leakage power, which might be significant enough in case of low utilization to require mitigation through power-gating or using HVT cells. Generally, voltage scaling can also be applied, not only reducing leakage, but also active power dissipation. The throughput we observe in the range of 50 Mframe/s is far in excess of what is meaningful for most applications. Thus aggressive voltage scaling, power gating and the reverse body biasing available in this FD-SOI technology should be optimally combined to reach the minimum energy point where leakage and dynamic power are equal while the supply is ON. We expect these values to be highly dependent on the input data, since energy is consumed only when values toggle. While a single pixel toggling at the input might affect many values later in the network, it has been shown that rather the opposite R EFERENCES Fig. 3. Silicon area estimation (in red) and measurements with variable (green) and fixed (blue) weights of three BNNs featuring a model complexity which scales depending on the imager resolution. The area occupation of the 64×64 model is not reported because the synthesis tool is not able to handle such a complex and large design. effect can be seen: changes at the input tend to vanish deeper into the network [24]. A purely combinational implementation fully leverages this and BNNs naturally have a threshold that keeps small changes from propagating and might thus perform even better for many real-world applications. D. Scaling to Larger Networks Our results show an area requirement in the range of 2.05 to 2.46 GE/Op and an average 1.9 fJ/Op. Scaling this up to 0.5 cm2 (250 MGE) of silicon and an energy consumption of only 210 nJ/img, we could map networks of around 110 MOp/img—this is already more than optimized highquality ImageNet classification networks such as ShuffleNets require [25]. Fig. 3 shows the estimation and measurements of the silicon area corresponding to the synthesized BNNs for fixed and variable weights. We also consider a model with a larger 64×64 input imager receptive field and a higher complexity (5 convolutional and 2 fully-connected layers, 23.05 GOp/img). Such a model presents is more accurate on the considered classification task (73.6%) but current synthesis tool cannot handle the high complexity of the design, using in excess of 256 GB of memory. When estimating the area occupancy, the 64×64 BNNs result to be 4.3× larger than the area estimated for the 32×32 model. A direct optimization of such large designs is out of scope of today’s EDA tools, clearly showing the need for specialized design automation tools for BNNs. V. C ONCLUSION We have presented a purely combinational design and synthesis of BNNs for near-sensor processing. Our results demonstrate the suitability and the energy efficiency benefits of the proposed solution, fitting on a silicon area of 2.61 mm2 when considering a BNN model with 32×32 binary input data and weight parameters fixed at design time. Our study also highlighted the need for novel synthesis tools able to deal with very large and complex network designs, that are not easily handled by current tools. [1] M. Alioto, Enabling the Internet of Things: From Integrated Circuits to Integrated Systems. Springer, 2017. [2] M. Rusci, D. Rossi et al., “An event-driven ultra-low-power smart visual sensor,” IEEE Sensors Journal, vol. 16, no. 13, pp. 5344–5353, 2016. [3] Á. Rodrı́guez-Vázquez, R. Carmona-Galán et al., “In the quest of visionsensors-on-chip: Pre-processing sensors for data reduction,” Electronic Imaging, vol. 2017, no. 11, pp. 96–101, 2017. [4] R. LiKamWa, Y. Hou et al., “Redeye: analog convnet image sensor architecture for continuous mobile vision,” in Proc. IEEE ISCA, 2016, pp. 255–266. [5] S. Zhang, M. Kang et al., “Reducing the energy cost of inference via in-sensor information processing,” arXiv:1607.00667, 2016. [6] J. Fernández-Berni, R. Carmona-Galán et al., “Focal-plane sensingprocessing: A power-efficient approach for the implementation of privacy-aware networked visual sensors,” Sensors, vol. 14, no. 8, pp. 15 203–15 226, 2014. [7] M. Gottardi, N. Massari, and S. A. Jawed, “A 100µ w 128×64 pixels contrast-based asynchronous binary vision sensor for sensor networks applications,” IEEE Journal of Solid-State Circuits, vol. 44, no. 5, pp. 1582–1592, 2009. [8] R. Andri, L. Cavigelli et al., “Yodann: An architecture for ultralow power binary-weight cnn acceleration,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2017. [9] M. Courbariaux, I. Hubara et al., “Binarized neural networks: Training deep neural networks with weights and activations constrained to+ 1 or-1,” arXiv:1602.02830, 2016. [10] M. Rastegari, V. Ordonez et al., “Xnor-net: Imagenet classification using binary convolutional neural networks,” in Proc. ECCV. Springer, 2016, pp. 525–542. [11] Y. Umuroglu, N. J. Fraser et al., “Finn: A framework for fast, scalable binarized neural network inference,” in Proc. ACM/SIGDA FPGA, 2017, pp. 65–74. [12] J. Choi, S. Park et al., “A 3.4-µw object-adaptive cmos image sensor with embedded feature extraction algorithm for motion-triggered objectof-interest imaging,” IEEE Journal of Solid-State Circuits, vol. 49, no. 1, pp. 289–300, 2014. [13] G. Kim, M. Barangi et al., “A 467nw cmos visual motion sensor with temporal averaging and pixel aggregation,” in Proc. IEEE ISSCC, 2013, pp. 480–481. [14] H. G. Chen, S. Jayasuriya et al., “Asp vision: Optically computing the first layer of convolutional neural networks using angle sensitive pixels,” in Proc. IEEE CVPR, 2016, pp. 903–912. [15] E. H. Lee and S. S. Wong, “Analysis and design of a passive switchedcapacitor matrix multiplier for approximate computing,” IEEE Journal of Solid-State Circuits, vol. 52, no. 1, pp. 261–271, 2017. [16] Z. Du, R. Fasthuber et al., “Shidiannao: Shifting vision processing closer to the sensor,” in ACM SIGARCH Computer Architecture News, vol. 43, no. 3, 2015, pp. 92–104. [17] L. Cavigelli and L. Benini, “Origami: A 803-gop/s/w convolutional network accelerator,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 27, no. 11, pp. 2461–2475, 2017. [18] V. Sze, Y.-H. Chen et al., “Efficient processing of deep neural networks: A tutorial and survey,” arXiv:1703.09039, 2017. [19] E. Nurvitadhi, D. Sheffield et al., “Accelerating binarized neural networks: Comparison of fpga, cpu, gpu, and asic,” in Proc. FPT, 2016, pp. 77–84. [20] K. Ando, K. Ueyoshi et al., “Brein memory: A 13-layer 4.2 k neuron/0.8 m synapse binary/ternary reconfigurable in-memory deep neural network accelerator in 65 nm cmos,” in Proc. VLSI Symposium, 2017. [21] L. Jiang, M. Kim et al., “Xnor-pop: A processing-in-memory architecture for binary convolutional neural networks in wide-io2 drams,” in Proc. IEEE/ACM ISLPED, 2017. [22] “The traffic surveillance workshop and challenge 2017 (tswc- 2017),” 2017, MIO-TCD: MIOvision Traffic Camera Dataset. [Online]. Available: http://podoce.dinf.usherbrooke.ca [23] S. Jayasuriya, O. Gallo et al., “Deep learning with energy-efficient binary gradient cameras,” arXiv:1612.00986, 2016. [24] L. Cavigelli, P. Degen, and L. Benini, “Cbinfer: Change-based inference for convolutional neural networks on video data,” arXiv:1704.04313, 2017. [25] X. Zhang, X. Zhou et al., “Shufflenet: An extremely efficient convolutional neural network for mobile devices,” arXiv:1707.01083, 2017.
1cs.CV
The use of distributed thermal storage in district heating grids for demand side management D. Vanhoudta,b,∗, B.J. Claessensa,b,c , R. Salenbiena,b , J. Desmedta,b a Flemish Institute for Technological Research (VITO), Boeretang 200, B-2400 Mol, Belgium b EnergyVille, Thor Park 8310, B-3600 Genk, Belgium c REstore, Posthofbrug 12, B-2600 Antwerp, Belgium arXiv:1702.06005v1 [cs.SY] 6 Feb 2017 Abstract The work presented in this paper relates to a small scale district heating network heated by a gas fired CHP. In most common situations, such a CHP is heat driven operated, meaning that the CHP will switch on whenever heat is needed, while not taking into account the demand of electricity at that time. In this paper however, an active control strategy is developed, aiming to maximize the profit of the CHP, selling its electricity to the spot market. The CHP will therefore switch on at moments of high electricity prices. Nevertheless, since there never is a perfect match between the demand of heat and the demand of electricity, a thermal energy storage is included in the network to overcome the difference between supply and demand of heat in the network. In this study, three different storage concepts are compared: (1) a central buffer tank next to the CHP; (2) small storage vessels distributed over the different connected buildings; and (3) the use of the thermal mass if the buildings as storage capacity. Besides the development of the control algorithms based on model predictive control, a simulation model of the network is described to evaluate the performance of the different storage concept during a representative winter week. The results show that the presented control algorithm can significantly influence the heat demand profile of the connected buildings. As a results, active control of the CHP can drastically increase the profit of the CHP. The concept with the distributed buffers gives the best results, however the profit for the thermal mass concept is only marginally smaller. Since in this latter case no significant investment costs are needed, the conclusion for this case study is that the use of thermal mass of buildings for demand side management in district heating systems is very promising. Keywords: district heating, demand side management, demand response, thermal energy storage, CHP, operational management 1. INTRODUCTION 1.1. Background District heating networks (DHN) are collective systems used for heating of buildings. The infrastructure typically consists of one or more heat production plants, transport and distribution pipes, and substations delivering the heat to the customers. A DHN is an alternative for the individual heat production by means of a gas boiler for example. District heating is widely spread especially in northern, central and eastern Europe. E.g. in the Scandinavian and Baltic countries the share of district heating in the heat demand is close to or above 50% [1]. Compared to individual heat production district heating has some benefits. District heating systems allow valorisation of surplus heat from industrial processes or waste incineration and therefore increase the energy efficiency [2, 3]. It also facilitates the transition to renewable heating of buildings, since renewable sources of heat (biomass, ∗ Corresponding author: tel.: +32-14-33-59-74; e-mail address: [email protected] (D. Vanhoudt) Preprint submitted to Energy and Buildings geothermal energy, solar thermal energy...) are often largescale or at least too expensive for small scale applications as single building heating [4]. Therefore also in other countries, DHNs are perceived to play an increasingly important role in the future energy infrastructure [5, 6]. Also the generation of electricity is getting more sustainable. Renewable energy sources (RES) have a growing share in the total electricity production. In 2011 this share was 27.5% in the EU-28 [7]. By 2050, the share of renewables should further increase to 48% according the IEA Blue Map scenario [8]. An unfavourable aspect of intermittent renewable sources like wind and photovoltaic however is that they are highly fluctuating and therefore partly unpredictable and uncontrollable. This aspect of these RES also effects the spot price of electricity on the energy markets. Studies indicate a decrease of the average spot price [9, 10], but also an increase of the volatility of the price [11, 12]. In today’s European district heating grids, about three quarter of the total heat supply is supplied by combined heat and power plants (CHP) [13]. The electricity produced simultaneously with the heat production can be sold February 21, 2017 on the spot markets. Since the increased variance in the price of electricity, for the profitability of the CHP plant it is important to produce electrical power when the price is high. In this way, the CHP indirectly contributes to the balance of the electricity grid: when a lot of intermittent renewable power is available the remaining power demand and correspondingly the price will be low, stimulating the CHPs to switch off. In the same way, scarcity of renewable energy will invoke the CHPs to switch on. Off course, the demand of thermal power will never be fully synchronised to the demand of electricity. Therefore, thermal energy storage is required when controlling the CHP electricity driven. Usually, this storage consists of one large water storage tank placed next to the CHP. In this paper, a case study is presented of a small scale district heating system heated by a CHP. The CHP is controlled ’actively’. This means that, instead of regular heat driven control of the CHP, the control algorithm tries to meet a certain objective, in this case to maximise the profit for the CHP owner. In practice, this means that the CHP will be enabled as much as possible at times of high electricity price. The heat produced simultaneously is stored in a thermal energy storage. Besides the usual control storage concept described above, also a configuration with distributed storage tanks is taken into account. Finally, a configuration whereby the thermal mass of buildings is used to store thermal energy. The research question in this paper is straightforward: which storage concept performs best for the studied case? 1.3. Goal of the tests All studies mentioned in 1.2 assume a central buffer, placed at the CHP plant. This is the most obvious solution, but other options can be thought of as well. In this work, we quantify the profit of switching district heating CHPs on appropriate moments (high spot market price) and compare the performance for different storage possibilities. Therefore a simulation model was developed for a fictive DHN in a neighbourhood with 100 connected buildings. A representative winter week was simulated for a reference case and the different storage cases. In the reference case, the CHP is heat-driven controlled. No thermal storage is present and the CHP always produces the actual heat demand of the heat district grid. In this case, electricity is a surplus product sold at any price. Besides this reference case, the three storage configurations are evaluated: 1. In this configuration, next to the CHP a central storage tank is installed. The CHP is electricity driven, meaning that the operation of the CHP is optimized to the actual stop price of electricity. The big advantage of this configuration is that there is no intervention in the control of the DHN valves in the building substations. When the building needs heat at a certain time, the valve of the district heating opens until no heat is needed any more. Also, no communication is needed between the CHP control software and the individual buildings. 2. In the second configuration, the thermal storage capacity is distributed amongst the individual buildings, by installing small buffers in every building. When it is interesting to switch on the CHP, the control system will open the valves of the building substations with the highest actual heat demand, i.e. the building with the most empty buffer. Since in this configuration communication is needed between the individual buildings and central control system anyway, also the thermal mass of the building can be activated. This is established by increasing the indoor temperature of the building within certain limits. In this configuration, the total volume of all buffer tanks together is the same as the central buffer in the first storage configuration but the additional thermal mass of the building increases the storage capacity compared to the first configuration. 3. The last configuration is included to quantify the potential of the activation of building mass only. This configuration is similar to the second one, only the distributed buffers are omitted. 1.2. Operational optimization of district heating CHPs Research on active control of district heating CHPs is far from new. The last decade, several studies were published on CHPs selling their electricity to the spot market. In [14] the simulation results are shown for the optimal control of a CHP with a thermal storage. For different situations the cost savings are calculated. Compared to the case whereby the CHP is following the heat demand, the cost saving due to active control amounts to 17% for example. Also Rolfsman [15, 16] presented an optimization algorithm to maximize the profit of a CHP based on mixed integer linear programming. Mixed integer linear programming was already used in 1992, when Gustafsson and Karlsson [17] developed an optimization scheme for the operation of a district heating CHP. This scheme was applied to a case study in Malmö, Sweden. Also Gunkel et al. [18] applied a mixed integer linear programming technique to schedule the operation of a fleet of small CHPs in a micro-grid. Others used a combination of dynamic programming and Lagrangian relaxation techniques [19], fuzzy linear programming [20], or heuristic optimization methods [21]. Some authors also employ existing optimization solvers to schedule CHP operation. E.g in [22] GAMS is used to solve the scheduling problem of a CHP and [23] describes the use of ACOM. Another very popular scheduling software is energyPRO [24], used in studies like e.g. [25, 26]. The first storage configuration is most common and was applied in the above mentioned studies [14, 15, 18, 19, 20, 22, 23, 25, 26]. Storage in the thermal mass in buildings (the third configuration) was studied in [27, 28, 15, 29]. Distributed storage vessels as in the second configuration are a lot less common in literature. They are mentioned 2 though as a solution to deploy district heating in areas with low heat densities [30]. 2. METHODS 2.1. The district heating pipe model To calculate the flow rates and pressures in the network, a method developed by Valdimarsson [31] is used. In analogy to electrical circuits the Kirchoff laws are applied, whereby voltage is replaced by pressure and flow rate by current. A complication is however that in hydraulic circuits the relation between flow rate and pressure is not linear, like the relation between voltage and current in electrical circuits (Ohms law), but quadratic. To calculate the temperature evolution in a pipe, the node model developed by Benonysson [32] was implemented. This quasi-dynamic model relies on the fact that pressure and flow in district heating grids change orders of magnitudes faster than the temperature of the water in the pipes. In this model, the outlet temperature of a pipe is calculated as the input temperature of a certain amount of time steps before. Then, a correction is applied to this calculated outlet temperature, to take into account the heat capacity of the pipe wall and heat losses to the environment. A summary of this method can be found in [33]. An schematic representation of the district heating network studied in this paper is shown in figure 1. The CHP provides heat to 100 buildings, located in 4 streets. The network consists of twin pipes with a total length of 2.1 km and pipe diameters ranging from DN25 to DN100. With these diameters, the pressure losses in the pipes are limited to 200 P a/m. Figure 1: Schematic representation of the district heating grid In table 1 an overview is given of the meaning of the different parameters, inputs and outputs of the model as well as the units used in the simulations. The remains if this section discusses the determination of the values of the parameters. 2.2. The building model Every building in the network is represented by a lumped capacitance model. In these models the thermal problem is translated to an electric analogue, whereby a temperature is transformed to a voltage and power to an electrical current. The building properties are described as a combination of resistances (R) and capacitances (C). By solving the Kirchoff equations, the evolution of the temperatures in the buildings are calculated. The buildings in the studied network all have the same circuit, shown in figure 2, but the values of the parameters differ for every house. Applying the Kirchoff current law leads to equations 1. By solving these equations, the evolution of the temperatures can be calculated.  Thout −Ti i i i + Piv + Pel + Ra + TaR−T + TeR−T =0 −Ci dT  dt + Rih  ia ie     Ta −Te Te −Ti e −Ce dT dt + Rea = Rie       −Thout −Ti hout + H ThinR = Thout −Ch dTdt Rih h (1) 3 symbol Rh Rih Rie Rea Ria Ci Ch Ce H Ta Piv Pel Ra Ti Te Thout description thermal resistance radiator thermal resist. radiator-inside thermal resist. inside-envelope thermal resist. envelope-ambient thermal resist. inside-ambient thermal capacitance inside thermal capacitance radiator thermal capacitance envelope boolean: 1 if heating is on ambient temperature power infiltration electrical power building power of solar irradiation building inside temperature building envelope temperature heating system return temp. unit ◦ C/kW ◦ C/kW ◦ C/kW ◦ C/kW ◦ C/kW kW h/◦ C kW h/◦ C kW h/◦ C ◦ C kW kW kW ◦ C ◦ C ◦ C Table 1: parameters, inputs and outputs of the RC-circuit of the building The 100 buildings used in the simulation are all derived from one standard building, in detail described in [34]. This building is a detached house with a living area of 103 m2 and a protected volume of 452 m3 . The building has 30)/16.0◦ C/kW = 2.49◦ C/kW . In the same way, Rih can be defined as Rih = (30 − 20)/16.0◦ C/kW = 0.62◦ C/kW . The values above are determined for the standard building. Since in the simulation 100 buildings are used it is relevant to introduce statistical spread in the building parameters. Therefore, for the different buildings the parameters Ci , Ce , Ch , CW , CS , Rie and Rea are normally distributed around the value of the standard building with a standard deviation of 20% of the mean value. An overview of the resulting values used in the simulations is shown in 2. a K-value of 40, which is the legal norm in Flanders. For this building Ci is 20.13 kW h/K, and Ce is 21.23 kW h/K. The building is heated by means of radiators which have a low thermal mass, resulting in a thermal capacitance Ch of 0.17 kW h/K. Air infiltration losses are modelled by as a power Piv and resistance Ria . The power loss P due to infiltration can be calculated by the formula: P = −ṁ cp ∆t (2) = −ρV̇ cp ∆t (3) parameter Rh Rih Rie Rea Ria Ci Ch Ce where ṁ is the mass flow rate of the air flow due to infiltration, V̇ the volume flow rate, cp and ρ the heat capacity and density of air and ∆t the temperature difference between inside and outside. V̇ was determined by the formula [35]: p (4) V̇ = AL CS ∆t + CW U 2 where AL is the affective air leakage area, CS is the stack coefficient and CW the wind coefficient and U the wind speed. Linearisation of this formula leads to: P = ∆T + AP iv .U + BP iv Ria mean 2.4825 0.6206 1.0035 2.0057 12.3195 20.2141 0.1621 21.2738 min 1.5881 0.3970 0.5332 0.9350 4.6360 10.0500 0.0936 12.4910 max 3.6914 0.9229 1.7233 5.0462 25.5365 30.9041 0.2301 30.5981 Table 2: values of the RC-circuit parameters of the building (5) with " Ria CS + 2CS ∆t0 + 2CW U02 p = − AL ρ c p 2 CS ∆t0 + CW U02 Cw U0 ∆T0 AP iv = −AL ρ cp p CS ∆t0 + CW U02 2.3. The central buffer model #−1 All buffers in the simulations are modelled by means of a multi-node model. This is a one-dimensional model whereby the buffer vessel is represented as number of stacked volume segments. Each segment is fully-mixed, meaning that the whole segment is assumed to have the same temperature. A mathematical description of the model is described in [37, 38]. In the simulation described in this paper, the central buffer has 50 layers. In the configuration with a central storage buffer, there are no storage vessels installed in the houses. In this case, the coupling between the building and the district heating network is achieved by means of a commonly used indirect substation set as shown in figure 3. (6) Cs + 2Cw U02 ∆T0 BP iv = AL ρ cp p 2 CS ∆t0 + CW U02 Finally Piv is defined as Piv ≡ AP iv .U + BP iv . In the simulation, the following values are used for the coefficients: CS = 4.35 10−4 , CW = 1.61 10−4 , AL = 621 10−4 m, ∆T0 = 12.5◦ C and U0 = 3.5 m/s. Calculated according EN 12831 [36], the reference building has maximum static power demand of 9.8 kW at an internal temperature of 20◦ C and an ambient temperature of −8◦ C, and excluding ventilation and infiltration losses (Ria = 0), electrical power (Pel = 0) and solar irradiation (Ra = 0). From the scheme in 2, one then can deduct Rie + Rea = (20◦ C − (−8)◦ C)/(9.8kW ) = 2.87◦ C/kW . For the reference building Rie = 1◦ C/kW . Once all the values for the coefficients are known, the design power for the heating system can be determined. Therefore to the maximum static power demand of 9.8 kW the infiltration losses are added, as well as a reheat term to allow fast reheat of the building. This reheat term was chosen at 22W/m2 . In this way, the heating system design load for the standard building is 16.0 kW. The design temperature regime for the heating system is 70◦ C −30◦ C, therefore Rh can be calculated as Rh = (70− Figure 3: buffers 4 substations in configurations without local 2.4. The distributed buffers model to partial load curves supplied by a CHP-supplier. Apart from the calculation of these equations, a minimum onIn the configuration with the distributed buffers, three types of buffers are considered, randomly distributed amongst and off-time (∆ton min and ∆tof f min ) is added to the model. This means that, once the CHP is active, the CHP the buildings. These types are representative for decenmust stay on during a certain time. In the same way, once tralised buffers on the market today. the CHP shuts down it stays off during a certain period. The first type is an open buffer type, as shown in figure The parameters used in the simulation are shown in table 4a. This is the most simple type of buffer, with no separa3. tion between the primary and secondary flow of the buffer. In this buffer, heat is stored for building heating as well parameter value unit as domestic hot water production. Two heat exchangers Pel max 600 kW are provided to separate the district heating water from fm min 0.4 − the building’s heating circuit and the domestic hot water. ∆tof f min 15 min The buffers in the simulation have a volume of 500 l. ∆ton min 15 min The second type is a buffer with an immersed coil heat αgas 31.250 kW exchanger, as presented in figure 4b. This type of buffer βgas 1310.75 kW is commonly used in solar thermal installations, where the γgas 181.35 kW coil heat exchanger realizes a physical barrier between the αheat 3.1537 10−5 kW/(◦ C)3 heat transfer fluid and the domestic hot water. A buffer βheat −7.4162 10−3 kW/(◦ C)2 volume of 200 l is used in the simulations. γheat −0.3258 kW/◦ C The last type of buffer as a tank-in-tank buffer (figure δheat 704.09 kW 4c), whereby the water from inner tank is heated by the heat 6.0633 10−4 kW/(◦ C)2 fluid in the other tank. The tank wall between the inner ζheat −0.1848 kW/◦ C and outer tank acts as a heat exchanger in this case. In ηheat 160.01 kW the model, the inner tank has a volume 164 l while the outer tank’s volume is 39 l. In these cases, heat for space Table 3: values of the CHP parameters heating is not stored, so the demand of heat needs to be fulfilled directly by the district heating grid. Like in the configuration with a central buffer vessel, Similarly, also for the gas boiler a quasi-static blackthey are modelled by means of a multi-node model. To box model was developed. limit the computational time, the number of layers per buffer is chosen lower than for the centralised buffer: in  Pgas = Pgas nom fm , fm min 6 fm  this configuration, each local buffer has 15 layers.         2.4.1. The CHP and boiler model Pout = ef f . Pgas     The heat to the network is provided by a natural gas   3 2  fired CHP, with a natural gas boiler as backup. These com ef f = A(Pgas ) ∗ Tin + B(Pgas ) ∗ Tin    ponents are represented by means of quasi-static black-box  +C(Pgas ) ∗ Tin + D(Pgas )    models. The equations for the CHP are: (8) 2 + β Pgas + γ A(Pgas ) = α Pgas       Pel = Pel max fm , fm min 6 fm 6 1      2   B(Pgas ) = δ Pgas +  Pgas + ζ          Pheat = Aheat (Tin ) fm + Bheat (Tin )        2   C(Pgas ) = η Pgas + θ Pgas + ι       2  Pgas = αgas fm + βgas fm + γgas    2  D(Pgas ) = κ Pgas + µ Pgas + ν     3 2  Aheat (Tin ) = αheat Tin + βheat Tin + γheat Tin + δheat  where Pheat is the heat output, Pgas nom the nominal gas     input, Pgas the gas input α to ν are parameters again,   2 Bheat (Tin ) = heat Tin + ζheat Tin + ηheat fitted to supplier data. fm min is the lower modulation (7) limit. In table 4 an overview is given of the parameters where Pel and Pheat are the electrical and thermal power used. produced by the CHP, Pgas is the input power consumption. Pel max is the maximum electrical power of the CHP 2.5. The control algorithms (parameter), fm the modulation factor of the CHP which 2.5.1. Reference case is limited between fm min , the lower modulation limit and The local building control system. 1. αgas to γgas and αheat to ηheat are parameters, fitted In the reference case no storage is applied. All buildings 5 parameter Pgas nom fm min α β γ δ  ζ η θ ι κ µ ν value 1100 0.1 −7.758 10−13 −1.119 10−10 3.295 10−6 1.195 10−10 2.911 10−8 −4.665 10−4 −6.067 10−9 −1.558 10−6 1.800 10−2 1.121 10−7 −1.503 10−5 7.675 10−1 unit kW − (◦ C 3 kW 2 )−1 (◦ C 3 kW )−1 (◦ C 3 )−1 (◦ C 2 kW 2 )−1 (◦ C 2 kW )−1 (◦ C 2 )−1 (◦ C kW 2 )−1 (◦ C kW )−1 (◦ C)−1 (kW 2 )−1 (kW )−1 − (summarised). In the second step, a control action is generated based upon an optimization spanning a finite time horizon T . In the third step, this control action is projected on local decisions using a market-based multi-agent system. For the first scenario with a central hot water storage tank the TLCs at building level follow the default control strategy as detailed in Section 2.5.1. These three steps are repeated every time step t. Step 1: Aggregation. At every time step t, bid functions bd (pr ) are constructed, whereby pr represents the priority for the TCL, which could be seen as a ’virtual price’ which the TCL is willing to pay for heat (Figure 5). Table 4: values of the gas boiler parameters use a common thermostat control system to maintain the indoor temperature settings. This means that, when the building indoor temperature drops below a set point, the valve from the district heating grid is opened and heat is supplied to the building until the indoor temperature raises above another set point. The heating circuit supply set temperature is determined by means of a heating curve. This set point is maintained by adjusting the flow rate of the district heating water with the district heating valve. When there is a domestic hot water demand, the district heating valve is fully opened. When both a heating demand and domestic hot water demand exists, the district heating water flow rate is divided over the two circuits. Figure 5: The bidding curve of the TLCs. To do so, first the temperature Td,t information is retrieved from all storage systems d ∈ S. For the water storage buffers, in configurations 1 and 2 (section 1.3), Td,t is the average temperature of the buffer layers; for the thermal mass storage in configurations 2 and 3 (section 1.3), it represents an average indoor air temperature. This temperature is constrained between a minimum and maximum limit Td , Td (parameters). These values are then used to construct a bid-function for every TCL [42, 40, 44] expressed as the flow rate Ld versus a heuristic (pr ). Above a corner value pc,d the bid function is zero: The CHP and gas boiler control system. The set temperature of the district heating grid supply temperature is determined by a heating curve, using the mean outside temperature during the past 24 hours as an input. The CHP is than modulated to this set temperature. If the set temperature cannot be reach by the CHP, the gas boiler is enabled as well. Also if the desired power of the CHP is below the lower modulation limit of the installation, the CHP shuts down and the gas boiler is used to supply the necessary heat. pc,d = 1 − SoC = Td − Td,t . Td − Td (9) Determining this heuristic is considered relatively straightforward as it requires only temperature measurements of the TLCs. As a first attempt, the flow rate (Ld ) is estimated in the same way as described in section 2.5.1. Afterwards, the values of Ld will be adapted through a PI-controller, as will be later discussed in Step 3. Finally the bid function for TCL d has the following form: 2.5.2. Active control cases The active control algorithm is based on a pragmatic Model Predictive Control (MPC) approach [39] following the Three Step Approach (TSA) as presented in [40, 41]. The water buffers and the thermal mass of the buildings in this work, can be seen as Thermostatically Controlled Loads (TCLs) as in [42]. Here however, an extension must be made for TCLs coupled to a DHN, as explained in [43]. In the first aggregation step, the temperature information of the TCLs is collected, as is a bid function as explained below. Then, these individual bid functions are aggregated bd (pr ) = Ld (1 − H(pr + SoC − 1)), (10) where H corresponds to the heaviside function. After determining the biding function for every TLC individually, these functions are aggregated (summarized). A more detailed description can be found in [43] 6 Step 2: Optimization. In the second optimization step an optimal control vector P∗ is determined, which is used as the control action in the third step. The objective of the energy arbitrage optimization f (P) problem is defined as: T X t=1 Pt λt ∆t + T −1 X α|Pt+1 − Pt |. (15) This optimal power profile P∗ is then used in the third step. (11) Step 3: Real time control. In the third step, the energy corresponding to Pt∗ is dispatched over the cluster of TCLs, using a market-based multi-agent system [40, 47, 42]. As in [45], a Proportional Integrator (PI) controller (at a central level) managing the flow rates at the different buildings, is used (Figure 6). This PI-controller will make sure that the actual consumed power by the cluster of TLCs is matched to the optimal power consumption defined by the MPC in Step 2. t=1 Here λ is the effective cost of supplying 1 unit of thermal energy, taking into account the cost for gas, reward obtained for producing electric energy, the fuel utilization ratio and the heat to power ratio [43]. Pt is the total heating power delivered to cluster of TLCs, at time step t, which is the sum of power delivered to building thermal masses and the water tanks, as described below. The second term in eq. 11 is added for regularization. The MPC models used in the optimization are simplified linear models, described below. For the configurations where the thermal inertia of the buildings is used (the second and third configuration described in section 1.3), an aggregated model is used to describe the dynamics of the entire cluster as in [45]. A second-order model [46] has been used as aggregated model. Energy market time slots u* 1 [Tm Hm − Ta (Ua + Hm ) + γa Pb Qa + Tout Ua ] T˙a = Ca (12) 1 T˙m = [Hm (Ta − Tm ) + γm Qm ] (13) Cm - PI event based Priority Concentrator agent Supply Here Ua is the conductance of the building envelope, Tout P the outside air temperature, Ta = T d∈S d /|S| the aggregated inside air temperature and Tm the temperature of the thermal inertia. The conductance between Ta and Tm is represented by Hm . Qa and Qm represent the heat gains resulting from electric consumption and solar irradiance (these profiles are known inputs). Ca and Cm are the thermal mass of the air and the thermal inertia respectively. Pb is the total power delivered to the cluster of buildings. Finally γa and γm represent scaling factors. The model parameters are fitted based upon historic data, obtained by running the simulation for ten days. When considering the water storage tanks configuration (the first and second configurations described in 1.3) a first-order model has been used [45]. 1 [Us (Tout − Ts ) + γs Pw − d]. T˙s = Cs P∗ = arg minf (P), P  eq.(12), eq.(13) s.t. eq.(14) Flow rate f (P) = sults in: House agent House agent House agent TCL TCL TCL (C)HP Return Figure 6: Overview of the controller approach as developed in this work. The result of the PI controller u is sent to the clearing process (16), after which a clearing priority pr ∗ is sent back to the different devices: p∗r = arg min pr (14) |S| X bd (pr ) − u , (16) d=1 The devices open or close their local valve according to bd (p∗r ). Here Cs is the thermal capacity of the water, Ts the average water temperature, Us the conductance of the storage tank, d the off-take of thermal energy and Pw is the heating power delivered to the water tanks. γs a scaling factor. Also here these parameters are based upon historic data obtained by running the simulation for ten days. Finally the optimization performed every time step re- 2.6. The tested week For every simulation, the same representative winter week was used. This week was chosen as the week in which the mean outside temperature was the closest to the mean temperature during the whole heating season in 7 Belgium. A typical meteorological year (TMY) profile is used as weather data profile. The mean outside temperature during the heating season (1 October to 30 April) is 6.1◦ C. The week used in the simulation is the week with the smallest difference to this mean temperate. This is week 46 (12 to 18 November) with an mean ambient temperature of 6.2◦ C. in the figure. In the active control case without buffers, before 5h, about 800 kW of heat must be produced. At that time the electricity price is high and therefore the demand is fulfilled by the CHP. However after 5h the electricity price decreases, and the heat is produced by the gas boiler. This phenomena can be observed a number of times. 3. RESULTS AND DISCUSSION 3.1. Operational behaviour of the district heating network components As discussed in the introduction, the aim of the active control algorithm is to maximise the revenue of the network operator. Figure 7 shows the behaviour in the DHN during one day (day 5). In the top figure the reference situation is shown. It is clear that the production and demand of heat (left axis) is independent of the price of electricity (right axis). There is a small deviation between heat production and heat demand because of heat losses in the grid and because of the time delay in the grid. If the power demand is higher than the lower modulation limit of the CHP, the CHP is switched on. If the power demand is below this limit, the CHP is switched off and the gas boiler takes over. This explains why after 11h the production is often fulfilled by the gas boiler. The graph also depicts (around 7h30) that, when the heat demand is higher than the maximum power of the CHP, the gas boiler supports the CHP. The figures below show the same day for the active control cases. In these cases there is a much higher correlation between the heat production and high electricity prices (before 4h30, between 11h30 and 18h30 and after 20h30). As explained in 2.5.2, the controller framework consists of two different layers. Firstly, a MPC controller plans the optimal power production during the next time frame. The result of this planning is the black line in the figure. Secondly, the MAS and PI controller distributes the thermal power to the most appropriate buildings. As can be seen, this controller performs properly, since the power production (the filled red area) corresponds very well to the planning. There are some deviations, e.g. for the active case without buffers between 7h30 and 11h30, where according to the planning the production should be 0. The reason for this is that when there is a domestic hot water demand, the district heating valve must be opened for comfort reasons, and therefore heat must be produced inevitably. Once the optimal power production during the time step is known, the choice must be made of supplying the heat by the CHP or by the gas boiler. Since the CHP is selling its electricity to the spot market, the control algorithm will try to switch on the CHP when the electricity price is the highest. At other moments, when the electricity price is low, it could be more advantageous to switch on the gas boiler instead of the CHP. This can also be seen Figure 8: Building and buffer behaviour for the reference and active control case with distributed buffers Figure 8 gives an insight on how the heat demand profile is manipulated by the control framework, for the active case with distributed buffers. As explained above, in this case also the thermal mass of the buildings is used to store heat. The top figure shows the mean indoor temperature of all the buildings (red line) and the distribution of this indoor temperature (shading) for the reference case. Comparing the indoor temperature of the reference case to this of the active case (figure below), one can notice that the indoor temperature distribution for the active case is much more concentrated. This is because the MAS controller always distributes the heat available to the house with the highest heat demand. As a consequence, the building with the lowest temperature is always dragged to the rest of the buildings. In the last figure, the mean temperature in the distributed buffers is shown. A comparable evolution as for the indoor temperature can be noticed. 3.2. Energy consumption and production In table 5 the total energy consumption and production is shown for the different configurations. With respect to the energy demand of the buildings, one can see that the consumption of the central buffer is the same as for the reference case. This is logical, since in both cases the control strategy of the individual buildings is the same. For the other active cases, the energy 8 demand of the buildings is a higher than that of the reference control case. The difference is the result of the different control strategy. In the reference case, the number of times that the district heating valve is opened, is minimized: only when the indoor temperature drops below the lower limit (19.5◦ C) the valve is opened until the indoor temperature reaches the upper limit (20.5◦ C). This valve is opened a lot more in the active cases. For the configuration with the distributed buffers the higher consumption is also resulting from the heat loss of the distributed buffers. The total heat loss of these buffers amounts to 606kW h during the tested week. Having a look at the production of energy, i.e. the energy which is delivered to the district heating grid, compared to the reference case, the efficiency of the district heating grid is somewhat higher for the active control case with distributed buffers and the active case without buffers (90.9% and 92.4% versus 88.9%). This means that the heat losses in these cases would be a bit lower. This is explained by the variation of the power demand and power supply in the grid. In the reference case, whenever one of the buildings need heat, the district heating valve is opened. This means that often the total heat demand of the grid is low. In the active control cases however, the algorithm aims to switch off the power demand of the buildings until the electricity price is high. Once the price is high enough the CHP should switch on, implying that the energy demand of the buildings should be higher than the lower modulation limit of the CHP. Therefore, less moderate heat demands occur in the active cases: the heat demand is either high or very low, as can be seen in the histograms in figure 9. Higher powers correspond to higher flow rates and velocities, and shorter travelling times for the water through the pipes, and consequently lower heat losses. As can be seen from the figure, the power distribution of the active case with a central buffer is comparable to the distribution of the reference case. Therefore also the efficiency of this case is about the same (89.6%). due to the higher revenue from the electricity production of the CHP. Figure 10: Operational profit for the different buffer configurations during the tested week This analysis also indicates that the active case with distributed buffers performs best. The case with distributed buffers performs slightly worse. The case with the central buffer gives less good results, however the difference with the reference case still is significant. This is a bit surprising, since one would expect higher flexibility for the configuration with a central buffer, as also stated in the Nuytten [48]. This cited work nevertheless only calculated the flexibility of the system, not how well that flexibility is utilised. Moreover, a large difference between the central buffer configuration and the other active configurations is that in these last configurations also the building mass of the houses is activated. The total thermal mass of the buildings in the simulation amounts to 4165kW h/K, which is a lot higher than the thermal mass of the central buffer and the distributed buffers (both 39.5kW h/K). Raising the building indoor temperature by 1◦ C therefore corresponds a temperature rise in the buffers of more than 100◦ C. Activating the building mass is therefore shown to be very interesting. For the same reason, the difference in profit between the active case without buffers and the case with distributed buffers is limited. 3.3. Costs and revenues In this final analysis the costs and revenues of the different configurations are compared. The costs consist of the gas costs of the CHP and the gas boiler and the pumping costs. The revenues are resulting from the sale of heat to the customers and electricity to the spot market. The parameters used in this analysis are: a natural gas price of e39.9/M W h (price of gas for small industrial consumers in Belgium) and a price for heat sold of e54.5/M W h (price of gas for residential consumers in Belgium). The price profile of electricity sold is the same profile as the one shown in Figure 8 and represents the Belgian wholesale price. In figure 10 the operational profit - here defined as the difference of the total revenue minus the total costs - is shown for the different configurations. As can be seen, the active control is able to significantly increase this profit 4. CONCLUSIONS In this work a number of storage configurations for district heating grids are compared to each other. To achieve this, a simulation model was built. The flexibility resulting from the storage vessels is used to actively control a CHP, which in this way can produce electricity at times of high electricity prices. The simulation results indicate that the developed control framework perform well, i.e. that the business case maximisation of the profit is achieved. The profit resulting from the different storage configurations are compared to each other. The results show that active control of the CHP is able to increase the profit of 9 the CHP significantly. The configuration with distributed buffers performs best, however only slightly better than the active configuration without buffers. The results for the central buffer case are a little worse, but still a lot better than in the reference case. The reasons for this worse behaviour is that the thermal mass of the buildings, which is activated by the first two configurations, is a lot higher than that of the buffers, resulting in much more flexibility and as a result higher yields. [11] R. Green, N. Vasilakos, Market behaviour with large amounts of intermittent generation, Energy Policy 38 (7) (2010) 3211– 3220. doi:http://dx.doi.org/10.1016/j.enpol.2009.07.038. URL http://www.sciencedirect.com/science/article/pii/ S0301421509005461 [12] I. Milstein, A. Tishler, Intermittently renewable energy, optimal capacity mix and prices in a deregulated electricity market, Energy Policy 39 (7) (2011) 3922–3927. doi:http://dx.doi. org/10.1016/j.enpol.2010.11.008. URL http://www.sciencedirect.com/science/article/pii/ S0301421510008323 [13] DHC+ Technology Platform, District Heating & Cooling - A Vision Towards 2020 - 2030 - 2050, Tech. rep., DHC+ Technology Platform, Brussels (2009). [14] D. Brujic, M. Ristic, K. Thoma, Optimal Operation of Distributed CHP Systems for Participation in Electricity Spot Markets, in: Proc. Eurocon 2007, Int. Conf. Comput. as a Tool, Warsaw, Poland, 2007, pp. 1463–1469. [15] B. Rolfsman, Combined heat-and-power plants and district heating in a deregulated electricity market., Appl. Energy 78 (1) (2004) 37. URL 10.1016/S0306-2619(03)00098-9http://search. ebscohost.com/login.aspx?direct=true{&}db=asr{&}AN= 12377232{&}site=ehost-live [16] H. Cho, R. Luck, S. D. Eksioglu, L. M. Chamra, Cost-optimized real-time operation of CHP systems, Energy Build. 41 (4) (2009) 445–451. doi:10.1016/j.enbuild.2008.11.011. [17] S.-I. Gustafsson, B. G. Karlsson, Heat accumulators in CHP networks, Energy Convers. Manag. 33 (12) (1992) 1051–1061. doi:http://dx.doi.org/10.1016/0196-8904(92)90002-E. URL http://www.sciencedirect.com/science/article/pii/ 019689049290002E [18] D. Gunkel, T. Heß, P. Schegner, Optimal Scheduling of Decentralized Co-Generation Plants in Micro-Grids, in: Proc. IEEE Power Energy Soc. Gen. Meet., San Diego, USA, 2012, pp. 1–7. [19] E. Dotzauer, K. Holmström, Optimal Scheduling of Cogeneration Plants, in: Proc. 16th Int. Symp. Math. Program., Lauzanne, Switzerland, 1997. [20] J.-b. Lee, C.-H. Jung, S.-H. Lyu, A Daily Operation Scheduling of Cogeneration Systems Using Fuzzy Linear Programming, in: Proc. IEEE Power Eng. Soc. Summer Meet., Edmonton, Canada, 1999, pp. 983–988. doi:10.1109/PESS.1999.787450. [21] E. Perea, N. Ruiz, I. Cobelo, Z. Lizuain, A. Carrascal, A novel optimization algorithm for efficient economic dispatch of Combined Heat and Power devices, Energy Build. 111 (2016) 507– 514. doi:10.1016/j.enbuild.2015.11.025. URL http://dx.doi.org/10.1016/j.enbuild.2015.11.025 [22] C. Schaumburg-Müller, A Partial Load Model for a Local Combined Heat and Power Plant, in: Proc. 1st Nord. Optim. Symp., Copenhagen, Denmark, 2006, pp. 1–9. [23] Ž. Bogdan, D. Kopjar, Improvement of the cogeneration plant economy by using heat accumulator, Energy 31 (13) (2006) 2285–2292. [24] EMD, energyPRO (2013). URL http://www.emd.dk/energyPRO/Frontpage [25] A. N. Andersen, H. Lund, New CHP partnerships offering balancing of uctuating renewable electricity productions, J. Clean. Prod. 15 (3) (2007) 288–293. [26] G. Streckien, V. Martinaitis, A. N. Andersen, J. Katz, Feasibility of CHP-plants with thermal stores in the German spot market, Appl. Energy 86 (11) (2009) 2308–2316. doi:http: //dx.doi.org/10.1016/j.apenergy.2009.03.023. URL http://www.sciencedirect.com/science/article/pii/ S0306261909001147 [27] L. C. O. Ingvarson, S. Werner, Building mass used as short term heat storage, in: Proc. 11th Int. Symp. Dist. Heat. Cool., Reykjavik, Iceland, 2008, pp. 2–7. [28] C. Johansson, F. Wernstedt, P. Davidsson, Smart Heat Grid on an Intraday Power Market, in: Proc. Third Int. Work. Agent Technol. Energy Syst. (ATES 2012), Valencia, Spain, 2012, pp. 1–8. Acknowledgements This work has been done under the FP-7 program EHub (260165) and FC-District (260105). References References [1] Euroheat & Power, 2015 Country by country - Statistics Overview (2013 data) (2016). URL http://www.euroheat.org/knowledge-centre/ country-profiles/ [2] H. Fang, J. Xia, K. Zhu, Y. Su, Y. Jiang, Industrial waste heat utilization for low temperature district heating, Energy Policy 62 (0) (2013) 236–246. doi:http://dx.doi.org/10.1016/ j.enpol.2013.06.104. URL http://www.sciencedirect.com/science/article/pii/ S0301421513006113 [3] K. Holmgren, Role of a district-heating network as a user of waste-heat supply from various sources the case of Göteborg., Appl. Energy 83 (12) (2006) 1351–1367. URL 10.1016/j.apenergy.2006.02.001http://search. ebscohost.com/login.aspx?direct=true{&}db=asr{&}AN= 22579634{&}site=ehost-live [4] H. Lund, B. V. Mathiesen, Energy system analysis of 100% renewable energy systemsThe case of Denmark in years 2030 and 2050, Energy 34 (5) (2009) 524–531. doi:http://dx.doi.org/ 10.1016/j.energy.2008.04.003. URL http://www.sciencedirect.com/science/article/pii/ S0360544208000959 [5] M. Münster, P. E. Morthorst, H. V. Larsen, L. Bregnbæk, J. Werling, H. H. Lindboe, H. Ravn, The role of district heating in the future Danish energy system., Energy 48 (1) (2012) 47–55. [6] H. Lund, B. Möller, B. V. Mathiesen, A. Dyrelund, The role of district heating in future renewable energy systems, Energy 35 (3) (2010) 1381–1390. [7] REN21, Renewables 2016 Global Status Report, Tech. rep., REN21, Paris, France (2016). [8] P. Cazzola, F. Cuenot, J. Chiavari, D. Elzinga, L. Fulton, B. Gibson, T. Kerr, S. Lee, U. Remme, C. Tam, M. Taylor, P. Tepes, N. Trudeau, Energy Technology Perspectives 2010, Scenarios & Strategies to 2050, Tech. rep., International Energy Agency (2010). [9] F. Sensfuß, M. Ragwitz, M. Genoese, The merit-order effect: A detailed analysis of the price effect of renewable electricity generation on spot market prices in Germany, Energy Policy 36 (8) (2008) 3086–3094. [10] C. K. Woo, I. Horowitz, J. Moore, A. Pacheco, The impact of wind generation on the electricity spot-market price level and variance: The Texas experience, Energy Policy 39 (7) (2011) 3939–3944. doi:http://dx.doi.org/10.1016/j.enpol. 2011.03.084. URL http://www.sciencedirect.com/science/article/pii/ S0301421511002813 10 [29] G. Reynders, J. Diriken, D. Saelens, Quality of grey-box models and identified parameters as function of the accuracy of input and observation signals, Energy Build. 82 (2014) 263–274. doi: 10.1016/j.enbuild.2014.07.025. URL http://dx.doi.org/10.1016/j.enbuild.2014.07.025 [30] H. Zinko, B. Bøhm, H. Kristjansson, U. Ottosson, M. Rämä, K. Sipilä, District heating distribution in areas with low heat demand density, Tech. rep., International Energy Agency (2008). [31] P. Valdimarsson, Modelling of Geothermal District Heating Systems, Phd thesis, University of Iceland (1993). [32] A. Benonysson, Dynamic Modelling and Operational Optimization of District Heating Systems, Phd thesis, Technical University of Denmark (DTU) (1991). [33] H. Pálsson, H. V. Larsen, B. Bøhm, H. F. Ravn, J. Zhou, Equivalent models of district heating systems, Tech. Rep. 1323, Technical University of Denmark (DTU), RISØNational Laboratory (1999). [34] G. Verbeek, Optimisation of Extremely Low Energy Residential Buildings, Ph.D. thesis, KULeuven (2007). [35] American Society of Heating Refrigeration and AirConditioning Engineers, 2009 ASHRAE Handbook - Fundamentals, American Society of Heating, Refrigeration and Air-Conditioning Engineers, Atlanta, 2009. [36] European Committe for Standardisation, EN 12831 Heating systems in buildings - Method for calculation of the design heat load, Tech. rep., European Committe for Standardisation (2003). [37] E. M. Kleinbach, W. A. Beckman, S. A. Klein, Performance study of one-dimensional models for stratified thermal storage tanks, Sol. Energy 50 (2) (1993) 155–166. doi:http: //dx.doi.org/10.1016/0038-092X(93)90087-5. URL http://www.sciencedirect.com/science/article/pii/ 0038092X93900875 [38] B. J. Newton, Modeling of Solar Storage Tanks, Msc thesis, University of Wisconsin-Madison (1995). [39] E. F. Camacho, C. Bordons Alba, Model Predictive Control, 2nd Edition, Springer, 2004. [40] S. Vandael, B. Claessens, M. Hommelberg, T. Holvoet, G. Deconinck, A Scalable Three-Step Approach for Demand Side Management of Plug-in Hybrid Vehicles, Smart Grid, IEEE Trans. 4 (2) (2013) 720–728. [41] A. Aertgeerts, Demand side management of the thermal flexibility in a residential neighborhood using a hierarchical marketbased multi-agent system, master thesis, KULeuven, 2014. [42] B. J. Claessens, S. Vandael, F. Ruelens, M. Hommelberg, Selflearning demand side management for a heterogeneous cluster of devices with binary control actions, in: 2012 3rd IEEE PES Innov. Smart Grid Technol. Eur. (ISGT Eur., IEEE, 2012, pp. 1–8. [43] B. J. Claessens, D. Vanhoudt, J. Desmedt, F. Ruelens, ModelFree Control of Thermostatically Controlled Loads Connected to a District Heating NetworkarXiv:1701.08074. URL http://arxiv.org/abs/1701.08074 [44] K. De Craemer, G. Deconinck, Balancing trade-offs in coordinated PHEV charging with continuous market-based control, in: Innov. Smart Grid Technol. (ISGT Eur. 2012 3rd IEEE PES Int. Conf. Exhib., 2012, pp. 1–8. [45] B. Biegel, P. Andersen, J. Stoustrup, M. B. Madsen, L. H. Hansen, L. H. Rasmussen, Aggregation and Control of Flexible Consumers - A Real Life Demonstration, 1st Edition, Vol. 47 of I F A C Workshop Series, IFAC, 2014, pp. 9950–9955. doi:http://dx.doi.org/10.3182/20140824-6-ZA-1003.00718. URL //www.sciencedirect.com/science/article/pii/ S1474667016431915 [46] W. Zhang, K. Kalsi, J. Fuller, M. Elizondo, D. Chassin, Aggregate model for heterogeneous thermostatically controlled loads with demand response, in: Power Energy Soc. Gen. Meet. 2012 IEEE, 2012, pp. 1–8. [47] M. P. F. Hommelberg, B. J. van der Velde, C. J. Warmer, I. G. Kamphuis, J. K. Kok, A novel architecture for real-time operation of multi-agent based coordination of demand and supply, in: Power Energy Soc. Gen. Meet. - Convers. Deliv. Electr. Energy 21st Century, 2008 IEEE, 2008, pp. 1–5. [48] T. Nuytten, B. Claessens, K. Paredis, J. Van Bael, D. Six, Flexibility of a combined heat and power system with thermal energy storage for district heating, Appl. Energy 104 (4) (2013) 583–591. 11 Figure 2: RC-circuit of the building model Figure 4: Buffer types used in the simulation energy consumed configuration no buffers, regular control (reference) no buffers, active control distributed buffers, active control central buffer, active control 70649 73562 73594 70577 energy produced total 79447 (+4.1%) 79600 (+1.9%) (+4.2%) 80965 (−0.2%) (−0.1%) 78741 (−0.9%) energy produced CHP 58714 52100 (−11.3%) 59177 (+0.8%) 43750 (−25.6%) energy produced gas boiler 20651 27985 (+35.5%) 21900 (+6.0%) 35804 (+73.4%) Table 5: Produced and consumed energy for the different configurations (in kWh) and difference in terms of percentage to the reference case 12 900 45 600 30 300 15 Power (kW) 0 Power (kW) 4 8 12 Time (h) Active case − no buffers 16 20 0 24 1500 75 1200 60 900 45 600 30 300 15 0 0 4 8 12 16 Time (h) Active case − distributed buffers 20 0 24 1500 75 1200 60 900 45 600 30 300 15 0 Power (kW) 0 0 4 8 12 16 Time (h) Active case − central buffer 20 0 24 1500 75 1200 60 900 45 600 30 300 15 0 0 4 Production CHP 8 12 Time (h) Production gas boiler 16 Demand buildings 20 0 24 Electricity price ( /MWh) 60 Electricity price ( /MWh) 1200 Electricity price ( /MWh) 75 Electricity price ( /MWh) Power (kW) Reference case 1500 Setpoint from MPC Figure 7: Power production and demand (left axis) and electricity price (right axis) during the tested week 13 Figure 9: Distribution of the power supply to the grid for the different storage configurations 14
3cs.SY
On the Capacity of Wireless Powered Cognitive arXiv:1712.04747v1 [cs.IT] 13 Dec 2017 Relay Network with Interference Alignment Sultangali Arzykulov∗ , Galymzhan Nauryzbayev, Theodoros A. Tsiftsis∗ and Mohamed Abdallah‡ ∗ ‡ School of Engineering, Nazarbayev University, Astana, Kazakhstan Division of Information and Computing Technology, College of Science and Engineering, Hamad Bin Khalifa University, Qatar Foundation, Doha, Qatar Email: {sultangali.arzykulov, theodoros.tsiftsis}@nu.edu.kz, [email protected], [email protected] Abstract In this paper, a two-hop decode-and-forward cognitive radio system with deployed interference alignment is considered. The relay node is energy-constrained and scavenges the energy from the interference signals. In the literature, there are two main energy harvesting protocols, namely, time-switching relaying and power-splitting relaying. We first demonstrate how to design the beamforming matrices for the considered primary and secondary networks. Then, the system capacity under perfect and imperfect channel state information scenarios, considering different portions of time-switching and power-splitting protocols, is estimated. Keywords Decode-and-forward (DF), energy-harvesting (EH), capacity, cognitive radio (CR), interference alignment (IA). I. C OGNITIVE I NTRODUCTION radio (CR) is a promising paradigm that can resolve the problem of the spectrum scarcity [1]. Cognitive radio network (CRN) consists of primary users (PUs), who are licensed users of the spectrum, and secondary users (SUs), who can access the spectrum only when they do not cause harmful interference to PUs [2]. SUs can access the licensed spectrum by three paradigms such as interweave, underlay and overlay [2]. Interference alignment (IA) is a very powerful technique potential to provide higher degrees of freedom (DoFs) which means interference-free signaling dimensions at receivers [3]– [7]. The promising performance of IA can be also attained in CR by suppressing interference at PUs. By using this technique, SUs easily coexist with primary networks (PNs) by achieving higher data rates and not causing harmful interference to PUs [8]. Many previous studies introduced the impact of IA on the performance of the underlay CR [9]–[11]. A multiple-input multiple-output (MIMO) CRN with cooperative relay was presented in [12], where DoFs for the network was increased by using IA. The authors in [13] and [14] introduced energy-harvesting (EH) as a promising technology to prolong the life-time of battery-powered wireless devices. There are two main EH architectures such as time-switching (TS) and power-splitting (PS) protocols [15]. In [16], the authors proposed a common framework to jointly study IA and simultaneous wireless information and power transfer (SWIPT) in MIMO networks, where the users were dynamically chosen as EH terminals to improve the performance of wireless power transfer (WPT) and information transmission. The work in [17] considered a spectrum sensing policy for the EH-based CR to ensure that SUs can harvest the energy from the PUs signals in the TS mode. In [18], the same system was investigated with the optimal information and energy cooperation methods between SUs and PUs, where SUs harvest energy from PUs, then use that energy to transmit their own and PUs’ signals. Both [17] and [18] assumed that all nodes in CR have a perfect channel state information (CSI), however, in practice it is more common to deal with imperfect CSI due to channel estimation errors [19]. Unlike the existing studies and to the best of our knowledge, no work has been addressed to jointly study these three important areas, namely, CRN, WPT and IA. Therefore, this work focuses on studying the underlay IA-based CRN where an energy-restricted relay node operates in the time-switching relaying (TSR) and power-splitting relaying (PSR) modes. The performance of primary receivers and the EH-based relay of the secondary network (SN) under interference environment is analyzed. Interference at the PUs and the relay is cancelled by the well-known IA technique. The network capacity for these protocols is evaluated with different settings of TS/PS portions and under various CSI scenarios. II. S YSTEM M ODEL We consider a system model consisting of two pairs of PUs and three SUs. Within the PN, each transmitter communicates to its corresponding receiver and causes interference to another primary receiver and secondary relay node. It is assumed that there is no temperature constraint at the SUs which may imply N1 1 M1 1 ... ... T1 R1 M2 1 N2 1 ... ... T2 R2 NS 1 NR 1 ND 1 ... ... ... S R D direct links interfering links Fig. 1. The IA- and EH-based CRN with two PUs and one SU sharing the spectrum simultaneously. interference at the primary receivers. The SN consists of a source (S), a relay (R) and a destination (D) nodes. S communicates with D through the assistance of the energy-constrained R that operates in a halfduplex mode and decodes and forwards (DF) the signal of S to D within two time slots. To support this, R harvests energy from the interference signals, while S and D are assumed to have external power sources. Furthermore, D is assumed to be located far from PUs and does not receive any interference. Each node of the network is assumed to be deployed with multiple antennas as shown in Fig.1, where solid lines indicate the direct channels while the dotted lines denote the interfering links. We also assume that the channels remain constant during a transmission block time T , but vary independently from one block to another. [k] Channel links between nodes are defined as follows. For the PN case, Hj,i ∈ CNj ×Mi , ∀i, j ∈ {1, 2} denotes the channel between receiver jth (Rj ) and transmitter ith (Ti ), where superscript k indicates a certain time period (TP) when the data transmission occurs. Nj and Mi are the numbers of antennas at Rj and Ti , respectively. For the SN case, HR,S and HD,R denote the channel links related to the S-R and R-D transmissions while the inter-network channels are given by Hj,R ∈ CNj ×NR , Hj,S ∈ CNj ×NS and HR,i ∈ CNR ×Mi , where NS , NR and ND denote the numbers of antennas at S, R and D, respectively. Each entry of any matrix H is assumed to be independent and identically distributed (i.i.d.) random variables according to CN (0, 1), where CN (0, 1) denotes the complex normal distribution with zero mean and unit variance. Also, note that each channel link is characterized by the corresponding distance and path-loss exponent denoted by dm,n and τm,n , ∀m ∈ {1, 2, R, D}, ∀n ∈ A = {1, 2, S, R}, respectively. Moreover, a global CSI is also assumed. We assume that the SN and PN nodes exploit the IA technique to mitigate the interference at R and Ri , respectively. Thus, any transmit node l with power Pl utilizes a transmit BF matrix Vl ∈ C(Ml or Nl )×fl , with trace{Vl VlH } = 1, ∀l ∈ A, where fl is the number of the transmitted data streams. At the same time, all receive nodes (except D) exploit the receive BF matrix Ut ∈ CNt ×ft , ∀t ∈ {1, 2, R}, where ft is the number of data streams to be decoded at the corresponding receiver. For simplicity, we assume that each node is deployed with N antennas (Mi = Nj = NS = NR = ND = N). The primary receivers, within two TPs, obtain the following signal [k] yj = s s Pj [k]H [k] [k] Pi [k]H [k] [k] [k] + T[k] Hj,j Vj sj + Hj,i Vi si +ñj , k τj,j Uj τj,i Uj |{z} dj,j dj,i {z } interference from SN | {z } | [k] [k] H {1, 2}, (1) interference from PN, i 6= j desired signal where ñj = Uj ∈ [k] nj is the effective zero-mean additive white Gaussian noise (AWGN) vector at the [k] [k]H output of the beamformer, with E{ñj ñj } = σñ2 j I, where E{·} denotes an expectation operator. Since we assume that sl is the vector containing the symbols drawn from i.i.d. Gaussian input signalling and chosen from a desired constellation, we have E{sl sH l } = I, with l ∈ A. Meeting all these conditions satisfies the average power constraint at each transmit node. Regarding the SN, its interference to PN can be defined as r  [k]H PS    dτj,S Uj Hj,S VS sS , if k = 1, j,S (2) T[k] = r  [k]H P  R   τj,R Uj Hj,R VR sR , if k = 2. dj,R During the S-R transmission, the received signal at R can be written as s s 2 PS H Pi X H [1] yR = UR HR,i Vi si +ñR , τR,S UR HR,S VS sS + τR,i dR,S dR,i i=1 {z } | {z } | desired signal (3) interference from PN where ñR = UH R nR is the effective noise after receive beamforming at the relay. Then, R decodes the desired signal sS and forwards the information signal to D. Hence, D receives the following signal yD = s PR τD,R HD,R VR sR + nD , dD,R (4) 2 where nD is the AWGN noise vector, with E{nD nH D } = σD I. The interference is assumed to be completely eliminated if the following conditions are satisfied at Rj as [20], [21] [k]H [k] [k] Hj,i Vi = 0, ∀i, j ∈ {1, 2}, ∀i 6= j,   Hj,S VS , if k = 1, [k]H [k] [k] Uj J = 0, where J =  H V , if k = 2, j,R R   [k]H [k] [k] rank Uj Hj,j Vj = fj , ∀j ∈ {1, 2}, Uj (5a) (5b) (5c) and at R as [1] UH R HR,i Vi = 0, ∀i ∈ {1, 2},  rank UH R HR,S VS = fS . (6a) (6b) A. Beamforming Design [1] [2] The existing interfering signals need to be orthogonalized to Uj and Uj at Rj during two TPs to satisfy conditions (5). Then, the interference at R needs to be orthogonalized to UR , as R receives the interference only during the S-R transmission. To decode the desired signal from the received signal, the interference space should be linearly independent from the desired signal space. Thus, the precoding matrices need to be designed in such a way that all interference in each receiver span to each others. Thereby, [1] [1] the interference at R1 , R2 and R, in the first TP, can be spanned as span(H1,2 V2 ) = span(H1,S VS ), [1] [1] [1] [1] span(H2,1 V1 ) = span(H2,S VS ) and span(HR,1 V1 ) = span(HR,2 V2 ), where span(A) denotes the [1] [1] vector space spanned by the column vectors of A. From these definitions, precoding matrices V1 , V2 and VS can be derived as [22] [1] [1] V2 = (HR,2 )−1 HR,1 V1 , [1] (7a) [1] VS = (H2,S )−1 H2,1 V1 , [1] [1] (7b) [1] where V1 = eig (A) and A = (HR,1 )−1 HR,2 (H1,2 )−1 H1,S (H2,S )−1 H2,1 ; eig (A) are the eigenvectors of A. Now, we derive the corresponding receive BF matrices as   [k] [k] [k] Uj = null [Hj,i Vi ]H , j 6= i,   [1] UR = null [HR,1 V1 ]H . (8a) (8b) During the R-D transmission, S stays silent while R establishes its own communication. Therefore, it is clear that the BF matrices design follows the same steps given by (7)–(8), and hence they are omitted for the sake of brevity. B. Imperfect CSI The model for imperfect CSI can be written as [4], [23] Ĥ = H + E, (9) where Ĥ is the observed mismatched channel, H ∼ CN (0, I) represents the real channel matrix and E is the error matrix which represents an inaccuracy degree in the estimated CSI. It is also assumed that E is independent of H. Considering the nominal signal-to-noise ratio (SNR), θ, E is described as E ∼ CN (0, λI) with λ = ψθ−κ , (10) where λ is an error variance, κ ≥ 0 and ψ > 0 determine various CSI scenarios. Finally, the real channel matrix, conditioning on Ĥ, [24], can be described as H= λ I) is independent of Ĥ. where H̃ ∼ CN (0, 1+λ 1 Ĥ + H̃, 1+λ (11) III. T IME -S WITCHING R ELAYING The time used for the S-D information transmission is given by T , and the time fraction devoted for EH purposes is given by αT , with 0 ≤ α ≤ 1. The remaining time (1−α)T is formed by two equal time phases to support the S-R and R-D transmissions [15]. At the same time, the PN adopts its one-hop transmission policy according to the SN time frame architecture as follows. The first data transmission occurs during the (1 + α)T /2 time because within this TP the network transmission is performed by the primary transmitters and the source node only. The remaining time (1 − α)T /2 is dedicated for the second PN transmission when the source node is replaced by the relay in the network transmission. Hence, the received signal at R during the EH phase can be written as s s 2 X PS Pi [1] yR = τR,S HR,S VS sS + τR,i HR,i Vi si + nR . dR,S dR,i i=1 (12) Now, neglecting the power harvested from the noise, the harvested energy at R is derived as [15] ! 2 X 2 Pi PS [1] 2 T SR , (13) HR,i Vi EH = ηαT τR,S ||HR,S VS || + τ dR,S d R,i i=1 R,i where k · k denotes the Euclidean norm. T SR The relay transmit power relates to the harvested energy as PRT SR = EH /((1 − α)T /2) and can be further rewritten as PRT SR 2αη = 1−α 2 X Pi PS 2 ||H V || + R,S S τR,S τ dR,S d R,i i=1 R,i [1] HR,i Vi 2 ! , (14) where η (0 < η < 1) is the EH conversion efficiency. During the S-R information transmission, taking into account imperfect CSI given by (11) and receive BF matrices, the information signal at the relay can be written as s s     2 X PS H Pi H 1 1 [1] IT ĤR,S + H̃R,S VS sS + ĤR,i + H̃R,i Vi si + ñR . yR = τR,S UR τR,i UR 1+λ 1+λ dR,S dR,i i=1 (15) After some manipulation, the corresponding signal-to-interference-noise ratio (SINR) at R can be expressed as PS 2 ||UH τR,S R ĤR,S VS || (1+λ)2 dR,S γR = where IP N = Pi τR,i dR,i noise power. P2 i=1 PS τR,S dR,S 2 2 ||UH R H̃R,S VS || + IP N + σñR , (16) [1] 2 2 ||UH R H̃R,i Vi || indicates the interference from the PN, and σñR stands for the Since it is assumed that the PN does not interfere the destination node, the signal received at D can be written as yD = s PRT SR τD,R dD,R   1 ĤD,R + H̃D,R VR sR + nD . 1+λ (17) Then, the respective received SINR at D is calculated as τ γD = T SR PR D,R (1+λ)2 dD,R T SR PR τD,R dD,R ||ĤD,RVR ||2 2 ||H̃D,R VR ||2 + σD , (18) 2 where σD is the noise power. Finally, the received SINR for the primary receivers Rj is derived as τ [k] γj where B [k] = Pj τ j,j dj,j [k]H ||Uj [k] [k] H̃j,j Vj ||2 + = Pj j,j dj,j (1+λ)2 [k]H ||Uj [k] [k] Ĥj,j Vj ||2 B [k] + F [k] + σñ2 j [k]H [k] [k] 2 Pi H̃j,i Vi ||i6=j τj,i ||Uj dj,i [k] , (19) is the intra-network interference of the PN due to the CSI mismatch while the inter-network interference from the SN is expressed by   [k]H  S  Pτj,S ||Uj H̃j,S VS ||2 , if k = 1, d j,S F [k] = T SR  P   Rτj,R ||U[k]H H̃j,RVR ||2, if k = 2. j (20) dj,R IV. P OWER -S PLITTING R ELAYING The PSR protocol exploits the time T divided into two equal parts to support the S-R and R-D information transmissions [25]. In the first TP, R utilizes a portion of the received signal power for EH purposes, ρ, while the rest of the power, (1 − ρ), is dedicated for the S-R data transmission [26]. Thus, IT yR p = 1−ρ s PS H τR,S UR dR,S  ! s    2 X 1 1 Pi [1] H ĤR,S + H̃R,S VS sS + ĤR,i + H̃R,i Vi si + ñR . τR,i UR 1+λ 1+λ dR,i i=1 the relay utilizes the energy harvested from the received signal given by s s 2 X ρPS ρPi √ [1] EH yR = ρnR . τR,S HR,S VS sS + τR,i HR,i Vi si + dR,S dR,i i=1 (24) (21) EH By assuming that the received signal yR at R is used only for WPT and the noise power is neglected, the instantaneous harvested energy can be expressed as [15] P SR EH ηρT = 2 2 X Pi PS 2 τR,S ||HR,S VS || + τ dR,S d R,i i=1 R,i [1] HR,i Vi 2 ! , (22) where 0 < ρ < 1 is the signal power portion dedicated for EH purposes. The relay transmit power as a P SR function of the harvested energy is given by PRP SR = 2EH /T , and it can be then written as [15] ! 2 X 2 P P i S [1] 2 . HR,i Vi PRP SR = ηρ τR,S ||HR,S VS || + τ dR,S d R,i i=1 R,i (23) Using (11), the same signal, but with the power portion of (1 − ρ) and with the receive BF matrix UR applied, can be received at the information decoder terminal as shown in (24) at the top of the next page. Now, by using (24), the SINR of the S-R link can be derived as γR = where IP N = Pi (1−ρ) τR,i dR,i P2 i=1 PS (1−ρ) 2 ||UH τR,S R ĤR,S VS || (1+λ)2 dR,S PS (1−ρ) H 2 τR,S ||UR H̃R,S VS || dR,S + IP N + σñ2 R , (25) [1] 2 ||UH R H̃R,i Vi || denotes the interference from the PN. Then, the corresponding SINR at D is calculated as γD = 2 where σD is the noise power. P SR PR τD,R dD,R (1+λ)2 P SR PR τD,R D,R dD,R ||ĤD,RVR ||2 ||H̃ 2 VR ||2 + σD , (26) Finally, the SINR of the primary users can be calculated as τ [k] γj = where B [k] = Pj τ j,j dj,j [k]H ||Uj [k] [k] H̃j,j Vj ||2 + Pj j,j dj,j (1+λ)2 [k]H ||Uj [k] [k] Ĥj,j Vj ||2 B [k] + F [k] + σñ2 j [k]H [k] [k] 2 Pi H̃j,i Vi ||i6=j τj,i ||Uj dj,i [k] , (27) is the intra-network interference of the PN due to the CSI mismatch while the inter-network interference from the SN is expressed by   [k]H  S  Pτj,S ||Uj H̃j,S VS ||2 , if k = 1, dj,S [k] F = P SR    PRτj,R ||U[k]H H̃j,R VR ||2 , if k = 2. j (28) dj,R V. E RGODIC C APACITY For the PN receivers, the general derivation of the instantaneous capacity can be written as [27] Cj = log2 (1 + γj ), (29) where γj is the instantaneous SINR at Rj . Regarding the SN operating in the DF mode, the end-to-end capacity at D is related to the weakest link of the S-R and R-D transmissions and can be written as [28] CD = 1 log2 (1 + min (γR , γD )) , 2 (30) where γR and γD denote the instantaneous SINR at R and D, respectively. Now, we derive an expression for the capacity of the TSR-based system. Using (16), (18) and (30), the capacity of the destination node can be written as CD = 1−α log2 (1 + min (γR , γD )) . 2 (31) Regarding the PN, the capacity of Rj can be written as Cj = where E [k] =    1+α , when k = 1, 2   1−α , otherwise, 2 2 X k=1 [k] E [k] log2 (1 + γj ), j ∈ {1, 2}, with k ∈ {1, 2}. (32) Using (25), (26) and (30), the capacity of the destination node for the PSR-based system can be written as CD = 1 log2 (1 + min (γR , γD )) . 2 (33) Regarding the PN, the capacity of Rj can be written using (27) as 2 Cj = 1X [k] log2 (1 + γj ), j ∈ {1, 2}. 2 k=1 (34) We evaluate the capacity of the optimized TSR and PSR-based systems as a function of SNR. To begin with, we find the optimal values of α and ρ given by α∗ and ρ∗ with η = 0.8 for the corresponding TSR and PSR protocols by solving the following dCD /dα = 0 and dCD /dρ = 0. VI. S IMULATION R ESULTS In this section, we present numerical examples for the capacity expressions derived above. The adopted system parameters are as follows: the channel distances and path loss exponents are identical and given by d = 3 m and τ = 2.7, respectively; the EH conversion efficiency η = 0.8; the fixed transmit powers are assumed to be equal (P1 = P2 = PS ). The calculated optimal EH time fraction α and power-splitting factor ρ are taken as 0.19 and 0.75, accordingly. Finally, the values of (κ, ψ) such as (1.5, 15), (1, 10), (0, 0.001) are considered to describe various CSI mismatch scenarios. Fig. 2 presents an insight into how the CSI mismatch affects the obtainable capacity of the PUs and the SU of the considered system model. When κ = 0, it can be noticed that ψ has a significant impact on the system capacity. At ψ = 0.001 and SNR of 20 dB, the capacity loss of the PUs equals 1.85 bit/s/Hz while the capacity losses of the destination node for the TSR and PSR protocols are given by 0.09 and 0.17 bit/s/Hz, respectively. Hence, it is obvious that the CSI mismatch severely degrades the performance of the PUs which can be explained by the higher level of the interference due to the number of the transmitting nodes. In general, the capacity of the destination node of the PSR-based system always outperforms the capacity of the TSR protocol even the former relaying method experiences worse performance degradation than the latter one. When κ 6= 0, it can be noticed that the capacity demonstrates a poor performance in the low SNR region. On the other side, the dependence on the SNR results in the capacity growth when 2,6 4 8 perfect CSI 2,4 PU Capacity (bits/s/Hz) Capacity (bits/s/Hz) = TSR 2,2 2,0 6 18,0 18,5 4 19,0 19,5 20,0 = PU TSR PSR PSR 3 = 2 1 2 0 0 0 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 SNR (dB) 10 12 14 16 18 20 SNR (dB) (a) Perfect CSI vs. CSI mismatch (κ = 0, ψ = 0.001). (b) CSI mismatch: (κ = 1.5, ψ = 15) vs. (κ = 1, ψ = 10). Fig. 2. Capacity vs. SNR of the primary user and the destination node operating in the TSR and PSR protocols under different CSI scenarios. 8 Perfect CSI Capacity (bit/s/Hz) 7 PSR 6 5 4 3 2 1 TSR 0 0,0 0,2 0,4 0,6 0,8 1,0 EH time fraction Power splitting factor Fig. 3. Capacity vs. the EH time fraction and power splitting factor for the TSR and PSR at 20 dB, respectively. SNR increases. Being κ large makes the curve slope sharper. Fig. 3 illustrates some simulated results for the capacities as a function of α and ρ for various CSI acquisition scenarios. The results for the TSR and PSR systems are obtained from (31) and (33), respectively. For the case of the PSR-based system, no sufficient portion of power allocated for EH will consequently result in poor capacity. At the other extreme, being ρ too large which results in too much unnecessarily harvested energy at the cost of the power level of the received signal leading to poor capacity. Similarly, this justification applies to α in the TSR-based system. VII. C ONCLUSION In this paper, we analyzed the capacity of different wireless powered IA-based DF CRN considering the EH protocols, namely, TSR and PSR. The three special scenarios of the imperfect CSI given by (1.5, 15), (1, 10), (0, 0.001) were studied to analyse the impact of the CSI quality on the system capacity. The presented results demonstrated that an optimal selection of the power splitting factor in the PSR protocol and the EH time factor in the TSR protocol were found to be important in achieving the best performance. Finally, the optimized PSR-based system was shown to have the best performance over the optimized TSR system. R EFERENCES [1] S. Haykin, “Cognitive radio: Brain-empowered wireless communications,” IEEE J. Sel. Areas Commun., vol. 23, no. 2, pp. 201–202, Apr. 2005. [2] A. Goldsmith, S. Jafar,L. Maric and S. Srinivasa, “Breaking spectrum gridlock with cognitive radios: an information theoretic perspective,” Proc. IEEE, vol. 97, no. 5, pp. 894–914, May 2009. [3] G. Nauryzbayev and E. Alsusa, “Enhanced Multiplexing Gain Using Interference Alignment Cancellation in Multi-cell MIMO Networks,” IEEE Trans. Inf. Theory, vol. 62, no. 1, pp. 357–369, Jan. 2016. [4] G. Nauryzbayev and E. Alsusa, “Interference Alignment Cancellation in Compounded MIMO Broadcast Channels with General Message Sets,” IEEE Trans. Commun., vol. 63, no. 10, pp. 3702–3712, Oct. 2015. [5] G. Nauryzbayev, S. Arzykulov, E. Alsusa and T. A. Tsiftsis, “A closed-form solution to implement interference alignment and cancellation scheme for the MIMO three-user X-channel model,” ICSPCS 2016, pp. 1-6, Dec. 2016. [6] G. Nauryzbayev, S. Arzykulov, E. Alsusa and T. A. Tsiftsis, “An alignment-based interference cancellation scheme for network-MIMO systems,” ICSPCS, pp. 1-6, Dec. 2016. [7] V. R. Cadambe, S. A. Jafar, “Interference alignment and degrees of freedom of the K-user interference channel,” IEEE Trans. Inf. Theory, vol. 54, no. 8, pp. 3425–3441, Aug. 2008. [8] M. Amir, A. El-Keyi and M. Nafie, “Constrained Interference Alignment and the Spatial Degrees of Freedom of MIMO Cognitive Networks,” IEEE Trans. Inf. Theory, vol. 57, no. 5, pp. 2994–3004, May 2011. [9] Y. Yi, J. Zhang, Q. Zhang and T. Jiang, “Exploring frequency diversity with interference alignment in cognitive radio networks,” IEEE GLOBECOM, pp. 5579–5583, Dec. 2012. [10] T. Xu, L. Ma and G. Sternberg, “Practical interference alignment and cancellation for MIMO underlay cognitive radio networks with multiple secondary users,” IEEE GLOBECOM, pp. 1031–1036, Dec. 2013. [11] N. Zhao, F. Yu, H. Sun and M. Li, “Adaptive Power Allocation Schemes for Spectrum Sharing in Interference-Alignment-Based Cognitive Radio Networks,” IEEE Trans. Veh. Technol., vol. 65, no. 5, pp. 3700–3714, May 2016. [12] J. Tang, S. Lambotharan and S. Pomeroy, “Interference cancellation and alignment techniques for multiple-input and multiple-output cognitive relay networks,” IET Signal Process., vol. 7, no. 3, pp. 188–200, May 2013. [13] X. Chen, Z. Zhang, H. Chen and H. Zhang, “Enhancing wireless information and power transfer by exploiting multi-antenna techniques,” IEEE Commun. Mag., vol. 53, no. 4, pp. 133–141, Apr. 2015. [14] Z. Ding et al., “Application of smart antenna technologies in simultaneous wireless information and power transfer,” IEEE Commun. Mag., vol. 53, no. 4, pp. 86–93, Apr. 2015. [15] A. Nasir, X. Zhou, S. Durrani, and R. Kennedy, “Relaying protocols for wireless energy harvesting and information processing,” IEEE Trans. Wireless Commun., vol. 12, no. 7, pp. 3622–3636, Jul. 2013. [16] N. Zhao, F. Yu and V. Leung, “Simultaneous Wireless Information and Power Transfer in Interference Alignment Networks,” IWCMC14, pp. 1–5, Aug. 2014. [17] S. Park, H. Kim and D. Hong, “Cognitive radio networks with energy harvesting,” IEEE Trans. Wireless Commun., vol. 12, no. 3, pp. 1386–1397, Mar. 2013. [18] G. Zheng, Z. Ho, E. A. Jorswieck and B. Ottersten, “Information and energy cooperation in cognitive radio networks,” IEEE Trans. Signal Proces., vol. 62, no. 9, pp. 2290–2303, Sept. 2014. [19] F. Wang and X. Zhang, “Resource Allocation for Multiuser Cooperative Overlay Cognitive Radio Networks with RF Energy Harvesting Capability,” IEEE GLOBECOM, pp. 1–6, 2016. [20] G. Nauryzbayev and E. Alsusa, “Identifying the Maximum DoF Region in the Three-cell Compounded MIMO Network,” IEEE WCNC, pp. 1–5, Apr. 2016. [21] G. Nauryzbayev, E. Alsusa, and J. Tang, “An Alignment Based Interference Cancellation Scheme for Multi-cell MIMO Networks,” IEEE VTC, pp. 1–5, May 2015. [22] H. Sung, S. H. Park, K. J. Lee and I. Lee, “Linear precoder designs for K-user interference channels,” IEEE Trans. Wireless Commun., vol. 9, no. 1, pp. 291–301, Jan. 2010. [23] P. Aquilina and T. Ratnarajah, “Performance Analysis of IA Techniques in the MIMO IBC With Imperfect CSI,” IEEE Trans. Commun., vol. 63, no. 4, pp. 1259–1270, Apr. 2015. [24] S. Kay, “Fundamentals of statistical signal processing: Estimation theory” in Englewood Cliffs NJ: Prentice-Hall 1993. [25] G. Nauryzbayev, K. M. Rabie, M. Abdallah and B. Adebisi, “Ergodic Capacity Analysis of Wireless Powered AF Relaying Systems over α - µ Fading Channels,” in Proc. IEEE GLOBECOM, pp. 1–6, Dec. 2017. [26] S. Arzykulov, G. Nauryzbayev, T. A. Tsiftsis and M. Abdallah, “Error Performance of Wireless Powered Cognitive Relay Network with Interference Alignment,” in Proc. PIMRC, pp. 1–5, Oct. 2017. [27] J. Tang and S. Lambotharan, “Interference Alignment Techniques for MIMO Multi-Cell Interfering Broadcast Channels,” IEEE Trans. Commun., vol. 61, no. 1, pp. 164–175, Jan. 2013. [28] S. Arzykulov, G. Nauryzbayev and T. A. Tsiftsis, “Underlay Cognitive Relaying System Over α - µ Fading Channels,” IEEE Commun. Lett., vol. 21, no. 1, pp. 216–219, Jan. 2017
7cs.IT
Statistical inference using SGD Liu Liu1 [email protected] arXiv:1705.07477v2 [cs.LG] 19 Nov 2017 Tianyang Li1 [email protected] Anastasios Kyrillidis2 [email protected] Constantine Caramanis1 [email protected] 1 2 The University of Texas at Austin IBM T.J. Watson Research Center, Yorktown Heights Abstract We present a novel method for frequentist statistical inference in M -estimation problems, based on stochastic gradient descent (SGD) with a fixed step size: we demonstrate that the average of such SGD sequences can be used for statistical inference, after proper scaling. An intuitive analysis using the OrnsteinUhlenbeck process suggests that such averages are asymptotically normal. To show the merits of our scheme, we apply it to both synthetic and real data sets, and demonstrate that its accuracy is comparable to classical statistical methods, while requiring potentially far less computation. 1 Introduction In M -estimation, the minimization of empirical risk functions (RFs) provides point estimates of the model parameters. Statistical inference then seeks to assess the quality of these estimates; e.g., by obtaining confidence intervals or solving hypothesis testing problems. Within this context, a classical result in statistics states that the asymptotic distribution of the empirical RF’s minimizer is normal, centered around the population RF’s minimizer [vdV00]. Thus, given the mean and covariance of this normal distribution, we can infer a range of values, along with probabilities, that allows us to quantify the probability that this interval includes the true minimizer. The Bootstrap [Efr82, ET94] is a classical tool for obtaining estimates of the mean and covariance of this distribution. The Bootstrap operates by generating samples from this distribution (usually, by re-sampling with or without replacement from the entire data set) and repeating the estimation procedure over these different re-samplings. As parameter dimensionality and data size grow, the Bootstrap becomes increasingly –even prohibitively– expensive. In this context, we follow a different path: we show that inference can also be accomplished by directly using stochastic gradient descent (SGD), both for point estimates and inference, with a fixed step size over the data set. It is well-established that fixed step-size SGD is by and large the dominant method used for large scale data analysis. We prove, and also demonstrate empirically, that the average of SGD sequences, obtained by minimizing RFs, can also be used for statistical inference. Unlike the Bootstrap, our approach does not require creating many large-size subsamples from the data, neither re-running SGD from scratch for each of these subsamples. Our method only uses first order information from gradient computations, and does not require any second order information. Both of these are important for large scale problems, where re-sampling many times, or computing Hessians, may be computationally prohibitive. Outline and main contributions: This paper studies and analyzes a simple, fixed step size1 , SGD-based algorithm for inference in M -estimation problems. Our algorithm produces samples, whose covariance converges to the covariance of the M -estimate, without relying on bootstrap-based schemes, and also 1 Fixed step size means we use the same step size every iteration, but the step size is smaller with more total number of iterations. In contrast, constant step size means the step size is constant no matter how many iterations taken. 1 avoiding direct and costly computation of second order information. Much work has been done on the asymptotic normality of SGD, as well as on the Stochastic Gradient Langevin Dynamics (and variants) in the Bayesian setting. As we discuss in detail in Section 4, this is the first work to provide finite sample inference results, using fixed step size, and without imposing overly restrictive assumptions on the convergence of fixed step size SGD. The remainder of the paper is organized as follows. In the next section, we define the inference problem for M -estimation, and recall basic results of asymptotic normality and how these are used. Section 3 is the main body of the paper: we provide the algorithm for creating bootstrap-like samples, and also provide the main theorem of this work. As the details are involved, we provide an intuitive analysis of our algorithm and explanation of our main results, using an asymptotic Ornstein-Uhlenbeck process approximation for the SGD process [KH81, Pfl86, BPM90, KY03, MHB16], and we postpone the full proof until the appendix. We specialize our main theorem to the case of linear regression (see supplementary material), and also that of logistic regression. For logistic regression in particular, we require a somewhat different approach, as the logistic regression objective is not strongly convex. In Section 4, we present related work and elaborate how this work differs from existing research in the literature. Finally, in the experimental section, we provide parts of our numerical experiments that illustrate the behavior of our algorithm, and corroborate our theoretical findings. We do this using synthetic data for linear and logistic regression, and also by considering the Higgs detection [BSW14] and the LIBSVM Splice data sets. A considerably expanded set of empirical results is deferred to the appendix. Supporting our theoretical results, our empirical findings suggest that the SGD inference procedure produces results similar to bootstrap while using far fewer operations. Thereby, we produce a more efficient inference procedure applicable in large scale settings, where other approaches fail. 2 Statistical inference for M -estimators n Consider the problem of estimating a set of parameters θ? ∈ Rp using n samples {Xi }i=1 , drawn from some distribution P on the sample space X . In frequentist inference, we are interested in estimating the minimizer θ? of the population risk: θ? = argmin EP [f (θ; X)] = argmin θ∈Rp θ∈Rp Z f (θ; x) dP (x), (1) x where we assume that f (·; x) : Rp → R is real-valued and convex; further, we will use E ≡ EP , unless otherwise stated. In practice, the distribution P is unknown. We thus estimate θ? by solving an empirical risk b minimization (ERM) problem, where we use the estimate θ: n 1X f (θ; Xi ). θb = argmin θ∈Rp n i=1 (2) b such as Statistical inference consists of techniques for obtaining information beyond point estimates θ, confidence intervals. These can be performed if there is an asymptotic limiting distribution associated with θb [Was13]. Indeed, under standard and well-understood regularity conditions, the solution to M -estimation √ problems satisfies asymptotic normality. That is, the distribution n(θb − θ? ) converges weakly to a normal distribution: √ n(θb − θ? ) −→ N (0, H ? −1 G? H ? −1 ), (3) where H ? = E[∇2 f (θ? ; X)], and G? = E[∇f (θ? ; X) · ∇f (θ? ; X)> ]; see also Theorem 5.21 in [vdV00]. We can therefore use this result, as long as we have a good estimate of the covariance matrix: H ? −1 G? H ? −1 . The central goal of this paper is obtaining accurate estimates for H ? −1 G? H ? −1 . 2 burn in z }| { θ−b , θ−b+1 , · · · θ−1 , θ0 , (i) θ̄t = 1t z (1) θ1 , (1) θ2 , (2) θ1 , (2) θ2 , (R) θ1 , (R) θ2 , (i) j=1 θj Pt }| ··· , ··· , . discarded { }| { z (1) (1) (1) θt+1 , θt+2 , · · · , θt+d (2) θt+1 , θt+2 , · · · , θt+d (1) θt . θt . .. . . ··· , (R) θt (2) (2) (R) (R) (2) (R) θt+1 , θt+2 , · · · , θt+d Figure 1: Our SGD inference procedure bH b −1 where: b −1 G A naive way to estimate H ? −1 G? H ? −1 is through the empirical estimator H n X b Xi ) b = 1 ∇2 f (θ; H n i=1 and n X b Xi )∇f (θ; b Xi )> . b= 1 ∇f (θ; G n i=1 (4) b and G, b this computation requires an inversion of H b and matrix-matrix multiplications Beyond calculating2 H −1 −1 b G bH b —a key computational bottleneck in high dimensions. Instead, our method in order to compute H b −1 G bH b −1 . uses SGD to directly estimate H 3 Statistical inference using SGD Consider the optimization problem in (2). For instance, in maximum likelihood estimation (MLE), f (θ; Xi ) is P a negative log-likelihood function. For simplicity of notation, we use fi (θ) and f (θ) for f (θ; Xi ) and n 1 i=1 f (θ; Xi ), respectively, for the rest of the paper. n The SGD algorithm with a fixed step size η, is given by the iteration θt+1 = θt − ηgs (θt ), (5) where gs (·) is an unbiased estimator of the gradient, i.e., E[gs (θ) | θ] = ∇f (θ), where the expectation is w.r.t. the stochasticity in the gs (·) calculation. A classical example of an unbiased estimator of the gradient is gs (·) ≡ ∇fi (·), where i is a uniformly random index over the samples Xi . Our inference procedure uses the average of t consecutive SGD iterations. In particular, the algorithm proceeds as follows: Given a sequence of SGD iterates, we use the first SGD iterates θ−b , θ−b+1 , . . . , θ0 as a burn in period; we discard these iterates. Next, for each “segment” of t + d iterates, we use the first t iterates to Pt (i) (i) compute θ̄t = 1t j=1 θj and discard the last d iterates, where i indicates the i-th segment. This procedure b we use in practice θb ≈ 1 PR θ̄(i) [Bub15]. is illustrated in Figure 1. As the final empirical minimum θ, i=1 t R Some practical aspects of our scheme are discussed below. 2 In the case of maximum likelihood estimation, we have H ? = G? —which is called Fisher information. Thus, the covariance of b or G. b interest is H ?−1 = G?−1 . This can be estimated either using H 3 Step size η selection and length t: Theorem 1 below is consistent only for SGD with fixed step size that depends on the number of samples taken. Our experiments, however, demonstrate that choosing a constant (large) η gives equally accurate results with significantly reduced running time. We conjecture that a better understanding of t’s and η’s influence requires stronger bounds for SGD with constant step size. Heuristically, calibration methods for parameter tuning in subsampling methods ([PRW12], Ch. 9) could be used for hyper-parameter tuning in our SGD procedure. We leave the problem of finding maximal (provable) learning rates for future work. Discarded length d: Based on the analysis of mean estimation in the appendix, if we discard d SGD iterates in every segment, the correlation between consecutive θ(i) and θ(i+1) is of the order of C1 e−C2 ηd , where C1 and C2 are data dependent constants. This can be used as a rule of thumb to reduce correlation between samples from our SGD inference procedure. Burn-in period b: The purpose of the burn-in period b, is to ensure that samples are generated when SGD iterates are sufficiently close to the optimum. This can be determined using heuristics for SGD convergence diagnostics. Another approach is to use other methods (e.g., SVRG [JZ13]) to find the optimum, and use a relatively small b for SGD to reach stationarity, similar to Markov Chain Monte Carlo burn-in. (i) b Similar to ensemble learning [OM99], we use i = 1, 2, . . . , R estimators Statistical inference using θ̄t and θ: for statistical inference: r Ks · t  (i) b (i) (6) θ = θb + θ̄t − θ . n Here, Ks is a scaling factor that depends on how the stochastic gradient gs is computed. We show examples of Ks for mini batch SGD in linear regression and logistic regression in the corresponding sections. Similar to other resampling methods such as bootstrap and subsampling, we use quantiles or variance of θ(1) , θ(2) , . . . , θ(R) for statistical inference. 3.1 Theoretical guarantees Next, we provide the main theorem of our paper. Essentially, this provides conditions under which our algorithm is guaranteed to succeed, and hence has inference capabilities. Pn Theorem 1. For a differentiable convex function f (θ) = n1 i=1 fi (θ), with gradient ∇f (θ), let θb ∈ Rp be its b = 1 · Pn ∇2 fi (θ). b Assume that ∀θ ∈ Rp , minimizer, according to (2), and denote its Hessian at θb by H := ∇2 f (θ) i=1 n f satisfies: b > ∇f (θ) ≥ αkθ − θk b 2 , for constant α > 0, (F1 ) Weak strong convexity: (θ − θ) 2 b 2 , for constant L > 0, (F2 ) Lipschitz gradient continuity: k∇f (θ)k2 ≤ Lkθ − θk b 2 ≤ Ekθ − θk b 2 , for constant E > 0, (F3 ) Bounded Taylor remainder: k∇f (θ) − H(θ − θ)k 2 b 0 < λL ≤ λi (H) ≤ λU < ∞, ∀i. (F4 ) Bounded Hessian spectrum at θ: Furthermore, let gs (θ) be a stochastic gradient of f , satisfying: (G1 ) E [gs (θ) | θ] = ∇f (θ),   b 2 + B, (G2 ) E kgs (θ)k22 | θ ≤ Akθ − θk 2   4 b 4 + D, (G3 ) E kgs (θ)k2 | θ ≤ Ckθ − θk 2   b 2 + A2 kθ − θk b 2 + A3 kθ − θk b 3 + A4 kθ − θk b 4, (G4 ) E gs (θ)gs (θ)> | θ − G 2 ≤ A1 kθ − θk 2 2 2 b s (θ) b > | θ] b and, for positive, data dependent constants A, B, C, D, Ai , for i = 1, . . . , 4. where G = E[gs (θ)g 2 b Assume that kθ1 − θk2 = O(η); then for sufficiently small step size η > 0, the average SGD sequence, θ̄t , satisfies: b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( 2 q √ 1 . η + tη + tη 2 . 4 (7) We provide the full proof in the appendix, and also we give precise (data-dependent) formulas for the above constants. For ease of exposition, we leave them as constants in the expressions above. Further, in the next section, we relate a continuous approximation of SGD to Ornstein-Uhlenbeck process [RM51] to give an intuitive explanation of our results. Discussion. For linear regression, assumptions (F1 ), (F2 ), (F3 ), and (F4 ) are satisfied when the empirical risk function is not degenerate. In mini batch SGD using sampling with replacement, assumptions (G1 ), (G2 ), (G3 ), and (G4 ) are satisfied. Linear regression’s result is presented in Corollary 2 in the appendix. For logistic regression, assumption (F1 ) is not satisfied because the empirical risk function in this case is strictly but not strongly convex. Thus, we cannot apply Theorem 1 directly. Instead, we consider the use of SGD on the square of the empirical risk function plus a constant; see eq. (11) below. When the empirical risk function is not degenerate, (11) satisfies assumptions (F1 ), (F2 ), (F3 ), and (F4 ). We cannot directly use vanilla SGD to minimize (11), instead we describe a modified SGD procedure for minimizing (11) in Section 3.3, which satisfies assumptions (G1 ), (G2 ), (G3 ), and (G4 ). We believe that this result is of interest by its own. We present the result specialized for logistic regression in Corollary 1. Note that Theorem 1 proves consistency for SGD with fixed step size, requiring η → 0 when t → ∞. However, we empirically observe in our experiments that a sufficiently large constant η gives better results. We conjecture that the average of consecutive iterates in SGD with larger constant step size converges to the optimum and we consider it for future work. 3.2 Intuitive interpretation via the Ornstein-Uhlenbeck process approximation Here, we describe a continuous approximation of the discrete SGD process and relate it to the OrnsteinUhlenbeck process [RM51], to give an intuitive explanation of our results. In particular, under regularity conditions, the stochastic process ∆t = θt − θb asymptotically converges to an Ornstein-Uhlenbeck process ∆(t), [KH81, Pfl86, BPM90, KY03, MHB16] that satisfies: d∆(T ) = −H∆(T ) dT + where B(T ) is a standard Brownian motion. Given (8), √ b = t(θ̄t − θ) 1 √ t = 1 √ √ √ 1 ηG 2 dB(T ), (8) b can be approximated as t(θ̄t − θ) t X b (θi − θ) i=1 t X η t i=1 b ≈ (θi − θ)η 1 √ η t (9) tη Z ∆(T ) dT, 0 where we use the approximation that η ≈ dT . By rearranging terms in (8) and multiplying both sides by 1 √ H −1 , we can rewrite the stochastic differential equation (8) as ∆(T ) dT = −H −1 d∆(T ) + ηH −1 G 2 dB(T ). Thus, we have Z tη ∆(T ) dT = 0 − H −1 (∆(tη) − ∆(0)) + √ 1 ηH −1 G 2 B(tη). (10) After plugging (10) into (9) we have  √  t θ̄t − θb ≈ − 1 √ H −1 η t (∆(tη) − ∆(0)) + 1 √1 H −1 G 2 B(tη). tη   1 √ √ When ∆(0) = 0, the variance Var − 1/η t · H −1 (∆(tη) − ∆(0)) = O (1/tη). Since 1/ tη · H −1 G 2 B(tη) ∼ N (0, H −1 GH −1 ), when η → 0 and ηt → ∞, we conclude that √ b ∼ N (0, H −1 GH −1 ). t(θ̄t − θ) 5 3.3 Logistic regression We next apply our method to logistic regression. We have n samples (X1 , y1 ), (X2 , y2 ), . . . (Xn , yn ) where Xi ∈ Rp consists of features and yi ∈ {+1, −1} is the label. We estimate θ of a linear classifier sign(θT X) by: n  1X log 1 + exp(−yi θ> Xi ) . θb = argmin θ∈Rp n i=1 We cannot apply Theorem 1 directly because the empirical logistic risk is not strongly convex; it does not satisfy assumption (F1 ). Instead, we consider the convex function ! n   2 1X > c+ log 1 + exp(−yi θ Xi ) , n i=1 1 f (θ) = 2 where c > 0 (e.g., c = 1). (11) The gradient of f (θ) is a product of two terms ∇f (θ) = c+ | ! n   1X log 1 + exp(−yi θ> Xi ) × n i=1 {z } Ψ ! n   1X > . log 1 + exp(−yi θ Xi ) n i=1 {z } ∇ | Υ Therefore, we can compute gs = Ψs Υs , P using two independent random variables satisfying E[Ψs | θ] = Ψ and E[Υs | θ] = Υ. For Υs , we have Υs = S1Υ i∈I Υ ∇ log(1 + exp(−yi θ> Xi )), where ItΥ are SΥ indices sampled t P from [n] uniformly at random with replacement. For Ψs , we have Ψs = c + S1Ψ i∈I Ψ log(1 + exp(−yi θ> Xi )), t where ItΨ are SΨ indices uniformly sampled from [n] with or without replacement. Given the above, we have b ≥ αkθ − θk b 2 for some constant α by the generalized self-concordance of logistic regression ∇f (θ)> (θ − θ) 2 [Bac10, Bac14], and therefore the assumptions Pn are now satisfied. For convenience, we write k(θ) = n1 i=1 ki (θ) where ki (θ) = log(1 + exp(−yi θ> Xi )). Thus f (θ) = (k(θ) + c)2 , E[Ψs | θ] = k(θ) + c, and E[Υs | θ] = ∇k(θ). b 2 = O(η); also SΨ = O(1), SΥ = O(1) are bounded. Then, we have Corollary 1. Assume kθ1 − θk 2 h i b θ̄t − θ) b > − H −1 GH −1 tE (θ̄t − θ)( b = (c + k(θ))∇ b 2 k(θ). b Here, G = where H = ∇2 f (θ) depending on how indexes are sampled to compute Ψs : • with replacement: KG (θ) = • no replacement: KG (θ) = 1 (1 SΨ n SΨ −1 1− n−1 SΨ Pn ( n1 i=1 (c Pn 1 b 1 SΥ KG (θ) n + ki (θ))2 ) + i=1 (c 2 . SΨ −1 (c SΨ + ki (θ))2 ) + √ η+ Pn i=1 q 1 tη + tη 2 , b i (θ) b > with KG (θ) = E[Ψ(θ)2 ] ∇ki (θ)k + k(θ))2 , SΨ −1 n (c SΨ n−1 + k(θ))2 . Quantities other than t and η are data dependent constants. As with the results above, in the appendix we give data-dependent expressions for the constants. Simulations suggest that the term tη 2 in our bound is an artifact of our analysis. Because in logistic regression the  −1 b )−1  Pn ∇k (θ)∇k b b> b 2 (∇2 k(θ) i i (θ) 2 b i=1 estimate’s covariance is ∇ k( θ) , we set the scaling factor Ks = (c+k(θ)) b n n KG (θ) in (6) for statistical inference. Note that Ks ≈ 1 for sufficiently large SΨ . 6 N (0, 1/n) θSGD − θ̄SGD 2.0 SGD bootstrap 4 θbootstrap − θ̄bootstrap SGD bootstrap 5 4 1.5 3 1.0 2 0.5 1 0.0 0 3 −1.00 −0.75 −0.50 −0.25 0.00 0.25 0.50 (a) Normal. 0.75 1.00 2 1 0.8 1.0 1.2 1.4 1.6 (b) Exponential. 0 0.8 1.0 1.2 1.4 (c) Poisson. Figure 2: Estimation in univariate models. 4 Related work Bayesian inference: First and second order iterative optimization algorithms –including SGD, gradient descent, and variants– naturally define a Markov chain. Based on this principle, most related to this work is the case of stochastic gradient Langevin dynamics (SGLD) for Bayesian inference – namely, for sampling from the posterior distributions – using a variant of SGD [WT11, BEL15, MHB16, MHB17]. We note that, here as well, the vast majority of the results rely on using a decreasing step size. Very recently, [MHB17] uses a heuristic approximation for Bayesian inference, and provides results for fixed step size. Our problem is different in important ways from the Bayesian inference problem. In such parameter estimation problems, the covariance of the estimator only depends on the gradient of the likelihood function. This is not the case, however, in general frequentist M -estimation problems (e.g., linear regression). In these cases, the covariance of the estimator depends both on the gradient and Hessian of the empirical risk function. For this reason, without second order information, SGLD methods are poorly suited for general M -estimation problems in frequentist inference. In contrast, our method exploits properties of averaged SGD, and computes the estimator’s covariance without second order information. Connection with Bootstrap methods: The classical approach for statistical inference is to use the bootstrap [ET94, ST12]. Bootstrap samples are generated by replicating the entire data set by resampling, and then solving the optimization problem on each generated set of the data. We identify our algorithm and its analysis as an alternative to bootstrap methods. Our analysis is also specific to SGD, and thus sheds light on the statistical properties of this very widely used algorithm. Connection with stochastic approximation methods: It has been long observed in stochastic approximation that under certain conditions, SGD displays asymptotic normality for both the setting of decreasing step size, e.g., [LPW12, PJ92], and more recently, [TA14, CLTZ16]; and also for fixed step size, e.g., [BPM90], Chapter 4. All of these results, however, provide their guarantees with the requirement that the stochastic approximation iterate converges to the optimum. For decreasing step size, this is not an overly burdensome assumption, since with mild assumptions it can be shown directly. As far as we know, however, it is not clear if this holds in the fixed step size regime. To side-step this issue, [BPM90] provides results only when the (constant) step-size approaches 0 (see Section 4.4 and 4.6, and in particular Theorem 7 in [BPM90]). Similarly, while [KY03] has asymptotic results on the average of consecutive stochastic approximation iterates with constant step size, it assumes convergence of iterates (assumption A1.7 in Ch. 10) – an assumption we are unable to justify in even simple settings. Beyond the critical difference in the assumptions, the majority of the “classical” subject matter seeks to prove asymptotic results about different flavors of SGD, but does not properly consider its use for inference. Key exceptions are the recent work in [TA14] and [CLTZ16], which follow up on [PJ92]. Both of these rely on decreasing step size, for reasons mentioned above. The work in [CLTZ16] uses SGD with decreasing step size for estimating an M -estimate’s covariance. Work in [TA14] studies implicit SGD with decreasing step size and proves results similar to [PJ92], however it does not use SGD to compute confidence intervals. Overall, to the best of our knowledge, there are no prior results establishing asymptotic normality for SGD with fixed step size for general M-estimation problems (that do not rely on overly restrictive assumptions, as discussed). 7 η t = 100 t = 500 t = 2500 η t = 100 t = 500 t = 2500 0.1 0.02 0.004 (0.957, 4.41) (0.869, 3.30) (0.634, 2.01) (0.955, 4.51) (0.923, 3.77) (0.862, 3.20) (0.960, 4.53) (0.918, 3.87) (0.916, 3.70) 0.1 0.02 0.004 (0.949, 4.74) (0.845, 3.37) (0.616, 2.00) (0.962, 4.91) (0.916, 4.01) (0.832, 3.30) (0.963, 4.94) (0.927, 4.17) (0.897, 3.93) (a) Bootstrap (0.941, 4.14), normal approximation (0.928, 3.87) (b) Bootstrap (0.938, 4.47), normal approximation (0.925, 4.18) Table 1: Linear regression. Left: Experiment 1, Right: Experiment 2. η t = 100 t = 500 t = 2500 η t = 100 t = 500 t = 2500 0.1 0.02 0.004 (0.872, 0.204) (0.610, 0.112) (0.312, 0.051) (0.937, 0.249) (0.871, 0.196) (0.596, 0.111) (0.939, 0.258) (0.926, 0.237) (0.86, 0.194) 0.1 0.02 0.004 (0.859, 0.206) (0.600, 0.112) (0.302, 0.051) (0.931, 0.255) (0.847, 0.197) (0.583, 0.111) (0.947, 0.266) (0.931, 0.244) (0.851, 0.195) (a) Bootstrap (0.932, 0.253), normal approximation (0.957, 0.264) (b) Bootstrap (0.932, 0.245), normal approximation (0.954, 0.256) Table 2: Logistic regression. Left: Experiment 1, Right: Experiment 2. 5 5.1 Experiments Synthetic data Pp The coverage probability is defined as p1 i=1 P[θi? ∈ Ĉi ] where θ? = argminθ E[f (θ, X)] ∈ Rp , and Ĉi is the estimated confidence interval for the ith coordinate. The average confidence interval width is defined as Pp 1 l u th u l i=1 (Ĉi − Ĉi ) where [Ĉi , Ĉi ] is the estimated confidence interval for the i coordinate. In our experiments, p coverage probability and average confidence interval width are estimated through simulation. We use the empirical quantile of our SGD inference procedure and bootstrap to compute the 95% confidence intervals for each coordinate of the parameter. For results given as a pair (α, β), it usually indicates (coverage probability, confidence interval length). 5.1.1 Univariate models In Figure 2, we compare our SGD inference procedure with (i) Bootstrap and (ii) normal approximation with inverse Fisher information in univariate models. We observe that our method and Bootstrap have similar statistical properties. Figure 5 in the appendix shows Q-Q plots of samples from our SGD inference procedure. Normal distribution mean estimation: Figure 2a compares 500 samples from SGD inference procedure and Bootstrap versus the distribution N (0, 1/n), using n = 20 i.i.d. samples from N (0, 1). We used mini batch SGD described in Sec. A. For the parameters, we used η = 0.8, t = 5, d = 10, b = 20, and mini batch size of 2. Our SGD inference procedure gives (0.916 , 0.806), Bootstrap gives (0.926 , 0.841), and normal approximation gives (0.922 , 0.851). Exponential distribution parameter estimation: Figure 2b compares 500 samples from inference procedure and Bootstrap, using n = 100 samples from an exponential distribution with PDF λe−λx where λ = 1. We used SGD for MLE with mini batch sampled with replacement. For the parameters, we used η = 0.1, t = 100, d = 5, b = 100, and mini batch size of 5. Our SGD inference procedure gives (0.922, 0.364), Bootstrap gives (0.942 , 0.392), and normal approximation gives (0.922, 0.393). Poisson distribution parameter estimation: Figure 2c compares 500 samples from inference procedure and Bootstrap, using n = 100 samples from a Poisson distribution with PDF λx e−λx where λ = 1. We used SGD for MLE with mini batch sampled with replacement. For the parameters, we used η = 0.1, t = 100, d = 5, b = 100, and mini batch size of 5. Our SGD inference procedure gives (0.942 , 0.364), Bootstrap gives (0.946 , 0.386), and normal approximation gives (0.960 , 0.393). 8 5.1.2 Multivariate models In these experiments, we set d = 100, used mini-batch size of 4, and used 200 SGD samples. In all cases, we compared with Bootstrap using 200 replicates. We computed the coverage probabilities using 500 simulations.  > Also, we denote 1p = 1 1 . . . 1 ∈ Rp . Additional simulations comparing covariance matrix computed with different methods are given in Sec. D.1.1. Linear regression: Experiment 1: Results for the case where X ∼ N (0, I) ∈ R10 , Y = w∗ T X + , w∗ = √ 1p / p, and  ∼ N (0, σ 2 = 102 ) with n = 100 samples is given in Table 1a. Bootstrap gives (0.941, 4.14), and confidence intervals computed using the error covariance and normal approximation gives (0.928, 3.87). √ Experiment 2: Results for the case where X ∼ N (0, Σ) ∈ R10 , Σij = 0.3|i−j| , Y = w∗ T X + , w∗ = 1p / p, and  ∼ N (0, σ 2 = 102 ) with n = 100 samples is given in Table 1b. Bootstrap gives (0.938, 4.47), and confidence intervals computed using the error covariance and normal approximation gives (0.925, 4.18). Logistic regression: Here we show results for logistic regression trained using vanilla SGD with mini batch sampled with replacement. Results for modified SGD (Sec. 3.3) are given in Sec. D.1.1. Experiment 1: √ Results for the case where P[Y = +1] = P[Y = −1] = 1/2, X | Y ∼ N (0.01Y 1p / p, I) ∈ R10 with n = 1000 samples is given in Table 2a. Bootstrap gives (0.932, 0.245), and confidence intervals computed using inverse Fisher matrix as the error covariance and normal approximation gives (0.954, 0.256). Experiment 2: Results √ for the case where P[Y = +1] = P[Y = −1] = 1/2, X | Y ∼ N (0.01Y 1p / p, Σ) ∈ R10 , Σij = 0.2|i−j| with n = 1000 samples is given in Table 2b. Bootstrap gives (0.932, 0.253), and confidence intervals computed using inverse Fisher matrix as the error covariance and normal approximation gives (0.957, 0.264). 5.2 Real data Here, we compare covariance matrices computed using our SGD inference procedure, bootstrap, and inverse Fisher information matrix on the LIBSVM Splice data set, and we observe that they have similar statistical properties. 5.2.1 Splice data set The Splice data set 3 contains 60 distinct features with 1000 data samples. This is a classification problem between two classes of splice junctions in a DNA sequence. We use a logistic regression model trained using vanilla SGD. In Figure 3, we compare the covariance matrix computed using our SGD inference procedure and bootstrap n = 1000 samples. We used 10000 samples from both bootstrap and our SGD inference procedure with t = 500, d = 100, η = 0.2, and mini batch size of 6. 0 0 0.02 0.02 10 10 0.01 20 30 0.00 40 0.01 20 30 0.00 40 0.01 50 0.01 50 0.02 60 0 10 20 30 40 50 0.02 60 60 0 (a) Bootstrap 10 20 30 50 (b) SGD inference covariance Figure 3: Splice data set 3 https://www.csie.ntu.edu.tw/ 40 ˜cjlin/libsvmtools/datasets/binary.html 9 60 0 0 5 5 10 10 15 15 20 20 25 25 0 5 10 15 20 25 0 (a) Original “0”: logit -46.3, CI (-64.2, -27.9) 5 10 15 20 25 (b) Adversarial “0”: logit 16.5, CI (-10.9, 30.5) Figure 4: MNIST 5.2.2 MNIST Here, we train a binary logistic regression classifier to classify 0/1 using a noisy MNIST data set, and demonstrate that adversarial examples produced by gradient attack [GSS15] (perturbing an image in the direction of loss function’s gradient with respect to data) can be detected using prediction intervals. We flatten each 28 × 28 image into a 784 dimensional vector, and train a linear classifier using pixel values as features. To add noise to each image, where each original pixel is either 0 or 1, we randomly changed 70% pixels to random numbers uniformly on [0, 0.9]. Next we train the classifier on the noisy MNIST data set, and generate adversarial examples using this noisy MNIST data set. Figure 4 shows each image’s logit P[1|image] value (log P[0|image] ) and its 95% confidence interval (CI) computed using quantiles from our SGD inference procedure. 5.3 Discussion In our experiments, we observed that using a larger step size η produces accurate results with significantly accelerated convergence time. This might imply that the η term in Theorem 1’s bound is an artifact of our analysis. Indeed, although Theorem 1 only applies to SGD with fixed step size, where ηt → ∞ and η 2 t → 0 imply that the step size should be smaller when the number of consecutive iterates used for the average is larger, our experiments suggest that we can use a (data dependent) constant step size η and only require ηt → ∞. In the experiments, our SGD inference procedure uses (t + d) · S · p operations to produce a sample, and Newton method uses n·(matrix inversion complexity = Ω(p2 ))·(number of Newton iterations t) operations to produce a sample. The experiments therefore suggest that our SGD inference procedure produces results similar to Bootstrap while using far fewer operations. 6 Acknowledgments This work was partially supported by NSF Grants 1609279, 1704778 and 1764037, and also by the USDoT through the Data-Supported Transportation Operations and Planning (D-STOP) Tier 1 University Transportation Center. A.K. is supported by the IBM Goldstine fellowship. We thank Xi Chen, Philipp Krähenbühl, Matthijs Snel, and Tom Spangenberg for insightful discussions. 10 References [Bac10] Francis Bach. Self-concordant analysis for logistic regression. Electronic Journal of Statistics, 4:384–414, 2010. [Bac14] Francis Bach. Adaptivity of averaged stochastic gradient descent to local strong convexity for logistic regression. Journal of Machine Learning Research, 15(1):595–627, 2014. [BEL15] Sebastien Bubeck, Ronen Eldan, and Joseph Lehec. Finite-time analysis of projected langevin monte carlo. In Advances in Neural Information Processing Systems, pages 1243–1251, 2015. [BPM90] Albert Benveniste, Pierre Priouret, and Michel Métivier. Adaptive Algorithms and Stochastic Approximations. Springer-Verlag New York, Inc., New York, NY, USA, 1990. [BSW14] Pierre Baldi, Peter Sadowski, and Daniel Whiteson. Searching for exotic particles in high-energy physics with deep learning. Nature Communications, 5, 2014. [Bub15] Sébastien Bubeck. Convex optimization: Algorithms and complexity. Found. Trends Mach. Learn., 8(3-4):231–357, November 2015. [CLTZ16] Xi Chen, Jason Lee, Xin Tong, and Yichen Zhang. Statistical inference for model parameters in stochastic gradient descent. arXiv preprint arXiv:1610.08637, 2016. [Efr82] Bradley Efron. The jackknife, the bootstrap and other resampling plans. SIAM, 1982. [ET94] Bradley Efron and Robert Tibshirani. An introduction to the bootstrap. CRC press, 1994. [GSS15] Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. [JZ13] Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [KH81] Harold Kushner and Hai Huang. Asymptotic properties of stochastic approximations with constant coefficients. SIAM Journal on Control and Optimization, 19(1):87–105, 1981. [KY03] H. Kushner and G.G. Yin. Stochastic Approximation and Recursive Algorithms and Applications. Stochastic Modelling and Applied Probability. Springer New York, 2003. [LPW12] Lennart Ljung, Georg Ch Pflug, and Harro Walk. Stochastic approximation and optimization of random systems, volume 17. Birkhäuser, 2012. [MHB16] Stephan Mandt, Matthew Hoffman, and David Blei. A Variational Analysis of Stochastic Gradient Algorithms. In Proceedings of The 33rd International Conference on Machine Learning, pages 354–363, 2016. [MHB17] Stephan Mandt, Matthew D Hoffman, and David M Blei. Stochastic Gradient Descent as Approximate Bayesian Inference. arXiv preprint arXiv:1704.04289, 2017. [OM99] David Opitz and Richard Maclin. Popular ensemble methods: An empirical study. Journal of Artificial Intelligence Research, 11:169–198, 1999. [Pfl86] Georg Pflug. Stochastic minimization with constant step-size: asymptotic laws. SIAM Journal on Control and Optimization, 24(4):655–666, 1986. [PJ92] Boris Polyak and Anatoli Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. [PRW12] D.N. Politis, J.P. Romano, and M. Wolf. Subsampling. Springer Series in Statistics. Springer New York, 2012. [RM51] Herbert Robbins and Sutton Monro. A stochastic approximation method. The Annals of Mathematical Statistics, pages 400–407, 1951. [ST12] Jun Shao and Dongsheng Tu. The jackknife and bootstrap. Springer Science & Business Media, 2012. [TA14] Panos Toulis and Edoardo M Airoldi. Asymptotic and finite-sample properties of estimators based on stochastic gradients. arXiv preprint arXiv:1408.2923, 2014. [vdV00] A.W. van der Vaart. Asymptotic Statistics. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2000. [Was13] Larry Wasserman. All of statistics: a concise course in statistical inference. Springer Science & Business Media, 2013. [WT11] Max Welling and Yee Teh. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning, pages 681–688, 2011. 11 A Exact analysis of mean estimation In this section, we give an exact analysis of our method in the least squares, mean estimation problem. For n i.i.d. samples X1 , X2 , . . . , Xn , the mean is estimated by solving the following optimization problem n θ̂ = argmax θ∈Rp n 1X1 1X Xi . kXi − θk22 = 2 n i=1 n i=1 In the case of mini-batch SGD, we sample S = O(1) indexes uniformly randomly with replacement from [n]; P denote that index set as It . For convenience, we write Yt = S1 i∈It Xi , Then, in the tth mini batch SGD step, the update step is θt+1 = θt − η(θt − Yt ) = (1 − η)θt + ηYt , (12) which is the same as the exponential moving average. And we have √ n 1 X 1 tθbt = − √ (θt+1 − θ1 ) + √ Yi . η t t i=1 (13) 1 b 2 = O(η), then from Chebyshev’s inequality − √ (θ − θ1 ) → 0 almost surely when Assume that kθ1 − θk 2 η t t+1 P n b 1 Σ̂) with Σ̂ = 1 Pn (Xi − tη → ∞. By the central limit theorem, √1t i=1 Yi converges weakly to N (θ, i=1 S n > |a−b| b b θ)(Xi − θ) . From (12), we have k Cov(θa , θb )k2 = O(η(1 − η) ) uniformly for all a, b, where the constant is data dependent. Thus, for our SGD inference procedure, we have k Cov(θ(i) , θ(j) )k2 = O(η(1 − η)d+t|i−j| ). Our SGD inference procedure does not generate samples that are independent conditioned on the data, whereas replicates are independent conditioned on the data in bootstrap, but this suggests that our SGD inference procedure can produce “almost independent” samples if we discard sufficient number of SGD iterates in each segment. When estimating a mean using our SGD inference procedure where each mini batch is S elements sampled with replacement, we set Ks = S in (6). B Linear Regression In linear regression, the empirical risk function satisfies: n f (θ) = 1X1 > (θ xi − yi )2 , n i=1 2 where yi denotes the observations of the linear model and xi are the regressors. To find an estimate to θ? , one can use SGD with stochastic gradient give by: 1 X gs [θt ] = ∇fi (θt ), S i∈It where It are S indices uniformly sampled from [n] with replacement. b = 0, linear Next, we state a special case of Theorem 1. Because the Taylor remainder ∇f (θ) − H(θ − θ) regression has a stronger result than general M -estimation problems. b 2 = O(η), we have Corollary 2. Assume that kθ1 − θk 2 b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( 2 . √ 1 η+ √ , tη Pn Pn 1 1 >b 2 > where H = n1 i=1 xi x> i and G = S n i=1 (xi θ − yi ) xi xi . We assume that S = O(1) is bounded, and quantities other than t and η are data dependent constants. As with our main theorem, in the appendix we provide explicit data-dependent expressions for the Pn −1 1 b constants in the result. Because in linear regression the estimate’s covariance is n1 ( n1 i=1 xi x> )( n (x> i ) i θ− P n >b > 1 > −1 yi )(xi θ − yi ) )( n i=1 xi xi ) ), we set the scaling factor Ks = S in (6) for statistical inference. 12 C C.1 Proofs Proof of Theorem 1 b For ease of notation, we denote We first assume that θ1 = θ. b ∆t = θt − θ, (14) and, without loss of generality, we assume that θb = 0. The stochastic gradient descent recursion satisfies: θt+1 = θt − η · gs (θt ) = θt − η · (gs (θt ) − ∇f (θt ) + ∇f (θt )) = θt − η · ∇f (θt ) − η · et , where et = gs (θt ) − ∇f (θt ). Note that e1 , e2 , . . . is a martingale difference sequence. We use b gi = ∇fi (θ) and, b Hi = ∇2 fi (θ) (15) b respectively. to denote the at index i, and the Hessian component at index i, at optimum θ, P gradient component P 1 Note that gi = 0 and n Hi = H. For each fi , its Taylor expansion around θb is b > Hi (θ − θ) b + Ri (θ, θ), b b + g > (θ − θ) b + 1 (θ − θ) (16) fi (θ) = fi (θ) i 2 b is the remainder term. For convenience, we write R = 1 P Ri . where Ri (θ, θ) n For the proof, we require the following lemmata. The following lemma states that E[k∆t k22 ] = O(η) as t → ∞ and η → 0. Lemma 1. For data dependent, positive constants α, A, B according to assumptions (F1 ) and (G2 ) in Theorem 1, and given assumption (G1 ), we have h i Bη 2 E k∆t k2 ≤ (1 − 2αη + Aη 2 )t−1 k∆1 k22 + , (17) 2α − Aη under the assumption η < 2α A. Proof. As already stated, we assume without loss of generality that θb = 0. This further implies that: gs (θt ) = b = gs (∆t ), and gs (θt − θ) ∆t+1 = ∆t − η · gs (∆t ). Given the above and assuming expectation E[·] w.r.t. the selection of a sample from {Xi }ni=1 , we have:     E k∆t+1 k22 | ∆t = E k∆t − ηgs (∆t )k22 | ∆t       = E k∆t k22 | ∆t + η 2 · E kgs (∆t )k22 | ∆t − 2η · E gs (∆t )> ∆t | ∆t   = k∆t k22 + η 2 · E kgs (∆t )k22 | ∆t − 2η · ∇f (∆t )> ∆t (i)  ≤ k∆t k22 + η 2 · A · k∆t k22 + B − 2η · αk∆t k22 = (1 − 2αη + Aη 2 )k∆t k22 + η 2 B. (18) where (i) is due to assumptions (F1 ) and (G2 ) of Theorem 1. Taking expectations for every step t = 1, . . . over the whole history, we obtain the recursion: t−1 X   E k∆t+1 k22 ≤ (1 − 2αη + Aη 2 )t−1 k∆1 k22 + η 2 B · (1 − 2αη + Aη 2 )i i=0 2 t−1 = (1 − 2αη + Aη ) k∆1 k22 +η B· ≤ (1 − 2αη + Aη 2 )t−1 k∆1 k22 + 13 2 1−(1−2αη+Aη 2 )t 2αη−Aη 2 ηB 2α−Aη .   The following lemma states that E k∆t k42 = O(η 2 ) as t → ∞ and η → 0. Lemma 2. For data dependent, positive constants α, A, B, C, D according to assumptions (F1 ), (G1 ), (G2 ) in Theorem 1, we have: E[k∆t k42 ] ≤(1 − 4αη + A(6η 2 + 2η 3 ) + B(3η + η 2 ) + C(2η 3 + η 4 ))t−1 k∆1 k42 + B(3η 2 + η 3 ) + D(2η 2 + η 3 ) . 4α − A(6η + 2η 2 ) − B(3 + η) − C(2η 2 + η 3 ) (19) Proof. Given ∆t , we have the following sets of (in)equalities:   E k∆t+1 k42 | ∆t   =E k∆t − ηgs (∆t )k42 | ∆t   =E (k∆t k22 − 2η · gs (∆t )> ∆t + η 2 kgs (∆t )k22 )2 | ∆t  =E k∆t k42 + 4η 2 (gs (∆t )> ∆t )2 + η 4 kgs (∆t )k42 − 4η · gs (∆t )> ∆t k∆t k22  + 2η 2 · kgs (∆t )k22 k∆t k22 − 4η 3 · gs (∆t )> ∆t kgs (∆t )k22 | ∆t (i)  ≤E k∆t k42 + 4η 2 · kgs (∆t )k22 · k∆t k22 + η 4 kgs (∆t )k42 − 4η · gs (∆t )> ∆t k∆t k22  + 2η 2 · kgs (∆t )k22 · k∆t k22 + 2η 3 · (kgs (∆t )k22 + k∆t k22 ) · kgs (∆t )k22 | ∆t (ii)   ≤ E k∆t k42 + (2η 3 + η 4 )kgs (∆t )k42 + (6η 2 + 2η 3 )kgs (∆t )k22 k∆t k22 | ∆t − 4αηk∆t k42 (iii) ≤ (1 − 4αη)k∆t k42 + (6η 2 + 2η 3 )(Ak∆t k22 + B)k∆t k22 + (2η 3 + η 4 )(Ck∆t k42 + D) =(1 − 4αη + A(6η 2 + 2η 3 ) + C(2η 3 + η 4 ))k∆t k42 + B(6η 2 + 2η 3 )k∆t k22 + D(2η 3 + η 4 ) (iv) ≤ (1 − 4αη + A(6η 2 + 2η 3 ) + C(2η 3 + η 4 )) · k∆t k42 + B(3η + η 2 )(η 2 + k∆t k42 ) + D(2η 3 + η 4 ) =(1 − 4αη + A(6η 2 + 2η 3 ) + B(3η + η 2 ) + C(2η 3 + η 4 )) · k∆t k42 + Bη 2 (3η + η 2 ) + D(2η 3 + η 4 ), (20) where (i) is due to (gs (∆t )> ∆t )2 ≤ kgs (∆t )k22 · k∆t k22 and −2gs (∆t )> ∆t ≤ kgs (∆t )k22 + k∆t k22 , (ii) is due to assumptions (G1 ) and (F1 ) in Theorem 1, (iii) is due to assumptions (G2 ) and (G3 ) in Theorem 1, and (iv) is due to 2ηk∆t k22 ≤ η 2 + k∆t k42 . Similar to the proof of the previous lemma, applying the above rule recursively and w.r.t. the whole history of estimates, we obtain:   E k∆t+1 k42 ≤ (1 − 4αη + A(6η 2 + 2η 3 ) + B(3η + η 2 ) + C(2η 3 + η 4 ))t−1 k∆1 k42 t−1  X i + Bη 2 (3η + η 2 ) + D(2η 3 + η 4 ) · 1 − 4αη + A(6η 2 + 2η 3 ) + B(3η + η 2 ) + C(2η 3 + η 4 ) 2 i=0 2 ≤ (1 − 4αη + A(6η + 2η ) + B(3η + η ) + C(2η 3 + η 4 ))t−1 k∆1 k42 + 3 Bη 2 (3η + η 2 ) + D(2η 3 + η 4 ) , 4αη − A(6η 2 + 2η 3 ) − B(3η + η 2 ) − C(2η 3 + η 4 ) which is the target inequality, after simple transformations. We know that: ∆t = ∆t−1 − ηgs (∆t−1 ) Using the Taylor expansion formula around the point ∆t−1 and using the assumption that θb = 0, we have: b + ∇f (θ) b > ∆t−1 + 1 ∆> H∆t−1 + R(∆t−1 ) f (∆t−1 ) = f (θ) 2 t−1 Taking further the gradient w.r.t. ∆t−1 in the above expression, we have: ∇f (∆t−1 ) = H∆t−1 + ∇R(∆t−1 ) 14 Using the identity gs (∆t−1 ) = ∇f (∆t−1 ) + et−1 , our SGD recursion can be re-written as: t−1 ∆t = (I − ηH) ∆t−1 − η (∇R(∆t−1 ) + et−1 ) = (I − ηH) ¯t = For t ≥ 2 and since: θ̄ = θ̄ − θb = ∆ b = t(θ̄ − θ) t X ∆i = i=1 t X i=1 1 t Pt i=1 (θi i−1 (I − ηH) (i) = I − (I − ηH)t  H −1 η 1 t b = − θ) ∆1 − η ∆1 − η Pt j t X X j=1 i=1 ∆1 − η i=1 t−1 X i=1 t−1−i (I − ηH) (ei + ∇R(∆i )) . (21) ∆i , we get: (I − ηH)j−1−i (ei + ∇R(∆i )) j t X X j=1 i=1 (I − ηH)j−1−i (ei + ∇R(∆i )). (22) where (i) holds due to the assumption that the eigenvalues of I − ηH satisfy |λi (I − ηH)| < 1, and thus, the Pn−1 geometric series of matrices: k=0 T k = (I − T )−1 (I − T n ), is utilized above. In our case, T = (I − ηH). For the latter term in (22), using a variant of Abel’s sum formula, we have: η j j t X t−1 X X X (I − ηH)j−1−i (ei + ∇R(∆i )) = η (I − ηH)j−i (ei + ∇R(∆i )) j=1 i=1 (23) j=0 i=1 =η   i=1 = t−1 X i=1 =H −1  t−i−1 X t−1 X j=0 (I − ηH)j  (ei + ∇R(∆i ))  I − (I − ηH)t−i H −1 (ei + ∇R(∆i )) t−1 X ei + H −1 t−1 X i=1 (i) =H −1 t−1 X i=1 ei + H −1 i=1 t−1 X i=1 ∇R(∆i ) − H ∇R(∆i ) + −1 H −1 η (I t−1 X i=1 (I − ηH)t−i (ei + ∇R(∆i )) − ηH)(∆t − (I − ηH)t−1 ∆1 ), (24) where (i) follows from the fact on the expression (21). The above combined lead to: √ ¯t = t∆ 1 √ (I t | Pt−1 i=1 (I − ηH)t−i (ei + ∇R(∆i )) = (I − ηH) η1 (∆t − (I − ηH)t−1 ∆1 ), based t−1 t−1 X X −1 −1 − (I − ηH)t ) Hη ∆1 − √1t H −1 ei − √1t H −1 ∇R(∆i ) − √1t Hη (I − ηH)(∆t − (I − ηH)t−1 ∆1 ) . {z } | {z } i=1 i=1 | {z }| {z } ϕ1 ϕ4 ϕ2 ϕ3 (25) For the main result of the theorem, we are interested in the following quantity: b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( 2 −1 ¯ t∆ ¯> = tE[∆ GH −1 t ]−H 2 ¯ t∆ ¯ t ] = E[(ϕ1 + ϕ2 + ϕ3 + ϕ4 )(ϕ1 + ϕ2 + ϕ3 + ϕ4 )> ]. Thus, we need Using the ϕi notation, we have E[t∆ 15 to bound: b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( = ≤ 2 = E[(ϕ1 + ϕ2 + ϕ3 + ϕ4 )(ϕ1 + ϕ2 + ϕ3 + ϕ4 )> ] − H −1 GH −1 −1 E[ϕ2 ϕ> GH −1 + E[ϕ2 (ϕ1 + ϕ4 + ϕ3 )> + (ϕ1 + ϕ4 + ϕ3 )ϕ> 2]−H 2 + (ϕ1 + ϕ4 +   > −1 −1 > E ϕ2 ϕ2 − H GH + E[ϕ2 (ϕ1 + ϕ4 + ϕ3 ) ] 2 + E[(ϕ1 + ϕ4 + ϕ3 )ϕ> 2] 2 2 > + E[(ϕ1 + ϕ4 + ϕ3 )(ϕ1 + ϕ4 + ϕ3 ) ] 2 (i) −1 . kE[ϕ2 ϕ> GH −1 k2 + 2]−H 2 ϕ3 )(ϕ1 + ϕ4 + ϕ3 )> ] 2 q E[kϕ2 k22 ](E[kϕ1 k22 ] + E[kϕ4 k22 ] + E[kϕ3 k22 ]) + E[kϕ1 k22 ] + E[kϕ4 k22 ] + E[kϕ3 k22 ] (26) where (i) is due to the successive use of the AM-GM rule: q 1 kE[ab> ]k2 ≤ E[kak22 ]E[kbk22 ] ≤ E[kak22 ] + E[kbk22 ]. 2 (27) for two p-dimensional random vectors a andp b. Indeed, for any fixed unit vector u we have kE[ab> ]uk2 = > > kE[a(b u)]k2 ≤ E[kak2 |b u|] ≤ E[kak2 kbk2 ] ≤ E[kak22 ]E[kbk22 ]. We used the fact kE[x]k2 ≤ E[kxk2 ] because kxk2 is convex. Here also, the . hides any constants appearing from applying successively the above rule. Therefore, to proceed bounding the quantity of interest, we need to bound the terms E[kϕi k22 ]. In the statement of the theorem we have ∆1 = 0—however similar bounds will hold if k∆1 k22 = O(η); thus, for each of the above ϕi terms we have the following. ϕ1 := E[kϕ4 k22 ] 1 √ (I t  := E − (I − ηH)t ) −1 − √1t Hη (I H −1 ∆1 = 0, η (due to ∆1 = 0) t−1 − ηH)(∆t − (I − ηH) 2 ∆1 ) (28)  2 h i (i) 1 − ηλ U ≤ E kH −1 k22 · kI − ηHk22 · η12 t k∆t k22 ≤ · η12 t · E[k∆t k22 ] λL   (ii) 1 − ηλ Bη U 1 2 t−1 2 ≤ (1 − 2αη + Aη ) k∆1 k2 + λL η 2 t 2α − Aη 1 − ηλU B = λL tη(2α − Aη)   1 =O tη (29) where (i) is due to Assumption (F4 ), (ii) is due to Lemma 1, and we used in several places the fact that ∆1 = 0.  E[kϕ3 k22 ] := E  − √1t H −1  (ii) ≤ ≤ t−1 X 2 E  λEL ·t i=1 E2 λL · (t − 1) (iv) E 2 (t−1) = λL t 2 t−1 X i=1 ∇R(∆i ) !2  k∆i k22 t−1  X i=1 2 2 (iii)  ≤    ≤ E  1 · kH −1 k22 · t E2 λL ·t (t − 1) · E " t−1 X i=1 t−1 X i=1 2   (i) ∇R(∆i ) 2  ≤ E 1 1 λL t i=1 !2  k∇R(∆i )k2  # k∆i k42 (1 − 4αη + A(6η 2 + 2η 3 ) + C(2η 3 + η 4 ))t−1 k∆1 k42 + B(3η 2 + η 3 ) + D(2η 2 + η 3 ) (v) = O(tη 2 ). 4α − A(6η + 2η 2 ) − C(2η 2 + η 3 ) 16 t−1 X B(3η 2 + η 3 ) + D(2η 2 + η 3 ) 4α − A(6η + 2η 2 ) − C(2η 2 + η 3 ) (30)  P P where (i) is due to Assumption (F4 ) and due to | i χi |2 ≤ i |χi |2 , (ii) is due to Assumption (F3 ) on  Pn Pn 2 2 bounded remainder, (iii) is due to the inequality ≤ n · i=1 χ2i , (iv) is due to ∆1 = 0, (v) is due i=1 χi to η being an small constant compared to α and thus  t−1 X 1 E[kϕ2 k22 ] := E  − √ H −1 ei t i=1 = λU t t−1 X i=1 (iii) ≤ (iv) ≤ = E[kgs (∆i ) − 2 2  B(3η 2 +η 3 )+D(2η 2 +η 3 ) 4α−A(6η+2η 2 )−C(2η 2 +η 3 ) t−1 (ii) 1X  (i) = E[kH −1 ei k22 ] ≤ t i=1 ∇f (∆i )k22 ] ≤ t−1 X 2λU t t−1 X λU t = t−1 X i=1 E[kgs (∆i )k22 ] O(η 2 ) O(1) . E[kei k22 ] + i=1 t−1 X i=1 ! 2λU t (t − 1)B + (A + L2 ) 2λU t t−1  X 2 (t − 1)B + (A + L ) (1 − 2αη + Aη 2 )t−1 k∆1 k22 + i=1 E[k∆i k22 ] i=1 2λU (t−1) t  ! E[k∇f (∆i )k22 ] Bη B + (A + L ) 2α − Aη 2 Bη 2α − Aη !  = O(1), (31) where (i) is due to E[(H −1 ei )> H −1 ej ] = 0 for i 6= j, (ii) is due to Assumption (F4 ), (iii) is due to Assumptions (F2 ) and (G2 ), (iv) is due to Lemma 1. Finaly, for the term E[ϕ2 ϕ> 2 ], we have  ! !>  ! t−1 t−1 t−1 X X X > −1 −1 −1 > 1 1 1 = H E[ϕ2 ϕ2 ] = E  − √t H ei − √t H ei E[ei ei ] H −1 . (32) t i=1 i=1 i=1 and thus: E[ϕ2 ϕ> 2] −H −1 GH −1 2 = 1 −1 tH t−1 X ! E[ei e> i ] i=1 = 1 −1 tH t−1 X i=1 = 1 −1 tH t−1 X i=1 ≤ 1t H −1 t−1 X i=1 H −1 − H −1 GH −1 2 ! −1 E[ei e> − H −1 GH −1 i ]−G+G H 2 ! −1 E[ei e> − i ]−G H t−1 t · H −1 GH −1 2 ! E[ei e> i ]−G 17 2 H −1 + t−1 t H −1 GH −1 2 For each term E[ei e> i ]−G 2 , ∀i, we have > > kE[ei e> i ] − Gk2 = E[gs (∆i )gs (∆i ) ] − E[∇f (∆i )∇f (∆i ) ] − G 2 > = E[(gs (∆i ) − ∇f (∆i ))(gs (∆i ) − ∇f (∆i )) ] − G > 2 > = E[gs (∆i )gs (∆i ) ] − E[gs (∆i )∇f (∆i ) ] − E[∇f (∆i )gs (∆i )> ] + E[∇f (∆i )∇f (∆i )> ] − G 2 (i) = E[gs (∆i )gs (∆i )> ] − 2E[∇f (∆i )∇f (∆i )> ] + E[∇f (∆i )∇f (∆i )> ] − G (ii) 2 E[k∇f (∆i )k22 ]   ≤ + E A1 k∆i k2 + A2 k∆i k22 + A3 k∆i k32 + A4 k∆i k42 q (iii)        A3  ≤ L2 E k∆i k22 + A1 E [k∆i k22 ] + A2 E k∆i k22 + E k∆i k22 + k∆i k42 + A4 E k∆i k42 2 q   = A1 E[k∆i k22 ] + L2 + A2 + A23 E[k∆i k22 ] + A23 + A4 E[k∆i k42 ] r    (iv) Bη A3 Bη ≤ A1 (1 − 2αη + Aη 2 )t−1 k∆1 k22 + + L2 + A2 + (1 − 2αη + Aη 2 )t−1 k∆1 k22 + 2α − Aη 2 2α − Aη    2 3 2 B(3η + η ) + D(2η + η 3 ) A3 (1 − 4αη + A(6η 2 + 2η 3 ) + C(2η 3 + η 4 ))t−1 k∆1 k42 + + A4 + 2 4α − A(6η + 2η 2 ) − C(2η 2 + η 3 ) r     B(3η 2 + η 3 ) + D(2η 2 + η 3 ) Bη A3 Bη A3 = A1 + L2 + A2 + + + A4 . 2α − Aη 2 2α − Aη 2 4α − A(6η + 2η 2 ) − C(2η 2 + η 3 ) (33) where (i) is due to Assumption (G1 ), (ii) is due to Cauchy-Schwartz inequality and Assumption (G4 ), (iii) is due to Assumption (F2 ), (iv) is due to Lemmas 1-2. Then, we have: −1 E[ϕ2 ϕ> GH −1 2 ]−H (i) ≤ t−1 t H −1 GH −1 + 2 2 t−1 λ2 ·t L r  A1 √ = O( η). Bη + L2 + A2 + 2α − Aη A3 2  Bη + 2α − Aη A3 2 + A4  B(3η 2 + η 3 ) + D(2η 2 + η 3 ) 4α − A(6η + 2η 2 ) − C(2η 2 + η 3 ) (34) where (i) is due to Assumption, and (ii) is after removing constants and observing that the dominant term √ in the second part is O( η). Combining all the above in (26), we obtain: b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( 2 . √ r η+ 1 + tη 2 . tη  C.2 Proof of Corollary 2 Proof of Corollary 2. Here we use the same notations as the proof of Theorem 1. Because linear regression b = 0, we do not have to consider the Taylor remainder term in our analysis. And satisfies ∇f (θ) − H(θ − θ) we do not need 4-th order bound for SGD. Due to the fact that the quadratic function is strongly convex, we b ≥ λL k∆k2 . have ∆> ∇f (∆ + θ) 2 18  By sampling with replacement, we have E[kgs (θt )k22 | θt ] = k∇f (θt )k22 + E[ket k22 | θt ]  X  = k∇f (θt )k22 + S1 n1 k∇fi (θt )k22 − k∇f (θt )k22 X 2 ≤ L2 (1 − S1 )k∆t k22 + S1 n1 kxi (x> i θt − yi )k2 X >b 2 = L2 (1 − S1 )k∆t k22 + S1 n1 kxi x> i ∆t + xi xi θ − yi xi k2 X 2 >b 2 ≤ L2 (1 − S1 )k∆t k22 + 2 S1 n1 (kxi x> i ∆t k2 + kxi xi θ − yi xi k2 )   X X 2 b kxi k42 k∆t k22 + 2 S1 n1 kxi x> ≤ L2 (1 − S1 ) + 2 S1 n1 i θ − yi xi k2 . (35) We also have E[gs (θ)gs (θ)> | θ] − G 2 X ∇fi (θ)fi (θ)> − ∇f (θ)∇f (θ)> − G 2 X 2 > 1 1 ≤ k∇f (θ)k2 + S n ∇fi (θ)fi (θ) − G 2 X 2 1 1 (gi + Hi ∆)(gi + Hi ∆)> − G ≤ k∇f (θ)k2 + S n 2 X 2 > > > 1 1 ≤ k∇f (θ)k2 + S n Hi ∆gi + gi ∆ Hi + Hi ∆∆ Hi  X 2  2 2 1 2 1 1 ≤ k∇f (θ)k2 + S n kHi k2 kgi k2 k∆k2 + S n kHi k2 k∆k22   X  ≤ S1 n2 kHi k2 kgi k2 k∆k2 + L2 + S1 n1 kHi k22 k∆k22 , 1 1 Sn = (36) > b where gi = xi (x> i θ − yi ) and Hi = xi xi . Following Theorem 1’s proof, we have b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( C.3 2 . √ 1 η+ √ . tη (37) Proof of Corollary 1 Proof of Corollary 1. Here we use the same notations as the proof of Theorem 1. Because ∇2 f (θ) = ∇k(θ)∇k(θ)> + (k(θ) + c)∇2 k(θ), f (θ) is convex. The following lemma shows that ∇f (θ) = (k(θ) + c)∇k(θ) is Lipschitz. Lemma 3. k∇f (θ)k2 ≤ Lk∆k2 (38) for some data dependent constant L. Proof. First, because ∇k(θ) = 1 n X − −yi xi , 1 + exp(yi θ> xi ) (39) we have k∇k(θ)k2 ≤ 1 n X kxi k2 . (40) Also, we have k∇2 k(θ)k2 = 1 n X exp(yi θ> xi ) xi x> i (1 + exp(yi θ> xi ))2 19 2 ≤ 1 4n X kxi k22 , (41) which implies k∇k(θ)k2 ≤ 1 4n X kxi k22 k∆k2 . (42) Further: k(θ) = 1 n X log(1 + exp(−yi ∆> xi − yi θb> xi )) ≤ 1 n X log(1 + exp(kxi k2 k∆k2 − yi θb> xi )) 1 n X (log(1 + exp(−yi θb> xi )) + kxi k2 k∆k2 ) (i) ≤ (43) where step (i) follows from log(1 + exp(a + b)) ≤ log(1 + eb ) + |a|. Thus, we have k∇f (θ)k2 = k(k(θ) + c)∇k(θ)k2 ≤ k(θ)k∇k(θ)k2 + ck∇k(θ)k2   X 2  X log(1 + exp(−yi θb> xi )) k∇k(θ)k2 + n1 kxi k2 k∆k2 , ≤ c + n1 (44) and we can conclude that k∇f (θ)k2 ≤ Lk∆k2 for some data dependent constant L. Next, we show that f (θ) has a bounded Taylor remainder. Lemma 4. b 2 ≤ Ekθ − θk b 2, k∇f (θ) − H(θ − θ)k 2 (45) for some data dependent constant E. Proof. Because ∇f (θ) = (k(θ) + c)∇k(θ), we know that k∇f (θ)k2 = O(k∆k2 ) when k∆k2 = Ω(1) where the constants are data dependent. Because f (θ) is infinitely differentiable, by the Taylor expansion we know that b 2 = O(kθ − θk b 2 ) when k∆k2 = O(1) where the constants are data dependent. Combining k∇f (θ) − H(θ − θ)k 2 b 2 ≤ Ekθ − θk b 2 for some data dependent constant E. the above, we can conclude k∇f (θ) − H(θ − θ)k 2 α. b ≥ αkθ − θk b 2 for some data dependent constant In the following lemma, we will show that ∇f (θ)> (θ − θ) 2 Lemma 5. b ≥ αkθ − θk b 2, ∇f (θ)> (θ − θ) 2 (46) ∇f (θ)> ∆ = (k(θ) + c)∇k(θ)> ∆. (47) for some data dependent constant α. Proof. We know that First, notice that locally (when k∆k2 = O( λEL )) we have ∇k(θ)> ∆ & ∆> H∆ & λL k∆k22 , (48) b when k∆k2 = O( λL ). Next we will because of the optimality condition. This lower bounds ∇f (θ)> (θ − θ) E lower bound it when k∆k2 = Ω( λEL ). Consider the function for t ∈ [0, ∞), we have g(t) = ∇f (θb + ut)> ut = (k(θb + ut) + c)∇k(θb + ut)> ut = k(θb + ut)∇k(θb + ut)> ut + c∇k(θb + ut)> ut, 20 (49) convex, ∇k(θb + ut)> u is an increasing function in t, thus we have ∇k(θb + λ2 ut)> u = And we can deduce ∇k(θb + ut)> ut = Ω( EL t) when t = Ω( λEL ). Similarly, because k(θ) is convex, k(θb + ut) is an increasing function in t. Its derivative ∇k(θb + ut)> u = ∆ k∆k2 . Because k(θ) is 2 λ Ω( EL ) when t = Ω( λEL ). where u = Ω( λ2L E ) when t = Ω( λEL ). So we have k(θb + ut) = Ω( Thus, we have λ2L E t) when t = Ω( λEL ). k(θb + ut)∇k(θb + ut)> ut = Ω   λ4L 2 t , E2 (50) when t = Ω( λEL ). 4 b ≥ αkθ−θk b 2 for some data dependent constant α = Ω(min{λL , λL2 }). And we can conclude that ∇f (θ)> (θ−θ) 2 E Next, we will prove properties about gs = Ψs Υs .  1 1 X 2 2 k∇k (θ)k − k∇k(θ)k + k∇k(θ)k22 . i 2 2 SΥ n E[kΥk22 | θ] = (i) 2 1 n kxi k2 (51) X (c + ki (θ))2 2 X = n1 c + log(1 + exp(−yi θb> xi − yi ∆xi )) E[Ψ2s ] ≤ 1 n (ii) . " where (i) follows from E PS 1 n X j=1 Xj S kxi k2 k∆k22 + 2 # ≤E  PS j=1 1 n X Xj2  S (c + log(1 + exp(−yi θb> xi )))2 , (52) and (ii) follows from log(1 + exp(a + b)) ≤ log(1 + eb ) + |a|. Thus, we have E[kgs k22 (θ) | θ] = E[Ψ2 | θ] · E[kΥk22 | θ] . Ak∆k22 + B for some data dependent constants A and B. For the fourth-moment quantities, we have:   1 X E[kΥk42 | θ] = E  ∇ log(1 + exp(−yi θ> xi )) SΥ Υ i∈It 4 (53)    2  4  X  1  ≤ E  k∇ log(1 + exp(−yi θ> xi ))k2   SΥ Υ i∈It  4   1 X  ≤ E  kxi k2   ≤ SΥ Υ i∈It (i) E[Ψ4s ] ≤ (ii) . 1 n 1 n X X (c + ki (θ))4 = kxi k4 k∆k42 + 1 n 1 n X X 1 n X kxi k42 . c + log(1 + exp(−yi θb> xi − yi ∆xi )) 4 c + log(1 + exp(−yi θb> xi )) , 21 (54) 4 (55) ‘where (i) follows from E " PS j=1 Xj S 4 # ≤E  PS j=1 Xj4  S and (ii) follows from log(1 + exp(a + b)) ≤ log(1 + eb ) + |a|. Combining the above, we get:     E[kgs k42 (θ) | θ] = E Ψ4 | θ · E kΥk42 | θ . Ck∆k42 + D, (56) for some data dependent constants C and D. Finally, we need a bound for the quantity kE[∇gs (θ)∇gs (θ)> ] − Gk2 . We observe: E[∇gs (θ)∇gs (θ)> ] − G 2 ≤ KG (θ) n X ≤ KG (θ) n X ≤ KG (θ) n ∇ki (θ)∇ki (θ)> − > b KG (θ) n X KG (θ) n X b b> ∇ki (θ)∇k i (θ) 2 b b> ∇ki (θ)∇ki (θ) − ∇ki (θ)∇k i (θ) X b X b b > KG (θ) b b> ∇ki (θ)∇k ∇ki (θ)∇k + KGn(θ) i (θ) − i (θ) n  X b b> ∇ki (θ)∇ki (θ)> − ∇ki (θ)∇k i (θ) 2 X b · 1 b b> . + |KG (θ) − KG (θ)| ∇k ( θ)∇k ( i i θ) n 2 2 (57) Because 1 n X KG (θ) = O(1 + k∆k2 + k∆k22 ), b b> (∇ki (θ)∇ki (θ)> − ∇ki (θ)∇k i (θ) ) (58) = O(k∆k2 + k∆k22 ), (59) b = O(k∆k2 + k∆k2 ), |KG (θ) − KG (θ)| 2 (60) 2 we may conclude that b 2 + A2 kθ − θk b 2 + A3 kθ − θk b 3 + A4 kθ − θk b 4, kE[gs (θ)gs (θ)> | θ] − Gk2 ≤ A1 kθ − θk 2 2 2 (61) for some data dependent constants A1 , A2 , A3 , and A4 . Combining above results and using Theorem 1, we have b θ̄t − θ) b > ] − H −1 GH −1 tE[(θ̄t − θ)( D 2 . √ r η+ 1 + tη 2 . tη (62) Experiments Here we present additional experiments on our SGD inference procedure. D.1 Synthetic data Figure 5 shows Q-Q plots for samples shown in Figure 2. D.1.1 Multivariate models Here we show Q-Q plots per coordinate for samples from our SGD inference procedure. Q-Q plots per coordinate for samples in linear regression experiment 1 is shown in Figure 6. Q-Q plots per coordinate for samples in linear regression experiment 2 is shown in Figure 7. Q-Q plots per coordinate for samples in logistic regression experiment 1 is shown in Figure 8. Q-Q plots per coordinate for samples in logistic regression experiment 2 is shown in Figure 9. 22 1.4 0.4 1.4 1.3 1.3 1.2 0.2 0.0 0.2 0.4 Sample Quantiles 1.5 Sample Quantiles Sample Quantiles 0.6 1.2 1.1 1.0 0.9 3 2 1 0 1 Theoretical Quantiles 2 3 1.1 1.0 0.9 0.8 3 2 (a) Normal. 1 0 1 Theoretical Quantiles 2 3 3 2 1 0 1 Theoretical Quantiles (b) Exponential. 2 3 (c) Poisson. Figure 5: Estimation in univariate models: Q-Q plots for samples shown in Figure 2 3 0 1 1 0 1 Theoretical Quantiles 2 0 1 2 2 1 0 1 Theoretical Quantiles 2 2 2 3 2 1 Sample Quantiles 3 3 4 Sample Quantiles 4 5 1 0 1 5 3 4 2 1 0 1 0 1 Theoretical Quantiles 2 2 0 1 2 3 3 3 1 0 1 Theoretical Quantiles 2 2 2 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 2 3 1 2 2 1 0 1 Theoretical Quantiles 0 1 2 1 4 2 1 0 1 Theoretical Quantiles 2 1 1 1 0 2 3 0 2 2 6 4 1 3 2 2 Sample Quantiles 1 1 Sample Quantiles 2 2 Sample Quantiles 1 3 2 Sample Quantiles 0 3 Sample Quantiles Sample Quantiles Sample Quantiles 1 Sample Quantiles 4 2 2 1 0 1 2 2 1 0 1 Theoretical Quantiles 2 Figure 6: Linear regression experiment 1: Q-Q plots per coordinate Additional experiments 2-Dimensional Linear Regression. Consider:     x 1 y = x1 + x2 + , where 1 ∼ N 0, x2 0.8  0.8 and  ∼ N (0, σ 2 = 102 ). 1 Each sample consists of Y = y and X = [x1 , x2 ]> . We use linear regression to estimate w1 , w2 in y = w1 x1 + w2 x2 . In this case, the minimizer of the population least square risk is w1? = 1, w2? = 1. For 300 i.i.d. samples, we plotted 100 samples from SGD inference in Figure 10. We compare our SGD inference procedure against bootstrap in Figure 10a. Figure 10b and Figure 10c show samples from our SGD inference procedure with different parameters. 10-Dimensional Linear Regression. Here we consider the following model y = x> w? + , 3 0 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 1 1 0 4 2 3 2 3 0 2 4 4 5 2 1 0 1 Theoretical Quantiles 2 6 0 1 2 1 0 1 Theoretical Quantiles 2 4 4 2 2 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 2 3 2 1 0 1 2 3 2 1 0 1 Theoretical Quantiles 2 1 Sample Quantiles Sample Quantiles 1 Sample Quantiles 2 0 0 2 6 2 2 1 2 3 1 0 1 Theoretical Quantiles 2 1 2 2 4 0 1 2 4 2 2 2 Sample Quantiles 2 4 2 Sample Quantiles 0 3 Sample Quantiles 2 Sample Quantiles Sample Quantiles Sample Quantiles 2 4 Sample Quantiles 6 1 0 1 2 3 2 1 0 1 Theoretical Quantiles 2 3 2 1 0 1 Theoretical Quantiles 2 Figure 7: Linear regression experiment 2: Q-Q plots per coordinate 23 0.05 0.05 0.10 0.15 0.10 0.15 2 1 0 1 Theoretical Quantiles 2 1 0 1 Theoretical Quantiles 0.05 0.00 0.05 0.10 2 1 0 1 Theoretical Quantiles 0.05 0.10 0.05 0.00 0.05 0.10 0.15 2 1 0 1 Theoretical Quantiles 2 1 0 1 Theoretical Quantiles 0.00 0.05 0.10 0.15 0.0 0.1 2 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 2 2 1 0 1 Theoretical Quantiles 2 0.10 0.05 0.00 0.05 2 2 0.15 0.10 0.10 0.2 2 0.00 0.10 2 0.20 0.1 0.05 0.05 0.15 2 0.15 0.20 0.15 0.00 0.2 0.05 Sample Quantiles Sample Quantiles 0.10 0.05 0.15 2 0.10 0.15 0.10 0.10 0.10 0.20 2 0.20 Sample Quantiles 0.15 0.00 Sample Quantiles 0.00 0.20 0.05 Sample Quantiles 0.05 0.10 Sample Quantiles Sample Quantiles Sample Quantiles 0.10 Sample Quantiles 0.15 Sample Quantiles 0.20 0.05 0.00 0.05 0.10 0.15 2 1 0 1 Theoretical Quantiles 2 Figure 8: Logistic regression experiment 1: Q-Q plots per coordinate 0.00 0.05 0.10 0.2 1 0 1 Theoretical Quantiles 0.1 0.0 2 2 1 0 1 Theoretical Quantiles 2 0.15 0.05 0.00 0.05 0.10 0.15 0.1 0.15 2 Sample Quantiles 0.1 Sample Quantiles Sample Quantiles Sample Quantiles 0.0 0.05 0.20 0.10 0.2 0.10 0.1 Sample Quantiles 0.15 0.2 1 0 1 Theoretical Quantiles 2 1 0 1 Theoretical Quantiles 2 0.20 0.1 0.0 1 0 1 Theoretical Quantiles 0.0 0.1 2 2 1 0 1 Theoretical Quantiles 2 0.1 0.0 2 1 0 1 Theoretical Quantiles 2 0.10 0.05 0.00 0.05 0.10 0.1 0.2 0.1 2 0.15 0.2 Sample Quantiles Sample Quantiles Sample Quantiles Sample Quantiles 0.0 0.1 0.1 Sample Quantiles 0.2 0.1 0.00 0.15 2 0.3 0.2 0.05 0.05 0.10 0.20 2 0.10 0.15 2 1 0 1 Theoretical Quantiles 2 Figure 9: Logistic regression experiment 2: Q-Q plots per coordinate where w? = √110 [1, 1, · · · , 1]> ∈ R10 , x ∼ N (0, Σ) with Σij = 0.8|i−j| , and  ∼ N (0, σ 2 = 202 ), and use n = 1000 samples. We estimate the parameter using n w b = argmin w 1X1 > (x w − yi )2 . n i=1 2 i Figure 11 shows the diagonal terms of of the covariance matrix computed using the sandwich estimator and our SGD inference procedure with different parameters. 100000 samples from our SGD inference procedure are used to reduce the effect of randomness. 2-Dimensional Logistic Regression. Here we consider the following model P[Y = +1] = P[Y = −1] = bootstrap SGD 4 3  X | Y ∼ N µ = 1.1 + 0.1Y, σ 2 = 1 . = .1 = .05 = .025 = .0125 4 3 1 1 3 2 1 0 0 0 1 1 1 2 2 2 1 0 w1 1 2 3 (a) SGD inference vs. bootstrap 2 1 0 w1 1 2 3 (b) t = 800 Figure 10: 2-dimensional linear regression 24 (63) 4 w2 2 w2 2 w2 1 , 2 2 t = 100 t = 200 t = 400 t = 400 2 1 0 w1 1 (c) η = 0.1 2 3 3.0 3.0 sandwich = 0.05 = 0.01 = 0.002 2.5 sandwich = 0.05 = 0.01 = 0.002 2.5 3.0 2.0 2.0 2.0 1.5 1.5 1.5 1.0 1.0 1.0 0.5 0.5 0.5 0.0 0 2 4 6 0.0 8 0 2 (a) t = 500 4 6 8 3.0 sandwich t = 12500 t = 2500 t = 500 2.5 0.0 sandwich t = 12500 t = 2500 t = 500 2.5 2 2.0 1.5 1.5 1.0 1.0 1.0 0.5 0.5 0.5 0.0 0.0 8 0 2 (d) η = 0.05 4 6 6 8 8 sandwich t = 12500 t = 2500 t = 500 2.5 2.0 6 4 3.0 1.5 4 0 (c) t = 12500 2.0 2 = 0.05 = 0.01 = 0.002 (b) t = 2500 3.0 0 sandwich 2.5 0.0 0 2 (e) η = 0.01 4 6 8 (f) η = 0.002 Figure 11: 11-dimensional linear regression: covariance matrix diagonal terms of SGD inference and sandwich estimator We use logistic regression to estimate w, b in the classifier sign(wx + b) where the minimizer of the population logistic risk is w? = 0.2, b? = −0.22. For 100 i.i.d. samples, we plot 1000 samples from SGD in Figure 12. In our simulations, we notice that our modified SGD for logistic regression behaves similar to vanilla logistic regression. T his suggests that an b > ∇f (θ) ≥ αkθ − θk b 2 (assumption (F1 ) in Theorem 1) is sufficient for SGD assumption weaker than (θ − θ) 2 analysis. Figure 12b and Figure 12d suggest that the tη 2 term in Corollary 1 is an artifact of our analysis, and can be improved. 11-Dimensional Logistic Regression. Here we consider the following model P[Y = +1] = P[Y = −1] = 1 , 2 X | Y ∼ N (0.01Y µ, Σ) , where Σii = 1 and when i 6= j Σij = ρ|i−j| for some ρ ∈ [0, 1), and µ = estimate a classifier sign(w> x + b) using √1 [1, 10 1, · · · , 1]> ∈ R10 . We n w, b bb = argmin w,b  1X log 1 + exp(−Yi (w> Xi + b)) . n i=1 (64) Figure 13 shows results for ρ = 0 with n = 80 samples. We use t = 100, d = 70, η = 0.8, and mini batch of size 4 in vanilla SGD. Bootstrap and our SGD inference procedure each generated 2000 samples. In bootstrap, we used Newton method to perform optimization over each replicate, and 6-7 iterations were used. In figure 14, we follow the same procedure for ρ = 0.6 with n = 80 samples. Here, we use t = 200, d = 70, η = 0.85; the rest of the setting is the same. D.2 Real data Here, we compare covariance matrix computed using our SGD inference procedure, bootstrap, and inverse Fisher information matrix on the Higgs data set [BSW14] and the LIBSVM Splice data set, and we observe 25 2.0 2.5 1.0 0.0 2.0 2 1.5 1 1.0 b b 0.5 3 bootstrap SGD b bootstrap SGD 1.5 0.5 0 0.5 1.0 2 1.5 2.0 t = 1000 t = 10000 t = 100000 1 2.0 1.5 1.0 0.5 0.0 w 0.5 1.0 1.5 2.0 2.0 (a) Modified SGD with t = 1000 and η = 0.1 1.5 1.0 0.0 0.5 0.5 w 0.0 0.5 1.0 1.5 1.0 2.0 (b) Modified SGD with η = 0.1 0.5 w 0.0 0.5 1.0 modified SGD vanilla SGD 1.5 2 1.0 (c) Vanilla SGD with t = 1000 and η = 0.1 4 3 1.5 1.0 b b 1 0 1 t = 1000 t = 10000 t = 100000 2 3 2 1 0.5 0.0 0.5 w 0 1 2 0.8 (d) Vanilla SGD with η = 0.1 0.6 0.4 0.2 w 0.0 0.2 0.4 (e) t = 1000 and η = 0.1 Figure 12: 2-dimensional logistic regression 0.20 0 0 0.15 2 0.10 0.05 4 2 4 0.00 6 0.05 0.10 8 6 8 0.15 10 0 2 4 6 8 10 (a) SGD covariance 0.20 10 0 2 4 6 8 10 0.20 0.200 0.15 0.175 0.10 0.150 0.05 0.125 0.00 0.100 0.05 0.075 0.10 0.050 0.15 0.025 0.20 0.000 (b) Bootstrap estimated covariance SGD bootstrap 0 2 4 6 8 10 (c) Diagonal terms Figure 13: 11-dimensional logistic regression: ρ = 0 that they have similar statistical properties. D.2.1 Higgs data set The Higgs data set 4 [BSW14] contains 28 distinct features with 11,000,000 data samples. This is a classification problem between two types of physical processes: one produces Higgs bosons and the other is a background process that does not. We use a logistic regression model, trained using vanilla SGD, instead of the modified SGD described in Section 3.3. To understand different settings of sample size, we subsampled the data set with different sample size levels: n = 200 and n = 50000. We investigate the empirical performance of SGD inference on this subsampled data set. In all experiments below, the batch size of the mini batch SGD is 10. In the case n = 200, the asymptotic normality for the MLE is not a good enough approximation. Hence, in this small-sample inference, we compare the SGD inference covariance matrix with the one obtained by inverse Fisher information matrix and bootstrap in Figure 15. 4 https://archive.ics.uci.edu/ml/datasets/HIGGS 26 0.4 0 0 0.3 2 0.2 0.1 4 2 4 0.0 6 0.1 0.2 8 0.4 0.40 0.3 0.35 0.2 0.30 0.1 0.25 0.0 0.20 6 8 0.3 10 0 2 4 6 8 10 0.4 (a) SGD covariance 10 0 2 4 6 8 10 0.1 0.15 0.2 0.10 0.3 0.05 0.4 0.00 SGD bootstrap 0 2 (b) Bootstrap estimated covariance 4 6 8 10 (c) Diagonal terms Figure 14: 11-dimensional logistic regression: ρ = 0.6 7.5 0 7.5 0 6.0 5 4.5 4.5 3.0 10 1.5 0.0 15 3.0 1.5 0.0 15 6.0 0 5 10 15 20 25 7.5 (a) Inverse Fisher information 4.5 3.0 10 1.5 0.0 15 1.5 3.0 20 4.5 25 6.0 5 3.0 10 1.5 20 7.5 0 6.0 5 1.5 3.0 20 4.5 25 6.0 0 5 10 15 20 25 7.5 (b) SGD inference covariance 4.5 25 6.0 0 5 10 15 20 25 7.5 (c) Bootstrap estimated covariance Figure 15: Higgs data set with n = 200 For our SGD inference procedure, we use t = 100 samples to average, and discard d = 50 samples. We use R = 20 averages from 20 segments (as in Figure 1). For bootstrap, we use 2000 replicates, which is much larger than the sample size n = 200. Figure 15 shows that the covariance matrix obtained by SGD inference is comparable to the estimation given by bootstrap and inverse Fisher information. In the case n = 50000, we use t = 5000 samples to average, and discard d = 500 samples. We use R = 20 averages from 20 segments (as in Figure 1). For this large data set, we present the estimated covariance of SGD inference procedure and inverse Fisher information (the asymptotic covariance) in Figure 16 because bootstrap is computationally prohibitive. Similar to the small sample result in Figure 15, the covariance of our SGD inference procedure is comparable to the inverse Fisher information. In Figure 17, we compare the covariance matrix computed using our SGD inference procedure and inverse Fisher information with n = 90000 samples . We used 25 samples from our SGD inference procedure with t = 5000, d = 1000, η = 0.2, and mini batch size of 10. D.2.2 Splice data set The Splice data set 5 contains 60 distinct features with 1000 data samples. This is a classification problem between two classes of splice junctions in a DNA sequence. Similar to the Higgs data set, we use a logistic regression model, trained using vanilla SGD. In Figure 18, we compare the covariance matrix computed using our SGD inference procedure and bootstrap n = 1000 samples. We used 10000 samples from both bootstrap and our SGD inference procedure with t = 500, d = 100, η = 0.2, and mini batch size of 6. 5 https://www.csie.ntu.edu.tw/ ˜cjlin/libsvmtools/datasets/binary.html 27 0.010 0 0.010 0 0.008 5 0.008 5 0.006 0.006 0.004 10 0.004 10 0.002 0.000 15 0.002 0.000 15 0.002 0.002 0.004 20 0.004 20 0.006 25 0.006 25 0.008 0 5 10 15 20 0.010 25 0.008 0 5 (a) Inverse Fisher information 10 15 20 0.010 25 (b) SGD inference covariance Figure 16: Higgs data set with n = 50000 0 5 10 15 20 25 0.004 0.002 0.000 0.002 0.004 0 5 10 15 20 0 5 10 15 20 25 25 0.004 0.002 0.000 0.002 0.004 0 (a) Inverse Fisher information 5 10 15 20 25 SGD Inference Fisher 0.004 0.003 0.002 0.001 0.000 0 5 (b) SGD inference covariance 10 15 20 25 (c) Diagonal terms Figure 17: Higgs data set with n = 90000 D.2.3 MNIST Here, we train a binary logistic regression classifier to classify 0/1 using perturbed MNIST data set, and demonstrate that certain adversarial examples (e.g. [GSS15]) can be detected using prediction confidence intervals. For each image, where each original pixel is either 0 or 1, we randomly changed 70% pixels to P[1|image] random numbers uniformly on [0, 0.9]. Figure 19 shows each image’s logit value (log P[0|image] ) and its 95% confidence interval computed using our SGD inference procedure. The adversarial perturbation used here is shown in Figure 20 (scaled for display). 0 0.025 0 0.02 10 0.02 10 0.01 20 0.020 0.01 20 0.015 30 0.00 30 0.00 0.010 40 0.01 50 40 0.01 60 0 10 20 30 40 50 (a) Bootstrap 60 SGD bootstrap 0.005 50 0.02 0.02 60 0 10 20 30 40 50 60 (b) SGD inference covariance Figure 18: Splice data set 28 0.000 0 10 20 30 40 (c) Diagonal terms 50 60 0 0 5 5 10 10 15 15 20 20 25 25 0 5 10 15 20 25 0 (a) Original “0”: logit -72.6, CI (-106.4, -30.0) 5 10 15 20 25 (b) Adversarial “0”: logit 15.3, CI (-6.5, 26.2) 0 0 5 5 10 10 15 15 20 20 25 25 0 5 10 15 20 25 0 (c) Original “0”: logit -62.1, CI (-101.6, -5.5) 5 10 15 20 25 (d) Adversarial “0”: logit 1.9, CI (-4.9, 11.6) 0 0 5 5 10 10 15 15 20 20 25 25 0 5 10 15 20 25 0 (e) Original “0”: logit -42.9, CI (-75.4, 5.1) 5 10 15 20 25 (f) Adversarial “0”: logit 4.8, CI (-3.4, 17.9) 0 0 5 5 10 10 15 15 20 20 25 25 0 5 10 15 20 25 0 (g) Original “0”: logit -77.0, CI (-110.7, -32.2) 5 10 15 20 25 (h) Adversarial “0”: logit 13.3, CI (-8.0, 25.7) Figure 19: MNIST 0 5 10 15 20 25 0 5 10 15 20 25 Figure 20: MNIST adversarial perturbation (scaled for display) 29
10math.ST
A Match in Time Saves Nine: Deterministic Online Matching With Delays∗ Marcin Bienkowski1 , Artur Kraska1 , and Paweł Schmidt1 1 Institute of Computer Science, University of Wrocław, Poland arXiv:1704.06980v1 [cs.DS] 23 Apr 2017 Abstract We consider the problem of online Min-cost Perfect Matching with Delays (MPMD) introduced by Emek et al. (STOC 2016). In this problem, an even number of requests appear in a metric space at different times and the goal of an online algorithm is to match them in pairs. In contrast to traditional online matching problems, in MPMD all requests appear online and an algorithm can match any pair of requests, but such decision may be delayed (e.g., to find a better match). The cost is the sum of matching distances and the introduced delays. We present the first deterministic online algorithm for this problem. Its competitive ratio is O(mlog2 5.5 ) = O(m2.46 ), where 2m is the number of requests. This is polynomial in the number of metric space points if all requests are given at different points. In particular, the bound does not depend on other parameters of the metric, such as its aspect ratio. Unlike previous (randomized) solutions for the MPMD problem, our algorithm does not need to know the metric space in advance. 1998 ACM Subject Classification F.1.2 Modes of Computation: Online computation, F.2.2 Nonnumerical Algorithms and Problems Keywords and phrases online matching, delays, rent-or-buy, competitive analysis 1 Introduction In this paper, we give a deterministic online algorithm for the problem of Min-cost Perfect Matching with Delays (MPMD) [22, 5]. For an informal description, imagine that there are human players who are logging in real time into a gaming website, each wanting to play chess against another human player. The system pairs the players according to their known capabilities, such as playing strength. A decision with whom to match a given player can be delayed until a reasonable match is found. That is, the website tries to simultaneously minimize two objectives: the waiting times of players and their dissimilarity, i.e., each player would like to play with another one with similar capabilities. An algorithm running the website has to work online, without the knowledge about future player arrivals and make its decision irrevocably: once two players are paired, they remain paired forever. 1.1 Problem definition More formally, in the MPMD problem there is a metric space X with a distance function dist : X × X → R, both known from the beginning to an online algorithm. An online part of the input is a sequence of 2m requests {(pi , ti )}2m i=1 , where point pi ∈ X corresponds to a player in our informal description above and ti is the time of its arrival. Clearly, t1 ≤ t2 ≤ . . . ≤ t2m . The integer m is not known a priori to an online algorithm. At any ∗ Partially supported by Polish National Science Centre grant 2016/22/E/ST6/00499. © Marcin Bienkowski, Artur Kraska, Paweł Schmidt; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany A:2 A Match in Time Saves Nine: Deterministic Online Matching With Delays time τ , an online algorithm may decide to match any pair of requests (pi , ti ) and (pj , tj ) that have already arrived (τ ≥ ti and τ ≥ tj ) and have not been matched yet. The cost incurred by such matching edge is dist(pi , pj ) + (τ − ti ) + (τ − tj ), i.e., is the sum of the connection cost and the waiting costs of these two requests. The goal is to eventually match all requests and minimize the total cost. We use a typical yardstick to measure the performance: a competitive ratio [13], defined as the maximum, over all inputs, of the ratios between the cost of an online algorithm and the cost of an optimal offline solution Opt that knows the entire input sequence in advance. 1.2 Previous work The MPMD problem was introduced by Emek et al. [22], who presented a randomized O(log2 n + log ∆)-competitive algorithm. There, n is the number of points in the metric space X and ∆ is its aspect ratio (the ratio between the largest and the smallest distance in X ). The competitive ratio was subsequently improved by Azar et al. [5] to O(log n). They √ showed that the ratio of any randomized algorithm is at least Ω( log n). The currently best lower bound of Ω(log n/ log log n) for randomized solutions was given by Ashlagi et al. [3]. So far, the construction of a competitive deterministic algorithm for general metric spaces remained an open problem. It was hypothesized that competitive ratios achievable by deterministic algorithms might be superpolynomial in n (cf. Section 5 of [5]). Deterministic algorithms were known only for simple spaces: Azar et al. [5] gave an O(height)-competitive algorithm for trees and Emek et al. [23] constructed a 3-competitive deterministic solution for two-point metric (the competitive ratio is best possible for such metric). 1.3 Our contribution In this paper, we give the first deterministic algorithm for any metric space, whose competitive ratio is O(mlog2 5.5 ) = O(m2.46 ), where 2m is the number of requests. Typically, for our gaming application, m is smaller than n (although in full generality it can be also larger if multiple requests arrive at the same point of the metric space X ). While previous solutions to the MPMD problem [22, 5] required X to be finite and known a priori (to approximate it first by a random HST tree [24] or a random HST tree with reduced height [8]), our solution works even when X is revealed in online manner. That is, we require only that, together with any request r, an online algorithm learns the distances from r to all previous, not yet matched requests. Our online algorithm Alg uses a simple, local, semi-greedy scheme to find a suitable matching pair. In the analysis, we fix a final perfect matching of Opt and observe what happens when we gradually add matching edges that Alg creates during its execution. That is, we trace the evolution of alternating paths and cycles in time. To bound the cost of Alg, we charge the cost of an edge that Alg is adding against the cost of already existing matching edges from the same alternating path. Interestingly, our charging argument on alternating cycles bears some resemblance to the analyses of algorithms for the problems that are not directly related to MPMD: online metric (bipartite) matching on line metrics [2] and offline greedy matching [40]. 1.4 Related work Originally, matching problems have been studied in variants where delaying decisions was not permitted. The setting most similar to the MPMD problem is called online metric bipartite M. Bienkowski, A. Kraska and P. Schmidt matching. In involves m offline points given to an algorithm at the beginning and m requests presented in online manner that need to be matched (immediately after their arrival) to offline points. Both points and requests lie in a common metric space and the goal is to minimize the weight of a perfect matching created by an algorithm. For general metric spaces, the best randomized solution is O(log m)-competitive [7, 26, 37], and the deterministic algorithms achieve the optimal competitive ratio of 2m − 1 [27, 32]. Interestingly, even for line metrics [2, 25, 33], the best known deterministic algorithm attains a competitive ratio that is polynomial in m [2]. In comparison, in the MPMD problem considered in this paper, all 2m requests appear in online manner, m is not known to an algorithm, and we allow to match any pair of them. That said, there is also a bipartite variant of the MPMD problem, in which all requests appear online, but m of them are negative and m are positive. An algorithm may then only match pairs of requests of different polarities [4, 3]. The MPMD problem can be cast as augmenting min-cost perfect matching with a time axis, allowing the algorithm to delay its decisions, but penalizing the delays. There are many other problems that use this paradigm: most notably the ski-rental problem and its continuous counterpart, the spin-block problem [29], where a purchase decision can be delayed until renting cost becomes sufficiently large. Such rent-or-buy (wait-or-act) trade-offs are also found in other areas, for example in aggregating messages in computer networks [1, 11, 21, 28, 31, 39], in aggregating orders in supply-chain management [9, 10, 14, 15, 17, 18] or in some scheduling variants [6]. Finally, there is a vast amount of work devoted to other online matching variant, where offline points and online requests are connected by graph edges and the goal is to maximize the weight or the cardinality of the produced matching. These types of matching problems have been studied since the seminal work of Karp et al. [30] and are motivated by applications to online auctions [12, 16, 19, 20, 30, 34, 36, 38]. They were also studied under stochastic assumptions on the input, see, e.g., a survey by Mehta [35]. 2 Algorithm We will identify requests with the points at which they arrive. To this end, we assume that all requested points are different, but we allow distances between different metric points to be zero. For any request p, we denote the time of its arrival by atime(p). Our algorithm is parameterized with real numbers α > 0 and β > 1, whose exact values will be optimized later. For any request p, we define its waiting time at time τ ≥ atime(p) as waitτ (p) = τ − atime(p) and its budget at time τ as budgetτ (p) = α · waitτ (p) . Our online algorithm Alg matches two requests p and q at time τ as soon as the following two conditions are satisfied. Budget sufficiency: budgetτ (p) + budgetτ (q) ≥ dist(p, q). Budget balance: budgetτ (p) ≤ β · budgetτ (q) and budgetτ (q) ≤ β · budgetτ (p). Note that the budget balance condition is equivalent to relations on waiting times, i.e., waitτ (p) ≤ β · waitτ (q) and waitτ (q) ≤ β · waitτ (p). If the conditions above are met simultaneously for many point pairs, we break ties arbitrarily, and process them in any order. Note that at the time when p and q become A:3 A:4 A Match in Time Saves Nine: Deterministic Online Matching With Delays matched, the sum of their budgets may exceed dist(p, q). For example, this occurs when q appears at time strictly larger than atime(p) + dist(p, q): they are then matched by Alg as soon as the budget balance condition becomes true. The observation below follows immediately by the definition of Alg. I Observation 1. Fix time τ and two requests p and q, such that atime(p) ≤ τ and atime(q) ≤ τ . Assume that neither p nor q has been matched by Alg strictly before time τ . Then exactly one of the following conditions holds: α · (waitτ (p) + waitτ (q)) ≤ dist(p, q), α · (waitτ (p) + waitτ (q)) > dist(p, q) and waitτ (p) ≥ β · waitτ (q), α · (waitτ (p) + waitτ (q)) > dist(p, q) and waitτ (q) ≥ β · waitτ (p). 3 Analysis To analyze the performance of Alg, we look at matchings generated by Alg and by an optimal offline algorithm Opt. If points p and q were matched at time τ by Alg, then we say that Alg creates a (matching) edge e = (p, q). Its cost is costALG (e) = costALG (p, q) = dist(p, q) + waitτ (p) + waitτ (q) . We call e an Alg-edge. The costOPT of an edge in the solution of Opt (an Opt-edge) is defined analogously. In an optimal solution, however, the matching time is always equal to the arrival time of the later of two matched requests. We now consider a dynamically changing graph consisting of requested points, Opt-edges and Alg-edges. For the analysis, we assume that it changes in the following way: all requested points and all Opt-edges are present in the graph from the beginning, but the Alg-edges are added to the graph in m steps, in the order they are created by Alg. At all times, the matching edges present in the graph form alternating paths or cycles (i.e., paths or cycles whose edges are interleaved Alg-edges and Opt-edges). Furthermore, any node-maximal alternating path starts and ends with Opt-edges. Assume now that a matching edge e created by Alg is added to the graph. It may either connect the ends of two different alternating paths, thus creating a single longer alternating path or connect the ends of one alternating path, generating an alternating cycle. In the former case, we call edge e non-final, in the latter case — final. Note that at the end of the Alg execution, when m Alg-edges are added, the graph contains only alternating cycles. We extend the notion of cost to alternating path and cycles. For any cycle C, cost(C) is simply the sum of costs of its edges: the cost of an Opt-edge on such cycle is the cost paid by Opt and the cost of an Alg-edge is that of Alg. We also define costOPT (C), costALG (C) and costALG−NF (C) as the costs of Opt-edges, Alg-edges and non-final Algedges on cycle C, respectively. Clearly, costALG (C) + costOPT (C) = cost(C). We define the same notions for alternating paths; as a path P does not contain final Alg-edges, costALG−NF (P ) = costALG (P ). An alternating path is called κ-step maximal alternating path if it exists in the graph after Alg matched κ pairs and it cannot be extended, i.e., it ends with two requests that are not yet matched by the first κ Alg-edges. 3.1 Tree construction To facilitate the analysis, along with the graph, we create a dynamically changing forest F of binary trees, where each leaf of F corresponds to an Opt-edge and each internal (non-leaf) M. Bienkowski, A. Kraska and P. Schmidt o1 A:5 v(a6 ) o5 a2 a1 v(a4 ) v(o7 ) o6 o2 a4 v(a3 ) o4 a5 v(a1 ) a3 a7 o9 v(o6 ) v(o9 ) v(o4 ) o3 v(a5 ) a6 o8 v(o5 ) o7 v(o1 ) v(o8 ) v(o2 ) v(o3 ) Figure 1 The left side contains an example graph consisting of all Opt-edges o1 , o2 , . . . , o9 (dashed lines) and the first κ = 7 Alg-edges a1 , a2 , . . . , a7 (solid lines). Alg-edges are numbered in the order they were created and added to the graph. Shaded Alg-edges (a2 and a7 ) are final, the remaining ones are non-final. The right side depicts the corresponding forest F : leaves of F represent Opt-edges and non-leaf nodes of F correspond to non-final Alg-edges. Trees rooted at nodes v(o1 ) and v(a5 ) represent alternating cycles and those rooted at nodes v(a6 ) and v(o8 ) represent alternating paths in the graph. node of F to a non-final Alg-edge (and vice versa). After Alg matched κ pairs, each subtree of F corresponds to a κ-step maximal alternating path or to an alternating cycle. More precisely, at the beginning, F consists of m single nodes representing Opt-edges. Afterwards, whenever an Alg-edge is created, we perform the following operation on F . When a non-final Alg-edge e = (p, q) is added to the graph, we look at the two alternating paths P and Q that end with p and q, respectively. We take the corresponding trees T (P ) and T (Q) of F . We add a node v(e) (representing edge e) to F and make T (P ) and T (Q) its subtrees. When a final Alg-edge e = (p, q) is added to the graph, it turns an alternating path P into an alternating cycle C. We then simply say that the tree T (P ) that corresponded to P , now corresponds to C. An example of the graph and the associated forest F is presented in Figure 1. For any tree node w, we define its weight weight(w) as the cost of the corresponding matching edge, i.e., the cost of an Opt-edge for a leaf and the cost of a non-final Alg-edge for a non-leaf node. For any node w, by Tw we denote the tree rooted at w. We extend the notion of weight in a natural manner to all subtrees of F . In these terms, the weight of a tree T in F is equal to the total cost of the corresponding alternating path. (If T represents an alternating cycle C, then its weight is equal to the cost of C minus the cost of the final Alg-edge from C.) Note that we consistently used terms “points” and “edges” for objects that Alg and Opt are operating on in the metric space X . On the other hand, the term “nodes” will always refer to tree nodes in F and we will not use the term “edge” to denote an edge in F . A:6 A Match in Time Saves Nine: Deterministic Online Matching With Delays 3.2 Outline of the analysis Our approach to bounding the cost of Alg is now as follows. We look at the forest F at the end of Alg execution. The corresponding graph contains only alternating cycles. The cost of non-final Alg-edges is then, by the definition, equal to the total weight of internal (non-leaf) nodes of F , while the cost of Opt-edges is equal to the total weight of leaves of F . Hence, our goal is to relate the total weight of any tree to the weight of its leaves. The central piece of our analysis is showing that for any internal node w with children u and v, it holds that weight(w) ≤ ξ · min{weight(Tu ), weight(Tv )}, where ξ is a constant depending on parameters α and β (see Corollary 4). Using this relation, we will bound the total weight of any tree by O(mlog2 (ξ+2)−1 ) times the total weight of its leaves. This implies the same bound on the ratio between non-final Alg-edges and Opt-edges on each alternating cycle. Finally, we show that the cost of final Alg-edges incurs at most an additional constant factor in the total cost of Alg. 3.3 Cost of non-final ALG-edges As described in Section 3.1, when Alg adds a κ-th Alg-edge e to the graph, and this edge is non-final, e joins two (κ − 1)-step maximal alternating paths P and Q. We will bound costALG (e) by a constant (depending on α and β) times min{cost(P ), cost(Q)}. We start with bounding the waiting cost of Alg related to one endpoint of e. I Lemma 2. Let e = (p, q) be the κ-th Alg-edge added at time τ , such that e is non-final. Let P = (a1 , a2 , . . . , a` ) be the (κ − 1)-step maximal alternating path ending at p = a1 . Then, waitτ (p) ≤ max{α−1 , β/(β − 1)} · cost(P ). Proof. First we lower-bound the cost of an alternating path P . We look at any edge (ai , ai+1 ) from P . Its cost (no matter whether paid by Alg or Opt) is certainly larger than dist(ai , ai+1 ) + |atime(ai ) − atime(ai+1 )|. Therefore, using triangle inequality (on distances and times), we obtain cost(P ) ≥ `−1 X (dist(ai , ai+1 ) + |atime(ai ) − atime(ai+1 )|) i=1 ≥ dist(a1 , a` ) + |atime(a1 ) − atime(a` )| . (1) Therefore, in our proof we will simply bound waitτ (p) = waitτ (a1 ) using either dist(a1 , a` ) or |atime(a1 ) − atime(a` )|. Recall that Alg matches a1 at time τ . Consider the state of a` at time τ . If a` has not been presented to Alg yet (atime(a` ) > τ ), then waitτ (a1 ) = τ − atime(a1 ) < atime(a` ) − atime(a1 ) < β/(β − 1) · (atime(a` ) − atime(a1 )), and the lemma follows. In the remaining part of the proof, we assume that a` was already presented to the algorithm (atime(a` ) ≤ τ ). As P is a (κ−1)-step maximal alternating path, a` is not matched by Alg right after Alg creates (κ − 1)-th matching edge. The earliest time when a` may become matched is when Alg creates the next, κ-th matching edge, i.e., at time τ . Therefore a` is not matched before time τ . Now observe that there must be a reason for which requests a1 and a` have not been matched with each other before time τ . Roughly speaking, either the sum of budgets of requests a1 and a` does not suffice to cover the cost of dist(a1 , a` ) or one of them waits significantly longer than the other. Formally, we apply Observation 1 to pair (a1 , a` ) obtaining three possible cases. In each of the cases we bound waitτ (a1 ) appropriately. M. Bienkowski, A. Kraska and P. Schmidt A:7 Case 1 (insufficient budgets). If α · (waitτ (a1 ) + waitτ (a` )) ≤ dist(a1 , a` ), then by nonnegativity of waitτ (a` ), it follows that waitτ (a1 ) ≤ α−1 · dist(a1 , a` ). Case 2 (a1 waited much longer than a` ). If α · (waitτ (a1 ) + waitτ (a` )) > dist(a1 , a` ) and waitτ (a1 ) ≥ β · waitτ (a` ), then atime(a` ) − atime(a1 ) = waitτ (a1 ) − waitτ (a` ) ≥ (1 − 1/β) · waitτ (a1 ). Therefore, waitτ (a1 ) ≤ β/(β − 1) · |atime(a1 ) − atime(a` )|. Case 3 (a` waited much longer than a1 ). If α · (waitτ (a1 ) + waitτ (a` )) > dist(a1 , a` ) and waitτ (a` ) ≥ β · waitτ (a1 ), then atime(a1 ) − atime(a` ) = waitτ (a` ) − waitτ (a1 ) ≥ (β − 1) · waitτ (a1 ). Thus, waitτ (a1 ) ≤ 1/(β − 1) · |atime(a1 ) − atime(a` )| < β/(β − 1) · |atime(a1 ) − atime(a` )|. J I Lemma 3. Let e = (p, q) be the κ-th Alg-edge, such that e is non-final. Let P = (a1 , a2 , . . . , a` ) and Q = (b1 , b2 , . . . , b`0 ) be the (κ − 1)-step maximal alternating path ending at p = a1 and q = b1 , respectively. Then, costALG (e) ≤ (1 + α) · (β + 1) · max{α−1 , β/(β − 1)} · min{cost(P ), cost(Q)} . Proof. Let τ be the time when p is matched with q by Alg. Using the definition of costALG , we obtain costALG (p, q) = dist(p, q) + waitτ (p) + waitτ (q) ≤ budgetτ (p) + budgetτ (q) + waitτ (p) + waitτ (q) = (1 + α) · (waitτ (p) + waitτ (q)) ≤ (1 + α) · (β + 1) · min{waitτ (p), waitτ (q)} . (2) The first inequality follows by the budget sufficiency condition of Alg and the second one by the budget balance condition. By Lemma 2, waitτ (p) ≤ max{α−1 , β/(β − 1)} · cost(P ) and waitτ (q) ≤ max{α−1 , β/(β − 1)} · cost(Q), which combined with (2) immediately yield the lemma. J Recall now the iterative construction of forest F from Section 3.1: whenever a non-final matching edge e created by Alg joins two alternating paths P and Q, we add a new node w to F , such that weight(w) = costALG (e) and make trees T (P ) and T (Q) its children. These trees correspond to paths P and Q, and satisfy weight(T (P )) = cost(P ) and weight(T (Q)) = cost(Q). Therefore, Lemma 3 immediately implies the following equivalent relation on tree weights. I Corollary 4. Let w be an internal node of the forest F whose children are u and v. Then, weight(w) ≤ (1 + α) · (β + 1) · max{α−1 , β/(β − 1)} · min{weight(Tu ), weight(Tv )}. This relation can be used to express the total weight of a tree of F in terms of the total weight of its leaves. The proof of the following technical lemma is deferred to Section 4. Here, we present how to use it to bound the cost of Alg on non-final edges of a single alternating cycle. I Lemma 5. Let T be a weighted full binary tree and ξ ≥ 0 be any constant. Assume that for each internal node w with children u and v, their weights satisfy weight(w) ≤ ξ · min{weight(Tu ), weight(Tv )}. Then, weight(T ) ≤ (ξ + 2) · |L(T )|log2 (ξ/2+1) · weight(L(T )) , where L(T ) is the set of leaves of T and weight(L(T )) is their total weight. A:8 A Match in Time Saves Nine: Deterministic Online Matching With Delays I Lemma 6. Let C be an alternating cycle obtained from combining matchings of Alg and Opt. Then costALG−NF (C) ≤ (ξ + 2) · mlog2 (ξ/2+1) · costOPT (C), where ξ = (1 + α) · (β + 1) · max{α−1 , β/(β − 1)}. Proof. As described in Section 3.1, C is associated with a tree T from forest F , such that Opt-edges of C correspond to the set of leaves of T (denoted L(T )) and non-final Alg-edges of C correspond to internal (non-leaf) nodes of T . Hence, costOPT (C) = weight(L(T )) and costALG−NF (C) + costOPT (C) = weight(T ). By Corollary 4, the weight of any internal tree node w with children u, v satisfies weight(w) ≤ ξ · min{weight(Tu ), weight(Tv )}. Therefore, we may apply Lemma 5 to tree T , obtaining weight(T ) ≤ (ξ + 2) · |L(T )|log2 (ξ/2+1) · weight(L(T )), and thus costALG−NF (C) ≤ weight(T ) ≤ (ξ + 2) · |L(T )|log2 (ξ/2+1) · weight(L(T )) ≤ (ξ + 2) · mlog2 (ξ/2+1) · weight(L(T )) = (ξ + 2) · mlog2 (ξ/2+1) · costOPT (C) . The last inequality follows as |L(T )|, the number of T leaves, is equal to the number of Opt-edges on cycle C, which is clearly at most m. J 3.4 Cost of final ALG-edges In the previous section, we derived a bound on the cost of all non-final Alg-edges. The following lemma shows that the cost of final Alg-edges contribute at most a constant factor to the competitive ratio. I Lemma 7. Let e be a final Alg-edge matched at time τ and C be the alternating cycle containing e. Then costALG (e) ≤ (1 + α) · max{α−1 , (β + 1)/(β − 1)} · (costALG−NF (C) + costOPT (C)). Proof. Fix a final Alg-edge e = (p, q), where atime(q) ≥ atime(p). By the budget sufficiency condition of Alg, costALG (e) ≤ (1 + α) · (waitτ (p) + waitτ (q)) . (3) Our goal now is to bound waitτ (p) + waitτ (q) in terms of dist(p, q) or atime(q) − atime(p). Observe that whenever Alg matches two requests, the budget sufficiency condition of Alg or one of the inequalities of the budget balance condition is satisfied with equality. We apply this observation to pair (p, q). If the budget sufficiency condition holds with equality, α · (waitτ (p) + waitτ (q)) = dist(p, q), and therefore waitτ (p) + waitτ (q) = α−1 · dist(p, q). If the budget balance condition holds with equality, β · waitτ (q) = waitτ (p). Then, (β − 1) · (waitτ (p) + waitτ (q)) = (β − 1) · (β + 1) · waitτ (q) = (β + 1) · (waitτ (p) − waitτ (q)) = (β + 1) · (atime(q) − atime(p)) . Hence, in either case it holds that   β+1 waitτ (p) + waitτ (q) ≤ max α−1 , · (dist(p, q) + |atime(q) − atime(p)|) . β−1 (4) M. Bienkowski, A. Kraska and P. Schmidt A:9 Finally, we bound dist(p, q) + |atime(q) − atime(p)| in terms of costs of other edges of C. These edges form a path P = (a1 , a2 , . . . , a` ), where a1 = p and a` = q. By the triangle inequality applied to distances and time differences (in the same way as in (1)), we obtain that dist(p, q) + |atime(q) − atime(p)| ≤ cost(P ) = costALG−NF (C) + costOPT (C) . The lemma follows immediately by combining (3), (4) and (5). 3.5 (5) J The competitive ratio Finally, we optimize constants α and β used throughout the previous sections and bound the competitiveness of Alg. I Theorem 8. For β = 2 and α = 1/2, the competitive ratio of Alg is O(mlog2 5.5 ) = O(m2.46 ), where 2m is the number of requests in the input sequence. Proof. The union of matchings constructed by Alg and Opt can be split into a set C of disjoint cycles. It is sufficient to show that we have the desired performance guarantee on each cycle from C. Fix a cycle C ∈ C. Let e = (p, q) be the final Alg-edge of C. By Lemma 7, costALG (e) ≤ 4.5 · (costALG−NF (C) + costOPT (C)). Therefore, the competitive ratio of Alg is at most costALG (C) 5.5 · costALG−NF (C) + 4.5 · costOPT (C) ≤ ≤ O(mlog2 5.5 ) = O(m2.46 ) , costOPT (C) costOPT (C) where the second inequality follows by Lemma 6. 4 J Relating weights in trees (proof of Lemma 5) We start with the following technical claim that will facilitate the inductive proof of Lemma 5. I Lemma 9. Fix any constant ξ ≥ 0 and let f (a) = alog2 (ξ+2) . Then, ξ · min{f (x), f (y)} + f (x) + f (y) ≤ f (x + y) for all x, y ≥ 0. Proof. Fix any z ≥ 0 and let gz (a) = (ξ + 1) · f (a) + f (z − a). We observe that gz (0) = f (z) and gz (z/2) = (ξ + 1) · f (z/2) + f (z/2) = (ξ + 2) · (z/2)log2 (ξ+2) = z log2 (ξ+2) = f (z). Moreover, the function gz is convex as it is a sum of two convex functions. As gz (0) = gz (z/2) = f (z), by convexity, gz (a) ≤ f (z) for any a ∈ [0, z/2]. To prove the lemma, assume without loss of generality that x ≤ y. By the monotonicity, f (x) ≤ f (y), and therefore ξ · min{f (x), f (y)} + f (x) + f (y) = (ξ + 1) · f (x) + f ((x + y) − x) = gx+y (x) ≤ f (x + y) . The last inequality follows as x ≤ (x + y)/2. J Proof of Lemma 5. We scale weights of all nodes, so that the average weight of each leaf is 1, i.e., we define a scaled weight function ws as ws(w) = weight(w) · |L(T )| . weight(L(T )) A:10 A Match in Time Saves Nine: Deterministic Online Matching With Delays Note that ws also satisfies ws(w) ≤ ξ · min{ws(Tu ), ws(Tv )}. Moreover, since we scaled all weighs in the very same way, ws(T )/ws(L(T )) = weight(T )/weight(L(T )), and hence to show the lemma, it suffices to bound the term ws(T )/ws(L(T )). For any node w ∈ T and the corresponding subtree Tw rooted at w, we define size(Tw ) = ws(L(Tw )) + |L(Tw )|. We inductively show that for any node of w ∈ T , it holds that ws(Tw ) ≤ size(Tw )log2 (ξ+2) . (6) For the induction basis, assume that w is a leaf of T . Then, ws(Tw ) = ws(L(Tw )) ≤ size(Tw ) ≤ size(Tw )log2 (ξ+2) , where the last inequality follows as size(Tw ) ≥ |L(Tw )| = 1 and ξ > 0. For the inductive step, let w be a non-leaf node of T and let u and v be its children. Then, ws(Tw ) = ws(Tu ) + ws(Tv ) + ws(w) ≤ ws(Tu ) + ws(Tv ) + ξ · min { ws(Tu ), ws(Tv ) } ≤ size(Tu )log2 (ξ+2) + size(Tv )log2 (ξ+2) + ξ · min{size(Tu )log2 (ξ+2) , size(Tv )log2 (ξ+2) } ≤ (size(Tu ) + size(Tv ))log2 (ξ+2) = size(Tw )log2 (ξ+2) . The first inequality follows by the lemma assumption and the second one by the inductive assumptions for Tu and Tv . The last inequality is a consequence of Lemma 9 and the final equality follows by the additivity of function size. Recall that we scaled weights so that ws(L(T )) = |L(T )|. Therefore, applying (6) to the whole tree T yields ws(T ) ≤ (ws(L(T )) + |L(T )|)log2 (ξ+2) = (2 · |L(T )|)log2 (ξ+2) = (ξ + 2) · |L(T )|log2 (ξ+2) . Hence, ws(T ) (ξ + 2) · |L(T )|log2 (ξ+2) weight(T ) = ≤ = (ξ + 2) · |L(T )|log2 (ξ/2+1) , weight(L(T )) ws(L(T )) |L(T )| which concludes the proof. 5 J Conclusions We showed a deterministic algorithm Alg for the MPMD problem whose competitive ratio is O(mlog2 5.5 ). The currently best lower bound (holding even for randomized solutions) is Ω(log n/ log log n) [3]. A natural research direction would be to narrow this gap. It is not known whether the analysis of our algorithm is tight. However, one can show that its competitive ratio is at least Ω(mlog2 1.5 ) = Ω(m0.58 ). To this end, assume that all requests arrive at the same time. For such input, Opt does not pay for delays and simply returns the min-cost perfect matching. On the other hand, Alg computes the same matching as a greedy routine (i.e., it greedily connects two nearest, not yet matched requests). Hence, even if we neglect the delay costs of Alg, its competitive ratio would be at least the approximation ratio of the greedy algorithm for min-cost perfect matching. The latter was shown to be Θ(mlog2 1.5 ) by Reingold and Tarjan [40]. The reasoning above indicates an inherent difficulty of the problem. In order to beat the Ω(mlog2 1.5 ) barrier, an online algorithm has to handle settings when all requests are given simultaneously more effectively. In particular, for such and similar input instances it has to employ a non-local and non-greedy policy of choosing requests to match. M. Bienkowski, A. Kraska and P. Schmidt References 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Susanne Albers and Helge Bals. Dynamic TCP acknowledgment: Penalizing long delays. SIAM Journal on Discrete Mathematics, 19(4):938–951, 2005. Antonios Antoniadis, Neal Barcelo, Michael Nugent, Kirk Pruhs, and Michele Scquizzato. A o(n)-competitive deterministic algorithm for online matching on a line. In Proc. 12th Workshop on Approximation and Online Algorithms (WAOA), pages 11–22, 2014. Itai Ashlagi, Yossi Azar, Moses Charikar, Ashish Chiplunkar, Ofir Geri, Haim Kaplan, Rahul Makhijani, Yuyi Wang, and Roger Wattenhofer. Min-cost bipartite perfect matching with delays. 2017. URL: https://web.stanford.edu/~iashlagi/papers/mbpmd.pdf. Yossi Azar, Ashish Chiplunkar, and Haim Kaplan. Polylogarithmic bounds on the competitiveness of min-cost (bipartite) perfect matching with delays. 2016. URL: https: //arxiv.org/abs/1610.05155. Yossi Azar, Ashish Chiplunkar, and Haim Kaplan. Polylogarithmic bounds on the competitiveness of min-cost perfect matching with delays. In Proc. 28th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 1051–1061, 2017. Yossi Azar, Amir Epstein, Łukasz Jeż, and Adi Vardi. Make-to-order integrated scheduling and distribution. In Proc. 27th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 140–154, 2016. Nikhil Bansal, Niv Buchbinder, Anupam Gupta, and Joseph Naor. A randomized O(log2 k)competitive algorithm for metric bipartite matching. Algorithmica, 68(2):390–403, 2014. Nikhil Bansal, Niv Buchbinder, Aleksander Mądry, and Joseph Naor. A polylogarithmiccompetitive algorithm for the k-server problem. Journal of the ACM, 62(5):40:1–40:49, 2015. Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarczný, Łukasz Jeż, Jiří Sgall, Nguyen Kim Thang, and Pavel Veselý. Online algorithms for multi-level aggregation. In Proc. 24th European Symp. on Algorithms (ESA), pages 12:1–12:17, 2016. Marcin Bienkowski, Jaroslaw Byrka, Marek Chrobak, Lukasz Jeż, Dorian Nogneng, and Jirí Sgall. Better approximation bounds for the joint replenishment problem. In Proc. 25th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 42–54, 2014. Marcin Bienkowski, Jaroslaw Byrka, Marek Chrobak, Łukasz Jeż, Jiři Sgall, and Grzegorz Stachowiak. Online control message aggregation in chain networks. In Proc. 13th Algorithms and Data Structures Symposium (WADS), pages 133–145, 2013. Benjamin Birnbaum and Claire Mathieu. On-line bipartite matching made simple. SIGACT News, 39(1):80–87, 2008. Allan Borodin and Ran El-Yaniv. Online Computation and Competitive Analysis. Cambridge University Press, 1998. Carlos Brito, Elias Koutsoupias, and Shailesh Vaya. Competitive analysis of organization networks or multicast acknowledgement: How much to wait? Algorithmica, 64(4):584–605, 2012. Niv Buchbinder, Moran Feldman, Joseph (Seffi) Naor, and Ohad Talmon. O(depth)competitive algorithm for online multi-level aggregation. In Proc. 28th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 1235–1244, 2017. Niv Buchbinder, Kamal Jain, and Joseph Naor. Online primal-dual algorithms for maximizing ad-auctions revenue. In Proc. 15th European Symp. on Algorithms (ESA), pages 253–264, 2007. Niv Buchbinder, Tracy Kimbrel, Retsef Levi, Konstantin Makarychev, and Maxim Sviridenko. Online make-to-order joint replenishment model: primal dual competitive algorithms. In Proc. 19th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 952–961, 2008. A:11 A:12 A Match in Time Saves Nine: Deterministic Online Matching With Delays 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 Marek Chrobak. Online aggregation problems. SIGACT News, 45(1):91–102, 2014. Nikhil R. Devanur and Kamal Jain. Online matching with concave returns. In Proc. 44th ACM Symp. on Theory of Computing (STOC), pages 137–144, 2012. Nikhil R. Devanur, Kamal Jain, and Robert D. Kleinberg. Randomized primal-dual analysis of RANKING for online bipartite matching. In Proc. 24th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 101–107, 2013. Daniel R. Dooly, Sally A. Goldman, and Stephen D. Scott. On-line analysis of the TCP acknowledgment delay problem. Journal of the ACM, 48(2):243–273, 2001. Yuval Emek, Shay Kutten, and Roger Wattenhofer. Online matching: haste makes waste! In Proc. 48th ACM Symp. on Theory of Computing (STOC), pages 333–344, 2016. Yuval Emek, Yaacov Shapiro, and Yuyi Wang. Minimum cost perfect matching with delays for two sources. In Proc. 10th Int. Conf. on Algorithms and Complexity (CIAC), 2017. To appear. Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. Journal of Computer and System Sciences, 69(3):485–497, 2004. Bernhard Fuchs, Winfried Hochstättler, and Walter Kern. Online matching on a line. Theoretical Computer Science, 332(1–3):251–264, 2005. Anupam Gupta and Kevin Lewi. The online metric matching problem for doubling metrics. In Proc. 39th Int. Colloq. on Automata, Languages and Programming (ICALP), pages 424– 435, 2012. Bala Kalyanasundaram and Kirk Pruhs. Online weighted matching. Journal of Algorithms, 14(3):478–488, 1993. Anna R. Karlin, Claire Kenyon, and Dana Randall. Dynamic TCP acknowledgement and other stories about e/(e - 1). Algorithmica, 36(3):209–224, 2003. Anna R. Karlin, Mark S. Manasse, Lyle A. McGeoch, and Susan Owicki. Competitive randomized algorithms for non-uniform problems. Algorithmica, 11(6):542–571, 1994. Richard M. Karp, Umesh V. Vazirani, and Vijay V. Vazirani. An optimal algorithm for on-line bipartite matching. In Proc. 22nd ACM Symp. on Theory of Computing (STOC), pages 352–358, 1990. Sanjeev Khanna, Joseph Naor, and Danny Raz. Control message aggregation in group communication protocols. In Proc. 29th Int. Colloq. on Automata, Languages and Programming (ICALP), pages 135–146, 2002. Samir Khuller, Stephen G. Mitchell, and Vijay V. Vazirani. On-line algorithms for weighted bipartite matching and stable marriages. Theoretical Computer Science, 127(2):255–267, 1994. Elias Koutsoupias and Akash Nanavati. The online matching problem on a line. In Proc. 1st Workshop on Approximation and Online Algorithms (WAOA), pages 179–191, 2003. Mohammad Mahdian and Qiqi Yan. Online bipartite matching with random arrivals: an approach based on strongly factor-revealing LPs. In Proc. 43rd ACM Symp. on Theory of Computing (STOC), pages 597–606, 2011. Aranyak Mehta. Online matching and ad allocation. Foundations and Trends in Theoretical Computer Science, 8(4):265–368, 2013. Aranyak Mehta, Amin Saberi, Umesh V. Vazirani, and Vijay V. Vazirani. Adwords and generalized online matching. Journal of the ACM, 54(5), 2007. Adam Meyerson, Akash Nanavati, and Laura J. Poplawski. Randomized online algorithms for minimum metric bipartite matching. In Proc. 7th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 954–959, 2006. Joseph Naor and David Wajc. Near-optimum online ad allocation for targeted advertising. In Proc. 16th ACM Conf. on Economics and Computation (EC), pages 131–148, 2015. M. Bienkowski, A. Kraska and P. Schmidt 39 40 Yvonne Anne Pignolet, Stefan Schmid, and Roger Wattenhofer. Tight bounds for delaysensitive aggregation. Discrete Mathematics & Theoretical Computer Science, 12(1):39–58, 2010. Edward M. Reingold and Robert Endre Tarjan. On a greedy heuristic for complete matching. SIAM Journal on Computing, 10(4):676–681, 1981. A:13
8cs.DS
1 Matched Metrics to the Binary Asymmetric Channels arXiv:1606.09494v2 [cs.IT] 17 Mar 2018 Claudio M. Qureshi Abstract In this paper we establish some criteria to decide when a discrete memoryless channel admits a metric in such a way that the maximum likelihood decoding coincides with the nearest neighbor decoding. In particular we prove a conjecture presented by M. Firer and J. L. Walker establishing that every binary asymmetric channel admits a matched metric. Index Terms Binary asymmetric channel, channel model, maximum likelihood decoding I. I NTRODUCTION As it is well known, maximum likelihood decoding (MLD) over a symmetric channel coincides with nearest neighbor decoding (NND) with respect to the Hamming metric. In this paper we deal with the problem of matching a metric to a given channel regarding the decoding criteria mentioned above. This problem was considered in 1967 by J. L. Massey [2] where a metric matched to a discrete memoryless channel is defined as a metric for which the NND is a MLD. Since then, this type of matching have been studied in some special cases. For instance, certain channels matching to the Lee metric were obtained in [1]. The problem of matching a metric to a channel was taken up by G. Séguin [3], where the main focus was on sequences of additive metrics. In the referred paper it is used a stronger condition also assumed here: a metric matched to a channel is one for which not only the NND is a MLD but also the MLD is a NND. The The author was supported by CNPq (grant 150270/2016-0) and FAPESP (grants 2015/26420-1 and 2013/25977-7) and is with the Institute of Mathematics, Statistics and Computing Science of the University of Campinas, SP , Brazil (email: [email protected]). Digital Object Identifier: 10.1109/TIT.2016.xxxxxxx March 20, 2018 DRAFT 2 author obtains necessary and sufficient conditions for the existence of additive metrics matched to a channel and raises the question of what happens if the restriction of additivity of the metric is removed. There was no significant progress until the paper [4] by M. Firer and J. Walker, where the authors proved, among other results, the existence of a metric (not necessarily additive) matched to the Z-channels and to the n-fold binary asymmetric channel (BAC) for n = 2, 3, and conjectured that this is also true for n > 3. Some recent progress in this direction was obtained in [5] where it is presented an algorithm to decide if a channel is metrizable and in that case return a metric matched to the channel, and in [6] where the author proved that the BAC channels are metrizable in the weaker sense of J. L. Massey in [2]. The main results of this paper are Theorem 1, which establishes a necessary and sufficient condition for metrizability of a channel in terms of graph theory, and Theorem 2 which establishes that the BAC channels are metrizable. Other contributions are the association of channels with graphs (which allows the use of techniques from graph theory to approach problems related to channels) and the introduction of a new structure: the colored posets, which may also be useful in other contexts. This work is organized as follows: In Section II we give a brief review of definitions and concepts needed in the development of the paper. In Section III we associate a graph with a channel and discuss some results of [4] and [6] in terms of this graph. In Section IV we introduce the concept of colored poset which is used to describe an algorithm for constructing a metric matched to a channel whenever it is metrizable. A necessary and sufficient criterion for metrizability of a channel is also derived. In Section V this criterion is used to prove that the BAC channels are metrizable. In Section VI we introduce the concept of order of metrizability of a channel and settle some problems related to this. II. P RELIMINARIES We summarize here some concepts and results to be used in the following sections. A discrete memoryless channel (simply referred as channel in this paper) W : X → X is characterized by its transition matrix related to the input and output alphabet X = {x1, x2, . . . , xN }. This matrix [W] ∈ M N×N (R) is given by [W]i j = PrW (xi |x j ), the probability of receiving xi if x j was sent. When the channel is understood, this conditional probability is denoted by Pr(xi |x j ). Matrices associated with channels are characterized by the property that every entry is nonnegative and the sum of the entries in each column is one. March 20, 2018 DRAFT 3 A channel W : X → X is metrizable (in the strong sense of [4] and [3]) if there is a metric d : X × X → [0, ∞) (i.e. d is a definite-positive symmetric function satisfying the triangle inequality) such that every nearest neighbor decoder is a maximum likelihood decoder and vice versa. This is also equivalent to each of the following statements: i) For all x ∈ X and every code C ⊆ X we have arg max Pr(x|y) = arg min d(x, y), y∈C y∈C where both arg max and arg min are interpreted as returning lists of size at least 1. ii) For all x, y, z ∈ X the following condition holds: Pr(x|y) ≤ Pr(x|z) ⇔ d(x, y) ≥ d(x, z). In this paper we only deal with reasonable channels (in the sense of [4]), that is, channels W : X → X such that Pr(x|x) > Pr(x|y), ∀x, y ∈ X with y , x, (1) which is a necessary condition for a channel to be metrizable. Let W : X → X be a channel, X (2) = {A ⊆ X : #A = 2} be the family of 2-subsets of X and h : X (2) → [0, +∞) be a non-zero function. We say that h is coherent-with-W if Pr(x|y) ≤ Pr(x|z) ⇔ h({x, y}) ≤ h({x, z}), for all x, y, z ∈ X with x , y and x , z. If such a function exists, we can construct a metric matched to the channel as follows. Proposition 1. Let W : X → X be a channel and h : X (2) → [0, +∞) be a coherent-with-W function with maximum value m = max{h(x) : x ∈ X (2) }. The function d : X × X → [0, +∞) given by:    2m − h ({x, y}) if x , y,  d(x, y) =   0 if x = y,  is a metric matched to the channel W. (2) Proof. To prove that d is positive-definite, we note that d(x, y) = 2m − h({x, y}) ≥ m > 0. The function d is clearly symmetric since {x, y} = {y, x}. To prove triangle inequality, we consider x, y, z ∈ X pairwise distinct and note that d(x, y) + d(y, z) = 4m − h({x, y}) − h({y, z}) ≥ 2m ≥ 2m − h({x, z}) = d(x, z). Therefore d is a metric. This metric matches to the channel W because March 20, 2018 DRAFT 4 it is reasonable and for x, y, z ∈ X pairwise distinct we have Pr(x|y) ≤ Pr(x|z) ⇔ h({x, y}) ≤ h({x, z}) ⇔ d(x, y) ≥ d(x, z), where the first equivalence is because h is coherent-with-W and  the second by the definition of d. The binary (1-fold) asymmetric channel with parameters (p, q) ∈ [0, 1]2 (denoted by BAC 1 (p, q)) is the channel with input and output alphabet Z2 = {0, 1} and conditional probabilities Pr1 (1|0) = p and Pr1 (0|1) = q (and Pr1 (0|0) = 1 − p and Pr1 (1|1) = 1 − q). The n-fold binary asymmetric channel BAC n (p, q) is the channel with input and output alphabet X = Z2n and for x = (x1, . . . , xn ) and y = (y1, . . . , yn ) in Z2n the conditional probabilities are given by Pr(x|y) = n Ö Pr1 (xi |yi ). i=1 We remark that the channel BAC n (p, q) verifies condition (1) if and only if p+q < 1 (therefore only this case will be considered in this paper). Indeed, for n = 1 it is obvious and for n > 1 it is a direct consequence of Equation (4) in Section V. The metrizability of BAC n (p, q) was established in [4] for the case pq = 0 and n arbitrary (the n-fold Z-channel) and for p + q < 1 and n = 2, 3. The remaining case is when p + q < 1 and pq > 0. For this case, we prove that the corresponding channels are metrizable in Theorem 2. A partially ordered set (or poset) is a pair (P, ≤) where ≤ is a partial order relation (i.e. it is reflexive, antisymmetric and transitive). The poset is denoted by P when the order relation is understood. Each poset is associated with a Hasse diagram, which is a representation of the poset in such a way that if x < y the element y is above x, and there is a segment connecting these points whenever there is no z ∈ P with x < z < y. A directed graph (or digraph) G is determined by a pair (V, E) where V is a set, called the vertex set, and E ⊆ V × V is the edge set. When (v, w) ∈ E we say that the edge v → w belongs to G. A path in G of length r ≥ 0 is a finite sequence of vertices c = (v0, . . . , vr ) such that vi → vi+1 belongs to G for 0 ≤ i < r. If c0 = (w0, . . . , ws ) is other path in G with w0 = vr , the path c ∗c0 := (v0, . . . , vr = w0, w1, . . . , ws ) is also in G and it is called the concatenation of c and c0. The reverse path of c is c = (vr , . . . , v0 ), which is not necessarily a path in G. When r ≥ 1 and v0 = vr , the path c = (v0, . . . , vr ) is called a directed cycle. A digraph without directed cycles is called acyclic. From a directed acyclic graph G = (V, E) we have a natural poset structure on V defining x ≤ y if there is a (directed) path (of length r ≥ 0) from x to y. When we refer to the Hasse diagram of a directed acyclic graph G we mean the Hasse diagram of their associated poset. March 20, 2018 DRAFT 5 III. T HE GRAPH G1 ASSOCIATED WITH A CHANNEL We associate with each channel (given by its transition matrix) a graph which plays an important role in the proof of the metrization of the BAC channel. Definition 1. Let W : X → X be a channel. The digraph G1 (W) has vertex set X (2) , the family of 2-subsets of X, and directed edges linking {i, j} to {i, k} when Pr(i| j) < Pr(i|k). Example 1. Let W : X → X be a channel with X = {a, b, c, d} and transition matrix © ­ ­ ­ [W] = ­ ­ ­ ­ « 0.4 0.3 0.1 0.2 ª ® 0.1 0.2 0.1 0.1 ®® ®. 0.2 0.1 0.3 0.1 ®® ® 0.3 0.4 0.5 0.6 ¬ Denoting by x y the set {x, y}, the vertex set of G1 (W) is X (2) = {ab, ac, ad, bc, bd, cd}. To determine the edges we have to compare the conditional probabilities in each row of [W] (without taking into account the main diagonal). The first row gives us the following information: Pr(a|c) < Pr(a|d) < Pr(a|b) so, we obtain the following edges: ac → ad, ac → ab and ad → ab. Looking at the second row we have no inequalities among Pr(b|a), Pr(b|c) and Pr(b|d) so, there are no new edges among the vertices ab, bc and bd. The third row gives us the inequalities: Pr(c|b) < Pr(c|a) and Pr(c|d) < Pr(c|a) which generate the following new edges bc → ac and cd → ac. Finally, from the fourth row we obtain the inequalities: Pr(d|a) < Pr(d|b) < Pr(d|c) from which we have the new edges ad → bd, ad → cd and bd → cd. Thus, the graph G1 (W) has 8 edges and it is represented in Figure 1. Fig. 1. The digraph G1 (W) associated with the channel W of Example 1. March 20, 2018 DRAFT 6 A sufficient condition to guarantee the non-existence of a metric matched to a given channel W is given in Proposition 5 of [4]. This condition states that if the channel W : X → X admits a decision chain of length r ≥ 3 it is not metrizable. A decision chain of length r is a sequence x0, x1, . . . , xr−1 ∈ X verifying Pr(xi |xi−1 ) < Pr(xi |xi+1 ) for i : 0 ≤ i < r, where the indices are taken modulo r (we note that the definition given in [4] in terms of t-decision region is equivalent to the one given here). Proposition 5 of the referred paper can be rewritten, in terms of the graph G1 (W), as follows. Proposition 2. If a channel W is metrizable, then its associated graph G1 (W) is acyclic. The following example shows that the converse is false. Example 2. Consider the channel W : X → X where X = {0, 1, 2} with transition matrix 1/4 1/4 © 1/2 ­ [W] = ­­ 15/36 25/36 5/9 ­ 1/12 1/18 7/36 « In this case the graph G1 (W) has three vertices and only ª ® ®. ® ® ¬ two edges: {0, 1} → {1, 2} and {1, 2} → {0, 2} therefore it is acyclic. However a metric compatible with W should verify d(0, 1) = d(0, 2) = d(2, 0) < d(2, 1) = d(1, 2) < d(1, 0) = d(0, 1) which is impossible, therefore W is not metrizable. Definition 2. Let W be a channel. The graph G1 (W) is transitive if for every path (v0, v1 . . . , vr−1 ) with #(v0 ∩ vr−1 ) = 1, the edge v0 → vr−1 belongs to G1 (W). It is easy to see that if G1 (W) is transitive, then it is acyclic. The converse is false (the same channel of Example 2 provides a counterexample). Proposition 2 can be strengthened as follows. Proposition 3. If a channel W is metrizable, then its associated graph G1 (W) is transitive. This proposition has straightforward verification (it can also be obtained as a particular case of Theorem 1 in Section V). Since every directed acyclic graph can be associated with a poset (in the way mentioned at the end of Section II), we can associate a poset with a channel whenever its associated graph is acyclic. The transitivity of the graph G1 (W) means that if v < w and v ∩ w , ∅, then v → w is and edge of G1 (W). March 20, 2018 DRAFT 7 Let W : X → X be a channel. In terms of the conditional probabilities of W, the condition for the graph G1 (W) to be transitive can be written as follows: G1 (W) is transitive if and only if every sequence x0, x1, . . . , xr−1 ∈ X (r ≥ 3) satisfying xi , xi+1 , x0 , xr−1 and Pr(xi |xi−1 ) < Pr(xi |xi+1 ) for 0 ≤ i ≤ r − 2 (indices taken modulo r) also satisfies Pr(xr−1 |x0 ) < Pr(xr−1 |xr−2 ). This is exactly the condition proposed in [6] to guarantee the existence of a metric d such that arg max PrW (x|y) ⊇ arg min d(x, y), y∈C y∈C (3) for all C ⊆ X and x ∈ X (interpreting both arg max and arg min as returning list of size at least 1). Using this condition the author also proves that the BAC channels admit a metric verifying (3). The reciprocal of Proposition 3 is also false (in other words it is not possible to prove equality in equation (3) under the hypothesis of transitivity). Example 3. Let W : X → X be the channel with alphabet X = {0, 1, 2, 3} and matrix transition © 0.44 0.22 ­ ­ 0.26 0.52 ­ [W] = ­ ­ 0.12 0.08 ­ ­ 0.18 0.18 « The graph G1 (W) is transitive. This graph and its 0.22 0.11 ª ® 0.26 0.13 ®® ®. 0.16 0.04 ®® ® 0.36 0.72 ¬ Hasse diagram is showed in Figure 2. Every compatible metric should verify d(2, 1) > d(2, 0) = d(0, 2) = d(0, 1) = d(1, 0) = d(1, 2) = d(2, 1) which is impossible, then W is not metrizable. Fig. 2. The transitive graph G1 (W) of Example 3 (left) and its Hasse diagram (right). March 20, 2018 DRAFT 8 IV. C OLORED POSETS AND A NECESSARY AND SUFFICIENT CONDITION FOR THE CHANNEL TO BE METRIZABLE Let P be a poset. A chain of length r ≥ 0 in P is a finite sequence (x0, . . . , xr ) such that xi < xi+1 for 0 ≤ i < r. The height function relates to each element of a poset P, the maximum possible length of a chain ending in such element. In this paper we refer to this function as the standard height of P and we call height function to any function h : P → N verifying h(x) < h(y) whenever x < y. A subset X ⊆ P is called horizontal (with respect to h) when the restriction of h to X is constant. We say that a height is complete when its image is of the form [k] = {0, 1, . . . , k − 1} for some k ∈ Z+ . To each height function h we can associate a Hasse diagram such that y is above x if and only if h(y) > h(x). This association establishes a bijection between complete heights and Hasse diagrams (in the sense that we can recover the height from its Hasse diagram). As remarked in the previous section, when the graph G1 (W) associated with a channel W : X → X is acyclic, we can associate with it a poset P = P(W) on the set X (2) . The standard height verifies h({x, y}) < h({x, z}) whenever Pr(x|y) < Pr(x|z) and from this, assuming the channel is reasonable (i.e. it verifies (1)), we can construct a metric as in Proposition 1, verifying d(x, y) > d(x, z) whenever Pr(x|y) < Pr(x|z). In particular this metric verifies (3) and will be weakly metrizable in the sense of [6]. But this metric does not necessarily will match with the channel, since the poset structure of W (when G1 (W) is transitive) does not give information about when two 2-subsets {x, y} and {x, z} verify Pr(x|y) = Pr(x|z) or not, except when they are connected in G1 (W). We need a more general structure to manage also with these cases. Let P be a poset. A coloration for P is any function c : P → C (C is a finite set) verifying that c(x) , c(y) if x < y. A subset X ⊆ P is monochromatic (with respect to c) if the restriction of c to X is constant. In particular every monochromatic set is an antichain of P. A colored cycle is a sequence (x0, x1, . . . , xr ) in P verifying that x0 = xr and xi < xi+1 if c(xi ) , c(xi+1 ) for 0 ≤ i < r. Trivial examples of colored cycles are of the form (x0, x1, . . . , xr ) with x0 = xr and c(x0 ) = c(x1 ) = · · · = c(xr ), we call these cycles monochromatic. Definition 3. A colored poset is a pair (P, c) where P is a poset and c a coloration for P such that every colored cycle in P is monochromatic. March 20, 2018 DRAFT 9 Example 4. Consider P = {2, 3, 6, 8, 12, 16} with the divisibility relation (i.e. x ≤ y if x divides y). Let c1 and c2 be the colorations for P given by c1 (2) = c1 (3) = ’blue’, c1 (8) = c1 (6) = ’red’, c1 (12) = c1 (16) = ’black’ and c2 (2) = c2 (3) = ’blue’, c2 (8) = c2 (12) = ’red’, c2 (6) = c2 (16) = ’black’. Then, (P, c1 ) is a colored poset but (P, c2 ) is not, because it contains the non-monochromatic cycle (8, 16, 6, 12, 8) (see Figure 3). Fig. 3. Two different colorations for the divisibility poset P = {2, 3, 6, 8, 12, 16}; the first corresponds to a colored poset (left) and the second one does not (right). Let P be a poset, c : P → C be a coloration for P and G P be the digraph associated with P (i.e. its vertex set is P and x → y belongs to G P if x < y). We remark that a colored cycle is not necessarily a cycle in G P , however colored cycles have a nice interpretation in term of graphs. Namely, if G P (c) denotes the digraph obtained from G P adding the edges x → y with c(x) = c(y), the colored cycles of P (with respect to c) correspond to cycles of G P (c). A Hasse diagram for a colored poset (P, c) is a Hasse diagram for P with the additional property that if two points have the same color they are in the same level (i.e. no one is above or below the other). The next proposition guarantee the existence of a Hasse diagram for colored posets. Proposition 4. Let (P, c) be a colored poset. There exists a height function h for P such that every monochromatic subset of P is horizontal with respect to h. Proof. Let c : P → {c1, . . . , ck } be the coloration, Ai = c−1 (ci ) for 1 ≤ i ≤ k and P/c := {A1, . . . , Ak }. We note that P/c is a partition of P into monochromatic set, with c(Ai ) , c(A j ) if i , j and every monochromatic subset of P is contained in some Ai . Thus, it suffices to construct a height function h for P such that every Ai is horizontal. For X, Y ⊆ P we write X < Y if there March 20, 2018 DRAFT 10 exist x ∈ X and y ∈ Y such that x < y. We claim that it is possible to order the indices of the elements of P/c in such a way that if Ai < A j then i < j. Indeed, consider the digraph G whose vertex set is P/c and edges of the form Ai → A j with Ai < A j . This digraph is acyclic, because if there is a cycle c = (Ai0, . . . , Aik ) in G with k ≥ 1, then for each j = 1, . . . , k − 1 there are xi j ∈ A j and yi j+1 ∈ A j+1 with xi j < yi j+1 . Thus, the colored cycle (x0, y1, x1, y2, . . . , x k−1, y k , x0 ) is non-monochromatic (because x0 < y1 implies c(x0 ) , c(y1 )) which is a contradiction since (P, c) is a colored poset. If (P/c, 4) is the poset induced by the acyclic digraph G (i.e. Ai 4 A j if there is a path from Ai to A j in G), clearly Ai < A j implies Ai 4 A j . By extending this poset to a total order we have Ai1 4 Ai2 4 · · · 4 Aik where i1, i2, . . . , i k is a permutation of 1, 2, . . . , k. Thus we can assume that if Ai < A j then i < j (ordering indices if necessary). Next we define inductively an increasing sequence h1, h2, . . . , hκ of heights for P such that A j is horizontal with respect to hi if j ≤ i. We write x ≥ A for x ∈ P and A ∈ P/c when x ≥ a for some a ∈ A (otherwise we write x  A). We start considering the standard height h0 and t1 = max{h0 (x) : x ∈ A1 }. We define h1 as follows.    max{h0 (x) + t1 − h0 (a) : a ∈ A1, a ≤ x}, if x ≥ A1,  h1 (x) =   h0 (x), otherwise.  We claim that this function is a height function for P and h1 (A1 ) = {t1 } (in particular A1 is horizontal with respect to h1 ). Indeed, let x, y ∈ P with x > y. We consider three cases: (i) x > y ≥ A1 , (ii) x ≥ A1 and y A1 and (iii) x, y A1 . In the first case, since for every a ∈ A1 with a ≤ y we have a ≤ x and h0 (y) + t0 − h0 (a) < h0 (x) + t0 − h0 (a) ≤ h1 (x) for all a ∈ A1 with a ≤ y, then h1 (y) < h1 (x). In the second and third cases we have h1 (x) ≥ h0 (x) > h0 (y) = h1 (y). In all the cases we conclude that h1 (x) > h1 (y), thus h1 is a height for P. Moreover, if a ∈ A1 then a ≥ A1 , and since A1 is an antichain we have h1 (a) = h0 (x) + t1 − h0 (a) = t1 . Now we assume that there exists a height function hm for which A1, . . . , Am are horizontal (1 ≤ m < κ) and let tm+1 = max{hm (x) : x ∈ Am+1 }. We define: hm+1 (x) = max{hm (x) + tm+1 − hm (a) : a ∈ Am , a ≤ x} if x ≥ Am and hm+1 (x) = hm (x) otherwise. Using a similar argument to the case m = 1 (considering three cases) we can prove that hm+1 is a height function (i.e hm+1 (x) > hm+1 (y) whenever x > y). Since Am+1 is an antichain, then hm+1 (a) = tm+1 for all a ∈ Am+1 . Let x ∈ Ai for some i, 1 ≤ i ≤ m. We have x Am+1 because otherwise we would have Ai ≥ Am+1 with i < m + 1 which is a contradiction. Therefore hm+1 (a) = hm (a) which, by inductive hypothesis, March 20, 2018 DRAFT 11 does not depend on a ∈ Ai . In the last step (when m = k) we obtain a height function h k for which all the elements of P/c are horizontal. In particular, since every monochromatic subset is contained in some Ai , every monochromatic subset is horizontal with respect to h k .  Remark 1. Since the proof of Proposition 4 is constructive, it brings us an algorithm to construct a Hasse diagram for a colored poset (P, c). We start constructing the standard height function for P (first step) and after at most k steps we obtain a height function which induces a Hasse diagram for (P, c), where k is the number of colors. We say ’at most k steps’ instead of k steps because when Ai+1 is horizontal with respect to hi we have hi+1 = hi (this happens for example when Ai+1 has a unique element) and we can omit this step. Example 5. Consider the colored poset (P, c) where P = Z2 × Z3 with the order induced by 00 < 01 < 02, 10 < 11 < 12 and 10 < 01; and the coloration c : P → {R, B, G, D} given by e = {00, 11}, B e = {02, 12}, G e = {01} and D e = {10}, where X e := c−1 (X). The relation considered R e < G, eR e < B, eG e < B e at the beginning of the proof of Proposition 4 restricted to P/c is: R e < R, e which can be extended to the total order D e 4 R e4 G e 4 B. e Therefore defining and D e A2 = R, e A3 = G e and A4 = B, e we have that if Ai < A j then i < j. Figure 4 shows the A1 = D, different steps for the construction of a Hasse diagram for this colored poset. In the final stage we obtain the height function h4 : P → N given by h4 (10) = 0, h4 (00) = h4 (11) = 1, h4 (01) = 2 and h4 (02) = h4 (12) = 3. Fig. 4. The construction of a Hasse diagram for a colored poset. Our next goal is to associate with each channel W (under certain conditions) a colored poset and to construct a metric from a height function for its Hasse diagram. We start by introducing the graphs G(W) and G0 (W) associated with the channel W. March 20, 2018 DRAFT 12 Definition 4. Let W : X → X be a channel and X (2) be the family of 2-subsets of X. The digraph G(W) has vertex set X (2) and directed edges linking {x, y} to {x, z} if y , z and Pr(x|y) ≤ Pr(x|z). The graph G0 (W) is a non-directed graph whose vertex set is X (2) and two vertices {x, y} and {x, z} are connected by an edge in G0 (W) if y , z and Pr(x|y) = Pr(x|z). The graph G0 (W) can be identified with the subgraph of G(W) whose vertex set is X (2) and edges ν → ω and ω → ν for each edge {ν, ω} in G0 (W). By construction the graphs G0 (W) and G1 (W) have no common edges. We use this identification in this paper. Definition 5. A digraph G is cycle-reverter if for each cycle c = (v0, v1, . . . , vr−1, v0 ) in G, then the reverse cycle c = (v0, vr−1, . . . , v1, v0 ) is also in G We remark that if G(W) is cycle-reverter then the graph G1 (W) is transitive (the converse is false) and, in particular, acyclic. Lemma 1. Let W : X → X be a channel such that its associated graph G(W) is cycle-reverter and let A = {A1, . . . , Ak } be the set of connected components of G0 (W). Consider for P := X (2) the poset structure induced by the graph G1 (W) and the function c : P → A given by c(v) = A if v ∈ A. Then (P, c) is a colored poset. Proof. First we prove that c is a coloration for P. Let v, w ∈ P such that v < w, then there exists a path p1 = (v0 = v, v1, . . . , vr = w) (with r ≥ 1) in G1 (W). In particular v = {x, y} and v1 = {x, z} with Pr(x|y) < Pr(x|z). We suppose, to the contrary, that c(v) = c(w). Since v and w belong to the same connected component in G0 (W) there is a path p2 from w to v in G0 (W). Since G(W) is cycle-reverter, the reverse of the cycle p1 ∗ p2 is also in G(W). In particular the arrow v1 → v is in G(W) and then Pr(x|z) ≥ Pr(y|z), which is a contradiction. Now we prove that (P, c) is a colored poset. Consider a colored cycle C = (v0, v1, . . . , vr ) with v0 = vr . If vi < vi+1 there is a path from vi to vi+1 in G1 (W) and if c(vi ) = c(vi+1 ) there is a path from vi to vi+1 in G0 (W). In both cases there is a path pi from vi to vi+1 in G(W) for 0 ≤ i < r. Since the graph G(W) is cycle-reverter the reverse of the cycle p1 ∗ p2 ∗ . . . ∗ pr−1 is a cycle in G(W). Therefore none of the paths pi can be in G1 (W) and we conclude that all the vertices vi belong to the same connected component in G0 (W), then C is monochromatic.  The next theorem establishes a necessary and sufficient condition for the existence of a metric matched to a given channel. March 20, 2018 DRAFT 13 Theorem 1. Let W : X → X be a channel. The graph G(W) is cycle-reverter if and only if the channel W is metrizable. Proof. First we suppose the existence of a metric d : X × X → [0, +∞) matched to W and consider a cycle c = (v0, v1, . . . , vr = v0 ) in G(W). Every vertex is of the form vi = {xi, yi } with xi, yi ∈ X and #(vi ∩ vi+1 ) = 1 for 0 ≤ i < r (indices taken modulo r). Since d matches with W, from the cycle c, we obtain the following chain of inequalities: d(x0, y0 ) ≤ d(x1, y1 ) ≤ · · · ≤ d(xr−1, yr−1 ) ≤ d(x0, y0 ). Therefore every inequality is actually an equality and the reverse cycle c is also in G(W). This proves that the graph G(W) is cycle-reverter whenever W is metrizable. Conversely, if G(W) is cycle-reverter then by Lemma 1 we can define in P = X (2) a colored poset structure where the order is induced by the graph G1 (W) and the connected components of G0 (W) are monochromatic. By Proposition 4 we can construct a height function h for P such that every connected component of G0 (W) is horizontal. In particular Pr(x|y) < Pr(x|z) if and only if h({x, y}) < h({x, z}). Hence, the function (x, y) 7→ h({x, y}) is coherent-with-W, then W is metrizable (a metric can be constructed as in Equation (2)).  Remark 2. When G(W) is cycle-reverter we have the following algorithm to obtain a metric d matching to the channel W : X → X. 1) Consider the colored poset in P = X (2) whose partial order is induced by G1 (W) and the coloring is given by the connected components of G0 (W). 2) Construct a height function h for P as in the proof of Proposition 4 (see also Remark 1) for which every monochromatic set is horizontal. 3) Let m be the maximum value of h. By Proposition 1, a metric matched to W is given by    2m − h ({x, y}) if x , y  d(x, y) =   0 if x = y  Example 6. Let X = {0, 1, 2, 3} and W : X → X be the channel with transition matrix: © ­ ­ ­ [W] = ­ ­ ­ ­ « March 20, 2018 4/9 0 0 2/9 ª ® 0 2/9 1/9 1/9 ®® ®. 2/9 4/9 8/9 0 ®® ® 1/3 1/3 0 2/3 ¬ DRAFT 14 We consider for X (2) the order induced by G1 (W) and the coloration c as in Lemma 1 (i.e. each color correspond to a connected component of G0 (W)). Figure 5 shows the graph G(W) where the edges corresponding to the subgraphs G1 (W) and G0 (W) are colored black and red respectively. Colored cycles correspond to cycles in G(W). Note that a cycle and its reverse are in G(W) if and only if it is a cycle in G0 (W). Since there are no cycles in G(W) containing black edges, the graph G(W) is cycle-reverter. Thus, by Lemma 1, (X (2), c) is a colored poset. We can apply the steps given in the proof of Proposition 4 to obtain a Hasse diagram for this colored poset. This process is illustrated in Figure 5, after three steps we obtain the height function h3 : X (2) → N given by h3 ({2, 3}) = 0, h3 ({0, 1}) = h3 ({0, 2}) = 1 and h3 ({1, 3}) = h3 ({0, 3}) = h3 ({1, 2}) = 3. A metric matched to W is given by d(x, y) = 6 − h3 ({x, y}) when x , y and 0 otherwise. Fig. 5. The graph G(W) for the channel of Example 6 and the steps to obtain a metric matched to this channel. V. T HE BAC CHANNEL IS METRIZABLE We consider the n-fold BAC channel BAC n (p, q) with parameters p, q ∈ [0, 1] and p + q < 1. The case pq = 0 corresponds to the Z-channels which we know they are metrizable (Theorem 6 of [4]), then we can assume pq > 0. Each entry of its transition matrix Mn (p, q) is of the form Pr(x|y) = pa (1 − p)b q c (1 − q)d March 20, 2018 DRAFT 15 with a + b + c + d = n and a + d = w(x) (the Hamming weight of x ∈ Z2n ). If we consider other 0 0 0 0 word y0 ∈ Z2n with Pr(x|y0) = pa (1 − p)b q c (1 − q)d , since a + d = a0 + d 0 and b + c = b0 + c0, taking the quotient we have:   b−b0   d−d 0 Pr(x|y) 1−p 1−q = · . Pr(x|y0) q p (4) This identity will be useful in our proof of metrizability of the BAC channel. Lemma 2. Let W : X → X be a channel. The graph G(W) is cycle-reverter if and only if every sequence x0, x1, . . . , xr−1 ∈ X (r ≥ 3) satisfying xi , xi+1 and Pr(xi |xi−1 ) ≤ Pr(xi |xi+1 ) for i : 0 ≤ i < r also satisfy Pr(xi |xi−1 ) = Pr(xi |xi+1 ) for i : 0 ≤ i < r (where the indices are considered modulo r). Proof. We suppose that G(W) is cycle-reverter and consider a sequence x0, x1, . . . , xr−1 ∈ X satisfying xi , xi+1 and Pr(xi |xi−1 ) ≤ Pr(xi |xi+1 ) for i : 0 ≤ i < r. Then we have a cycle c = (v0, . . . , vr−1, vr = v0 ) in G(W) given by vi = {xi, xi+1 } for 0 ≤ i < r. Since this graph is cycle-reverter its reverse cycle c is also a cycle in G(W) which implies Pr(xi |xi−1 ) = Pr(xi |xi+1 ) for i : 0 ≤ i < r. Now we suppose that the graph G(W) is not cycle-reverter. In this case we can find a sequence x0, x1, . . . , xr−1 ∈ X satisfying xi , xi+1 and Pr(xi |xi−1 ) ≤ Pr(xi |xi+1 ) for i : 0 ≤ i < r where at least one inequality is strict. Indeed, consider a cycle c = (v0, v1, . . . , vr = v0 ) in G(W) of minimal length r ≥ 1 whose reverse cycle c is not in this graph. Since c = c for cycles of length r ≤ 2, we have r ≥ 3. We remark that the fact that its reverse cycle c is not in G(W) is equivalent to the existence of some arrow in c which is also an arrow in G1 (W). The vertices in c are pairwise disjoint since otherwise we could take a sub-cycle of c containing some arrow of G1 (W) contradicting the minimality of r. If for some i : 0 ≤ i < r we have that vi ∩ vi+1 ∩ vi+2 = {x}, then there exists y, z, t pairwise distinct such that vi = {x, y}, vi+1 = {x, z} and vi+2 = {x, t}. Thus Pr(x|y) ≤ Pr(x|z) ≤ Pr(x|t) and the arrow vi → vi+2 is also in G(W). If some of the arrows vi → vi+1 or vi+1 → vi+2 is in G1 (W) then vi → vi+2 is also in G1 (W), so we could substituting these two arrows for the last obtaining a new cycle, whose reverse is not in G(W) and length r − 1 which contradict the minimality of r. Therefore vi ∩ vi+1 ∩ vi+2 = ∅ for all i : 0 ≤ i < r and there exists a sequence x0, x1, . . . , xr−1 ∈ X such that vi = {xi, xi+1 }. This sequence satisfies Pr(xi |xi−1 ) ≤ Pr(xi |xi+1 ) for i : 0 ≤ i < r with at least one strict inequality (the corresponding to the edge in G1 (W)). March 20, 2018  DRAFT 16 Theorem 2. Let n ≥ 2 and (p, q) ∈ (0, 1]2 with p + q < 1. Then, the channel W = BAC n (p, q) is metrizable. Proof. By Theorem 1, it is enough to prove that its associated graph G(W) is cycle-reverter. We assume, to the contrary, that this graph is not cycle-reverter and by Lemma 2 there exists a sequence x0, x1, . . . , xr−1 ∈ X such that xi , xi+1 and Pr(xi |xi−1 ) ≤ Pr(xi |xi+1 ), ∀i : 0 ≤ i < r, (5) where the indices are taken modulo r and where at least one of these inequality is strict. We write these conditional probability as Pr(xi |xi−1 ) = pai (1 − p)bi q ci (1 − q)di for i : 0 ≤ i < r. Therefore Pr(xi−1 |xi ) = pci (1 − p)bi q ai (1 − q)di for i : 0 ≤ i < r and applying Equation 4 we obtain Pr(xi |xi+1 ) pci+1 (1 − p)bi+1 q ai+1 (1 − q)di+1 = Pr(xi |xi−1 ) pai (1 − p)bi q ci (1 − q)di   b −b   d −d 1 − p i+1 i 1 − q i+1 i , = q p (6) for 0 ≤ i < r. Multiplying these r inequalities we have  b −b   d −d r−1 r−1  Ö Pr(xi |xi+1 ) Ö 1 − p i+1 i 1 − q i+1 i = Pr(x |x ) q p i i−1 i=0 i=0  1−p = q r−1 (b   Σi=0 i+1 −bi ) 1−q p r−1 (d  Σi=0 i+1 −di ) =1 r−1 (b r−1 because br = b0, dr = d0 and Σi=0 i+1 − bi ) = Σi=0 (di+1 − di ) = 0. But by (5) this product is greater than 1 (since at least one inequality is strict) which is a contradiction. Therefore W is  metrizable. VI. C ONCLUDING REMARKS AND FURTHER PROBLEMS In this work we approach the problem of metrization for the n-fold BAC channels in the sense of the definition used in [3] and [4]. An existence proof and an algorithm to construct a metric matching to the BAC channels are provided. An interesting problem is to describe the set D1 (n, p, q) of metrics matching to the channel BAC n (p, q). This set is non-empty by Theorem 2 and closed under linear combinations with positive real coefficients, so we could look for a minimal generator for this set. Describing this set allows to choose good metrics according to a given criterion. One possible criterion could be to select the metric according to how easy is to March 20, 2018 DRAFT 17 compute it. Other possible criterion could be to select the metric according to how good it fits the channel in the sense of the next definition. Definition 6. Let W : X → X be a channel and d be a metric compatible to W. The metric d is matched to the channel W with order n if d m is a metric matched to W m for all m : 1 ≤ m ≤ n, where d m : X m → X m is given by d (x, y) = m m Õ d(xi, yi ) and Pr Wm (x|y) = m Ö PrW (xi |yi ). k=1 k=1 If d is matched to W with order n for all n ≥ 1, we say that the metric d matches completely to W. We also define the order of metrizability of W as the maximum n (possibly infinite) for which there exists a metric matched to W with order n. It would be interesting to determine the order of metrizability for the BAC channels or at least to determine which of these channels admit a matched metric with order n ≥ 2. In [3] it was approached the problem of determining when a channel W : X → X is completely metrizable for alphabets of lengths #X = 2, 3 and was proved that the channel BAC 1 (p, q) has a matched metric with order ∞ if and only if p = q (symmetric channel). In this case the Hamming metric matches completely to the channel. ACKNOWLEDGEMENTS The author would like to thank the anonymous reviewers for their valuable comments and suggestions, Sueli Costa for her support and suggestions, and CNPq and FAPESP for their support. R EFERENCES [1] J. C. Y. Chiang, J. K. Wolf, “On channels and codes for the Lee metric”, Inf. Control, vol. 19, no. 2, pp. 159-173, 1971. [2] J. L. Massey, “Notes on coding theory”, Cambridge, MA, USA: MIT Press, 1967. [3] G. Séguin, “On metrics matched to the discrete memoryless channel”,J. Franklin Inst., vol. 309, no. 3, pp. 179-189, 1980. [4] M. Firer, J. L. Walker, “Matched metrics and channels”, IEEE Transactions on Information Theory, vol. 62, no. 3, pp. 1150-1156, 2016. [5] R. G. L. D’Oliveira, M. Firer, “Channel metrization”, preprint, arXiv:1510.03104, 2016. [6] A. Poplawsky, “On matched metric and channel problem”, preprint arXiv:1606.02763v1, 2016. March 20, 2018 DRAFT
7cs.IT
STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS arXiv:1709.03834v1 [math.CO] 12 Sep 2017 MATTHIAS LENZ Abstract. In this note we define a Stanley–Reisner ring for quasi-arithmetic matroids and more general structures. To this end, we define two types of CW complexes associated with a quasi-arithmetic matroid that generalize independence complexes of matroids. Then we use Stanley’s construction of Stanley–Reisner rings for simplicial posets. 1. Introduction A (quasi-)arithmetic matroid A is a triple (E, ∆, m), where (E, ∆) is a matroid on the ground set E with independence complex ∆ ⊆ 2E and m : 2E → Z≥1 is the so-called multiplicity function, that must satisfy certain axioms [8]. In the representable case, i. e. when the arithmetic matroid is determined by a list of integer vectors, this multiplicity function records data such as the absolute value of the determinant of a basis. A toric arrangement is an arrangement of subtori of codimension one in a real or complex torus (e. g. [11, 16, 18, 23, 30, 38]). While matroids capture a lot of combinatorial and topological information about hyperplane arrangements [40, 48], arithmetic matroids carry similar information about toric arrangements [11, 30, 38]. Toric arrangements are particularly important due to their connection with the problem of counting lattice points in polytopes. This was implicitly discovered in the 1980s by researchers working on splines [17] such as Dahmen and Micchelli. It was recently made more explicit and put in a broader context by De Concini, Procesi, Vergne, and others [20]. Various simplicial complexes can be associated with a matroid in a natural way: the matroid complex (or independence complex), the broken circuit complex, and the order complex of the lattice of flats. As topological spaces, they are interesting in their own right and they can be used to derive interesting information about the underlying matroid (see e. g. [7]). The broken circuit complex has been generalized to arithmetic matroids in the representable case. This construction plays an important role in several papers on the topology of toric arrangements [11, 16, 18]. The first goal of this paper is to define an independence complex for an arithmetic matroid. The ith entry of the f -vector of this complex should be equal to the weighted number of independent sets of cardinality i in the underlying matroid, where each independent set is weighted by its multiplicity. It is easy to see that this cannot be achieved by a simplicial complex, so we will we construct a CW complex Date: 13th September 2017. 2010 Mathematics Subject Classification. Primary: 05B35, 13F55, Secondary: 06A07, 06A11, 14N20. Key words and phrases. Stanley–Reisner ring, arithmetic matroid, Tutte polynomial, toric arrangement, CW poset, matroid complex. The author was supported by a Swiss Government Excellence Scholarship for Foreign Scholars and subsequently by a fellowship within the postdoc programme of the German Academic Exchange Service (DAAD). 1 2 MATTHIAS LENZ instead. In fact, we will provide two constructions: one works for arbitrary quasiarithmetic matroids (and even more general structures), the other one uses the so-called layer groups that can be associated to a representation of an arithmetic matroid [22, 34]. The h-vectors of arithmetic matroids (which are by construction also the h-vectors of the arithmetic independence complexes) and related algebraic structures arising in the theory of vector partition functions have already been studied [15, 33]. The second goal of this paper is to construct a Stanley–Reisner ring for arithmetic matroids. The construction is straightforward: we are able to prove that our arithmetic independence complexes are simplicial posets. Then we employ a construction of Stanley that associates a Stanley–Reisner ring to any simplicial poset [46]. In fact, our construction not only works for the two types of arithmetic independence complexes that we define, but for a more general structure that we call independence complex defined by a surjective finite abelian group structure on a simplicial complex. Just like the Stanley–Reisner ring of a matroid encodes the h-vector of the matroid complex, the arithmetic Stanley–Reisner ring encodes the h-vector of the arithmetic independence complex. A large number of algebraic structures that can be associated with hyperplane arrangements and matroids have turned out to be very interesting and useful (e. g. [3, 5, 9, 24, 39, 41, 51, 52]). There is a strong interest in inequalities for f -vectors and h-vector of matroid and broken circuit complexes (e. g. [12, 27, 29, 49]) and algebraic tools have been crucial for some of the proofs. This includes log-concavity of f -vectors and h-vectors of matroid complexes and broken circuit complexes [1, 2, 28, 32]. Using the fact that the Stanley–Reisner ring of a matroid complex is level, one can deduce certain inequalities for their h-vectors (e. g. [47, p. 93 and Proposition 3.3(a)]). Outside of matroid theory, Stanley–Reisner rings also play an important role. For example, the equivariant cohomology ring of a complete and simplicial toric variety is isomorphic to the Stanley–Reisner ring of the corresponding fan [13, 12.4.14]. The hard Lefschetz property of certain Stanley–Reisner rings allowed Stanley to prove the g-theorem for rational simplicial polytopes [45]. This result was conjectured by McMullen in 1971 [37] and its many generalisations have received a lot of interest [50]. Acknowledgements. The author would like to thank Emanuele Delucchi and Ivan Martino for several interesting discussions. 2. Background In this section we will introduce the mathematical background, i. e. Stanley– Reisner rings of simplicial complexes and simplicial posets, matroids, and arithmetic matroids. Throughout this paper, K denotes some fixed field. 2.1. Stanley–Reisner rings of simplicial complexes. An (abstract) simplicial complex ∆ is a collection of subsets of a finite set E. We denote by fi the number of elements of ∆ of cardinality i. If ∆ is non-empty, there is a maximal integer r s. t. fr 6= 0. Then we say that ∆ has rank r. The f-polynomial f∆ (t) and the h-polynomial h∆ (t) of ∆ are defined as f∆ (t) := r X fi tr−i and (1) i=0 h∆ (t) := f∆ (t − 1) = r X i=0 hi tr−i . (2) STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS 3 The vectors (f0 , . . . , fr ), (h0 , . . . , hr ) ∈ Zr+1 are called the f -vector and the hvector of ∆, respectively. The f -vector is usually defined in a slightly different way in the topology literature (the index is shifted by 1), but our notation has some advantages and it is used in some articles on matroid theory (e. g. [7]). Let ∆ be a simplicial complex on the ground set {1, . . . , N }. The Stanley–Reisner ideal I∆ and the Stanley–Reisner ring (or face ring) K[∆] are defined as  (3) I∆ := {si1 · · · sir : {i1 , . . . , ir } 6∈ ∆} ⊆ K[s1 , . . . , sN ] and K[∆] := K[s1 , . . . , sN ]/I∆ . (4) K[∆] is a graded ring where each variable has degree 1. It is known that its Hilbert series is h 0 + h 1 t + . . . + h r tr Hilb(K[∆], t) = . (5) (1 − t)r For more information on these topics, see [47]. 2.2. Stanley–Reisner rings of simplicial posets. Closely following Stanley’s paper [46], we will now introduce simplicial posets and their Stanley–Reisner rings. A simplicial poset is a poset P with a unique minimal element 0̂ s. t. every interval [0̂, y] is a boolean algebra [6, 26, 46]. All posets considered in this paper are assumed to be finite. If a simplicial poset P is in addition a meet-semilattice, then P is just the face lattice (ordered by inclusion) of a simplicial complex. Simplicial posets are special cases of CW posets, as defined in [6]. This implies that a simplicial poset P is the face poset of a regular CW complex Γ. We may informally regard Γ as a generalized simplicial complex whose faces are still simplices, but we allow two faces to intersect in any subcomplex of their boundaries, rather than just in a single face. For a simplicial poset P we can define a grading ρ as follows: for y ∈ P , ρ(y) is defined as the rank of the boolean algebra [0̂, y]. Let fi denote the number of y ∈ P s. t. ρ(y) = i. Then we can define f and h-vector/polynomial as above. Definition 1 ([46, Definition 3.3]). Let P be a simplicial poset with elements 0̂ = y0 , y1 , . . . , yp . We define the Stanley–Reisner ideal of P , IP to be the ideal in the polynomial ring K[y0 , y1 , . . . , yp ] generated by the following elements: (S1 ) yi yj if yi and yjP have no common upper bound in P , and (S2 ) yi yj − (yi ∧ yj )( z z), where z ranges over all minimal upper bounds of yi and yj , otherwise; (S3 ) (y0 − 1). The Stanley–Reisner ring of P is defined as K[P ] = K[y0 , y1 , . . . , yp ]/IP . It is clear that yi ∧ yj exists whenever yi and yj have an upper bound z, since the interval [0̂, z] is a boolean algebra and therefore a lattice. It is easy to see that if P is the face lattice of a simplicial complex ∆, then K[P ] ∼ = K[∆]. Now using the same notation as above, we define a quasi-grading on the ring K[y0 , y1 , . . . , yp ] by setting deg(yi ) := ρ(yi ). We do not get an actual graded algebra as we have defined it because deg(y0 ) = 0, so dimK (K[y0 , y1 , . . . , yp ]0 ) = 2 instead of 1. The relations (S1 ), (S2 ) and (S3 ) are homogeneous with respect to this grading, so K[P ] inherits a grading from K[y0 , y1 , . . . , yp ]. Moreover, since deg(y0 − 1) = 0 it follows that dimK ((K[P ])0 ) = 1, so K[P ] is a genuine graded algebra. Proposition 2 ([46, Proposition 3.8]). Let P be a finite simplicial poset of rank r with h-vector (h0 , h1 , . . . , hr ). With the grading of K[P ] just defined, we have Hilb(K[P ], t) = h 0 + h 1 t + . . . + h r tr . (1 − t)r (6) 4 MATTHIAS LENZ 2.3. Matroids. A matroid complex (or independence complex) is a simplicial complex ∆ on a finite ground set E s. t. ∅ ∈ ∆ and if A1 , A2 ∈ ∆ and |A2 | > |A1 |, then there is e ∈ A2 \ A1 s. t. A1 ∪ {e} ∈ ∆. The pair (E, ∆) is called a matroid. Matroids can also be defined in several other equivalent ways [42]. The rank function of a matroid M = (E, ∆) is the function rk : 2E → Z≥0 given by rk(A) = max{S∈∆:S⊆A} |S|. The integer r := rk(E) is called the rank of M. Given a matrix X ∈ Kr×N , one obtains the matroid MX = ([N ], ∆X ), where ∆X denotes the set of all S ⊆ [N ] which index a linearly independent set of columns of X. The matrix X is called a representation of MX . The Tutte polynomial [10] of a matroid M = (E, ∆) is defined as X TM (x, y) := (x − 1)r−rk(A) (y − 1)|A|−rk(A) ∈ Z[x, y]. (7) A⊆E It is easy to see that f∆ (t) = TM (t + 1, 1), hence h∆ (t) = TM (t, 1). Using (5), this implies that the Hilbert series of the Stanley–Reisner ring of a matroid complex is encoded by the Tutte polynomial: tr TM ( 1t , 1) . (8) (1 − t)r Matroid complexes of been studied intensively and they have many nice properties [7, 47]. In particular, they are shellable [44]. This implies that their h-vectors are non-negative. Hilb(K[∆], t) = 2.4. Arithmetic matroids. Arithmetic matroids capture many combinatorial and topological properties of toric arrangements in a similar way as matroids carry information about the corresponding hyperplane arrangements. Definition 3 ([8, 14]). An arithmetic matroid is a triple (E, ∆, m), where (E, ∆) is a matroid and m : 2E → Z≥1 denotes the multiplicity function that satisfies the following axioms: (P) Let R ⊆ S ⊆ E. The set [R, S] := {A : R ⊆ A ⊆ S} is called a molecule if S can be written as the disjoint union S = R ∪ FRS ∪ TRS and for each A ∈ [R, S], rk(A) = rk(R) + |A ∩ FRS | holds. For each molecule [R, S], the following inequality holds: X (−1)|S|−|A| m(A) ≥ 0. (9) ρ(R, S) := (−1)|TRS | A∈[R,S] (A1) For all A ⊆ E and e ∈ E: if rk(A ∪ {e}) = rk(A), then m(A ∪ {e}) m(A). Otherwise, m(A) m(A ∪ {e}). (A2) If [R, S] is a molecule and S = R ∪ FRS ∪ TRS , then m(R)m(S) = m(R ∪ FRS )m(R ∪ TRS ). (10) A quasi-arithmetic matroid is a triple (E, ∆, m), where (E, ∆) is a matroid and the multiplicity function m : 2E → Z≥1 satisfies the axioms (A1) and (A2). The prototypical example of an arithmetic matroid is defined by a list of vectors X = (x1 , . . . , xN ) ⊆ Zr , or equivalently, by a matrix X ∈ Zr×N . In this case, for a subset S ⊆ E = [N ] := {1, . . . , N } of cardinality r that defines a basis, we have m(S) = |det(S)| and in general m(S) := |(hSiR ∩ Zr )/ hSi|. Here, hSi ⊆ Zr denotes the subgroup generated by {xe : e ∈ S} and hSiR ⊆ Rr denotes the subspace spanned by the same set. In fact, one can represent a slightly more general class of arithmetic matroids by a list of elements in a finitely generated abelian group. By the fundamental theorem of finitely generated abelian groups, every finitely generated abelian group G is isomorphic to Zr ⊕ Zq1 ⊕ . . . Zqn for suitable non-negative integers d, n, q1 , . . . , qn . STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS 5 ∼ Zr ⊕ Zq ⊕ . . . Zq . However, G has a There is no canonical isomorphism G = n 1 uniquely determined torsion subgroup Gt ∼ = Zq1 ⊕. . . Zqn consisting of all the torsion elements. There is a free group Ḡ := G/Gt ∼ = Zr . For X ⊆ G, we will write X̄ to denote the image of X in Ḡ. Definition 4. Let A = (E, ∆, m) be an arithmetic matroid. Let G be a finitely generated abelian group and let X = (xe )e∈E be a list of elements of G. For A ⊆ E, let GA denote the maximal subgroup of G s. t. |GA / hAi| is finite. Again, hAi ⊆ G denotes the subgroup generated by {xe : e ∈ A}. X ⊆ G is called a representation of A if the matrix X̄ ⊆ Ḡ represents the matroid (E, ∆) and mX (A) = m(A) = |GA / hAi| for all A ⊆ E. The arithmetic matroid A is called representable if it has a representation X. Note that if A is an independent set, then mX (A) = mX̄ (A) · |Gt | (cf. [35, Lemma 8.3]). An arithmetic matroid A = (E, rk, m) is called torsion-free if m(∅) = 1. If such an arithmetic matroid is representable, then it can be represented by a list of vectors in lattice, i. e. a finitely generated abelian group which is torsion-free. The arithmetic Tutte polynomial [14, 38] of an arithmetic matroid A = (E, ∆, m) is defined as X MA (x, y) := m(A)(x − 1)r−rk(A) (y − 1)|A|−rk(A) . (11) A⊆E If an arithmetic matroid A is represented by a list X ⊆ Zr that is totally unimodular, then the multiplicity function is constant and equal to 1. Hence the arithmetic Tutte polynomial and the Tutte polynomial are equal in this case. 3. Arithmetic independence complexes In this section we will define several simplicial posets that can be used to define the arithmetic Stanley–Reisner ring using Definition 1. In Subsection 3.1 we will give a very general definition that includes the other two as special cases. In Subsection 3.2 will construct an arithmetic independence complex, given a representation of an arithmetic matroid. In Subsection 3.3 we will describe another construction that works for quasi-arithmetic matroids and even more general structures. In general, in the representable case, these two constructions yield different complexes. 3.1. Simplicial posets defined by a simplicial complex with a surjective finite abelian group structure. Let ∆ be a simplicial complex on the ground set E. Let FinAb denote the category of finite abelian groups. We say that ∆ has a surjective finite abelian group structure G if there is a functor G : ∆ → FinAb s. t. the images of all homomorphisms are surjective maps. Here, ∆ is considered as a category in the usual way of turning a poset such as (∆, ⊆) into a category: the objects are the elements of ∆ and for σ1 , σ2 ∈ ∆, ( {(σ1 , σ2 )} if σ1 ⊆ σ2 , hom(σ1 , σ2 ) = (12) ∅ otherwise. Composition of homomorphisms is defined via (σ1 , σ2 ) ◦ (σ2 , σ3 ) = (σ1 , σ3 ). The definition can be rephrased in the following way without using terminology from category theory. We say that ∆ has a surjective finite abelian group structure G if there is a map G : ∆ → FinAb s. t. the following conditions are satisfied: (i) for each S ∈ ∆ and a ∈ E \ S for which S ∪ {a} ∈ ∆, there is a map G πS,a : G(S ∪ {a}) ։ G(S). 6 MATTHIAS LENZ (ii) for all S ∈ ∆, a, b ∈ E \ S, a 6= b for which S ∪ {a, b} ∈ ∆, the following diagram commutes: G πS∪{a},b / / G(S ∪ {a}) G(S ∪ {a, b}) G πS∪{b},a  G(S ∪ {b}) G πS,b (13) G πS,a  / / G(S). We call G torsion-free if |G(∅)| = 1. Definition 5. Let ∆ be a simplicial complex on the ground set E with a surjective finite abelian group structure G. We define the independence poset Ind(E, ∆, G) as follows: the ground set is {(S, g) : S ∈ ∆, g ∈ G(S)} (14) and for a 6∈ S for which S ∪ {a} ∈ ∆, (S ∪ {a}, g) covers (S, h) if and only if G πS,a (g) = h. Ind(E, ∆, G) is indeed a poset. If one defines a poset via cover relations, the only thing that needs to be checked is that the cover relations digraph does not contain a cycle, but this is clear from the definition. G For S = {s1 , . . . , sk } ∈ ∆,  the map πS : G(S) → G(∅)  it will be useful to define  G G G (g)) . . . . Since the diagrams in (13) (π∅,s . . . π{s by πSG (g) := π{s 1 1 },s2 1 ,...,sk−1 },sk commute, the order of the elements of S does not matter. Lemma 6. If G is torsion-free, then Ind(E, ∆, G) is a simplicial poset with minimal element (∅, 0). In general, Ind(E, ∆, G) is a disjoint union1 of simplicial posets with minimal elements {(∅, g) : g ∈ G(∅)}. Furthermore, the f-vectors of the connected components of Ind(E, ∆, G) are pairwise equal. Proof. Let S ∈ ∆ and h ∈ G(S). By definition, there is a unique g = πSG (h) ∈ G(∅) s. t. (∅, g) ≤ (S, h). Hence each connected component of the Hasse diagram contains at least one element of type (∅, g) for g ∈ G(∅). Now let g1 , g2 ∈ G(∅) s. t. (∅, g1 ) and (∅, g2 ) are in the same connected component. This means that there is a path p0 = (∅, g1 ), p1 , . . . , pl = (∅, g2 ) in the Hasse diagram of the poset (considered as an undirected graph) that connects the two elements, i. e. for i = 1, . . . , l, pi ∈ Ind(E, ∆, G) and either pi covers pi−1 or pi−1 covers pi . Since one of two adjacent elements in the path covers the other one, they must lie above the same minimal element. Hence by induction, all elements in the path must lie above the same minimal element. Thus g1 = g2 and we can deduce that the Hasse diagram has |G(∅)| connected components and each one contains exactly one element of type (∅, g). Let g, h, S be as above. We still need to show that [(∅, g), (S, h)] is a boolean algebra. But this is easy: [∅, S] is the standard example of a boolean algebra. Adding group elements to each set (a suitable image of h) does not change this poset (for this, the fact that the diagrams commute is used). Now let g1 , g2 ∈ G(∅) and let S ∈ ∆. To prove the last statement, it is sufficient to show that (πSG )−1 (g1 ) = (πSG )−1 (g2 ) . But this is clear since πSG is a group homomorphism.  Note that the proof of the lemma relies on the fact that the maps are fixed in advance and everything commutes (‘local’ commutativity as in the case of (nonrepresentable) matroids over a ring [25] is not sufficient). 1This means that the Hasse diagrams are disjoint unions in the sense of graph theory. STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS 7 Let G be a surjective finite abelian group structure on the simplicial complex ∆. We will now construct a torsion-free surjective finite abelian group structure G̃ on the same simplicial complex. Let S ⊆ E. We define G̃(S) as follows: G̃(S) := (πSG )−1 (0) = {h ∈ G(S) : πSG (h) = 0}. We define the maps G̃ πS,a : G̃(S ∪ {a}) → G̃(S) by restricting G πS,a . (15) By construction, G̃ πS,a is surjective, the image is contained in G̃(S) and the maps commute as in (13). Hence G̃ is also a surjective finite abelian group structure on ∆. Theorem 7. Let P = Ind(E, ∆, G) be an independence poset defined by a surjective finite abelian group structure on a simplicial complex of rank r. Suppose that G is torsion-free, i. e. G(∅) ∼ = {0}. Then the Stanley–Reisner ring K[P ] satisfies Hilb(K[P ], t) = hP (t) . (1 − t)r (16) Now suppose that G has torsion and let P̃ = Ind(E, ∆, G̃) denote the independence poset of the corresponding torsion-free surjective finite abelian group structure. Then the Stanley–Reisner ring K[P̃ ] satisfies Hilb(K[P̃ ], t) = 1 hP (t) . · |G(∅)| (1 − t)r Proof. This follows directly from Proposition 2 and Lemma 6. (17)  Below, we will define two types of independence complexes for (quasi-)arithmetic matroids, which will allow us to define the arithmetic Stanley–Reisner ring whose Hilbert series encodes the arithmetic h-vector. Theorem 8. Let P be a poset for which one of the two following statements holds: • let X ∈ Zr×N be a matrix that represents an arithmetic matroid A = (EX , ∆X , mX ) of rank r and P = Indrep (EX , ∆X , GX ) is the independence poset derived from X (cf. Subsection 3.2). • let A = (E, ∆, m) be a (weak quasi-)arithmetic matroid of rank r and P = Indcyc (E, ∆, G) is its cyclic independence poset (cf. Subsection 3.3). In both cases, the following statements hold for the arithmetic Stanley–Reisner ring K[P ]: suppose A is torsion-free, i. e. m(∅) = 1. Then MA (t, 1) . (1 − t)r MA (t, 1) 1 , · In general, we have Hilb(K[P̃ ], t) = m(∅) (1 − t)r Hilb(K[P ], t) = (18) (19) where P̃ denotes the independence poset of the torsion-free structure associated with A. Proof. This follows directly from Theorem 7 and Lemma 10 and Lemma 14 below.  3.2. Arithmetic independence complexes derived from a representation. Let X ∈ Zr×N be a matrix. For S ⊆ [N ], let X[S] denote the submatrix of X whose columns are indexed by S. Following [22, 34], we define W (S) := X[S]T Rr ∩ Zr , T r I(S) := X[S] Z , S Z(S) := Z /I(S), and (20) (21) (22) 8 MATTHIAS LENZ LG(S) := W (S)/I(S). (23) The groups LG(S) for S ⊆ [N ] are called layer groups, as they encode a lot of information about the poset of layers of the corresponding toric arrangement. LG(S) is the torsion subgroup of Z(S) [22]. For s ∈ [N ]\ S, let prS,s : ZS∪{s} → ZS denote the projection that forgets the coordinate corresponding to s. This induces a map pr ¯ S,s : LG(S ∪ {s}) → LG(S) ([34, Lemma 2 and Lemma 3]). Remark 9. Let X ∈ Zr×N be a matrix. It follows from the definition that if S ⊆ [N ] is independent, then the set of lattice points in the half-open parallelepiped PS that is spanned by the columns of X[S] is a set of representatives for the elements of LG(S). If S ∪ {s} is also independent, then PS is a facet of PS∪{s} . Note that the projection map prS,s sends a point in PS∪{s} to a point in ZS that is not necessarily contained in PS , but of course it has a representative modulo I(S) that is contained in PS (cf. Figure 1). Lemma 10. Let X ∈ Zr×N be a matrix. Let E = [N ] and let ∆X be the matroid complex of the matroid represented by X. For S ∈ ∆X , let GX (S) := LG(S). Furthermore, for s ∈ E \ S for which G S ∪ {s} ∈ ∆X , let πS,s := pr ¯ S,s : G(S ∪ {s}) → G(S). Then (E, ∆X , GX ) is a surjective finite abelian group structure on ∆. G Proof. By assumption, S ∪ {s} is independent. Hence by [34, Lemma 5], πS,s : GX (S ∪{s}) → GX (S) is surjective. To see that the projection maps commute in the required way, note that this is trivial for the projection prS,s : W (S ∪ {s}) → W (S) and we can easily pass over to the quotient since prS,s (I(S ∪ {s})) = I(S) [34, Lemma 2].  Definition 11 (Arithmetic independence complex derived from a representation). Let X ∈ Zr×N be a matrix and let E, ∆X , and GX be as in Lemma 10. Let AX be the arithmetic matroid represented by X. Then we call Indrep (X) := (EX , ∆X , GX ) the arithmetic independence complex of AX derived from the representation X. Now let X be a list of elements of a finitely generated abelian group G of rank r. Let X̄ denote the projection of X to a lattice as explained in Subsection 2.4. rep g (X̄) := (E, ∆ , G ) the2 torsion-free arithmetic independence Then we call Ind X̄ X̄ complex of AX derived from the representation X.   2 −2 Example 12. Let us consider the matrix X = . We denote the columns 2 2 by a and b. The arithmetic Tutte polynomial is MX (x, y) = x2 + 2x + 5. For the face poset P of the representable independence complex this implies fP (t) = MX (t + 1, 1) = t2 + 4t + 8 and hP (t) = MX (t, 1) = t2 + 2t + 5. The f -vector (f0 , f1 , f2 ) = (1, 4, 8) can also be read off from the corresponding toric arrangement, which is shown in Figure 1: there are f2 = 8 simple vertices (i. e. vertices contained in exactly r = 2 1-dimensional subtori), there are f1 = 4 connected 1-dimensional subtori, and the torus has f0 = 1 connected component. Now let us construct Indrep (X). Representatives of the group elements of LG({1, 2}) are given by the lattice points of the half-open parallelepiped spanned by the columns of X, i. e. the set {(0, 0), (−1, 1), (0, 1), (1, 1), (−1, 2), (0, 2), (1, 2), (0, 3)}. Furthermore, LG({1}) ∼ = LG({2}) ∼ = Z/2Z = {0̄, 1̄}. Now we calculate the images of LG({1, 2}) in the other two groups, i. e. we forget a coordinate and reduce the other one modulo 2: 2Note that while the construction of G X̄ requires the choice of a non-canonical isomorph- ism G/Gt ∼ = Zr , where G/Gt denotes the lattice containing the elements of X̄, the torsion-free independence complex is independent of this choice. STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS 9 LG({1, 2}) (0,2) LG({2}) (0,1) (1,1) (1,−1) LG({1}) π{2},1 (0,0) π{1},2 (1,1) (0,0) Figure 1. Left: the toric arrangement defined in Example 12 drawn in R2 /Z2 . Right: the corresponding layer groups, represented by lattice points in half-open parallelepipeds. C0 C−1,1 C0,1 C1,1 C0,3 a0 a1 C1,2 C0,2 C−1,2 b0 b1 0̂ Figure 2. Indrep (X) as defined in Example 12. C0 C2 C4 C6 C1 C3 C5 C7 a1 b 1 a0 b 0 0̂ Figure 3. Indcyc (X) as defined in Example 15. LG({1, 2}) (0,0) (-1,1) (0,1) (1,1) (-1,2) (0,2) (1,2) (0,3) LG({1}) 0 1 0 1 1 0 1 0 0 1 1 1 0 0 0 1 LG({2}) This allows us to construct the poset, which is shown in Figure 2. The Stanley–Reisner ideal is IP = a0 C−1,1 , a0 C11 , a0 C1,2 , a0 C−1,2 , a1 C0 , . . . , a0 a1 , b 0 b 1 , C0 C−1,1 , . . . , C0,2 C−1,2 , a0 b0 − (C0 + C0,2 ), a0 b1 − (C0,1 + C0,3 ),  a1 b0 − (C−1,2 + C1,2 ), a1 b1 − (C1,1 + C−1,1 ) . (24) 3.3. Cyclic arithmetic independence complexes. We call A = (E, ∆, m) a weak quasi-arithmetic matroid if (E, ∆) is a matroid and m : ∆ → Z≥1 satisfies m(S)|m(S ∪ {x}) for all S ⊆ E and x ∈ E for which S ∪ {x} ∈ ∆, i. e. m is required 10 MATTHIAS LENZ to satisfy only one of the axioms of a quasi-arithmetic matroid. We require only this axiom to define the cyclic arithmetic independence complex. The arithmetic Tutte polynomial of a weak quasi-arithmetic matroid is defined as in (11). Definition 13 (Cyclic arithmetic independence complex). Let A = (E, ∆, m) be a weak quasi-arithmetic matroid. For S ∈ ∆, let Gm (S) := Z/m(S)Z and for Gm a ∈ E \ S for which S ∪ {a} ∈ ∆, let πS,a be the canonical projection map that sends 1̄ to 1̄. Then we define the cyclic arithmetic independence complex of A as Indcyc (E, ∆, m) := Ind(E, ∆, Gm ). Lemma 14. Let A = (E, ∆, m) be a weak quasi-arithmetic matroid. Then Gm (S) is indeed a surjective finite abelian group structure on ∆. Proof. Let S ⊆ E, a ∈ E \ S, and S ∪ {a} ∈ ∆. Since m(S)|m(S ∪ {x}), the Gm map πS,a : Z/m(S ∪ {a})Z → Z/m(S) that sends 1̄ to 1̄ is indeed a surjective group homomorphism. It is easy to see that the commuting squares condition is satisfied.  Example 15. Let us consider again the arithmetic matroid A that was defined in Example 12. Its cyclic arithmetic independence complex Indcyc (A) is shown in Figure 3. The commuting square is: (25) Z/8Z ❍❍ ✇ ❍❍ ✇ ❍❍ ✇✇ ✇ ❍❍ ✇ ✇ ❍# # {{✇✇ Z/2Z Z/2Z. ●● ✈ ●● ✈ ●● ✈✈ ●● ✈✈ ●# # {{✈✈✈ {0} The Stanley–Reisner ideal is IP = a0 C1 , a0 C3 , a0 C5 , a0 C7 , b0 C1 , b0 C3 , b0 C5 , b0 C7 , a1 C0 , . . . a0 a1 , a0 b 1 , b 0 a1 , b 0 b 1 , C0 C1 , C0 C2 , . . . , C6 C7 ,  a0 b0 − (C0 + C2 + C4 + C6 ), a1 b1 − (C1 + C3 + C5 + C7 ) . (26) Example 16. Let us consider a quasi-arithmetic matroid whose h-vector has negative entries. Let A = ({1, 2}, 2{1,2}, m), with m(∅) = 1 and m({1}) = m({2}) = m({1, 2}) = 2. The underlying matroid is the uniform matroid U2,2 . The arithmetic Tutte polynomial is MA (x, y) = x2 + 2x − 1. Let us construct Indcyc (X). The commuting square of cyclic groups and the poset are shown in Figure 4. One can read off the f -vector from the arithmetic Tutte polynomial or from the poset. It is (1, 4, 2) and the h-vector is (1, 2, −1). For the Stanley–Reisner ideal and the Stanley–Reisner ring we obtain  IP = a0 b1 , a1 b0 , a0 a1 , b0 b1 , C0 C1 , a0 C1 , b0 C1 , a1 C0 , b1 C0 , a0 b0 − C0 , a1 b1 − C1 K[P ] ∼ (27) = K[a0 , a1 , b0 , b1 ]/(a0 b1 , a1 b0 , a0 a1 , b0 b1 ). As a vector space, K[P ] is isomorphic to K[a0 , b0 ] ∪ K[a1 , b1 ]. Thus, its Hilbert series is X 1+2 (i + 1)ti = 1 + 4t + 6t2 + 8t3 + 10t4 + . . . (28) i≥1 = (1 + 2t + 3t2 + 5t3 + . . .)(−t2 + 2t + 1) = MA (t, 1) . (1 − t)2 (29) STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS C0 Z/2Z ●● ✇ ●● ✇ ●● ✇✇ ✇ ●● ✇ ✇ ●# # {{✇✇ Z/2Z Z/2Z ●● ✇ ●● ✇ ●● ✇✇ ●● ✇✇ ●# # {{✇✇✇ {0} C1 a0 a1 11 b0 b1 0̂ Figure 4. The cyclic arithmetic independence complex and the commuting square of cyclic groups corresponding to Example 16. Remark 17. In general, given a representable arithmetic matroid, the two arithmetic independence complexes that we have defined are not isomorphic. For example, 0̂ is a cut vertex of the Hasse diagram of the face poset of the cyclic independence complex in Example 15. This is not the case for the representable independence complex in Example 12, which was constructed using the same arithmetic matroid. The representable independence complex appears to be more interesting as it preserves more structure, e. g. the matroid over Z structure of the matrix (cf. [25]). Remark 18. It is possible to compute the poset of layers of a toric arrangement as follows: first construct the arithmetic independence complex derived from a representation and then identify independent sets that correspond to the same flat [34]. It is an open problem whether there is also a ’poset of layers of an arithmetic matroid’, in analogy with the lattice of flats of a matroid that exists, even if there is no representation. While we are able to construct an arithmetic independence complex in the non-representable case, the surjective finite abelian group structure on a simplicial complex defined using the cyclic groups can in general not be extended in a way required for the construction of a poset of layers. One would need to assign a cyclic group G(S) of cardinality m(S) to each S ⊆ E s. t. for a ∈ E \ S, there is a surjection G(S ∪{a}) ։ G(S) if rk(S ∪{a}) = rk(S)+ 1, and an injection G(S ∪ {a}) ֒→ G(S) otherwise. In addition, the usual commuting squares conditions would need to be satisfied. In the next paragraph we will see that in general, this is not possible. Let us consider the arithmetic matroid A = ({1, 2}, {∅, {1}, {2}}, m), where the multiplicity function m is given by m(∅) = m({1, 2}) = 3, m({1}) = 6, and m({2}) = 9. This arithmetic matroid can be represented by the list X = ((2, 0̄), (3, 0̄)) ⊆ Z ⊕ Z/3Z. The arithmetic Tutte polynomial is MA (x, y) = 3x + 3y + 9. The cyclic groups yield the following square: Z/3Z  ❍r Mm ❍❍ ✇✇ ❍❍ι2 ✇ ❍❍ ✇✇ ✇ ❍❍ ✇ # {✇✇ Z/6Z Z/9Z. ●● ●● ✈✈ ●● ✈✈ ✈ ● ✈ π1 ●● ✈ π ## {✈{ ✈ 2 Z/3Z (30) ι1 Since we require ι2 to be injective, ι2 (1̄) ∈ {3̄, 6̄} must hold. Hence π2 (ι2 (1̄)) = 0̄. On the other hand, ι1 (1̄) ∈ {2̄, 4̄}, which implies π1 (ι1 (1̄)) ∈ {1̄, 2̄}. Hence the diagram does not commute. A commuting square for this arithmetic matroid can be obtained by replacing the group Z/9Z by Z/3Z ⊕ Z/3Z. 12 MATTHIAS LENZ 4. Future directions and related work Remark 19. The construction of arithmetic independence posets and hence, of Stanley–Reisner rings can be extended to the setting of group actions on semimatroids, that where recently introduced by Delucchi and Riedel [22]. This will be done in an upcoming paper of D’Alı̀ and Delucchi. Remark 20. As stated in the introduction, in the case of matroids, algebraic structures associated to matroids have been used to prove inequalities for their f and h-vectors. For arithmetic matroid, only very little is currently known about the shape of these vectors [53]. It would be interesting to prove stronger inequalities. However, one cannot expect results such as log-concavity: let α ∈ Z≥1 and let X = (e1 , e2 , . . . , er−1 , e1 + . . . + er−1 + αed ) ⊆ Zr . The arithmetic f -polynomial is r fX (t) = tr + r1 tr−1 + . . . + r−1 t + α [31]. For r ≥ 4 and sufficiently large α, the coefficients of this polynomial are not unimodal and hence also not log-concave. Proving that our arithmetic independence posets are Cohen–Macaulay would imply that their h-vector is positive [46, Theorem 3.10]. In the case of arithmetic matroids, this follows from the positivity of the coefficients of the arithmetic Tutte polynomial, which is known [4, 14]. Remark 21. The Stanley–Reisner ring of the matroid represented by a matrix X is isomorphic to the equivariant cohomology ring of a hypertoric varieted associated with X [43, Theorem 3.2.2]. It would be nice to find a similar interpretation of the arithmetic Stanley–Reisner ring defined by an integer matrix X. A somewhat similar goal has been achieved in [21], where it was shown that equivariant Ktheory and cohomology of certain spaces is related to algebraic structures that use Dahmen–Micchelli spaces as building blocks. This was done both in the continuous and the discrete case, which correspond to the matroid and the arithmetic matroid case. Remark 22. Let X ∈ Rd×N be a matrix and let ∆∗ be the independence complex of the dual matroid. The quotient of K[∆∗ ] by a linear system of parameters is isomorphic to the continuous Dahmen–Micchelli space D(X) [19]. This suggests a similar relationship between the Stanley–Reisner ring of an arithmetic matroid that is represented by an integer matrix X ∈ Zd×N and the discrete Dahmen– Micchelli space DM(X) (see [20] for a definition), or its dual, the periodic P-space [33]. These two spaces already have the correct Hilbert series, i. e. tN −d MAX (1, 1t ). The discrete Dahmen–Michelli space DM(X) can be decomposed into ‘local’ D(X)spaces that are attached to the vertices of the toric arrangement [20, (16.1)]. Is there also a decomposition of the arithmetic Stanley–Reisner ring (derived from a representation) into ‘local’ matroid Stanley–Reisner rings attached to the vertices of the toric arrangement? Remark 23. A recent draft of Martino [36] also suggest a method to construct an arithmetic Stanley–Reisner ring, given a representation of an arithmetic matroid. The approach is somewhat similar to ours, but instead of layer groups, the abelian groups (Z-modules) that Fink and Moci assign to a list of integer vectors in the context of matroids over Z [25] are used. This structure is in some sense dual to layer groups ([22, Theorem D]), so one could expect that the arithmetic independence complex obtained in this way is isomorphic to our arithmetic independence complex derived from a representation. However, the author was not able to verify this for the following reason: the definition in [36] relies on the fact that every finitely generated abelian group is isomorphic to Zd × H for some d ∈ Z≥0 and a finite group H. But this isomorphism is not canonical and it is not specified in [36], hence the poset does not appear to be well-defined. STANLEY–REISNER RINGS FOR QUASI-ARITHMETIC MATROIDS 13 References 1. Karim Adiprasito, June Huh, and Eric Katz, Hodge theory for combinatorial geometries, 2015, arXiv:1511.02888, 61 pages. 2. Federico Ardila, Graham Denham, and June Huh, in preparation. 3. Federico Ardila and Alexander Postnikov, Combinatorics and geometry of power ideals, Trans. Amer. Math. Soc. 362 (2010), no. 8, 4357–4384. 4. Spencer Backman and Matthias Lenz, A convolution formula for Tutte polynomials of arithmetic matroids and other combinatorial structures, 2016, arXiv:1602.02664. 5. Andrew Berget, Products of linear forms and Tutte polynomials, European J. Combin. 31 (2010), no. 7, 1924–1935. 6. Anders Björner, Posets, regular CW complexes and Bruhat order, European J. Combin. 5 (1984), no. 1, 7–16. 7. , The homology and shellability of matroids and geometric lattices, Matroid applications, Encyclopedia Math. Appl., vol. 40, Cambridge Univ. Press, Cambridge, 1992, pp. 226– 283. 8. Petter Brändén and Luca Moci, The multivariate arithmetic Tutte polynomial, Trans. Amer. Math. Soc. 366 (2014), no. 10, 5523–5540. 9. Michel Brion and Michèle Vergne, Arrangement of hyperplanes. I. Rational functions and Jeffrey–Kirwan residue, Ann. Sci. École Norm. Sup. (4) 32 (1999), no. 5, 715–741. 10. Thomas Brylawski and James Oxley, The Tutte polynomial and its applications, Matroid applications, Encyclopedia Math. Appl., vol. 40, Cambridge Univ. Press, Cambridge, 1992, pp. 123–225. 11. Filippo Callegaro and Emanuele Delucchi, The integer cohomology algebra of toric arrangements, Adv. Math. 313 (2017), 746–802. 12. Manoj K. Chari, Two decompositions in topological combinatorics with applications to matroid complexes, Trans. Amer. Math. Soc. 39 (1997), no. 10, 3925–3943. 13. David A. Cox, John B. Little, and Henry K. Schenck, Toric varieties, Graduate Studies in Mathematics, vol. 124, American Mathematical Society, Providence, RI, 2011. 14. Michele D’Adderio and Luca Moci, Arithmetic matroids, the Tutte polynomial and toric arrangements, Adv. Math. 232 (2013), no. 1, 335–367. 15. Aaron Dall, Matroids: h-vectors, zonotopes, and Lawrence polytopes, Ph.D. thesis, Universitat Politècnica de Catalunya, Barcelona, 2015. 16. Giacomo d’Antonio and Emanuele Delucchi, Minimality of toric arrangements, J. Eur. Math. Soc. (JEMS) 17 (2015), no. 3, 483–521. 17. Carl de Boor, Klaus Höllig, and Sherman D. Riemenschneider, Box splines, Applied Mathematical Sciences, vol. 98, Springer-Verlag, New York, 1993. 18. Corrado De Concini and Claudio Procesi, On the geometry of toric arrangements, Transform. Groups 10 (2005), no. 3-4, 387–422. , Hyperplane arrangements and box splines, Michigan Math. J. 57 (2008), 201–225, 19. With an appendix by A. Björner, Special volume in honor of Melvin Hochster. 20. , Topics in hyperplane arrangements, polytopes and box-splines, Universitext, Springer, New York, 2011. 21. Corrado De Concini, Claudio Procesi, and Michèle Vergne, Box splines and the equivariant index theorem, J. Inst. Math. Jussieu 12 (2013), 503–544. 22. Emanuele Delucchi and Sonja Riedel, Group actions on semimatroids, 2015, arXiv:1507.06862. 23. Richard Ehrenborg, Margaret Readdy, and Michael Slone, Affine and toric hyperplane arrangements, Discrete Comput. Geom. 41 (2009), no. 4, 481–512. 24. Eva Maria Feichtner and Sergey Yuzvinsky, Chow rings of toric varieties defined by atomic lattices, Invent. Math. 155 (2004), no. 3, 515–536. 25. Alex Fink and Luca Moci, Matroids over a ring, J. Eur. Math. Soc. (JEMS) 18 (2016), no. 4, 681–731. 26. Adriano Garsia and Dennis Stanton, Group actions of Stanley-Reisner rings and invariants of permutation groups, Adv. in Math. 51 (1984), no. 2, 107–201. 27. Takayuki Hibi, Face number inequalities for matroid complexes and Cohen-Macaulay types of Stanley-Reisner rings of distributive lattices., Pac. J. Math. 154 (1992), no. 2, 253–264. 28. June Huh, h-vectors of matroids and logarithmic concavity., Adv. Math. 270 (2015), 49–59. 29. Martina Juhnke-Kubitzke and Dinh Van Le, Flawlessness of h-vectors of broken circuit complexes, International Mathematics Research Notices (first published online 24 December 2016), 21 pages. 30. Jim Lawrence, Enumeration in torus arrangements, European J. Combin. 32 (2011), no. 6, 870–881. 14 MATTHIAS LENZ 31. Matthias Lenz, Combinatorial aspects of zonotopal algebra, Ph.D. thesis, Technische Universität Berlin, 2012. 32. , The f -vector of a representable-matroid complex is log-concave, Adv. in Appl. Math. 51 (2013), no. 5, 543–545. 33. , Splines, lattice points, and arithmetic matroids, Journal of Algebraic Combinatorics 43 (2016), no. 2, 277–324. 34. , Computing the poset of layers of a toric arrangement, 2017, arXiv:1708.06646. , On powers of Plücker coordinates and representability of arithmetic matroids, 2017, 35. arXiv:1703.10520. 36. Ivan Martino, Face module for realizable Z-matroids, 2017, arXiv:1705.05816. 37. Peter McMullen, The numbers of faces of simplicial polytopes, Israel J. Math. 9 (1971), 559– 570. 38. Luca Moci, A Tutte polynomial for toric arrangements, Trans. Amer. Math. Soc. 364 (2012), no. 2, 1067–1088. 39. Peter Orlik and Louis Solomon, Combinatorics and topology of complements of hyperplanes, Invent. Math. 56 (1980), no. 2, 167–189. 40. Peter Orlik and Hiroaki Terao, Arrangements of hyperplanes, Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 300, SpringerVerlag, Berlin, 1992. 41. , Commutative algebras for arrangements, Nagoya Math. J. 134 (1994), 65–73. 42. James G. Oxley, Matroid theory, Oxford Science Publications, The Clarendon Press Oxford University Press, New York, 1992. 43. Nicholas J. Proudfoot, A survey of hypertoric geometry and topology, Toric topology, Contemp. Math., vol. 460, Amer. Math. Soc., Providence, RI, 2008, pp. 323–338. 44. John Scott Provan, Decompositions, shellings, and diameters of simplicial complexes and convex polyhedra, ProQuest LLC, Ann Arbor, MI, 1977, Ph. D. Thesis – Cornell University. 45. Richard P. Stanley, The number of faces of a simplicial convex polytope, Adv. in Math. 35 (1980), no. 3, 236–238. , f -vectors and h-vectors of simplicial posets, J. Pure Appl. Algebra 71 (1991), no. 2-3, 46. 319–331. 47. , Combinatorics and commutative algebra, 2nd ed., Progress in mathematics, Birkhäuser, Boston, Mass., 1996. 48. , An introduction to hyperplane arrangements, Geometric combinatorics, IAS/Park City Math. Ser., vol. 13, Amer. Math. Soc., Providence, RI, 2007, pp. 389–496. 49. Ed Swartz, Lower bounds for h-vectors of k-CM, independence, and broken circuit complexes, SIAM J. Discrete Math. 18 (2004/05), no. 3, 647–661. 50. Ed Swartz, Thirty-five years and counting, 2014, arXiv:1411.0987. 51. Hiroaki Terao, Algebras generated by reciprocals of linear forms., J. Algebra 250 (2002), no. 2, 549–558 (English). 52. David G. Wagner, Algebras related to matroids represented in characteristic zero, European J. Combin. 20 (1999), no. 7, 701–711. 53. Suijie Wang, Yeong-Nan Yeh, and Fengwei Zhou, Bounds on characteristic polynomials, 2015, arXiv:1209.5185v4. Université de Fribourg, Département de Mathématiques, 1700 Fribourg, Switzerland E-mail address: [email protected]
0math.AC
PAM: Parallel Augmented Maps arXiv:1612.05665v3 [cs.DS] 26 Mar 2018 Yihan Sun Carnegie Mellon University [email protected] Daniel Ferizovic Karlsruhe Institute of Technology [email protected] Guy Blelloch Carnegie Mellon University [email protected] March 28, 2018 Abstract Ordered (key-value) maps are an important and widely-used data type for large-scale data processing frameworks. Beyond simple search, insertion and deletion, more advanced operations such as range extraction, filtering, and bulk updates form a critical part of these frameworks. We describe an interface for ordered maps that is augmented to support fast range queries and sums, and introduce a parallel and concurrent library called PAM (Parallel Augmented Maps) that implements the interface. The interface includes a wide variety of functions on augmented maps ranging from basic insertion and deletion to more interesting functions such as union, intersection, filtering, extracting ranges, splitting, and range-sums. We describe algorithms for these functions that are efficient both in theory and practice. As examples of the use of the interface and the performance of PAM we apply the library to four applications: simple range sums, interval trees, 2D range trees, and ranked word index searching. The interface greatly simplifies the implementation of these data structures over direct implementations. Sequentially the code achieves performance that matches or exceeds existing libraries designed specially for a single application, and in parallel our implementation gets speedups ranging from 40 to 90 on 72 cores with 2-way hyperthreading. 1 Introduction The map data type (also called key-value store, dictionary, table, or associative array) is one of the most important data types in modern large-scale data analysis, as is indicated by systems such as F1 [60], Flurry [5], RocksDB [57], Oracle NoSQL [50], LevelDB [41]. As such, there has been significant interest in developing high-performance parallel and concurrent algorithms and implementations of maps (e.g., see Section 2). Beyond simple insertion, deletion, and search, this work has considered “bulk” functions over ordered maps, such as unions [20, 33, 12], bulk-insertion and bulk-deletion [26, 6, 24], and range extraction [14, 55, 7]. One particularly useful function is to take a “sum” over a range of keys, where sum means with respect to any associative combine function (e.g., addition, maximum, or union). As an example of such a range sum consider a database of sales receipts keeping the value of each sale ordered by the time of sale. When analyzing the data for certain trends, it is likely useful to quickly query the sum or maximum of sales during a 1 Application Range Sum Interval Tree 2d Range Tree Inverted Index In Theory In Practice (Asymptotic bound) (Running Time in seconds) Construct Construct Query Query Work Span Size Seq. Par. Spd. Size Seq. Par. 10 8 O(n log n) O(log n) O(log n) 10 1844.38 28.24 65.3 10 271.09 3.04 O(n log n) O(log n) O(log n) 108 14.35 0.23 63.2 108 53.35 0.58 3 2 8 O(n log n) O(log n) O(log n) 10 197.47 3.10 63.7 106 48.13 0.55 2 9 O(n log n) O(log n) * 1.96 × 10 1038 12.6 82.3 105 368 4.74 Table 1: The asymptotic cost and experimental results of the applications using PAM. Seq. = sequential, Par. = Parallel (on 72 cores with 144 hyperthreads), Spd. = Speedup. “Work” and “Span” are used to evaluate the theoretical bound of parallel algorithms (see Section 4). *: Depends on the query. period of time. Although such sums can be implemented naively by scanning and summing the values within the key range, these queries can be answered much more efficiently using augmented trees [25, 18]. For example, the sum of any range on a map of size n can be answered in O(log n) time. This bound is achieved by using a balanced binary tree and augmenting each node with the sum of the subtree. Such a data structure can also implement a significantly more general form of queries efficiently. In the sales receipts example they can be used for reporting the sales above a threshold in O(k log(n/k + 1)) time (k is the output size) if the augmentation is the maximum of sales, or in O(k + log n) time [44] with a more complicated augmentation. More generally they can be used for interval queries, k-dimensional range queries, inverted indices (all described later in the paper), segment intersection, windowing queries, point location, rectangle intersection, range overlaps, and many others. Although there are dozens of implementations of efficient range sums, there has been very little work on parallel or concurrent implementations—we know of none for the general case, and only two for specific applications [2, 34]. In this paper we present a general library called PAM (Parallel Augmented Maps) for supporting in-memory parallel and concurrent maps with range sums. PAM is implemented in C++. We use augmented value to refer to the abstract “sum” on a map (defined in Section 3). When creating a map type the user specifies two augmenting functions chosen based on their application: a base function g which gives the augmented value of a single element, and a combine function f which combines multiple augmented values, giving the augmented value of the map. The library can then make use of the functions to keep “partial sums” (augmented values of sub-maps) in a tree that asymptotically improve the performance of certain queries. Augmented maps in PAM support standard functions on ordered maps (which maintain the partial sums), as well as additional function specific to augmented maps (see Figure 1 for a partial list). The standard functions include simple functions such as insertion, and bulk functions such as union. The functions specific to augmented maps include efficient range-sums, and filtering based on augmented values. PAM uses theoretically efficient parallel algorithms for all bulk functions, and is implemented based on using the “join” function to support parallelism on balanced trees [12]. We extend the approach of using joins to handle augmented values, and also give algorithms based on “join” for some other operations such as filtering, multi-insert, and mapReduce. PAM uses functional data structures and hence the maps are fully persistent—updates will not modify an existing map but will create a new version [22]. Persistence is useful in various applications, including the range tree and inverted index applications described in this paper. It is also useful in supporting a form of concurrency based on snapshot isolation. In particular each concurrent process can atomically read a snapshot of a map, and can manipulate and modify their “local” copy without affecting the view of other users, or 2 Spd. 89.2 92.7 87.5 77.6 being affected by any other concurrent modification to the shared copy1 . However PAM does not directly support traditional concurrent updates to a shared map. Instead concurrent updates need to be batched and applied in bulk in parallel. We present examples of four use cases for PAM along with experimental performance numbers. Firstly we consider the simple case of maintaining the sum of the values in a map using integer addition. For this case we report both sequential and parallel times for a wide variety of operations (union, search, multi-insert, rangesum, insertion, deletion, filter, build). We also present performance comparisons to other implementations of maps that do not support augmented values. Secondly we use augmented maps to implement interval trees. An interval tree maintains a set of intervals (e.g. the intervals of times in which users are logged into a site, or the intervals of time for FTP connections) and can quickly answer queries such as if a particular point is covered by any interval (e.g. is there any user logged in at a given time). Thirdly we implement 2d range trees. Such trees maintain a set of points in 2 dimensions and allow one to count or list all entries within a given rectangular range (e.g. how many users are between 20 and 25 years old and have salaries between $50K and $90K). Such counting queries can be answered in O(log2 n) time. We present performance comparison to the sequential range-tree structure available in CGAL [47]. Finally we implement a weighted inverted index that supports and/or queries, which can quickly return the top k matches. The theoretical cost and practical performance of these four applications are shown in Table 1. The main contributions of this paper are: 1. An interface for augmented maps (Section 3). 2. Efficient parallel algorithms and an implementation for the interface as part of the PAM library (Section 4). 3. Four example applications of the interface (Section 5). 4. Experimental analysis of the examples (Section 6). 2 Related Work Many researchers have studied concurrent algorithms and implementations of maps based on balanced search trees focusing on insertion, deletion and search [36, 37, 26, 13, 6, 24, 10, 15, 21, 40, 46]. Motivated by applications in data analysis recently researchers have considered mixing atomic range scanning with concurrent updates (insertion and deletion) [14, 55, 7]. None of them, however, has considered sub-linear time range sums. There has also been significant work on parallel algorithms and implementations of bulk operations on ordered maps and sets [53, 52, 11, 26, 20, 33, 24, 12, 3]. Union and intersection, for example, are available as part of the multicore version of the C++ Standard Template Library [26]. Again none of this work has considered fast range sums. There has been some work on parallel data structures for specific applications of range sums such as range trees [34]. There are many theoretical results on efficient sequential data-structures and algorithms for range-type queries using augmented trees in the context of specific applications such as interval queries, k-dimensional range sums, or segment intersection queries (see e.g. [43]). Several of these approaches have been implemented as part of systems [35, 47]. Our work is motivated by this work and our goal is to parallelize many of 1 Throughout the paper we use parallel to indicate using multiple processors to work on a single bulk function, such as multi-insertion or filtering, and we use concurrent to indicate independent “users” (or processes) asynchronously accessing the same structure at the same time. 3 (Partial) Interface AugMap AM(K, V, A, <, g, f, I) : empty or ∅ size single find insert union filter upTo range mapReduce : : : : : : : : : : build augVal augLeft augRange augFilter augProject : : : : : : M M →Z K ×V →M M × K → V ∪ {} M × K × V × (V × V → V ) → M M × M × (V × V → V ) → M (K × V → bool) × M → M M ×K →M M ×K ×K →M (K × V → B) × (B × B → B) × B ×M →B (K × V ) seq. × (V × V → V ) → M M →A M ×K →A M ×K ×K →A (A → bool) × M → M (A → B) × (B × B → B) ×M ×K ×K →B Figure 1: The (partial) interface for an augmented map, with key type K, value type V , and augmented value type A. The augmenting monoid is (A, f, I). Other functions not listed include delete, intersect, difference, split, join, downTo, previous, next, rank, and select. In the table seq. means a sequence. these ideas and put them in a framework in which it is much easier to develop efficient code. We know of no other general framework as described in Section 3. Various forms of range queries have been considered in the context of relational databases [29, 28, 31, 16, 27]. Ho et. al. [31] specifically consider fast range sums. However the work is sequential, only applies to static data, and requires that the sum function has an inverse (e.g. works for addition, but not maximum). More generally, we do not believe that traditional (flat) relational databases are well suited for our approach since we use arbitrary data types for augmentation—e.g. our 2d range tree has augmented maps nested as their augmented values. Recently there has been interest in range queries in large clusters under systems such as Hadoop [4, 2]. Although these systems can extract ranges in work proportional to the number of elements in the range (or close to it), they do not support fast range sums. None of the “nosql” systems based on key-value stores [5, 41, 57, 50] support fast range sums. 3 Augmented Maps Augmented maps, as defined here, are structures that associate an ordered map with a “sum” (the augmented value) over all entries in the map. It is achieved by using a base function g and a combine function f . More formally, an augmented map type AM is parameterized on the following: 4 K, < : K × K → bool, V, key type total ordering on the keys value type A, g : K × V → A, f : A × A → A, I:A augmented value type the base function the combine function identity for f The first three parameters correspond to a standard ordered map, and the last four are for the augmentation. f must be associative ((A, f, I) is a monoid), and we use f (a1 , a2 , . . . , an ) to mean any nesting. Then the augmented value of a map m = {(k1 , v1 ), (k2 , v2 ), . . . , (kn , vn )} is defined as: A(m) = f (g(k1 , v1 ), g(k2 , v2 ), . . . , g(kn , vn )) As an example, the augmented map type: AM(Z, <Z , Z, Z, (k, v) → v, +Z , 0) (1) defines an augmented map with integer keys and values, ordered by <Z , and for which the augmented value of any map of this type is the sum of its values. An augmented map type supports an interface with standard functions on ordered maps as well as a collection of functions that make use of f and g. Figure 1 lists an example interface, which is the one used in this paper and supported by PAM. In the figure, the definitions above the dashed line are standard definitions for an ordered map. For example, the range(m, k1 , k2 ) extracts the part of the map between keys k1 and k2 , inclusive, returning a new map. The mapReduce(g 0 , f 0 , I 0 , m) applies the function g 0 to each element of the map m, and then sums them with the associative function f 0 with identity I 0 . Some functions listed in Figure 1, such as U NION, I NSERT and B UILD, take an addition argument h, which itself is a function. When applicable it combines values of all entries with the same key. For example the union(m1 , m2 , h) takes union of two maps, and if any key appears in both maps, it combines their values using h. Most important to this paper are the definitions below the dashed line, which are functions specific to augmented maps. All of them can be computed using the functions above the dashed line. However, they can be much more efficient by maintaining the augmented values of sub-maps (partial sums) in a tree structure. Table 2 gives the asymptotic costs of the functions based on the implementation described in Section 4, which uses augmented balanced search trees. The function augVal(m) returns A(m), which is equivalent to mapReduce(g, f, I, m) but can run in constant instead of linear work. This is because the functions f and g are chosen ahead of time and integrated into the augmented map data type, and therefore the sum can be maintained during updates. The function augRange(m, k1 , k2 ) is equivalent to augVal(range(m, k1 , k2 )) and augLeft(m, k) is equivalent to augVal(upTo(m, k)). These can also be implemented efficiently using the partial sums. The last two functions accelerate two common queries on augmented maps, but are only applicable when their function arguments meet certain requirements. They also can be computed using the plain map functions, but can be much more efficient when applicable. The augFilter(h, m) function is equivalent to filter(h0 , m), where h0 : K × V 7→ bool satisfies h(g(k, v)) ⇔ h0 (k, v). It is only applicable if h(a) ∨ h(b) ⇔ h(f (a, b)) for any a and b (∨ is the logical or). In this case the filter function can make use of the partial sums. For example, assume the values in the map are boolean values, f is a logical-or, g(k, v) = v, and we want to filter the map using function h0 (k, v) = v. In this case we can filter out a whole sub-map once we see it has false as a partial sum. Hence we can set h(a) = a and directly use augFilter(m, h). The function is used in interval trees (Section 5.1). The augProject(g 0 , f 0 , m, k1 , k2 ) function is equivalent to g 0 (augRange(m, k1 , k2 )). It 5 requires, however, that (B, f 0 , g 0 (I)) is a monoid and that f 0 (g 0 (a), g 0 (b)) = g 0 (f (a, b)). This function is useful when the augmented values are themselves maps or other large data structures. It allows projecting the augmented values down onto another type by g 0 (e.g. project augmented values with complicated structures to values like their sizes) then summing them by f 0 , and is much more efficient when applicable. For example in range trees where each augmented value is itself an augmented map, it greatly improves performance for queries. 4 Data Structure and Algorithms In this section we outline a data structure and associated algorithms used in PAM that can be used to efficiently implement augmented maps. Our data structure is based on abstracting the balancing criteria of a class of trees (e.g. AVL or Red-Black trees) in terms of a single J OIN function [12], which joins two maps with a key between them (defined more formally below). Prior work describes parallel algorithms for U NION, D IFFERENCE, and I NTERSECT for standard un-augmented sets and maps using just J OIN [12]. Here we extend the methodology to handle augmentation, and also describe some other functions based on join. Because the balancing criteria is fully abstracted in J OIN, similar algorithm can be applied to AVL trees [1] red-black trees [8], weight-balanced trees and treaps [59]. We implemented all of them in PAM. By default, we use weight-balanced trees [48] in PAM, because it does not require extra balancing criteria in each node (the node size is already stored), but users can change to any specific balancing scheme using C++ templates. Augmentation. We implement augmentation by storing with every tree node the augmented sum of the subtree rooted at that node. This localizes application of the augmentation functions f and g to when a node is created or updated2 . In particular when creating a node with a left child L, right child R, key k and value v the augmented value can be calculated as f (A(L), f (g(k, v), A(R))), where A(·) extracts the augmented value from a node. Note that it takes two applications of f since we have to combine three values, the left, middle and right. We do not store g(k, v). In our algorithms, creation of new nodes is handled in J OIN, which also deals with rebalancing when needed. Therefore all the algorithms and code that do not explicitly need the augmented value are unaffected by and even oblivious of augmentation. Parallelism. We use fork-join parallelism to implement internal parallelism for the bulk operations. In pseudocode the notation “s1 || s2 ” means that the two statements s1 and s2 can run in parallel, and when both are finished the overall statement finishes. In most cases parallelism is over the structure of the trees—i.e. applying some function in parallel over the two children, and applying this parallelism in a nested fashion recursively (Figure 2 shows several examples). The only exception is build, where we use parallelism in a sort and in removing duplicates. In the PAM library fork-join parallelism is implemented with the cilkplus extensions to C++ [39]. We have a granularity set so parallelism is not used on very small trees. Theoretical bounds. To analyze the asymptotic costs in theory we use work (W ) and span (S), where work is the total number of operations (the sequential cost) and span is the length of the critical path [18]. Almost all the algorithms we describe, and implemented in PAM, are asymptotically optimal in terms of work in the comparison model, i.e., the total number of comparisons. Furthermore they achieve very good parallelism (i.e. polylogarithmic span). Table 2 list the cost of some of the functions in PAM. When the augmenting functions f and g both take constant time, the augmentation only affects all the bounds by a constant factor. 2 For supporting persistence, updating a tree node, e.g., when it is involved in rotations and is set a new child, usually results in the creation of a new node. See details in the persistence part. 6 Function Work Span Map operations insert, delete, find, first, log n log n last, previous, next, rank, select, upTo, downTo Bulk operations join log n − log m log n − log m  union∗ , intersect∗ , n log n log m m log m +1 ∗ difference mapReduce n log n filter n log2 n range, split, join2 log n log n build n log n log n Augmented operations augVal 1 1 augRange, augProject log n log n augFilter (output size k) k log(n/k + 1) log2 n Table 2: The core functions in PAM and their asymptotic costs (all big-O). The cost is given under the assumption that the base function g, the combine function f and the functions as parameters (e.g., for AUG P ROJECT) take constant time to return. For the functions noted with ∗ , the efficient algorithms with bounds shown in the table are introduced and proved in [12]. For functions with two input maps (e.g., U NION), n is the size of the larger input, and m of the smaller. Furthermore experiments show that this constant factor is reasonably small, typically around 10% for simple functions such as summing the values or taking the maximum. Join, Split, Join2 and Union. As mentioned, we adopt and extend the methodology introduced in [12], which builds all map functions using J OIN(L, k, R). The J OIN function takes two ordered maps L and R and a key-value pair (k, v) that sits between them (i.e. max(L) < k < min(R)) and returns the composition of L, (k, v) and R. Using J OIN it is easy to implement two other useful functions: S PLIT and J OIN 2. The function hL, v, Ri = S PLIT(A, k) splits the map A into the elements less than k (placed in L) and those greater (placed in R). If k appears in A its associated value is returned as v, otherwise v is set to be an empty value noted as . The function T =J OIN 2(TL , TR ) works similar to J OIN, but without the middle element. These are useful in the other algorithms. Algorithmic details can be found in [12]. The first function in Figure 2 defines an algorithm for U NION based on S PLIT and J OIN. We add a feature that it can accept a function h as parameter. If one key appears in both sets, the values are combined using h. In the pseudocode we use hL, k, v, Ri = T to extract the left child, key, value and right child from the tree node T , respectively. The pseudocode is written in a functional (non side-effecting) style. This matches our implementation, as discussed in persistence below. Insert and Delete. Instead of the classic implementations of I NSERT and D ELETE, which are specific to the balancing scheme, we define versions based purely on J OIN, and hence independent of the balancing scheme. 7 1 U NION(T1 , T2 , h) = 2 if T1 = ∅ then T2 3 else if T2 = ∅ then T1 4 else let hL2 , k, v, R2 i = T2 5 and hL1 , v 0 , R2 i = S PLIT(T1 , k) 6 and L = U NION(L1 , L2 ) || R = U NION(R1 , R2 ) 7 in if v 0 6=  then J OIN(L, k, h(v, v 0 ), R) 8 else J OIN(L, k, v, R) 9 I NSERT(T, k, v, h) = 10 if T = ∅ then S INGLETON(k, v) 11 else let hL, k0 , v 0 , Ri = T in 12 if k < k0 then J OIN(I NSERT(L, k, v), k0 , v 0 , R) 13 else if k > k0 then J OIN(L, k0 , v 0 , I NSERT(R, k, v)) 14 else J OIN(L, k, h(v 0 , v), R) 15 M AP R EDUCE(T, g 0 , f 0 , I 0 ) = 16 if T = ∅ then I 0 17 else let hL, k, v, Ri = T 18 and L0 = M AP R EDUCE(L, g 0 , f 0 , I 0 ) || 19 R0 = M AP R EDUCE(R, g 0 , f 0 , I 0 ) 20 in f 0 (L0 , g 0 (k, v), R0 ) 21 AUG L EFT(T, k0 ) = 22 if T = ∅ then I 23 else let hL, k, v, Ri = T 24 in if k0 < k then AUG L EFT(L, k0 ) 25 else f (A(L), g(k, v),AUG L EFT(R, k0 )) 26 F ILTER(T, h) = 27 if T = ∅ then ∅ 28 else let hL, k, v, Ri = T 29 and L0 = F ILTER(L, h) || R0 = F ILTER(R, h) 30 in if h(k, v) then J OIN(L0 , k, v, R0 ) else J OIN 2(L0 , R0 ) 31 AUG F ILTER(T, h) = 32 if (T = ∅) OR (¬h(A(T ))) then ∅ 33 else let hL, k, v, Ri = T 34 and L0 = AUG F ILTER(L, h) || 35 R0 = AUG F ILTER(R, h) 36 in if h(g(k, v)) then J OIN(L0 , k, v, R0 ) else J OIN 2(L0 , R0 ) 37 B UILD ’(S, i, j) = 38 if i = j then ∅ 39 else if i + 1 = j then S INGLETON(S[i]) 40 else let m = (i + j)/2 41 and L = B UILD ’(S, i, m) || R = B UILD ’(S, m + 1, j) 42 in J OIN(L, S[m], R) 43 B UILD(S) = 44 B UILD ’(R EMOVE D UPLICATES(S ORT(S)), 0, |S|) Figure 2: Pseudocode for some of the functions on augmented maps. U NION is from [12], the rest are new. For an associated binary function f , f (a, b, c) means f (a, f (b, c)). 8 Like the U NION function, I NSERT also takes an addition function h as input, such that if the key to be inserted is found in the map, the values will be combined by h. The algorithm for insert is given in Figure 2, and the algorithm for deletion is similar. The algorithms run in O(log n) work (and span since sequential). One might expect that abstracting insertion using J OIN instead of specializing for a particular balance criteria has significant overhead. Our experiments show this is not the case—and even though we maintain the reference counter for persistence, we are only 17% slower sequentially than the highly-optimized C++ STL library (see section 6). Build. To construct an augmented map from a sequence of key-value pairs we first sort the sequence by the keys, then remove the duplicates (which are contiguous in sorted order), and finally use a balanced divide-andconquer with J OIN. The algorithm is given in Figure 2. The work is then O(Wsort(n) + Wremove(n) + n) and the span is O(Ssort(n) + Sremove(n) + log n). For work-efficient sort and remove-duplicates with O(log n) span this gives the bounds in Table 2. Reporting Augmented Values. As an example, we give the algorithm of AUG L EFT(T, k 0 ) in Figure 2, which returns the augmented value of all entries with keys less than k 0 . It compares the root of T with k 0 , and if k 0 is smaller, it calls AUG L EFT on its left subtree. Otherwise the whole left subtree and the root should be counted. Thus we directly extract the augmented value of the left subtree, convert the entry in the root to an augmented value by g, and recursively call AUG L EFT on its right subtree. The three results are combined using f as the final answer. This function visits at most O(log n) nodes, so it costs O(log n) work and span assuming f , g and I return in constant time. The AUG R ANGE function, which reports the augmented value of all entries in a range, can be implemented similarly with the same asymptotical bound. Filter and AugFilter. The filter and augFilter function both select all entries in the map satisfying condition h. For a (non-empty) tree T, F ILTER recursively filters its left and right branches in parallel, and combines the two results with J OIN or J OIN 2 depending on whether h is satisfied for the entry at the root. It takes linear work and O(log2 n) span for a balanced tree. The augFilter(h, m) function has the same effect as filter(h0 , m), where h0 : K × V 7→ bool satisfies h(g(k, v)) ⇔ h0 (k, v) and is only applicable if h(a) ∨ h(b) ⇔ h(f (a, b)). This can asymptotically improve efficiency since if h(A(T )) is false, then we know that h will not hold for any entries in the tree T 3 , so the search can be pruned (see Figure 1). For k output entries, this function takes O(k log(n/k + 1)) work, which is asymptotically smaller than n and is significantly more efficient when k is small. Its span is O(log2 n). Other Functions. We implement many other functions in PAM, including all in Figure 1. In M AP R EDUCE(g 0 , f 0 , I 0 , T ), for example, it is recursively applied on T ’s two subtrees in parallel, and g 0 is applied to the root. The three values are then combined using f 0 . The function AUG P ROJECT(g 0 , f 0 , m, k1 , k2 ) on the top level adopts a similar method as AUG R ANGE to get related entries or subtrees in range [k1 , k2 ], projects g 0 to their augmented values and combine results by f 0 . Persistence. The PAM library uses functional data structures, and hence does not modify existing tree nodes but instead creates new ones [49]. This is not necessary for implementing augmented maps, but is helpful in the parallel and concurrent implementation. Furthermore the fact that functional data structures are persistent (no existing data is modified) has many applications in developing efficient data structures [22]. In this paper three of our four applications (maintaining inverted indices, interval trees and range trees) use persistence in a critical way. The J OIN function copies nodes along the join path, leaving the two original 3 Similar methodology can be applied if there exists a function h00 to decide if all entries in a subtree will be selected just by reading the augmented value. 9 trees unchanged. All of our code is built on J OIN in the functional style, returning new trees rather than modifying old ones. Such functional data structures mean that parts of trees are shared, and that old trees for which there are no longer any pointers need to be garbage collected. We use a reference counting garbage collector. When the reference count is one we use a standard reuse optimization—reusing the current node instead of collecting it and allocating a new one [32]. Concurrency. In PAM any number of users can concurrently access and update their local copy (snapshot) of any map. This is relatively easy to implement based on functional data structures (persistent) since each process only makes copies of new data instead of modifying shared data. The one tricky part is maintaining the reference counts and implementing the memory allocator and garbage collector to be safe for concurrency. This is all implemented in a lock-free fashion. A compare-and-swap is used for updating reference counts, and a combination of local pools and a global pool are used for memory allocation. Updates to the shared instance of a map can be made atomically by swapping in a new pointer (e.g., with a compare-and-swap). This means that updates are sequentialized. However they can be accumulated and applied when needed in bulk using the parallel multi-insert or multi-delete. 5 Applications In this section we describe applications that can be implemented using the PAM interface. Our first application is given in Equation 1, which is a map storing integer keys and values, and keeping track of sum over values. In this section we give three more involved applications of augmented maps: interval trees, range trees and word indices (also called inverted indices). We note that although we use trees as the implementation, the abstraction of the applications to augmented maps is independent of representations. 5.1 Interval Trees We give an example of how to use our interface for interval trees [23, 25, 18, 43, 35, 19]. This data structure maintains a set of intervals on the real line, each defined by a left and right endpoint. Various queries can be answered, such as a stabbing query which given a point reports whether it is in an interval. There are various versions of interval trees. Here we discuss the version as described in [18]. In this version each interval is stored in a tree node, sorted by the left endpoint (key). A point x is covered by in an interval in the tree if the maximum right endpoint for all intervals with keys less than x is greater than x (i.e. an interval starts to the left and finishes to the right of x). By storing at each tree node the maximum right endpoint among all intervals in its subtree, the stabbing query can be answered in O(log n) time. An example is shown in Figure 4. In our framework this can easily be implemented by using the left endpoints as keys, the right endpoints as values, and using max as the combining function. The definition is: I = AM(R, <R , R, R, (k, v) 7→ v, maxR , −∞) Figure 3 shows the C++ code of the interval tree structure using PAM. The entry with augmentation is defined in entry starting from line 3, containing the key type key t, value type val t, comparison function comp, augmented value type (aug t), the base function g (base), the combine function f (combine), and the identity of f (identity). An augmented map (line 16) is then declared as the interval tree structure with entry. The constructor on line 18 builds an interval tree from an array of n intervals by directly calling the augmented-map constructor in PAM (O(n log n) work). The function stab(p) returns if p is inside any interval using amap::aug left(m,p). As defined in Section 3 and 4, this function returns the augmented sum, which is the max on values, of all entries with keys less than p. As mentioned we need only to compare 10 it with p. The function report all(p) returns all intervals containing p, which are those with keys less than p but values larger than p. We first get the sub-map in m with keys less then p (amap::upTo(m,p)), and filter all with values larger than p. Note that h(a) = (a > p) and the combine function f (a, b) = max(a, b) satisfy h(a) ∨ h(b) ⇔ h(f (a, b)). This means that to get all nodes with values > p, if the maximum value of a subtree is less than p, the whole subtree can be discarded. Thus we can apply amap::aug filter (O(k log(n/k + 1)) work for k results), which is more efficient than a plain filter. 1 struct interval_map { 2 using interval = pair<point, point>; 3 struct entry { 4 using key_t = point; 5 using val_t = point; 6 using aug_t = point; 7 static bool comp(key_t a, key_t b) 8 { return a < b;} 9 static aug_t identity() 10 { return 0;} 11 static aug_t base(key_t k, val_t v) 12 { return v;} 13 static aug_t combine(aug_t a, aug_t b) { 14 return (a > b) ? a : b;} 15 }; 16 using amap = aug_map<entry>; 17 amap m; 18 19 interval_map(interval* A, size_t n) { m = amap(A,A+n); } 20 21 bool stab(point p) { return (amap::aug_left(m,p) > p);} 22 23 24 25 amap report_all(point p) { amap t = amap::up_to(m,p); auto h = [] (P a) -> bool {return a>p;} return amap::augFilter(t,h);}; Figure 3: The definition of interval maps using PAM in C++. 5.2 Range Trees Given a set of n points {pi = (xi , yi )} in the plane, where xi ∈ X, yi ∈ Y , each point with weight wi ∈ W , a 2D range sum query asks for the sum of weights of points within a rectangle defined by a horizontal range (xL , xR ) and vertical range (yL , yR ). A 2D range query reports all points in the query window. In this section, we describe how to adapt 2D range trees to the PAM framework to efficiently support these queries. The standard 2D range tree [9, 43, 58] is a two-level tree (or map) structure. The outer level stores all the points ordered by the x-coordinates. Each tree node stores an inner tree with all points in its subtree but ordered by the y-coordinates. Then a range query can be done by two nested queries on x- and y-coordinates respectively. Sequential construction time and query time is O(n log n) and O(log2 n) respectively (the query time can be reduced to O(log n) with reasonably complicated approaches). 11 Key: Left endpoint; Val: Right endpoint; 3 2 1 𝒈𝒈(𝒌𝒌, 𝒗𝒗) = 𝑣𝑣; 𝒇𝒇(𝒂𝒂𝟏𝟏 , 𝒂𝒂𝟐𝟐 ) = max(𝑣𝑣1 , 𝑣𝑣2 ); 5 4 6 (3,5) (4,5) (4,5) (2,6) (1,7) 7 (6,7) (6,7) 5 (1,7) (2,6) 9 7 (3,5) 8 7 (5,8) 8 9 (7,9) 9 9 (number line) (5,8) (7,9) (key,val) aug_val Figure 4: An example of an interval tree. In our interface the outer tree (RO ) is represented as an augmented map in which keys are points (sorted by x-coordinates) and values are weights. The augmented value, which is the inner tree, is another augmented map (RI ) storing all points in its subtree using the points as the key (sorted by y-coordinates) and the weights as the value. The inner map is augmented by the sum of the weights for efficiently answering range sums. Union is used as the combine function for the outer map. The range tree layout is illustrated in in Figure 5, and the definition in our framework is: RI = AM ( P , <Y , W , W , (k, v) → v, +W , 0W ) RO = AM ( P , <X , W , RI , RI .singleton, ∪, ∅ ) Here P = X × Y is the point type. W is the weight type. +W and 0W are the addition function on W and its identity respectively. It is worth noting that because of the persistence supported by the PAM library, the combine function U NION does not affect the inner trees in its two children, but builds a new version of RI containing all the elements in its subtree. This is important in guaranteeing the correctness of the algorithm. To answer the query, we conduct two nested range searches: (xL , xR ) on the outer tree, and (yL , yR ) on the related inner trees [43, 58]. It can be implemented using the augmented map functions as: QUERY (rO , xL , xR , yL , yR ) = let g 0 (rI ) = AUG R ANGE(rI , yL , yR ) in AUG P ROJECT(g 0 , +W , rO , xL , xR ) The augProject on RO is the top-level searching of x-coordinates in the outer tree, and g 0 projects the inner trees to the weight sum of the corresponding y-range. f 0 (i.e., +W ) combines the weight of all results of g 0 to give the sum of weights in the rectangle. When f 0 is an addition, g 0 returns the range sum, and f is a U NION, the condition f 0 (g 0 (a), g 0 (b)) = g 0 (a) + g 0 (b) = g 0 (a ∪ b) = g 0 (f (a, b)) holds, so AUG P ROJECT is applicable. Combining the two steps together, the query time is O(log2 n). We can also answer range queries that report all point inside a rectangle in time O(k + log2 n), where k is the output size. 5.3 Ranked Queries on Inverted Indices Our last application of augmented maps is building and searching a weighted inverted index of the kind used by search engines [66, 56] (also called an inverted file or posting file). For a given corpus, the index stores a mapping from words to second-level mappings. Each second-level mapping, maps each document that the term appears in to a weight, corresponding to the importance of the word in the document and the importance 12 lc key 〈𝑥𝑥, 𝑦𝑦〉 Outer tree node Left subtree val 𝑤𝑤 lc Outer Tree (𝑹𝑹𝑶𝑶 ) Node combine base aug_val Union Singleton Inner tree Inner Tree (𝑹𝑹𝑰𝑰 ) Node key val combine base aug_val 〈𝑦𝑦, 𝑥𝑥〉 𝑤𝑤 Add (+) value (𝑤𝑤) ∑𝑤𝑤 rc Inner tree node Inner tree node Right subtree Left subtree rc Outer tree node Right subtree Figure 5: The range tree data structure under PAM framework. In the illustration we omit some attributes such as size, reference counter and the identity function. Note that the functions combine, base and identity of both the outer tree and inner tree are static functions, so these functions shown in this figure actually do not take any real spaces. of the document itself. Using such a representation, conjunctions and disjunctions on terms in the index can be found by taking the intersection and union, respectively, of the corresponding maps. Weights are combined when taking unions and intersections. It is often useful to only report the k results with highest weight, as a search engine would list on its first page. This can be represented rather directly in our interface. The inner map, maps document-ids (D) to weights (W ) and uses maximum as the augmenting function f . The outer map maps terms (T ) to inner maps, and has no augmentation. This corresponds to the maps: MI = AM ( D, <D , W , W , (k, v) → v, maxW , 0 ) MO = M ( T , <T MI , ) We use M(K, <K , V ) to represent a plain map with key type K, total ordering defined by <K and value type V . In the implementation, we use the feature of PAM that allows passing a combining function with U NION and I NTERSECT (see Section 4), for combining weights. The AUG F ILTER function can be used to select the k best results after taking unions and intersections over terms. Note that an important feature is that the U NION function can take time that is much less that the size of the output (e.g., see Section 4). Therefore using augmentation can significantly reduce the cost of finding the top k relative to naively checking all the output to pick out the k best. The C++ code for our implementation is under 50 lines. 6 Experiments For the experiments we use a 72-core Dell R930 with 4 x Intel(R) Xeon(R) E7-8867 v4 (18 cores, 2.4GHz and 45MB L3 cache), and 1Tbyte memory. Each core is 2-way hyperthreaded giving 144 hyperthreads. Our code was compiled using g++ 5.4.1, which supports the Cilk Plus extensions. Of these we only use cilk spawn and cilk sync for fork-join, and cilk for as a parallel loop. We compile with -O2. We use numactl -i all in all experiments with more than one thread. It evenly spreads the memory pages across the processors in a round-robin fashion. 13 We ran experiments that measure performance of our four applications: the augmented sum (or max), the interval tree, the 2D range tree and the word index searching. (a). 5 × 107 insertions, throughput (M/s), p = 144. Compare to some concurrent data structures. (b). 107 concurrent reads, throughput (M/s), p = 144. Compare to some concurrent data structures. 100 10 Skiplist OpenBW Masstree B+ tree PAM 1 0.1 1 2 4 8 16 32 10 Throughput Throughput 100 Skiplist OpenBW Masstree B+ tree PAM 1 0.1 72 144 1 2 4 Number of Threads (d). n = 108 , speedup. The interval tree using PAM. Speedup Time (s) 0.10000 0.00100 0.00010 102 103 104 105 106 90 64 600 32 100 16 8 4 Build Query 2 Union Build 1 107 108 Input Size 16 32 72 144 (e). n = 108 , sequential building time. The range tree. Compare to CGAL. Building Time (s) (c). n = 108 , running time. PAM on different input sizes. 0.01000 8 Number of Threads 1 2 4 8 16 32 Number of Threads 72 144 10 1 0.1 105 CGAL PAM 106 107 Number of points Figure 6: (a), (b) The performance (throughput, millions of elements per second) of PAM comparing with some concurrent data structures. In (a) we use our M ULTI I NSERT, which is not as general as the concurrent insertions in other implementations. (c) The running time of U NION and B UILD using PAM on different input sizes. (d) The speedup on interval tree construction and query. (e) The running time on range tree construction. 6.1 The Augmented Sum Times for set functions such as union using the same algorithm in PAM without augmentation have been summarized in [12]. In this section we summarize times for a simple augmentation, which just adds values as the augmented value (see Equation 1). We test the performance of multiple functions on this structure. We also compare PAM with some sequential and parallel libraries, as well as some concurrent data structures. None of the other implementations support augmentation. We use 64-bit integer keys and values. The results on running time are summarized in Table 3. Our times include the cost of any necessary garbage collection (GC). We also present space usage in Table 4. We test versions both with and without augmentation. For general map functions like U NION or I NSERT, maintaining the augmented value in each node costs overhead, but it seems to be minimal in running time (within 10%). This is likely because the time is dominated by the number of cache misses, which is hardly affected by maintaining the augmented value. The overhead of space in maintaining the augmented value is 20% in each tree node (extra 8 bytes for the augmented value). For the functions related to the range sum, the augmentation is necessary for theoretical efficiency, and greatly improves the performance. For example, the AUG R ANGE function using a plain (non-augmented) tree structure would require scanning all entries 14 108 in the range, so the running time is proportional to the number of related entries. It costs 0.44s to process 104 parallel AUG R ANGE queries. With augmentation, AUG R ANGE has performance that is close to a simple F IND function, which is only 3.04s for 108 queries. Another example to show the advantage of augmentation is the AUG F ILTER function. Here we use M AX instead of taking the sum as the combine function, and set the filter function as selecting all entries with values that are larger than some threshold θ. We set the parameter m as the output size, which can be adjusted by choosing appropriate θ. Such an algorithm has theoretical work of O(m log(n/m + 1)), and is significantly more efficient than a plain implementation (linear work) when m  n. We give two examples of tests on m = 105 and 106 . The change of output size does not affect the running time of the non-augmented version, which is about 2.6s sequentially and 0.05s in parallel. When making use of the augmentation, we get a 3x improvement when m = 106 and about 14x improvement when m = 105 . For sequential performance we compare to the C++ Standard Template Library (STL) [45], which supports set union on sets based on red-black trees and sorted vectors (arrays). We denote the two versions as Union-Tree and Union-Array. In Union-Tree results are inserted into a new tree, so it is also persistent. When the two sets have the same size, the array implementation is faster because of its flat structure and better cache performance. If one map is much smaller, PAM performs better than Union-Array because of better theoretical bound (O(m log(n/m + 1)) vs. O(n + m)). It outperforms Union-Tree because it supports persistence more efficiently, i.e., sharing nodes instead of making a copy of all output entries. Also, our J OIN-based I NSERT achieves performance close to (about 17% slower) the well-optimized STL tree insertion even though PAM needs to maintain the reference counts. In parallel, the speedup on the aggregate functions such as U NION and B UILD is above 50. Generally, the speedup is correlated to the ratio of reads to writes. With all (or mostly) reads to the tree structure, the speedup is often more than 72 (number of cores) with hyperthreads (e.g., F IND, AUG L EFT and AUG R ANGE). With mostly writes (e.g., building a new tree as output) it is 40-50 (e.g., F ILTER, R ANGE, U NION and AUG F ILTER). The B UILD function is relatively special because the parallelism is mainly from the parallel sorting. We also give the performance of the M ULTI I NSERT function in the Multicore STL (MCSTL) [61] for reference. On our server MCSTL does not scale to 144 threads, and we show the best time it has (on 8-16 threads). On the functions we test, PAM outperforms MCSTL both sequentially and in parallel. PAM is scalable to very large data, and still achieve very good speedup. On our machine, PAM can process up to 1010 elements (highlighted in Table 3). It takes more than half an hour to build the tree sequentially, but only needs 28 seconds in parallel, achieving a 65-fold speedup. For AUG R ANGE the speedup is about 90. Also, using path-copying to implement persistence improves space-efficiency. For the persistent U NION on two maps of size 108 and 105 , we save about 49% of tree nodes because most nodes in the larger tree are re-used in the output tree. When the two trees are of the same size and the keys of both trees are extracted from the similar distribution, there is little savings. We present the parallel running times of U NION and B UILD on different input sizes in Figure 6 (c). For U NION we set one tree of size 108 and vary the other tree size. When the tree size is small, the parallel running time does not shrink proportional to size (especially for B UILD), but is still reasonably small. This seems to be caused by insufficient parallelism on small sizes. When the input size is larger than 106 , the algorithms scales very well. We also compare with four comparison-based concurrent data structures: skiplist, OpenBw-tree [63], Masstree [42] and B+ tree [65]. The implementations are from [63]4 . We compare their concurrent insertions with our parallel M ULTI I NSERT and test on YCSB microbenchmark C (read-only). We first use 5 × 107 insertions to an empty tree to build the initial database, and then test 107 concurrent reads. The results are given in Figure 6(a) (insertions) and (b) (reads). For insertions, PAM largely outperforms all of them 4 We do not compare to the fastest implementation (the Adaptive Radix Tree [38]) in [63] because it is not comparison-based. 15 sequentially and in parallel, although we note that their concurrent insertions are more general than our parallel multi-insert (e.g., they can deal with ongoing deletions at the same time). For concurrent reads, PAM performs similarly to B+ tree and Masstree with less than 72 cores, but outperforms all of them on all 144 threads. We also compare to Intel TBB [54, 62] concurrent hash map, which is a parallel implementation on unordered maps. On inserting n = 108 entries into a pre-allocated table of appropriate size, it takes 0.883s compared to our 0.323s (using all 144 threads). 6.2 Interval Trees We test our interval tree (same code as in Figure 3) using the PAM library. For queries we test 109 stabbing queries. We give the results of our interval tree on 108 intervals in Table 5 and the speedup figure in Figure 6(d). Sequentially, even on 108 intervals the tree construction only takes 14 seconds, and each query takes around 0.58 µs. We did not find any comparable open-source interval-tree library in C++ to compare with. The only available library is a Python interval tree implementation [30], which is sequential, and is very inefficient (about 1000 times slower sequentially). Although unfair to compare performance of C++ to python (python is optimized for ease of programming and not performance), our interval tree is much simpler than the python code—30 lines in Figure 3 vs. over 2000 lines of python. This does not include our code in PAM (about 4000 lines of code), but the point is that our library can be shared among many applications while the Python library is specific for the interval query. Also our code supports parallelism. In parallel, on 108 intervals, our code can build an interval tree in about 0.23 second, achieving a 63-fold speedup. We also give the speedup of our PAM interval tree in Figure 6(d). Both construction and queries scale up to 144 threads (72 cores with hyperthreads). 6.3 Range Trees We test our 2D range tree as described in Section 5.2. A summary of run times is presented in Table 5. We compared our sequential version with the range tree in the CGAL library [51] (see Figure 6(e)). The CGAL range tree is sequential and can only report all the points in the range. For 108 input points we control the output size of the query to be around 106 on average. Table 5 gives results of construction and query time using PAM and CGAL respectively. Note that our range tree also stores the weight and reference counting in the tree while CGAL only stores the coordinates, which means CGAL version is more space-efficient than ours. Even considering this, PAM is always more efficient than CGAL and less than half the running time both in building and querying time on 108 points. Also our code can answer the weight-sum in the window in a much shorter time, while CGAL can only give the full list. We then look at the parallel performance. As shown in Table 5 it took 3 seconds (about a 64-fold speedup) to build a tree on 108 points. On 144 threads the PAM range tree can process 1.82 million queries on weight-sum per second, achieving a 87-fold speedup. We also report the number of allocated tree nodes in Table 4. Because of path-copying, we save 13.8% space by the sharing of inner tree nodes. 6.4 Word Index Searching To test the performance of the inverted index data structure described in Section 5.3, we use the publicly available Wikipedia database [64] (dumped on Oct. 1, 2016) consisting of 8.13 million documents. We removed all XML markup, treated everything other than alphanumeric characters as separators, and converted 16 all upper case to lower case to make searches case-insensitive. This leaves 1.96 billion total words with 5.09 million unique words. We assigned a random weight to each word in each document (the values of the weights make no difference to the runtime). We measure the performance of building the index from an array of (word, doc id, weight) triples, and the performance of queries that take an intersection (logical-and) followed by selecting the top 10 documents by weight. Unfortunately we could not find a publicly available C++ version of inverted indices to compare to that support and/or queries and weights although there exist benchmarks supporting plain searching on a single word [17]. However the experiments do demonstrate speedup numbers, which are interesting in this application since it is the only one which does concurrent updates. In particular each query does its own intersection over the shared posting lists to create new lists (e.g., multiple users are searching at the same time). Timings are shown in Table 6. Our implementation can build the index for Wikipedia in 13 seconds, and can answer 100K queries with a total of close to 200 billion documents across the queries in under 5 seconds. It demonstrates that good speedup (77x) can be achieved for the concurrent updates in the query. 7 Conclusion In this paper we introduce the augmented map, and describe an interface and efficient algorithms to for it. Based on the interface and algorithms we develop a library supporting the augmented map interface called PAM, which is parallel, work-efficient, and supports persistence. We also give four example applications that can be adapted to the abstraction of augmented maps, including the augmented sum, interval trees, 2D range trees and the inverted indices. We implemented all these applications with the PAM library. Experiments show that the functions in our PAM implementation are efficient both sequentially and in parallel. The code of the applications implemented with PAM outperforms some existing libraries and implementations, and also achieves good parallelism. Without any specific optimizations, the speedup is about more than 60 for both building interval trees and building range trees, and 82 for building word index trees on 72 cores. For parallel queries the speedup is always over 70. References [1] Georgy Adelson-Velsky and E. M. Landis. An algorithm for the organization of information. Proc. of the USSR Academy of Sciences, 145:263–266, 1962. In Russian, English translation by Myron J. Ricci in Soviet Doklady, 3:1259-1263, 1962. [2] Pankaj K. Agarwal, Kyle Fox, Kamesh Munagala, and Abhinandan Nath. Parallel algorithms for constructing range and nearest-neighbor searching data structures. In Proc. ACM SIGMOD-SIGACTSIGAI Symp. on Principles of Database Systems (PODS), pages 429–440, 2016. [3] Yaroslav Akhremtsev and Peter Sanders. Fast parallel operations on search trees. arXiv preprint arXiv:1510.05433, 2015. [4] Ahmed M. Aly, Hazem Elmeleegy, Yan Qi, and Walid Aref. Kangaroo: Workload-aware processing of range data and range queries in hadoop. In Proc. ACM International Conference on Web Search and Data Mining (WSDM), pages 397–406, New York, NY, USA, 2016. ACM. ISBN 978-1-4503-3716-8. [5] Flurry analytics, -. URL https://developer.yahoo.com/flurry/docs/analytics/. 17 [6] Antonio Barbuzzi, Pietro Michiardi, Ernst Biersack, and Gennaro Boggia. Parallel bulk insertion for large-scale analytics applications. In Proc. International Workshop on Large Scale Distributed Systems and Middleware (LADIS), 2010. [7] Dmitry Basin, Edward Bortnikov, Anastasia Braginsky, Guy Golan-Gueta, Eshcar Hillel, Idit Keidar, and Moshe Sulamy. Kiwi: A key-value map for scalable real-time analytics. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPOPP), pages 357–369, 2017. [8] Rudolf Bayer. Symmetric binary b-trees: Data structure and maintenance algorithms. Acta Informatica, 1:290–306, 1972. [9] Jon Louis Bentley. Decomposable searching problems. Information processing letters, 8(5):244–251, 1979. [10] Juan Besa and Yadran Eterovic. A concurrent red-black tree. J. Parallel Distrib. Comput., 73(4): 434–449, 2013. [11] Guy E. Blelloch and Margaret Reid-Miller. Fast set operations using treaps. In Proc. ACM Symp. on Parallel Algorithms and Architectures (SPAA), pages 16–26, 1998. [12] Guy E Blelloch, Daniel Ferizovic, and Yihan Sun. Just join for parallel ordered sets. In Proc. of the ACM Symp. on Parallelism in Algorithms and Architectures (SPAA), pages 253–264, 2016. [13] Nathan Grasso Bronson, Jared Casper, Hassan Chafi, and Kunle Olukotun. A practical concurrent binary search tree. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 257–268, 2010. [14] Trevor Brown and Hillel Avni. Range Queries in Non-blocking k-ary Search Trees, pages 31–45. Springer Berlin Heidelberg, Berlin, Heidelberg, 2012. ISBN 978-3-642-35476-2. [15] Trevor Brown, Faith Ellen, and Eric Ruppert. A general technique for non-blocking trees. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 329–342, 2014. [16] Chee Yong Chan and Yannis E. Ioannidis. Hierarchical prefix cubes for range-sum queries. In Proc. International Conference on Very Large Data Bases (VLDB), pages 675–686, San Francisco, CA, USA, 1999. Morgan Kaufmann Publishers Inc. ISBN 1-55860-615-7. [17] Rosetta Code. Inverted index, -. URL https://rosettacode.org/wiki/Inverted_index. [18] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms (second edition). MIT Press and McGraw-Hill, 2001. [19] Costin S. C# based interval tree. https://code.google.com/archive/p/intervaltree, 2012. [20] Bolin Ding and Arnd Christian König. Fast set intersection in memory. Proc. of the VLDB Endowment, 4(4):255–266, 2011. [21] Dana Drachsler, Martin T. Vechev, and Eran Yahav. Practical concurrent binary search trees via logical ordering. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 343–356, 2014. 18 [22] James R Driscoll, Neil Sarnak, Daniel Dominic Sleator, and Robert Endre Tarjan. Making data structures persistent. In Proc. ACM Symp. on Theory of computing (STOC), pages 109–121, 1986. [23] Herbert Edelsbrunner. Dynamic rectangle intersrction searching. Technical Report Institute for Technical Processing Report 47, Technical University of Graz, Austria, 1980. [24] Stephan Erb, Moritz Kobitzsch, and Peter Sanders. Parallel bi-objective shortest paths using weightbalanced b-trees with bulk updates. In Experimental Algorithms, pages 111–122. Springer, 2014. [25] Preparata Franco and Michael Ian Preparata Shamos. Computational geometry: an introduction. Springer Science & Business Media, 1985. [26] Leonor Frias and Johannes Singler. Parallelization of bulk operations for STL dictionaries. In Euro-Par 2007 Workshops: Parallel Processing, HPPC 2007, UNICORE Summit 2007, and VHPC 2007, pages 49–58, 2007. [27] Hong Gao and Jian-Zhong Li. Parallel data cube storage structure for range sum queries and dynamic updates. J. Comput. Sci. Technol., 20(3):345–356, May 2005. ISSN 1000-9000. [28] Jim Gray, Surajit Chaudhuri, Adam Bosworth, Andrew Layman, Don Reichart, Murali Venkatrao, Frank Pellow, and Hamid Pirahesh. Data cube: A relational aggregation operator generalizing group-by, cross-tab, and sub-totals. Data Mining and Knowledge Discovery, 1(1):29–53, Mar 1997. [29] Antonin Guttman. R-trees: A dynamic index structure for spatial searching. In Proc. ACM SIGMOD International Conference on Management of Data (SIGMOD), pages 47–57, New York, NY, USA, 1984. ACM. ISBN 0-89791-128-8. [30] Chaim-Leib Halbet and Konstantin Tretyakov. Python based interval tree. https://github.com/ chaimleib/intervaltree, 2015. [31] Ching-Tien Ho, Rakesh Agrawal, Nimrod Megiddo, and Ramakrishnan Srikant. Range queries in olap data cubes. In Proc. ACM International Conference on Management of Data (SIGMOD), pages 73–88, New York, NY, USA, 1997. ACM. ISBN 0-89791-911-4. [32] Paul Hudak. A semantic model of reference counting and its abstraction (detailed summary). In Proc. of the 1986 ACM Conference on LISP and Functional Programming, LFP ’86, pages 351–363, 1986. [33] Hiroshi Inoue, Moriyoshi Ohara, and Kenjiro Taura. Faster set intersection with simd instructions by reducing branch mispredictions. Proc. of the VLDB Endowment, 8(3):293–304, 2014. [34] Jinwoong Kim, Sul-Gi Kim, and Beomseok Nam. Parallel multi-dimensional range query processing with r-trees on gpu. Journal of Parallel and Distributed Computing, 73(8):1195 – 1207, 2013. ISSN 0743-7315. [35] Hans-Peter Kriegel, Marco Pötke, and Thomas Seidl. Managing intervals efficiently in object-relational databases. In Proc. International Conference on Very Large Data Bases (VLDB), pages 407–418, 2000. [36] H. T. Kung and Philip L. Lehman. Concurrent manipulation of binary search trees. ACM Trans. Database Syst., 5(3):354–382, 1980. [37] Kim S. Larsen. AVL trees with relaxed balance. J. Comput. Syst. Sci., 61(3):508–522, 2000. 19 [38] Viktor Leis, Alfons Kemper, and Thomas Neumann. The adaptive radix tree: Artful indexing for main-memory databases. In Data Engineering (ICDE), 2013 IEEE 29th International Conference on, pages 38–49. IEEE, 2013. [39] Charles E. Leiserson. The Cilk++ concurrency platform. The Journal of Supercomputing, 51(3): 244–257, 2010. [40] Justin J. Levandoski, David B. Lomet, and Sudipta Sengupta. The bw-tree: A b-tree for new hardware platforms. In Proc. IEEE International Conference on Data Engineering (ICDE), pages 302–313, 2013. ISBN 978-1-4673-4909-3. [41] LevelDB, -. URL leveldb.org. [42] Yandong Mao, Eddie Kohler, and Robert Tappan Morris. Cache craftiness for fast multicore key-value storage. In Proc. of the 7th ACM European Conference on Computer Systems, pages 183–196. ACM, 2012. [43] Mark De Berg Mark, Mark Van Kreveld, Mark Overmars, and Otfried Cheong Schwarzkopf. Computational Geometry. Springer, 2000. [44] Edward M. McCreight. Priority search trees. SIAM J. Comput., 14(2):257–276, 1985. [45] David R Musser, Gillmer J Derge, and Atul Saini. STL tutorial and reference guide: C++ programming with the standard template library. Addison-Wesley Professional, 2009. [46] Aravind Natarajan and Neeraj Mittal. Fast concurrent lock-free binary search trees. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 317–328, 2014. [47] Gabriele Neyer. dD range and segment trees. In CGAL User and Reference Manual. CGAL Editorial Board, 4.10 edition, 2017. URL http://doc.cgal.org/4.10/Manual/packages.html# PkgRangeSegmentTreesDSummary. [48] Jürg Nievergelt and Edward M. Reingold. Binary search trees of bounded balance. SIAM J. Comput., 2 (1):33–43, 1973. [49] Chris Okasaki. Purely functional data structures. Cambridge University Press, 1999. [50] Oracle. Oracle nosql, -. URL https://www.oracle.com/database/nosql/index.html. [51] Mark H Overmars. Designing the computational geometry algorithms library cgal. In Applied computational geometry towards geometric engineering, pages 53–58. Springer, 1996. [52] Heejin Park and Kunsoo Park. Parallel algorithms for red–black trees. Theoretical Computer Science, 262(1):415–435, 2001. [53] Wolfgang J. Paul, Uzi Vishkin, and Hubert Wagener. Parallel dictionaries in 2-3 trees. In Proc. International Colloq. on Automata, Languages and Programming (ICALP), pages 597–609, 1983. [54] Chuck Pheatt. Intel R threading building blocks. Journal of Computing Sciences in Colleges, 23(4): 298–298, 2008. 20 [55] Aleksandar Prokopec, Nathan Grasso Bronson, Phil Bagwell, and Martin Odersky. Concurrent tries with efficient non-blocking snapshots. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPOPP), 2012. [56] Anand Rajaraman and Jeffrey David Ullman. Mining of Massive Datasets:. Cambridge University Press, 10 2011. [57] RocksDB, -. URL rockdb.org. [58] Hanan Samet. The design and analysis of spatial data structures, volume 199. Addison-Wesley Reading, MA, 1990. [59] Raimund Seidel and Celcilia R. Aragon. Randomized search trees. Algorithmica, 16:464–497, 1996. [60] Jeff Shute, Radek Vingralek, Bart Samwel, Ben Handy, Chad Whipkey, Eric Rollins, Mircea Oancea, Kyle Littlefield, David Menestrina, Stephan Ellner, John Cieslewicz, Ian Rae, Traian Stancescu, and Himani Apte. F1: A distributed sql database that scales. Proc. VLDB Endow., 6(11):1068–1079, August 2013. ISSN 2150-8097. [61] Johannes Singler, Peter Sanders, and Felix Putze. MCSTL: the multi-core standard template library. In Proc. European Conf. on Parallel Processing (Euro-Par), pages 682–694, 2007. [62] TBB. Intel R Threading Building Blocks 2.0 for Open Source, -. threadingbuildingblocks.org/. https://www. [63] Ziqi Wang, Andrew Pavlo, Hyeontaek Lim, Viktor Leis, Huanchen Zhang, Michael Kaminsky, and David G. Andersen. Building a bw-tree takes more than just buzz words. [64] Wikimedia Foundation. Wikepedia:database download. https://en.wikipedia.org/wiki/ Wikipedia:Database_download, 2016. [65] Huanchen Zhang, David G Andersen, Andrew Pavlo, Michael Kaminsky, Lin Ma, and Rui Shen. Reducing the storage overhead of main-memory oltp databases with hybrid indexes. In Proc. of the 2016 International Conference on Management of Data, pages 1567–1581. ACM, 2016. [66] Justin Zobel and Alistair Moffat. Inverted files for text search engines. ACM Comput. Surv., 38(2), July 2006. ISSN 0360-0300. 21 n m T1 T144 Spd. 52.8 PAM (with augmentation) Union 108 108 12.517 0.2369 Union 8 10 105 0.257 0.0046 55.9 Find 108 108 113.941 1.1923 95.6 Insert 108 − 205.970 − − Build 108 − 16.089 0.3232 49.8 Build 1010 − 1844.38 28.24 65.3 Filter 108 − 4.578 0.0804 56.9 Multi-Insert 108 108 23.797 0.4528 52.6 Multi-Insert 8 10 10 5 0.407 0.0071 57.3 Range 108 108 44.995 0.8033 56.0 AugLeft 108 108 106.096 1.2133 87.4 AugRange 108 108 193.229 2.1966 88.0 108 271.09 3.04 89.2 AugRange 10 10 AugFilter 108 106 0.807 0.0163 49.7 AugFilter 8 105 0.185 0.0030 61.2 10 Non-augmented PAM (general map functions) Union Insert 108 8 10 8 108 11.734 0.1967 59.7 − 186.649 − − build 10 − 15.782 0.3008 52.5 Range 108 108 42.756 0.7603 56.2 Non-augmented PAM (augmented functions) AugRange 108 104 21.642 0.4368 49.5 8 6 AugFilter 10 10 2.695 0.0484 55.7 AugFilter 108 105 2.598 0.0497 52.3 Union Tree 108 108 166.055 − − Union Tree 108 105 82.514 − − 8 Union Array 10 10 8 1.033 − − Union Array 108 105 0.459 − − 10 − 158.251 − − Multi-Insert 108 108 51.71 7.972 6.48 Multi-Insert 8 105 0.20 0.027 7.36 STL Insert 8 MCSTL 10 Table 3: Timings in seconds for various functions in PAM, the C++ Standard Template Library (STL) and the library Multi-core STL (MCSTL) [61]. Here “T144 ” means on all 72 cores with hyperthreads (i.e., 144 threads), and “T1 ” means the same algorithm running on one thread. “Spd.” means the speedup (i.e., T1 /T144 ). For insertion we test the total time of n insertions in turn starting from an empty tree. All other libraries except PAM are not augmented. 22 Func. Union Overhead for aug. Saving from node-sharing node aug. over- #nodes in Actual Saving size size head theory #nodes ratio Type m = 108 48B m = 105 48B Range Outer Tree Inner 48B 40B 8B 20% 8B 20% 390M 200M 386M 102M 1.2% 49.0% 8B 20% 4B 11% 100M 266M 100M 229M 0.0% 13.8% Table 4: Space used by the U NION function and the range tree application. We use B for byte, M for million. Func. n m T1 T144 Spd. Build Query 108 108 108 14.35 53.35 0.227 0.576 63.2 92.7 PAM (range) Build Q-Sum Q-All 108 108 108 106 103 197.47 48.13 44.40 3.098 0.550 0.687 63.7 87.5 64.6 CGAL (range) Build Q-All 108 108 103 525.94 110.94 - Lib. PAM (interval) - Table 5: The running time (seconds) of the range tree and the interval tree implemented with PAM interface on n points and m queries. Here “T1 ” reports the sequential running time and “T144 ” means on all 72 cores with hyperthreads (i.e., 144 threads). “Spd.” means the speedup (i.e., T1 /T144 ). “Q-Sum” and “Q-All” represent querying the sum of weights and querying the full list of all points in a certain range respectively. We give the result on CGAL range tree for comparisons with our range tree. n (×109 ) 1 Core Time Melts (secs) /sec 72∗ Cores Time Gelts (secs) /sec Speedup Build 1.96 1038 1.89 12.6 0.156 82.3 Queries 177 368 480.98 4.74 37.34 77.6 Table 6: The running time and rates for building and queering an inverted index. Here “one core” reports the sequential running time and “72∗ cores” means on all 72 cores with hyperthreads (i.e., 144 threads). Gelts/sec calculated as n/(time × 109 ). 23
8cs.DS
arXiv:1503.04543v2 [math.NT] 31 Oct 2017 Rationality Problems for Relation Modules of Dihedral Groups Akinari Hoshi(1) , Ming-chang Kang(2) and Aiichi Yamasaki(3) (1) Department of Mathematics, Niigata University, Niigata 950-2181, Japan, E-mail: [email protected] (2) Department of Mathematics, National Taiwan University, Taipei, Taiwan, E-mail: [email protected] (3) Department of Mathematics, Kyoto University, Kyoto 606-8502, Japan, E-mail: [email protected] Abstract. Let Dn = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i be the dihedral group ε of order 2n where n ≥ 2. Let 1 → R → F − → Dn → 1 be the free presentation of Dn where F = hs1 , s2 i is the free group of rank two and ε(s1 ) = σ, ε(s2 ) = τ . The conjugation maps of F provide an action of F on R. Thus Rab := R/[R, R] becomes a Z[Dn ]-lattice. Rab is called the relation module of Dn by Gruenberg. For any Galois extension K/k with Gal(K/k) = Dn , K(Rab )Dn is stably rational over k if and only if n is an odd integer. Moreover, (i) if K(Rab )Dn is stably rational over k, it is rational over k, and (ii) if K(Rab )Dn is not stably rational over k and k is an infinite field, then K(Rab )Dn is not retract rational over k. We will also discuss the rationality of the purely monomial action where Dn acts trivially on the field k. It will be shown that, if n is odd, then k(Rab )Dn = k(Dn )(t) for any field k. 2010 Mathematics Subject Classification. 14E08, 11R33, 20C10, 20F05. Keywords and phrases. Rationality problem, integral representation, free presentation, relation module, algebraic torus. This work was partially supported by JSPS KAKENHI Grant Numbers 24540019, 25400027, 16K05059. Parts of the work were finished when the first-named author and the third-named author were visiting the National Center for Theoretic Sciences (Taipei Office), whose support is gratefully acknowledged. 1 §1. Introduction Let G be a finite group, F = hs1 , . . . , sd i be the free group of rank d. A surjective ε homomorphism ε : F → G gives rise to a free presentation 1 → R → F − →G→1 of G. Since R is a normal subgroup of F , F acts on R by the conjugation maps. Consequently G acts on Rab := R/[R, R] where [R, R] is the commutator subgroup of R. Since R itself is a free group of rank 1 + (d − 1)|G| by Schreier’s Theorem [Kur, page 36], Rab is a free abelian group of the same rank. It follows that Rab becomes a Z[G]-module which is a free abelian of finite rank, i.e. Rab is a Z[G]-lattice (in short, G-lattice) in the sense of [CR, page 524] and Section 2 of this article. In other words, Rab provides an integral representation G → GLt (Z) for some positive integer t (see [CR, Chapter 3]). The G-lattice Rab is called the relation module of G by Gruenberg [Gr1; Gr2]. Consider the case G = Dn = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i, the dihedral group of order 2n where n ≥ 2. ε Definition 1.1 Let 1 → R → F − → Dn → 1 be a free presentation of Dn where F = hs1 , s2 i the free group of rank 2, and ε(s1 ) = σ, ε(s2 ) = τ . The Dn -lattice Rab is the subject we will study in Section 5. The relation module Rab depends on the group G, the free group F , and also on the epimorphism ε : F → Dn (see [Gr2, page 79] for details). The following theorem is due to Gruenberg and Roggenkamp. ε Theorem 1.2 (Gruenberg and Roggenkamp [GR]) Let 1 → R → F − → Dn → 1 be the free presentation of Dn in Definition 1.1 where n ≥ 2. The lattice Rab is an indecomposable Dn -lattice if and only if n is an even integer. In this article we focus on the rationality problem for Rab . If k is a field and M is a G-lattice, we will define a multiplicative action of G on the field k(M) in Definition 2.3. Thus we may consider the rationality problem of k(Rab )Dn in Theorem 1.4. Similarly we may consider the rationality problem of K(Rab )Dn if K/k is a Galois extension with Gal(K/k) = Dn . The reader may find a description of Noether’s problem and the definition of k(Dn ) of Theorem 1.4 in Definition 5.1. As to the terminology of k-rationality, stable k-rationality, retract k-rationality, see Definition 2.4. Here are the main results of this paper. Theorem 1.3 Let Rab be the relation module associated to the free resolution 1 → R → ε F − → Dn → 1 in Definition 1.1. Let K/k be a Galois extension with Gal(K/k) = Dn . If n is an odd integer ≥ 3, then K(Rab )Dn is rational over k. If n is an even integer ≥ 2, then K(Rab )Dn is not stably rational over k; moreover, if k is an infinite field, then K(Rab )Dn is not retract rational over k. Theorem 1.4 Let Rab be the relation module associated to the free resolution 1 → ε R → F − → Dn → 1 in Definition 1.1. If n is an odd integer ≥ 3 and k is a field, 2 then k(Rab )Dn = k(Dn )(t) for some element t transcendental over the field k(Dn ). Consequently, if Noether’s problem for Dn over the field k has an affirmative answer (e.g. ζn + ζn−1 ∈ k where ζn is a primitive n-th root of unity), then k(Rab )Dn is rational over k. Note that the stable rationality in Theorem 1.3 follows from Endo and Miyata’s Theorem (see Theorem 2.7 and Theorem 4.5). However, to assert the stronger result that K(Rab )Dn is rational over k if n is odd, extra efforts are required. First we need f+ (see Theorem 4.8) which was anticipated an explicit decomposition Rab ≃ M+ ⊕ M by Theorem 1.2; see Definition 3.1 and Definition 3.3 for the constructions of M+ and f+ . Then applying Theorem 3.4 (i.e. the identity M f+ ⊕ Z ≃ Z[Dn /hσi] ⊕ Z[Dn /hτ i]) M ab Dn we can establish the rationality of K(R ) . We remark also that the case for n = 2 or 3 in Theorem 1.3, were proved by Kunyavskii [Ku1; Ku2]. So far as we know, the rationality problem of k(Rab )Dn was investigated first in a paper of Snider. His result is the following. Theorem 1.5 (Snider [Sn]) Let the notations be the same as in Theorem 1.4. Let k be any field. If n = 2, then k(Rab )D2 is rational over k. If n is an odd integer ≥ 3 and ζn ∈ k, then k(Rab )Dn is stably rational over k. An alternative proof of Snider’s Theorem for k(Rab )D2 will be given in Section 5 using an idea of Kunyavskii [Ku1]. In fact, we will prove in Theorem 5.5 that k(M)D2 is stably rational over k for any D2 -lattice M of rank ≤ 5. We don’t know the answer if M is a D2 -lattice M of rank ≥ 6. Nor do we know the answer to the stable rationality of k(Rab )Dn if n ≥ 4 is an even integer. The motivation of Snider to consider the above rationality problem came from the attempt to prove whether the norm residue morphism Rn,F : K2 (F )/nK2 (F ) → H 2 (F, µ⊗2 n ) is an isomorphism where F is a field [Mi, page 144]. For the surjectivity of Rn,F , Snider used the idea of generic crossed products with group G (G varies over all the possible finite groups); in particular, he considered the generic crossed products with group Dn . Thus the rationality of k(Rab )Dn enables him to prove the surjectivity of Rn,F if the corresponding Brauer class is similar to a crossed product with group Dn . The isomorphism of Rn,F was solved by Merkurjev and Suslin [MS] in 1983. However, the rationality of k(Rab )Dn or k(Rab )G (where G is any finite group) remains a challenging problem. We organize this paper as follows. In Section 3, we construct various Dn -lattices when n is an odd integer. These Dn -lattices turn out to be fundamental building blocks of indecomposable Dp -lattices when p is an odd prime number (see the paper of Myrma Pike Lee [Le] for details). We will prove some identities of these Dn -lattices, f+ ⊕ Z ≃ Z[Dn /hσi] ⊕ Z[Dn /hτ i] (see Theorem 3.4 and Theorem 3.5). Besides e.g. M applications in the rationality problem, these identities exemplify the phenomenon that the Krull-Schmidt-Azumaya’s Theorem [CR, page 128] may fail in the category of G-lattices. We study some homological properties of these lattices in Section 4, e.g. flabby, coflabby, invertible, flabby resolutions (see Definition 2.1). These homological 3 properties are used in the proof of Theorem 4.5. The proofs of Theorem 1.3 and Theorem 1.4 are given in Section 5. Terminology and notations. In this paper, all the groups G are finite groups. A free group F is called a free group of rank d if F is a free group on d generators s1 , . . . , sd . π A free presentation of G, 1 → R → F − → G → 1, is a surjective morphism π : F → G where F is a free group and R is the kernel of π. Cn and Dn denote the cyclic group of order n and the dihedral group of order 2n. If R is a group, then [R, R] is its commutator subgroup and Rab denotes the quotient group R/[R, R]. When k is a field, we write gcd{n, char k} = 1 to denote the situation either char k = 0 or char k = p > 0 with p ∤ n. By ζn we mean a primitive n-th root of unity in some field. If M is a module over some ring A, we denote by M (n) the direct sum of n copies of M. Acknowledgments. We thank the anonymous referee for his insightful, constructive and meticulous comments. §2. Preliminaries of G-lattices Let G be a finite group. Recall that a finitely generated Z[G]-module M is called a G-lattice if it is torsion-free as an abelian group. We define the rank of M: rankZ M = n if M is a free abelian group of rank n. If M is a G-lattice, define M 0 := HomZ (M, Z) which is also a G-lattice; M 0 is called the dual lattice of M. A G-lattice M is called a permutation lattice if M has a Z-basis permuted by G. A G-lattice M is called stably permutation if M ⊕ P is a permutation lattice where P is some permutation lattice. M is called an invertible lattice if it is a direct summand of some permutation lattice. A G-lattice M is called a flabby lattice if H −1 (S, M) = 0 for any subgroup S of G; it is called coflabby if H 1(S, M) = 0 for any subgroup S of G (here H −1 (S, M) and H 1 (S, M) denote the Tate cohomology groups of S). If S is a subgroup of G, we will write Z[G/S] for the permutation lattice Z[G] ⊗Z[S] Z where Z is the trivial Z[S]-lattice. For the basic notions of G-lattices, see [Sw1; Lo]. Let G be a finite group. Two G-lattices M1 and M2 are similar, denoted by M1 ∼ M2 , if M1 ⊕ P1 ≃ M2 ⊕ P2 for some permutation G-lattices P1 and P2 . The flabby class monoid FG is the class of all flabby G-lattices under the similarity relation. In particular, if M is a flabby lattice, [M] ∈ FG denotes the equivalence class containing M; we define [M1 ] + [M2 ] = [M1 ⊕ M2 ] and thus FG becomes an abelian monoid [Sw1]. Definition 2.1 Let G be a finite group, M be any G-lattice. Then M has a flabby resolution, i.e. there is an exact sequence of G-lattices: 0 → M → P → E → 0 where P is a permutation lattice and E is a flabby lattice. The class [E] ∈ FG is uniquely determined by the lattice M [Sw1]. We define [M]f l = [E] ∈ FG , following 4 the nomenclature in [Lo, page 38]. Sometimes we will say that [M]f l is permutation or invertible if the class [E] contains a permutation or invertible lattice. Definition 2.2 Let K/k be a finite Galois field extension with G = Gal(K/k). Let L M = 1≤i≤n Z · ei be a G-lattice. We define an action of G on K(M) = K(x1 , . . . , xn ), Q aij the rational function field of n variables over K, by σ · x = if σ · ej = j 1≤i≤n xi P 1≤i≤n aij ei ∈ M, for any σ ∈ G (note that G acts on K also). The fixed field is denoted by K(M)G . If T is an algebraic torus over k satisfying T ×Spec(k) Spec(K) ≃ Gnm,K where Gm,K is the one-dimensional multiplicative group over K, then M := Hom(T, Gm,K ) is a G-lattice and the function field of T over k is isomorphic to K(M)G by Galois descent [Sw1, page 36; Vo]. Definition 2.3 We give a generalization of K(M)G in Definition 2.2. Let M = L ′ 1≤i≤n Z · ei be a G-lattice, k /k be a finite Galois extension field such that there is a surjection G → Gal(k ′ /k). Thus G acts naturally on k ′ by k-automorphisms. We define an action of G on k ′ (M) = k ′ (x1 , . . . , xn ) in a similar way as K(M). The fixed field is denoted by k ′ (M)G . The action of G on k ′ (M) is called a purely quasimonomial action in [HKK, Definition 1.1]; it is possible that G acts faithfully on k ′ (the case k ′ = K) or trivially on k ′ (the case k ′ = k). We recall the notions of rationality, stable rationality and retract rationality. Definition 2.4 Let k ⊂ L be a field extension. The field L is rational over k (in short, k-rational) if, for some n, L ≃ k(X1 , . . . , Xn ), the rational function field of n variables over k. L is called stably rational over k (or, stably k-rational) if the field L(Y1 , . . . , Ym ) is k-rational where Y1 , . . . , Ym are some elements algebraically independent over L. When k is an infinite field, L is called retract k-rational, if there exist an affine domain A whose quotient field is L and k-algebra morphisms ϕ : A → k[X1 , . . . , Xn ][1/f ], ψ : k[X1 , . . . , Xn ][1/f ] → A satisfying ψ ◦ ϕ = 1A the identity map on A where k[X1 , . . . , Xn ] is a polynomial ring over k, f ∈ k[X1 , . . . , Xn ]\{0} [Sa, Definition 3.1; Ka, Definition 1.1]. It is known that “k-rational” ⇒ “stably k-rational” ⇒ “retract k-rational”. Moreover, if k is an algebraic number field, retract k-rationality of k(G) implies the inverse Galois problem is true for the field k and the group G [Sa, Ka] (see Definition 5.1 for the definition of k(G)). Theorem 2.5 Let K/k be a finite Galois extension field, G = Gal(K/k) and M be a G-lattice. (1) (Voskresenskii, Endo and Miyata [EM1, Theorem 1.2; Len, Theorem 1.7]) K(M)G is stably k-rational if and only if [M]f l is permutation, i.e. there exists a short exact sequence of G-lattices 0 → M → P1 → P2 → 0 where P1 and P2 are permutation G-lattices. 5 (2) (Saltman [Sa, Theorem 3.14; Ka, Theorem 2.8]) Assume that k is an infinite field. Then K(M)G is retract k-rational if and only if [M]f l is invertible. Theorem 2.6 (Endo and Miyata [EM2, Theorem 1.5; Sw2, Theorem 4.4]) Let G be a finite group. Then all the flabby (resp. coflabby) G-lattices are invertible ⇔ all the Sylow subgroups of G are cyclic ⇔ [IG0 ]f l is invertible where IG is the augmentation ideal of the group ring Z[G]. Theorem 2.7 (Endo and Miyata [EM2, Theorem 2.3]) Let G be a finite group, IG be the augmentation ideal of the group ring Z[G]. Then [IG0 ]f l = 0 ⇔ [IG0 ]f l ∈ FG is of finite order ⇔ G is isomorphic to the cyclic group Cn where n is any positive integer, d or the group hρ, σ, τ : ρm = σ n = τ 2 = 1, τ στ −1 = σ −1 , ρσ = σρ, ρτ = τ ρi where m and n are odd integers, n ≥ 3, d ≥ 1 and gcd{m, n} = 1. §3. Some Dn-lattices Throughout this section, G denotes the group G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i where n ≥ 3 is an odd integer, i.e. G is the dihedral group Dn . Define H = hτ i. We will construct six G-lattices which will become indecomposable G-lattices if n = p is an odd prime number. Definition 3.1 Let G = hσ, τ i be the dihedral group defined before. Define G-lattices G M+ and M− by M+ = IndG H Z, M− = IndH Z− the induced lattices where Z and Z− are H-lattices such that τ acts on Z = Z · u, Z− = Z · u′ by τ · u = u, τ · u′ = −u′ respectively (note that u and u′ are the generators of Z and Z− as abelian groups). By choosing a Z-basis for M+ corresponding to σ i u ∈ IndG H Z (where 1 ≤ i ≤ n), the actions of σ and τ on M+ are given by the n × n integral matrices     1 0 0 ··· 0 1   1 0 0   ..   .    .. ..  . . ..  , τ 7→ B =  σ 7→ A =  . . 1         1  1 0 0 1 0 1 Note that the action of matrices is determined on column vectors. Similarly, for a Z-basis for M− corresponding to σ i u′ , the actions of σ and τ are given by     −1 0 0 ··· 0 1   1 0 . 0     ..     .. .. . . ..  , τ 7→ −B =  σ 7→ A =  . . −1        −1  1 0 0 1 0 −1 6 Definition 3.2 As before, G = hσ, τ i ≃ Dn . Let f (σ) = 1 + σ + · · · + σ n−1 ∈ Z[G]. Since τ · f (σ) = f (σ) · τ , the left Z[G]-ideal Z[G] · f (σ) is a two-sided ideal; as an ideal in Z[G], we denote it by hf (σ)i. The natural projection Z[G] → Z[G]/hf (σ)i induces an isomorphism of Z[G]/hf (σ)i and the twisted group ring Z[ζn ] ◦ H (see [CR, p.589]). Explicitly, let ζn be a primitive n-th root of unity. Then Z[ζn ] ◦ H = Z[ζn ] ⊕ Z[ζn ] · τ and τ · ζn = ζn−1. If n = p is an odd prime number, Z[ζp ] ◦ H is a hereditary order [CR, pages 593–595]. Note that we have the following fibre product diagram Z[G] // Z[ζn ] ◦ H   Z[H] // Z[H] where Z = Z/nZ (compare with [CR, page 748, (34.43)]). Using the G-lattices M+ and M− in Definition 3.1, define N+ = Z[G]/hf (σ)i ⊗Z[G] M+ = M+ /f (σ)M+ , N− = Z[G]/hf (σ)i ⊗Z[G] M− = M− /f (σ)M− . The Z[G]/hf (σ)i-lattices N+ and N− may be regarded as G-lattices through the Zalgebra morphism Z[G] → Z[G]/hf (σ)i. By choosing a Z-basis for N+ corresponding to σ i u where 1 ≤ i ≤ n−1, the actions of σ and τ on N+ are given by the (n−1)×(n−1) integral matrices   0 0 0 · · · 0 −1   1 0 −1 1      .  −1  1 0  .. ′   , τ 7→ B ′ =  σ 7→ A =  .  . ..  ..    1 .     1 0 −1 1 −1 Similarly, the actions of  0 0 0 1 0    1 0 ′ σ 7→ A =      σ and τ on N− are given by  · · · 0 −1   −1 −1     −1 ..   . ′  . ..  , τ 7→ −B =  ..   . −1 .   −1 0 −1 1 −1 Definition 3.3 We will use the G-lattices M+ and M− in Definition 3.1 to construct f+ and M f− which are of rank n + 1 satisfying the short exact sequences of G-lattices M G-lattices f+ → Z− → 0 0 → M+ → M f− → Z → 0 0 → M− → M 7 f+ and M f− will be described below and Z = Z · w, where the Z-lattice structures of M ′ Z− = Z · w are G-lattices defined by σ · w = w, τ · w = w, σ · w′ = w′ , τ · w′ = −w′ . Let {wi = σ i+1 u : 0 ≤ i ≤ n − 1} be the corresponding Z-basis of M+ in Definition L f+ = ( 3.1. As a free abelian group, M 0≤i≤n−1 Z · wi ) ⊕ Z · w. Define the actions of σ f+ by the (n + 1) × (n + 1) integral matrices and τ on M     1  ..    A  B .    σ 7→ Ã =  .  , τ 7→ B̃ =   1 1 −1 Similarly, let {wi′ = σ i+1 u′ : 0 ≤ i ≤ n − 1} be the Z-basis of M− in Definition 3.1, ′ ′ f− = (L f and M 0≤i≤n−1 Zwi ) ⊕ Z · w . Define the actions of σ and τ on M− by     −1  ..    A −B .   , τ 7→ −B̃ =  σ 7→ Ã =  .     −1 1 1 f+ and M f− are stably permutation G-lattices. In this section, we will show that M Theorem 3.4 Let G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn where n is an odd f+ ⊕ Z ≃ Z[G/hσi] ⊕ Z[G/hτ i]. integer. Then M Proof. Let u0 , u1 be the Z-basis of Z[G/hσi] corresponding to the cosets hσi, τ hσi. Then σ : u0 7→ u0 , u1 7→ u1 , τ : u0 ↔ u1 . Let {vi : 0 ≤ i ≤ n − 1} be the Z-basis of Z[G/hτ i] correspond to σ i hτ i where 0 ≤ i ≤ n − 1. Then σ : vi 7→ vi+1 (where the index is understood modulo n), τ : vi 7→ vn−i for 0 ≤ i ≤ n − 1. It follows that u0 , u1 , v0 , v1 , . . . , vn−1 is a Z-basis of Z[G/hσi] ⊕ Z[G/hτ i]. Define X t = u0 + u1 + vi , x = u0 + u1 + X 1≤i≤n−1 0≤i≤n−1 vi , n−1 n+1 n−1 X y= vi . u0 + u1 + 2 2 2 0≤i≤n−1 Note thatP x = t − v0 and y = n−1 t + u1 . 2 P i Since 0≤i≤n−1 σ · (v1 + · · · + vn−1 ) = (n − 1) 0≤i≤n−1 vi , it follows that τ · y = P i −y + 0≤i≤n−1 σ (x). It is routine to verify that ! M f+ , Z · t ≃ Z Z · σ i (x) ⊕ Z · y ≃ M 0≤i≤n−1 8 by checking the actions of σ and τ on lattices in both sides. Now we will show that σ(x), σ 2 (x), . . . , σ n−1 (x), x, y, t is a Z-basis of Z[G/hσi] ⊕ Z[G/hτ i]. Write the determinant of these n + 2 elements with respect to the Z-basis u0 , u1, v0 , v1 , . . . , vn−1 . We get the coefficient matrix T as   1 1 · · · 1 n−1 1 2    1 1 · · · 1 n+1 1 2     n−1 0 2 1  1 1    n−1  T = 0 1 1 1   2    n−1 1 2 1  n rows 1 0 . .  .. .. ..  . .   . . .  . .    n−1 1 1 1 2 1 | {z } n columns The determinant of T may be calculated as follows: Subtract the last column from times of the last column from the each of the first n columns. Also subtract n−1 2 (n + 1)-th column. Then it is easy to see det(T ) = 1.  Theorem 3.5 Let G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn where n is an odd f− ⊕ Z[G/hτ i] ≃ Z[G] ⊕ Z. integer. Then M Proof. The idea of the proof is similar to that of Theorem 3.4. Let u0 , u1, . . . , un−1, v0 , v1 , . . . , vn−1 , t be a Z-basis of Z[G] ⊕ Z where ui , vj correspond to σ i , σ j τ in Z[G]. The actions of σ and τ are given by σ : ui → 7 ui+1 , vj 7→ vj+1 , t 7→ t, τ : ui ↔ vn−i , t → 7 t where the index of ui or vj is understood modulo n. Define x, y, z ∈ Z[G] ⊕ Z by x = u0 − v0 ,  z= X 1≤i≤ n−1 2 We claim that M 0≤i≤n−1 y=   ui  +  ! f− , Z · σ i (x) ⊕ Z · y ≃ M 9 X ui 0≤i≤n−1 X n+1 ≤j≤n−1 2 M 0≤i≤n−1 ! + t,  vj  + t. Z · σ i (z) ≃ Z[G/hτ i]. Since τ (x) = −x, τ (z) = z, it follows that τ · σ i (x) = −σ n−i (x), τ · σ i (z) = σ n−i (z). The remaining proof is omitted. Now we will show that σ(x), σ 2 (x), . . . , σ n−1 (x), x, y, σ(z), . . . , σ n−1 (z), z form a Zbasis of Z[G] ⊕ Z. Write the coefficient matrix of these elements with respect to the Zbasis u0 , u1 , . . . , un−1, v0 , v1 , . . . , vn−1 , t. We get det(Tn ) where Tn is a (2n+1)×(2n+1) integral matrix. For example,   0 0 1 1 0 0 1 1 0 0 1 1 0 0   0  1 0 1 0 1 0     T3 =  0 0 −1 0 0 1 0 .   −1 0 0 0 0 0 1    0 −1 0 0 1 0 0 0 0 0 1 1 1 1 For any n, we evaluate det(Tn ) by adding the i-th row to (i + n)-th row of Tn for 1 ≤ i ≤ n. We find that det(Tn ) = ± det(T ′ ) where T ′ is an (n + 1) × (n + 1) integral matrix. Note that all the entries of the i-th row of T ′ (where 1 ≤ i ≤ n) are one except one position, because of the definition of z (and those of σ i (z) for 1 ≤ i ≤ n − 1). Subtract the last row from the i-th row where 1 ≤ i ≤ n. We find det(T ′ ) = ±1.  Suppose that G ≃ Dn where n is an odd integer. From Theorem 3.4 and Theorem 3.5, we find that f+ ⊕ M f− ⊕ Z ⊕ Z[G/hτ i] ≃ Z[G] ⊕ Z[G/hσi] ⊕ Z ⊕ Z[G/hτ i]. M If the cancellation of Z ⊕ Z[G/hτ i] is possible, then we get the isomorphism f+ ⊕ M f− ≃ Z[G] ⊕ Z[G/hσi]. M In Theorem 3.7, we will show that this is, indeed, the case. We first prove Lemma 3.6. Define   c0 cn−1 · · · c2 c1  c1 c0 cn−1 c2     .. ..  ..  . Circ(c0 , c1 , . . . , cn−1) =  . .  c1 c0    . . . . cn−2 . . cn−1  cn−1 cn−2 · · · c1 c0 be the n × n circulant matrix whose determinant is det(Circ(c0 , c1 , . . . , cn−1 )) = n−1 Y (c0 + c1 ζnk + · · · + cn−1 ζn(n−1)k ). k=0 The determinant of the circulant matrix may be found, for examples, on [Ja, page 281]. 10 Lemma 3.6 Let n ≥ 3 be an odd integer. n−1 n+1 2 2 { z }| { z }| n−1 . (1) det(Circ(1, . . . , 1, 0, . . . , 0)) = 2 n−1 n−3 2 2 { z }| { z }| (2) det(Circ(−1, . . . , −1, 0, 1, . . . , 1, 0)) = −1. Proof. (1) n−1 n+1 2 2 { z }| { z }| det(Circ(1, . . . , 1, 0, . . . , 0)) n−1 Y n−3  k 1 + ζnk + · · · + ζn 2 = k=0 n−3  n−1 Y k 1 + ζnk + · · · + ζn 2 = 2 k=1 n−1 n−1 n − 1 Y (1 − (ζnk ) 2 ) n−1 = = k 2 k=1 (1 − ζn ) 2 where in the 3rd line, we apply 4th line, we note that and so n−1 2 Pm i=0 n−1 xi = 1−xm+1 1−x for x = ζnk and m = n−3 2 and in the n−1 2 and n are relatively prime, which implies that hζn n−1 Y n−1 2 (1 − (ζn k ) )= k=1 i = hζn i n−1 Y (1 − ζnk ) k=1 as required. (2) By the same argument as in (1), we have n−1 n−3 2 2 z }| { z }| { det(Circ(−1, . . . , −1, 0, 1, . . . , 1, 0)) n−1  Y n+1 n−3 k k (n−2)k k 2 2 + ζn + · · · + ζn −1 − ζn − · · · − ζn = k=0   n−1 Y n+1 n+3 n−3  n−1 n−3 k k k n−1 1 − ζn 2 + ζnk − ζn 2 + · · · − ζn(n−2)k + ζn 2 = − (−1) + 2 2 k=1 = (−1) n n−1 n−3 YX n+1 k (−ζn 2 )i k=1 i=0 11 = (−1) n−1 Y k=1 = (−1) n−1 Y k=1 n+1 k (1 − (−ζn 2 )n−2 ) n+1 k (1 − (−ζn 2 )) n+1 (1 + ζn 2 (n−2)k n+1 k 2 (1 + ζn ) = −1 ) where we note that n+1 (2s) ≡ s (mod n) and n+1 (2s + 1) ≡ ( n+1 + s) (mod n) for the 2 2 2 n+1 3rd line and n − 2 is odd for the 5th line. We again note that 2 is relatively prime n+1 (n − 2) is relatively prime to n so hζn 2 to n and also n+1 2 us to conclude as before that the last product is 1. (n−2) n+1 i = hζn 2 i = hζn i allows  Theorem 3.7 Let G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn where n is an odd f+ ⊕ M f− ≃ Z[G] ⊕ Z[G/hσi]. integer. Then M Proof. Let u0 , u1 , . . . , un−1 , v0 , v1 , . . . , vn−1 be a Z-basis of Z[G] where ui , vj correspond to σ i , σ j τ in Z[G]. The actions of σ and τ are given by σ : ui 7→ ui+1 , vj 7→ vj+1 , τ : ui ↔ vn−i where the index of ui or vj is understood modulo n. Let t0 , t1 be the Z-basis of Z[G]/hσi] correspond to the cosets hσi, τ hσi. Then σ : t0 7→ t0 , t1 7→ t1 , τ : t0 ↔ t1 . f+ and M f− inside Z[G] ⊕ Z[G/hσi] The idea first is to find isomorphic copies of M f+ ⊕ M f− is a Z-basis of Z[G] ⊕ Z[G/hσi]. then to show that the Z-basis of M f+ , one could find an element x0 with τ (x0 ) = x0 such To find an isomorphic copy of M i that {σ x0 : i = 0, . . . , n − 1} is Z-linearly independent. Then it can easily be shown Pn−1 that Z[Dn ]·x0 ≃ M+ . If we find y0 such that σ(y0 ) = y0 and τ (y0 ) = −y0 + i=0 σ i (x0 ), f+ . Indeed, we may take such x0 then {σ i x0 : i = 0, . . . , n − 1} ∪ {y0 } is a Z-basis of M and y0 as x0 = n−1 X n−1 ui + i= n+1 2 n−1 y0 = 2 2 X vj + t0 + t1 , j=1 n−1 X j=0 vj ! + t0 + (n − 1)t1 . f− , one could find an element z0 with Similary, to find an isomorphic copy of M i τ (z0 ) = −z0 such that {σ z0 : i = 0, . . . , n − 1} is Z-linearly independent. Then it can easily be shown that Z[Dn ] · z0 ≃ M− . If we find y1 such that σ(y1 ) = y1 and Pn−1 i f− . σ (z0 ), then {σ i z0 : i = 0, . . . , n − 1} ∪ {y1} is a Z-basis of M τ (y1 ) = y1 − i=0 12 Indeed, we may take such z0 and y1 as z0 = u0 + n−1 X n−1 ui − y1 = i=0 vj + t0 − t1 , j=0 i= n+1 2 n−1 X 2 X n−1 ui − 2 n−1 X j=0 vj ! + t0 − (n − 1)t1 . Then we have M 0≤i≤n−1 ! M f+ , Z · σ i (x0 ) ⊕ Z · y0 ≃ M 0≤i≤n−1 ! f− . Z · σ i (z0 ) ⊕ Z · y1 ≃ M n−3 n−1 It remains to show that σ 2 (x0 ), . . ., σ n−1 (x0 ), x0 , σ(x0 ), . . ., σ 2 (x0 ), y0 , n−1 n−3 σ 2 (z0 ), . . ., σ n−1 (z0 ), z0 , σ(z0 ), . . ., σ 2 (z0 ), y1 form a Z-basis of Z[G] ⊕ Z[G/hσi]. n−3 n−1 Let Q be the coefficient matrix of σ 2 (x0 ), . . ., σ n−1 (x0 ), x0 , σ(x0 ), . . ., σ 2 (x0 ), n−1 n−3 y0 , σ 2 (z0 ), . . ., σ n−1 (z0 ), z0 , σ(z0 ), . . ., σ 2 (z0 ), y1 with respect to the Z-basis u0 , u1, . . . , un−1, v0 , v1 , . . . , vn−1 , t0 , t1 . The matrix Q is defined as   0 1 n+1 n+1 n−1 n−1 2 2 2 2    { z }| { { z }| { z }| .. ..  n  Circ(z1, .}| . . , 1, 0, . . . , 0) . Circ( 1, . . . , 1, 0, . . . , 0) .       0 1    n−1 n−1   − 2  n−1 n+1 n−1 n+1 2   2 2 2 2 z }| z z Q= { z }| { }| { }| {  . .. ..  n  Circ(0, . . . , 0, 1, . . . , 1) . Circ( . 0, . . . , 0, −1, . . . , −1)    n−1 n−1  − 2   2     1 · · · 1 1 1 · · · 1 1     1 · · · 1 −(n − 1) n − 1 −1 · · · − 1 | {z } {z } | n For examples, when n = 3, 5,  1 0 0 1  0 0   0 1  0 0  1 0  1 1 1 1 n Q is of the form 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 1 1 0 −1 −1 1 −1 0 −1 1 −1 −1 0 1 1 1 1 2 −1 −1 −1 13  1 1  1   −1  −1  −1  1 −2 and  1 1   0  0  0  0  0  0  1   1  1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 0 0 2 2 2 2 2 1 4 1 1 1 0 0 0 0 −1 −1 −1 1 −1 0 1 1 1 0 −1 0 0 −1 −1 1 −1 0 0 1 1 1 −1 −1 0 0 −1 1 −1 1 0 0 1 1 −1 −1 −1 0 0 1 −1 1 1 0 0 1 0 −1 −1 −1 0 1 −1  1 1   1  1  1  −2 . −2  −2  −2   −2  1 −4 We will show that det(Q) = −1. For a given matrix, we denote by C(i) its i-th column. When we say that, apply C(i) + C(1) on the i-th column, we mean the column operation by adding the 1st column to the i-th column. On the (2n + 2)-th column, apply C(2n + 2) + C(n + 1). On the (n + 1)-th column, apply C(n + 1) + n−1 (C(2n + 2)). On the (n + 1)-th column, apply C(n + 1) − C(1) − 2 · · · − C(n). Then all the entries of the (n + 1)-th column are zero except for the last (2n + 2)-th entry, which is −1. Hence it is enough to show det(Q0 ) = 1 where Q0 is a (2n + 1) × (2n + 1) matrix defined by   1  n+1 n+1 n−1 n−1 2 2 2 2   { z }| { { z }| { z }| z }| ..   n  Circ(1, . . . , 1, 0, . . . , 0) .   Circ(1, . . . , 1, 0, . . . , 0)     1     0 n−1 n−1 n+1 n+1   Q0 =   . 2 2 2 2 }| { }| { }| { }| { z z z z ..   n   Circ(0, . . . , 0, 1, . . . , 1) Circ(0, . . . , 0, −1, . . . , −1) .     0     1 · · · 1 1 · · · 1 2 | {z } {z } | n n On the (n + i)-th column, apply C(n + i) + C(f ( n+1 + i)) for i = 1, . . . n where 2 f (k) = ( k k≤n k − n k > n. On the (n+i)-th column, apply C(n+i)−C(2n+1) for i = 1, . . . , n. On the (2n+1)-th 2 column, apply C(2n + 1) − n−1 {C(1) + · · · + C(n)} − {C(n + 1) + · · · + C(2n)}. Thus 14 we get det(Q0 ) = det(Q1 ) where         Q1 =          0   z }| { z }| { ..   n Circ(1, . . . , 1, 0, . . . , 0) O .   0   0  n−1 n−3 n−1 n+1  2 2 2 2  . z }| z }| { z }| { { z }| { ..   n .  Circ(0, . . . , 0, 1, . . . , 1) Circ(0, 1, . . . , 1, 0, −1, . . . , −1)  0   2  ·{z ·· 1} 0| ·{z ·· 0} − n−1 |1 n−1 2 n+1 2 n n Because of Lemma 3.6 and n−3 n−1 n−1 n−3 2 2 2 2 z }| z }| { z }| { { z }| { det(Circ(0, 1, . . . , 1, 0, −1, . . . , −1)) = det(Circ(−1, . . . , −1, 0, 1, . . . , 1, 0)), we find det(Q1 ) = n−1 2 2 · (−1) · (− n−1 ) = 1.  Lemma 3.8 Let M+ , M− , N+ , N− , Z, Z− be G-lattices with G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn in Definition 3.1, Definition 3.2 and Definition 3.3 where n is an odd integer. Then there are non-split exact sequences of G-lattices 0 → N− → M+ → Z → 0 and 0 → N+ → M− → Z− → 0. Proof. Case 1. M+ . By definition, choose a Z-basis {xi : 0 ≤ i ≤ n − 1} of M+ such that σ : xi 7→ xi+1 , τ : xi ↔ xn−i where the index is understood modulo n. Define u0 = x n−1 − x n+1 , t = x n−1 , ui = σ i (u0 ) for 0 ≤ i ≤ n − 1. 2 2 2 P It follows that 0≤i≤n−1 ui = 0 and {u1 , u2 , . . . , un−1 , t} is a Z-basis of M+ with σ and τ acting by σ : u1 7→ u2 7→ · · · 7→ un−1 7→ u0 = −(u1 + u2 + · · · + un−1), t 7→ t + u1 + u2 + · · · + un−1 , τ : ui ↔ −un−i , t 7→ t + u1 + u2 + · · · + un−1. P P Note that 1≤i≤n−1 Z · ui ≃ N− and M+ /( 1≤i≤n−1 Z · ui ) ≃ Z. Hence we get the sequence 0 → N− → M+ → Z → 0. We claim that this sequence doesn’t split. Otherwise, M+ ≃ N− ⊕ Z. Since both M+ and Z are permutation lattices, it follows that H 1 (S, N− ) = 0 for any subgroup S of G. On the other hand, it is not difficult to see that H 1 (hσi, N− ) = Z/nZ. Thus we find a contradiction. Case 2. M− . The proof is similar to Case 1. Choose a Z-basis {xi : 0 ≤ i ≤ n − 1} of M− with σ : xi 7→ xi+1 , τ : xi 7→ −xn−i . 15 Define u0 = x n−1 − x n+1 , t = x n−1 , ui = σ i (u0 ) for 0 ≤ i ≤ n − 1. We find that 2 2 2 σ : u1 7→ u2 7→ · · · 7→ un−1 7→ −(u1 + u2 + · · · + un−1), t 7→ t + u1 + u2 + · · · + un−1 , τ : ui ↔ un−i , t 7→ −t − u1 − u2 − · · · − un−1 . P P Thus 0≤i≤n−1 Z · ui ≃ N+ and M− /( 1≤i≤n−1 Zui ) ≃ Z− . Again, the sequence 0 → N+ → M− → Z− → 0 doesn’t split. Otherwise, there is some element s ∈ M− satisfying that σ(s) = s, τ (s) = −s and M− = N+ ⊕ Zs. A straightforward computation shows that it is necessary that s is of the form b(u1 + 2u2 + · · · + iui + · · · + (n − 1)un−1 + nt) where b is some integer. In that case, N+ + Zs is a proper sublattice of M− . Hence we get a contradiction.  f+ , M f− , Z, Z− be G-lattices with G = hσ, τ : σ n = τ 2 = Lemma 3.9 Let N+ , N− , M −1 −1 1, τ στ = σ i ≃ Dn in Definition 3.1, Definition 3.2 and Definition 3.3 where n is an odd integer. Then there are non-split exact sequences of G-lattices 0 → N− → f+ → Z[G/hσi] → 0 and 0 → N+ → M f− → Z[G/hσi] → 0. M Moreover, the sequences 0 → N− → M+ → Z → 0 and 0 → N+ → M− → Z− → 0 f+ → Z[G/hσi] → 0 in Lemma 3.8 are the pull-backs of the sequences 0 → N− → M f− → Z[G/hσi] → 0 through the map α : Z → Z[G/hσi] and the map and 0 → N+ → M α− : Z− → Z[G/hσi] respectively. f+ . Proof. Case 1. M We adopt the same notations x0 , x1 , . . . , xn−1 , u1, . . . , un−1 in the proof of Lemma f+ = (L 3.8. Write M 0≤i≤n−1 Z · xi ) ⊕ Z · w with σ : xi → 7 xi+1 , w 7→ w, τ : xi → 7 xn−i , w → 7 −w + x0 + x1 + · · · + xn−1 where the index is understood modulo n. Define u0 = x n−1 − x n+1 , t = x n−1 , ui = σ i (u0 ) for 0 ≤ i ≤ n − 1. 2 2 2 We claim that X xi = nt − (n − 1)u0 − (n − 2)u1 − · · · − un−2 . 0≤i≤n−1 Since x n−1 = t, x n+1 = t − u0 , we find that x n+3 = x n+1 − u1 = t − u0 − u1 . By 2 2 2 2 induction, we may find similar formulae for x n+5 , . . . , xn−1 , x0 , . . . , x n−3 . In particular, 2 2 P x n−3 = t − u0 − u1 − · · · − un−2 . Thus the formula of 0≤i≤n−1 xi is found. 2 f+ and Note that {u1 , . . . , un−1, t, w} is a Z-basis of M X σ : u1 7→ u2 7→ · · · 7→ un−1 7→ −(u1 + u2 + · · · + un−1 ), t 7→ t + ui , w 7→ w, τ : ui 7→ −un−i , t 7→ t + X 1≤i≤n−1 ui , w 7→ −w + u1 + 2u2 + · · · + (n − 1)un−1 + nt. 1≤i≤n−1 16 f+ /N− = Zt̄ ⊕ Zw̄, the G-lattice M f+ /N− may be regarded Since σ acts trivially on M as a Ḡ-lattice where Ḡ = G/hσi ≃ hτ i ≃ C2 . Define w0 = − n−1 t+w, w1 = n+1 t−w. Then {u1 , . . . , un−1 , w0 , w1 } is also a Z-basis 2 2 f f of M+ and M+ /N− = Zw̄0 ⊕ Zw̄1 . It is routine to verify that τ : w̄0 7→ w̄1 7→ w̄0 . Thus f+ → f+ /N− is isomorphic to Z[Ḡ]. The exact sequence 0 → N− → M the Ḡ-lattice M Z[G/hσi] → 0 is found. It is easy to verify that 0 → N− → M+ → Z → 0 is the pull-back of the sequences f+ → Z[G/hσi] → 0 through the map α : Z → Z[G/hσi] defined by 0 → N− → M α(w) = 1 + τ ∈ Z[G/hσi] where Z = Z · w. Since the pull-back sequence 0 → N− → M+ → Z → 0 doesn’t split, the source f+ → Z[G/hσi] → 0 will not split (consider the map of the sequence 0 → N− → M extension groups induced by α). f− . Case 2. M The proof is similar. We adopt the notations x0 , x1 , . . . , xn−1 , u1 , . . . , un−1 in the f− = (L proof of Case 1. Write M 0≤i≤n−1 Z · xi ) ⊕ Z · w such that σ : xi 7→ xi+1 , w 7→ w, τ : xi 7→ −xn−i , w 7→ w − X xi 0≤i≤n−1 where 0 ≤ i ≤ n − 1 and the index is understood modulo n. Define u0 = x n−1 − x n+1 , t = x n−1 , ui = σ i (u0 ) for 0 ≤ i ≤ n − 1. Then 2 2 2 f− and {u1, . . . , un−1 , t, w} is a Z-basis of M σ : u1 7→ u2 7→ · · · 7→ un−1 7→ −(u1 + · · · +un−1 ), t 7→ t + u1 + u2 + · · · + un−1 , w 7→ w, ! X τ : ui 7→ un−i , t 7→ −t − ui , 1≤i≤n−1 w 7→ w − u1 − 2u2 − · · · − (n − 1)un−1 − nt. f− /N+ and define w0 = Consider M is similar to Case1 and is omitted. n−1 t 2 − w, w1 = n+1 t 2 − w. The remaining proof  Lemma 3.10 Let N+ , N− be G-lattices in Definition 3.2 with G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn where n is an odd integer. Then there is a non-split exact sequences of G-lattices 0 → N+ ⊕ N− → Z[G] → Z[G/hσi] → 0. Proof. This lemma was proved by Lee for the case when n = p is an odd prime number in (i) of Case 1 of [Le, pages 222–224]. There was also a remark in the first paragraph of [Le, page 229, Section 4]. Here is a proof for the general case when n is an odd integer. 17 Step 1. Let {σ i , σ i τ : 0 ≤ i ≤ n − 1} be a Z-basis of Z[G]. Let {t0 , t1 } be a Z-basis of Z[G/hσi] with σ(ti ) = ti , τ : t0 ↔ t1 . Define a G-lattice surjection ϕ : Z[G] → Z[G/hσi] by ϕ(σ i ) = t0 , ϕ(σ i τ ) = t1 . Define a G-lattice M by M = Ker(ϕ). We will prove that M ≃ N+ ⊕ N− (note that Z[G] is indecomposable). Define ui , vi ∈ M as follows. Define u0 = σ (n−1)/2 − σ (n+1)/2 , v0 = σ (n+1)/2 τ − σ (n−1)/2 τ , and ui =P σ i (u0 ), vi = σ i (v P0 ) for 0 ≤ i ≤ n − 1. It follows that 0≤i≤n−1 ui = 0≤i≤n−1 vi = 0, and {ui , vi : 1 ≤ i ≤ n − 1} is a Z-basis of M. Moreover, it is easy to see that σ : ui 7→ ui+1 , vi 7→ vi+1 , τ : ui 7→ vn−i , vi 7→ un−i where the index is understood modulo n. Step 2. P P Define xi = ui + vi , yi = ui−1 − vi+1 where 0 ≤ i ≤ n − 1. Clearly 0≤i≤n−1 xi = 0≤i≤n−1 yi = 0. We claim that {xi , yi : 1 ≤ i ≤ n − 1} is a Z-basis of M. Assume the above claim. Define M1 = ⊕1≤i≤n−1 Z · xi , M2 = ⊕1≤i≤n−1 Z · yi . It is easy to verify that M1 ≃ N+ and M2 ≃ N− . Hence the proof that M ≃ N+ ⊕ N− is finished. Step 3. We will prove that {xi , yi : 1 ≤ i ≤ n − 1} is a Z-basis of M. Let Q be the coefficient matrix of x1 , x2 , . . . , xn−1 , y1 , . . . , yn−1 with respect to the Zbasis u1 , u2 , . . . , un−1, v1 , . . . , vn−1 . For the sake of visual convenience, we will consider the matrix P which is the transpose of Q. We will show that det(P ) = 1. The matrix P is defined as   1 1   .. ..   . .     . .   .. ..     1 1   P = .  −1 · · · −1 −1 0 −1   .. ..   .  1 0 .   ..   .. .  . 0 −1  1 0 1 1 ··· 1 For examples, when n = 3, 5, it is of the form 18   1 0 1 0 0 1 0 1   P = −1 −1 0 −1  , 1 0 1 1  1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0  0 0 1 0 0 0 1 0   0 0 0 1 0 0 0 1  P = −1 −1 −1 −1 0 −1 0 0  1 0 0 0 0 0 −1 0  0 1 0 0 0 0 0 −1 0 0 1 0 1 1 1 1        .      In the case n = 3, 5, it is routine to show that det(P ) = 1. When n ≥ 7, we will apply column operations on the matrix P and then expand the determinant along a row. Thus we are reduced to matrices of smaller size. For a given matrix, we denote by C(i) its i-th column. When we say that, apply C(i) + C(1) on the i-th column, we mean the column operation by adding the 1st column to the i-th column. Step 4. We will prove det(P ) = 1 where P is the (2n − 2) × (2n − 2) integral matrix defined in Step 3. Suppose n ≥ 7. Apply column operations on the matrix P . On the (n + i)-th column where 0 ≤ i ≤ n − 2, apply C(n + i) − C(i + 1). Thus all the entries of the right upper part of the resulting matrix vanish. We get det(P ) = det(P0 ) where P0 is an (n − 1) × (n − 1) integral matrix defined as   1 0 1 1 1 1 ··· 1 −1 0 −1      −1 0 −1     −1 0 −1   . P0 =    −1 0 −1    .. .. ..  . . .      −1 0 −1 1 1 1 ··· 1 1 0 1 Step 5. 19 Apply column operations on P0 . On the 3rd column, apply C(3) − C(1). Then, on the 4th column, apply C(4) − C(2). In the resulting matrix, each of the 2nd row and the 3rd row have only one non-zero entry. Thus det(P0 ) = det(P1 ) where P1 is an (n − 3) × (n − 3) integral matrix defined as  0 1 1 1 1 ··· 1 −1 0 −1   −1 0 −1   −1 0 −1 P1 =   .. .. ..  . . .    −1 0 −1 0 0 1 ··· 1 0 1       .      Step 6. Apply column operations on P1 . On the 3rd column, apply C(3) − C(1). On the 4th column, apply C(4) − C(2). Then expand the determinant along the 2nd row and the 3rd row. We get det(P1 ) = det(P2 ) where P2 is an (n − 5) × (n − 5) integral matrix defined as   1 0 1 ··· 1 −1 0 −1      .. .. .. P2 =  . . . .    −1 0 −1 1 ··· 1 0 1 But the matrix P2 looks the same as P0 except the size. Done.  The following lemma is suggested by the referee. Lemma 3.11 Let → Z} be the augmentation ideal of Z[G] where P PIG := Ker{Z[G] − ε( g∈G ng · g) = g∈G ng with G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn and n an f+ , M f− be G-lattices in Definition 3.1, Definition 3.2 odd integer. Let M+ , M− , N− , M and Definition 3.3. Then IG ≃ M− ⊕ N− and there are exact sequences of G-lattices f+ → Z[G] → N− → 0, 0 → M+ ⊕ M f+ → 0 → M+ → Z[G] → M− → 0, 0 → M (2) Z[G] → IG → 0 ε Proof. Step 1. Note that G is a Frobenius group. Thus we may use the proof of Theorem 8.5 (iii) ⇒ (i) in [Gr1, pages 57-58]. More explicitly, write H = hτ i. By Step 1 20 and Step 2 of [Gr1, P pages 57-58], the G-lattice IG is isomorphic toP the direct sum of the i−1 i G-lattice IZ[G/H] = 1≤i≤n−1 Z ·(σ H −σ H) and the G-lattice 0≤i≤n−1 Z ·σ i (1−τ ). On the other hand, it is easy to verify that the G-lattice IZ[G/H] is isomorphic to i N− with σ i−1 H to the basis element in Definition 3.2. Similarly, P− σ H corresponding i the G-lattice 0≤i≤n−1 Z · σ (1 − τ ) is isomorphic to M− with σ i (1 − τ ) corresponding to the basis element xi in the proof of Lemma 3.8. Step 2. For the P exact sequence 0 → M+ → Z[G] → M− → 0, note that the Gsublattice M := 0≤i≤n−1 Z · σ i (1 + τ ) of Z[G] is isomorphic to M+ with σ i (1 + τ ) corresponding to the basis element in Definition 3.1. Choose σ i (where 0 ≤ i ≤ n − 1) to be a basis for Z[G]/M. Then it is easy to verify that Z[G]/M is isomorphic to M− with σ i corresponding to the basis element in Definition 3.1. Hence the result. f+ → Z[G] → N− → 0. Define a sublattice It remains to find the sequence 0 → M P P i i f f := M 0≤i≤n−1 σ τ of Z[G]. The lattice M is isomorphic 0≤i≤n−1 Z · σ (1 + τ ) + Z · P i f+ with σ i (1 + τ ) corresponding to the basis element wi and to M 0≤i≤n−1 σ τ corref+ in Definition 3.3. Choose σ i (where sponding to w where wi and w are the basis of M f. It is not difficult to show that Z[G]/M f is 1 ≤ i ≤ n − 1) to be a basis for Z[G]/M i isomorphic to N− with σ corresponding to the basis element in Definition 3.2.  §4. The relation modules Recall the relation module Rab in Section 1. Lemma 4.1 Let G be a finite group, 1 → R → F → G → 1 be a free presentation of G where F is a free group of finite rank. Then R is a free group of finite rank and Rab is a faithful G-lattice, i.e. if g ∈ G and g · x = x for any x ∈ Rab , then g = 1. Proof. R is a free group of finite rank by the Nielsen-Schreier Theorem [Kur, page 36]; later we will exhibit a free generating set of R as indicated in [Ma, Theorem 8.1]. Since R is free, Rab is a free abelian group of finite rank. Thus Rab is a G-lattice. It is a faithful G-lattice by a theorem of Gaschütz (see [Gr1, page 8]).  Lemma 4.2 Let G be a finite group, 1 → R → F → G → 1 be a free presentation of ε G where F is a free group Let IG := Ker{Z[G] − → Z} be the augmentation P of rank d. P ideal of Z[G] where ε( g∈G ng · g) = g∈G ng . (1) There is a short exact sequence of G-lattices 0 → Rab → Z[G](d) → IG → 0. (2) Write IG⊗2 := IG ⊗Z IG . Then Rab ⊕ Z[G](|G|−1) ≃ IG⊗2 ⊕ Z[G](d) . (3) Both Rab and IG⊗2 are coflabby and 0 → (IG )0 → Z[G](|G|−1) → (IG⊗2 )0 → 0 is a flabby resolution of (IG )0 . 21 Proof. (1) By [HS, page 199, Corollary 6.4], we have a short exact sequence 0 → R → Z[G] ⊗Z[F ] IF → IG → 0. Since IF is a free Z[F ]-module of rank d by [HS, page 196, Theorem 5.5], we find that Z[G] ⊗Z[F ] IF ≃ Z[G](d) . (2) Tensor 0 → IG → Z[G] → Z → 0 with IG over Z. We get 0 → IG⊗2 → Z[G] ⊗Z IG → IG → 0. For a Z[G]-module M, write M0 the underlying abelian group of M; thus M0 becomes a trivial Z[G]-module. By [HS, page 212, Lemma 11.7, Corollary 11.8], the Z[G]-modules Z[G] ⊗Z IG and Z[G] ⊗Z (IG )0 are isomorphic. Hence Z[G] ⊗Z IG ≃ Z[G](|G|−1) . In summary, we have two short exact sequences 0 → Rab → Z[G](d) → IG → 0 and 0 → IG⊗2 → Z[G](|G|−1) → IG → 0. Apply Schanuel’s Lemma. (3) It suffices to show that H 1 (S, IG⊗2 ) = 0 for any subgroup S of G. Use the exact sequences 0 → IG⊗2 → Z[G](|G|−1) → IG → 0 (in (2)) and 0 → IG → Z[G] → Z → 0. b 0 (S, IG ) ≃ H −1 (S, Z) = 0.  We find that H 1 (S, IG⊗2 ) ≃ H ab Remark. From the above lemma, we may determine the rank of the free abelian group Rab . This is also the rank of R as a free group; thus it supplies a proof of Schreier’s Theorem [Kur, page 36] by homological algebra. Lemma 4.3 Let G be a finite group, 1 → R1 → F1 → G → 1 and 1 → R2 → F2 → G → 1 be two free presentations of G where Fi is a free group of rank di for i = 1, 2. Then R1ab ⊕ Z[G](d2 ) ≃ R2ab ⊕ Z[G](d1 ) . Proof. By Lemma 4.2 we have exact sequences of G-lattices 0 → Riab → Z[G](di ) → IG → 0 for i = 1, 2. Apply Schanuel’s Lemma.  Lemma 4.4 Let G = Dn be the dihedral group of order 2n where n ≥ 2. Let 1 → R → F → G → 1 be a free presentation where F is a free group of finite rank. (1) If n is odd, then Rab is an invertible lattice. (2) If n is even, then Rab is coflabby, but is not flabby. Proof. (1) Suppose n is odd. Then all the p-Sylow subgroups of Dn are cyclic groups. Hence we may apply Theorem 2.6. Thus [IG0 ]f l is invertible. On the other hand, from Lemma 4.2, we get 0 → Rab → Z[G](d) → IG → 0. Taking the dual lattices, we get 0 → IG0 → Z[G](d) → (Rab )0 → 0. By Lemma 4.2, Rab is coflabby. Hence (Rab )0 is flabby. Thus 0 → IG0 → Z[G](d) → (Rab )0 → 0 is a flabby resolution of IG0 , i.e. [IG0 ]f l = [(Rab )0 ]. Since [IG0 ]f l is invertible, it follows that [(Rab )0 ] is invertible. Hence there is some permutation G-lattice P such that (Rab )0 ⊕ P is an invertible lattice. Thus (Rab )0 ⊕ P ⊕ M = Q for some G-lattice M and some permutation G-lattice Q. Taking dual, we find that Rab is invertible. (2) By Lemma 4.2, Rab is coflabby. It remains to show that Rab is not flabby. Since n is even, the subgroup S = hτ, σ n/2 i exists and is isomorphic to C2 × C2 . We will show that H −1 (S, Rab ) 6= 0. 22 From the exact sequences 0 → Rab → Z[G](d) → IG → 0 and 0 → IG → Z[G] → Z → 0, we find that H −1 (S, Rab ) ≃ H −2 (S, IG ) ≃ H −3 (S, Z) = H2 (S, Z) ≃ Z/2Z by [HS, page 223, Theorem 15.2], because H1 (C2 , Z) ≃ Z/2Z, H2 (C2 , Z) = 0.  An immediate consequence of Endo and Miyata’s Theorem, i.e. Theorem 2.7, is the following. Theorem 4.5 Let Rab be the relation module associated to the free resolution 1 → ε R→F − → Dn → 1 in Definition 1.1 where n ≥ 2. If K/k is a Galois extension with Galois group Dn , then K(Rab )Dn is stably rational over k if and only if n is odd. If k is an infinite field and n is even, then K(Rab )Dn is not retract rational over k. 0 fl ] = 0 if and only if n is an odd integer. On the Proof. By Theorem 2.7, [ID n ⊗2 0 fl 0 other hand, [IDn ] = [(IDn ) ] = [(Rab )0 ] by Lemma 4.2. Note that [(Rab )0 ] = 0 ⇔ [(Rab )] = 0 ⇔ [(Rab )]f l = 0, because the flabby resolution 0 → Rab → P → E → 0 splits whenever E is invertible (see the following paragraph). Apply Theorem 2.5. The proof for the stable rationality is finished. Now suppose that k is an infinite field and n is even. Choose a flabby resolution 0 → Rab → P → E → 0 for Rab where P is permutation and E is flabby. We claim that [E] ∈ FDn is not invertible. Suppose not. Then we may assume that E is an invertible lattice without loss of generality. Since Rab is coflabby by Lemma 4.2, the above exact sequence splits because of [Len, Proposition 1.2]. It leads to the fact that P ≃ Rab ⊕ E, i.e. Rab is invertible. This is impossible by Lemma 4.4. Because [E] ∈ FDn is not invertible, we find that K(Rab )Dn is not retract rational over k by Theorem 2.5.  The following theorem was communicated to us by the referee. We will give another decomposition of Rab (when n is odd) in Theorem 4.8. Theorem 4.6 Let Rab be the relation module of the free presentation of Dn in Definif where M and M+ (resp. M f tion 1.1. If n is an odd integer ≥ 3, then Rab ≃ M ⊕ M f+ ) belong to the same genus. and M Proof. Write G = Dn where n is odd. f+ → Z[G](2) → From Lemma 3.11 we have a short exact sequence 0 → M+ ⊕ M IG → 0. From Lemma 4.2 we have another short exact sequence 0 → Rab → Z[G](2) → f+ ) ⊕ Z[G](2) ≃ Rab ⊕ Z[G](2) . IG → 0. By Schanuel’s Lemma, we find that (M+ ⊕ M Let (Z[G](2) )(G) , (M+ )(G) , . . . be the localizations of Z[G](2) , M+ . . . with respect to the multiplicative closed set Z \ ∪p pZ where p runs over all the prime divisors of | G |. f+ )(G) ⊕(Z[G](2) )(G) ≃ f+ )⊕Z[G](2) ≃ Rab ⊕Z[G](2) , we have (M+ )(G) ⊕(M From (M+ ⊕M (Rab )(G) ⊕ (Z[G](2) )(G) . By the semi-local cancellation [Gr1, page 19], we obtain that f+ )(G) ≃ (Rab )(G) . By [Gr1, page 26, Proposition 5.1] we find that (M+ )(G) ⊕ (M f for some sublattices M and M f with the required property (see [CR, Rab = M ⊕ M page 642] for the definition of a genus).  23 Now we will turn to finding the free generators of R in a free presentation 1 → R → F − → G → 1 where G is a finite group and F is a free group of rank d. It is known that R is a free group of rank 1 + (d − 1) · |G| by Schreier’s Theorem [Kur, page 36]. Let s1 , s2 , . . . , sd be the free generators of F . Then the free generators of R can be found as follows (see [Ma, pages 205–207]). We choose a Schreier system Σ. Σ is a subset of F such that 1 ∈ Σ, |Σ ∩ Rx| = 1 for any x ∈ F , and some other properties are satisfied (see [Ma, page 205]). Define a function Φ : F → Σ such that ε(x) = ε(Φ(x)) for any x ∈ F . Then the free generators of R can be chosen as usi Φ(usi )−1 where u ∈ Σ, 1 ≤ i ≤ d and usi Φ(usi )−1 6= 1 (see [Ma, p.206, Theorem 8.1]). ε ε In Definition 1.1 we consider a particular free presentation 1 → R → F − → Dn → 1 n 2 −1 −1 where Dn = hσ, τ : σ = τ = 1, τ στ = σ i, F = hs1 , s2 i is the free group of rank two, and ε(s1 ) = σ, ε(s2 ) = τ . It is routine to verify that Σ = {si1 sj2 : 0 ≤ i ≤ n − 1, 0 ≤ j ≤ 1} is a Schreier system of this free presentation. Hence the free generators of R can be chosen as (1) −(n−1) sn1 , s2 s1 s2−1 s1 −(i−1) , si1 s2 s1 s−1 2 s1 (1 ≤ i ≤ n − 1), si1 s22 s−i 1 (0 ≤ i ≤ n − 1). −(n−1) −(n−1) We replace the generator s2 s1 s−1 in (1) by s2 s1 s−1 2 s1 2 s1 Hence we get the generators a, bi , ci (0 ≤ i ≤ n − 1) of R where −(i−1) a = sn1 , bi = si1 s2 s1 s−1 2 s1 (2) · sn1 = s2 s1 s−1 2 s1 . , ci = si1 s22 s−i 1 . Note that F acts on R by conjugation, i.e. for any x ∈ F , any α ∈ R, x α = x·α·x−1 . It is not difficult to verify that s1 and s2 act on these generators by (3) (4) s1 : a 7→ a, bi 7→ bi+1 if 0 ≤ i ≤ n − 2, bn−1 7→ ab0 a−1 , ci 7→ ci+1 if 0 ≤ i ≤ n − 2, cn−1 7→ ac0 a−1 , −1 −1 s2 : a 7→ b0 a−1 bn−1 bn−2 · · · b1 , b0 7→ c0 c−1 1 b1 , b1 7→ b0 a cn−1 ac0 , −1 −1 −1 −1 bi 7→ b0 a−1 bn−1 bn−2 · · · bn−i+1 cn−i c−1 n−i+1 bn−i+2 bn−i+3 · · · bn−1 ab0 (where 2 ≤ i ≤ n − 1), c0 7→ c0 , c1 7→ (b0 a−1 )cn−1 (b0 a−1 )−1 , ci 7→ (b0 a−1 bn−1 bn−2 · · · bn−i+1 )cn−i (b0 a−1 bn−1 bn−2 · · · bn−i+1 )−1 (where 2 ≤ i ≤ n − 1). More explicitly, if n is odd, the action of s2 on b2 , b3 , . . . , bn−1 is given by −1 b2 → 7 b0 a−1 bn−1 cn−2 c−1 n−1 ab0 , .. . −1 −1 −1 b n−1 7→ b0 a−1 bn−1 bn−2 · · · b n+3 c n+1 c−1 n+3 b n+5 · · · bn−1 ab0 , 2 2 2 2 2 −1 b n+1 7→ b0 a bn−1 bn−2 · · · b n+1 c n−1 c n+1 b n+3 · · · b−1 n−1 ab0 , −1 2 2 24 2 −1 −1 2 2 −1 −1 −1 b n+3 7→ b0 a−1 bn−1 bn−2 · · · b n−1 c n−3 c−1 n−1 b n+1 · · · bn−1 ab0 , 2 2 2 2 2 .. . −1 −1 −1 bn−1 7→ b0 a−1 bn−1 bn−2 · · · b2 c1 c−1 2 b3 · · · bn−1 ab0 . ε Lemma 4.7 Let 1 → R → F − → Dn → 1 be the free presentation of Dn = hσ, τ : n 2 −1 −1 σ = τ L= 1, τ στ = σ L i in Definition 1.1. Then Rab is a Dn -lattice with Rab = Z · ā ⊕ ( 0≤i≤n−1 Z · b̄i ) ⊕ ( 0≤i≤n−1 Z · c̄i ) and the actions of σ and τ on Rab are given by σ : ā 7→ ā, b̄0 7→ b̄1 7→ · · · 7→ b̄n−1 7→ b̄0 , c̄0 7→ c̄1 7→ · · · 7→ c̄n−1 7→ c0 , X τ : ā 7→ −ā + b̄i , b̄0 7→ b̄1 + c̄0 − c̄1 , b̄1 7→ b̄0 + c̄n−1 − c̄0 , 0≤i≤n−1 b̄i 7→ b̄n−i+1 + c̄n−i − c̄n−i+1 for 2 ≤ i ≤ n − 1, c̄0 7→ c̄0 , c̄i 7→ c̄n−i for 1 ≤ i ≤ n − 1. Proof. Let ā, b̄i , c̄i be the images of a, bi , ci in the canonical projection R → Rab = R/[R, R] where a, bi , ci are defined in (2). The actions of σ and τ on Rab follow from Formulae (3) and (4).  Theorem 4.8 Let Rab be the relation module of the free presentation of Dn in Definif+ where M+ and M f+ are the Dn tion 1.1. If n is an odd integer ≥ 3, then Rab ≃ M+ ⊕M ab lattices in Definition 3.1 and Definition 3.3. Thus R ⊕ Z ≃ Z[Dn /hσi]⊕ Z[Dn /hτ i](2) . f+ , then identity Rab ⊕ Z ≃ Z[Dn /hσi] ⊕ Proof. Once we prove Rab ≃ M+ ⊕ M (2) Z[Dn /hτ i] follows from Theorem 3.4 because M+ = IndDhτni Z ≃ Z[Dn /hτ i] by definition. f+ . The first proof relies on Lemma 4.7 We will give two proofs of Rab ≃ M+ ⊕ M and is computational. The second proof is suggested by the referee. It is based on a new technique, besides an adaptation of the method in [Gr1, pages 56-58] and [GR, page 199, Corollary 6.4] (see Step 2 and Step 3 of the second proof). The first proof ———— Step 1. Recall the n × n matrices A and B in Definition 3.1. Define In to be the identity matrix of size n, and define 1n to be the n × 1 matrix all of whose entries are equal to 1. Define C to be the n × n matrix   1 −1   .  . . −1 0    ..  ∈ Mn (Z). . C= .  .  1 .    1 −1 0 −1 1 25 For examples, when n = 5, C is  0 0   0  1 −1 equal to  0 0 1 −1 0 1 −1 0    1 −1 0 0 .  −1 0 0 0 0 0 0 1 Step 2. Write the actions of σ and τ on Rab with respect to the ordered basis b̄1 , . . . , b̄n−1 , b̄0 , c̄1 , . . . , c̄n−1 , c̄0 , ā. It is easy to verify that     A 0 AB 0 1n  ∈ M2n+1 (Z). σ 7→  0 A  ∈ M2n+1 (Z), τ 7→  C B 1 −1 It is easy to check that C = B − AB. We will change the basis of Rab in the following step so that the actions of σ and τ correspond to the matrices     B A  A 0 and  B 1n  . 0 1 0 −1 f+ in Definition 3.1 and Definition 3.3. Compare with the matrix forms of M+ and M f+ . We find that Rab ≃ M+ ⊕ M Step 3. Remember An = B 2 = (AB)2 = In . Thus BA = A−1 B and A− Define   In 0 n−1 P1 = In − A 2 In  . 1 Then we find  A 0  P1 · 0 A  AB 0 P1 ·  C B Define   · P1−1 1  1n −1  · P1−1  A 0  = 0 A  AB 0 = 0 B  n−1 A 2 0  P2 = 0 In 26 1  . 1  , 1n −1  . n−1 2 =A n+1 2 . Then we find  A 0 P2 ·  0 A  AB 0  P2 · 0 B   · P2−1 1 1n −1 Define   A 0 = 0 A  · P2−1  0 In P3 = In 0 We finally get  A 0  P3 · 0 A  B 0 P3 ·  0 B   · P3−1 1  1n −1  · P3−1  B 0  = 0 B 1 1  , 1n −1  .  .  A 0  = 0 A  B 0 = 0 B 1  ,  1n  . −1 The second proof ————– Step 1. Let the notations be the same as in Definition 1.1. Define H := hτ i to be the subgroup of G ≃ Dn generated by τ . The augmentation map Z[H] → Z induces a surjective G-morphism Z[G] → Z[G/H] since Z[G] ≃ IndG H Z[H] and Z[G/H] ≃ G IndH Z. Let IG and IG/H be the augmentation G-lattices associated to Z[G] → Z and Z[G/H] → Z respectively. From the Snake Lemma, there is a short exact sequence of G-lattices π 0 → G · IH → IG − → IG/H → 0 where G · IH denotes the kernel of the map Z[G] → Z[G/H], which is nothing but the G-sublattice of IG generated by 1 − τ . Note that the above exact sequence is the exact sequence in Step 1 of the proof of [Gr1, Theorem 8.5: (iii) ⇒ (i)] (see the last line in page 57 there). By [Gr1, page 58, Step 2], this exact sequence splits. ε Step 2. Let 1 → R → F − → G → 1 be the free presentation of Dn where F = hs1 , s2 i the free group of rank 2, and ε(s1 ) = σ, ε(s2 ) = τ . Let IF and IG be the augmentation ideals of Z[F ] and Z[G] respectively. By [HS, page 199, Corollary 6.4], we have a short exact sequence of G-lattices 0 → Rab → Z[G] ⊗Z[F ] IF − → IG → 0. ν 27 Since IF is a free Z[F ]-module of rank two by [HS, page 196, Theorem 5.5], we find that Z[G] ⊗Z[F ] IF ≃ Z[G](2) . Explicitly, replacing the free generators 1 − s1 and 1 − s2 (n−1)/2 of the Z[F ]-module IF by s1 (1 − s1 ) and 1 − s2 . We find that n−1 Z[G] ⊗Z[F ] IF = Z[G](1 ⊗ (1 − s2 )) ⊕ Z[G](1 ⊗ s1 2 (1 − s1 )) ≃ Z[G](2) . (n−1)/2 Note that ν(1 ⊗ (s1 (1 − s1 ))) = σ (n−1)/2 (1 − σ) and ν(1 ⊗ (1 − s2 )) = 1 − τ . Thus ν(Z[G] ⊗ (1 − s2 )) = G · IH ≃ M− . Step 3. The morphism ν induces the morphisms ν1 and ν2 in the following commutative diagram 0 // Z[G](1 ⊗ (1 − s2 )) // Z[G] ⊗Z[F ] IF ν1 0 Z[G](1 ⊗ s1 2 (1 − s1 )) // IG 0 // ν2 ν   // G · IH n−1 // //  IG/H // 0 where the first row is exact (obvious !), and the second row is exact by Step 1. We will show that the columns are surjective in the next step. Step 4. We will apply the Snake Lemma to the commutative diagram in Step 3. Note that Ker(ν) = Rab by Part (1) of Lemma 4.2. τ , ν1 Since ν1 : Z[G](1 ⊗ (1 − s2 )) → G · IG sends the generator P 1 ⊗ (1 − s2 )i to 1 − n−i is surjective and Ker(ν1 ) is isomorphic to the G-sublattice 0≤i≤n−1 Z(σ + τ σ ) of Z[G]. Note that this sublattice is nothing but M+ (see Definition 3.1 and the matrix presentation of M+ ). (n−1)/2 (1 − s1 ))) → IG/H sends the On the other hand, the map ν2 : Z[G](1 ⊗ (s1 (n−1)/2 (n−1)/2 (n+1)/2 generator 1 ⊗ (s1 (1 − s1 )) to σ −σ ∈ IG/H . Thus P it is alsoi surjective and Ker(ν2 ) is isomorphic to the G-sublattice Z[G](1 + τ ) + Z( 0≤i≤n−1 τ σ ) of Z[G], f+ by Definition 3.3. which is isomorphic to M From the Snake Lemma, we find an exact sequence of G-lattices f+ → 0. 0 → M+ → Rab → M The above sequence splits by [Len, Proposition 1.2], because M+ is a permutaf+ is an invertible lattice by Theorem 3.4. Alternation lattice by definition and M f+ is an invertible lattice, it is a direct summand of some permutatively, since M f+ , M+ ) is a direct summand tion lattice P = ⊕H ′ Z[G/H ′ ]. It follows that Ext1G (M 1 1 ′ ′ of ⊕H ′ ExtG (Z[G/H ], M+ ) ≃ ⊕H ′ H (H , M+ ) = 0 because M+ is a permutation lattice.  28 §5. Rationality problems Let k ⊂ L be a field extension. Recall the definition that L is k-rational (resp. stably k-rational, retract k-rational) in Definition 2.4. Definition 5.1 Let G be any finite group, k be any field. Let k(xg : g ∈ G) be the rational function field in |G| variables over k with a G-action via k-automorphism defined by h · xg = xhg for any h, g ∈ G. Define k(G) := k(xg : g ∈ G)G the fixed field. Noether’s problem asks whether k(G) is k-rational [Sw1]. The following theorem is called the No-Name Lemma by some authors. Theorem 5.2 ([CHK, Theorem 2.1]) Let L be a field and G be a finite group acting on L(x1 , . . . , xm ), the rational function field of m variables over L. Suppose that (i) for any σ ∈ G, σ(L) ⊂ L; (ii) the restriction of the action of G to L is faithful; (iii) for any σ ∈ G,     σ(x1 ) x1  ..   ..   .  = A(σ)  .  + B(σ) σ(xm ) xm where A(σ) ∈ GLm (L) and B(σ) is an m × 1 matrix over L. Then L(x1 , . . . , xm ) = L(z1 , . . . , zm ) where σ(zi ) = zi for any σ ∈ G, any 1 ≤ i ≤ m. In particular, L(x1 , . . . , xm )G = LG (z1 , . . . , zm ). The following proposition is essentially the same as [Len, page 30, Proposition 1.4] and [Sw1, page 35, Lemma 10.2]. We modify the formulation slightly for the use of later application. Proposition 5.3 Let G be a finite group, M be a G-lattice. Let k ′ /k be a finite Galois extension such that there is a surjection G → Gal(k ′ /k). Suppose that there is an exact sequence of G-lattices 0 → M0 → M → Q → 0 where Q is a permutation G-lattice. If G is faithful on the field k ′ (M0 ), then k ′ (M) = k ′ (M0 )(x1 , . . . , xm ) for some elements x1 , x2 , . . . , xm satisfying m = rankZ Q, σ(xj ) = xj for any σ ∈ G, any 1 ≤ j ≤ m. Proof. Note that the action of G on k ′ (M) is the purely quasi-monomial action in Definition 2.1. L L Write M0 = 1≤i≤n Z · ui , Q = 1≤j≤m Z · vj . Choose elements w1 , . . . , wm ∈ M such that wj is a preimage of vj for 1 ≤ j ≤ m. It follows that {u1, . . . , un , w1 , . . . , wm } is a Z-basis of M. For each σ ∈ G, since Q is permutation, σ(wj ) − wl ∈ M0 for some wl (depending on j). In the field k ′ (M), if we write k ′ (M) = k(u1 , . . . , un , w1 , . . . , wm ) as the rational function field in m+n variables over k ′ , then σ(wj ) = αj (σ)wl for some αj (σ) ∈ k ′ (M0 ). Since G is faithful on k ′ (M0 ), apply Theorem 5.2.  29 In the following theorem we consider the rationality of k(Rab )Dn and K(Rab )Dn (n is odd). Since the proofs are almost the same, we formulate the fixed fields as k ′ (Rab )Dn such that there is a surjection Dn → Gal(k ′ /k), that is, k ′ = k in the former case, and k ′ = K in the latter case. ε Theorem 5.4 Let 1 → R → F − → Dn → 1 be the free presentation of Dn in Defini′ tion 1.1. Let k /k be a finite Galois extension such that there is a surjection Dn → Gal(k ′ /k). Assume that n is an odd integer ≥ 3. Then k ′ (Rab )Dn ≃ k ′ (Z[Dn ])Dn (t) where t is an element transcendental over k(Dn ). Consequently, if k(Dn ) is rational over k (e.g. ζn + ζn−1 ∈ k where ζn is a primitive n-th root of unity), then k(Rab )Dn is rational over k. On the other hand, if K/k is a Galois extension with Dn ≃ Gal(K/k), then K(Rab )Dn is rational over k. Proof. Step 1. First of all, we explain how the last two assertions follow from k (Rab )Dn ≃ k ′ (Z[Dn ])Dn (t). If k = k ′ , then k(Rab )Dn = k ′ (Z[Dn ])Dn (t) = k(Z[Dn ])Dn (t). Note that the fixed field k(Z[Dn ])Dn is nothing but k(Dn ) in Definition 5.1. It is known that, if ζn +ζn−1 ∈ k, then k(Dn ) is k-rational (see [CHK, Proposition 2.6]). Hence the result. If k ′ = K and Dn ≃ Gal(K/k), then K(Rab )Dn = K(Z[Dn ])Dn (t). Since K(Z[Dn ]) = K(x1 , x2 , . . . , x2n ) by Proposition 5.3 where g · xi = xi for all g ∈ Dn and 1 ≤ i ≤ 2n. Thus K(Z[Dn ])Dn = K Dn (x1 , . . . , x2n ) = k(x1 , . . . , x2n ). ′ Step 2. In this step and Step 3, we will show that k ′ (Rab )Dn = k ′ (Z[Dn ])Dn (t). f+ ). Since M f+ is a faithful Dn -lattice, the By Theorem 4.8, k ′ (Rab ) = k ′ (M+ ⊕ M ′ f action of Dn on k (M+ ) is faithful. By Proposition 5.3 (because M+ is a permutation f+ )Dn = k ′ (M f+ )Dn (x1 , . . . , xn ). lattice), we find that k ′ (M+ ⊕ M f+ ⊕ Z)Dn = f+ ⊕ Z), we obtain that k ′ (M By applying Proposition 5.3 to k ′ (M f+ )Dn (t). k ′ (M f+ )Dn (x1 , . . . , xn ) ≃ k ′ (M f+ )Dn (t)(x1 , . . . , xn−1 ) ≃ k ′ (M f+ ⊕ Hence k ′ (Rab )Dn = k ′ (M Dn Z) (y1 , . . . , yn−1). f+ ⊕ Z ≃ Z[Dn /hσi] ⊕ Z[Dn /hτ i]. Note that Z[Dn /hτ i] is a From Theorem 3.4, M f+ ⊕ Z)Dn (y1 , . . . , yn−1 ) = k ′ (Z[Dn /hσi] ⊕ Z[Dn /hτ i])Dn faithful Dn -lattice. Hence k ′ (M ′ (y1 , . . . , yn−1 ) = k (Z[Dn /hτ i])Dn (t1 , t2 , y1 , . . . , yn−1) by Proposition 5.3 again. In conclusion, k ′ (Rab )Dn ≃ k ′ (Z[Dn /hτ i])Dn (t1 , t2 , y1 , . . . , yn−1). Step 3. Consider k ′ (Z[Dn ])Dn . Note that k ′ (Z[Dn ]) = k ′ (x(σ i ), x(σ i τ ) : 0 ≤ i ≤ n − 1) where g · x(σ i ) = x(gσ i ), g · x(σ i τ ) = x(gσ i τ ) for any g ∈ Dn . Define zi = x(σ i ) + x(σ i τ ) for 0 ≤ i ≤ n − 1. Then the actions of σ and τ are given by σ : z0 → 7 z1 7→ · · · 7→ zn−1 7→ z0 , τ : z0 → 7 z0 , zi 7→ zn−i for 1 ≤ i ≤ n − 1. In other words, k ′ (zi : 0 ≤ i ≤ n − 1) is Dn -isomorphic to k ′ (Z[Dn /hτ i]). 30 Moreover, σ · x(σ i ) = x(σ i+1 ), τ · x(σ i ) = x(σ n−i τ ) = −x(σ n−i ) + zn−i . Thus we may apply Theorem 5.2 to k ′ (Z[Dn ])Dn = k ′ (zi , x(σ i ) : 0 ≤ i ≤ n − 1)Dn . It follows that k ′ (Z[Dn ])Dn = k ′ (zi : 0 ≤ i ≤ n − 1)Dn (u1 , . . . , un ) ≃ k ′ (Z[Dn /hτ i])Dn (u1 , . . . , un ). Obviously we have k ′ (Z[Dn ])Dn (t′ ) ≃ k ′ (Z[Dn /hτ i])Dn (u1 , . . . , un , t′ ). Combining the above formula and the final formula in Step 2, we find that k ′ (Rab )Dn ≃ k ′ (Z[Dn ])Dn (t′ ). Done.  Proof of Theorem 1.3 and Theorem 1.4. ————— Apply Theorem 4.5 and Theorem 5.4.  An alternative proof of Theorem 1.5. ————— The following proof is different from that given by Snider [Sn]. We will show that k(Rab )D2 is rational over k. Our proof uses an idea of Kunyavskii [Ku1]. ⊕ Z · b̄0 ⊕ Z · b̄1 ⊕ Z · c̄0 ⊕ Z · c̄1 . By Lemma 4.7, Rab = Z · ā P ab Define M1 = {x ∈ R : ( g∈D2 g) · x = 0}, M2 = Rab /M1 . Then 0 → M1 → Rab → M2 → 0 is a short exact sequence of Z[D2 ]-lattices. Note that M2 is a trivial Z[D2 ]-lattice because of the definition of M1 . It is not difficult to show that M1 = Z · (ā − b̄0 ) ⊕ Z · (b̄0 − b̄1 ) ⊕ Z · (c̄0 − c̄1 ). Hence rankZ M1 = 3, rankZ M2 = 2. It follows that M2 ≃ Z(2) . By Proposition 5.3 k(Rab )D2 = k(M1 )D2 (x1 , x2 ). On the other hand, D2 acts on k(M1 ) by purely monomial k-automorphisms in the sense of [HK]. By [HK], k(M1 )D2 is k-rational.  Remark. (1) If R0ab is the relation module associated to a free presentation 1 → R → ε F − → Dn → 1 where F is a free group of rank d. Let Rab be the relation module in Definition 1.1. By Lemma 4.3, R0ab ⊕ Z[Dn ](2) = Rab ⊕ Z[Dn ](d) . Thus the rationality problem for R0ab may be reduced to that that for Rab . (2) For any field k, there are field extensions k ⊂ K ⊂ L such that K is k-rational, L is not retract K-rational, but L is still k-rational. In fact, take the group D2 and consider Rab . Define L = k(Rab ⊕ Z[D2 ])D2 , K = k(Z[D2 ])D2 . Since the group D2 acts faithfully on k(Rab ), we may apply Theorem 5.2 to the field k(Rab ⊕ Z[D2 ]). Thus L = k(Rab ⊕ Z[D2 ])D2 = k(Rab )D2 (t1 , . . . , t4 ). Since k(Rab )D2 is k-rational by Theorem 1.5. Thus L is k-rational. Clearly K = k(Z[D2 ])D2 is k-rational, a well-known result in Noether’s problem. On the other hand, L = k(Rab ⊕ Z[D2 ])D2 may be regarded as a function field of an algebraic torus over K = k(Z[D2 ])D2 , which is split by a D2 -extension with character module Rab . By Theorem 4.5 L is not retract K-rational. Theorem 5.5 Let k be any field and M be a D2 -lattice with rank ≤ 5, then k(M)D2 is stably rational over k Proof. We use the idea of Kunyavskii [Ku1] again. P Let M be a D2 -lattice with rank ≤ 5. Define M1 = {x ∈ M : ( g∈D2 g) · x = 0}, M2 = M/M1 . Then 0 → M1 → M → M2 → 0 is a short exact sequence of Z[D2 ]lattices. 31 Note that M2 is a trivial Z[D2 ]-lattice because of the definition of M1 . By PropoD2 sition 5.3, it suffices P to show that k(M1 ) is stably rational over k. A D2 -lattice N satisfying that ( g∈D2 g) · N = 0 is called an anisotropic lattice. Although there are infinitely many indecomposable lattices over D2 ≃ C2 × C2 , the total number of the indecomposable anisotropic D2 -lattices is finite. In fact, there are only 8 such lattices by Drozd [Dr] (also see [Ku1, page 538; Vo, page 57]). Only two of them are of rank 3; the remaining ones are of lower rank. The rank 0 3 lattices are ID2 and ID where ID2 is the augmentation ideal of Z[D2 ] (see Lemma 2 0 fl 4.2). By Theorem 2.7, [ID ] 6= 0. It is not difficult to verify that all the other 2 indecomposable anisotropic lattices N satisfy that [N]f l = 0. Since M1 is of rank ≤ 5, it is a direct sum of these indecomposable anisotropic 0 lattices such that the lattice ID appears at most once. If N is an indecomposable 2 0 anisotropic lattice other than ID2 , choose a flabby resolution 0 → N → P1 → P2 → 0 where P1 and P2 are permutation lattices. By Proposition 5.3, k(N)D2 is stably isomorphic to k(P1 )D2 (if N is not a faithful D2 -lattice, but is a faithful D2 /H-lattice, we may assume that P1 and P2 are permutation D2 /H-lattices by [CTS, page 179-180]). 0 In summary, k(M)D2 is stably isomorphic to k(P )D2 or k(ID ⊕ Q)D2 where P and 2 Q are permutation lattices. Since the action of D2 on k(P ) is linear, it is easy to show that k(P )D2 is rational 0 0 over k. Applying Theorem 5.2 to k(ID ⊕ Q)D2 , we find that k(ID ⊕ Q)D2 is rational 2 2 0 D2 0 D2 0 over k(ID ) . But k(ID ) is k-rational by [HK]. Hence k(ID ⊕Q)D2 is k-rational.  2 2 2 The method in the proof of Theorem 5.4 may be applied to other rationality problems. We record one of them in the following. Theorem 5.6 Let k be any field, G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ −1 i ≃ Dn where n ≥ 3 is an odd integer. Define an action of G on the rational function field k(x1 , x2 , . . . , xn−1 ) through k-automorphisms defined by σ : x1 7→ x2 7→ · · · 7→ xn−1 7→ 1/(x1 x2 · · · xn−1 ), τ : xi ↔ xn−i . Then k(x1 , . . . , xn−1 )G is stably k-rational if and only if k(G) is stably k-rational. Proof. We may write k(x1 , . . . , xn−1 )G = k(M)G where M is the G-lattice Z[G/hτ i]. Note that M is nothing but N+ in Definition 3.2. f− → Z[G/hσi] → 0 is an exact sequence By Lemma 3.9, we find that 0 → N+ → M f− ) is G-isomorphic to k(M)(y1 , y2 ) where σ(yi ) = of G-lattices. By Proposition 5.3, k(M τ (yi ) = yi for 1 ≤ i ≤ 2. f− ⊕ Z[G/hτ i] ≃ Z[G] ⊕ Z. Thus, by Proposition 5.3 again, By Theorem 3.5, M f− )(z1 , . . . , zn ) is G-isomorphic to k(Z[G])(z0 ) where σ(zi ) = τ (zi ) = zi for 0 ≤ i ≤ k(M n. Hence k(M)G is stably isomorphic to k(Z[G])G , which is nothing but k(G).  32 Remark. We thank the referee who recast the above result as follows: Let G be a finite group and M be a faithful G-lattice satisfying that [M]f l is permutation (see Definition 2.1). For any field k, k(M)G is stably rational over k if and only if so is k(G). The proof goes as follows: Considering the fixed field k(M ⊕ Z[G])G . Note that k(M ⊕Z[G])G is rational over k(M)G by Proposition 5.3. On the other hand, since [M]f l is permutation, k(M ⊕ Z[G])G is stably rational over k(Z[G])G = k(G) by Theorem 2.5. Hence k(M)G and k(G) are stably isomorphic. It remains to show that the lattice M in the proof of Theorem 5.6 satisfies the condition that [M]f l is permutation. In fact, from the proof, M ≃ N+ . Moreover, f− → Z[G/hσi] → 0 (by Lemma 3.9) and we have the exact sequences 0 → N+ → M f− ⊕ Z[G/hτ i] ≃ Z[G] ⊕ Z (by Theorem 3.5). Thus [M]f l = 0. M Here is another interpretation of the lattice M. Let n ≥ 3 be an odd integer and d G = hσ, τ : σ n = τ 2 = 1, τ στ −1 = σ r i where r 2 ≡ 1 (mod n). Define H = hτ i and IG/H the augmentation lattice of the augmentation map Z[G/H] → Z. Then we get an exact sequence 0 → IG/H → Z[G/H] → Z → 0. Taking the dual of it, we find 0 that 0 → Z → Z[G/H] → IG/H → 0. It is easy to see that, when G is the dihedral 0 group in Theorem 5.6, the lattice M in the proof of Theorem 5.6 is isomorphic to IG/H . e When n = p for some prime number p, it is shown by Colliot-Thélène and Sansuc that 0 [IG/H ]f l = 0 (see, for examples, [Vo, page 55, Theorem 4]). References [CHK] H. Chu, S. J. Hu and M. Kang, Noether’s problem for dihedral 2-groups, Comment. Math. Helv. 79 (2004), 147–159. [CR] C. W. Curtis and I. Reiner, Methods of representation theory vol. 1, WileyInterscience Publ., New York, 1981. [CTS] J.-L. Colliot-Thélène and J.-J. Sansuc, La R-équivalence sur les tores, Ann. Sci. École Norm. Sup. (4) 10 (1977), 175–229. [Dr] Yu. A. Drozd, Representations of cubic Z-rings, Soviet Math. Dokl. 8 (1967), 572–574. [EK] S. Endo and M. Kang, Algebraic tori revisited, to appear in “Asian J. Math.”, arXiv: 1406.0949v2. [EM1] S. Endo and T. Miyata, Quasi-permutation modules over finite groups, J. Math. Soc. Japan 25 (1973), 397–421. 33 [EM2] S. Endo and T. Miyata, On a classification of the function fields of algebraic tori, Nagoya Math. J. 56 (1974), 85–104; ibid. 79 (1980), 187–190. [GR] K. W. Gruenberg and K. W. Roggenkamp, Decomposition of relation modules of a finite group, J. London Math. Soc. (2), 12 (1976), 262–266. [Gr1] K. W. Gruenberg, Relation modules of finite groups, CBMS Regional Conference Series vol. 25, Amer. Math. Soc., Providence, 1976. [Gr2] K. W. Gruenberg, Free abelianised extensions of finite groups, in “Homological group theory” edited by C. T. C. Wall, London Math. Soc. Lecture Notes Series vol. 36, Cambridge Univ. Press, Cambridge, 1979. [HK] M. Hajja and M. Kang, Finite group actions on rational function fields, J. Algebra 149 (1992), 139–154. [HKK] A. Hoshi, M. Kang and H. Kitayama, Quasi-monomial actions and some 4dimensional rationality problem, J. Algebra 403 (2014), 363–400. [HS] P. J. Hilton and U. Stammbach, A course in homological algebra, Springer GTM vol. 4, Springer-Verlag, Berlin, 1971. [Ja] N. Jacobson, Basic algebra II, Second edition, reprinted by Dover Publ. Inc, Mineola, New York, 2009. [Ka] M. Kang, Retract rational fields, J. Algebra 349 (2012), 22–37. [Ku1] B. E. Kunyavskii, On tori with a biquadratic splitting field, Math. USSR Izv. 12 (1978), 536–542. [Ku2] B. E. Kunyavskii, Tori split over a Galois extension with group S3 , Studies in Number Theory, Saratov Univ. Press, Saratov, 1982 (Russian). [Kur] A. G. Kurosh, Theory of groups, vol.2, Chelsea Publ., New York, 1960. [Le] M. P. Lee, Integral representations of dihedral groups of order 2p, Trans. Amer. Math. Soc. 110 (1964), 213–231. [Len] H. W. Lenstra, Jr., Rational functions invariant under a finite abelian group, Invent. Math. 25 (1974), 299–325. [Lo] M. Lorenz, Multiplicative invariant theory, Encyclo. Math. Sci. vol. 135, Springer-Verlag, 2005, Berlin. [Ma] W. S. Massey, Algebraic topology: an introduction, Harcount, Brace World, New York, 1967. [Mi] J. Milnor, Introduction to algebraic K-theory, Ann. Math. Studies vol. 72, Princeton Univ. Press, Princeton, 1971. 34 [MS] A. S. Merkurjev and A. A. Suslin, K-cohomology of Severi-Brauer varieties and the norm residue homomorphism, Math. USSR Izv. 21 (1983), 307–340. [Sa] D. J. Saltman, Retract rational fields and cyclic Galois extensions, Israel J. Math. 47 (1984), 165–215. [Sn] R. Snider, Is the Brauer group generated by cyclic algebras ? in “Ring theory Waterloo 1978”, edited by D. Handelman and J. Lawrence, Springer LNM vol. 734, Springer-Verlag, Berlin, 1979. [Sw1] R. G. Swan, Noether’s problem in Galois theory, in “Emmy Noether in Bryn Mawr”, edited by B. Srinivasan and J. Sally, Springer-Verlag, Berlin, 1983, pp. 21–40. [Sw2] R. G. Swan, The flabby class group of a finite cyclic group, in “Proceedings of the 4th International Congress of Chinese Mathematicians vol. 1”, edited by L. Ji, K. Liu, L. Yang and S.-T. Yau, Higher Education Press and International Press, Beijing and Somerville, MA, 2008. [Vo] V. E. Voskresenskii, Algebraic groups and their birational invariants, Translations of Math. Monographs, vol. 179, Amer. Math. Soc., 1998, Providence, Rhode Island. 35
4math.GR
Ant Colony Optimization for Inferring Key Gene Interactions Khalid Raza* and Mahish Kohli Department of Computer Science, Jamia Millia Islamia (Central University), New Delhi-110025, India *[email protected] Abstract: Inferring gene interaction network from gene expression data is an important task in systems biology research. The gene interaction network, especially key interactions, plays an important role in identifying biomarkers for disease that further helps in drug design. Ant colony optimization is an optimization algorithm based on natural evolution and has been used in many optimization problems. In this paper, we applied ant colony optimization algorithm for inferring the key gene interactions from gene expression data. The algorithm has been tested on two different kinds of benchmark datasets and observed that it successfully identify some key gene interactions. Keywords: Ant colony optimization, gene interaction network, microarray, gene expression 1. Introduction Gene regulatory network (GRN) prediction is an important problem in systems biology. A preknowledge of gene interaction network, which are targeting to suppress or express genes, is very handy in drug design for various lethal diseases (such as cancer). Gene interaction network prediction is also important for prediction of salvage pathways. No gene has independent expression, as it is always affected by other genes whose expression interferes with its expression. The expression of a gene is a vector sum of all genes input to it. Thus, a relation can be set up between the expression and the interaction of genes, which is nothing but gene regulation network. Microarray data has become a benchmark source for the inference of gene regulatory networks. Gene network inference from microarray data has been an area of interest, where few people are interested in finding the clusters or the sub networks within a network while some focus on inferring key interactions in a network. Normally, interaction pattern is responsible for expression pattern, say a gene stimulated positively expresses more than the one stimulated negatively. But, in reverse engineering approach, we try to predict the regulation (interaction) pattern from the expression [1][2]. 2. Review of related works Researchers worked upon different type of algorithms and approaches for inferring gene interaction network, such as Boolean networks, Bayesian networks, differential equations, machine learning and evolutionary algorithms. Among all these techniques, differential equation based formalism produces acceptable results but problem is that complexity of the algorithm 1 increases (number of equations increases) as we increase the number of genes. Machine learning algorithms, like artificial neural networks (ANN), are also known to be used for predicting interactions but they are so complex that what is happening inside the algorithm is nothing but a black box, which is not good as a biological point of view [3]. On the other hand, nature based algorithms in comparison to other algorithms are simpler in nature and they have been found to be applied in various biological problems from simplest like alignment of sequences to the complex like protein structure prediction [4]. In past, nature based algorithm like Genetic algorithm have been applied directly for optimization of influence matrix [5][6] and have been applied in cooperation with S system [7]. It has been observed that when these applied in the form of hybrids for the inference of networks, they have known to gain much success compared to when applied alone. It has been observed that in hybrids though computationally expensive but they are good for small scale networks, but when it comes to large networks they decline in performance [3]. In past, ant colony optimization (ACO) algorithm has been applied to several bioinformatics problems like drug designing [8][9] and 2D protein folding [10]. It has also been hybridized with genetic algorithm for multiple sequence alignment [11]. In 2009, He & Hui [12] used the ACO algorithm and proposed two algorithms i) Ant-C (An ant based clustering) and ii) Ant-ARM (An ant based association rule mining). With the help of ACO algorithm, they constructed a fully connected network and then removing the edges having pheromone amount lesser than that of an average threshold were removed and thus clusters have been created. All the three above mentioned algorithms being an optimizing algorithms, hence can be used so as to optimize a gene regulatory matrix. A review of soft computing based approach and evolutionary approach can be found in [13] and [14], respectively. In this paper, we applied ACO algorithm for inferring highly correlated key interactions in GRN. 3. Materials and Methods In 2005, Karaboga [15] gave an interesting idea of artificial ants based algorithm known as Ant colony optimization (ACO) algorithm. Ants are blind, but yet known to find the shortest distance between the food source and there native place. Ants use pheromones laid by the other ants as footmarks to follow. And hence an ant reaches the shortest path by using knowledge gained by the other ants and this in form of an algorithm can be used for optimization problems, including gene interaction network optimization. Ant colony optimization is based on evolutionary algorithm, where artificial ants are used, which generate a population of individuals, each individual corresponding to each tour and finally converge to most optimum individual among the population. The most basic problem solved by the ACO algorithm is Travel Salesmen Problem [16][17]. It is a problem where we have N number of cities and one 2 needs to find a route among all possible routes that covers all the cities only once and finally reach the starting city, thus covering minimum distance. Since, ACO is an optimization algorithm; hence it can be used for the optimization of gene interaction matrix. Some of the basic steps of ACO algorithm are described as follows: Steps in algorithm 1. Setting basic parameters such as number of ants, independent trials, number of tour in each trial, etc. 2. Place all ants at different genes randomly. 3.  =0 (Trail of pheromone is zero in initial step) 4. Tabu list initially = {i} (the present gene) 5. Each ant moves to next gene by probability function   =     .   ∑∈   .     0 ! " ∈ #$$%&'( %ℎ'+& ,' 1 Where,   = The probability of moving from gene ‘i’ to’ j’ at time ‘t’  k ϵ {1 to m} where m= number of ants  = Correlation between the gene ‘i’ and ‘j’ or visibility α , β = parameters controlling importance of visibility ant trail respectively 6. After N iteration all ants complete tour, the best tour is chosen and pheromone trail is updated. 7. If termination condition is met, tour ends, else tabu list is emptied and cycle continues from step 2. 3 Initialize basic Parameters Set all ants to different genes Construct tours Empty tabu list Find the best tour & update pheromone Else Terminating condition? Tour ends, give optimized result Figure 1. Flow chart for the ACO algorithm The explanation of the algorithm is as follows: i) Conversion of gene expression to gene correlation matrix: The expression values of the genes were converted to gene correlation matrix using Pearson correlation coefficient, as computed in [18] and a NxN matrix of correlation values were generated, where N= number of genes. Consider gene correlation matrix as a network where genes are placed to nodes and their pair-wise correlation values are assigned to edges between them. ii) Input: Input for ACO algorithm is the correlation matrix of NxN genes, as computed in step 1. iii) Maximizing the correlation function: The gene interaction network is initially represented as complete weighted graph G=(N, E), where N is a n=|N| nodes (genes) and E being the set of edges connecting the nodes (represents gene interactions). The input pairwise correlation value C is considered as weight of the edges. The correlation function (regulation function), 453 . = / 0,23 + 04,3 63 2 4 has to be maximized where C is the sum of the correlation between all the gene nodes visited by ants and ci,i+1 is the Pearson correlation between gene ‘i’ and the gene ‘i+1’. Hence, we have to find da maximum correlation Hamiltonian circuit in the gene interaction network, where Hamiltonian circuit is a close walk touching each gene in the interaction network exactly one. iv) Some basic parameters that were used for the simulation are: a) Ant System : Max-Min b) No of ants : N (No of genes) c) Independent Tries : 1 d) No of tours in each trial : 100 e) Alpha : 1.0 f) Beta : 2.0 g) Rho : 0.5 v) Output: The output of the simulation is the network with the maximum correlation among the N genes with the maximum number of N edges. 4. Results and Discussions The Ant colony optimization algorithm, as described in the previous section, has been implemented in C programming language for the inference key interactions in GRN. After giving the gene correlation matrix as input to the ACO algorithm, the results were saved in a text file that stores highly correlated interactions in GRN. The first simulation was done on the SOS DNA repair genetic network dataset of e.coli generated by Ronen, et.al. [19]. This network has nearly 30 genes regulated at the transcription level. Four different experiments were conducted with different UV light intensities. Using these experiments, expressions of eight major genes, such as uvrD, uvrA, lexA, recA, umuDC, ruvA, polB and uvrY, have been documented as shown in Fig. 2. [9]. Figure 2. SOS DNA repair network of e.coli 5 The pairwise correlation between eight genes in SOS repair network has been calculated using Pearson’s correlation coefficient and correlation matrix is shown in Table 1. The correlation matrix was fed as an input to the ACO algorithm. The predicted interactions and their match with the gold standard are shown in Table 2. Result shows that out of nine interactions, as reported by Ronen, et.al. [19], three interactions have been predicted correctly. Table 1. Correlation matrix for eight genes in SOS repair network uvrD lexA uvrD 1 lexA 0.7647 umuDC recA uvrA uvrY ruvA polB 1 umuDC 0.1982 0.5101 1 recA 0.8013 0.9538 0.5962 1 uvrA 0.8018 0.9603 0.4584 0.9779 1 uvrY 0.3838 0.2135 0.2996 0.4535 0.4009 1 ruvA 0.1912 0.6497 0.4551 0.5668 0.5796 -0.0175 1 polB 0.4326 0.6267 0.4270 0.6465 0.5855 0.3807 0.5159 1 Table 2. Predicted interactions and their match with the gold standard for all eight genes Gene 1 UvrD UvrA LexA RecA UmuDC RuvA PolB UvrY Gene 2 uvrA lexA recA umuDC ruvA polB uvrY uvrD Match with gold standard NO YES YES YES NO NO NO NO In our next experiment, we used another benchmark dataset of IRMA network consisting of five genes published by Cantone, et.al., 2007 [20]. The expression values in IRMA dataset has been taken at 16 time points (at 0 minute,10 minute, 20 minute, 40 minute,…,280 minute). Out of five interactions, three interactions have been correctly identified by ACO algorithm for both kinds of data switch-on as well as switch-off, as shown in Table 3 and Table 4, respectively. The switch-on and switch-off network have two correct interactions in common and one unique correct interaction. Thus, each of them has three correct interactions. Changing various parameters in the algorithm as well as number of iterations in algorithm did not have any effect on the results. In correlation to the nature of the algorithm we inferred that the algorithm may work better with a network where relation among gene is one to one that is each gene interacts with only one gene or we can say an interacting pathway. 6 Table 3. Predicted interaction by for IRMA switch-on data and there match with the gold standard. Gene1 GAL80 GAL4 CBF1 SWI5 ASH1 Gene2 GAL4 CBF1 SWI5 ASH1 GAL4 Match with gold standard YES YES YES NO NO Table 4. Predicted interactions for IRMA switch-off data and there match with the gold standard. Gene1 GAL4 GAL80 ASH1 CBF1 SWI5 Gene2 GAL80 ASH1 CBF1 SWI5 GAL4 Match with gold standard YES NO YES YES NO 5. Conclusions and Future Directions The gene interaction network plays an important role in identifying root-cause of various diseases. The gene interaction network, especially key interactions, plays an important role in identifying biomarkers for disease that further helps in drug design. Inferring gene interaction network from gene expression data is one of the key objectives of systems biology research. Ant colony optimization is an optimization algorithm based on natural evolution and has been used in many optimization problems including some of the bioinformatics problems. This paper reports an application of ant colony optimization algorithm for inferring the key gene interactions from gene expression data. The algorithm has been tested on two different kinds of benchmark datasets, SOS DNA repair network and IRMA network. In SOS DNA repair network, out of nine interactions, three interactions have been correctly identified. In IRMA network, out of five interactions, three are correctly predicted for both kinds of data, switch-on and switch-off data. Thus, this result shows a comparatively better result over SOS DNA repair network. The limitation of proposed algorithm is that it can find out a total number of interactions equal to total number of genes. Although, the ACO-based algorithm does not produce much accuracy but results produced are robust because same result was produced after each iterations. The other advantages are that it is computationally less expensive and scalable. In the future, we may try to merge ACO-based algorithm with some other algorithm. Acknowledgements Authors would like to thank Danish Khan and Shama Aafreen for their assistance in writing ACO-based code and fruitful discussions. 7 References [1] F. He, R. Balling & A. Zeng, “Reverse engineering and verification of gene networks : Principles, assumptions and limitations of present methods and future perspectives,” vol. 144, pp. 190–203, 2009. [2] M. Bansal, V. Belcastro, A. Ambesi-Impiombato, D. di Bernardo, et al. "How to infer gene networks from expression profiles," Molecular systems biology, vol. 78, no. 3, 2007. [3] A. Sîrbu, H.J. Ruskin and M. Crane. "Comparison of evolutionary algorithms in gene regulatory network model inference," BMC bioinformatics, vol. 11, 59, 2010. [4] S.K. Pal, S. Bandyopadhyay, S. Member & S. Ray. “Evolutionary Computation in Bioinformatics : A Review,” vol. 36, pp. 601–615, 2006. [5] F.-X. Wu, G.G. Poirier & W. J. Zhang, “Inferring gene regulatory networks with time delays using a genetic algorithm.” IEE Proceedings-Systems Biol. vol.152, 67–74, 2005. [6] VA Nguyen & A. Zomaya, “Inference of large-scale structural features of gene regulation networks using genetic algorithms,” Parallel and Distributed Processing, 2008. IPDPS 2008. IEEE International Symposium on, pp. 1-8, 2008. [7] S. Kikuchi, et al., "Dynamic modeling of genetic networks using genetic algorithm and Ssystem," Bioinformatics, vol. 19, no. 5, pp. 643-650, 2003. [8] Q. Shen, et al. "Modified ant colony optimization algorithm for variable selection in QSAR modeling: QSAR studies of cyclooxygenase inhibitors," Journal of chemical information and modelling, vol. 45, no. 4, pp. 1024-1029, 2005. [9] O. Korb, S. Thomas & Thomas E. Exner, "PLANTS: application of ant colony optimization to structure-based drug design," Ant Colony Optimization and Swarm Intelligence. Springer Berlin Heidelberg, pp. 247-258, 2006. [10] A. Shmygelska, A-H Rosalia & H. Hoos. Holger, "An ant colony optimization algorithm for the 2D HP protein folding problem," Ant Algorithms. Springer Berlin Heidelberg, pp. 40-52, 2002. [11] Zne-Jung Lee, et al., "Genetic algorithm with ant colony optimization (GA-ACO) for multiple sequence alignment," Applied Soft Computing vol. 8, no. 1, pp. 55-78, 2008. [12] Y. He & S.C. Hui, “Exploring ant-based algorithms for gene expression data analysis,” Artif. Intell. Med. vol. 47, pp. 105–19, 2009. [13] K. Raza & R. Parveen, “Soft Computing Approach for Modeling Genetic Regulatory Networks,” Advances in Computing and Information Technology, Springer Berlin Heidelberg, vol. 178, pp. 1– 12, 2012. [14] K. Raza & R. Parveen, “Evolutionary algorithms in genetic regulatory networks model,” Journal of Advanced Bioinformatics Applications and Research, vol. 3, no. 1, pp. 271–280, 2012. [15] D. Karaboga, “An idea based on honey bee swarm for numerical optimization,” Technical reporttr06, Erciyes university, engineering faculty, computer engineering department, vol. 200, 2005. [16] M. Dorigo, V. Maniezzo & A. Colorni, "Ant system: optimization by a colony of cooperating agents," Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on vol. 26, no. 1, pp. 29-41, 1996. [17] M. Dorigo & L.M. Gambardella, "Ant colony system: a cooperative learning approach to the traveling salesman problem," Evolutionary Computation, IEEE Transactions on, vol. 1, no. 1, pp. 53-66, 1997. [18] K. Raza and R. Jaiswal, “Reconstruction and Analysis of Cancer-specific Gene Regulatory Networks from Gene Expression Profiles,” International Journal on Bioinformatics & Biosciences, vol. 3, no. 2, pp. 27–36, 2013. [19] M. Ronen, R. Rosenberg, B. Shraiman, and U. Alon, “Assigning Numbers to the Arrows: Parameterizing a Gene Regulation Network by Using Accurate Expression Kinetics,” Proc. Nat’l Academy of Sciences USA, vol. 99, no. 16, pp. 10555-10560, 2002. [20] I. Cantone, L. Marucci, F. Iorio, M. Ricci, V. Belcastro, M. Bansal, S. Santini, M. Di Bernardo, D. Di Bernardo, and M. Cosma, “A yeast synthetic network for in vivo assessment of reverseengineering and modeling approaches,” Cell, vol. 137, no. 1, pp. 172–181, 2009. 8
9cs.NE
arXiv:1208.3789v5 [q-fin.GN] 25 Aug 2014 Journal of Complex Networks 2(3) 313–354 (2018) doi:10.1093/comnet/cnu004 On Global Stability of Financial Networks B HASKAR DAS G UPTA∗ Department of Computer Science, University of Illinois at Chicago, Chicago, IL 60607, USA ∗ Corresponding author: [email protected] AND L AKSHMI K ALIGOUNDER Department of Computer Science, University of Illinois at Chicago, Chicago, IL 60607, USA [Received November 2, 2013; Accepted January 23, 2014] Recent crisis in the global financial world has generated renewed interests in fragilities of global financial networks among economists and regulatory authorities. In particular, a potential vulnerability of the financial networks is the “financial contagion” process in which insolvencies of individual entities propagate through the “web of dependencies” to affect the entire system. In this paper, we formalize an extension of a financial network model originally proposed by Nier et al. for scenarios such as the over-the-counter derivatives market, define a suitable global stability measure for this model, and perform a comprehensive evaluation of this stability measure over more than 700,000 combinations of networks types and parameter combinations. Based on our evaluations, we discover many interesting implications of our evaluations of this stability measure, and derive topological properties and parameter combinations that may be used to flag the network as a possible fragile network. An interactive software FIN-STAB for computing the stability is available from the website www2.cs.uic.edu/˜dasgupta/financial-simulator-files.. Keywords: Financial networks, financial contagion, global stability. 2000 Math Subject Classification: 91B55, 91G99, 05C82. 1. Introduction Recent unprecedented level of global financial crisis has clearly exposed potential weaknesses of the global economic system, renewing interests in the determination of fragilities of various segments of the global economy. Since financial institutions governed by borrowing, lending and participation in risky investments played a crucial role in this crisis, they have attracted a major part of the attention of economists; see [35] for a survey. The issue of instability of free market based financial systems is not new and has been under discussion among the economists starting with the early works of [30, 42] during the 1930’s great depression era. However, the exact causes of such instabilities have not been unanimously agreed upon yet. Economists such as Ekelund and Thornton [27] contend that a major reason for the recent financial crisis is the enactment of an act that removed several restrictions on mixing investment and consumer banking, whereas other economists such as Calabria disagree with such an assertion [14]. Some economists such as Minsky have argued that such instabilities are are systemic for many modern market-based economic systems [52]. One motivation in this paper to investigate global stabilities of financial networks comes from the point of view of a regulatory agency (as was also the case, for example, in [35]). A regulatory agency with sufficient knowledge about a part of a global financial network is expected to periodically evaluate the stability of the network, and flag the network ex ante for further analysis if it fails some preliminary c The author 2018. Published by Oxford University Press on behalf of the Institute of Mathematics and its Applications. All rights reserved. DASGUPTA AND KALIGOUNDER test or exceeds some minimum threshold of vulnerability. In this motivation, flagging a network as vulnerable does not necessarily imply that such is the case, but that such a network requires further analysis based on other aspects of free market economics that are not or simply cannot be modeled1. While too many false positives may drain the finite resources of a regulatory agency for further analysis and investigation, this motivation assumes that vulnerability is too important an issue to be left for an ex post analysis. Similar to prior research works such as [9, 25, 35, 55, 33, 49], our study of the vulnerability of financial networks also assumes the absence of government intervention as banks become insolvent. While this is an extreme worst-case situation, the main goal of such type of studies is to see if the network can survive a shock even under extreme situations. A further reason for not allowing any intervention is, unlike the case of public health issues such as controlling spread of epidemics, government intervention in a capitalist financial system is often not allowed or requires complex political and administrative operatives. 2. Brief review of related prior works on financial networks Although there is a large amount of literature on stability of financial systems (e.g., see [25, 9, 16, 6, 1, 26, 43, 51, 45, 3, 24, 33, 31, 34, 47, 23, 46, 38, 55, 22, 7]), very few prior papers have mathematically defined a global stability measure and performed a comprehensive evaluation of such a measure as done in this paper. A most recent research work related to our work is the paper by Minoiu and Reyes [51] in which the authors analyzed global banking networks data on cross-border banking flows for 184 countries during 1978-2010 using local connectivity and clustering measures. Below we review other related prior research works. Although ordinarily one would expect the risk of contagion to be larger in a highly interconnected banking system, prior simulation works indicate that higher connectivity among banks may sometimes lead to lower risk of contagion. Due to the large volume of prior research works, we are only able to review a selected subset of related prior research works, leaving many other exciting research results in the bibliographies of the cited papers. Allen and Gale [3] found that when consumers have the liquidity preferences as introduced by Diamond and Dybvig [24] and have random liquidity needs, banks perfectly insure against liquidity fluctuations by exchanging interbank deposits, but the connections created by swapping deposits expose the entire system to contagion. Based on such studies, Allen and Gale [3] concluded that incomplete networks are more prone to contagion than networks with maximum connectivity since better-connected networks are more resilient via transfer of proportion of the losses in one bank’s portfolio to more banks through interbank agreements. On the other hand, Gai and Kapadia [33] argued that the higher is the connectivity among banks the more will be the contagion effect during crisis. Freixas et al. [31] explored the case of banks that face liquidity fluctuations due to the uncertainty about consumers withdrawing funds. Haldane [34] suggested that contagion should be measured based on the interconnectedness of each institution within the financial system. Liedorp et al. [47] argued that both large lending and borrowing shares in interbank markets increase the riskiness of banks active in the dutch banking market. Dasgupta [23] explored how linkages between banks, represented by cross-holding of deposits, can be a source of contagious breakdowns by investigating how depositors, who receive a private signal about fundamentals of banks, may want to withdraw their deposits if they believe that enough other 1 For example, some such factors are the rumors and panics caused by the insolvency of a large bank and a possible subsequent credit freeze. While fears, panics and rumors are all real aspects in networked economics, there are hardly any universally agreed upon good way of modelling them. STABILITY OF FINANCIAL NETWORKS depositors will do the same. Lagunoff and Schreft [46] studies a network model in which the return on an agents’ portfolio depends on the portfolio allocations of other agents. Iazzetta and Manna [38] used network topology analysis on monthly data on deposits exchange to gain more insight into the way a liquidity crisis spreads. Nier et al. [55] explored the dependency of systemic risks on the structure of the banking system and the resilience (or lack thereof) of such a system to contagious defaults via graph theoretic approach. Corbo and Demange [22] explored the relationship of the structure of interbank connections to the contagion risk of defaults given the exogenous default of set of banks. Babus [7] studied how the trade-off between the benefits and the costs of being linked changes depending on the network structure, and observed that, when the network is maximal, liquidity can be redistributed in the system to make the risk of contagion minimal. Acemoglu et al. [1] and Zawadowski [64] do investigate stability of financial networks, but differently from our study. Both [1] and [64] consider two specific network topologies, namely the ring topology and the complete network topology, as opposed to a more general class of topologies in our study. Both [1] and [64] consider only the effect of the shock propagation for a few discrete time steps, as opposed to our study; in the terminology of [9], this can be thought of as a “violent death” of the network as opposed to the “slow poisoning death” that our paper investigates. The model and structure/terms of bilateral interbank agreements in [1], namely that banks lend to one another through debt contracts with contingency covenants, is quite different from ours. As a results, the conclusions in [1, 64] do not directly apply to our model and the corresponding simulation environment. Attribute propagation models have been investigated in the past in other contexts such as influence maximization in social networks [41, 18, 17, 13], disease spreading in urban networks [29, 19, 28], and percolation models in physics and mathematics [61]. However, the shock propagation model in this paper is very different from all these models. For example: • Almost all of the other models include a trivial solution in which the attribute spreads to the entire network if we inject each node individually with the attribute. This is not the case with the shock propagation model. • If shocking a subset of nodes makes x nodes in the network fail, then adding more nodes to this subset may not necessarily lead to the failure of x or more than x nodes of the network. • The complexity of many previous attribute propagation models arises due to the presence of cycles in the graph. In contrast, the shock propagation model may be highly complex even when the given network is acyclic. Instead, a key component of the complexity arises due to two or more directed paths sharing a node. 3. Organization of the paper The rest of the paper is organized as follows: • In Section 5 we describe the network model and the corresponding stability measure. In particular: • In Section 5.1 we define the balance sheet equations, and the two (homogeneous and heterogeneous) versions of our model that provide an appropriate formalization and extension of the basic prior model of [25, 55]. • In Sections 5.2–5.3, we provide formalizations of how the initial failures of some nodes in the network (i.e., a shock) originate, and how such failures are propagated to other network nodes in successive time steps using a discrete-time shock propagation equation. DASGUPTA AND KALIGOUNDER • In Section 5.5 we define our global network stability measure K . • In Sections 5.4 and 5.6, we provide rationales for the network model and the global stability measure, respectively. • In Section 6 we describe our simulation environment and the combinations of parameters that are being explored. In particular: • In Section 6.1, we discuss the random network models for generation of network topologies. • In Section 6.2 we state and justify the two modes of initial failures (idiosyncratic and coordinated) that are being used in the simulation. • In Sections 6.3–6.4, we describe the combinations of parameters used for homogeneous and heterogeneous networks and few other minor details of the simulation environment. • In Section 7 we discuss our findings from the evaluation of the stabilities of the networks. In particular: • Our six conclusions ①–⑥ for the stability measure involving various combinations of network topology and parameters appear in Sections 7.1–7.4. • In Section 7.5 we discuss two phase transition properties of the stability measure with an intuitive explanation for one of them. Though the issue of stability of financial systems has been discussed by prior researchers [25, 9, 16, 6, 1, 26, 43, 51, 45, 3, 24, 33, 31, 34, 47, 23, 46, 38, 55, 22, 7], no prior paper has performed a comprehensive evaluation of a global stability measure as done in this paper. 4. Economic policy implications Returning to our original motivation of flagging financial networks for potential vulnerabilities, our results suggest that a network model similar to that used in the paper may be flagged for the following cases: • the equity to asset ratios of most banks are low, • the network has a highly skewed distribution of external assets and inter-bank exposures among its banks and the network is sufficiently sparse, • the network does not have either a highly skewed distribution of external assets or a highly skewed distribution of inter-bank exposures among its banks, but the network is sufficiently dense. 5. Our financial network model and stability measure Since our model has a large number of parameters, for the benefit of the reader we have included a short definition for major parameters at the beginning of each subsection where they are used. STABILITY OF FINANCIAL NETWORKS A list of major parameters used in this section E total external asset I total inter-bank exposure γ ratio of equity to asset w(e) weight of edge effective share of = ιv interbank asset ev e = (u, v) total external asset w(u, v) av total asset bv total interbank borrowing cv net worth (equity) 5.1 Network model and balance sheet We state a formalization of an ex ante financial network model similar to what has been used by researchers from Bank of England and elsewhere [25, 35, 55, 33, 49]. As was done by these prior researchers, we formulate our model in terms of balance-sheet “insolvency cascades” in a network of financial institutions (hereafter simply called “banks” and “banking networks”) with interlinked balance sheets, where losses flow into the asset side of the balance sheets. The same formulation can be used to analyze cascades of cash-flow insolvency in over-the-counter derivatives markets. From now on, we will refer to balance-sheet insolvency simply as insolvency. The banking network is represented by a parameterized node-weighted and edge-weighted directed graph G = (V, E, Γ ) in the following manner2: • Γ = {E , I , γ } is the set of parameters where – – – – E ∈ R is the total external asset, I ∈ R is the total inter-bank exposure, A = I + E is the total asset, and γ ∈ (0, 1) is the ratio of equity to asset. • V is the set of n banks where – the node weight σv ∈ [0, 1] denotes the share of total external asset for each bank v ∈ V  ∑v σv = 1 . • E represents the set of m direct inter-bank exposures where – w(e) = w(u, v) > 0 is the weight of a directed edge e = (u, v) ∈ E. The (interlocked) balance sheet for each node (bank) v ∈ V is shown in Table 1. Two types of banking network models are considered: Homogeneous model: E and I are equally distributed among the nodes and the edges, respectively, i.e., σv = 1n for every node v, and w(e) = Im for every edge e. Heterogeneous model: E and I are not necessarily equally distributed among the nodes and the edges, respectively. Both homogeneous and heterogeneous network models are relevant in practice, and have been investigated by prior researchers such as [9, 35, 55, 37, 33, 49]. parameters E , I , A, γ and Φ were also used by prior researchers, and the parameters σv and w(e) are generalizations of parameters used by prior researchers. 2 The DASGUPTA AND KALIGOUNDER Table 1. Relevant balance sheet details of a node v in the network [25, 55, 9]. The total amount of external assets E is assumed to be large enough such that bv − ιv + σv E is positive. Assets ιv = ∑(v,u)∈E w(v, u) ev = bv − ιv + σv E av = bv + σv E Liabilities interbank asset effective share of total external asset total interbank borrowing bv = ∑(u,v)∈E w(u, v) cv = γ a v net worth (equity) total asset 5.2 Initial insolvency via shocks A list of major parameters and definitions used in this section V✖ set of initially shocked nodes Φ severity of initial shock t time variable shocking mechanism: rule to select an initial subset of nodes to be shocked The initial insolvencies of a banking network at time t = 0 are caused by “shocks” received by a subset 0/ ⊂ V✖ ⊆ V of nodes. Such shocks can occur, for example, due to operational risks (e.g., frauds3) or credit risks, and has the effect of reducing the external assets of an selected subset of banks4 . Mathematically, the effect of the initial shock is to simultaneously decrease the external assets of each shocked node v ∈ V✖ from ev by sv = Φ ev , thereby reducing the net worth of v from its original value cv to cv − sv , where (0, 1] ∋ Φ > γ is a parameter denoting the severity of the initial shock. In the rest of the paper, by the phrase “shocking mechanism”, we refer to the rule that is used to select the initial subset of nodes to be shocked5. 5.3 Insolvency propagation equation A list of major parameters used in this section set of nodes that became insolvent before time t deg in (v) in-degree of node v V✂ (t,V✖ ) when initial shock is provided to nodes in V✖ Let the notation deg in(v) denote the in-degree of node v. The insolvencies propagate in discrete time units t = 0, 1, 2, . . . ; we add “(. . . ,t,V✖ , . . . )” to all relevant variables to indicate their dependences on t and on the set V✖ of initially shocked nodes. A bank becomes insolvent if its modified net worth becomes negative, and such a bank is removed from the network in the next time step. Let V✂ (t,V✖ ) ⊆ V denote the set of nodes that became insolvent before time t when an initial shock is provided to the nodes 6 in V✖ . The insolvencies of banks at time t affect the equity of other banks in the network at the next time 3 Iyer and Peydro [39] show that fraud is an important cause of bank insolvency. et al. [55] considered shocking only one (or a few) bank and empirically studying the effect of the shock on the entire network. Berman et al. [9], on the other hand, analyzed the computational complexity issues of the problem of selecting a subset of nodes such that shocking them will make the network fail. 5 Shocking mechanisms were not formally defined by prior researchers, but it was often implicit in their discussions.   6 Thus, in particular, deg in v,t,V t,V✖ . ✖ is the in-degree in the graph induced by the nodes in V \V 4 Nier ✂ STABILITY OF FINANCIAL NETWORKS F IG. 1. Pictorial illustration of the shock transmission equation for a node v from time t to time t + 1. step t + 1 by the following non-linear “insolvency propagation equation” 7,8 : o n min | cv (t,V✖ ) | , bv ∀ u ∈ V \ V✂ (t,V✖ ) : cu (t + 1,V✖) = cu (t,V✖ ) - ∑  deg in (v, t,V✖ ) cv (t,V✖ )<0  V v ∈V \V v: (t,V✖ ) ✂  V (5.1) (u,v)∈E | cv (t,V✖ ) | ensures the loss of equity of an insolvent bank to be disdeg in (v,t,V✖ ) bv tributed equitably among its creditors that have not become insolvent yet, whereas the term deg in (v,t,V✖ ) ensures that the total loss propagated cannot be more than the total interbank exposure of the insolvent bank; see F IG. 1 for a pictorial illustration. The insolvency propagation continues until no new bank becomes insolvent. For notational convenience, we may use (. . . ,t, . . . ) instead of (. . . ,t,V✖ , . . . ) when V✖ is clear from the context or is irrelevant. In Equation (5.1), the term 7 An equation of same flavor with some simplification and omitted details was described in words by Nier et al. [55] and Eboli [25]. 8 Equation (5.1) is highly non-linear. The results in [9] indicate that in general it is NP-hard to find a subset V of initially ✖  shocked nodes such that lim V t,V✖ is exactly or approximately maximized. t→∞ ✂ DASGUPTA AND KALIGOUNDER 5.4 Rationale for the network model and insolvency propagation equation As prior researchers [55, 2, 43] have commented: “conceptual frameworks from the theory of weighted graphs with additional parameters may provide a powerful tool for analysis of banking network models”. Several parametric graph-theoretic models, differing in the way edges are interpreted and additional parameters are used to characterize the contagion, have been used by prior researchers in finance and banking industry to study various research questions involving financial systems [9, 25, 35, 37, 55, 32, 63, 53, 5, 21, 62, 64]. As noted by researchers in [55, 5]: “the modelling challenge in studying banking networks lies not so much in analyzing a model that is flexible enough to represent all types of insolvency cascades, but in studying a model that can mimic the empirical properties of these different types of networks”. The insolvency propagation model formalized and evaluated in this paper using a mathematically precise abstraction is similar to or a generalization of the models in [9, 25, 35, 55, 37, 33, 49, 5] that represent cascades of cash-flow insolvencies. As [5] observes, over-the-counter (OTC) derivatives and similar markets are prone to this type of cascades. In such markets parties deal directly with one another rather than passing through an exchange, and thus each party is subject to the risk that the other party does not fulfill its payment obligations. The following example from [5] illustrates chains of such interactions: [5]“Consider two parties A and B, such that A has a receivable from party B upon the realization of some event. If B does not dispose of enough liquid reserves, it will default on the payment. Now consider that B has entered an off-setting contract with another party C, hedging its exposure to the random event. If C is cash-flow solvent, then the payment will flow through the intermediary B and reach A. However, if C is cash-flow insolvent and defaults, then the intermediary B might become cash-flow insolvent if it depends on receivables from C to meet its payment obligations to A”. The length of such chains of interactions in some OTC markets, like the credit default swap market, is significant [20, 50], thereby increasing the probability of cascade of cash-flow insolvencies [2]. As [55] observes, an insolvency propagation model such as the one studied here “conceptualises the main characteristics of a financial system using network theory by relating the cascading behavior of financial networks both to the local properties of the nodes and to the underlying topology of the network, allowing us to vary continuously the key parameters of the network”. Although the cascading effect studied is of somewhat special and simplified nature, as noted by [35]: “This is a deliberate oversimplification, aimed at a clearer understanding of how an initial failure can propagate shocks throughout the system”. 5.5 A measure of global stability9 Consider a banking network model as described in Sections 5.1–5.3. Let K ∈ (0, 1] be a real number10 denoting the fraction of nodes in V that received the initial shock under a shocking mechanism ϒ and 9A 10 K mathematically precise definition of global stability measure was omitted by most prior researchers. is a new parameter not used by prior researchers. STABILITY OF FINANCIAL NETWORKS A list of major parameters used in this section on an average 100x% nodes of the network become insolvent with the given values of γ and Φ if we proϒ a shocking mechanism ξ (K , G, γ , Φ , ϒ ) = x vide an initial shock to a random subset of 100K % of nodes selected using the shocking mechanism ϒ let Sϒ ,K be the set of all possible (K n)-element subsets of V . The vulnerability index11 of the network is then defined as12 h i 1 ξ (K , G, γ , Φ , ϒ ) = × E lim V✂ (t,V✖ ) : V✖ is selected randomly from Sϒ ,K t→∞ n In the above definition, the 1n factor is only for a min-max normalization [36] to ensure that 0 6 ξ (K , G, γ , Φ , ϒ ) 6 1. Noting that no new node in the network may fail at a time t > n, we may simplify the above expression for ξ as:   1 ξ (K , G, γ , Φ , ϒ ) = × E V✂ (n,V✖ ) : V✖ is selected randomly from Sϒ ,K n   =⇒ Pr V✂ (n,V✖ ) > n ξ (K , G, γ , Φ , ϒ ) : V✖ is selected randomly from Sϒ ,K > 0 As an example, ξ (0.1, G, 0.3, 0.5, random) = 0.9 means that with positive probability 90% nodes of the network G become insolvent with γ = 0.3 and Φ = 0.5 if we provide an initial shock to a random subset of 10% of nodes of G. Note that lower values of ξ imply higher global stability of a network. For simplicity, we may omit the arguments of ξ when they are clear from the context. A pseudo-code for calculating ξ is shown in Fig. 2. 5.6 Rationale for the global stability measure It is possible to think of other alternate measures of global stability than the one quantified above. However, the measure introduced above is in tune with the ideas that references [25, 55, 35, 37] directly (and, some other references such as [32, 63, 49] implicitly) used to empirically study their networks. Thus, in formalizing our global stability measure, we have decided to follow the cue provided by other researchers in the banking industry who have studied various insolvency propagation models. Measures of similar flavor have also been used by prior researchers in social networks in the context of influence maximization [17, 18]. 6. Simulation environment and explored parameter space In Table 2 we provide a summary of our simulation environment and explored parameter space. Individual components of the summary are discussed in Sections 6.1–6.4. 11 Although simple topological properties such as clustering coefficients have been used by authors to study properties of networks [56, 60], they are too simplistic for stability analysis of financial networks. 12 In this definition, we implicitly assume that the shocking mechanism ϒ allows one to select at least one set of K n nodes for the initial shock. Otherwise, we define ξ to be zero. DASGUPTA AND KALIGOUNDER (∗ initialization of parameters ∗) t ← 0 ; V✂ (0,V✖ ) ← 0/ ; continue =TRUE ; V✖ ← set of Kn nodes selected for initial insolvency based on shocking mechanism ϒ for every node v ∈ V do deg in (v, 0,V✖) ← deg in (v) endfor (∗ provide an initial shock ∗) for every node u ∈ V ′ do cu (0,V✖ ) ← cu − Φ eu endfor (∗ loop until no new node fails ∗)  V  while continue =TRUE do V✂ (t,V✖ ) 6= V    for every node u ∈ V \ V✂ (t,V✖ ) do    cu (t + 1,V ) ← cu (t,V ) ✖ ✖        for every node v ∈ V \ V (t,V✖ ) do      V✂     if cv (t,V✖ ) < 0 (u, v) ∈ E then (∗ propagate shock to in-neighbors ∗)           min cv (t,V✖ ) , bv    cu (t + 1,V✖) ← cu (t + 1,V✖) −    deg in (v,t,V✖ )     endfor     V (t + 1,V✖) ← V (t,V✖ ) ;   ✂ ✂    if cu (t,V✖ ) < 0 then V✂ (t + 1,V✖) ← V✂ (t + 1,V✖) ∪ u      (∗ node u fails if its equity becomes negative ∗)   endfor   t ←t +1   if V (t,V ) = V (t − 1,V )  then continue ← FALSE  ✖ ✂ ✖ ✂    for every node u ∈ V \ V (t,V ✖ ) do n ✂   o   in   deg (u,t,V✖ ) = v : (v, u) ∈ E ∧ v ∈ V \ V✂ (t,V✖ )     (∗ update in-degrees of alive nodes to exclude freshly dead nodes ∗)   endfor endwhile V (t,V✖ ) ξ (K , G, γ , Φ , ϒ ) ← ✂ n  F IG. 2. Pseudo-code for calculating ξ (K ,G, γ , Φ ,ϒ ). Comments in the pseudo-code are enclosed by (∗ and ∗). An implementation of the pseudo-code is available at www2.cs.uic.edu/˜dasgupta/financial-simulator-files. STABILITY OF FINANCIAL NETWORKS parameter explored values for the parameter homogeneous network type α = 0.1, β = 0.95 α = 0.2, β = 0.6 average degree 1 (in-arborescence) directed scale-free average degree 3 average degree 6 network topology average degree 3 directed Erdös-Rényi average degree 6 shocking mechanism idiosyncratic, coordinated number of nodes 50, 100, 300 E/I 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5 Φ 0.5, 0.6, 0.7, 0.8, 0.9 K 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 γ 0.05, 0.1, 0.15, . . ., Φ − 0.05 (α , β )-heterogeneous Table 2. A summary of simulation environment and explored parameter space. 6.1 Network topology13 } total number of parameter combinations > 700, 000 We consider two topology models previously used by economists to generate random financial networks: • the directed scale-free (SF) network model [8] that has been used by prior financial network researchers such as [59, 54, 5, 21], and • the directed Erdös-Rényi (ER) network model [11] that has been used by prior financial network researchers such as [58, 33, 48, 22, 15]. L L L L 3 3 1 1 2 2 4 4 Generation of directed ER networks is computationally trivial: given a value 0 < p < 1 that parameterizes the ER network,  for every  ordered pair of distinct nodes (u, v) we let Pr (u, v) ∈ E = 1/p. Letting p = d/n generates a random ER root network whose average degree is d with high probability. The directed SF networks in this paper are generated using the algorithm outlined by Bollobas et al. [11]. The algorithm F IG. 3. An in-arborescence graph. works as follows. Let a, b, η , δin (in-degree) and δout (outdegree) be non-negative real numbers with a + b + η = 1. The initial graph G(0) at step ℓ = 0 has just one node with no edges. At step ℓ > 0 the graph G(ℓ) has exactly ℓ edges and a random number nℓ of nodes. For ℓ > 0, G(ℓ + 1) is obtained from G(ℓ) by using the following rules: 13 One may obviously ask: why not use “real” networks? There are several obstacles however that make this desirable goal impossible to achieve. For example: (a) Due to their highly sensitive nature, such networks with all relevant parameters are rarely publicly available. (b) For the kind of inferences that we make in this paper, we need hundreds of thousands of large networks to have any statistical validity (in this paper, we explore more than 700,000 networks). DASGUPTA AND KALIGOUNDER • With probability a, add a new node v together with an edge from v to an existing node w, where w is chosen randomly such that Pr[w = u] = (din (u) + δin) (ℓ + δin nℓ ) for every existing node u, where din (u) is the in-degree of node u in G(ℓ). • With probability b, add an edge from an existing node v to an existing node w, where v and w are chosen independently, such that dout (u) + δout for every existing node u ℓ + δout nℓ din (u) + δin for every existing node u Pr[w = u] = ℓ + δin nℓ Pr[v = u] = where dout (u) is the out-degree of node u in G(ℓ). • With probability η , add a new node w and an edge from an existing node v to w, where v is chosen dout (u) + δout for every existing node u. such that Pr[v= u] = ℓ + δout nℓ To study the effect of connectivity on network stability, we generated random SF and ER networks with average degrees14 of 3 and 6. In addition, to study the effect of sparse hierarchical topology on network stability, we used the Barábasi-Albert preferential-attachment model [8] to generate random in-arborescence networks. Inarborescences are directed rooted trees with all edges oriented towards the root (see Fig. 3), and have the following well-known topological properties: • They belong to the class of sparsest connected directed acyclic graphs. • They are hierarchical networks, i.e., the nodes can be partitioned into levels L1 , L2 , . . . , L p such that L1 has exactly one node (the “root”) and nodes in any level Li have directed edges only to nodes in Li−1 (see Fig. 3). The root may model a “central bank” that lends to other banks but does not borrow from any bank. The algorithm for generating a random in-arborescence network G using the preferential-attachment model [8] is as follows: • Initialize G = (V, E) to have one node (the root) and no edges. • Repeat the following steps till G has n nodes: – Randomly select a node u in G such that, for every node v in G, Pr[u = v] = where deg(y) denotes the degree of node y in G. – Add a new node x and an undirected edge {x, u} in G. deg(v) ∑w∈V deg(w) • Orient all the edges towards the root. 14 There are many ways to fix the parameters to get the desired average degree. For example, as observed   1+δin (α +η )   − 1+ α +β in [11], letting δout = 0 and α > 0, one obtains E number of nodes in G(t) of in-degree x ∝ x t and   α −( 2− ) 1− α t. E number of nodes in G(t) of out-degree x ∝ x STABILITY OF FINANCIAL NETWORKS 6.2 Shocking mechanisms ϒ Recall that a shocking mechanism ϒ provides a rule to select the initial subset of nodes to be shocked. The following two mechanisms are used to select the nodes to receive the initial shock. Idiosyncratic (random) shocking mechanism We select a subset of nodes uniformly at random. This corresponds to random idiosyncratic initial insolvencies of banks, and is a choice that has been used by prior researchers such as [55, 37, 35, 33, 49]. Coordinated shocking mechanism15 . In this type of non-idiosyncratic correlated shocking mechanism, we seek to play an adversarial role16 in selecting nodes for the initial shock that may cause more damage to the stability of the network. The selection of an adversarial strategy depends on whether the network is homogeneous or heterogeneous. The coordinated shocking mechanism falls under the general category of correlated shocks where the nodes with high (weighted) in-degrees are correlated. For homogeneous networks, recall that all nodes have the same share of the total external asset E . However, the total interbank exposure bv of a node v is directly proportional to the in-degree of v, and, as per Equation (5.1), nodes with higher inter-bank exposures are more likely to transmit the shock to a larger number of other nodes. Thus, we play an adversarial role by selecting a set of K n nodes in non-increasing order of their in-degrees starting from a node with the highest in-degree. For heterogeneous networks, nodes with higher “weighted” in-degrees (i.e., with higher values of the sum of weights of incoming edges) represent nodes that have larger external assets than other nodes, and have more inter-bank exposures. Thus, for heterogeneous networks we play an adversarial role by selecting K n nodes in non-increasing order of their weighted in-degrees starting from a node with the highest weighted in-degree. 6.3 Network type: (α , β )-heterogeneous networks Recall that in a heterogeneous network it is possible to have a few banks whose external assets or interbank exposures are significantly larger than the rest of the banks, i.e., it is possible to have a few banks that are “too big”, and thus heterogeneous networks permit investigation of the effect of such big banks on the global stability of the entire network. To this end, we define a (α , β )-heterogeneous network as follows. e ⊆ V be a random subset V of α n nodes and let D EFINITION 6.1 (((α , β ))-heterogeneous network) Let V e . For 0 < α , β < 1, a (α , β )-heterogeneous Ee be the set of edges that have at least one end-point from V network G = (V, E) is one in which the total external and internal assets are distributed in the following manner: Distribution of E : 15 While correlated shocking mechanisms affecting a correlated subset of banks are relevant in practice, prior researchers such as [55, 35, 37, 33, 49] have mostly used idiosyncratic shocking mechanisms. There are at least two reasons for this. Firstly, idiosyncratic shocks are a cleaner way to study the stability of the topology of the banking network. Secondly, it is not a priori clear what kind of correlations in the shocking mechanism would lead to failure of more nodes than idiosyncratic shocks in a statistically significant way. Our coordinated shocking mechanism intuitively corresponds shocks in which banks that are “too big to fail” in terms of their assets are correlated. Our conclusion ⑥ shows that coordinated shocks do indeed cause more statistically significant damage to the stability of the network as opposed to random shocks. 16 Usage of adversarial strategies in measuring the worst-case bounds for network properties are very common in the algorithmic literature; see, for example, see the book [12]. DASGUPTA AND KALIGOUNDER • distribute β E part of the total external asset E equally among the α n nodes in e , and V • distribute the remaining part (1 − β )E of E equally among the remaining (1 − α )n nodes. Distribution of I : • Distribute β I part of the total interbank exposure I equally among a random e of edges from the edges in E, e and subset of α |E| • distribute the remaining part (1 − β )I of I equally among the remaining e edges. |E| − α |E| We performed our simulations for (α , β )-heterogeneous networks for (α , β ) = (0.1, 0.95) and (α , β ) = (0.2, 0.6). The combination (α , β ) = (0.1, 0.95) corresponds to the extreme situation in which 95% of the assets and exposures involve 10% of banks, thus creating a minority of banks that are significantly larger than the remaining banks. The other combination (α , β ) = (0.2, 0.6) corresponds to a less extreme situation in which there are a larger number of moderately large banks. 6.4 Other minor details To correct statistical biases, for each combinations of parameters, shock types and network types, we generated 10 corresponding random networks and computed the average value of the vulnerability index over these 10 runs. For ER and SF random networks, we selected the values of network generation parameters such that the expected number of edges of the network is 3n or 6n depending on whether we require the average degree of the network to be 3 or 6, respectively. The minimum difference between two non-identical values of the average vulnerability index over 10 runs for two n-node networks is 1/(10 n). Thus, to allow for minor statistical biases introduced by any random graph generation method, we consider two vulnerability indices to be same (within the margin of statistical error) if their absolute difference is no more than 1/(3 n), which is above 1/(10 n) but no more than 0.7% of the total range of the vulnerability indices. Finally, we can assume without loss of generality that I = m, since otherwise if µ = Im 6= 1 then we can divide each of the quantities ιv , bv and E by µ without changing the outcome of the insolvency propagation procedure. 7. Results In this section, we discuss our uncovering of many interesting relationships of the stability with other relevant parameters of the network based on our comprehensive evaluation and analysis of this stability measure. It is easy to see that there are many (at least several thousands, but significantly more in most cases) networks in the original sets of networks that are compared in two different scenarios in Tables 3,4,5,6,7,9,10,11 and related tables in the supplementary documents, thereby assuring the statistical validity of the comparison results. 7.1 Effect of unequal distribution of total assets E and I As our analysis shows, nodes with disproportionately large external assets affect the stability of the entire network in an adverse manner, and more uneven distribution of assets among nodes in the network makes the network less stable. STABILITY OF FINANCIAL NETWORKS E 7.1.1 Effect on global stability For the same value of the common parameters n, I , K , Φ and γ , for the same for network type (ER, SF or in-arborescence) of same average degree (6, 3 or 1) and for the same shocking mechanism ϒ (coordinated or idiosyncratic), we compared the value of ξ for the homogeneous network with the corresponding values of ξ for (0.1, 0.95)-heterogeneous and (0.2, 0.6)heterogeneous networks. The comparison results shown in Table 3 show most of the entries as being at least 90%. Thus, we conclude: ① networks with all nodes having the same external assets display higher stability over similar networks with fewer nodes having disproportionately higher external assets. Table 3. Comparison of stabilities of (α , β )-heterogeneous networks with their homogeneous counter-parts over all parameter ranges. The numbers are the percentages of data points for which ξ(α ,β )−heterogeneous was at least ξ homogeneous . ER ER SF SF average degree 3 average degree 6 average degree 3 average degree 6 α = 0.1 α = 0.2 α = 0.1 α = 0.2 α = 0.1 α = 0.2 α = 0.1 α = 0.2 α = 0.1 α = 0.2 β = 0.95 β = 0.6 β = 0.95 β = 0.6 β = 0.95 β = 0.6 β = 0.95 β = 0.6 β = 0.95 β = 0.6 In-arborescence coordinated 66.91% 60.22% 99.26% 98.91% 98.46% 98.00% 98.22% 91.68% 99.13% 97.4% shock idiosyncratic 92.75% 81.79% 97.76% 96.81% 98.16% 97.61% 98.86% 94.84% 98.83% 97.22% shock Formal intuition behind the conclusion in ① In spite of the highly non-linear nature of Equation (5.1), the following formal intuition may help to explain the conclusion in ①. L EMMA 7.1 (see Section A of the appendix for a proof) Fix γ , Φ , E , I and the graph G. Consider any node v ∈ V✖ and suppose that v fails due to the initial shock. For every edge (u, v) ∈ E, let ∆ homo (u) and ∆ hetero (u) be the amount of shock received by node u at time t = 1 if G is homogeneous or heterogeneous, respectively. Then, E [∆ hetero (u)] > 9.5 E [∆ homo (u)] , β E [∆ homo (u)] = α 3 E [∆ homo (u)] , if (α , β ) = (0.1, 0.95) if (α , β ) = (0.2, 0.6) Lemma 7.1 implies that E [∆ hetero (u)] is much bigger than E [∆ homo (u)], and thus more nodes are likely to fail beyond t > 0 leading to a lower stability for heterogeneous networks. 7.1.2 Effect on residual instability For homogeneous networks, if the equity to asset ratio γ is close enough to the severity of the shock Φ then the network almost always tends to be perfectly stable, as one would intuitively expect. However, the above property is not true in general for highly heterogeneous DASGUPTA AND KALIGOUNDER networks in the sense that, even when γ is close to Φ , these networks (irrespective of their topologies and densities) have a minimum amount of global instability (which we term as the residual instability)17 . In Table 4 and supplemental Tables S1–S9 we tabulated residual instabilities for different types of homogeneous and heterogeneous networks under coordinated and idiosyncratic shocks. The numbers in these tables show, for each combination of network types, |V |, shocking mechanism and values of Φ and γ such that |Φ − γ | = 0.05, the percentage of networks with this combination for which the vulnerability index ξ was less than 0.05, 0.1 or 0.2. As the reader will observe, all the numbers for heterogeneous networks are significantly lower than their homogeneous counter-parts. Thus, we conclude: ② a heterogeneous network, in contrast to its corresponding homogeneous version, has a residual minimum instability even if its equity to asset ratio is very large and close to the severity of the shock. 7.2 Effect of total external assets A controversial belief regarding the cause of the collapse of many major financial institutions around 2007 asserts that removal of the separation between investment and consumer banking allowed a ripple effect of insolvencies of individual banks to other banks [27, 14]. In our setting, the quantity E/I controls the total (normalized) amount of external investments of all banks in the network. Thus, varying the ratio E/I allows us to investigate the role of the magnitude of total external investments on the stability of our banking network (see Table 5). All the entries in Table 5 are close to 0, showing that heterogeneous networks exhibited very small average changes in the vulnerability index ξ when E/I was varied. Thus, we conclude: ③ for heterogeneous banking networks, global stabilities are affected very little by the amount of the total external asset E in the system. Visual illustrations of ③ are shown in supplemental F IG. S4 and F IG. S5 for homogeneous and heterogeneous networks, respectively. 7.3 Effect of network connectivity Although it is clear that connectivity properties of a banking network has a crucial effect on its stability, prior researchers have drawn mixed conclusions on this. For example, Allen and Gale [3] concluded that networks with less connectivity are more prone to contagion than networks with higher connectivity due to improved resilience of banking network topologies with higher connectivity via transfer of proportion of the losses in one bank’s portfolio to more banks through interbank agreements. On the other hand, Babus [7] observed that, when the network connectivity is higher, liquidity can be redistributed in the system to make the risk of contagion lower, and Gai and Kapadia [33] observed that higher connectivity among banks leads to more contagion effect during a crisis. The mixed conclusions arise because links between banks have conceptually two conflicting effects on contagion, namely, visual illustrations to this phenomena, see supplemental F IG. S1–S3. For example, in supplemental F IG. S1, when γ is 45% and Φ is only 5% more than γ , the vulnerability index ξ is approximately 0 for all the 9 combinations of parameters, but in supplemental F IG. S2–S3 all the 18 networks have a value of ξ > 0.1 even when γ is 45% and the severity of the shock is only 5% more than γ . 17 For STABILITY OF FINANCIAL NETWORKS Table 4. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. See also supplementary Tables S1–S9. coordinated shock Φ = 0.5, γ = 0.45 Φ = 0.5, γ = 0.40 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 73% 89% 100% 44% 100% 73% 100% 100% 84% 100% 73% 100% 100% 100% 100% 0% 43% 100% 25% 100% 31% 84% 100% 57% 100% 59% 100% 100% 88% 100% in-arborescence ER, average degree 3 (0.1, 0.95)-heterogeneous ER, average degree 6 SF, average degree 3 SF, average degree 6 0% 0% 8% 2% 18% 0% 0% 9% 6% 23% 0% 1% 10% 15% 30% 0% 0% 2% 0% 9% 0% 0% 6% 2% 10% 0% 0% 6% 5% 11% in-arborescence ER, average degree 3 (0.2, 0.6)-heterogeneous ER, average degree 6 SF, average degree 3 SF, average degree 6 0% 4% 8% 2% 8% 0% 7% 12% 6% 12% 9% 19% 24% 22% 24% 0% 2% 6% 0% 7% 0% 6% 7% 2% 8% 9% 16% 16% 18% 16% in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 73% 66% 100% 29% 100% 73% 100% 100% 61% 100% 73% 100% 100% 100% 100% 0% 25% 100% 20% 90% 34% 64% 100% 42% 100% 73% 100% 100% 83% 100% in-arborescence ER, average degree 3 (0.1, 0.95)-heterogeneous ER, average degree 6 SF, average degree 3 SF, average degree 6 0% 0% 6% 0% 6% 0% 0% 6% 0% 10% 0% 6% 6% 7% 15% 0% 0% 4% 0% 6% 0% 0% 6% 0% 6% 0% 1% 6% 3% 6% in-arborescence ER, average degree 3 (0.2, 0.6)-heterogeneous ER, average degree 6 SF, average degree 3 SF, average degree 6 0% 0% 6% 0% 7% 0% 6% 7% 2% 8% 9% 16% 16% 14% 17% 0% 0% 6% 0% 6% 0% 4% 6% 1% 7% 9% 16% 16% 13% 16% in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 73% 71% 100% 22% 100% 73% 97% 100% 44% 100% 73% 100% 100% 86% 100% 0% 22% 100% 18% 88% 55% 60% 100% 36% 100% 73% 100% 100% 74% 100% in-arborescence ER, average degree 3 (0.1, 0.95)-heterogeneous ER, average degree 6 SF, average degree 3 SF, average degree 6 0% 0% 6% 0% 6% 0% 0% 6% 0% 6% 0% 6% 6% 10% 16% 0% 0% 0% 0% 6% 0% 0% 6% 0% 6% 0% 1% 6% 2% 6% in-arborescence ER, average degree 3 (0.2, 0.6)-heterogeneous ER, average degree 6 SF, average degree 3 SF, average degree 6 0% 0% 6% 0% 6% 0% 6% 6% 0% 7% 9% 16% 16% 13% 16% 0% 0% 6% 0% 6% 0% 4% 6% 0% 6% 9% 16% 16% 12% 16% homogeneous |V | = 50 homogeneous |V | = 100 homogeneous |V | = 300 DASGUPTA AND KALIGOUNDER Table 5. Absolute values of the largest change of the vulnerability index ξ in the range 0.25 6 E /I 6 3.5. average values of (0.1, 0.95)-heterogeneous in-arborescence (0.2, 0.6)-heterogeneous in-arborescence (0.1, 0.95)-heterogeneous ER, average degree 3 (0.2, 0.6)-heterogeneous ER, average degree 3 (0.1, 0.95)-heterogeneous ER, average degree 6 (0.2, 0.6)-heterogeneous ER, average degree 6 (0.1, 0.95)-heterogeneous SF, average degree 3 (0.2, 0.6)-heterogeneous SF, average degree 3 (0.1, 0.95)-heterogeneous SF, average degree 6 (0.2, 0.6)-heterogeneous SF, average degree 6 max E 0.256 I 63.5  ξ − min E 0.256 I 63.5  ξ coordinated shock idiosyncratic shock 0.017 0.007 0.066 0.040 0.111 0.084 0.119 0.034 0.200 0.054 0.045 0.017 0.073 0.041 0.116 0.078 0.094 0.032 0.179 0.054 • more interbank links increases the opportunity for spreading insolvencies to other banks, • but, more interbank links also provide banks with co-insurance against fluctuating liquidity flows. As our findings show, these two conflicting effects have different strengths in homogeneous versus highly heterogeneous networks, thus justifying the mixed conclusions of past researchers. Table 6. Effect of connectivity on the stability for homogeneous networks under coordinated and idiosyncratic shocks. The percentage shown for a comparison of the type “network A versus network B” indicates the percentage of data points for which the stability of networks of type A was at least as much as that of networks of type B. ER average degree 3 versus ER average degree 6 idiosyncratic shock coordinated shock 97.43% 97.05% SF average degree 3 versus SF average degree 6 coordinated shock idiosyncratic shock 98.89% 98.29% Homogeneous networks Recall that in a homogeneous network all banks have the same external asset. Table 6 shows sparser homogeneous networks with lower average degrees to be more stable for same values of other parameters. Thus, we conclude: ④ for homogeneous networks, higher connectivity leads to lower stability. Heterogeneous networks In a heterogeneous network, there are banks that are “too big” in the sense that these banks have much larger external assets and inter-bank exposures compared to the remaining STABILITY OF FINANCIAL NETWORKS Table 7. Effect of connectivity on the stability under coordinated and idiosyncratic shocks for (A) (α , β )-heterogeneous ER and SF networks and (B) (α , β )-heterogeneous in-arborescence versus (α , β )-heterogeneous SF networks. The percentage shown for a comparison of the type “network A versus network B” indicates the percentage of data points for which the stability of networks of type A was at least as much as that of networks of type B. (0,1,0.95) ER average degree 6 (0.2,0.6) ER average degree 6 (0,1,0.95) SF average degree 6 (0.2,0.6) SF average degree 6 versus versus versus versus (0,1,0.95) ER average degree 3 (0.2,0.6) ER average degree 3 (0,1,0.95) SF average degree 3 (0.2,0.6) SF average degree 3 coordinated idiosyncratic coordinated idiosyncratic coordinated idiosyncratic coordinated idiosyncratic shock shock shock shock shock shock shock shock 89.3% 82.39% 68.12% 61.46% 85.51% 73.81% 69.29% 73.07% (A) (0,1,0.95) SF average degree 3 and average degree 6 versus (0.1,0.95)-heterogeneous in-arborescence (SF ave. degree 1) coordinated shock idiosyncratic shock 85.7% (0.2,0.6) SF average degree 3 and average degree 6 versus (0.2,0.6)-heterogeneous in-arborescence (SF ave. degree 1) coordinated shock idiosyncratic shock 81.86% 56.21% 51.07% (B) banks. Table 7 shows that for heterogeneous network models denser networks with higher average degree are more stable than the corresponding sparser networks for same values of other parameters, especially when the heterogeneity of the network is larger (i.e., when α = 0.1, β = 0.95). Thus, we conclude: ⑤ for heterogeneous networks, higher connectivity leads to higher stability. Formal intuition behind the conclusions in ④ and ⑤ Informally, conclusions ④ and ⑤ indicate that in homogeneous networks higher connectivity leads to more opportunity for spreading insolvencies to other banks whereas in heterogeneous networks higher connectivity provides banks with co-insurance against fluctuating liquidity flows through shared interbank assets. However, a precise formal treatment of mechanism that drives such conclusions is complicated due to several reasons such as the random nature of the networks, the randomness in asset distribution for heterogeneous networks and the non-linear nature of the insolvency propagation equation. Nevertheless, we provide the following, somewhat simplified, formal reasoning. We will use the following notations and conventions18: • deg ave = |E| n will denote the average degree of a graph G. It is assumed that deg ave is a small positive integer constant independent of n (e.g., in our simulation work, deg ave ∈ {1, 3, 6}). • ∆ x will denote a small change for the value x of a variable. 18 In standard algorithmic analysis terminologies, f ≈ g implies f (r) g(r) = 1 ± o(1). DASGUPTA AND KALIGOUNDER • For two functions f (r) and g(r) of a variable r, we will use the notation f ≈ g (respectively, f / g, f (r) f (r) f (r) f ' g) if lim g(r) = 1 (respectively, lim g(r) 6 1, lim g(r) > 1). r→∞ r→∞ r→∞ • The standard phrase “with high probability” (or w.h.p. in short) refers to a probability p(n) such that limn→∞ p(n) = 0. • If necessary, we will use the superscripts “homo” and “hetero” to denote the value of a quantity for homogeneous and heterogeneous networks, respectively. Consider a node v ∈ V✖ with deg in (v) > 1 and suppose that v fails due to the initial shock at t = 0. By Equation (5.1), for every edge (u, v) ∈ E, the amount of shock u receives from v is given by B =  min A, c1 with   Φ c1 deg in(v) − c1 deg out(v) + c2 E − γ c1 deg in(v) + c2 E A = deg in(v)   E deg out(v) = c1 Φ − γ + c2 Φ − γ − c1 Φ (7.1) in deg (v) deg in(v) for some appropriate positive quantities c1 and c2 that may be estimated as follows: • If G is homogeneous then chomo = 1 I n deg ave = 1 and chomo = n1 . 2 and chetero are random variables independent of deg ave . • If G is (α , β )-heterogeneous then chetero 1 2 Using the notations in Definition 6.1 the expected value of chetero may be estimated as follows: 2 h i h i β)E β)E i h Pr v ∈ Ve βα En + Pr v ∈ / Ve (1− α βα En + (1 − α ) (1− (1−α ) n 1 (1−α ) n hetero = E c2 = = E E n The expected value of chetero depend on the nature (SF or ER) of the random network; its estima1 tion is therefore deferred until later. Our goal is to provide evidence for a claim of the following nature for either random SF or random ER networks: For many realistic network parameter combinations, w.h.p. increasing connectivity from d to d + ∆ d decreases the expected amount of shock transmitted by a failed node v to u in homogeneous networks (causing improved stability) but increases the expected amount of shock transmitted by a failed node v to u in heterogeneous networks (leading to worse stability). The case of random SF networks If G is a directed SF network, then the discrete probability density function for the degree of any node v in G is given by:     ∀ k ∈ {1, 2, . . ., n − 1} : Pr deg in (v) = k = Pr deg out(v) = k = C k−µ where µ > 2 is the constant for the exponent of the distribution and C > 0 is a constant such that  E deg in(v) = E [deg out(v)] = deg ave . For example, for our random in-arborescence networks, the results in [8] imply µ = 3. To simplify exposure, in the following we assume that µ = 3, though STABILITY OF FINANCIAL NETWORKS −s is the the analysis can be extended in a straightforward manner for any other µ > 2. ζ (s) = ∑∞ x=1 x n−1 −s well-known Riemann zeta function; it is well known that ζ (s) ≈ ∑x=1 x for any s > 2 and for all large 2s−1 for any s > 1 (see [44, page 489]). In particular, it is known n (see [44, page 74-75]) and ζ (s) < 2s−1 −1 that ζ (2) = π2 6 , ζ (3) = 1.2020569 · · · and ζ (4) =   E deg in (v) = deg ave ≡ n−1 ∑k k=1 π4 90 . Note that  deg ave 6 deg ave Ck−3 = deg ave ⇒ C ≈ = ζ (2) π2   π2 1 in L EMMA 7.2 (see Section B of the appendix for a proof) E deg ave and deg (v) > 0 ≈ deg in (v) 15 h i 6 deg ave ln n. Var deg in(v) ≈ π2 We now provide an estimation of chetero using the notations in Definition 6.1. 1   L EMMA 7.3 (see Section C of the appendix for a proof) W.h.p. 1 + α − β − α2β 6 E chetero 6 1 1+α β −α 2 −β −α 2 β . 1−2 α Due to the above lemma, we may assume that   0.156875 6 E chetero 6 0.16, 1  hetero  w.h.p. 0.54 6 E c1 6 0.76, if G is (0.1, 0.95)-heterogeneous if G is (0.2, 0.6)-heterogeneous We will investigate the sensitivity of the amount of shock A transmitted from v to u as the average degree deg ave is changed while keeping all other parameters the same. For notational convenience, the parameters are normalized such that I = n deg ave at the initial value d of deg ave . As deg ave is increased from d to d + ∆ d, I is still kept the same. Thus, I I at deg ave =d+∆ d =I at deg ave =d ⇒ chomo 1 at deg ave =d+∆ d = at deg ave =d+∆ d n (d + ∆ d) = nd d = n (d + ∆ d) d + ∆ d Equation (7.1) gives the following for homogeneous and heterogeneous networks: • If G is a homogeneous network then h i E Ahomo deg ave = d         E Φ −γ 1 1 out in in ≈ Φ −γ + deg (v) > 0 − Φ E deg (v) E deg (v) > 0 E n deg in(v) deg in (v)   π2 E Φ − γ π2 Φ 2 d− d = Φ −γ + 15 n 15 i h E Ahomo deg ave = d + ∆ d  h i i  E Φ −γ h 1 E deg in (v) deg in(v) > 0 − d+d∆ d Φ E [deg out(v)] E deg1in (v) deg in (v) > 0 ≈ d+d∆ d Φ − γ + n DASGUPTA AND KALIGOUNDER  π2 E Φ − γ d = Φ −γ + d + ∆d 15 n   d + ∆d − 2 π2 Φ d d + ∆d d + ∆ d 15   ∆ E Ahomo i h i h = E Ahomo deg ave = d + ∆ d − E Ahomo deg ave = d   π2 E Φ − γ ∆d π2 Φ ≈ − Φ −γ + ∆d − d ∆d d + ∆d 15 n 15 • If G is a heterogeneous network then     hetero   h hetero i E Φ − γ 1 in + E A = Φ − γ E c1 deg (v) > 0 E n deg in (v)   i  h  1 out hetero in E deg (v) E − Φ E c1 deg (v) > 0 deg in (v) which provides the following bounds: h E A hetero   h hetero i π 2 E Φ − γ π 2 Φ 2 h hetero i + d− d E c1 deg ave = d ≈ Φ − γ E c1 15 n 15 i  h i  π 2 Φ 2 h hetero i  h hetero i π 2 E Φ − γ hetero E A deg ave = d + ∆ d ≈ Φ − γ E c1 d + ∆d − + d E c1 15 n 15 h i h i   ∆ E Ahetero = E Ahetero deg ave = d + ∆ d − E Ahetero deg ave = d  i h π2 E Φ − γ π2 Φ ≈ d ∆ d E chetero ∆d − 1 15 n 15 Now note that   homo  Φ −γ π2 Φ d π2 E Φ − γ /0 ⇒ ∆E A + > d + ∆d 15 15 n     1 1 π2 d π2 E π2 E Φ> γ + − − ≡ d + ∆d 15 15 n d + ∆ d 15 n    i h i E h  hetero  E Φ −γ E hetero hetero > Φ d E c1 − d E c1 ≡ ∆E A '0 ⇒ Φ> γ n n n     1 + α β − α2 − β − α2 β E E −d ⇒ w.h.p. Φ> γ n 1 − 2α n (7.2) (7.3) It is easy to verify that constraints (7.2) and (7.3) are satisfied for many natural combinations of parameters. In fact, the constraints (7.2) and (7.3) are almost always satisfied when E grows moderately linearly STABILITY OF FINANCIAL NETWORKS with n. To see this informally, note that since α ≪ β and α is small, and thus (7.3) is approximately  E − d (1 − β ) n  Φ> 1 + α β − α2 − β − α2 β ≈ 1−β 1 − 2α   E γ n (7.3′ ) Now suppose that E < d(1 − β )n. Then, (7.2) and ((7.3′ )) are always satisfied since Φ > γ . For a numerical example, suppose that G is a (0.1, 0.95)-heterogeneous network (i.e., α = 0.1 and β = 0.95), d = 3, ∆ d = 1, γ = 0.2 and Φ = 0.4. Then constraints (7.2) and (7.3) reduce to: 0.5 + 0.4π 2 − 2π2 E π2 E > 0.25 − 15 n 15 n 2E E − 0.94125 > n n and and these constraints can be satisfied when E grows moderately linearly with n, i.e., when 0.94125 n < E < 6.38 n. The case of random ER networks In a random ER network, the probability of having a particular edge is given by the following set of independent Bernoulli trials: ∀ u, v ∈ V with u 6= v : Pr [(u, v) ∈ E] = p = deg ave n−1 Thus, for every k ∈ {0, 1, 2, . . ., n − 1}:   n−1 k Pr deg (v) = k = Pr deg (v) = k = p (1 − p)(n−1)−k k     E deg in = E deg out = p (n − 1) = deg ave       deg ave deg ave Var deg in(v) = Var deg out(v) = p (1 − p) (n − 1) = 1 − n−1  in   out  Since deg ave = p (n − 1) is a constant, one can approximate the above binomial distribution by a Poisson’s distribution [57, page 72] to obtain     (deg ave )k Pr deg in(v) = k = Pr deg out(v) = k ≈ e−deg ave k! L EMMA 7.4 (see Section D of the appendix for a proof) E h i −d 10−10 and ∂∂d E deg 1in (v) deg ave = d ≈ 1−ed . ⌊3x+10⌋ h 1 deg in (v) i − ⌊3 deg ave +10⌋ (deg )k ∑ (1/k) e−deg ave k!ave k=1 k / For notational convenience, let ϒ (x) = ∑ 1k e−x xk! . Since 10−10 is an extremely small number for i k=1 h 1−e−x our purposes, we will just use E deg1in (v) ≈ ϒ (deg ave ) in the sequel. Values of ϒ (x) and ∂ ϒ∂ (x) x x = for a few small integral values of x are shown in Table 8. It is easy to see that lim ϒ (x) = 0 and, for x→∞ 1 large x, ∂ ϒ∂ (x) x ≈ /x. As before, we first provide an estimation of chetero using the notations in Definition 6.1. 1 DASGUPTA AND KALIGOUNDER Table 8. Values of ϒ (x) and ∂ ϒ (x) ∂x for a few small integral values of x using straightforward calculations. 2 3 4 5 6 x= 7 8 9 10 11 12 ϒ (x) ≈ 0.499 0.411 0.324 0.256 0.207 0.172 0.147 0.128 0.113 0.101 0.091 ≈ 0.432 0.284 0.245 0.256 0.199 0.166 0.143 0.125 0.111 0.100 0.090 ∂ ϒ (x) x L EMMA 7.5 (see Section E of the appendix for a proof) W.h.p. 1 + α − β − 1 + α β − α2 − β − α2 β . 1 − 2α Using the above result, the following bounds hold:   αβ 6 E chetero 6 1 2 • If G is a homogeneous network then I ∂ homo c ∂d 1 at deg ave =d = lim ∆ d→0 at deg ave =d+∆ d n (d + ∆ d) I − ∆d at deg ave =d nd nd −1 1 n (d + ∆ d) = lim =− ∆ d→0 ∆d d h i E Ahomo deg ave = d = chomo 1 ≈ chomo 1        E Φ −γ 1 1 out in homo in Φ −γ + deg (v) > 0 − c1 Φ E deg (v) E deg (v) > 0 E n deg in (v) deg in(v)   E Φ −γ Φ −γ + ϒ (d) − chomo Φ d ϒ (d) 1 n  i ∂ h homo E A deg ave = d ∂d !   ∂ homo E Φ −γ ∂ ∂ chomo d ϒ (d) c + ϒ (d) − Φ ≈ Φ −γ 1 at at ∂d 1 n ∂d ∂d deg ave =d deg ave =d !     E Φ −γ 1 − e−d Φ −γ using product rule − Φ − ϒ (d) + ϒ (d) + 1 − e−d + =− of derivatives d n d !     E Φ −γ Φ −γ 1 − e−d =− − Φ 1 − e−d + d n d STABILITY OF FINANCIAL NETWORKS • If G is a heterogeneous network then     hetero   h hetero i E Φ − γ 1 in E A = Φ − γ E c1 E deg (v) > 0 + n deg in (v)   i  h  1 out in E deg (v) E − Φ E chetero deg (v) > 0 1 deg in (v) which provides the following bounds w.h.p.: i E Φ − γ i h h i  h + ϒ (d) − Φ d ϒ (d) E chetero E Ahetero deg ave = d ≈ Φ − γ E chetero 1 1 n i ∂ h hetero E A deg ave = d ∂d     E Φ −γ ∂ 1 + α β − α2 − β − α2 β ∂ ' ϒ (d) − Φ d ϒ (d) n ∂d 1 − 2α ∂d !      E Φ −γ 1 − e−d 1 + α β − α2 − β − α2 β  −Φ 1 − e−d + ϒ (d) = n d 1 − 2α using product rule of derivatives Now note the following: i ∂ h homo E A deg ave = d / 0 ∂d !     Φ − γ E Φ −γ 1 − e−d −d ⇒ +Φ 1−e > d n d        1 E 1 − e−d 1 E 1 − e−d −d Φ> γ +1−e − − ≡ d n d d n d i ∂ h hetero E A deg ave = d ' 0 ∂d !      E Φ −γ 1 − e−d 1 + α β − α2 − β − α2 β  >Φ 1 − e−d + ϒ (d) ⇒ n d 1 − 2α      −d    α 2 −β −α 2 β E 1−e−d −d + ϒ (d) Φ > γ 1 − e ≡ En 1−ed − 1+α β −1−2 α n d (7.4) (7.5) It is easy to verify that constraints (7.4) and (7.5) are satisfied for many natural combinations of parameters. For example, the constraints (7.4) and (7.5) are almost always satisfied if d is sufficiently large. To see this informally, note that if d is large then d1 , e−d , ϒ (d) ≈ 0. Moreover, since α ≪ β and α is small, 1+α β −α 2 −β −α 2 β 1−2 α ≈ 1 − β and then constraints (7.4) and (7.5) reduce to   E E 1− Φ '− γ ≡Φ / nd nd E nd E nd −1 γ (7.4)d≫0 DASGUPTA AND KALIGOUNDER Table 9. Comparisons of strengths of coordinated versus idiosyncratic shocks. The percentages indicate the percentage of total number of data points (combinations of parameters Φ , γ , E and K ) for that network type that resulted in ξc > ξr , where ξc and ξr are the vulnerability indices under coordinated and idiosyncratic shocks, respectively. (α , β )-heterogeneous networks ER average degree 3 In-arborescence ER average degree 6 SF average degree 3 SF average degree 6 α = 0.1 α = 0.2 α = 0.1 β = 0.95 β = 0.6 β = 0.95 α = 0.2 β = 0.6 α = 0.1 β = 0.95 α = 0.2 β = 0.6 α = 0.1 β = 0.95 α = 0.2 β = 0.6 α = 0.1 β = 0.95 α = 0.2 β = 0.6 56.64% 90.97% 98.99% 98.04% 93.16% 64.13% 94.44% 66.48% 57.27% 89.66% homogeneous networks In-arborescence ER average degree 3 ER average degree 6 SF average degree 3 SF average degree 6 84.62% 74.97%  If E > n d then E nd E −1 nd E − 1+β nd > 1 and E nd E −1+β nd 78.59%  Φ ' < E nd E −1 nd E γ ≡ Φ ' nd 81.15% E nd E nd − 1+β 54.80% γ (7.5)d≫0 ; thus both (7.4)d≫0 and (7.5)d≫0 can be satisfied by choosing Φ appropriately with respect to γ . For a numerical example, suppose that G is a (0.1, 0.95)heterogeneous network (i.e., α = 0.1 and β = 0.95), d = 10, and E = 12 n. Then constraints (7.4),(7.5) reduce to: Φ 1.17 < < 11 γ which corresponds to most settings of Φ and γ used in our simulation. 7.4 Random versus correlated initial failures For most parameter combinations, our results, tabulated in Table 9, show that coordinated shocks, which are a type of correlated shocks, resulted in insolvencies of higher number of nodes as opposed to idiosyncratic shocks for the same network with the same parameters, often by a factor of two or more. For example, Table 9 shows that for (0.1, 0.95)-heterogeneous ER networks of average degree 6 the vulnerability index under coordinated shocks is at least as much as the vulnerability index under idiosyncratic shocks 98.99% of the time. Thus, we conclude: ⑥ correlated shocking mechanisms are more appropriate to measure the worst-case stability compared to idiosyncratic shocking mechanisms. For visual illustrations of ⑥, see supplemental F IG. S6—S11. 7.5 Phase transition properties of stability Phase transitions are quite common when one studies various topological properties of graphs [10]. The stability measure exhibits several sharp phase transitions for various banking networks and com- STABILITY OF FINANCIAL NETWORKS binations of parameters; see supplemental F IG. S1—S4 for visual illustrations. We discuss two such interesting phase transitions in the following, with an intuitive theoretical explanation for one of them. 7.5.1 Dense homogeneous networks Based on the behavior of ξ with respect to (Φ − γ ), we observe that, for smaller value of K and for denser ER and SF networks under either coordinated or idiosyncratic shocks, there is often a sharp decrease of stability when γ was decreased beyond a particular threshold value. For example, with Φ = 0.5 and K = 0.1, 100-node dense (average degree 6) SF and ER homogeneous networks exhibited more than ninefold increase in ξ around γ = 0.15 and γ = 0.1, respectively; see supplemental F IG. S1 for visual illustrations. the global extent of such a sharp decrease at a threshold value of γ in the range  To investigate  0.05, 0.2 , we computed, for each of the five homogeneous network types under coordinated shocks E and for each values of the parameters |V |, Φ , I and K , , the ratio     max ξ − min ξ 0.056γ 60.2 E 0.056γ 60.2   Λ n, Φ , , K = I max ξ − ξ min entire range of γ entire range of γ that provides the maximum percentage of the total change of the vulnerability index that occurred within  E this narrow range of γ . The values of Λ n, Φ , I , K for the dense ER and SF homogeneous networks under coordinated shocks are shown in Table 10 for Φ = 0.5, 0.8 and K = 0.1, 0.2, 0.3, 0.4, 0.5 (the behaviour of ξ is similar for other intermediate values of Φ ). If the growth of ξ with respect to γ was 0.2−0.05 = 0.375; uniform or near uniform over the entire range of γ , Λ would be approximately λ = 0.45−0.05 thus, any value of Λ significantly higher than λ indicates a sharp transition within the above-mentioned range of values of γ . As Table 10 shows, a significant majority of the entries for Φ 6 0.8 and κ 6 0.2 are 2 λ or more. 7.5.2 Homogeneous in-arborescence networks Homogeneous in-arborescence networks under coorE dinated shocks exhibited a sharp increase in stability as the ratio I of the total external asset to the total interbank exposure the system is increased beyond a particular threshold provided the equity to asset ratio γ was approximately Φ/2. For example, for a 50-node homogeneous in-arborescence   network E ∈ 0.75, 1 , K = 0.1, under coordinated shock, ξ exhibited a sharp decrease from 0.76 to 0.18 for I Φ = 0.5 and γ = 0.25 = Φ/2; see supplemental F IG. S4 for a visual illustration. E in the Toinvestigate the global extent of such a sharp decrease of ξ around a threshold value of I  Φ range 0.5, 1 with γ ≈ /2, we computed, for each type of shocking mechanism, and for each values of the parameters n, Φ , γ ≈ Φ/2, and κ of the homogeneous in-arborescence network, the ratio   ξ max ξ − min ∆ (n, Φ , γ , K ) = E 61 0.56 I max entire range of E  ξ − E 61 0.56 I min entire range of E  ξ that provides the maximum percentage of the total change of the vulnerability index that occurred within E . If the growth of ξ with respect to E/I was uniform or near uniform over the entire this range of I E 1−0.5 range of I , ∆ would be approximately δ = 3.5−0.25 ≈ 0.16; thus, any value of ∆ significantly higher than δ indicates a sharp transition within the above-mentioned range of E/I . As Table 11 shows, when γ = Φ/2 a significant majority of the entries are coordinated shocks and many entries under idiosyncratic shocks are at least 2 δ . DASGUPTA AND KALIGOUNDER max 0.056γ 60.2 Table 10. Values of Λ (n, Φ ,E/I,K ) = max entire range of γ    ξ − 0.056γ 60.2 ξ − entire range of γ min min ξ  ξ for homogeneous dense ER and SF networks under coordinated shocks. Entries that are at least 2 × 0.375 are shown in boldface. Φ = 0.5 E/I |V | ER average degree 6 K = K = K = SF average degree 6 K = 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.79 0.77 0.79 0.83 0.81 0.99 0.98 0.97 0.95 0.93 0.81 0.77 0.77 0.74 0.7 0.95 0.9 0.85 0.78 0.72 0.8 0.79 0.81 0.77 0.77 0.99 0.97 0.95 0.92 0.9 0.84 0.81 0.79 0.76 0.72 0.95 0.86 0.79 0.71 0.66 300 0.93 0.89 0.86 0.83 0.81 0.98 0.96 0.93 0.9 0.88 0.83 0.8 0.79 0.76 0.71 0.89 0.79 0.71 0.63 0.59 50 0.79 0.77 0.79 0.83 0.81 0.99 0.98 0.97 0.95 0.93 0.83 0.78 0.78 0.74 0.68 0.95 0.89 0.84 0.78 0.72 0.65 0.25 100 0.5 100 0.8 0.79 0.81 0.77 0.77 0.99 0.97 0.95 0.92 0.9 0.83 0.81 0.79 0.76 0.71 0.94 0.85 0.78 0.71 300 0.93 0.89 0.86 0.83 0.81 0.98 0.96 0.93 0.9 0.88 0.83 0.81 0.79 0.76 0.7 0.88 0.78 0.7 0.63 0.61 50 0.79 0.77 0.79 0.83 0.81 0.99 0.98 0.97 0.95 0.93 0.84 0.78 0.77 0.73 0.67 0.95 0.89 0.83 0.77 0.71 0.65 0.75 100 0.8 0.79 0.81 0.77 0.77 0.99 0.97 0.95 0.92 0.9 0.83 0.82 0.8 0.76 0.71 0.94 0.85 0.77 0.7 300 0.93 0.89 0.86 0.83 0.81 0.98 0.96 0.93 0.9 0.88 0.83 0.8 0.78 0.74 0.69 0.9 0.77 0.69 0.63 0.61 50 0.78 0.77 0.78 0.79 0.79 0.99 0.96 0.93 0.88 0.82 0.83 0.79 0.78 0.72 0.67 0.95 0.89 0.83 0.76 0.69 100 0.8 0.8 0.8 0.8 0.78 0.98 0.93 0.87 0.81 0.75 0.83 0.81 0.8 0.76 0.7 0.95 0.83 0.74 0.66 0.61 300 0.87 0.82 0.83 0.81 0.77 0.97 0.91 0.87 0.81 0.75 0.82 0.79 0.78 0.74 0.69 0.86 0.71 0.61 0.57 0.55 50 0.78 0.77 0.78 0.79 0.79 0.99 0.96 0.93 0.88 0.82 0.84 0.79 0.79 0.73 0.67 0.95 0.89 0.83 0.76 0.69 0.61 1.25 100 0.8 0.8 0.8 0.8 0.78 0.98 0.93 0.87 0.81 0.75 0.83 0.82 0.8 0.76 0.7 0.95 0.83 0.74 0.67 300 0.87 0.82 0.83 0.81 0.77 0.97 0.91 0.87 0.81 0.75 0.83 0.8 0.78 0.74 0.68 0.86 0.7 0.63 0.59 0.56 50 0.78 0.77 0.78 0.79 0.79 0.99 0.96 0.93 0.88 0.82 0.84 0.8 0.79 0.72 0.65 0.94 0.89 0.83 0.76 0.69 0.62 1.5 100 0.8 0.8 0.8 0.8 0.78 0.98 0.93 0.87 0.81 0.75 0.83 0.81 0.79 0.74 0.68 0.94 0.81 0.72 0.67 300 0.87 0.82 0.83 0.81 0.77 0.97 0.91 0.87 0.81 0.75 0.82 0.8 0.77 0.73 0.67 0.85 0.69 0.62 0.59 0.56 50 0.78 0.77 0.78 0.79 0.79 0.99 0.96 0.93 0.88 0.82 0.83 0.78 0.78 0.72 0.65 0.94 0.89 0.82 0.76 0.69 0.63 1.75 100 2 SF average degree 6 0.1 50 1 Φ = 0.8 ER average degree 6 0.8 0.8 0.8 0.8 0.78 0.98 0.93 0.87 0.81 0.75 0.83 0.8 0.78 0.74 0.66 0.93 0.81 0.73 0.67 300 0.87 0.82 0.83 0.81 0.77 0.97 0.91 0.87 0.81 0.75 0.82 0.8 0.77 0.72 0.66 0.83 0.68 0.61 0.6 0.59 50 0.79 0.77 0.76 0.77 0.76 0.99 0.95 0.89 0.83 0.77 0.83 0.79 0.78 0.72 0.65 0.94 0.89 0.8 0.72 0.64 0.6 100 0.8 0.84 0.8 0.78 0.76 0.98 0.89 0.81 0.71 0.69 0.82 0.79 0.77 0.72 0.64 0.93 0.78 0.69 0.65 300 0.85 0.83 0.8 0.78 0.75 0.95 0.88 0.79 0.72 0.61 0.81 0.79 0.77 0.71 0.65 0.81 0.64 0.59 0.58 0.57 50 0.79 0.77 0.76 0.77 0.76 0.99 0.95 0.89 0.83 0.77 0.83 0.79 0.78 0.72 0.65 0.94 0.88 0.8 0.72 0.63 0.6 2.25 100 0.8 0.84 0.8 0.78 0.76 0.98 0.89 0.81 0.71 0.69 0.83 0.8 0.77 0.7 0.62 0.93 0.78 0.7 0.65 300 0.85 0.83 0.8 0.78 0.75 0.95 0.88 0.79 0.72 0.61 0.82 0.8 0.77 0.71 0.64 0.8 0.65 0.6 0.6 0.56 50 0.79 0.77 0.76 0.77 0.76 0.99 0.95 0.89 0.83 0.77 0.82 0.78 0.78 0.71 0.64 0.94 0.87 0.77 0.69 0.61 0.58 2.5 100 0.8 0.84 0.8 0.78 0.76 0.98 0.89 0.81 0.71 0.69 0.81 0.8 0.76 0.69 0.6 0.92 0.77 0.69 0.63 300 0.85 0.83 0.8 0.78 0.75 0.95 0.88 0.79 0.72 0.61 0.82 0.8 0.76 0.69 0.62 0.79 0.63 0.59 0.59 0.56 50 0.79 0.77 0.76 0.77 0.76 0.99 0.95 0.89 0.83 0.77 0.8 0.77 0.77 0.69 0.61 0.94 0.87 0.76 0.66 0.59 0.58 2.75 100 0.8 0.84 0.8 0.78 0.76 0.98 0.89 0.81 0.71 0.69 0.81 0.79 0.75 0.68 0.6 0.92 0.77 0.69 0.63 300 0.85 0.83 0.8 0.78 0.75 0.95 0.88 0.79 0.72 0.61 0.81 0.8 0.75 0.69 0.61 0.78 0.63 0.6 0.6 0.56 50 0.78 0.79 0.79 0.76 0.72 0.98 0.94 0.86 0.77 0.7 0.8 0.78 0.76 0.69 0.59 0.94 0.87 0.76 0.66 0.58 0.56 100 0.79 0.81 0.8 0.77 0.73 0.98 0.87 0.73 0.68 0.63 0.8 0.78 0.74 0.66 0.57 0.92 0.77 0.69 0.63 300 0.87 0.8 0.78 0.75 0.71 0.94 0.84 0.72 0.61 0.58 0.81 0.79 0.75 0.68 0.6 0.77 0.62 0.61 0.6 0.55 50 0.78 0.79 0.79 0.76 0.72 0.98 0.94 0.86 0.77 0.7 0.8 0.79 0.76 0.68 0.57 0.94 0.88 0.75 0.65 0.55 3.25 100 0.79 0.81 0.8 0.77 0.73 0.98 0.87 0.73 0.68 0.63 0.81 0.79 0.74 0.65 0.55 0.92 0.77 0.69 0.62 0.53 300 0.87 0.8 0.78 0.75 0.71 0.94 0.84 0.72 0.61 0.58 0.81 0.79 0.74 0.67 0.58 0.77 0.61 0.61 0.59 0.52 50 0.78 0.79 0.79 0.76 0.72 0.98 0.94 0.86 0.77 0.7 0.81 0.78 0.75 0.67 0.55 0.94 0.87 0.75 0.64 0.54 3.5 100 0.79 0.81 0.8 0.77 0.73 0.98 0.87 0.73 0.68 0.63 0.81 0.79 0.73 0.64 0.54 0.92 0.76 0.69 0.62 0.52 300 0.87 0.8 0.78 0.75 0.71 0.94 0.84 0.72 0.61 0.58 0.81 0.78 0.73 0.65 0.56 0.76 0.61 0.61 0.59 0.52 3 STABILITY OF FINANCIAL NETWORKS max 0.56E/I61 Table 11. Values of ∆ (n, Φ , γ ,K ) = max entire range of E   ξ − min ξ 0.56E/I61   min ξ − ξ for homogeneous in-arborescence networks. Entries entire range of E that are at least 2 × 0.16 are shown in boldface black. Entries that are at least Φ = 0.5 Φ = 0.6 |V | = 50 Φ = 0.7 Φ = 0.8 Φ = 0.9 Φ = 0.5 Φ = 0.6 Coordinated shock |V | = 100 Φ = 0.7 Φ = 0.8 Φ = 0.9 Φ = 0.5 Φ = 0.6 |V | = 300 Φ = 0.7 Φ = 0.8 Φ = 0.9 Φ = 0.5 Φ = 0.6 |V | = 50 Φ = 0.7 Φ = 0.8 Φ = 0.9 Φ = 0.5 Φ = 0.6 Idiosyncratic shock |V | = 100 Φ = 0.7 Φ = 0.8 Φ = 0.9 Φ = 0.5 Φ = 0.6 |V | = 300 Φ = 0.7 Φ = 0.8 Φ = 0.9 γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ 3 2 × 0.16 are shown in boldface gray. ←K → = 0.25 = 0.3 = 0.3 = 0.35 = 0.35 = 0.4 = 0.4 = 0.45 = 0.45 = 0.5 = 0.25 = 0.3 = 0.3 = 0.35 = 0.35 = 0.4 = 0.4 = 0.45 = 0.45 = 0.5 = 0.25 = 0.3 = 0.3 = 0.35 = 0.35 = 0.4 = 0.4 = 0.45 = 0.45 = 0.5 = 0.25 = 0.3 = 0.3 = 0.35 = 0.35 = 0.4 = 0.4 = 0.45 = 0.45 = 0.5 = 0.25 = 0.3 = 0.3 = 0.35 = 0.35 = 0.4 = 0.4 = 0.45 = 0.45 = 0.5 = 0.25 = 0.3 = 0.3 = 0.35 = 0.35 = 0.4 = 0.4 = 0.45 = 0.45 = 0.5 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.87 1.00 0.86 1.00 0.49 0.51 0.48 0.34 0.42 0.45 0.47 0.38 0.94 1.00 0.84 0.99 0.52 0.37 0.59 0.32 0.47 0.43 0.54 0.37 0.94 1.00 0.33 0.83 1.00 0.52 0.37 0.64 0.83 1.00 0.52 0.37 0.65 0.83 1.00 0.52 0.37 0.65 0.83 1.00 0.52 0.37 0.65 0.83 1.00 0.52 0.37 0.65 0.83 1.00 0.52 0.37 0.65 0.29 0.29 0.29 0.29 0.29 0.29 0.47 0.41 0.56 0.34 0.93 1.00 0.47 0.40 0.56 0.32 0.93 1.00 0.47 0.40 0.56 0.32 0.93 1.00 0.47 0.40 0.56 0.32 0.93 1.00 0.47 0.40 0.56 0.32 0.93 1.00 0.47 0.40 0.56 0.32 0.93 1.00 0.31 0.30 0.29 0.29 0.29 0.29 0.29 0.28 0.57 0.44 0.49 0.46 0.56 0.47 0.94 1.00 0.67 0.42 0.54 0.47 0.66 0.48 0.94 1.00 0.69 0.42 0.53 0.48 0.67 0.47 0.93 1.00 0.32 0.69 0.42 0.53 0.48 0.67 0.47 0.93 1.00 0.32 0.69 0.42 0.53 0.48 0.67 0.47 0.93 1.00 0.32 0.69 0.42 0.53 0.48 0.67 0.47 0.93 1.00 0.32 0.69 0.42 0.53 0.48 0.67 0.47 0.93 1.00 0.32 0.69 0.42 0.53 0.48 0.67 0.47 0.93 1.00 0.27 0.14 0.29 0.16 0.25 0.14 0.25 0.14 0.25 0.14 0.25 0.14 0.25 0.14 0.25 0.14 0.53 0.36 0.47 0.43 0.53 0.44 0.95 0.95 0.37 0.61 0.34 0.50 0.42 0.60 0.44 0.95 0.93 0.32 0.62 0.33 0.50 0.40 0.61 0.43 0.76 0.99 0.47 0.62 0.33 0.50 0.40 0.61 0.43 0.37 0.33 0.62 0.33 0.50 0.40 0.61 0.43 0.62 0.33 0.50 0.40 0.61 0.43 0.62 0.33 0.50 0.40 0.61 0.43 0.08 0.07 0.11 0.23 0.12 0.15 0.06 0.09 0.17 0.07 0.04 0.27 0.12 0.03 0.13 0.08 0.20 0.13 0.30 0.04 0.25 0.21 0.27 0.21 0.24 0.62 0.33 0.50 0.40 0.61 0.43 0.77 0.76 0.48 0.38 0.98 0.99 0.96 1.00 0.98 0.95 0.04 0.03 0.02 0.02 0.03 0.03 0.04 0.05 0.15 0.04 0.11 0.1 0.03 0.06 0.07 0.15 0.3 0.29 0.09 0.16 0.07 0.14 0.07 0.10 0.96 0.99 0.44 1.00 1.00 0.99 0.98 0.03 0.04 0.06 0.03 0.04 0.04 0.05 0.05 0.12 0.03 0.08 0.06 0.09 0.17 0.08 0.07 0.25 0.29 0.25 0.16 0.15 0.08 0.10 0.08 0.17 0.10 0.16 0.26 0.06 0.10 0.06 0.05 0.08 0.08 0.07 0.04 0.16 0.23 0.14 0.04 0.08 0.05 0.08 0.05 0.07 0.05 0.27 0.27 0.27 0.30 0.24 0.33 0.24 0.28 0.95 0.98 0.39 0.32 0.39 0.36 0.36 0.37 0.39 0.37 0.93 0.99 0.39 0.31 0.40 0.34 0.38 0.39 0.40 0.39 0.95 0.95 0.08 0.08 0.08 0.04 0.05 0.02 0.09 0.08 0.27 0.24 0.26 0.17 0.12 0.17 0.03 0.12 0.67 0.71 0.21 0.27 0.13 0.06 0.10 0.19 0.12 0.10 0.37 0.31 0.08 0.30 0.23 0.11 0.07 0.17 0.10 0.07 0.03 0.17 0.13 0.12 0.07 0.09 0.14 0.08 0.98 0.96 1.00 1.00 0.69 0.69 0.36 0.36 0.03 0.01 0.13 0.09 0.12 0.11 0.11 0.10 0.21 0.15 0.17 0.11 0.14 0.15 0.18 0.21 0.12 0.08 0.14 0.10 0.12 0.17 0.14 0.11 0.14 0.04 0.05 0.08 0.11 0.09 0.02 0.09 0.33 0.01 0.13 0.04 0.13 0.10 0.13 0.35 0.39 0.24 0.07 0.09 0.08 0.05 0.02 0.10 0.16 0.07 0.22 0.06 0.10 0.05 0.06 0.08 0.09 0.02 0.16 0.12 0.12 0.07 0.07 0.02 0.04 0.04 0.03 0.04 0.13 0.11 0.06 0.14 0.04 0.17 0.06 0.03 0.11 0.16 0.10 0.05 0.03 0.02 0.03 0.08 0.06 0.07 0.06 0.08 0.09 0.02 0.02 0.05 0.04 0.04 0.01 DASGUPTA AND KALIGOUNDER Formal intuition A formal intuition behind such a sharp decrease of ξ can be provided as follows. L EMMA 7.6 (see Section F of the appendix for a proof) Fix γ , Φ , I , a homogeneous in-arborescence network G and assume that γ ≈ Φ/2. Consider any node v ∈ V✖ with deg in (v) > 1, suppose that v fails due to the initial shock. Let u be any node such that u is a “leaf node” (i.e., deg in (u) = 0), and (u, v) ∈ E. Then, as the total external asset E of the network is varied, there exists a threshold value Eτ (u) such that • if E < Eτ (u) then u will become insolvent, but • if E > Eτ (u) then u will not become insolvent at any time t > 1, and the shock will not propagate any further through u. The next lemma provides a lower bound, using the degree distributions of the Barábasi-Albert preferential-attachment model [8], on the expected value of the number of leaves in a random inarborescence network for which Lemma 7.6 can be applied. L EMMA 7.7 (see Section G of the appendix for a proof) Consider a random in-arborescence G = (V, E) generated by the Barábasi-Albert preferential-attachment algorithm [8] as outlined in Section 6.1 and let n   o Vb = u ∈ V deg in (u) = 0 ∧ ∃ v : deg in(v) > 1 ∧ (u, v) ∈ E h i n 11 b > − . Then, E V 8 8 Let ξ (E ) be the value of ξ parameterized by E (keeping all other parameters unchanged), and let n o Eτmin = min Eτ (u) deg in(u) = 0, (u, v) ∈ E and deg in(v) > 1 o n Eτmax = max Eτ (u) deg in (u) = 0, (u, v) ∈ E and deg in (v) > 1 It then follows that E [ξ (Eτmin )] − E [ξ (Eτmax )] > n 8 − 11 1 8 ≈ n 8 and ξ (E ) exhibits a sharp decrease around the range [Eτmin , Eτmax ]. In practice, the extent of this decrease is expected to be much more than the pessimistic lower bound of 1/8, as our simulation results clearly show. 8. Concluding remarks In this paper, we have initiated a methodology for systematic investigation of the global stabilities of financial networks that arise in OTC derivatives market and elsewhere. Our results can be viewed as a much needed beginning of a systematic investigation of these issues, with future research works concentrating on further improving the network model, the stability measure and parameter choices. STABILITY OF FINANCIAL NETWORKS Acknowledgment This work partially supported by NSF grant IIS-1160995. R EFERENCES 1. ACEMOGLU D., O ZDAGLAR A. & TAHBAZ -S ALEHI A. (2013). Systemic risk and stability in financial networks. working paper. 2. A LLEN F. & BABUS A. (2009). Networks in Finance, in: Network-based Strategies and Competencies, Kleindorfer P., Wind J. (Eds.), Wharton School Publishing, 367-382. 3. A LLEN F. & G ALE D. (2000). Financial Contagion. Journal of Political Economy, 108 (1), 1–33. 4. A LON N. & S PENCER J. H. (1992). The Probabilistic Method. John Wiley & Sons, Inc. 5. A MINI H., C ONT R. & M INCA A. (2011). Resilience to contagion in financial networks, arXiv:1112.5687v1. 6. BABUS A. (2007a). The Formation of Financial Networks, Tinbergen Institute Discussion Paper No. 2006093/2; FEEM Working Paper No. 69.2007. 7. BABUS A. (2007b). Contagion Risk in Financial Networks, in: Financial Development, Integration and Stability, Liebscher K., Christl J., Mooslechner P., Ritzberger-Grunwald D. (Eds.), Edward Elgar Pub, 423–440. 8. BAR ÁBASI A.-L. & A LBERT R. (1999). Emergence of Scaling in Random Networks. Science, 286, 509–512. 9. B ERMAN P., DAS G UPTA B., K ALIGOUNDER L. & K ARPINSKI M. (2013). On Systemic Stability of Banking Networks, Algorithmica, in press. 10. B OLLOB ÁS B. (2001). Random Graphs. Cambridge University Press. 11. B OLLOB ÁS B., B ORGS C., C HAYES T. & R IORDAN O. (2003). Directed scale-free graphs, in: 14th ACMSIAM Symposium on Discrete Algorithms, Society for Industrial and Applied Mathematics, Philadelphia, PA, 132-139. 12. B ORODIN A. & E L -YANIV R. (1998). Online Computation and Competitive Analysis, Cambridge University Press. 13. B ORODIN A., F ILMUS Y. & O REN J. (2010). Threshold models for competitive influence in social networks, 6th international conference on Internet and network economics, Springer-Verlag Berlin, Heidelberg, 539– 550. 14. C ALABRIA M. A. (2009). Did Deregulation Cause the Financial Crisis?, Cato Institute. 15. C ALLAWAY D. S., N EWMAN M. E. J., S TROGATZ S. H. & WATTS D. J. (2000). Network robustness and fragility: percolation on random graphs. Physical Review Letters, 85, 5468–5471. 16. C ASTIGLIONESI F. & NAVARRO B. (2007). Optimal Fragile Financial Networks. Tilburg University Discussion Paper no. 2007-100 (Tilburg, The Netherlands: Tilburg University). 17. C HEN N. (2008). On the approximability of influence in social networks, in: 19th ACM-SIAM Symposium on Discrete Algorithms, Society for Industrial and Applied Mathematics, Philadelphia, PA, 1029–1037. 18. C HEN W., WANG Y. & YANG S. (2009). Efficient influence maximization in social networks, in: 15th ACM SIGKDD international conference on Knowledge discovery and data mining, Association for Computing Machinery, New York, 199–208. 19. C OELHO F. C., C RUZ O. G. & C ODEO C. T. (2008). Epigrass: a tool to study disease spread in complex networks. Source Code for Biology and Medicine, 3 (3), 2008. 20. C ONT R. (2010). Credit default swaps and financial stability. Finacial Stability Review (Banque de France), 14, 35–43. 21. C ONT R., M OUSSA A. & S ANTOS E. B. (2010). Network Structure and Systemic Risk in Banking Systems. Working paper. 22. C ORBO J. & D EMANGE G. (2010). in: 3rd Financial Risks International Forum, Paris, France. 23. DASGUPTA B. (2004). Capital Accumulation in the Presence of Informal Credit Contracts: Does the Incentive Mechanism Work Better than Credit Rationing Under Asymmetric Information?, Working papers 2004-32, University of Connecticut, Department of Economics. 24. D IAMOND D. W. & DYBVIG P. H. (1983). Bank runs, deposit insurance and liquidity. Journal of Political Economy, 91, 401–419. DASGUPTA AND KALIGOUNDER 25. E BOLI M. (2004). Systemic Risk in Financial Network: a Graph Theoretical Approach. Mimeo, Univ. di Chieti, Pescara. 26. E LLIOTT M., G OLUB B. & JACKSON M. O. (2013). Financial networks and contagion. Working paper. 27. E KELUND R. & T HORNTON M. (2008). More Awful Truths About Republicans. Ludwig von Mises Institute. 28. E UBANK S. (2005). Network based models of infectious disease spread. Japanese Journal of Infectious Diseases, 58, S19-S13. 29. E UBANK S., G UCLU H., K UMAR V. S. A., M ARATHE M. V., S RINIVASAN A., T OROCZKAI Z. & WANG N. (2004). Modeling Disease Outbreaks in Realistic Urban Social Networks. Nature, 429, 180–183. 30. F ISHER I. (1933). The Debt-Deflation Theory of Great Depressions. Econometrica, 1, 337–357. 31. F REIXAS X., PARIGI B. M. & ROCHET J.-C. (2000). Systemic risk, interbank relations, and liquidity provision by the central bank. Journal of Money, Credit and Banking, 32 (3), 611–638. 32. F URFINE C. H. (2003). Interbank exposures: Quantifying the risk of contagion. Journal of Money, Credit and Banking, 35 (1), 111–128. 33. G AI P. & K APADIA S. (2010). Contagion in financial networks. Proc. R. Soc. A, 466 (2120), 2401–2423. 34. H ALDANE A. (2009). Why Banks Failed the Stress Test. speech given at the Marcus-Evans Conference on Stress-Testing, 9-10 February 2009 (available at http://www.bankofengland.co.uk/publications/speeches/2009/speech374.pdf). 35. H ALDANE A. G. & M AY R. M. (2011). Systemic risk in banking ecosystems. Nature, 469, 351–355. 36. H ANN J. & K AMBER M. (2000). Data Mining: Concepts and Techniques. Morgan Kaufman Publishers. 37. H ÜBSCH A. & WALTHER U. (2012). The impact of network inhomogeneities on contagion and system stability, CPQF Working Paper Series, No. 32, Frankfurt School of Finance & Management. 38. I AZZETTA C. & M ANNA M. (2009). The Topology of the Interbank Market Developements in Italy Since 1990, Bank of Italy Temi di Discussione (Working Paper) No. 711. 39. I YER R. & P EYDRO J. L. (2010). Interbank Contagion at Work: Evidence from a Natural Experiment. Review of Financial Studies, 24 (4), 1337–1377. 40. J ONES C. M. & Z HIGLJAVSKY A. A. (2004). Approximating the negative moments of the Poisson distribution. Statistics & Probability Letters, 66 (2), 171–181. 41. K EMPE D., K LEINBERG J. & TARDOS E. (2003). Maximizing the spread of influence through a social network, 9th ACM SIGKDD international conference on Knowledge discovery and data mining, Association for Computing Machinery, New York, 137–146. 42. K EYNES J. M. (1936). The General Theory of Employment, Interest, and Money. New York: Harcourt, Brace and Company. 43. K LEINDORFER P. R., W IND Y. & G UNTHER R. E. (2009). The Network Challenge: Strategy, Profit and Risk in an Interlinked World. Pearson Prentice Hall. 44. K NUTH D. E. (1997). The Art of Computer Programming (Fundamental Algorithms), Volume 1, Third Edition, Reading, Massachusetts: Addison-Wesley. 45. L ADLEY D. (2013). Contagion and risk sharing on the inter-bank market, Journal of Economics Dynamics & Control, 37, 1384–1400. 46. L AGUNOFF R. & S CHREFT S. (2001). A Model of Financial Fragility. Journal of Economic Theory, 99 (1-2), 220–264. 47. L IEDORP F. R., M EDEMA L., KOETTER M., KONING R. H. & L ELYVELD I. VAN (2010). Peer monitoring or contagion? Interbank market exposure and bank risk, DNB working paper No. 248. 48. M ARKOSE S., G IANSANTE S., G ATKOWSKI M. & S HAGHAGHI A. R. (2009). Too Interconnected To Fail: Financial Contagion and Systemic Risk In Network Model of CDS and Other Credit Enhancement Obligations of US Banks. Economics Discussion Papers 683, Department of Economics, University of Essex. 49. M AY R. & A RINAMINPATHY N. (2010). Systemic risk: the dynamics of model banking systems. J. R. Soc. Interface, 7, 823–838. 50. M INCA A. (2011). Mathematical modeling of default contagion. PhD thesis, Universite Paris VI (Pierre et Marie Curie). 51. M INOIU C. & R EYES J. A. (2013). A Network Analysis of Global Banking: 1978-2010. Journal of Financial STABILITY OF FINANCIAL NETWORKS Stability (in press). 52. M INSKY H. (1977). A Theory of Systemic Fragility, in: Financial Crises: Institutions and Markets in a Fragile Environment, Altman E. I., Sametz A. W. (Eds.), Wiley. 53. M ISTRULLI P. E. (2007). Assessing financial contagion in the interbank market: Maximum entropy versus observed interbank lending patterns. Bank of Italy Research. 54. M OUSSA A. (2011). Thesis, Columbia University. 55. N IER E., YANG J., YORULMAZER T. & A LENTORN A. (2007). Network models and financial stability. Journal of Economics Dynamics and Control, 31, 2033–2060. 56. O NNELA K.-P., K ASKI K. & K ERT ÉSZ J. (2004). Clustering and information in correlation based financial networks. Eur. Phys. J. B, 38, 353–362. 57. ROZANOV Y. A. (1977). Probability Theory: A Concise Course. Dover Publications, Inc. 58. S ACHS A. (2013). Completeness interconnectedness and distribution of interbank exposures - a parameterized analysis of the stability of financial networks. Quantitative Finance (in press). 59. S ANTOS E. B. & C ONT R. (2010). The Brazilian Interbank Network Structure and Systemic Risk. Working Papers Series 219, Central Bank of Brazil. 60. S ARAM ÄKI J., O NNELA J.-P., K ERT ÉSZ J. & K ASKI K. (2005). Characterizing Motifs in Weighted Complex Networks, in: Science of Complex Networks, Mendes J. F. F. et al. (Eds.). 61. S TAUFFER D. & A HARONY A. (1994). Introduction to Percolation Theory, 2nd edition, CRC Press. 62. S TAUM J. C. & L IU M. (2012). Systemic Risk Components in a Network Model of Contagion. Working paper, Department of Industrial Engineering and Management Sciences, Northwestern University. 63. U PPER C. & W ORMS A. (2004). Estimating bilateral exposures in the german interbank market: Is there a danger of contagion?. European Economic Review, 48 (4), 827–849. 64. Z AWADOWSKI A. (2011). Entangled Financial Systems. Working paper, Boston University School of Management. APPENDIX A. Proof of Lemma 7.1 We will reuse the notations in Definition 6.1. Using Equation (5.1), for every edge (u, v) ∈ E, the amount of shock received by node u at time t = 1 is as follows: • If G is homogeneous then    min Φ deg in(v) − deg out(v) + En − γ deg in (v) + En , deg in(v) E [∆ homo (u)] = deg in(v) ( )  En (Φ − γ ) − Φ deg out (v) = min Φ − γ + ,1 deg in (v) • If G is (α , β )-heterogeneous, then σv = αβ and, using linearity of expectation, we get   !  1 − β I βI  E [bv ] = E  ∑ + 1−α α e e α |E| |E| − α |E| (u,v)∈Ee "  !#  1−β I I in + 1−α = deg (v) E β e e |E| |E| − α |E| DASGUPTA AND KALIGOUNDER   !  !   I I 1 − 1 − β β βI βI  E [bv − ιv ] = E  ∑ − ∑ + 1−α + 1−α α α e e e e α |E| |E| − α |E| α |E| |E| − α |E| (u,v)∈Ee (v,u)∈Ee " "  !#  !#  1−β I  1−β I I I β β = ∑ E − ∑ E + 1−α + 1−α e e e e | E| |E| − α | E| | E| |E| − α |E| e e (u,v)∈E (v,u)∈E " !#   1−β I  I in out β = deg (v) − deg (v) E + 1−α e e |E| |E| − α |E|  min {Φ (bv − ιv + σv E ) − γ (bv + σv E ) , bv } deg in(v)      Φ (bv − ιv + σv E ) − γ (bv + σv E ) bv = min E , E deg in (v) deg in(v)   1 Φ Φ σv E γ γ σv E ι E [b − ] + − E [b ] − , E [b ] = min v v v v deg in(v) deg in (v) deg in(v) deg in (v) deg in(v)      1−β I  Φ σv E + deg = min degΦin (v) deg in (v) − deg out(v) E β Ie + 1 − α in (v) e |E| |E|−α |E|     1−β I γ σv E − degγin (v) deg in(v) E β Ie + 1 − α − deg in (v) , e |E| |E|−α |E|      1−β I E β Ie + 1 − α e |E| |E|−α |E|        1−β I Φ deg in (v)−deg out (v) −γ deg in (v) Φ −γ σv E I = min E β e + 1−α + deg in (v) , e deg in (v) |E| |E|−α |E|      1−β I E β Ie + 1 − α e |E| |E|−α |E|    h i h i Φ deg in (v)−deg out (v) −γ deg in (v) Φ −γ σv E I I > min β E |E| e + deg in (v) , β E |E| e deg in (v)            Φ deg in (v)−deg out (v) −γ deg in (v) Φ −γ E β β > min , αβ α + α deg in (v) deg in (v) h i h i |E| since E Ie = E e = α |E| |E| ( )   Φ − γ E − Φ deg out(v) β > min Φ − γ + ,1 α deg in(v) E [∆ hetero (u)] = E >  β E [∆ homo (u)] α STABILITY OF FINANCIAL NETWORKS B. Proof of Lemma 7.2 Using standard probabilistic calculations, we get   n−1 i n−1 π2 1 1 h in E deg ave deg (v) > 0 = ∑ Pr deg in (v) = k = C ∑ k−4 ≈ C ζ (4) ≈ in deg (v) 15 k=1 k=1 k  h i 2   h i2 n−1  Var deg in(v) = E deg in (v) − E deg in (v) = ∑ k2 Ck−3 − (deg ave )2 k=1 n−1 1 6 deg ave 6 deg ave = C ∑ − (deg ave )2 ≈ ln n − (deg ave )2 ≈ ln n 2 π π2 k=1 k C. Proof of Lemma 7.3 Let D = ∑ deg in(v) + ∑ deg out(v). By linearity of expectation, we have v∈Ve v∈Ve E [D] = 2 ∑E v∈Ve h i deg in(v) = 2 α n deg ave and similarly, since deg in(v) is independent of any other deg in(u) for u 6= v, we have h i 12 deg ave Var [D] = 2 ∑ Var deg in(v) ≈ α n ln n 2 π e v∈V Thus, via Chebyschev’s inequality [4, page 37], for any positive λ we have   q h i p 12 deg ave 1 Pr | D − E [D] | > λ Var [D] 6 λ 2 ≡ Pr | D − 2 α n deg ave | ' λ α n ln n 6 π2 q  π 2 ln n 12 α gives Pr | D 2 α n deg ave. Since D2 6 | Ee | 6 D, Setting λ = 1 λ2  √ 12 α and thus w.h.p. D ≈ n deg ave ln n 6 2 π ln n it now follows that h i α n deg ave 6 E | Ee | 6 2 α n deg ave − 2 α n deg ave | ' | Ee | 6 2 α n deg ave w.h.p. α n deg ave 6 i h i e = α . For notational convenience, let Ee1 be a random subset Also, note that Pr (u, v) ∈ Ee = Pr v ∈ V e of edges from the edges in Ee as used in Definition 6.1. This implies that of α |E| h i h i βI   h i I −β I hetero e E c1 = Pr (u, v) ∈ E1 + 1 − Pr (u, v) ∈ Ee1 α | Ee | |E| − α | Ee | h i βI   h i I − β I + 1 − α Pr (u, v) ∈ Ee = α Pr (u, v) ∈ Ee α | Ee | |E| − α | Ee |    βI I −β I + 1 − α2 = α2 α | Ee | |E| − α | Ee |  (1 − β ) n deg ave β n deg ave ⇒ w.h.p. α 2 + 1 − α2 2 α n deg ave n deg ave − α n deg ave h DASGUPTA AND KALIGOUNDER i h  β n deg ave (1 − β ) n deg ave 6 α2 + 1 − α2 6 E chetero 1 α n deg ave n deg ave − 2 α n deg ave  h i 1 − α 2 (1 − β ) αβ hetero + (1 + α ) (1 − β ) 6 E c1 6αβ+ 2 1 − 2α i 1 + α β − α2 − β − α2 β h αβ 1+α −β − 6 6 E chetero 1 2 1 − 2α ≡ w.h.p. ≡ w.h.p. D. Proof of Lemma 7.4 i n−1 h   n−1 E deg1in (v) = ∑ 1k Pr deg in (v) = k = ∑ 1k e−deg ave k=1 k=1 (deg ave )k . k! It is easy to see that extending the finite series to an infinite series does not change the asymptotic value of the series since ∞ 1 −deg ave (deg ave )k n−1 1 −deg ave (deg ave )k e − ∑ e k! k! k=1 k k=1 k k ∞ (deg ) ave ∑ 1k e−deg ave k! k=n k e−deg ave ∞ (deg ave ) ∑ k=n n k!  −deg ave     e (deg ave )n x max {e } 06x6deg ave n n!  −deg ave    e (deg ave )n edeg ave n n! (deg ave )n n (n!) ∑ = 6 6 = = (deg ave )n n→∞ n (n!) and lim n−1 ∑ k=1 using the Lagrange remainder term for the Maclaurin series expansion of edeg ave ∞ because deg ave is a constant independent of n. Thus, we can conclude that ∑ k=1 k 1 −deg ave (deg ave ) . ke k! 1 −deg ave (deg ave )k ke k! It now follows that   ∂ ∂ ∞ 1 −d d k 1 deg = d ≈ E ave ∑ k e k! in ∂d deg (v) ∂ d k=1 = e−d ∞ e−d d k−1 ∑ k! = d k=1  1 − e−d dk e−d  d = e − 1 = ∑ d d k=1 k! ∞ This proves one of the claims in the lemma. To prove the other claim, using a well-known approximation on the first inverse moment of Poisson’s distribution [40, page 173] we have ∞ ∑ k=1 1 −deg ave (deg ave)k ⌊3 deg ave +10⌋ 1 −deg ave (deg ave )k e − < 10−10 ∑ ke k k! k! k=1 and therefore we obtain n−1 1 ∑ k e−deg ave k=1 (deg ave )k ⌊3 deg ave +10⌋ 1 −deg ave (deg ave )k − / 10−10 ∑ ke k! k! k=1 ≈ STABILITY OF FINANCIAL NETWORKS E. Proof of Lemma 7.5 Let D = ∑v∈Ve deg in(v) + ∑v∈Ve deg out(v). We can reuse the proof of Lemma 7.3 provided we show that E [D] = 2 α n deg ave and w.h.p. D ≈ 2 α n deg ave. By linearity of expectation, we have E [D] =     deg ave in in 2 ∑v∈Ve E deg (v) = 2 α n deg ave , and similarly Var [D] = 2 ∑v∈Ve Var deg (v) = 2 α n 1− n−1 deg ave ≈ 2 α n deg ave. Thus, via Chebyschev’s inequality, for any positive λ we have i h i h p p 1 1 Pr | D − E [D] | > λ Var [D] 6 2 ≡ Pr | D − 2 α n deg ave | ' λ 2 α n deg ave 6 2 λ λ q n Setting λ = ln 2 α gives i 2α h p Pr | D − 2 α n deg ave | ' n deg ave ln n 6 ln n and thus w.h.p. D ≈ 2 α n deg ave. F. Proof of Lemma 7.6 The amount of shock µ transmitted from v to u is given by     deg out(v) E +Φ ,1 µ = min (Φ − γ ) 1 + n deg in(v) deg in (v) out out Since G n is an in-arborescence, deg   o(v) 6 1. First, consider the case of deg (v) = 0. In this case, µ = min (Φ − γ ) 1 + n degEin (v) , 1 and thus we have     E E cu (1) = cu (0) − µ = γ − min (Φ − γ ) 1 + ,1 n n deg in(v) Assuming γ ≈ Φ/2, we have     E E in ,1 cu (1) ≈ γ + deg (u) − min γ 1 + n n deg in(v)     E E E = min γ , γ −1 −1− n n deg in(v) n There are two cases to consider:   • If γ En − 1 − n degEin (v) > γ cu (1) ≈ γ Thus, if E > Eτ1 (u) =  E n − 1 then E E −1− n n deg in(v) n 1− 1 deg in (v)  =γ  E n  1−   1 −1 deg in (v) then cu (1) would be strictly positive, the node u will not become insolvent at time t = 1, but if E < Eτ1 (u) then cu (1) would be strictly negative and u would fail. DASGUPTA AND KALIGOUNDER • Otherwise, cu (1) ≈ γ En − 1. Thus, if E > Eτ2 (u) = En then cu (1) would be strictly positive, the node u will not become insolvent at time t = 1, but if E < Eτ1 (u) then cu (1) would be strictly negative and u would fail. A similar analysis may be carried out if deg out(v) = 1 leading to slightly two different threshold values, say Eτ3 (u) and Eτ4 (u). Since deg out(u) = 1, if u does not become insolvent at time t = 1 then it does not become insolvent for any t > 1 as well. G. Proof of Lemma 7.7 Let r be the root node of G. Note that, for any node u ∈ V \ {r}, deg out(u)  = 1. Thus, using the results in [8], it follows that for any node u ∈ V \ {r}, Pr deg in (u) = k − 1 ∝ 1/k3 and in particular   Pr deg in(u) = 1 6 1/4. For j = 0, 2, . . . , n, let n j be the number of nodes u of G with deg in(u) = j. n n j=0 j=1 Thus, n = ∑ n j , |E| = n − 1 = ∑ j n j , and ∑ u∈V \{r} h i Pr deg in (u) = 1 6 E [n1 ] 6 1 + ≡ ∑ u∈V\{r} h i Pr deg in (u) = 1 n−1 n−1 n−1 6 E [n1 ] 6 1 + ≡ E [n1 ] = + t for some t ∈ [0, 1] 4 4 4 n Letting n>1 = ∑ n j , we have j=2 E [n0 + n>1] = n − E [n1 ] = E " n ∑ jnj j=1 # 3n + 1 −t 4 = n − 1 ≡ E [n1 ] + E " n ∑ jnj j=2 # = n−1 ≡ E [n1 ] + 2 E [n>1 ] 6 n − 1 ⇒ E [n>1 ] 6 E [n0 ] = n − E [n1 ] − E [n>1 ] > n − h i and hence we can bound E Vb as  n − 1 − 3n+1 n 4t − 5 4 +t = + 2 8 8    n 7 3t n 4t − 5 n−1 = + − +t − + 4 8 8 8 8 2   o i deg in(u) = 0 ∧ ∃ v : deg in(v) = 1 ∧ (u, v) ∈ E     n−1 n 9 5t n 11 n 7 3t + − +t = + − > − − > E [n0 ] − E [n1 ] > 8 8 2 4 8 8 2 8 8 h i h n b = E [n0 ] − E E V u ∈V STABILITY OF FINANCIAL NETWORKS Supplementary documents follow Supplementary Table S1—Table S9 Supplementary color figures F IG. S1—F IG. S11 DASGUPTA AND KALIGOUNDER Table S1. Residual instabilities of homogeneous versus heterogeneous networks under idiosyncratic shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 idiosyncratic shock Φ = 0.5, γ = 0.45 Φ = 0.5, γ = 0.40 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 26% 58% 75% 76% 78% 82% 99% 100% 100% 43% 84% 100% 100% 100% 100% 100% 100% 100% 42% 100% 100% 23% 70% 88% 100% 100% 100% 100% 100% 100% 1% 2% 15% 0% 1% 10% 0% 1% 8% 0% 2% 16% 7% 10% 21% 2% 7% 14% 0% 6% 22% 0% 2% 14% 8% 19% 34% 4% 12% 21% 0% 2% 12% 0% 1% 11% 4% 9% 18% 7% 14% 22% 8% 18% 30% 6% 10% 20% 0% 9% 19% 0% 3% 17% 4% 7% 18% 8% 12% 24% 76% 78% 81% 32% 62% 81% 26% 74% 100% 66% 100% 100% 100% 100% 100% 100% 100% 100% 29% 72% 100% 19% 53% 88% 100% 100% 100% 88% 100% 100% 0% 1% 11% 0% 1% 12% 0% 1% 10% 0% 0% 15% 6% 7% 16% 6% 6% 10% 0% 6% 23% 0% 0% 16% 6% 12% 19% 8% 16% 30% 0% 1% 11% 0% 1% 11% 6% 10% 18% 0% 7% 16% 7% 12% 22% 6% 8% 17% 0% 2% 18% 0% 0% 16% 5% 9% 18% 2% 6% 16% 36% 67% 81% 76% 78% 81% 76% 100% 100% 22% 73% 93% 100% 100% 100% 100% 100% 100% 26% 52% 100% 20% 42% 88% 100% 100% 100% 87% 100% 100% 0% 1% 12% 0% 1% 12% 0% 2% 16% 0% 0% 5% 0% 6% 12% 0% 2% 6% 0% 9% 24% 0% 1% 16% 7% 16% 28% 6% 9% 19% 0% 1% 11% 0% 1% 11% 6% 8% 16% 0% 2% 16% 6% 7% 16% 6% 8% 17% 0% 1% 16% 0% 0% 16% 2% 6% 16% 2% 5% 16% STABILITY OF FINANCIAL NETWORKS Table S2. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 coordinated shock Φ = 0.6, γ = 0.55 Φ = 0.6, γ = 0.50 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 93% 93% 93% 2% 69% 93% 97% 100% 100% 64% 95% 100% 100% 100% 100% 100% 100% 100% 44% 87% 100% 56% 96% 100% 100% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 1% 0% 0% 5% 0% 0% 1% 9% 11% 14% 5% 7% 7% 5% 9% 19% 0% 3% 8% 10% 15% 17% 22% 28% 41% 0% 0% 9% 0% 0% 9% 5% 7% 20% 3% 7% 16% 7% 7% 19% 11% 14% 26% 1% 3% 18% 2% 8% 23% 9% 15% 26% 7% 8% 18% 93% 93% 93% 23% 84% 93% 85% 100% 100% 47% 86% 100% 100% 100% 100% 100% 100% 100% 37% 75% 100% 35% 71% 100% 96% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 0% 0% 1% 7% 0% 0% 3% 7% 7% 7% 7% 7% 9% 0% 0% 5% 0% 1% 9% 10% 15% 21% 7% 7% 11% 0% 0% 9% 0% 0% 9% 0% 7% 17% 0% 5% 16% 7% 7% 16% 7% 7% 19% 1% 3% 15% 0% 1% 13% 7% 9% 18% 7% 7% 17% 93% 93% 93% 79% 93% 93% 48% 85% 100% 93% 100% 100% 100% 100% 100% 100% 100% 100% 28% 56% 97% 28% 56% 97% 100% 100% 100% 93% 100% 100% 0% 0% 0% 0% 0% 0% 0% 1% 7% 0% 0% 3% 7% 7% 7% 3% 7% 7% 0% 0% 11% 0% 0% 3% 7% 7% 18% 7% 7% 7% 0% 0% 9% 0% 0% 9% 1% 7% 17% 1% 5% 16% 7% 7% 16% 7% 7% 16% 0% 1% 13% 0% 0% 13% 7% 7% 16% 7% 7% 16% DASGUPTA AND KALIGOUNDER Table S3. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 coordinated shock Φ = 0.7, γ = 0.65 Φ = 0.7, γ = 0.60 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 35% 88% 93% 93% 93% 93% 97% 100% 100% 81% 100% 100% 100% 100% 100% 100% 100% 100% 56% 96% 100% 52% 96% 100% 100% 100% 100% 100% 100% 100% 0% 1% 7% 0% 0% 0% 0% 0% 1% 0% 0% 5% 10% 13% 16% 7% 7% 9% 7% 12% 25% 1% 4% 9% 26% 32% 49% 14% 15% 21% 0% 0% 10% 0% 0% 9% 3% 7% 17% 5% 8% 21% 13% 18% 30% 7% 7% 20% 3% 9% 25% 1% 3% 19% 8% 9% 19% 9% 16% 28% 93% 93% 93% 31% 93% 93% 62% 97% 100% 85% 100% 100% 100% 100% 100% 100% 100% 100% 37% 75% 100% 37% 75% 100% 100% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 0% 0% 0% 5% 0% 1% 7% 7% 7% 9% 7% 7% 7% 0% 2% 15% 0% 0% 5% 7% 7% 11% 11% 15% 27% 0% 0% 9% 0% 0% 9% 0% 7% 18% 0% 7% 16% 7% 7% 19% 7% 7% 16% 1% 4% 17% 0% 2% 13% 8% 10% 19% 7% 8% 17% 56% 93% 93% 93% 93% 93% 93% 100% 100% 65% 97% 100% 100% 100% 100% 100% 100% 100% 28% 56% 97% 28% 56% 97% 100% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 0% 0% 1% 7% 0% 0% 4% 7% 7% 7% 6% 7% 7% 0% 0% 15% 0% 0% 3% 7% 7% 21% 7% 7% 7% 0% 0% 9% 0% 0% 9% 1% 7% 17% 0% 7% 16% 7% 7% 16% 7% 7% 16% 0% 1% 14% 0% 0% 13% 7% 8% 16% 7% 7% 16% STABILITY OF FINANCIAL NETWORKS Table S4. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 coordinated shock Φ = 0.8, γ = 0.75 Φ = 0.8, γ = 0.70 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 0% 0% 93% 0% 0% 93% 97% 100% 100% 89% 100% 100% 100% 100% 100% 100% 100% 100% 56% 96% 100% 54% 96% 100% 100% 100% 100% 100% 100% 100% 1% 7% 7% 0% 0% 0% 0% 0% 1% 0% 1% 6% 12% 15% 19% 7% 7% 9% 9% 15% 32% 1% 5% 11% 27% 37% 60% 14% 19% 21% 0% 0% 10% 0% 0% 9% 4% 7% 17% 5% 11% 22% 14% 19% 30% 7% 11% 21% 3% 11% 27% 1% 4% 19% 8% 9% 21% 11% 19% 31% 93% 93% 93% 51% 93% 93% 71% 100% 100% 85% 100% 100% 100% 100% 100% 100% 100% 100% 37% 75% 100% 37% 75% 100% 100% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 1% 0% 0% 5% 0% 1% 7% 7% 9% 10% 7% 7% 7% 0% 3% 20% 0% 0% 6% 7% 11% 11% 11% 19% 33% 0% 0% 9% 0% 0% 9% 0% 7% 19% 0% 7% 17% 7% 8% 21% 7% 7% 17% 1% 5% 18% 0% 2% 14% 8% 10% 23% 7% 8% 17% 76% 93% 93% 93% 93% 93% 93% 100% 100% 76% 99% 100% 100% 100% 100% 100% 100% 100% 28% 56% 97% 28% 56% 97% 100% 100% 100% 99% 100% 100% 0% 0% 0% 0% 0% 0% 0% 1% 7% 0% 1% 5% 7% 7% 7% 7% 7% 7% 0% 1% 16% 0% 0% 6% 7% 11% 22% 7% 7% 8% 0% 0% 9% 0% 0% 9% 1% 7% 17% 1% 7% 16% 7% 7% 16% 7% 7% 16% 0% 1% 14% 0% 1% 13% 7% 8% 17% 7% 7% 16% DASGUPTA AND KALIGOUNDER Table S5. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 coordinated shock Φ = 0.9, γ = 0.85 Φ = 0.9, γ = 0.80 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 81% 93% 93% 93% 93% 93% 98% 100% 100% 95% 100% 100% 0% 0% 0% 100% 100% 100% 56% 96% 100% 56% 96% 100% 100% 100% 100% 100% 100% 100% 7% 7% 7% 0% 0% 0% 0% 0% 1% 0% 1% 7% 13% 18% 22% 7% 9% 10% 11% 17% 37% 3% 5% 13% 31% 41% 66% 18% 19% 25% 0% 0% 15% 0% 0% 9% 5% 7% 19% 5% 11% 25% 14% 19% 34% 7% 12% 23% 4% 12% 28% 2% 6% 21% 8% 11% 23% 17% 21% 33% 93% 93% 93% 75% 93% 93% 78% 100% 100% 85% 100% 100% 0% 0% 0% 100% 100% 100% 37% 75% 100% 37% 75% 100% 100% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 1% 0% 0% 6% 0% 1% 7% 7% 9% 10% 7% 7% 7% 1% 4% 25% 0% 1% 7% 7% 11% 15% 14% 22% 41% 0% 0% 9% 0% 0% 9% 0% 7% 21% 0% 7% 17% 7% 8% 23% 7% 7% 17% 1% 5% 19% 1% 3% 15% 9% 11% 23% 7% 9% 17% 93% 93% 93% 93% 93% 93% 0% 0% 100% 85% 99% 100% 0% 0% 0% 100% 100% 100% 28% 56% 97% 28% 56% 97% 100% 100% 100% 100% 100% 100% 0% 0% 0% 0% 0% 0% 0% 1% 7% 0% 1% 6% 7% 7% 7% 7% 7% 7% 0% 1% 17% 0% 0% 10% 7% 11% 24% 7% 7% 10% 0% 0% 9% 0% 0% 9% 1% 7% 17% 1% 7% 16% 7% 7% 16% 7% 7% 17% 0% 1% 14% 0% 1% 13% 7% 8% 17% 7% 7% 16% STABILITY OF FINANCIAL NETWORKS Table S6. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 idiosyncratic shock Φ = 0.6, γ = 0.55 Φ = 0.6, γ = 0.50 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 53% 87% 95% 94% 95% 95% 100% 100% 100% 62% 95% 100% 57% 58% 60% 57% 57% 57% 54% 100% 100% 45% 90% 100% 100% 100% 100% 100% 100% 100% 2% 4% 16% 1% 3% 11% 0% 0% 5% 0% 1% 14% 8% 11% 23% 5% 7% 12% 0% 7% 24% 0% 2% 11% 9% 21% 39% 7% 15% 25% 1% 3% 13% 1% 1% 11% 5% 10% 19% 7% 14% 25% 11% 21% 34% 7% 11% 23% 1% 11% 21% 0% 9% 18% 7% 9% 19% 10% 15% 27% 94% 94% 95% 69% 92% 95% 45% 87% 100% 77% 100% 100% 57% 57% 57% 57% 57% 57% 36% 81% 100% 34% 75% 100% 100% 100% 100% 95% 100% 100% 1% 1% 11% 1% 2% 13% 0% 1% 13% 1% 2% 17% 7% 7% 18% 7% 7% 15% 0% 9% 25% 0% 3% 17% 7% 12% 22% 11% 19% 32% 0% 0% 9% 0% 0% 9% 5% 9% 19% 1% 8% 17% 8% 13% 23% 7% 9% 19% 0% 3% 19% 0% 1% 17% 7% 9% 20% 7% 8% 17% 93% 95% 96% 94% 95% 95% 96% 100% 100% 48% 89% 100% 57% 57% 57% 57% 57% 57% 34% 70% 100% 31% 67% 100% 100% 100% 100% 93% 100% 100% 1% 1% 11% 1% 1% 12% 0% 4% 16% 0% 1% 10% 7% 7% 16% 5% 7% 12% 0% 8% 25% 0% 3% 19% 9% 17% 29% 7% 11% 21% 0% 0% 9% 0% 0% 9% 7% 8% 17% 3% 7% 16% 7% 7% 17% 7% 9% 18% 0% 1% 17% 0% 0% 16% 7% 8% 17% 7% 7% 16% DASGUPTA AND KALIGOUNDER Table S7. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 idiosyncratic shock Φ = 0.7, γ = 0.65 Φ = 0.7, γ = 0.60 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 73% 94% 95% 94% 95% 96% 100% 100% 100% 81% 100% 100% 57% 59% 60% 57% 57% 57% 55% 100% 100% 55% 100% 100% 100% 100% 100% 100% 100% 100% 3% 7% 17% 1% 2% 12% 0% 3% 13% 1% 5% 21% 10% 18% 28% 7% 9% 19% 7% 9% 26% 0% 3% 19% 13% 24% 41% 9% 16% 27% 1% 3% 14% 1% 1% 11% 7% 10% 20% 7% 15% 27% 13% 23% 35% 7% 13% 25% 1% 11% 23% 0% 6% 19% 7% 9% 20% 11% 17% 29% 94% 95% 95% 79% 95% 95% 57% 97% 100% 77% 100% 100% 57% 57% 57% 57% 57% 57% 37% 78% 100% 35% 76% 100% 100% 100% 100% 100% 100% 100% 1% 1% 12% 1% 3% 13% 0% 1% 14% 0% 4% 17% 7% 9% 19% 7% 7% 16% 0% 10% 25% 0% 3% 19% 8% 15% 25% 9% 18% 33% 1% 1% 11% 1% 1% 11% 6% 11% 21% 3% 9% 17% 7% 15% 25% 7% 9% 19% 0% 3% 19% 0% 1% 17% 7% 10% 21% 7% 8% 17% 85% 95% 95% 94% 95% 95% 96% 100% 100% 67% 98% 100% 57% 57% 57% 57% 57% 57% 33% 71% 100% 33% 69% 100% 100% 100% 100% 99% 100% 100% 1% 1% 12% 1% 1% 12% 1% 5% 16% 0% 2% 13% 7% 7% 16% 6% 7% 15% 0% 9% 25% 0% 3% 19% 7% 17% 31% 7% 13% 21% 1% 1% 11% 1% 1% 11% 7% 8% 17% 3% 7% 17% 7% 8% 17% 7% 9% 19% 0% 3% 17% 0% 1% 16% 7% 8% 17% 7% 7% 16% STABILITY OF FINANCIAL NETWORKS Table S8. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 idiosyncratic shock Φ = 0.8, γ = 0.75 Φ = 0.8, γ = 0.70 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 83% 94% 95% 94% 95% 95% 100% 100% 100% 89% 100% 100% 57% 60% 63% 57% 57% 58% 55% 100% 100% 52% 100% 100% 100% 100% 100% 100% 100% 100% 4% 9% 21% 1% 2% 12% 0% 1% 15% 0% 7% 21% 10% 21% 31% 7% 9% 17% 1% 11% 27% 0% 5% 20% 9% 23% 43% 9% 17% 31% 2% 5% 15% 1% 1% 12% 7% 11% 21% 8% 18% 29% 15% 25% 38% 7% 15% 27% 1% 12% 23% 0% 7% 19% 7% 10% 22% 12% 21% 33% 94% 95% 95% 84% 94% 95% 68% 100% 100% 78% 100% 100% 57% 57% 59% 57% 57% 57% 37% 79% 100% 35% 81% 100% 100% 100% 100% 100% 100% 100% 1% 1% 13% 1% 3% 13% 0% 3% 15% 0% 4% 17% 7% 9% 21% 7% 7% 16% 0% 9% 25% 0% 4% 19% 7% 17% 25% 10% 19% 35% 1% 1% 11% 1% 2% 13% 5% 12% 21% 5% 9% 19% 9% 16% 28% 7% 11% 20% 0% 4% 19% 0% 1% 17% 8% 11% 23% 7% 8% 17% 92% 95% 95% 94% 95% 96% 96% 100% 100% 73% 100% 100% 57% 57% 57% 57% 57% 57% 33% 67% 100% 31% 69% 100% 100% 100% 100% 100% 100% 100% 1% 1% 12% 1% 1% 12% 1% 5% 16% 1% 3% 16% 7% 7% 17% 7% 7% 15% 0% 9% 25% 0% 7% 22% 9% 17% 31% 7% 13% 25% 1% 1% 11% 1% 1% 11% 7% 8% 18% 6% 7% 17% 7% 8% 17% 7% 9% 20% 0% 2% 17% 0% 1% 17% 7% 8% 17% 7% 7% 17% DASGUPTA AND KALIGOUNDER Table S9. Residual instabilities of homogeneous versus heterogeneous networks under coordinated shocks. The percentages shown are the percentages of networks for which ξ < 0.05 or ξ < 0.1 or ξ < 0.2. homogeneous |V | = 50 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 100 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous homogeneous |V | = 300 (0.1, 0.95)-heterogeneous (0.2, 0.6)-heterogeneous in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 in-arborescence ER, average degree 3 ER, average degree 6 SF, average degree 3 SF, average degree 6 idiosyncratic shock Φ = 0.9, γ = 0.85 Φ = 0.9, γ = 0.80 ξ < 0.05 ξ < 0.1 ξ < 0.2 ξ < 0.05 ξ < 0.1 ξ < 0.2 94% 95% 95% 93% 94% 95% 100% 100% 100% 96% 100% 100% 5% 5% 8% 57% 57% 59% 53% 100% 100% 55% 100% 100% 100% 100% 100% 100% 100% 100% 9% 11% 21% 1% 3% 14% 1% 9% 23% 0% 2% 14% 7% 10% 22% 11% 21% 31% 1% 11% 27% 0% 7% 20% 9% 20% 35% 12% 23% 44% 1% 2% 12% 2% 4% 15% 8% 17% 31% 7% 12% 22% 17% 25% 39% 9% 17% 29% 1% 12% 25% 0% 8% 19% 17% 23% 35% 9% 13% 23% 94% 95% 95% 92% 95% 95% 74% 100% 100% 77% 100% 100% 3% 3% 5% 57% 57% 57% 34% 81% 100% 37% 81% 100% 100% 100% 100% 100% 100% 100% 1% 1% 12% 1% 3% 14% 0% 6% 19% 0% 1% 16% 7% 7% 17% 7% 13% 22% 0% 9% 25% 0% 6% 19% 11% 21% 37% 7% 17% 29% 1% 2% 13% 1% 1% 11% 5% 9% 19% 6% 13% 23% 7% 11% 21% 9% 19% 31% 0% 5% 21% 0% 2% 17% 9% 14% 25% 7% 8% 18% 94% 95% 95% 94% 95% 95% 0% 0% 100% 85% 100% 100% 57% 57% 57% 3% 3% 3% 30% 69% 100% 31% 69% 100% 100% 100% 100% 100% 100% 100% 1% 1% 12% 1% 1% 11% 0% 3% 16% 0% 5% 17% 7% 8% 17% 7% 7% 16% 0% 9% 25% 0% 7% 22% 10% 17% 33% 6% 15% 25% 1% 1% 11% 1% 1% 11% 7% 9% 18% 6% 7% 17% 7% 10% 21% 7% 9% 17% 0% 1% 17% 0% 1% 17% 7% 9% 17% 7% 7% 16% STABILITY OF FINANCIAL NETWORKS ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock in-arborescence (average degree ≈ 1), coordinated shock E = |V | = 50 1.0 ξ Φ = 0.5 K = 0.1 E = |V | = 50 1.0 Φ = 0.5 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 ξ 0.5 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.10 0.40 0.15 0.35 0.20 0.30 E = |V | = 100 Φ = 0.5 K = 0.1 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 Φ − γ 0.05 γ 0.45 0.45 0.05 E = |V | = 100 1.0 K = 0.5 Φ = 0.5 0.9 0.9 0.8 0.8 0.7 0.7 0.7 0.6 0.6 ξ 0.5 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 E = |V | = 300 0.10 0.40 0.15 0.35 0.20 0.30 ξ 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 Φ − γ 0.05 γ 0.45 0.45 0.05 0.10 0.40 Φ = 0.5 1.0 E = |V | = 300 K = 0.5 Φ = 0.5 1.0 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 ξ 0.5 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0.20 0.30 0.25 0.25 0.30 0.20 (G) 0.35 0.15 0.40 0.10 0.45 0.05 Φ = 0.5 0.20 0.30 Φ − γ 0.05 γ 0.45 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 E = |V | = 300 K = 0.9 Φ = 0.5 0.5 0.4 0.15 0.35 K = 0.9 0.6 ξ 0.5 0.4 0.10 0.40 0.45 0.05 (F) 0.9 Φ − γ 0.05 γ 0.45 0.15 0.35 (E) K = 0.1 0.40 0.10 0 Φ − γ 0.05 γ 0.45 0.45 0.05 (D) 1.0 0.35 0.15 0.30 0.20 0.5 0.4 0.20 0.30 0.20 0.30 0.6 ξ 0.5 0.4 0.15 0.35 E = |V | = 100 1.0 0.8 0.10 0.40 0.15 0.35 (C) 0.9 Φ − γ 0.05 γ 0.45 0.10 0.40 (B) (A) 1.0 0.25 0.25 0 Φ − γ 0.05 γ 0.45 0.45 0.05 Φ = 0.5 0.5 0.4 0.15 0.35 K = 0.9 0.6 ξ 0.5 0.4 0.10 0.40 E = |V | = 50 1.0 0.9 Φ − γ 0.05 γ 0.45 ξ K = 0.5 0 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 (H) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 (I) F IG. S1. Effect of variations of equity to asset ratio (with respect to shock) on the vulnerability index ξ for homogeneous networks. Lower values of ξ imply higher global stability of a network. 0.35 0.15 0.40 0.10 0.45 0.05 DASGUPTA AND KALIGOUNDER ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock in-arborescence (average degree ≈ 1), coordinated shock α = 0.10 E = |V | = 50 1.0 β = 0.95 K = 0.1 α = 0.10 Φ = 0.5 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 ξ 0.5 ξ 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0.0 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 E = |V | = 50 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 1.0 E = |V | = 50 1.0 ξ 0.4 0.3 0.2 0.1 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.15 0.35 0.20 0.30 0.30 0.20 (C) K = 0.1 Φ = 0.5 α = 0.20 E = |V | = 50 1.0 β = 0.60 K = 0.5 0.6 0.9 0.5 0.8 0.4 0.7 0.5 0.3 0.6 0.4 0.2 0.5 0.3 0.1 0.4 0.2 0 0.3 ξ 0.25 0.25 (D) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 E = |V | = 50 β = 0.60 K = 0.9 Φ = 0.5 0.25 0.25 0.35 0.15 0.9 Φ = 0.5 1.0 0.20 0.30 0.10 0.40 0.45 0.05 0.7 0.15 0.35 0.35 0.15 0.6 0.5 α = 0.20 0.10 0.40 0.25 0.25 0.7 (B) 0.8 Φ − γ 0.05 γ 0.45 Φ = 0.5 β = 0.60 0.9 ξ Φ = 0.5 β = 0.95 K = 0.9 0.8 (A) α = 0.20 K = 0.5 E = |V | = 50 0.9 Φ − γ 0.05 γ 0.45 0.45 0.05 α = 0.10 β = 0.95 0.8 0.7 ξ 0.6 0.1 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 (E) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.30 0.20 (F) F IG. S2. Effect of variations of equity to asset ratio (with respect to shock) on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network. 0.40 0.10 0.45 0.05 0.40 0.10 0.45 0.05 STABILITY OF FINANCIAL NETWORKS ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock in-arborescence (average degree ≈ 1), coordinated shock α = 0.10 E = |V | = 100 1.0 Φ = 0.5 α = 0.10 0.9 E = |V | = 100 1.0 0.8 0.7 0.5 0.6 0.4 0.5 0.3 0.4 0.2 0.8 0.7 ξ 0.4 0.3 0.2 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.15 0.35 0.20 0.30 α = 0.10 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 α = 0.10 E = |V | = 300 E = |V | = 300 1.0 β = 0.95 Φ = 0.5 K = 0.1 0.9 ξ 0.8 0.30 0.20 0.35 0.15 0.40 0.10 β = 0.95 Φ = 0.5 0.9 0.8 0.8 0.7 0.7 ξ 0.20 0.30 0.4 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 0.1 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 1.0 0.45 0.05 0.1 α = 0.20 β = 0.60 Φ = 0.5 E = |V | = 100 K = 0.1 ξ 0.9 0.8 1.0 0.7 0.9 0.6 0.8 0.5 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 E = |V | = 100 β = 0.60 Φ = 0.5 K = 0.9 0.7 ξ 0.3 Φ −γ γ 0.15 0.35 α = 0.20 0.8 0.4 0.7 0.10 0.40 (F) 0.5 0.6 0.05 0.45 0.9 (D) β = 0.95 Φ = 0.5 K = 0.9 0.6 Φ −γ γ α = 0.20 β = 0.60 E = |V | = 100 K = 0.5 Φ = 0.5 0 0.20 0.30 0.35 0.15 0.2 (E) 0.15 0.35 0.30 0.20 0.3 0.10 0.40 0.2 0.10 0.40 0.25 0.25 0.4 0.05 0.45 0.3 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 0.4 0.6 0.5 0.4 0.3 (H) 0.2 0.3 α = 0.20 β = 0.60 E = |V | = 300 K = 0.5 Φ = 0.5 0.2 0.1 1.0 0 Φ −γ γ 0.1 Φ −γ γ 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 (I) 0.7 1.0 0.6 0.9 0.5 0.9 0.4 0.8 0.3 Φ −γ γ 0.7 0.8 0.7 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 (K) 0.6 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 ξ 0.6 0.5 0.4 0.5 0.3 0.4 0.2 0.3 α = 0.20 β = 0.60 Φ = 0.5 E = |V | = 300 K = 0.9 0.8 ξ α = 0.20 β = 0.60 Φ = 0.5 E = |V | = 300 K = 0.1 1.0 0.1 Φ −γ γ 0.2 0.1 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 (L) 0 Φ −γ γ 0.45 0.05 0.9 0.05 0.45 (G) ξ 0.15 0.35 0.5 0.3 1.0 0.10 0.40 E = |V | = 300 1.0 0.9 Φ −γ γ 0.05 0.45 0.05 0.45 α = 0.10 0.4 0.5 ξ Φ −γ γ K = 0.5 0.5 0.6 Φ −γ γ 0.1 0.45 0.05 (C) 0.6 0.7 ξ 0.25 0.25 (B) 0.10 0.40 (A) 1.0 0.6 0.5 0 0.05 0.45 β = 0.95 Φ = 0.5 K = 0.9 0.9 0.3 Φ −γ γ 0.1 Φ −γ γ β = 0.95 Φ = 0.5 K = 0.5 0.8 0.6 E = |V | = 100 1.0 0.9 ξ 0.7 ξ α = 0.10 β = 0.95 K = 0.1 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 (J) F IG. S3. Effect of variations of equity to asset ratio (with respect to shock) on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network. 0.45 0.05 0.40 0.10 0.45 0.05 DASGUPTA AND KALIGOUNDER ER model (average degree 6 ), coordinated shock ER model (average degree 3 ), coordinated shock SF model (average degree 6 ), coordinated shock SF model (average degree 3 ), coordinated shock in-arborescence (average degree ≈ 11), coordinated shock ξ 1.0 ξ |V | = 50 K = 0.1 Φ = 0.5 γ = 0.05, 0.25, 0.45 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 25 50 75 100 125 150 175 200 225 250 275 300 325 350 75 γ (A) 100 125 150 175 200 225 250 275 300 325 350 (B) ξ 1.0 50 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 γ |V | = 100 K = 0.1 Φ = 0.5 γ = 0.05, 0.25, 0.45 1.0 |V | = 100 K = 0.5 Φ = 0.5 γ = 0.05, 0.25, 0.45 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 25 50 75 25 100 125 150 175 200 225 250 275 300 325 350 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 γ 25 E 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 ξ |V | = 50 K = 0.5 Φ = 0.5 γ = 0.05, 0.25, 0.45 γ (C) 50 75 100 125 150 175 200 225 250 275 300 325 350 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 E (D) F IG. S4. Effect of variations of the total external to internal asset ratio E/I on the vulnerability index ξ for homogeneous networks. Lower values of ξ imply higher global stability of a network. E STABILITY OF FINANCIAL NETWORKS ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock in-arborescence (average degree ≈ 1), coordinated shock α = 0.10 |V | = 50 β = 0.95 K = 0.1 Φ = 0.5 α = 0.10 |V | = 50 γ = 0.05 1.0 1.0 ξ 0.9 ξ 0.9 0.8 α = 0.10 |V | = 50 75% E 25% 50% (as % of I ) 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (A) α = 0.10 β = 0.95 K = 0.1 Φ = 0.5 γ = 0.45 0.9 1.0 0.8 ξ 0.9 0.7 0.8 0.6 E 25% 50% (as % of I ) 75% γ = 0.25 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (B) β = 0.95 K = 0.1 |V | = 100 75% Φ = 0.5 γ = 0.25 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (D) 0.5 α = 0.10 0.4 |V | = 100 1.0 0.3 β = 0.95 K = 0.5 Φ = 0.5 γ = 0.25 0.9 0.2 ξ 0.1 0.8 0.7 0 E 25% 50% (as % of I ) 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (C) α = 0.10 |V | = 100 ξ Φ = 0.5 0.8 E 25% 50% (as % of I ) ξ β = 0.95 K = 0.1 β = 0.95 K = 0.5 Φ = 0.5 0.6 E 25% 50% (as % of I ) γ = 0.05 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (E) α = 0.20 |V | = 50 1.00 0.90 β = 0.60 K = 0.1 Φ = 0.5 γ = 0.05 1.0 E 25% 50% (as % of I ) 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% 0.9 (F) 0.8 α = 0.20 |V | = 50 β = 0.60 K = 0.1 Φ = 0.5 ξ 0.7 γ = 0.25 0.6 0.3 ξ 0.5 0.2 0.4 E 25% 50% (as % of I ) 0.1 0 E 25% 50% (as % of I ) α = 0.20 |V | = 50 ξ 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (G) 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% α = 0.20 |V | = 100 (H) β = 0.60 K = 0.1 Φ = 0.5 β = 0.60 K = 0.1 Φ = 0.5 γ = 0.25 0.4 γ = 0.45 ξ 0.1 0.3 0.2 0 E 25% 50% (as % of I ) 75% 0.1 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% E 25% 50% (as % of I ) (I) α = 0.20 |V | = 100 0.9 β = 0.60 K = 0.5 Φ = 0.5 γ = 0.25 ξ 0.7 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (J) α = 0.20 |V | = 100 0.8 ξ 75% β = 0.60 K = 0.5 Φ = 0.5 γ = 0.05 1.00 0.90 0.6 E 25% 50% (as % of I ) 0.5 E 25% 50% (as % of I ) 75% 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (L) 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (K) F IG. S5. Effect of variations of the total external to internal asset ratio E/I on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network. DASGUPTA AND KALIGOUNDER ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock ER model (average degree 6), idiosyncratic shock ER model (average degree 3), idiosyncratic shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock SF model (average degree 6), idiosyncratic shock SF model (average degree 3), idiosyncratic shock in-arborescence (average degree ≈ 1), coordinated shock in-arborescence (average degree ≈ 1), idiosyncratic shock E = |V | = 50 1.0 Φ = 0.5 K = 0.1 E = |V | = 50 1.0 K = 0.5 Φ = 0.5 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 ξ 0.5 ξ 0.5 ξ 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 E = |V | = 100 K = 0.1 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 E = |V | = 100 1.0 K = 0.5 Φ = 0.5 0.9 0.9 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 ξ 0.5 ξ 0.5 ξ 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 E = |V | = 300 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 Φ − γ 0.05 γ 0.45 0.45 0.05 K = 0.1 Φ = 0.5 1.0 E = |V | = 300 K = 0.5 Φ = 0.5 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 ξ 0.5 ξ 0.5 ξ 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0.15 0.35 0.20 0.30 0.25 0.25 (G) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 0.25 0.25 0.35 0.15 0.30 0.20 0.40 0.10 0.45 0.05 K = 0.9 Φ = 0.5 0.15 0.35 Φ − γ 0.05 γ 0.45 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 (F) 0.8 0.10 0.40 0.10 0.40 (E) 0.9 Φ − γ 0.05 γ 0.45 0.20 0.30 0 Φ − γ 0.05 γ 0.45 0.45 0.05 (D) 1.0 0.15 0.35 E = |V | = 100 1.0 0.8 0.10 0.40 Φ = 0.5 (C) 0.9 Φ − γ 0.05 γ 0.45 0.10 0.40 (B) Φ = 0.5 K = 0.9 0 Φ − γ 0.05 γ 0.45 (A) 1.0 E = |V | = 50 1.0 E = |V | = 300 K = 0.9 Φ = 0.5 0 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 (H) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 (I) F IG. S6. Effect of variations of equity to asset ratio (with respect to shock) on the vulnerability index ξ for homogeneous networks. Lower values of ξ imply higher global stability of a network. 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 STABILITY OF FINANCIAL NETWORKS ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock ER model (average degree 6), idiosyncratic shock ER model (average degree 3), idiosyncratic shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock SF model (average degree 6), idiosyncratic shock SF model (average degree 3), idiosyncratic shock in-arborescence (average degree ≈ 1), coordinated shock α = 0.10 E = |V | = 50 1.0 β = 0.95 K = 0.1 Φ = 0.5 0.9 0.8 0.8 0.7 0.7 0.6 0.6 ξ 0.5 ξ 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0.0 0.10 0.40 0.15 0.35 E = |V | = 50 1.0 0.9 Φ − γ 0.05 γ 0.45 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 1.0 E = |V | = 50 1.0 ξ 0.4 0.3 0.2 0.1 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.15 0.35 0.20 0.30 0.30 0.20 (C) K = 0.1 Φ = 0.5 α = 0.20 E = |V | = 50 1.0 β = 0.60 K = 0.5 1.0 0.9 0.5 0.8 0.4 0.7 0.5 0.3 0.6 0.4 0.2 0.5 0.3 0.1 0.4 0.2 ξ 0 (D) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 β = 0.60 K = 0.9 Φ = 0.5 0.25 0.25 0.35 0.15 0.8 0.7 ξ 0.3 0.25 0.25 E = |V | = 50 0.9 Φ = 0.5 0.6 0.20 0.30 0.10 0.40 0.45 0.05 0.7 0.15 0.35 0.35 0.15 0.6 0.5 α = 0.20 0.10 0.40 0.25 0.25 0.7 (B) 0.8 Φ − γ 0.05 γ 0.45 Φ = 0.5 β = 0.60 0.9 ξ Φ = 0.5 β = 0.95 K = 0.9 0.8 Φ − γ 0.05 γ 0.45 0.45 0.05 K = 0.5 E = |V | = 50 0.9 (A) α = 0.20 α = 0.10 in-arborescence (average degree ≈ 1), idiosyncratic shock α = 0.10 β = 0.95 0.6 0.1 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 (E) 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 Φ − γ 0.05 γ 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.30 0.20 (F) F IG. S7. Effect of variations of equity to asset ratio (with respect to shock) on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network. 0.40 0.10 0.45 0.05 0.40 0.10 0.45 0.05 DASGUPTA AND KALIGOUNDER ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock ER model (average degree 6), idiosyncratic shock ER model (average degree 3), idiosyncratic shock SF model (average degree 6), coordinated shock α = 0.10 E = |V | = 100 1.0 SF model (average degree 3), idiosyncratic shock in-arborescence (average degree ≈ 1), idiosyncratic shock α = 0.10 β = 0.95 K = 0.1 Φ = 0.5 α = 0.10 0.9 1.0 0.8 0.9 ξ 0.7 ξ SF model (average degree 3), coordinated shock SF model (average degree 6), idiosyncratic shock in-arborescence (average degree ≈ 1), coordinated shock 0.7 0.5 0.6 0.4 0.5 0.3 0.4 0.8 0.7 ξ 0.4 0.3 0.2 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 α = 0.10 E = |V | = 300 1.0 α = 0.10 β = 0.95 Φ = 0.5 E = |V | = 300 K = 0.1 0.9 ξ 0.8 0.30 0.20 0.35 0.15 0.40 0.10 β = 0.95 Φ = 0.5 0.9 0.8 0.8 0.7 0.20 0.30 0.1 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 1.0 0.45 0.05 0.2 0.1 α = 0.20 E = |V | = 100 β = 0.60 Φ = 0.5 ξ 0.9 0.8 0.8 0.7 0.9 0.6 0.8 0.5 0.7 ξ 0.3 Φ −γ γ 0.5 0.15 0.35 0.20 0.30 0.25 0.25 α = 0.20 1.0 0.4 0.7 0.10 0.40 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 0.35 0.15 0.40 0.10 0.45 0.05 E = |V | = 100 β = 0.60 Φ = 0.5 K = 0.9 0.6 0.5 0.4 0.3 (H) 0.4 0.30 0.20 (F) K = 0.1 0.6 0.05 0.45 0.9 (D) β = 0.95 Φ = 0.5 K = 0.9 0.6 Φ −γ γ α = 0.20 β = 0.60 E = |V | = 100 K = 0.5 Φ = 0.5 0 0.20 0.30 0.35 0.15 0.3 0.10 0.40 0.2 0.15 0.35 0.30 0.20 0.4 0.05 0.45 (E) 0.10 0.40 0.25 0.25 0.5 0.3 0.2 0.3 α = 0.20 β = 0.60 E = |V | = 300 K = 0.5 Φ = 0.5 0.2 0.1 1.0 0 Φ −γ γ 0.1 Φ −γ γ 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 α = 0.20 E = |V | = 300 1.0 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 α = 0.20 0.8 ξ β = 0.60 Φ = 0.5 0.7 0.8 0.4 0.7 0.3 Φ −γ γ 0.7 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 (K) 0.6 0.5 β = 0.60 Φ = 0.5 K = 0.9 0.9 0.5 0.8 E = |V | = 300 1.0 0.6 K = 0.1 0.9 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 ξ 0.6 0.5 0.4 0.3 0.4 0.2 0.3 0.1 Φ −γ γ 0.2 0.1 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 (L) 0 Φ −γ γ 0.45 0.05 (I) 0.9 0.05 0.45 (G) ξ 0.15 0.35 0.7 ξ 0.3 1.0 0.10 0.40 α = 0.10 0.9 Φ −γ γ 0.4 0.05 0.45 0.05 0.45 E = |V | = 300 1.0 0.4 0.5 ξ Φ −γ γ K = 0.5 0.5 0.6 Φ −γ γ 0.1 0.45 0.05 (C) 0.6 0.7 ξ 0.25 0.25 (B) (A) 1.0 0.6 0.5 0 0.05 0.45 β = 0.95 Φ = 0.5 K = 0.9 0.9 0.3 Φ −γ γ 0.1 Φ −γ γ 1.0 β = 0.95 Φ = 0.5 K = 0.5 0.8 0.6 0.2 E = |V | = 100 E = |V | = 100 0.05 0.45 0.10 0.40 0.15 0.35 0.20 0.30 0.25 0.25 0.30 0.20 0.35 0.15 0.40 0.10 0.45 0.05 (J) F IG. S8. Effect of variations of equity to asset ratio (with respect to shock) on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network. 0.45 0.05 0.40 0.10 0.45 0.05 STABILITY OF FINANCIAL NETWORKS ER model (average degree 6 ), coordinated shock ER model (average degree 3 ), coordinated shock ER model (average degree 6 ), idiosyncratic shock SF model (average degree 6 ), coordinated shock ER model (average degree 3 ), idiosyncratic shock SF model (average degree 3 ), coordinated shock SF model (average degree 6 ), idiosyncratic shock in-arborescence (average degree ≈ 11), coordinated shock ξ SF model (average degree 3 ), idiosyncratic shock in-arborescence (average degree ≈ 11), idiosyncratic shock ξ n = 50 K = 0.1 Φ = 0.5 γ = 0.05, 0.25, 0.45 n = 50 K = 0.5 Φ = 0.5 γ = 0.05, 0.25, 0.45 1.0 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 25 50 75 100 125 150 175 200 225 250 275 300 325 350 25 E 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 γ 100 125 150 175 200 225 250 275 300 325 350 75 γ (A) E (B) ξ ξ n = 100 K = 0.1 Φ = 0.5 γ = 0.05, 0.25, 0.45 n = 100 K = 0.5 Φ = 0.5 γ = 0.05, 0.25, 0.45 1.0 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 25 50 75 25 100 125 150 175 200 225 250 275 300 325 350 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 γ 50 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 γ (C) 50 75 100 125 150 175 200 225 250 275 300 325 350 5 0.0 0 0.1 5 0.1 0 0.2 5 0.2 0 0.3 5 0.3 0 0.4 5 0.4 E (D) F IG. S9. Effect of variations of the total external to internal asset ratio E/I on the vulnerability index ξ for homogeneous networks. Lower values of ξ imply higher global stability of a network. E DASGUPTA AND KALIGOUNDER ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock ER model (average degree 6), idiosyncratic shock ER model (average degree 3), idiosyncratic shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock SF model (average degree 6), idiosyncratic shock SF model (average degree 3), idiosyncratic shock in-arborescence (average degree ≈ 1), coordinated shock α = 0.10 |V | = 50 β = 0.95 K = 0.1 Φ = 0.5 in-arborescence (average degree ≈ 1), idiosyncratic shock α = 0.10 |V | = 50 γ = 0.05 1.0 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 ξ 0.5 ξ 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 75% (A) α = 0.10 β = 0.95 |V | = 50 K = 0.1 Φ = 0.5 γ = 0.45 1.0 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 ξ 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 γ = 0.25 α = 0.10 β = 0.95 |V | = 100 K = 0.1 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (C) α = 0.10 |V | = 100 β = 0.95 K = 0.5 Φ = 0.5 E 25% 50% (as % of I ) 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (B) Φ = 0.5 γ = 0.25 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (D) γ = 0.25 α = 0.10 |V | = 100 0.9 0.8 1.00 0.7 ξ 0.90 0.6 0.80 0.5 E 25% 50% (as % of I ) 75% 0 E 25% 50% (as % of I ) 1.0 E 25% 50% (as % of I ) 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% 0 ξ Φ = 0.5 0 E 25% 50% (as % of I ) ξ β = 0.95 K = 0.1 β = 0.95 K = 0.5 Φ = 0.5 γ = 0.05 0.70 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (E) E 25% 50% (as % of I ) 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (F) F IG. S10. Effect of variations of the total external to internal asset ratio E/I on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network. STABILITY OF FINANCIAL NETWORKS ER model (average degree 6), coordinated shock ER model (average degree 3), coordinated shock ER model (average degree 6), idiosyncratic shock ER model (average degree 3), idiosyncratic shock SF model (average degree 6), coordinated shock SF model (average degree 3), coordinated shock SF model (average degree 6), idiosyncratic shock SF model (average degree 3), idiosyncratic shock in-arborescence (average degree ≈ 1), coordinated shock α = 0.20 β = 0.60 |V | = 50 K = 0.1 Φ = 0.5 in-arborescence (average degree ≈ 1), idiosyncratic shock γ = 0.05 1.0 0.9 0.8 ξ 0.7 α = 0.20 β = 0.60 0.6 |V | = 50 K = 0.1 0.5 γ = 0.25 0.4 0.4 0.3 0.3 ξ 0.2 0.2 0.1 0.1 0 E 25% 50% (as % of I ) ξ Φ = 0.5 E 25% 50% (as % of I ) 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (A) α = 0.20 β = 0.60 |V | = 50 K = 0.1 Φ = 0.5 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (B) α = 0.20 γ = 0.45 β = 0.60 |V | = 100 0.1 K = 0.1 Φ = 0.5 γ = 0.25 0.4 0 0.3 E 25% 50% (as % of I ) 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% α = 0.20 |V | = 100 1.0 ξ 0.2 (C) 0.1 0 β = 0.60 K = 0.5 Φ = 0.5 E 25% 50% (as % of I ) γ = 0.25 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (D) 0.9 0.8 ξ 0.7 α = 0.20 0.6 |V | = 100 β = 0.60 K = 0.5 Φ = 0.5 γ = 0.05 1.00 0.5 ξ 0.4 E (as % of I ) 25% 50% 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (E) 0.90 0.80 0.70 E 25% 50% (as % of I ) 75% 100% 125% 150% 175% 200% 225% 250% 275% 300% 325% 350% (F) E F IG. S11. Effect of variations of the total external to internal asset ratio I on the vulnerability index ξ for (α , β )-heterogeneous networks. Lower values of ξ imply higher global stability of a network.
5cs.CE
1 Optimizing Caching Policy at Base Stations by Exploiting User Preference and Spatial Locality arXiv:1710.09983v1 [cs.IT] 27 Oct 2017 Dong Liu and Chenyang Yang Abstract Most prior works of proactive caching at wireless edge optimize caching policies under the following assumptions: the preference of each user is identical to content popularity, all users request contents with the same active level and at uniformly-distributed locations. In this paper, we investigate what happens without these assumptions. To this end, we establish a framework to optimize caching policy at base stations exploiting user preference, active level, and spatial locality. We obtain optimal caching policy to minimize the weighted sum of the file download time averaged over all file requests and user locations in the network (reflecting network performance) and the maximal weighted download time averaged over possible file requests and locations of each user (reflecting user fairness). To investigate how user preference similarity and active level skewness affect the optimal caching policy, we then provide a method to synthesize user preference for given content popularity and user active level. The analysis and simulation results show that exploiting user preference can improve both network performance and user fairness remarkably compared with priori works. The gain of exploiting user preference increases with user preference heterogeneity, user spatial locality, and skewness of user active level. Index Terms Caching policy, user preference, content popularity, spatial locality, active level. I. I NTRODUCTION Motivated by the 80/20 rule in terms of content popularity, local caching at the wireless edge has attracted considerable attention recently [1, 2]. By caching popular contents at base stations (BSs), network throughput, energy efficiency and user experience can be improved dramatically [3–5]. Facing the limited storage size at wireless edge while with huge number of available The authors are with School of Electronics and Information Engineering, Beihang University, Beijing, China (e-mail: {dliu, cyyang}@buaa.edu.cn). October 30, 2017 DRAFT 2 contents, optimizing proactive caching policy by exploiting the skewed statistics of user demands is critical in reaping the benefit of local caching [2]. Most of priori works in caching policy optimization are based on content popularity, which can be predicted by various methods [6–8]. Diverse objectives and application scenarios have been considered. The original motivation of local caching is to reduce latency. In [9], caching policy was optimized to minimize the average download delay assuming that the location where each user sends request is known a priori when optimizing caching policy. Considering the uncertainty of user location, a probabilistic caching policy for BS maximizing the cache-hit probability in homogeneous network was proposed in [10] and then extended into heterogeneous network (HetNets) in [11]. Caching policies were optimized together with multicast and cooperative transmission to maximize the successful transmission probability in [12] and [13], and were optimized to minimize the energy consumption and average bit error rate of cache-enabled wireless networks respectively in [14] and [15], respectively. Coded caching policies were optimized in [16] to maximize the average fractional offloaded traffic and minimize the average ergodic rate for small cell networks. In [17], joint user association and content placement was optimized to maximize the supported traffic load in HetNets considering a hierarchical caching structure, where different kinds of BSs can share the cached content via backhaul links. While significant research efforts have been devoted to wireless caching, the following facts that have been observed from real dataset analysis are largely overlooked in the literature: 1) Content popularity can reflect average interests of multiple users, but cannot reflect the interest of each individual user. In fact, due to the differences in culture, occupation and age of the users, global content popularity observed at a large aggregation point (say a content server) is not the same as local content popularity observed in a small region (say a campus [18] or a cell [19]), not to mention the preference of each user. 2) The active level of users is skewed. As reported in [20], 90% of the daily network traffic is generated by less than 10% of all users. The user preference is also skewed, i.e., a user is usually interested in a small fraction of all contents. 3) The location of mobile users is neither known in advance as assumed in [2, 9, 13, 15], nor completely randomly distributed throughout the network as assumed in [5, 10–12, 14, 16, 17]. The analysis from real data shows that users always periodically reappear at the same location with high probability [21]. The measured data in [20] indicate that 60% of the users is active only in one cell each day and over 95% of the users travel across less than 10 BSs in a day, which suggests strong spatial locality of users. This suggests that the probability that in October 30, 2017 DRAFT 3 which cell a user is located when sending file request can be learned from the request history. As a consequence, most of prior works do not differentiate user preference and content popularity, implicitly assuming that the preferences are identical among users in a region [9–17] or in a social group [22] and equal to the content popularity. Beside, almost all existing works assume that all users request contents with the same active level and at uniformly-distributed locations. This may degrade the caching gain, since the assumptions are in reality not true. By assuming user preferences as Zipf distributions with different ranks and user locations remaining unchanged during the period of content placement and content delivery, caching policy was optimized to minimize the average download delay in [23]. Yet the user preference model was not validated, and all the users were assumed to have identical active level. In [24], caching policies was optimized with learned user preference for device-to-device communications to maximize offloading ratio, but the impact of user active level and spatial locality was not analyzed. User preference prediction is a key task for recommendation system, which is widely applied by content providers. User preference can be learned by collaborative filtering (CF) based on users’ rating statistics, view or purchase history, exploiting the correlation of contents or preferences among users [25]. In wireless caching, CF methods such as matrix factorization (MF) [26] and probabilistic latent semantic analysis (pLSA) [27] have been adopted to learn user preference in [28] and [24], respectively, based on which caching policies were optimized to increase the offloading ratio. With learned user preferences, a nature way is to aggregate them into local content popularity of a cell and then employ popularity-based caching policies, e.g., [19, 28]. Alternatively, caching policies can be optimized more sophisticatedly by directly exploiting individual user preference as in [24]. Intuitively, the caching interests of users may conflict when user preference is heterogeneous (e.g., a user may prefer a BS to cache one file while the other user may prefer the BS to cache another file). Furthermore, considering that the coverage area of BSs is overlapped in dense wireless networks, a user can download file from adjacent BSs. Therefore, the caching policy of each BS should not only consider the preferences of users within its cell but also consider the preferences of users in its neighboring cells. In this paper, we go a further step to optimize caching policy by removing these assumptions. To investigate when and how the assumptions impact local caching, we establish a framework to optimize caching policies for BSs by exploiting other 80/20 rules in terms of the heterogeneous preference, active level and spatial locality of users. Since local caching can reduce end-toend delay, we consider the file download time as the metric. Taking the uncertainty of user October 30, 2017 DRAFT 4 demands and locations into account, we derive the file download time for each user that is averaged over all possible requests and locations of the user, namely user average download time. When the caching interests of multiple users conflict due to different user preferences and locations, caching policy will affect user fairness because the file download time of each user not only depends on channel condition but also depends on whether the requested file is cached. This suggests that we can optimize caching policy to improve fairness among users. Different from ensuring user fairness by radio resource allocation (such as user scheduling and power allocation), caching policy guarantees user fairness on the application level, which takes user preference into consideration. In particular, we establish an optimization framework aimed at improving both network performance and user fairness. From the perspective of network performance, we minimize the download time averaged over all possible requests and locations of all users in the network, namely network average download time. From the perspective of user fairness, we minimize the maximal weighted user average download time, where the weight is associated with the user active level. To achieve a tradeoff between the two perspectives, we minimize a weighted sum of the network average download time and the maximal weighted user average download time. To evaluate the entangled impacts of content popularity, user preference and active level on optimal caching policies, we propose a user preference synthesization method with given content popularity and user active level, and validate the method by two real datasets, Million Songs dataset [29] and Lastfm dataset [30]. The major contributions of this paper are summarized as follows: • We propose a caching policy optimization framework, where the spatial locality, heterogeneous preference and active level of users are considered. • We analyze individual user behavior from two real datasets, and provide a method to synthesize user preference, which can control the user preference similarity, content popularity, and active level skewness separately. The synthetic method is validated by the datasets. • Simulation results show that exploiting individual user preference can improve both network performance and user fairness remarkably, whose gain increases with the user preference heterogeneity, user spatial locality, and the skewness of user active level. The rest of the paper is organized as follows. In Section II, we present the system model and characterize the connection between content popularity, user preference and active level. Section III optimizes the caching policy exploiting individual user preference. Section IV analyzes the October 30, 2017 DRAFT 5 statistics of user demands from two real dataset and proposes a user preference synthesis method. The simulation results are provided in Section V, and the conclusions are drawn in Section VI. II. S YSTEM M ODEL AND U SER D EMAND S TATISTICS We consider a cache-enabled wireless network where each BS is equipped with Nt antennas and a cache, and is connected to the core network via backhaul. For notational and analysis simplicity, we consider a hexagonal region with Nb BSs with cell radius D as shown in Fig. 1. The content library consists of Nf files each with size F that all the users in the considered region may request. Each user is allowed to associate with one of the three nearest BSs (called neighboring BS set) to download the requested file in order to increase the cache-hit probability. For example, when a user is located in the shaded area of Fig. 1, it can associate with BS1 , BS2 or BS3 , where BS1 is called local BS of the user.1 To avoid strong inter-cell interference inside the neighboring BS sets, especially the interference generated from the local BS when user downloads file from other BSs [3], the BSs within the neighboring BSs set use different frequency resource. Denote Nu as the total number of users within the Nb cells. To reflect the spatial locality of users, we denote A = [auj ]N u×Nb as the user location probability matrix, where auj is the probability that the uth user is located in the jth cell when it sends the file request. Since the exact location of a user in a cell is hard to predict, we assume that the uth user is uniformly distributed in the jth cell if it is located in the cell. Note that we only assume that the user is uniformly located within the cell but not assume that it is uniformly located in the whole region because the probabilities of the user locating in different cells may differ [20]. A. Caching Policy and File Download Time To achieve better performance, we employ coded caching strategy [9, 16] where each file is encoded by rateless maximum distance separable coding, such that a file can be retrieved by a user when F bits of the requested file is received by the user. Denote cbf (0 ≤ cbf ≤ 1) as the fraction of the f th file cached at the bth BS and blu (xu )2 as the lth nearest BS of the uth user when the user receives file at the location of xu = (xu1 , xu2 ). When the total fraction of the P f th file cached at the three nearest BSs of the uth user is no less than 1, i.e., 3l=1 cblu f ≥ 1, 1 The framework can be extended to neighboring BS sets with any number of BSs. We choose three only for illustration. 2 In the following, we use blu instead of blu (xu ) for notational simplicity. October 30, 2017 DRAFT 6 BS36 BS22 BS8 BS9 BS19 BS18 BS10 BS2 BS3 BS7 BS17 BS11 BS1 BS4 BS6 BS16 BS12 BS5 BS13 BS15 BS31 BS14 BS27 Fig. 1. Layout of the cache-enabled network. The considered region are surrounded by solid line. In this example, Nb = 7. the uth user can retrieve the f th file from the local caches of its neighboring BS set. When P3 P3 l=1 cblu f part of files via backhaul link. l=1 cblu f < 1, the user needs to download the rest 1 − We assume block-fading channel where the small-scale fading gain is constant in each time slot, and is identically and independently distributed among time slots. When the file size F is large and the duration of each time slot ∆t is small so that the number of time slots N required to transmit a file is large,3 the download time per unit bit for the uth user located at xu when downloading a file from its lth nearest BS can be derived as τublu (xu ) = lim PN N →∞ where PN n=1 n=1 N∆t Rublu (xu , n)∆t = 1 lim 1 N →∞ N PN n=1 Rublu (xu , n) = 1 R̄ublu (xu ) (1) Rublu (xu , n)∆t is the number of bits downloaded during N time slots, Rub (xu , n) is the downlink data rate from the bth BS to the uth user in the nth time slots, and R̄ub (xu ) is the average rate from the bth BS to the uth user. To unify the expression, we denote the download time per unit bit for the uth user when downloading from the backhaul as τub4u (xu ). Since cache is intended for networks with stringent capacity backhaul [1], we assume that the download time is limited by the backhaul bandwidth when the user downloads file from the backhaul. Then, we have τb4u (xu ) = 3 1 , Cbh,u where Cbh,u is the backhaul bandwidth for the uth user. This is true in practice. For example, when F = 10 MB, ∆t = 1 ms, and the transmission rate is 8 Mbps, N = 104 . October 30, 2017 DRAFT 7 Since caching policy is optimized in a much larger time scale (at least in hours) than radio resource allocation such as power and bandwidth allocation (usually in milliseconds), we do not jointly optimize cache and transmission resource allocation. To focus on how to optimize caching policy exploiting user preference, we assume that each BS serves Nt users in the same time-frequency resource by zero-forcing beamforming with equal power allocation. Then, the average achievable rate can be expressed as " R̄ub (xu ) = Ehub ,hub′ Wu log2 1+ P Pt h r −α Nt ub ub b′ ∈Φb ,b′ 6=b −α 2 Pt hub′ rub ′ + σ !# (2) where Wu is the transmission bandwidth for the uth user, Pt is the transmit power of each BS, hub is the equivalent channel gain (including channel coefficient and beamforming) from the bth BS to the uth user, rub = ||xu − xb || is the distance between the uth user and the bth BS, α is the pathloss exponent, Φb denotes the BS set that share the same frequency with the bth BS, and σ 2 is the noise power. Pk−1 P When l=1 cblu f < 1 and kl=1 cblu f ≥ 1, the uth user needs to receive the f th file from the local caches of the 1st, · · · , kth nearest BSs successively to retrieve the complete file. The download time for the user receiving the file from these k BSs is given by ! k−1 k−1 X X cblu f τubku (xu ) cblu f τublu (xu ) + F 1 − tfuk (xu ) = F l=1 l=1 = F τubku (xu ) − F k−1 X l=1 cblu f (τubku (xu ) − τublu (xu )) (3) Then, for k = 1, · · · , 4, the file download time of the uth user located at xu and requesting the f th file can be expressed as a piecewise   tfu1 (xu ),      tf 2 (x ), u u f tu (xu ) = f3    tu (xu ),    f4 tu (xu ), function cb1u f ≥ 1 P2 P1 l=1 cblu f ≥ 1 l=1 cblu f < 1 and P2 P3 l=1 cblu f ≥ 1 l=1 cblu f < 1 and P3 l=1 cblu f < 1 (4) B. Content Popularity and User Preference The demand statistics for all users and for each individual user are modeled as follows. Global Content Popularity is the probability distribution of the file requests within the Nb cells, which is the aggregated user demands observed at a higher aggregation node, say the service gateway that covers the region, and reflects the average interests of all the users in the October 30, 2017 DRAFT 8 considered region. We denote p = [p1 , · · · , pNf ] as the global content popularity, where pf is the probability that the f th file in the library is requested by all users in the region. Local Content Popularity is the probability distribution of the file requests within a single cell, which reflects the aggregated user demands observed at a cell. We denote pf |j as the probability that the f th file is requested by all users located in the jth cell. User Preference is the conditional probability distribution of the requests from a user given that the user sends a file request, which reflects the demands of each individual user. Denote Q = [qT1 , · · · , qTNu ]T as the user preference matrix, where qu = [q1|u , · · · , qNf |u ] is the preference vector of the uth user and qf |u ∈ [0, 1] is the conditional probability that the uth user demands the f th file given that it requests a file. Either when the shape of probability distribution qu differs from that of qm , or when the rankings of the elements in qu and qm differ, the preferences of two users are not identical. To reflect the similarity between the preferences of two users, we consider cosine similarity frequently used in CF [25], which is defined as cos(qu , qm ) , qu qTm ||qu || · ||qm || (5) To use one parameter to characterize the heterogeneity of user preferences in a region, we consider average similarity, which is the cosine similarity averaged over all the two-user pairs N Nu u −1 X X 2 cos(Q) , cos(qu , qm ) Nu (Nu − 1) u=1 m=u+1 (6) Based on the law of total probability, the relation between global content popularity and user preference can be expressed as pf = Nu X u=1 su qf |u , Nu X quf (7) u=1 where su is the probability that the request is sent from the uth user, which reflects the active level of the user, and quf is the joint probability that the requested file is the f th file and the request is sent from the uth user. We denote s = [s1 , · · · , sNu ] as the user active level vector. With user active level s, user preference Q and user location probability A, the relation between local content popularity of the jth cell and user preference can be expressed as PNu PNu auj quf u=1 auj su qf |u = Pu=1 pf |j = PNf PN N u u u=1 auj su f =1 u=1 auj su qf |u (8) From (7) and (8), we can obtain the following observation. October 30, 2017 DRAFT 9 Observation: 1) When user preference is identical (i.e., qf |1 = · · · = qf |Nu ), we have pf = pf |j = qf |u , i.e., local content popularity and global content popularity are identical to the user preference. 2) When each user is uniformly distributed in the considered region (i.e., au1 = · · · = auNb ), we have pf = pf |j , i.e., local content popularity is identical to global content popularity no matter if user preferences are identical or not. 3) When both user preference and user location probability are non-identical, global content popularity, local content popularity and user preference are different in general. In practice, Q and s can be learned by CF methods such as pLSA [24, 27] or MF [26, 28, 31] at a service gateway or even a content server, which are assumed perfect in the following analysis, since our focus is to find when exploiting user preference is beneficial. In Section V, we will evaluate the impact of imperfect user preference learning via simulation. III. C ACHING P OLICY O PTIMIZATION W ITH U SER P REFERENCE In practice, the exact location where each user sends the file request is unknown a priori when optimizing the caching policy. In this section, we first derive the download time of each user averaged over user location considering the user spatial locality. Then, we establish a framework to optimize caching policy aiming at improving the network performance as well as user fairness. Since the optimal policy is not with closed-form expression, we demonstrate its behavior analytically in special cases and numerically with toy examples. To derive the file download time averaged over user location, we divide each cell into 12 sectors as shown in Fig. 1. In this way, the lth nearest BS of the uth user, i.e., blu , does not depend on user location any more given that the user locates in the ith sector of the jth cell. Based on the law of total expectation, the average download time of the uth user requesting the f th file can be expressed as Nb X 12    X f  f  auj (9) Exu tfu (xu )|ij Exu tu (xu ) = Eij Exu tu (xu )|ij = 12 j=1 i=1 f  where Exu tu (xu )|ij is the average download time of the user conditioned on that it is located at the ith sector of the jth cell. auj 12 is the probability that the uth user locates at the ith sector of the jth cell. Further considering (4), we can obtain October 30, 2017 DRAFT 10      Exu tfu1 (xu )|ij ,       f   Exu tfu2 (xu )|ij , Exu tu (xu )|ij =     Exu tfu3 (xu )|ij ,        Exu tfu4 (xu )|ij , cb1ij f ≥ 1 P2 P1 c l f < 1 and b l=1 cblij f ≥ 1 l=1 ij P2 P3 l=1 cblij f < 1 and l=1 cblij f ≥ 1 P3 l=1 cblij f < 1 (10) where blij is the lth nearest BS when the user is located in the ith sector of the jth cell. From (3), we can obtain k−1 k−1 X X   fk cblij f (τ̄ubkij − τ̄ublij ) = F τ̄uk − F cblij f (τ̄uk − τ̄ul ) Exu tu (xu )|ij = F τ̄ubkij − F l=1 (11) l=1 where τ̄ublij , Exu [τublij (xu )|ij] is the download time per bit from the lth nearest BS averaged over user location given that the user is located in the ith sector of the jth cell. Due to the symmetry of the network topology, τ̄ublij does not depend on i and j but only depend on l. Therefore, we use τ̄ul instead of τ̄ublij in the following for notational simplicity, whose value can be computed from Proposition 1. Since the average download time per bit increases with the distance between user and BS, we have τ̄uk > τ̄u(k−1) . Further considering the expressions of (10) and (11), similar to the proof of [9, Lemma 6], we can rewrite (10) as     Exu tfu (xu )|ij = max {Exu tfuk (xu )|ij } (12) k=1,··· ,4 Proposition 1. The average download time per bit of the uth user when downloading file from its lth nearest BS can be obtained as √ Z D Z x√u2  Z ∞ Z ∞ 3 2 3 ··· log2 τ̄ul = Wu D 2 0 0 0 0 × f1 (hul ) Y b′ ∈Φ l f2 (hub′ )dhul ,b′ 6=l where f1 (x) = e−x and f2 (x) = xNt −1 e−xNt −N Nt t (Nt −1)! Y b′ ∈Φ l 1+ P ,b′ 6=l Pt h r −α Nt ul ul b′ ∈Φl ,b′ 6=l dhub′ −1 −α 2 Pt hub′ rub ′ + σ dxu1 dxu2 ! (13) for Rayleigh fadings. Proof: See Appendix A. Since the interference term in (13) is a sum of Gamma distributed random variables with −α different values of rub ′ , τ̄ul has no closed form expression and the computation requires a |Φl |+2- fold numerical integration that is of high complexity. In the following corollary, we introduce October 30, 2017 DRAFT 11 an accurate approximation for the interference term as in [32] and obtain the approximated τ̄ul for high signal-to-noise ratio (SNR) region. Pt σ2 → ∞, τ̄ul can be approximated as √ Z D Z x√u2  −1 3 1 1 kx 2 3 + ψ(θx ) − ψ(θy ) dxu1 dxu2 log2 τ̄ul ≈ Wu D 2 0 0 ky ln 2 ln 2 Corollary 1. When (14) where ψ(·) is the Digamma function, kx , ky , θx , and θy are given in Appendix B. Proof: See Appendix B. We can see from (14) that by employing Gamma approximation, the computation of τ̄ul only requires a double numerical integration, which is much easier to compute.4 Then, by substituting (13) (or (14)) into (11) and further considering (12) and (9), the download time of the uth user averaged over its possible file requests and locations can be obtained as Nf Nb X k−1 12 X o n X f  X auj qf |u cblij f (τ̄uk − τ̄ul ) max F τ̄uk − F t̄u = Ef Exu tu (xu ) = 12 k=1,··· ,4 j=1 i=1 f =1 l=1  (15) A. Caching Policy Optimization The network average download time is the file download time averaged over the requests of all the users in the considered region, which can reflect average user experience. Intuitively, more requests can be served during a certain period with the decrease of network average download time, which implies high throughput of the network. Hence, it is a performance metric from the network perspective and is widely used in literature [9, 22, 23], which can be expressed as ) ( Nf Nb X k−1 Nu Nu X 12 X X X F X cblij f (τ̄uk − τ̄ul ) (16) auj quf max τ̄uk − su t̄u = T = k=1,··· ,4 12 u=1 j=1 i=1 f =1 u=1 l=1 To capture user fairness, we consider the weighted user average download time max {wu t̄u }. u=1,··· ,Nu When the weight wu is set identical for all the users, it reflects the fairness among the users sending file requests. Considering that the users with more file requests will suffer more if they have longer download time, we can also set wu as an increasing function of the user active level su . As an illustration, we set wu = Nu su in the sequel. Then, the weighted average download time can be expressed as 4 When analyzing the network without such symmetric topology, we can still divide each cell into several sectors so that the neighboring BS set is fixed in each sector and then computed τ̄ubl by Monte Carlo method. ij October 30, 2017 DRAFT 12 wu t̄u = Nu su t̄u = Nu Nf Nb X 12 X X auj quf max k=1,··· ,4 j=1 i=1 f =1 ( τ̄uk − k−1 X l=1 cblij f (τ̄uk − τ̄ul ) ) (17) To improve network performance and user fairness at the same time, we formulate the following general optimization framework minimizing the weighted sum of these two metrics as min (1 − η)T + η max {Nu su t̄u } (18a) u=1,··· ,Nu {cbf } Nf X s.t. f =1 cbf ≤ Nc , ∀b (18b) 0 ≤ cbf ≤ 1, ∀f, b (18c) By changing the value of η from 0 to 1, we can obtain the caching policy from minimizing the network average download time to minimizing the maximal weighted user average download time. By introducing auxiliary variables µuf ij and ν, which are upper bounds of Pk−1 {τ̄ul − l=1 cblij f (τ̄uk − τ̄ul )}k=1,··· ,4 and {Nu su t̄u }u=1,··· ,Nu , respectively, we can convert the problem equivalently into min {cbf },{µuf ij },ν Nf Nb X Nu 12 X X F X auj quf (1 − η) 12 j=1 i=1 f =1 u=1 s.t. τ̄uk − Nu k−1 X l=1 µuf ij + ην (19a) cblij f (τ̄uk − τ̄ul ) ≤ µuf ij , ∀ i, j, u, f, k, (19b) Nf Nb X 12 X X j=1 i=1 f =1 Nf X f =1 ! auj quf µuf ij ≤ ν, ∀u cbf ≤ Nc , ∀b 0 ≤ cbf ≤ 1, ∀f, b (19c) (19d) (19e) which is a linear programming problem and can be solved by interior point method [33]. To reveal the behavior of the optimal caching policy, in what follows we analyze the solutions of the problem optimizing the performance respectively from the network and the user perspective. By setting η = 0, we can obtain the problem minimizing the network average download time, which is referred to as Problem 1. By setting η = 1, we can obtain the problem minimizing the maximal weighted average download, which is referred to as Problem 2. October 30, 2017 DRAFT 13 Since transmission and caching resource allocation operated in different time-scales, to analyze the impact of exploiting user preference on the optimal caching policy, we assume that the transmission resources are identical for each user (i.e., τ̄1l = · · · = τ̄Nu l , τ̄l ) in the following. Proposition 2. When each user is uniformly distributed throughout the network, exploiting user preference cannot improve network average download time. Proof: In this case, we have au1 = · · · = auNb = 1 , Nb τ̄1l = · · · = τ̄Nu l , and µ1f ij = · · · = uf µN , µfij . Then, the first term in (19a) can be rewritten as ij ! Nf Nf Nb X Nb X 12 X 12 X Nu X F X F X f quf µij = pf µfij 12Nb j=1 i=1 12N b j=1 i=1 u=1 f =1 (20) f =1 where the relation in (7) is used. We can see that the network average download time only depend on the global content popularity pf . Proposition 2 suggests that when the transmission resources are identical for all users, the gain of exploiting user preference disappears without user spatial locality. In other word, it implies that exploiting user preference can improve network average download time even without user spatial locality when the transmission resources are not the same. Proposition 3. When each user can only associate with the local BS (say the bth BS), the optimal solution of Problem 1 is c∗bf b = · · · = c∗bf b = 1, c∗bf b 1 Nc Nc +1 = · · · = c∗bf b = 0, where fib denotes Nf the file with the ith largest value in the local popularity of the bth cell {p1|b , · · · , pNf |b }. Proof: See Appendix C. Proposition 3 suggests that when the transmission resources are identical for users and the cells are not overlapped, the optimal caching policy minimizing the network average download time is simply to let each BS cache the most popular files according to local content popularity as used in [19, 28]. Otherwise, the caching policies should be designed more sophisticatedly. Proposition 4. When the location probabilities and the preferences are identical for all users, the optimal solutions of Problem 1 and Problem 2 are identical. Proof. In this case, since τ̄1l = · · · = τ̄Nu l , a1j = · · · = aNu j for all j, and qf |1 = · · · = qf |Nu for all f , we can see from (15) that the average download time of each user is identical, i.e., t̄1 = · · · = t̄Nu , t̄. Then, Problem 1 and Problem 2 are both equivalent to minimizing t̄. October 30, 2017 DRAFT 14 Proposition 4 suggests that when transmission resources, location distributions and preferences are identical for all users (i.e., the actual identity of each user is irrelevant), minimizing the network download time is equivalent to minimizing the maximal weighted user average download time. Otherwise, the optimal caching policies for Problems 1 and 2 can be quite different as we show later. In the sequel, we refer the optimal caching policies for Problem 1 and Problem 2 as Policy 1 and Policy 2, respectively. B. Numerical Examples To help understand the behavior of Policy 1 and Policy 2 and the impact of heterogeneous user preference in single and multi-cell, we consider two toy examples as shown in Fig. 2. UE2 BS1 BS1 (a) Single cell with two users. BS2 UE1 UE1 UE2 (b) Two cells with one user in each cell. Fig. 2. Two simple but typical numerical examples for understanding the caching policies, Nu = 2. The total number of files is Nf = 3 and each BS can cache Nc = 1 file. Suppose that each user can either associate with BS1 or BS2 to download files, and the average download time from the nearest BS, the second nearest BS and the backhaul are F [τ̄u1 , τ̄u2 , τ̄u4 ] = [1, 2, 3] for both user equipments (UEs). The global popularity is set as p = [0.46, 0.30, 0.24] (obtained from Zipf distribution with skewness parameter 0.6) and the active level of users is set as s = [0.6, 0.4]. To show the impact of different user preference similarity, we generate user preference matrix Q that satisfies (7) to achieve the average cosine similarity of user preference of 0.2, 0.6 and 1. By solving Problems 1 and 2, we can obtain Policy 1 (denoted as C∗ ) and the minimized network average download time T ∗ , Policy 2 (denoted as C† ) and the minimized maximal weighted user average download time max{Nu s1 t̄†1 , Nu s2 t̄†2 }, respectively. 1) Located in One Cell: In this case, the user location probability matrix is A = [1, 1]T and the optimization results are shown in Table. I. October 30, 2017 DRAFT 15 TABLE I N UMERICAL E XAMPLE , A = [1, 1]T Average Q  0.75  0.02  0.58  0.28  0.46  0.46 0.25 0.38 0.37 0.19 0.30 0.30 Problem 1 C∗ Similarity 0  Problem 2 s1 t̄∗1 + s2 t̄∗2 = T ∗ max{Nu s1 t̄†1 , Nu s2 t̄†2 } C† 0.2 h 1 0 0 i 0.90 + 1.18 = 2.08 h 0.79 0 i 0.21 max{2.17, 2.17} = 2.17  0.05  0.53 0.6 h 1 0 0 i 1.11 + 0.97 = 2.08 h 1 0 i 0 max{2.22, 1.94} = 2.22  0.24  0.24 1 h 1 0 0 i 1.25 + 0.83 = 2.08 h 1 0 i 0 max{2.50, 1.66} = 2.50  0.6 We can see from Table. I that when user preference similarity is low, i.e., 0.2, the most preferred file of UE1 and UE2 are file 1 (q1|1 = 0.75 > 0.25 > 0) and file 3 (q3|2 = 0.6 > 0.38 > 0.02), respectively. Therefore, UE1 prefers BS1 to cache file 1 so that its file download time can be minimized while UE2 prefers BS1 to cache file 3. Since UE1 is more active than UE2 that results in higher content popularity of file 1, Policy 1 lets BS1 cache file 1 completely, which agrees with Proposition 3. This, however, sacrifices the average download time of UE2 and makes UE2 have the maximal weighted user average download time (i.e. 1.18 > 0.90). Therefore, Policy 2 lets BS1 cache both files in part, i.e., 0.79 fraction of file 1 and 0.21 fraction of file 3. When user preference similarity increases to 0.6, for the similar reason, Policy 1 is still to let BS1 cache file 1. The average download time of UE1 increases while that of UE2 decreases, resulting in the same network average download time as the case with similarity of 0.2. However, in this case, the weighted average download time of UE1 becomes the maximal weighted user average download time and hence Policy 2 is also to let BS1 cache file 1 completely. Since the skewness of UE1 ’s preference decreases (i.e., the shape of probability distribution [0.75, 0.25, 0] is more “peaky” than [0.58, 0.37, 0.05]), which means the file request of UE1 becomes less deterministic, the maximal weighted user average download time increases. When user preference becomes identical, both users prefer BS1 to cache file 1 and hence both Policies 1 and 2 let BS1 cache file 1, which agrees with Proposition 4. Since the skewness of UE1 ’s preference continues to decrease, the maximal weighted user average download time increases compared to the case with similarity 0.6. October 30, 2017 DRAFT 16 2) Located in Different Cells: In this case, the user location probability matrix is A = [ 10 01 ] and the optimization results are shown in Table. II. TABLE II N UMERICAL E XAMPLE , A =[ 10 01 ] Average Q  0.75  0.02  0.58  0.28  0.46  0.46 0.25 0  0.38  0.6 0.37 0.05  0.19 0.53  0.30 0.24  0.30 Problem 1 C∗ Similarity 0.24  0.2  1  0 0.6  1  0 1  1  0 0 0 0 0 0 1 Problem 2 s1 t̄∗1 + s2 t̄∗2 = T ∗  0  1  0  1  0  0 0.90 + 0.71 = 1.61  1  0 1.08 + 0.66 = 1.74  1  0 1.07 + 0.77 = 1.84 max{Nu s1 t̄†1 , Nu s2 t̄†2 } C† 0 0 0.57 0  1  0  0.43 0 0.88 0 1    0.12  0  0 max{1.63, 1.63} = 1.63 max{1.81, 1.81} = 1.81 max{2.14, 1.55} = 2.13 We can see from Table. II that when user preference similarity is low, UE1 prefers its local BS (i.e., BS1 ) to cache its most preferable file (i.e., file 1) and its neighboring BS (i.e., BS2 ) to cache its second preferable file (i.e., file 2), while UE2 prefers BS2 to cache file 3 and BS1 to cache file 2 according to its own preference. As a result, Policy 1 lets each BS cache the most preferable file of its local user, i.e. BS1 caches file 1 and BS2 caches file 3. As the user with higher active level, UE1 has the maximal weighted user average download time. Hence, Policy 2 is more prone to let BSs cache the files preferred by UE1 , i.e., let BS2 cache 0.57 fraction of file 1 and 0.43 fraction of file 3. When user preference similarity increases to 0.6, for the similar reason, Policy 1 is to let each BS cache the most preferable file of its local user, i.e. BS1 caches file 1 and BS2 caches file 3. Again, due to higher active level, UE1 has the maximal weighted user average download time. Moreover, since the skewness of UE1 ’s preference decreases with user preference similarity for a given content popularity, Policy 2 is more prone to let the BSs cache the files preferred by UE1 than the case with similarity 0.2, i.e., let BS2 cache 0.88 fraction of file 1 and 0.12 fraction of file 3. We can also see that the decrease of the skewness of UE1 ’s preference increases both the average network download time and the maximal weighted user average download time. When user preference becomes identical, Policy 1 and Policy 2 become the same, which agrees with Proposition 4. Since the skewness of user preference continues to decrease, both the average network download time and the maximal weighted user average download time increase. October 30, 2017 DRAFT 17 From the analysis of the typical scenarios, we can observe that both network performance and user fairness can be improved by exploiting less-similar user preference. This is because the content popularity in a region is formed by the preferences of the users. To achieve a given popularity, the skewness of user preference increases with the preference heterogeneity. The performance of user preference based caching policies increases with the skewness of user preference, analogous to the widely recognized result that the performance of content popularity based caching policies increases with the skewness of content popularity. IV. R EAL DATASETS A NALYSIS AND U SER P REFERENCE S YNTHESIS The performance of cache-enabled network highly depends on the user behavior in requesting contents, both collectively and individually. In this section, we first analyze content popularity, user active level, and user preference based on two real datasets. To fairly compare the optimized caching policies with user preference and content popularity, we then propose a method to synthesize user preference with given content popularity and user active level. A. Real Datasets Analysis We use Million Songs Dataset (MSD) [29] and Lastfm-1K Dataset [30] to analyze the user request behavior for songs. The reason why we chose these two music datasets is that a song is often requested by a user many times so that the ground truth of user preference can be obtained from the frequency of each user’s requests for each song. MSD records user listening data in the form of <user, song, play counts> gathered from undisclosed partners, which contains 1019318 users and 384546 songs. The Lasmfm-1K Dataset records user listening data in the form of <user, timestamp, artist, song> tuples collected from Last.fm API, which represents the listening habits for 992 users and 1012 songs. To capture the main trends of user demands statistics, we choose the 100 most active users and the 300 most popular files requested by these users for analysis, which generate more than 75% of the traffic in the data. In Fig. 3(a) we show the number of requests for each file in descending order. We can see that the content popularity of both datasets can be well fitted as Zipf distribution. The popularity skewness parameters are δp = 0.21 for Lastfm and δp = 0.74 for MSD, respectively. In Fig. 3(b) we show the number of requests from each user in descending order. We can see that user active level can also be well fitted as Zipf distribution for both datasets, whose skewness parameters are δs = 0.31 for Lastfm and δs = 0.44 for MSD. October 30, 2017 DRAFT 18 105 106 Lastfm Zipf, δ = 0.31 s MSD Zipf, δ = 0.44 Number of Requests Number of Requests s 104 103 105 104 Lastfm Zipf, δ p = 0.21 MSD Zipf, δ = 0.74 p 102 100 101 103 100 102 101 File Rank 102 User Rank (a) Content popularity. (b) User active level. Fig. 3. Content popularity and user active level of MSD and Lastfm datasets. To show the absolute number of requests, we do not normalize the content popularity and user active level as probability distributions here. 104 0.9 0.8 0.7 0.6 CDF 103 Number of Requests 1 Lastfm UE10 Lastfm UE10 (Synthetic) Lastfm UE90 Lastfm UE90 (Synthetic) MSD UE10 MSD UE10 (Synthetic) MSD UE90 MSD UE90 (Synthetic) 102 0.5 0.4 0.3 101 Lastfm Synthetic, θ = 0.98 MSD Synthetic, θ = 0.21 0.2 0.1 10 0 100 101 102 103 104 File Rank (a) User preference 0 0 0.2 0.4 0.6 0.8 1 User Preference Simialrity (b) CDF of user preference similarity Fig. 4. User preference and the CDF of user preference similarity. The dashed lines are plotted from the synthetic user preference in Section IV-B. Again, we do not normalize the user preference. In Fig. 4(a), we show the number of requests for each file of the 10th (i.e., more active) and 90th (i.e., less active) users in the two datasets. To show the shape of user preference, we re-rank the files by the number of requests for each user. We can see that user preference is also skewed, but the skewness is quite different for each user.5 In Fig. 4(b), we show the cumulative 5 In fact, the file rank is also quite different for each user. For example, in MSD, the top 5 preferable files of UE10 and UE90 are files with popularity ranking [52, 36, 41, 20, 31] and files with popularity ranking [186, 50, 24, 97, 158], respectively. October 30, 2017 DRAFT 19 distribution function (CDF) of the cosine similarity between every two-user pair. We can see that the cosine similarity distributions are quite different between Lastfm and MSD. For Lastfm, more than 90% of the user pair similarity is more than 0.8, while for MSD, about 80% of similarity is less than 0.2. Furthermore, we compute the average cosine similarity given by (6), which are 0.84 for Lastfm and 0.04 for MSD, respectively. The differences of user preference similarity between these two datasets may result from different file catalog size (MSD is much larger than Lastfm) and different music recommendation methods (e.g, personalized recommend v.s. popularity based recommend). Since the data of MSD is gathered from undisclosed partners, we are not able to further analyze the reasons behind this. Nevertheless, this suggests that the similarity of user preference varies significantly in real world. B. User Preference Synthesization As illustrated by previous two datesets, in different areas and for different catalogers of contents in real-world networks, content popularity, user active level, and user preference similarity are quite different, which jointly affect the caching polices. To analyze the impact of user preference similarity on caching policies and the corresponding performance, user preference matrix Q with difference levels of similarity is needed for evaluation. To differentiate the impact of each single factor, we need to control these factors separately, while the existing user preference synthesization methods such as [19, 24] fail to do so. In what follows, we synthesize user preference with different similarity for a given content popularity p and user active level s. From the definition of user preference, with given p and s, each element in matrix Q should satisfy the following constraints. Nu X u=1 Nf X f =1 su qf |u = pf , ∀f (21a) qf |u = 1, ∀u (21b) 0 ≤ qf |u ≤ 1, ∀f, u (21c) where (21a) is the relation between user preference and content popularity, (21b) and (21c) are the probability constraints. One way to obtain synthetic user preference with different level of similarity is to directly solve the equations and inequations in (21a)–(21c) as well as an equation by setting cos(Q) in (6) equal to the given similarity. However, the solution is hard to obtain October 30, 2017 DRAFT 20 since the expression of cos(Q) is complicated, and the solution is not unique. Furthermore, the solution does not tell the shape of user preference, which is also skewed like content popularity as shown in Fig. 4(a). Hence, we provide an alternative way. The basic idea of our user preference synthesization method is as follows. Obviously, when each user’s preference is identical to the content popularity, i.e., qu = p for u = 1, · · · , Nu , the average cosine similarity achieves the maximal value, i.e., cos(Q) = 1. To obtain heterogeneous (i.e., less similar) user preferences whose shapes have relation with the shape of popularity, we make each element of qu fluctuate around the content popularity. Then, by introducing a parameter θ to adjust the fluctuation range, the similarity (and also the shape) of user preference can be controlled. In Algorithm 1, we generate the preference of each user in a successive manner. We first randomly chose a user and determine its preference. Suppose that the firstly chosen user is the uth user. Considering constraints (21a) and (21c), the preference of the uth user for the f th p file is upper bounded by q̄u|f = min{ suf , 1}. Then, we randomly choose a file from the file set F = {1, · · · , Nf } for the uth user. By introducing the parameter θ and selecting qf |u randomly from [θpf , θpf + (1 − θ)q̄f |u ] (i.e., the fluctuation range), we can adjust qf |u from identical to content popularity (i.e., θ = 1) to fluctuating between [0, q̄u|f ] (i.e., θ = 0). To satisfy (21b), qf |u is further adjusted as min{qf |u , 1}. Then, we remove the f th file from F and randomly choose PNf qf |u = 1 a file in F again for the uth user and repeat the similar procedures as above until f =1 P Nf or F is empty. If f =1 qf |u = 1, we remove the uth user in the user set U, update the content popularity for the rest of users, and generate the preference of the next user similarly. Otherwise, we randomly increase the value of qf |u that satisfies qf |u < qf |u so that (21b) can be satisfied, and then move on to the next user. The detailed procedures are given in Algorithm 1. By considering the users in a cell or a region, we can synthesize user preference for a given global popularity or local popularity with the algorithm. In Fig. 4(a), we plot the synthetic user preference of the 10th and 90th active user based on the popularity and active level of Lastfm and MSD datasets. The parameter θ are chosen as θ = 0.98 and θ = 0.21 for Lastfm and MSD, respectively, so that the average cosine similarity of user preference is the same for the dataset and the synthetic preference. We can see that the shapes of the synthetic user preference are similar to the datasets, which suggests that the synthetic user preference can reflect real user preference. In Fig. 4(b), we further plot the CDF of the similarity cos(qu , qm ) defined in (5) of the synthetic user preference to compare the distribution of user October 30, 2017 DRAFT 21 preference similarity between the synthetic data and real data. We can see that the synthetic user preference can fit both datasets well. Algorithm 1. Synthesize user preference for given p and s Input: p, s, θ 12: F̃ ← {f | qf |u < q̄f |u } Output: Q 13: while l > 0 do 1: Q ← 0, p̃ ← p, ρ ← p, U ← {1, · · · , Nu } where p̃ , [p̃1 , · · · , p̃Nf ], ρ , [ρ1 , · · · , ρNf ] 2: while U is not empty do n ρ su , 1 o a 14: Randomly chose a file f ′ in F̃ 15: q̃f ′ |u ← min{qf ′ |u + l, q̄f ′ |u } 16: l ← l − (q̃f ′ |u − qf ′ |u ) 17: qf ′ |u ← q̃f ′ |u if qf ′ |u = q̄f ′ |u then 3: q̄u ← min 4: F ← {1, · · · , Nf }, l ← 1 18: 5: while l > 0 and F is not empty do 19: Remove f ′ from F̃ 6: Randomly chose a file f in F 20: end if 7: Set q̃f |u ∈ [θ p̃f , θp̃f +(1−θ)q̄f |u ] randomly  θ  l P , l, q̄f |u qf |u ← min q̃f |u p̃ ′ ′ 21: end while 8: f ∈F 9: 10: 11: a f l ← l − qf |u , q̃f |u ← 0, remove f from F end while if l > 0 then 22: end if 23: ρ ← ρ − su qu 24: p̃ ← ρ PN f f =1 ρf , remove u from U 25: end while Here, q̄u , [q̃1|u , · · · , q̃Nf |u ] and min{x, z} , [min{x1 , z}, · · · , min{xn , z}]. V. S IMULATION R ESULTS In this section, we compare the performance of the proposed caching policies with priori works, and analyze the impact of various factors by simulation. Consider Nb = 7 cells with radius D = 250 m as shown in Fig. 1. Each BS is with four transmit antennas. The backhaul bandwidth and the downlink transmission bandwidth for each user are set as Cbh,u = 2 Mbps and Wu = 5 MHz, respectively. We consider Rayleigh fading channels and the pathloss is modeled as 35.5 + 37.6 log10 (rub ). To reduce simulation time, we set the total number of users in the considered region as Nu = 100, and set Nf = 100 files each with size of F = 30 MB. We assume that each BS can cache 10% of the total files, i.e., Nc = 10. The probability distribution for the users located in different cells is modeled as Zipf distribution as auju = j −δa PNb −δ , a j=1 j where ju is the jth probable cell the uth user may locate in and the skewness parameter is δa = 1 based on the measured data in [20]. A larger value of δa October 30, 2017 DRAFT 22 for a user indicates that the user is located in few cells with high probability. To analyze the impacts of user preference and active level and fairly compare with existing caching policies, we use the synthetic user preference for simulation. The global content popularity is modeled as Zipf distribution pf = f −δp PNf −δp , n=1 n where the skewness parameter is δp = 0.6. The active level of each user is also modeled as Zipf distribution as su = u−δs PNu −δ , s u=1 u where the skewness parameter is δs = 0.4 according to the dataset analysis in the previous section. Unless otherwise specified, the above setting is used throughout the simulation. To obtain synthetic user preference with different level of average cosine similarity, we adjust the value of θ in Algorithm 1 from 0 to 1. The following caching policies are compared: 1) “Global Pop”: Each BS caches the Nc most popular files according to the global content popularity pf . 2) “Local Pop”: Each BS caches the Nc most popular files according to the local content popularity within its cell pf |j given by (8). This is the method used in [19, 28]. 3) “Femtocaching (Pop)”: This is the caching policy proposed in [9] minimizing the network average download time, which is based on global content popularity assuming that user location is fixed. To show the impact of uncertain user location, we obtain the caching policy based on one realization of user location and then fix the caching policy for the rest of realizations of user locations. 4) “Femtocaching (Pref)”: We modify the caching policy in [9] to exploit user preference by simply replacing the global content popularity pf by user preference qf |u . This method still assumes the location of each user is known a priori when optimizing the caching policy. 5) “Min average DL time (Pop)”: The optimal solution of Problem 1, where quf is replaced by pf . This is the optimal caching policy minimizing the network average download time without the knowledge of user preference and active level, i.e., regard user preference as identical to content popularity and regard the active level of different users as identical. 6) “Min average DL time (Pref)”: The optimal solution of Problem 1, i.e., Policy 1. 7) “Min max DL time (Pop)”: The optimal solution of Problem 2, where quf is replaced by pf . This is the optimal caching policy minimizing the maximal user weighted average download time without the knowledge of user preference and active level. 8) “Min max DL time (Pref)”: The optimal solution of Problem 2, i.e., Policy 2. In Fig. 5(a), we show the impact of user preference similarity on the network average download October 30, 2017 DRAFT 23 350 Maxmial Weighted Average Download Time Network Average Download Time 90 85 80 75 Gobal Pop Local Pop Femtocaching (Pop) Femtocaching (Pref) min average DL time (Pop) min average DL time (Pref) 70 65 300 250 200 Gobal Pop Local Pop Femtocaching (Pop) Femtocaching (Pref) min max DL time (Pop) min max DL time (Pref) 150 100 0 0.2 0.4 0.6 0.8 1 0 Average Cosine Similarity of User Preference (a) Network averge download time 0.2 0.4 0.6 0.8 1 Average Cosine Similarity of User Preference (b) Maximal weighted user average download time Fig. 5. The impact of user preference similarity, δa = 1 and δs = 0.4. time (in seconds). It is shown that “Local Pop” can reduce network average download time compared with “Global Pop” when user preferences are heterogeneous. “Femtocaching (Pop)” and “min average DL time (Pop)” almost perform the same without exploiting individual user preference. This is because when user preference and user active level are regarded as identical, the actual identity of the user is irrelevant (i.e., there is no difference among users statistically). When a user (say the uth user) changes its location, and another user locates in the previous location of the uth user, the caching solution will be same as the previous solution [9]. However, when taking into account the preference of individual user, the performance is quite different. The network average download time of “Femtocaching (Pref)” is even higher than that of “Femtocaching (Pop)” when user preference is less similar. This is because “femtocaching” method does not consider the uncertainty of user location, which has large impact when user preference is heterogeneous, in which case user identity is no longer irrelevant. As expected, “min average DL time (Pref)” achieves the lowest network average download time. Besides, the network average download time of “min average DL time (Pref)” increases with the preference similarity, which coincides with the results of numerical example in Section III-B-2). In Fig. 5(b), we show the impact of user preference similarity on the maximal weighted user average download time (in seconds). We can see that “min max weighted DL time (Pref)” can reduce 60% of the maximal weighted user average download time compared with “Global Pop”. However, with “min max DL time (Pop)”, the maximal weighted user average download time October 30, 2017 DRAFT 24 does not decrease much compared with other caching policies. This suggests that the knowledge of user preference is important when improving user fairness by caching. Similar to Fig. 5(a), the maximal weighed download time of “Femtocaching (Pref)” is higher than “Femtocaching (Pop)”. The maximal weighted user average download time of “min max DL time (Pref)” increases with the preference similarity, and the explanations are similar to those in Section III-B. 86 Maxmial Weighted Average Download Time 320 Network Average Download Time 84 Gobal Pop Local Pop Femtocaching (Pop) Femtocaching (Pref) min average DL time (Pop) min average DL time (Pref) 82 80 78 76 74 72 70 68 300 280 260 240 Gobal Pop Local Pop Femtocaching (Pop) Femtocaching (Pref) min max DL time (Pop) min max DL time (Pref) 220 200 180 160 140 120 0 1 2 3 4 5 0 User Location Skewness Parameter, δa (a) Network averge download time 1 2 3 4 5 User Location Skewness Parameter, δa (b) Maximal weighted user average download time Fig. 6. Impact of user location skewness parameter, δa . The average user preference similarity is set as cos(Q) = 0.1. In Fig. 6, we show the impact of user location skewness on the two performance metrics. As shown in Fig. 6(a), the network average download time of “Local Pop” and other user preference based caching policies decreases with user location skewness parameter δa . Moreover, when δa = 0, i.e., each user is with equal probability to locate in the Nb cells, “min average DL time (Pref)” achieves the same performance as “min average DL time (Pop)”, which verifies Proposition 2. When δa = 5, i.e., each user is with −5 P71 −5 j=1 j = 0.96 probability located in a cell, “min average DL time (Pref)” reduces 20% of the network download time compared with “Global Pop”. This suggests that the benefit of exploiting user preference highly relies on the spatial locality of a user. As shown in Fig. 6(b), the maximal weighted user average download time of “Local Pop” and other user preference based caching policies also decrease with δa . When δa = 5, “min average DL time (Pref)” can reduce 55% of the maximal weighted user average download time compared with “Global Pop”. On the contrary, the spatial locality has little impact on both metrics achieved by the global popularity based caching policies, because these policies regard user preference and user active level as identical. October 30, 2017 DRAFT 25 1800 Maxmial Weighted Average Download Time Network Average Download Time 85 80 75 70 Gobal Pop Local Pop Femtocaching (Pop) Femtocaching (Pref) min average DL time (Pop) min average DL time (Pref) 65 60 Gobal Pop Local Pop Femtocaching (Pop) Femtocaching (Pref) min max DL time (Pop) min max DL time (Pref) 1600 1400 1200 1000 800 600 400 200 0 0 0.2 0.4 0.6 0.8 1 0 User Active Level Skewness Parameter, δs (a) Network averge download time 0.2 0.4 0.6 0.8 1 User Active Level Skewness Parameter, δs (b) Maximal weighted user average download time Fig. 7. Impact of user active level, δs . The average user preference similarity is set as cos(Q) = 0.1. In Fig. 7, we show the impact of user active level skewness on the two metrics. We can see from Fig. 7(a) that the network average download time of all caching policies decreases with δs (though slightly for “Global Pop”). This is because when the skewness of user active level increases, the caching solutions are determined more by the preference of highly active users, and hence the average download time of these users decreases, which reduces the network average download time. As shown in Fig. 7(b), the maximal weighted user average download time of all caching policies increase with δs . This is because the weights for highly active users increase with δs . As expected, the maximal weighted user average download time of “min max DL time (Pref)” is the lowest, and the performance gain increases with δs . In Fig. 8, we show the tradeoff between network average download and maximal weighted user average download time by solving problem (18) with different values of η. It is shown that when η is set between 0 and 0.25, we can achieve lower network average download time and better user fairness than the baseline policies at the same time. In Fig. 9, we show the impact of imperfect user preference. We compare the following methods to learn user preference or content popularity: (1) “Frequency”: this method uses the frequencycount method in [34] to learn user preference, i.e., q̂uf = nuf PNu PNf u=1 f =1 nuf , where nuf is the number of requests of the uth user requesting the f th file. (2) “MF” : this is a CF method proposed in [31] that learns user preference by matrix factorization. Since the learned user preference by this method is not in probability form as we applied for optimization, we obtain the probability that October 30, 2017 DRAFT 320 450 Global Pop Local Pop Femtocaching (Pop) Opt. Solution of (18) 300 280 min max DL time (Frequency) min max DL time (Popularity) min max DL time (MF) min max DL time (Perfect) min average DL time (Frequency) min average DL time (Popularity) min average DL time (MF) min average DL time (Perfect) 400 350 Download Time Maximal Weighted User Average Download Time 26 260 η = 0, min average DL time (Pref) 240 220 300 250 200 Maximal Weighted User Averge DL Time 150 200 η = 1, min max DL time (Pref) 180 100 Network Average DL Time η = 0.25 160 74 76 78 80 82 84 50 102 86 103 104 Total Number of Requests Network Average Download Time Fig. 8. Tradeoff between network average download time and Fig. 9. Impact of imperfect user preference learning. The maximal weighted user average download time, cos(Q) = 0.1. average user preference similarity is set as cos(Q) = 0.3. each user requests each file by normalizing the learned preference. (3) “Popularity”: this method learns global content popularity also with frequency-count method as p̂f = PNu u=1 nuf PNf PNu u=1 nuf f =1 [34] and then optimizes caching policy based on the learned popularity. To show the learning rate of these methods, we use the total number of requests in the considered region as x-axis. When the total number of requests exceeds 300 (i.e., higher than 3 requests by each user on average), the caching policies based on learned user preference by “Frequency” method outperform the caching policies based on learned global content popularity. The caching policies based on learned user preference by “MF” method outperform both “Popularity” and “Frequency” methods, and can achieve performance close to caching policies with perfect user preference when the total number of requests exceeds 104 (i.e., more than 100 requests for each user on average).6 It is worthy to mention that learning individual preference of a large number of users can be more computational complex than learning content popularity (even all with the simple frequency-count method), and informing the predicted user preference to BSs may cause overhead. Fortunately, in contrast to content popularity that has been observed with spatial locality and hence should be learned at more-edged nodes, user preference can be learned at a service gateway or even a content server7 that has abundant computing resource. Moreover, it is no need to learn very frequently (say each day). Nevertheless, to harness the benefit of user preference 6 If each user sends 25 requests per day in average, then 4 days are required. 7 This is possible since there is a trend of collaboration of mobile operators and content providers. Moreover, content providers have investigated user preference prediction for a long time since it is a key task for recommendation systems [25]. October 30, 2017 DRAFT 27 based caching policy, it is worthwhile to investigate how to reduce the complexity and overhead. VI. C ONCLUSION In this paper, we proposed a caching policy optimization framework taking into account the spatial locality, heterogeneous preference and active level of users to minimize the network average download time and the maximal weighted user average download time. We showed in which case the global content popularity, local content popularity and user preference are identical and in which case they differ. To facilitate the investigation of how user preference similarity and active level skewness affect the optimal caching policies, we provided a method to synthesize user preference with given content popularity and user active level and validated it with two real datasets. Simulation results showed that both network performance and user fairness can be improved remarkably by exploiting individual user preference compared with priori works exploiting content popularity, as expected. For a region with given content popularity, the gain of the proposed policy is large when user preferences are less similar or when user active levels are more skewed, and more importantly, when each user is with spatial locality. Since in real-world networks the user preferences are indeed heterogeneous and each user indeed sends request in limited locations as observed by many recent data analysis, optimizing caching policy with user preference is promising to reap the benefit of caching at wireless edge. A PPENDIX A P ROOF OF P ROPOSITION 1 From (2), we can obtain R̄ub (xu ) =Wu Z ∞ 0 ··· × f1 (hub ) where f1 (x) = e−x and f2 (x) = Z ∞ 0 log2 Y b′ ∈Φb ,b′ 6=b xNt −1 e−xNt −N Nt t (Nt −1)! 1+ P Pt h r −α Nt ub ub b′ ∈Φb ,b′ 6=b f2 (hub′ )dhub Y −α 2 Pt hub′ rub ′ + σ dhub′ ! (A.1) b′ ∈Φb ,b′ 6=b because hub and hub′ follow exponential distribution with unit mean and Gamma distribution G(Nt , N1t ), respectively, and (xb , yb ) is the location of the bth BS. October 30, 2017 DRAFT 28 Without loss of generality, we derive the average download time from the three nearest BSs when the uth user located the 1st sector of the 1st cell, i.e., the shadow area in Fig. 1. From (1), by taking the expectation over xu within the shadow area, we have √ Z D Z x√u2 3 1 2 3 dxu1 dxu2 τ̄ul = 2 Wu D 0 0 R̄ul (xu ) (A.2) Further considering (A.1), Proposition 1 can be proved. A PPENDIX B P ROOF When Pt σ2 OF C OROLLARY 1 → ∞, we can neglect the impact of σ 2 and (2) can be derived as R̄ub (xu ) = Wu Ehub [log2 X] − Wu Ehub′ [log2 Y ] ≈ Wu Ehub [log2 X̂] − Wu Ehub′ [log2 Ŷ ] (B.1) P P −α −α −α where X = hub rub + Nt b′ ∈Φb ,b′ 6=b hub′ rub = Nt b′ ∈Φb ,b′ 6=b hub′ rub ′, Y ′ , and we approxi- mate X and Y as Gamma distributed random variables X̂ ∼ G(kx , θx ) and Ŷ ∼ G(ky , θy ), respectively, as in [32]. By matching the first two moments of X and X̂, we can obtain P P P −α −α 2 −α 2 −2α −2α Nt ( b′ ∈Φ ,b′ 6=b rub +Nt b′ ∈Φ ,b′ 6=b rub rub +Nt b′ ∈Φ ,b′ 6=b rub (rub ′) ′) ′ b b b P P P kx = r−2α , k = , θ = , and θy = y x r −α +N r −α +N r −2α r −2α t ub −2α b′ ∈Φb ,b′ 6=b rub′ P −α b′ ∈Φb ,b′ 6=b rub′ P b′ ∈Φb ,b′ 6=b ub′ t ub b′ ∈Φb ,b′ 6=b ub′ b′ ∈Φb ,b′ 6=b ub′ . Considering E[ln X̂] = ψ(kx ) + ln(θx ), (B.1) can be derived as R̄ub (xu ) ≈ W (log2 kx − log2 ky + 1 ψ(θx ) ln 2 − 1 ψ(θx )) ln 2 (B.2) Then, by substituting (B.2) into (A.2), Corollary 1 can be proved. A PPENDIX C P ROOF OF P ROPOSITION 3 When each user can only associate with the nearest BS, the average download time of the P b PNf uth user in (15) can be simplified into t̄u = F N f =1 auj qf |u (cjf τ̄1 + (1 − cjf )τ̄4 ), where j=1 τ̄1 and τ̄4 are respectively the average download time per unit bit from cache at the nearest BS P u and from the backhaul. Then, by substituting t̄u and (8) into T = N u=1 su t̄u , the optimization problem of minimizing the network average download time can be expressed as   X Nf Nb  X Nu X pf |j (cjf τ̄1 + (1 − cjf )τ̄4 ) min F auj su {cjf } s.t. j=1 Nf X f =1 u=1 cjf ≤ Nc , ∀j 0 ≤ cjf ≤ 1, ∀f, j October 30, 2017 (B.3a) f =1 (B.3b) (B.3c) DRAFT 29 which can be solved from the following problem for each cell   Nf X pf |j cjf τ̄1 + (1 − cjf )τ̄4 min {cjf } s.t. (B.4a) f =1 Nf X cjf ≤ Nc (B.4b) 0 ≤ cjf ≤ 1, ∀f (B.4c) f =1 PNf PNf We can rewrite the objective function (B.4a) as f =1 pf |j (cjf τ̄1 + (1 − cjf )τ̄4 ) = f =1 pf |j τ̄4 − PNf f =1 pf |j cjf (τ̄4 − τ̄1 ), from which we can see that minimizing (B.4a) is equivalent to maximizing PNf f =1 pf |j cjf (τ̄4 − τ̄1 ). Since τ̄4 > τ̄1 , the optimal caching policy is to cache the Nc complete files with the highest value of pf |j for each cell, say cell j. Then, Proposition 3 is proved. R EFERENCES [1] N. Golrezaei, A. F. Molisch, A. G. Dimakis, and G. Caire, “Femtocaching and device-to-device collaboration: A new architecture for wireless video distribution,” IEEE Commun. Mag., vol. 51, no. 4, pp. 142–149, 2013. [2] E. Bastug, M. Bennis, and M. Debbah, “Living on the edge: The role of proactive caching in 5G wireless networks,” IEEE Commun. Mag., vol. 52, no. 8, pp. 82–89, Aug. 2014. [3] D. Liu and C. Yang, “Energy efficiency of downlink networks with caching at base stations,” IEEE J. Sel. Areas Commun., vol. 34, no. 4, pp. 907–922, Apr. 2016. [4] D. Liu, B. Chen, C. Yang, and A. F. Molisch, “Caching at the wireless edge: design aspects, challenges, and future directions,” IEEE Communications Magazine, vol. 54, no. 9, pp. 22–28, Sept. 2016. [5] D. Liu and C. Yang, “Caching policy toward maximal success probability and area spectral efficiency of cache-enabled hetnets,” IEEE Trans. Commun., vol. 65, no. 6, pp. 2699–2714, Jun. 2017. [6] H. Pinto, J. M. Almeida, and M. A. Gonçalves, “Using early view patterns to predict the popularity of youtube videos,” in Proc. ACM WSDM, 2013. [7] G. Gürsun, M. Crovella, and I. Matta, “Describing and forecasting video access patterns,” in Proc. IEEE INFOCOM, 2011. [8] F. Figueiredo, “On the prediction of popularity of trends and hits for user generated videos,” in Proc. ACM WSDM, 2013. [9] K. Shanmugam, N. Golrezaei, A. G. Dimakis, A. F. Molisch, and G. Caire, “Femtocaching: Wireless content delivery through distributed caching helpers,” IEEE Trans. Inf. Theory, vol. 59, no. 12, pp. 8402–8413, Dec 2013. [10] B. Blaszczyszyn and A. Giovanidis, “Optimal geographic caching in cellular networks,” in proc. IEEE ICC, 2015. [11] J. Wen, K. Huang, S. Yang, and V. O. K. Li, “Cache-enabled heterogeneous cellular networks: Optimal tier-level content placement,” IEEE Trans. Wireless Commun., vol. 16, no. 9, pp. 5939–5952, Sept. 2017. [12] Y. Cui, D. Jiang, and Y. Wu, “Analysis and optimization of caching and multicasting in large-scale cache-enabled wireless networks,” IEEE Trans. Wireless Commun., vol. 15, no. 7, pp. 5101–5112, July 2016. [13] Z. Chen, J. Lee, T. Q. S. Quek, and M. Kountouris, “Cooperative caching and transmission design in cluster-centric small cell networks,” IEEE Trans Wireless Commun., vol. 16, no. 5, pp. 3401–3415, May 2017. [14] F. Gabry, V. Bioglio, and I. Land, “On energy-efficient edge caching in heterogeneous networks,” IEEE J. Sel. Areas Commun., vol. 34, no. 12, pp. 3288–3298, Dec. 2016. October 30, 2017 DRAFT 30 [15] J. Song, H. Song, and W. Choi, “Optimal content placement for wireless femto-caching network,” IEEE Trans. Wireless Commun., vol. 16, no. 7, pp. 4433–4444, July 2017. [16] X. Xu and M. Tao, “Modeling, analysis, and optimization of coded caching in small-cell networks,” IEEE Trans. Commun., vol. 65, no. 8, pp. 3415–3428, Aug. 2017. [17] X. Li, X. Wang, K. Li, Z. Han, and V. C. Leung, “Collaborative multi-tier caching in heterogeneous networks: Modeling, analysis, and design,” IEEE Trans. Wireless Commun., early access, 2017. [18] M. Zink, K. Suh, Y. Gu, and J. Kurose, “Characteristics of youtube network traffic at a campus network–measurements, models, and implications,” Computer networks, vol. 53, no. 4, pp. 501–514, 2009. [19] H. Ahlehagh and S. Dey, “Video-aware scheduling and caching in the radio access network,” IEEE/ACM Trans. Netw., vol. 22, no. 5, pp. 1444–1462, Oct. 2014. [20] U. Paul, A. P. Subramanian, M. M. Buddhikot, and S. R. Das, “Understanding traffic dynamics in cellular data networks,” in Proc. IEEE INFOCOM, 2011. [21] W. j. Hsu, T. Spyropoulos, K. Psounis, and A. Helmy, “Modeling time-variant user mobility in wireless mobile networks,” in Proc. IEEE INFOCOM, 2007. [22] Y. Guo, L. Duan, and R. Zhang, “Cooperative local caching under heterogeneous file preferences,” IEEE Trans. Commun., vol. 65, no. 1, pp. 444–457, Jan. 2017. [23] J. Liu, B. Bai, J. Zhang, and K. B. Letaief, “Cache placement in Fog-RANs: From centralized to distributed algorithms,” IEEE Trans. Wireless Commun., early access, 2017. [24] B. Chen and C. Yang, “Caching policy optimization for D2D communications by learning user preference,” in Proc. IEEE VTC Spring, 2017. [25] M. D. Ekstrand, J. T. Riedl, J. A. Konstan et al., “Collaborative filtering recommender systems,” Foundations and Trends R in Human–Computer Interaction, vol. 4, no. 2, pp. 81–173, 2011. [26] A. Paterek, “Improving regularized singular value decomposition for collaborative filtering,” in Proc. KDD, 2007. [27] T. Hofmann, “Latent semantic models for collaborative filtering,” ACM Trans. Inf. Syst., vol. 22, no. 1, pp. 89–115, 2004. [28] E. Zeydan, E. Bastug, M. Bennis, M. A. Kader, I. A. Karatepe, A. S. Er, and M. Debbah, “Big data caching for networking: moving from cloud to edge,” IEEE Communications Magazine, vol. 54, no. 9, pp. 36–42, Sept. 2016. [29] T. Bertin-Mahieux, D. P. Ellis, B. Whitman, and P. Lamere, “The million song dataset,” in Proc. ISMIR, 2011. [Online]. Available: https://labrosa.ee.columbia.edu/millionsong/tasteprofile [30] O. Celma, Music Recommendation and Discovery in the Long Tail. Springer, 2010. [Online]. Available: http://www.dtic.upf.edu/∼ocelma/MusicRecommendationDataset/lastfm-1K.html [31] Y. Hu, Y. Koren, and C. Volinsky, “Collaborative filtering for implicit feedback datasets,” in Proc. IEEE ICDM, 2008. [32] D. Jaramillo-Ramrez, M. Kountouris, and E. Hardouin, “Coordinated multi-point transmission with imperfect CSI and other-cell interference,” IEEE Trans. Wireless Commun., vol. 14, no. 4, pp. 1882–1896, Apr. 2015. [33] S. Boyd and L. Vandenberghe, Convex optimization. Cambridge university press, 2004. [34] A. Tatar, M. D. de Amorim, S. Fdida, and P. Antoniadis, “A survey on predicting the popularity of web content,” Journal of Internet Services and Applications, vol. 5, no. 1, p. 8, 2014. October 30, 2017 DRAFT
7cs.IT
1 Reconsidering Linear Transmit Signal Processing in 1-Bit Quantized Multi-User MISO Systems arXiv:1802.10329v1 [cs.IT] 28 Feb 2018 Oliver De Candido, Student Member, IEEE, Hela Jedda, Student Member, IEEE, Amine Mezghani, Member, IEEE, A. Lee Swindlehurst, Fellow, IEEE, and Josef A. Nossek, Life Fellow, IEEE Abstract—In this contribution, we investigate a coarsely quantized Multi-User (MU)-Multiple Input Single Output (MISO) downlink communication system, where we assume 1-Bit Digitalto-Analog Converters (DACs) at the Base Station (BS) antennas. First, we analyze the achievable sum rate lower-bound using the Bussgang decomposition. In the presence of the non-linear quantization, our analysis indicates the potential merit of reconsidering traditional signal processing techniques in coarsely quantized systems, i.e., reconsidering transmit covariance matrices whose rank is equal to the rank of the channel. Furthermore, in the second part of this paper, we propose a linear precoder design which achieves the predicted increase in performance compared with a state of the art linear precoder design. Moreover, our linear signal processing algorithm allows for higher-order modulation schemes to be employed. Index Terms—1-bit digital-to-analog converters, downlink scenario, energy efficiency, multi-user multiple-input-single-output, quantized Wiener filter, superposition modulation, sum rate. I. I NTRODUCTION AND M OTIVATION N recent years, the demand for higher data rates has drastically increased as the number of personal and interconnected devices continuously increases (e.g., Internet of Things). These demands should be fulfilled by 5th Generation Wireless Systems (5G) under similar cost and energy constraints as current wireless communication systems. To this end, two complimentary technologies have been introduced at the forefront of research to provide the required data rates for 5G. First, the use of a large number of antennas at the Base Station (BS), referred to as massive Multiple Input Multiple Output (MIMO), has been investigated. Due to the inherent high antenna diversity and array gain, these systems have shown improvements in data throughput, spectral and radiated energy efficiency, using relatively simple processing, see e.g., [1]–[3]. Second is the use of millimeter wave (mmWave) carrier frequencies, where the large amount of available bandwidth will allow for higher data rates, e.g., [4], [5]. I O. De Candido, H. Jedda and J. A. Nossek are with the Associate Professorship of Signal Processing, Department of Electrical and Computer Engineering, Technische Universität München, 80290 Munich, Germany (email: {oliver.de-candido, hela.jedda, josef.a.nossek}@tum.de). A. Mezghani is with the Wireless Networking and Communications Group, University of Texas at Austin, Austin, TX 78712, USA (e-mail: [email protected]). A. L. Swindlehurst is, and A. Mezghani was, with the Center for Pervasive Communications and Computing, University of California Irvine, Irvine, CA 92697, USA (e-mail: [email protected]). J. A. Nossek is also with the Department of Teleinformatics Engineering, Universidade Federal do Ceará, Fortaleza 60020-181, Brasil. Manuscript submitted to IEEE Transactions on Wireless Communications on February 27, 2018 If future communications systems are equipped with many BS antennas (hundreds or even thousands), and/or are working at higher sampling rates, the requirement for power and cost efficient components in the Radio Frequency (RF) chain at each antenna is evident. Currently, the most power hungry component in the RF chains are the Power Amplifiers (PAs), [6], [7]. PAs are most energy efficient when operated in their saturation region; however, in this region, they introduce non-linear distortions to the transmit signal. These distortions can be avoided when constant envelope input signals are employed, i.e., signals with a constant magnitude, and thus such amplitude distortions can be ignored. Furthermore, the power consumption of the Digital-to-Analog Converters (DACs)/Analog-to-Digital Converters (ADCs) in the RF chains increases exponentially with their resolution (in bits) and linearly with the sampling frequency, i.e., Pdiss ∝ 2b · fs , [8]– [10]. Thus, a simple solution to reduce power consumption and chip area, whilst simultaneously employing constant envelope modulation, is to use low-resolution (or coarsely-quantized) DACs/ADCs. In this paper, we focus on the downlink scenario with the coarsest form of quantization, i.e., systems where the BS is equipped with 1-bit DACs. It has been shown, see e.g., [11]–[13], that systems employing oversampling at the transmitters/receivers can improve the performance limitations introduced by the 1-bit DACs/ADCs. Furthermore, the issue of spectral shaping with 1-bit DACs and oversampling was investigated in [14], where it was shown that despite the low-resolution quantization, sufficient spectral confinement can be achieved. As we only consider spatial filtering and discrete-time processing, we focus on symbolsampled models. A. Existing Work Recent research into the topic of coarsely-quantized MIMO systems can be categorized as focusing on either the uplink or the downlink scenario, where the BS is assumed to have low-resolution ADCs or DACs, respectively. 1) Uplink: The capacity of coarsely-quantized MIMO systems was originally investigated in [15], which showed only a small loss in capacity comparing quantized and unquantized MIMO systems. However, [15] and [16] show that coding becomes an issue, since traditional channel coding methods are unsuitable for quantized MIMO systems. In [17], the Taylor expansion of the mutual information up to the second-order is derived, which shows a 2/π loss in achievable rate at lowSignal-to-Noise Ratio (SNR). This loss, due to the use of 2 symmetric threshold quantizers, was also reported in [18]. Moreover, a mutual information lower-bound was derived in [19], based on the Bussgang theorem [20], which confirms the 2/π loss at low-SNR. In [21] and [22], a closed-form expression for the capacity of the Single Input Single Output (SISO) and Multiple Input Single Output (MISO) uplink scenarios is derived, assuming perfect Channel State Information (CSI). Moreover, capacity bounds are found for the general MIMO scenario, and the mutual information lower-bound from [19] was shown to be tight at low-SNR but loose at high-SNR. Furthermore, [23] shows that higher-order modulation is possible with 1-bit quantized ADCs. 2) Downlink: A lower-bound for the achievable rate in quantized MIMO systems was derived in [24], assuming matched filter precoding and estimated CSI. Moreover, in [24], for single-antenna users, it was shown that roughly 2.5 times more BS antennas are required to achieve the same rates as in unquantized systems for maximum ratio precoding. In [25], the validity of traditional signal processing techniques was questioned for quantized single-user MISO systems, i.e., whether proper signaling and transmit covariance matrices whose rank is equal the rank of the channel matrix (channel rank) are still optimal in the presence of the non-linear quantization. Recent research has also focused on linear and non-linear transmit signal processing techniques in quantized MIMO downlink systems; one of the first linear signal processing designs taking quantization into account was introduced in [26]. Therein, a Quantized Transmit Wiener Filter (TxWFQ) was designed using the optimal quantization step-size and linearizing the quantization operation. In [27], a linear precoder and an analog power allocation matrix were designed to minimize the Mean Squared Error (MSE) using a gradient projection algorithm. It should be noted that a precoder design using the optimal quantization step-size (e.g., [26]) is equivalent to using constant step-sizes and introducing an analog real-valued diagonal power allocation matrix (e.g., [27]). A linear precoder designed to maximize the weighted sum rate in a Multi-User (MU)-MISO system was introduced in [28], where the weighted sum rate is derived using a lower-bound on the achievable rate similar to [19]. In [29] an asymptotic analysis of MIMO scenarios is provided where the number of antennas and users increase to infinity. Moreover, [29] employs the Zero Forcing (ZF) precoder as a benchmark; an asymptotic achievable rate lower-bound is provided based on the Bussgang decomposition [20], and the authors show that reasonable performance can be obtained if the ratio of antennas to users is large enough. Applying simple perturbations to the solutions obtained by standard quantized linear precoders has also been shown to improve system performance in [30]. Non-linear precoders, which map the source symbols to the transmit vector in a general way, outperform linear precoders whose outputs are simply truncated by the one-bit quantization, however this comes at the price of higher computational complexity when designing the precoder. The first non-linear precoder design for low resolution quantized MIMO systems was introduced in [31], where the Tomlinson-Harashima Precoding method was extended to take the quantization into account. A novel, non-linear precoder design which optimizes the transmit signal vector by generating lookup-tables for each channel realization was introduced in [32]. Furthermore, in [33], an optimization to reduce the probability of detection error of Phase Shift Keying (PSK) symbols was introduced. This optimization is based on linear programming, and significantly reduces complexity compared to the lookup-table optimization in [32]. In [34], linear and non-linear precoding methods are investigated; it is shown that linear precoding methods only require 3 or 4 bit DACs to achieve performance similar to unquantized systems. Furthermore, three different non-linear algorithms which minimize the squared error are introduced, and only show a 3 dB loss compared with unquantized systems. In [35] two non-linear precoder designs based on a biconvex relaxation of the MSE minimization is introduced, whereby the second algorithm is optimized to be scalable and have low-complexity with increasing number of BS antennas. A multi-step non-linear precoder design was introduced in [36] to reduce complexity for Quadrature Phase Shift Keying (QPSK) input symbols. First, a quantized linear precoder is applied, a subset of transmit antennas are selected and an exhaustive search over a subset-codebook is performed to optimize a criterion similar to [32]. A branch-and-bound approach to maximize the minimum distance to the decision boundary at the receivers is introduced in [37]. Finally, the non-linear algorithms described in [32] and [34] were extended to allow higher-order modulation schemes in [38] and [39]. In [38], two lookup-tables are generated per channel realization to allow for a superpositioning of the transmit symbols. In [39], linear and non-linear algorithms for higher order modulation schemes are introduced, including two algorithms to estimate the receiver scaling factor. These results show the potential of using higher-order modulation schemes despite the constraint of low-resolution DACs. The aforementioned non-linear precoder designs optimize the transmit vector symbol-by-symbol at the sampling frequency, which greatly increases their computational complexity. Therefore, despite the performance gains of the non-linear methods, we are interested in investigating whether linear precoding methods can be improved. B. Motivation The motivation behind this work stems from the same question we asked in [25]: Are traditional signal processing techniques optimal in coarsely quantized MU-MISO systems? 1) Improper Signaling: First, traditional signal processing techniques often assume that all signals are circular Gaussian 2 2 distributed, [40], i.e., s ∼ CN(0, σs2 ) with σℜ{s +σℑ{s = σs2 , } } 2 2 where σℜ{s } = σℑ{s } represent the variance of the real and imaginary parts, respectively. Moreover, the real and imaginary parts of s are assumed to be uncorrelated. To motivate the question of whether circular Gaussian signaling is still optimal, we consider the following symmetrical non-convex optimization problem min {|x1 | + |x2 |} x1,x2 s.t. x12 + x22 = 1. (1) 3 Despite the fact that (1) is symmetric with respect to (w.r.t.) the variables x1 and x2 , i.e., exchanging the variables does not change the objective function nor the constraint, yet the extreme points, x1,opt = ±1 and x2,opt = 0 or x1,opt = 0 and x2,opt = ±1 are not equal, i.e., x1,opt , x2,opt . We can imagine that the constraint in (1) is the variance of the real and imaginary part of a complex signal s, i.e., x1 = σℜ{s } and x2 = σℑ{s } . This would imply that the extreme points allow for unequal power allocation. In general, optimization problems in quantized MIMO systems are non-convex due to the non-linearities and constraints introduced by the quantization. This simple example, of a symmetrical non-convex optimization problem motivated us to question the optimality of circular Gaussian distributed signals and proper signaling in quantized MIMO systems. 2) Higher-Rank Transmit Covariance Matrix: Second, traditional linear signal processing techniques typically assume that the transmit covariance matrix has the same, or lower, rank than the channel. As an example, we consider Fig. 1, in which an abstract, real-valued, noiseless quantized singleuser MISO scenario is depicted, with the rank one channel vector h T = [1, . . . , 1] ∈ R1×Nt . The input signal s is fed into the linear precoder matrix P, which we assume can be either a vector p ∈ R Nt (a beamforming vector) or a full matrix P ∈ R Nt ×Nt . Note, we consider linear precoders, the rank of the transmit covariance matrix R x is determined by the rank of the precoder matrix. The transmit signal is then passed through the 1-bit non-linear quantizers at all transmit antennas; these merely take the sign of the transmit signal, i.e., Q(x) : R Nt → {±1} Nt . Next, we consider the signal at the transmit antennas after the 1-bit DACs; here we see that in total we have 2 Nt distinct transmit signals. However, if we assume a linear, channel rank precoder vector then the transmit signal is given by: p·s ∈ R Nt , where only the sign of s affects the transmit signal. Thus, we restrict the system to only use 2 of the available 2 Nt distinct transmit signals. This implies that the receive constellation yields only two points, y ∈ Y = {±Nt }, and the achievable rate is I(x; y) ≤ 1 bit(s) per channel use (bpcu). If, however, we increase the number of streams available, i.e., s = [s1, . . . , s R ] with independent symbols si , and combine them with an augmented precoder matrix P ∈ R Nt ×R where the columns of P are linearly independent, then we can obtain more distinct transmit signals. In other words, by increasing the rank of the precoder matrix to rank(P) = R, the maximum number of distinct receive constellation points becomes |Y| = R + 1. Thus, using a full rank precoder matrix, i.e., P ∈ R Nt ×Nt , the receive constellation has |Y| = Nt + 1 points and, in turn, we can achieve a rate closer to the capacity of the channel, C ≤ log2 (Nt + 1) bpcu, assuming a uniform distributed input signal. This simple example motivated our study of whether higherrank transmit covariance matrices can increase the system performance in the presence of the non-linear quantizers. C. Contributions In this paper, we analyze and investigate the optimality of two aspects of traditional signal processing in 1-bit quantized x1 x2 s P x Nt {±1} 1 1 Q(·) {±1} Q(·) .. . 1 |Y| = Nt + 1 y {±1} Q(·) Fig. 1: Motivation: Higher-Rank Transmit Covariance Matrix MU-MISO systems: (i) proper signaling, and/or (ii) channel rank transmit covariance matrices. We summarize our contributions presented in this paper for the downlink scenario as follows: 1) In the first part of the paper, we investigate the structure of the transmit covariance matrix R x̄ . We provide an achievable rate analysis, applying the Bussgang decomposition to investigate the sum rate lower-bound in 1-bit quantized MU-MISO systems. We investigate whether (i) improper signaling and/or (ii) higher-rank transmit covariance matrices maximize the sum rate lowerbound. This analysis indicates that higher-rank transmit covariance matrices can improve the sum rate lowerbound, whereas improper signaling may only marginally improve the system performance. 2) In the second part of the paper, we focus on the optimization of the linear precoder taking the results from our achievable rate analysis into account. In the end, we provide a gradient-projection algorithm to design a sub-optimal, higher-rank linear precoder. To obtain a higher-rank linear precoder, we introduce the idea of a linear superposition matrix which allows for linear superposition coding in 1-bit quantized MU-MISO systems. Moreover, our higher-rank linear precoder shows the predicted performance increase due to the increase in rank, compared with the linear precoder TxWFQ from [26]. Our results indicate that indeed there are benefits in reconsidering signal processing methods for 1-bit quantized MUMISO scenarios. Moreover, we provide an algorithm to design a linear precoder TxWFQ–Π whose rank is higher than the rank of the channel. D. Paper Structure The rest of the paper is structured as follows. In Section II the system model is introduced, including the necessary mathematical tools required for our analysis. In Section III we delve into the achievable rate analysis, and in Section IV we introduce our novel transmit precoder design taking the results from Section III into account. At the end of Section IV, we show the performance improvements introduced by our linear precoder design, investigate the complexity of our algorithm, and analyze the robustness of the algorithm against channel estimation errors. Finally, in Section V we conclude the paper by summarizing our main results and providing an outlook onto further work. E. Notation Scalars, vectors and matrices are denoted by italic letters, bold italic lowercase letters and bold italic uppercase letters, 4 respectively. The operators (·)T , tr (·), E[·] ℜ{·}, ℑ{·} represent the transpose, trace, expected value, real part and imaginary part, respectively. The notation diag (A) represents a diagonal matrix with the diagonal elements of A, while nondiag (A) represents the matrix A − diag (A). The matrix operation A◦n defines the Hadamard product to the nth power, i.e., A ◦ . . . ◦ A, where [A◦n ]i, j = ai,n j , which represents elementwise multiplication. The Kronecker product of two matrices is represented by A ⊗ B. We use I N and 0 N to represent an N × N identity matrix and all-zero matrix, respectively. Moreover, we introduce Widely-Linear (WL) notation (see e.g., [40]–[42]) to accommodate our analysis of whether proper signaling is optimal in quantized MU-MISO systems. To this end, we introduce the following definitions: Definition 1 (Widely-Linear Vector): Taking a complex vector a ∈ C N , we can express it in WL notation as   ℜ{a} ā = ∈ R2N . (2) ℑ{a} Definition 2 (Strictly Linear Transformation): A transformation in the complex domain is strictly linear, i.e., c = Ba ∈ C M ⇔ c̄ = B̄ ā ∈ R2M , if and only if (iff), in the real domain, the matrix B̄ has the following structure   ℜ{B} −ℑ{B} B̄ = ∈ R2M×2N . (3) ℑ{B} ℜ{B} We define the real-valued covariance matrix of the arbitrary signal ā in WL notation as   E[ℜ{a}ℜ{a T }] E[ℜ{a}ℑ{a T }] Rā = . (4) E[ℑ{a}ℜ{a T }] E[ℑ{a}ℑ{a T }] Definition 3 (Proper Signals): The signal a is proper iff both of the following conditions hold:       (5) E ℜ {a} ℜ a T = E ℑ {a} ℑ a T ,   T    T  E ℜ {a} ℑ a = − E ℑ {a} ℜ a . (6) II. S YSTEM M ODEL We consider the downlink scenario of a single-cell, coarsely quantized MU-MISO system as depicted in Fig. 2. The BS has Nt transmit antennas, each equipped with two 1-bit quantized DACs for the in-phase and quadrature signal components. The BS serves K single-antenna users simultaneously, and we assume the ADCs at the users have infinite quantization resolution. Furthermore, we assume that the BS and the users are fully synchronized, with their DACs and ADCs working at the same sampling frequency. Thus, assuming narrowband channels, we can collect the real-valued baseband received signals at each user into a single vector representation ȳ = H̄ T D̃ t̄ + η̄ ∈ R2K . R2K (7) The vector ȳ ∈ contains the received signals of all users, where [ ȳk , ȳk+K ]T = [ℜ{yk }, ℑ{yk }]T ∈ R2 represents the received signal of user k in WL notation. The strictly linear (see Def. 2) downlink channel matrix is denoted by H̄ T ∈ R2K×2Nt in WL notation. We assume perfect CSI at the BS1 , i.e., the matrix H̄ T is perfectly known. Furthermore, we assume that the complex channel elements are circular symmetric independent and identically distributed (i.i.d.) Gaussian random variables with hk,n = [H ]k,n ∼ C N C (0, 1), ∀k, n. The quantized transmit signal is t¯ ∈ {±1}2Nt , where we assume the output of the uniform 1-bit DACs is either ±1. The diagonal, real-valued power allocation matrix is denoted by D̃ ∈ R2Nt ×2Nt . We assume that D̃ does not necessarily have the strictly linear structure defined in Def. 2, so that the power can be allocated freely between the real and imaginary parts, which allows for improper signaling. Improper signaling can also be achieved by introducing correlation between the real and imaginary parts of the signals before the DACs, i.e., breaking the circular symmetry of the complex signals. Despite the fact that the power allocation matrix must be updated for every channel realization, one could still achieve constant envelope modulation per channel by feeding back a distinct scalar to the PAs at each antenna, which adjusts the supply voltage at each PA for a given channel, e.g., employing envelope tracking PAs (see, e.g., [43]). These supply voltages remain constant during each channel coherence time. Finally, the Additive White Gaussian Noise (AWGN) is assumed to have the following distribution for all users: η̄ ∼ CN(0, ση2 /2 · I2K ). The scaling factor β ∈ R+ at the receivers, introduced in [44], can be interpreted as an automatic gain control which is required to amplify the received symbol at each user such that it lies the correct decision region. We assume the scaling factor β changes relatively slowly and thus can be (perfectly) estimated over multiple received symbols by each user using blind methods [38], [39], allowing the users to employ minimum distance decoding. The real-valued input signal s̄ ∈ R2Rtot contains the 2R tot ÍK input symbols of all users. We introduce R tot = k=1 R k as the sum of the number of streams per user. The variable R k represents the number of streams each user receives, which, in turn, determines the increase in rank of the precoder matrix. It should be noted that if R k = 1, the precoder matrix will have the same rank as the channel. Moreover, R k ≤ Nt holds because the maximum number of streams per user is upper bounded by the number of transmit antennas. Unless otherwise stated, the input signal is assumed to be Gaussian distributed with s̄ ∼ N (0, R s̄ ). The transmit signal x̄ ∈ R2Nt is the output of the precoder with input s̄, i.e., x̄ = P( s̄), where P(·) is bijective but otherwise arbitrary and can be linear or non-linear. If we assume it to be a linear function, we do not restrict it to be strictly linear in the complex domain as defined in Def. 2, i.e., P̃ , P̄. This allows R x̄ to have the arbitrary structure as in (4). We define the non-linear quantization function in the 1-bit case to take the sign of the input signal sign( x̄), i.e., Qt : R2Nt → {±1}2Nt , x̄ 7→ Qt ( x̄) = sign( x̄) = t̄. (8) where the non-linear function sign(·) is applied element-wise. Therefore, the total power across all transmit antennas after Í t ¯ 2 quantization is 2N i=1 E[| ti | ] = 2Nt . If we define the total 1 The impact of imperfect CSI will be studied later in the numerical results. 5 s̄ x̄ P(·) Q t (·) 2Nt 2R tot ȳ t̄ D t̄ H̄ T D̃ 2Nt r̄ βI 2Nt 2K 2K η̄ Fig. 2: Abstract Downlink Quantized MU-MISO System Model available transmit power as ETx , and assume the power is equally allocated over all antennas, then the power allocation matrix must be a scaled identity matrix, i.e., r ETx I2Nt . (9) D̃ = 2Nt With this power allocation matrix we allow for improper signaling by introducing correlation between the transmit signal at different antennas. Thus, the total power after the Í t ¯ 2 power allocation matrix is equal to 2N i=1 E[ t D,i ] = ETx . A. Bussgang Decomposition Similar to previous work, e.g., [19], [29], we model the quantization function using the Bussgang decomposition [20]. According to the Bussgang theorem, the cross-correlation between two Gaussian distributed input signals remains the same when one signal is subjected to non-linear distortion, except for a scaling factor. This implies that a non-linear function with Gaussian inputs can be modeled by a linear transformation and the addition of some distortion which is uncorrelated with the inputs. The transmit signal becomes approximately Gaussian distributed as the number of users increases due to the central limit theorem. Therefore, we assume x̄ ∼ N(0, R x̄ ) when K is large enough. Thus, using the Bussgang theorem the quantization function in (8) can be modeled as t̄ = Qt ( x̄) = A x̄ + q, (10) where the quantization error, q is uncorrelated with the input signal x̄. From the latter criterion we see that   (11) E q x̄ T = 02Nt ⇒ A = Rt̄ x̄ R−1 x̄ . Thus, we observe that the matrix A is simply a linear Minimum Mean Squared Error (MMSE) estimate of the quantized signal t̄ from the unquantized input signal x̄. Moreover, the Bussgang decomposition depends on the covariance matrix between the quantized signal t¯ and the unquantized signal x̄. Finally, we can express the covariance matrix of the quantization error as (11) Rq + AR x̄ AT = Rt̄ − Rt̄ x̄ R−1 x̄ R x̄ t̄ . (12) B. Price’s Theorem – Quantized Covariance Matrices   the covariance matrices Rt̄ = E t̄ t̄ T and Rt̄ x̄ = To Tcalculate  E t¯x̄ we apply Price’s theorem [45], (for more details see e.g., [46, Sec. II]). To this end, the covariance matrix of the quantized output signal is, e.g., [47, p. 307],   2 (13) Rt̄ = arcsin diag (R x̄ )−1/2 R x̄ diag (R x̄ )−1/2 , π where the factor 2/π comes from the fixed quantization levels and the real-valued function arcsin(A) is defined element-wise on the matrix argument A. The covariance matrix between the input and output of the 1-bit quantizer can equally be calculated by applying Price’s theorem r 2 Rt̄ x̄ = diag (R x̄ )−1/2 R x̄ . (14) π Moreover, due to the real-valued WL notation, the following relationship holds: R x̄ t̄ = RTt̄ x̄ . III. ACHIEVABLE R ATE A NALYSIS In this section, we investigate the achievable rate in 1-bit quantized MU-MISO systems by looking at the structure of the transmit covariance matrices R x̄k . For our achievable rate analysis, we assume that the total transmit power is constant ETx = 2Nt , and the SNR at the receiver is varied by changing the noise variance ση2 . With equal power allocation, we have D̃ = I2Nt . Moreover, since we are investigating the mutual information and not the signal processing techniques in this section, we assume the receiver scaling factor to be one, β = 1. We assume that the CSI is perfectly known at the BS and at the users. Using the Bussgang decomposition defined in Section II-A and the covariance matrices defined in Section II-B, we can express the real-valued received signal at user k from (7) as ȳk = H̄kT (A x̄ + q) + η̄ k T = H̄eff,k x̄ + η̃ k , (15) where H̄kT represents the strictly linear channel matrix of user k. We recall that the received signal at each single-antenna user and the total transmit signal are expressed in WL notation from Def. 1. T Moreover, we introduce the effective channel H̄eff,k = (11) T H̄kT A = H̄kT Rt̄ x̄ R−1 x̄ , and the effective noise η̃ k = H̄k q + η̄ k , which is no longer Gaussian due to the quantization error, with R x̄ and Rt̄ x̄ defined in (13) and (14), respectively. Furthermore, we express the transmit signal x̄ as the sum of the transmit signals intended for each user, and we only consider coding schemes where the transmit signals for each user are independent, i.e., K K Õ Õ x̄ = x̄ k ⇒ R x̄ = R x̄k , (16) k=1 k=1 6 where x̄ k and R x̄k represent the transmit signal and transmit covariance matrix intended for user k prior to the DACs, respectively. A. Sum Rate Lower-Bound Now, we aim to calculate the mutual information between the signal intended for user k and the signal that user receives, i.e., I( x̄ k ; ȳk ) = h( ȳk ) − h( ȳk | x̄ k ), with the continuous entropy function h(·). We assume perfect knowledge of the CSI at the BS and at the users, and no cooperation between the users. The encoding at the BS does not use the non-causally known interference of the user’s signals, i.e., we do not employ dirty paper coding, and the users decode the received signal by treating the Multi-User Interference (MUI) as noise. We first focus on the second continuous entropy term ! K Õ T h( ȳk | x̄ k ) = h H̄eff,k x̄ k + η̃ k x̄ k k=1 © T ≤ h ­­ H̄eff,k « (a) K Õ l=1 l,k ª x̄l + η̃ k ®® , (17) ¬ where inequality (a) comes from the fact that conditioning cannot increase entropy, [48, Th. 2.6.5], and holds with equality if η̃ k and x̄ k are statistically independent. Moreover, the addition of a constant term does not change the entropy, i.e., h( x̄ k | x̄ k ) = 0. However, despite the fact that q and x̄ k are uncorrelated, they may still be dependent. The total noise is T ÍK H̄eff,k l=1,l,k x̄ l + η̃ k , which contains the MUI, quantization error q, and the AWGN. Furthermore, in [49] (see also [24]), it was shown that for a given noise covariance matrix, Gaussian distributed noise minimizes the mutual information in a given system. Thus, assuming Gaussian distributed inputs and total noise from (17), we can write the instantaneous mutual information lowerbound of the Gaussian system as 1 log2 det(I2 + SQINRk ), (18) 2 where the Signal-to-Quantization-plus-Interference-plus-Noise Ratio (SQINR)k defined in (19) (on the next page) shows the contribution of the MUI, Quantization Error (QE) and AWGN. The identity matrix I2 comes from the fact that we consider the real and imaginary parts separately. With the mutual information lower-bound defined per user in (18), we can now express the instantaneous sum rate lowerbound by summing over all k = 1, . . . , K: I( x̄ k ; ȳk ) ≥ K Õ 1Õ log det(I2 + SQINRk ). 2 k=1 2 K I( x̄ k ; ȳk ) ≥ k=1 (20) Finally, we optimize for the transmit covariance matrices which maximize the sum rate lower-bound from (20) (K ) Õ R x̄k,opt = arg max log2 det(I2 + SQINRk ) , (21) R x̄ k 0,∀k k=1 where the optimization is performed over all positive semidefinite transmit covariance matrices for all users, i.e., R x̄k  0, ∀k. Since we assume perfect CSI at the BS and at the users, we calculate the ergodic achievable sum rate as the average of the maximum sum rates achieved per channel realization, i.e., we average the sum rate lower-bounds over the channel realizations [50, Sec. II-C1]. Since the argument of the log2 det(·) function in the sum rate depends non-linearly on the user’s transmit covariance matrix (see (13)), we wish to investigate whether traditional signal processing techniques still maximize (21), i.e., whether channel rank transmit covariance matrices and proper signaling are still optimal. B. Cholesky Decomposition First, we note that rank (R x̄ ) = rank K Õ k=1 ! R x̄k ≤ K Õ k=1  rank R x̄k , (22) and we define the Cholesky decompositon of R x̄k to be R x̄k = L k (R k )L Tk (R k ), where R k denotes the number of streams for user k, which determines the rank of R x̄k . The rank of the transmit covariance matrix can be varied by observing the structure of the Cholesky factor:  l1,1 0 ... 0 . . . 0  .. . . .  .. ..  l2,1 . . . ..  .     ..  l3,1 . l2R k ,2R k 0 . . . 0 L k (R k ) =  (23) , ..  l4,1  . l 0 . . . 0 2(R k +1),2R k    . .. .. . . ..  ..  .. . . . . .  l . . . l 0 . . . 0 2N ,1 2N ,2R  t t k where li,i > 0 for i ≤ R k ≤ Nt and li, j ∈ for i > j, j ≤ R k ≤ Nt . Finally, we can restate (21) as ) ( K 1Õ log2 det(I2 + SQINRk ) , (24) L k,opt (R k ) = arg max L k (R k ),∀k 2 k=1 where the SQINRk is now parameterized in terms of L k (R k ), for a given R k , instead of the transmit covariance matrix R x̄k . When considering proper signaling, we can also restrict user k to employ proper signaling by further restricting the covariance matrix R x̄k = L k (R k )L k (R k )T to fulfill (5) and (6) from Def. 3. C. Simulation Results: Achievable Rate In this section, we provide numerical results for our achievable rate analysis in 1-bit quantized MU-MISO systems. We simulated a downlink scenario with a Nt = 16 antenna BS and K = 2 single antenna users, solving the optimization in (24) numerically for both proper and improper transmit covariance matrices. In this scenario, the rank of the user’s transmit covariance matrices must be R k ≤ Nt = 16. In our simulations we assumed the rank of each users’ transmit covariance matrix was equal, i.e., R 1 = R 2 = R, and set R = 1 and 2. We observed that if we increased the rank beyond 2, the additional streams per user led to worse performance. We plot the ergodic sum rate lower-bound by averaging the sum rate 7 © ª ® ­ K Õ ® ­ T R x̄l H̄eff,k + H̄kT Rq H̄k + Rη̄k ®® SQINRk = ­­ H̄eff,k | {z } |{z}® ­ l=1,l,k ® ­| {z } AWGN QE ¬ « MUI T H̄eff,k R x̄k H̄eff,k (19) 2 MISO scenario in [25, Sec. V]. Moreover, improper signaling only seems to marginally improve the performance. We can summarize the results as follows: (i) higher-rank transmit covariance matrices maximize the sum rate lowerbound, and (ii) improper signaling only marginally improves the sum rate lower-bound. Thus, in the following we will attempt to optimize a linear precoder matrix which has a rank higher than the rank of the channel, and further investigate whether improper signaling can improve the uncoded-Bit Error Rate (BER) or MSE performance. 1 IV. T RANSMIT S IGNAL P ROCESSING 6 5 Ergodic Sum Rate [bpcu] −1 4 Improper, Proper, R Improper, Proper, R R x̄ using R x̄ using R x̄ using R=1 =1 R=2 =2 MF ZF MMSE 3 −20 −10 0 10 20 ETx /ση2 [dB] Fig. 3: MU-MISO Downlink lower-bound of the ergodic sum rate with Nt = 16 and K = 2, averaged over 200 i.i.d. channels. lower-bounds over 200 i.i.d. channel realizations where we set ETx = 2Nt and varied the noise variance ση2 ∈ {−20, . . . , 20} dB. We plot the performance of different transmit covariance matrices in Fig. 3, comparing our optimized covariance matrices, R x̄k,opt = L k,opt L Tk,opt , with the traditional strictly linear Matched Filter (MF), ZF and MMSE precoders. We observe that at low-SNR our optimized transmit covariance matrices converge to those employing traditional signal processing techniques. This indicates that traditional signal processing methods, i.e., channel rank transmit covariance matrices and proper signaling, may be optimal at low-SNR in the MU scenario, similar to the Single-User (SU) scenario (see [25, Th. 1]). At mid- to high-SNR we observe that the optimized covariance matrices diverge from the traditional signal processing techniques. The transmit covariance matrix using the MMSE precoder shows a higher sum rate lower-bound at high-SNR compared with the other two traditional signal processing techniques, but our optimized covariance matrices provide better performance. The gain at higher-SNR for the improper and proper solutions with channel rank, i.e., R = 1, is due to the fact that our solutions further mitigate the MUI. Furthermore, we observe that when the rank of both users’ transmit covariance matrices is higher than the rank of the channel, i.e., R = 2, the sum rate lower-bound is the highest. This indicates that higher-rank transmit covariance matrices can achieve better performance in 1-bit quantized MU-MISO scenarios. These results concur with our results in the SU- In this section, we move on from our investigation of the transmit covariance matrix and introduce a linear precoder design taking the results from Section III into account. Therefore, we assume that the precoder function is a linear precoder matrix P̃ ∈ R2Nt ×2Rtot . Note that the WL precoder matrix can have an arbitrary structure and not the Strictly-Linear (SL) structure defined in Def. 2, i.e., P̃ , P̄. To this end, we express the received signal as   r̄ = β ȳ = β H̄ T D̃Qt (P̃ s̄) + η̄ ∈ R2K . (25) A. Superposition Matrix With the definition of the received signal in (25) we can define the MSE, ε, as   ε = E k r̄ − Π s̄k22 , (26) where we introduce the linear superposition matrix Π which allows the users to receive symbols from higher-order constellations than those transmitted (see e.g., [38], [51]–[53]). In our transmitter signal processing design we take the results from [39, Fig. 2(a)] into account which show that with a linear precoder (ZF) and 1-bit DACs at the BS, QPSK transmit symbols show the best uncoded-BER performance. Therefore, we assume that the input signal in our system are QPSK for all users. Assuming all users receive the same constellation, i.e., R k = R ∀k, the linear superposition matrix describing higher order Quadrature Amplitude Modulation (QAM) based on QPSK is defined as Π = I2K ⊗ τ T ∈ R2K×2K R and the superposition row vector τ T is defined as   τ T = 2 R−1 2 R−2 . . . 21 20 ∈ R1×R . (27) (28) The superposition vector τ T ∈ {1, 2, 4, . . . , 2 R−1 }1×R has a length R per user which determines the rank of each user’s 8 jℑ jℑ 1 3 ℜ -1 1 2 -1 1 = jℑ ℜ -3 -2 -1 1 2 3 -1 1 ℜ -1 1 -2 -3 -1 Fig. 4: Linear Superposition Matrix – Two QPSK symbols to one 16–QAM symbol precoder. The maximum rank of the precoder is equal to the number of transmit antennas, i.e., R ≤ Nt . To clarify how our linear superposition matrix works, assume R = 2 which implies that each user receives 16-QAM symbols, and we have τ T = [2, 1] as per (28). We observe in Fig. 4 how the superposition vector τ T = [2, 1] works; (i) the first symbol (solid points) is multiplied by a factor 2 and defines which quadrant the received symbol should lie in, (ii) the second symbol (hollow points) is added to the first and defines which 16-QAM symbol should be received. Since we assume QPSK input symbols and the specific superposition matrix defined in (27), the superimposed received symbols will be M-QAM, where M depends on the chosen number of streams per user, R k . B. MSE Definition With the superposition matrix defined in (27), we can express the MSE as     2  ε =β2 tr H̄ T D̃ arcsin(P ′ P ′T )D̃ H̄ + β2 tr Rη̄ + tr ΠR s̄ Π T π r  2  T T tr H̄ D̃P ′ R1/2 , (29) Π − 2β s̄ π where we have inserted the covariance matrices of the quantized signals defined in (13) and (14); also we define the normalized precoding matrix P ′ as   −1/2 P ′ = diag P̃R s̄ P̃ T P̃R1/2 (30) s̄ . C. Transmit Wiener Filter Design power by the 1-bit DACs. Therefore, we choose D̃ to restore the desired power allocation of the precoder by setting   1/2 D̃opt = diag P̃R s̄ P̃ T . (32) With the choice of the power allocation matrix D̃opt defined in (32), we can rewrite the optimization problem as  tr P̃R s̄ P̃ T ≤ ETx,  1/2 { P̃opt, βopt } = arg min {ε} s.t. D̃opt = diag P̃R s̄ P̃ T , P̃,β (33) where the sum-power constraint comes from the fact that t̄ D = D̃opt t¯ and using the optimal power allocation matrix from (32). D. Arcsine Approximation We note that due to the non-linear matrix function arcsin(·) in the MSE expression (29), the derivative of ε w.r.t. P̃ proves difficult to solve for in closed form. Therefore, we use the second-order Taylor expansion of the off-diagonal elements defined as: arcsin(x) ≈ x + 1/6 · x 3 . The diagonal elements are given by: arcsin diag P ′ P ′T = arcsin(I2Nt ) = π/2 · I2Nt . Thus, the matrix arcsin(·) function can be approximated as   π 7 1  ′ ′T  ◦3 PP + I2Nt , (34) − arcsin(P ′ P ′T ) ≈ P ′ P ′T + 6 2 6 where A◦n represents the matrix Hadamard product to the power n. We use the second-order Taylor expansion since we want to retain the non-linearities introduced by the coarse quantization to observe the performance gains from higherrank transmit covariance matrices. Therefore, we can substitute the optimal power allocation matrix from (32) and the approximation from (34) into the MSE expression from (29) to arrive at        π 7 T T T 22 diag P̃R s̄ P̃ − H̄ ε ≈β tr H̄ P̃R s̄ P̃ + π 2 6       ◦3 21 −2 −2 + β2 tr H̄ T D̃opt P̃R s̄ P̃ T D̃opt H̄ π6 r     2  T tr H̄ P̃R s̄ Π T + β2 tr Rη̄ + tr ΠR s̄ ΠT . − 2β π (35) E. Gradient Projection Algorithm Since the optimization problem in (33) is non-convex and non-linear w.r.t. the precoder matrix P̃, solving (33) in closedIn this subsection we introduce our algorithm to calculate a form is intractable. Consequently, we use a gradient-projection higher-rank version of the TxWFQ from [26]. First, we define algorithm [54, p. 466] to iteratively solve for a locally optimal the optimization problem as follows solution, with a projection back onto the feasible set. The i h 2 gradient-projection algorithm we implement is outlined in E t̄ D 2 ≤ ETx, { P̃opt, βopt, D̃opt } = arg min {ε} s.t. D̃ ∈ R2Nt ×2Nt is diagonal, Algorithm 1. P̃,β, D̃ First, we initialize our algorithm with a random full rank (31) matrix P̃(0) and calculate the initial scaling factor β(0) using with ε defined in (29) and the sum power constraint is applied the function g∗ (P̃). This function finds the optimal scaling after the power allocation matrix D̃ (see Fig. 2). factor for a given precoder matrix and will be introduced in Intuitively, we understand that the power allocated to the Appendix A (see (42)). We use an initial constant step-size of transmit antennas by the precoder is normalized back to unit γ = 10, but we allow for backtracking in Step 9, where we 9 6: 7: 8: 9: 10: 11: P̃(n+1) ← PC P̃(n) − γ  ∗ β(n+1) ← g∗ P̃(n) n ←n+1 else γ ← γ/2 end if until |ε(n+1) − ε(n) |/ε(n) ≤ δ ∗ ∂ε P̃(n),β(n) ∂P̃ 10−2 10−3 ⊲ defined in Appendix A halve the gradient step-size if the MSE in iteration (n + 1) is larger than in the current iteration (n), which is checked in Step 4. In Step 5 we update the precoder by taking a step in the direction of the MSE gradient w.r.t. the precoder, where the derivative term is defined in Appendix A. Here, the projection function PC (·) ensures that the sum-power constraint  tr P̃R s̄ P̃ T ≤ ETx is fulfilled in each iteration. The optimal scaling factor is updated in Step 6 using the function g∗ (P̃) defined in Appendix A. Our algorithm runs until the stopping criterion is met, which is triggered once the relative difference in MSE from the previous iteration is less than a predefined threshold, δ. TxWFQ–Π , WL TxWFQ–Π , SL TxWFQ, [26] TxWF (unq.), [44] 10−4 0 6 9 12 15 18 21 Fig. 5: MU-MISO Downlink 16-QAM uncoded-BER using Alg. 1 with Nt = 128 and K = 4, averaged over 200 i.i.d. channels. 100 10−1 TxWFQ–Π ,WL TxWFQ–Π , SL TxWFQ, [26] TxWF (unq.), [44] F. Simulation Results: Signal Processing In this subsection, we present simulation results for the TxWFQ–Π precoder introduced above. We compare our linear precoder design with the TxWFQ design from [26]. We note the following facts about the precoder design from [26]: (i) it has channel rank, (ii) it is strictly linear, and (iii) the authors further optimize the quantization output step-sizes, i.e., the outputs of the DACs are not uniform. In the end, the resulting power allocation in [26] is equivalent to the optimal power allocation matrix D̃opt we introduced in (32). Additionally, we plot the optimal Transmit Wiener Filter (TxWF) introduced in [44], simulating the TxWF in an unquantized scenario, i.e., assuming the DACs at the BS have infinite quantization resolution, which we will refer to as TxWF (unq.). We assume that the BS has Nt = 128 transmit antennas, which serves K = 4 single antenna users. Our simulation results assume a constant noise covariance matrix Rη = IK , and vary the transmit power ETx ∈ {0, . . . , 21} dB. In our simulations, we used a block length of Nb = 10, 000 symbols and averaged over 200 i.i.d. channel realizations. We terminate our algorithms with the value δ = 10−4 . We plot two solutions for our precoder design, a WL and a SL solution. The SL solution has the same structure as defined in Def. 2. To obtain a SL solution we use the fact that the SL structure in Def. 2 is maintained under multiplication, addition, transposition and inversion as shown in [42] and [55]. Therefore, if we initialize our algorithm with a SL matrix, i.e., 3 ETx /ση2 [dB] MSE 5: 10−1 uncoded-BER Algorithm 1 Gradient Projection Algorithm to Solve for the Higher-Rank, WL TxWFQ–Π 1: Initialization: 2: P̃(0) , β(0) ← g ∗ ( P̃(0) ), γ = 10 and n = 0 3: repeat 4: if ε(n+1) ≤ ε(n) then  ! 10−2 0 3 6 9 12 15 18 21 ETx /ση2 [dB] Fig. 6: MU-MISO Downlink 16-QAM MSE using Alg. 1 with Nt = 128 and K = 4, averaged over 200 i.i.d. channels. P̃(0) = P̄(0) with the structure from Def. 2, then the resulting solution will be SL. First, we present uncoded-BER and MSE results using 16QAM symbols in Fig. 5 and Fig. 6, respectively. To receive 16-QAM symbols, the BS transmits two QPSK symbols to each user using the superposition vector from (28) as τ T = [2, 1], implying R = 2. Thus, the rank of each user’s precoder matrix is twice the rank of the channel. In Fig. 5, we observe that our precoder design from Alg. 1 outperforms the linear TxWFQ method at higher SNR. We observe that this increase in uncoded-BER and MSE performance, compared with the TxWFQ design from [26], is due to the increase in rank of our TxWFQ–Π precoder design. However, there appears to be no gain from using improper signaling, i.e., the WL solution performed as well as the SL solution. Interestingly, both the WL and the SL solutions turn out to be independent of the random initialization. Our solutions achieve an uncoded-BER of 10−2 at around 9 dB, which is roughly 3 dB better than TxWFQ. Compared with the unquantized TxWF we see roughly a 7 dB performance loss 10 3 6 9 12 15 18 21 Alg. 1 WL Alg. 1 SL 33 30 86 91 111 117 137 138 166 170 209 201 254 248 TABLE I: Alg. 1 with Nt = 128 and K = 4 with 16-QAM Average Number of Iterations due to the quantization. In Fig. 6, we also observe similar performance gains in terms of MSE for our higher-rank precoder design over the whole SNR range. 1) Complexity Analysis: In Table I, we show the average number of iterations, including the back-tracking steps, for Alg. 1 using either a WL or SL initialization. We observe that the number of iterations grows almost linearly with the SNR and at high-SNR roughly 250 iterations are required to achieve a relative MSE difference of δ = 10−4 . Moreover, we see that, on average, both the WL and SL solutions require roughly the same number of iterations to converge. Moreover, we take a closer look at the computational complexity of Alg. 1 and calculate an asymptotic upper bound on the number of floating-point operations (FLOPs) required. We observe that most of the computational complexity comes from calculating the derivative of the MSE w.r.t. the precoder matrix (derived in Appendix A). Due to the term in (45), we see that the asymptotic upper bound is:   O Nt2 · K · R tot FLOPs, which is quadratic in the number of antennas but linear in the number of users and total number of streams per user. It should be noted that our derivation of the derivative of the MSE w.r.t. the precoder was not optimized to consider the number of FLOPs required, and there may be more efficient implementations. 2) Channel State Estimation Error: Thus far, we have assumed perfect CSI at the BS. In the following, we investigate how sensitive our algorithm is to CSI estimation errors. To this end, we introduce the estimated channel matrix H̄est as p p H̄est = 1 − ξ H̄ + ξ Γ̄, (36)   where ξ ∈ [0, 1] and Γ̄ i, j ∼ CN(0, 1), ∀i, j. The variable ξ represents the variance of the channel estimation error, where a value ξ = 0 is equivalent to a system without estimation error, i.e., perfect CSI, and ξ = 1 is a fully erroneous channel estimation, i.e., where the BS has no CSI. Intermediate values of ξ represent partial CSI estimation errors. We plot the sensitivity of our algorithm against CSI estimation error in Fig. 7 for 16-QAM received symbols at ETx /ση2 = 12 dB. We observe that our algorithm shows a slightly better performance compared with the TxWFQ solution for all ξ values, although larger performance gains are seen with smaller CSI estimation errors, since an increase in CSI estimation error can also be seen as a decrease in SNR. V. C ONCLUSION In this paper, we reconsider linear transmit signal processing methods in 1-bit quantized MU-MISO downlink scenarios using an achievable rate analysis. Our results indicate that higher-rank precoders can increase the lower-bound of the 100 uncoded-BER ETx /ση2 [dB] 10−1 10−2 10−3 TxWFQ–Π , WL TxWFQ–Π , SL TxWFQ, [26] TxWF (unq.), [44] 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Channel Estimation Error: ξ Fig. 7: MU-MISO Downlink uncoded-BER vs. Channel Estimation Error employing 16-QAM modulation at ETx /ση2 = 12 dB. achievable sum rate. By taking these results into account, we developed an algorithm to design a higher-rank linear precoder. The derived precoder achieved performance superior to a stateof-the-art linear signal processing method with channel rank, both in terms of uncoded-BER and MSE. These gains were due to the higher rank of the linear precoders; we observed no additional gain by employing improper signaling. For 16QAM symbols, we observe a 3 dB gain for an uncoded-BER of 10−2 over traditional linear signal processing techniques for a system with Nt = 128 BS antennas and K = 4 single antenna users. Non-linear precoding methods where the transmit vector is optimized symbol-by-symbol, (e.g., [32]–[39]), show uncoded-BER and MSE performance even closer to the unquantized TxWF. However, they require much higher computational complexity as they must work at the sampling rate and scale with the number of transmit antennas. In comparison, the linear precoder design presented here motivates reconsidering traditional linear precoder designs to improve the system performance with low complexity. Moreover, the linear precoder matrix only has to be calculated once per channel coherence time instead of for each input symbol, which drastically reduces the computational complexity. To extend the work presented in this paper, one could analyze a system using higher resolution DACs, still assuming constant envelope modulation. Additionally, one could optimize the superposition matrix Π. In the end, Π determines the increase in rank of the precoder matrix, and also depends on the users’ channels which could be taken into account during the optimization. Finally, it would be interesting to extend the work to frequency selective channels employing Orthogonal Frequency-Division Multiplexing (OFDM); initial results show that OFDM can be implemented with low-resolution DACs and linear processing (e.g., [13], [56]). A PPENDIX D ERIVATIONS IN A LGORITHM 1 In this Appendix we briefly derive the various functions and derivatives required in Alg. 1. Note that, in the following 11 derivations we will drop the iteration index (n) for notational brevity. First, we restate the MSE term from (29) as  ε = β2 a(P̃) + b(P̃) + d − 2βc(P̃) + e, (37) where we define the following functions        2 π 7 a(P̃) ≔ tr H̄ T P̃R s̄ P̃ T + diag P̃R s̄ P̃ T H̄ − π 2 6 (38)       ◦3 21 −2 −2 b(P̃) ≔ tr H̄ T D̃opt P̃R s̄ P̃ T D̃opt H̄ (39) π6 r  2  T tr H̄ P̃R s̄ Π T (40) c(P̃) ≔ − π    (41) d = tr Rη̄ and e = tr ΠR s̄ Π T . We note that the functions a(P̃) and b(P̃) come from the second-order Taylor expansion of the non-linear arcsin(·) function (see Section IV-D). Moreover, we recall that the optimal power allocation matrix D̃opt is also a function of the precoder matrix. With the approximate MSE expression from (37), we can define the function g∗ (P̃) by setting ∂ε/∂ β = 0, yielding  g∗ P̃ ≔ −c(P̃) , a(P̃) + b(P̃) + d (42) with a(P̃), b(P̃), c(P̃) and d defined in (38), (39), (40) and (41), respectively. Next, we calculate the derivative of the MSE w.r.t. the precoding matrix as   ∂a(P̃) ∂b(P̃) ∂c(P̃) ∂ε = β2 + , (43) − 2β ∂ P̃ ∂ P̃ ∂ P̃ ∂ P̃ with a(P̃), b(P̃) and c(P̃) defined in (38), (39) and (40), respectively. Closed-form expressions of the derivative terms in (43) can be written as      ∂a(P̃) 2 π 7 T T diag H̄ H̄ P̃R s̄ (44) =2 H̄ H̄ + − π 2 6 ∂ P̃    2 1 ∂b(P̃) −2 −2 =2 (P̃R s̄ P̃ T )◦2 ◦ nondiag D̃opt H̄ H̄ T D̃opt π 2 ∂ P̃    ◦3 1 T −2 T −4 − diag P̃R s̄ P̃ D̃opt H̄ H̄ D̃opt 3   1 + diag H̄ H̄ T P̃R s̄ (45) 2 r 2 ∂c(P̃) =−2 H̄ ΠR s̄ . (46) π ∂ P̃ Finally, the projection function defined as q PC (·) is simply   the normalization: P C P̃ ≔ ETx /tr P̃R s̄ P̃ · P̃. R EFERENCES [1] E. G. Larsson, O. Edfors, F. Tufvesson, and T. L. Marzetta, “Massive MIMO for Next Generation Wireless Systems,” IEEE Communications Magazine, vol. 52, no. 2, pp. 186–195, Feb 2014. [2] L. Lu, G. Y. Li, A. L. Swindlehurst, A. Ashikhmin, and R. Zhang, “An Overview of Massive MIMO: Benefits and Challenges,” IEEE Journal of Selected Topics in Signal Processing, vol. 8, no. 5, pp. 742–758, Oct 2014. [3] J. Hoydis, S. ten Brink, and M. Debbah, “Massive MIMO in the UL/DL of Cellular Networks: How Many Antennas Do We Need?” IEEE Journal on Selected Areas in Communications, vol. 31, no. 2, pp. 160–171, Feb 2013. [4] W. Hong, K.-H. Baek, Y. Lee, Y. Kim, and S.-T. Ko, “Study and prototyping of practically large-scale mmWave antenna systems for 5G cellular devices,” IEEE Communications Magazine, vol. 52, no. 9, pp. 63–69, Sept 2014. [5] T. S. Rappaport, S. Sun, R. Mayzus, H. Zhao, Y. Azar, K. Wang, G. N. Wong, J. K. Schulz, M. Samimi, and F. Gutierrez, “Millimeter Wave Mobile Communications for 5G Cellular: It Will Work!” IEEE Access, vol. 1, pp. 335–349, 2013. [6] O. Blume, D. Zeller, and U. Barth, “Approaches to Energy Efficient Wireless Access Networks,” in Proceedings of 2010 4th International Symposium on Communications, Control and Signal Processing (ISCCSP). Limassol, Cyprus: IEEE, March 2010. [7] T. Chen, H. Kim, and Y. Yang, “Energy Efficiency Metrics For Green Wireless Communications,” in Proceedings of 2010 International Conference on Wireless Communications Signal Processing (WCSP). Suzhou, China: IEEE, Oct 2010. [8] B. Murmann, “ADC Performance Survey 1997-2016,” [Online]. Available: http://web.stanford.edu/ murmann/adcsurvey.html., 2015. [9] C. Svensson, S. Andersson, and P. Bogner, “On The Power Consumption of Analog to Digital Converters,” in Proceedings of 2006 24th Norchip Conference. Linköping, Sweden: IEEE, Nov 2006, pp. 49–52. [10] R. H. Walden, “Analog-to-Digital Converter Survey and Analysis,” IEEE Journal on Selected Areas in Communications, vol. 17, no. 4, pp. 539– 550, April 1999. [11] S. Krone and G. Fettweis, “Capacity of communications channels with 1-bit quantization and oversampling at the receiver„” in Proceedings of 2012 35th IEEE Sarnoff Symposium. Newark, NJ, USA: IEEE, May 2012. [12] T. Koch and A. Lapidoth, “Increased capacity per unit-cost by oversampling,” in Proceedings of 2010 IEEE 26th Convention of Electrical and Electronics Engineers in Israel. Eliat, Israel: IEEE, Nov 2010. [13] S. Jacobsson, G. Durisi, M. Coldrey, and C. Studer, “Massive MUMIMO-OFDM Downlink with One-Bit DACs and Linear Precoding,” in Proceedings of 2017 IEEE Global Communications Conference (GLOBECOM). Singapore, Singapore: IEEE, Dec 2017. [14] H. Jedda, A. Mezghani, and J. A. Nossek, “Spectral shaping with low resolution signals,” in Proceedings of 2015 49th Asilomar Conference on Signals, Systems and Computers. Pacific Grove, CA, USA: IEEE, Nov 2015. [15] J. A. Nossek and M. T. Ivrlač, “Capacity and Coding for Quantized MIMO Systems,” in Proceedings of 2006 International Conference on Wireless Communications and Mobile Computing (IWCMC), ser. IWCMC ’06. New York, NY, USA: ACM, July 2006, pp. 1387–1392. [Online]. Available: http://doi.acm.org/10.1145/1143549.1143827 [16] M. T. Ivrlač and J. A. Nossek, “Challenges in Coding for Quantized MIMO Systems,” in Proceedings of 2006 IEEE International Symposium on Information Theory (ISIT). Seattle, WA, United States: IEEE, July 2006, pp. 2114–2118. [17] A. Mezghani and J. A. Nossek, “On Ultra-Wideband MIMO Systems with 1-bit Quantized Outputs: Performance Analysis and Input Optimization,” in Proceedings of 2007 IEEE International Symposium on Information Theory (ISIT). Nice, France: IEEE, June 2007, pp. 1286– 1289. [18] T. Koch and A. Lapidoth, “At Low SNR, Asymmetric Quantizers are Better,” IEEE Transactions on Information Theory, vol. 59, no. 9, pp. 5421–5445, Sept 2013. [19] A. Mezghani and J. A. Nossek, “Capacity Lower Bound of MIMO Channels with Output Quantization and Correlated Noise,” in Proceedings of 2012 IEEE International Symposium on Information Theory (ISIT). Cambridge, MA, USA: IEEE, July 2012. [20] J. Bussgang, “Crosscorrelation Functions of Amplitude-Distorted Gaussian Signals,” Res. Lab. of Electron., MIT, Cambridge, MA, USA, Tech. Rep. No. 216, March 1952. [21] J. Mo and R. W. Heath, “High SNR Capacity of Millimeter Wave MIMO Systems with One-Bit Quantization,” in Proceedings of 2014 Information Theory and Applications Workshop (ITA), San Diego, CA, USA, Feb 2014. [22] ——, “Capacity Analysis of One-Bit Quantized MIMO Systems with Transmitter Channel State Information,” IEEE Transactions on Signal Processing, vol. 63, no. 20, pp. 5498–5512, Oct 2015. [23] S. Jacobsson, G. Durisi, M. Coldrey, U. Gustavsson, and C. Studer, “One-Bit Massive MIMO: Channel Estimation and High-Order Modulations,” in Proceedings of 2015 IEEE International Conference on 12 [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] Communication Workshop (ICCW). London, UK: IEEE, June 2015, pp. 1304–1309. Y. Li, C. Tao, A. L. Swindlehurst, A. Mezghani, and L. Liu, “Downlink Achievable Rate Analysis in Massive MIMO Systems with One-Bit DACs,” IEEE Communications Letters, vol. 21, no. 7, pp. 1669–1672, July 2017. O. De Candido, H. Jedda, A. Mezghani, A. L. Swindlehurst, and J. A. Nossek, “Are Traditional Signal Processing Techniques Rate Maximizing in Quantized SU-MISO Systems?” in Proceedings of 2017 IEEE Global Communications Conference (GLOBECOM). Singapore, Singapore: IEEE, Dec 2017. A. Mezghani, R. Ghiat, and J. A. Nossek, “Transmit Processing with Low Resolution D/A-Converters,” in Proceedings of 2009 16th IEEE International Conference on Electronics, Circuits and Systems (ICECS). Yasmine Hammamet, Tunisia: IEEE, Dec 2009, pp. 683–686. O. B. Usman, H. Jedda, A. Mezghani, and J. A. Nossek, “MMSE Precoder for Massive MIMO Using 1-bit Quantization,” in Proceedings of 2016 41st IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). Shanghai, China: IEEE, March 2016, pp. 3381–3385. A. Kakkavas, J. Munir, A. Mezghani, H. Brunner, and J. A. Nossek, “Weighted Sum Rate Maximization for Multi-User MISO Systems with Low Resolution Digital to Analog Converters,” in Proceedings of 2016 20th International ITG Workshop on Smart Antennas (WSA). Munich, Germany: VDE, March 2016. A. K. Saxena, I. Fijalkow, and A. L. Swindlehurst, “Analysis of OneBit Quantized Precoding for the Multiuser Massive MIMO Downlink,” IEEE Transactions on Signal Processing, vol. 65, no. 17, pp. 4624–4634, Sept 2017. A. Swindlehurst, A. Saxena, A. Mezghani, and I. Fijalkow, “Minimum Probability-Of-Error Perturbation Precoding for the One-Bit Massive MIMO Downlink,” in Proceedings of 2017 42nd IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). New Orleans, LA, USA: IEEE, March 2017, pp. 6483–6487. A. Mezghani, R. Ghiat, and J. A. Nossek, “Tomlinson Harashima Precoding for MIMO Systems with Low Resolution D/A-converters,” in Proceedings of 2008 ITG/IEEE Workshop on Smart Antennas (WSA). Darmstadt, Germany: IEEE, Feb 2008. H. Jedda, J. A. Nossek, and A. Mezghani, “Minimum BER Precoding in 1-bit massive MIMO Systems,” in Proceedings of 2016 IEEE Sensor Array and Multichannel Signal Processing Workshop (SAM). Rio de Janeiro, Brazil: IEEE, July 2016. H. Jedda, A. Mezghani, J. A. Nossek, and A. L. Swindlehurst, “Massive MIMO Downlink 1-Bit Precoding with Linear Programming for PSK Signaling,” arXiv preprint arXiv:1704.06426, 2017. S. Jacobsson, G. Durisi, M. Coldrey, T. Goldstein, and C. Studer, “Quantized Precoding for Massive MU-MIMO,” IEEE Transactions on Communications, vol. 65, no. 11, pp. 4670–4684, Nov 2017. O. Castañeda, S. Jacobsson, G. Durisi, M. Coldrey, T. Goldstein, and C. Studer, “1-bit Massive MU-MIMO Precoding in VLSI,” IEEE Journal on Emerging and Selected Topics in Circuits and Systems, vol. 7, no. 4, pp. 508–522, Dec 2017. O. Tirkkonen and C. Studer, “Subset-codebook precoding for 1-bit massive multiuser MIMO,” in Proceedings of 2017 51st Annual Conference on Information Sciences and Systems (CISS). Baltimore, MD, USA: IEEE, March 2017. L. T. N. Landau and R. C. de Lamare, “Branch-and-Bound Precoding for Multiuser MIMO Systems With 1-Bit Quantization,” IEEE Wireless Communications Letters, vol. 6, no. 6, pp. 770–773, Dec 2017. D. B. Amor, H. Jedda, and J. Nossek, “16 QAM Communication with 1-Bit Transmitters,” in Proceedings of 2017 21th International ITG Workshop on Smart Antennas (WSA). Berlin, Germany: VDE, March 2017. S. Jacobsson, G. Durisi, M. Coldrey, T. Goldstein, and C. Studer, “Nonlinear 1-Bit Precoding for Massive MU-MIMO with Higher-Order Modulation,” in Proceedings of 2016 50th Asilomar Conference on Signals, Systems and Computers. Pacific Grove, CA, USA: IEEE, Nov 2016, pp. 763–767. T. Adali, P. J. Schreier, and L. L. Scharf, “Complex-Valued Signal Processing: The Proper Way to Deal With Impropriety,” IEEE Transactions on Signal Processing, vol. 59, no. 11, pp. 5101–5125, Nov 2011. D. P. Mandic and V. S. L. Goh, Complex Valued Nonlinear Adaptive Filters: Noncircularity, Widely Linear and Neural Models, 1st ed. John Wiley & Sons, 2009. C. Hellings and W. Utschick, “Block-Skew-Circulant Matrices in Complex-Valued Signal Processing,” IEEE Transactions on Signal Processing, vol. 63, no. 8, pp. 2093–2107, April 2015. [43] F. H. Raab, P. Asbeck, S. Cripps, P. B. Kenington, Z. B. Popovic, N. Pothecary, J. F. Sevic, and N. O. Sokal, “Power Amplifiers and Transmitters for RF and Microwave,” IEEE Transactions on Microwave Theory and Techniques, vol. 50, no. 3, pp. 814–826, March 2002. [44] M. Joham, W. Utschick, and J. A. Nossek, “Linear transmit processing in MIMO communications systems,” IEEE Transactions on Signal Processing, vol. 53, no. 8, pp. 2700–2712, Aug 2005. [45] R. Price, “A Useful Theorem For Nonlinear Devices Having Gaussian Inputs,” IRE Transactions on Information Theory, vol. 4, no. 2, pp. 69– 72, June 1958. [46] K. Roth, J. Munir, A. Mezghani, and J. A. Nossek, “Covariance based signal parameter estimation of coarse quantized signals,” in Proceedings of 2015 IEEE International Conference on Digital Signal Processing (DSP). Singapore, Singapore: IEEE, July 2015, pp. 19–23. [47] A. Papoulis and S. U. Pillai, Probability, Random Variables, and Stochastic Processes, 3rd ed. Tata McGraw-Hill Education, 1998. [48] T. M. Cover and J. A. Thomas, Elements of Information Theory, 2nd ed. John Wiley & Sons, 2006. [49] S. N. Diggavi and T. M. Cover, “The Worst Additive Noise Under a Covariance Constraint,” IEEE Transactions on Information Theory, vol. 47, no. 7, pp. 3072–3081, Nov 2001. [50] A. Goldsmith, S. A. Jafar, N. Jindal, and S. Vishwanath, “Capacity Limits of MIMO Channels,” IEEE Journal on Selected Areas in Communications, vol. 21, no. 5, pp. 684–702, June 2003. [51] S. Huan, Z. Fei, L. Huang, and J. Kuang, “Cooperative Transmission Utilizing High Order Superposition Modulation with Iterative Detection,” in Proceedings of 2009 5th International Conference on Wireless Communications, Networking and Mobile Computing (WiCom). Beijing, China: IEEE, Sept 2009. [52] H. Sun, S. X. Ng, and L. Hanzo, “Superposition Coded Modulation for Cooperative Communications,” in Proceedings of 2012 IEEE Vehicular Technology Conference (VTC Fall). Quebec City, QC, Canada: IEEE, Sept 2012. [53] S. Wang and B. K. Yi, “Optimizing Enhanced Hierarchical Modulations,” in Proceedings of 2008 IEEE Global Communications Conference (GLOBECOM). New Orleans, LA, USA: IEEE, Nov 2008. [54] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, 2004. [55] C. Hellings and W. Utschick, “Iterative Algorithms for Transceiver Design in MIMO Broadcast Channels with Improper Signaling,” in Proceedings of 2015 10th International ITG Conference on Systems, Communications and Coding (SCC). Hamburg, Germany: VDE, Feb 2015. [56] J. Guerreiro, R. Dinis, and P. Montezuma, “Use of 1-bit digital-toanalogue converters in massive MIMO systems,” Electronics Letters, vol. 52, no. 9, pp. 778–779, April 2016.
7cs.IT
Dual-Based Approximation Algorithms for Cut-Based Network Connectivity Problems Benjamin Grimmer arXiv:1508.05567v2 [cs.DS] 20 Jul 2017 [email protected] Abstract We consider a variety of NP-Complete network connectivity problems. We introduce a novel dual-based approach to approximating network design problems with cut-based linear programming relaxations. This approach gives a 3/2-approximation to Minimum 2-Edge-Connected Spanning Subgraph that is equivalent to a previously proposed algorithm. One well-studied branch of network design models ad hoc networks where each node can either operate at high or low power. If we allow unidirectional links, we can formalize this into the problem Dual Power Assignment (DPA). Our dual-based approach gives a 3/2-approximation to DPA, improving the previous best approximation known of 11/7 ≈ 1.57. Another standard network design problem is Minimum Strongly Connected Spanning Subgraph (MSCS). We propose a new problem generalizing MSCS and DPA called Star Strong Connectivity (SSC). Then we show that our dual-based approach achieves a 1.6-approximation ratio on SSC. As a consequence of our dualbased approximations, we prove new upper bounds on the integrality gaps of these problems. 1 Introduction In this work, we present approximation algorithms for multiple network connectivity problems. All the problems we consider seek a minimum cost graph meeting certain connectivity requirements. Problems of this type have a wide array of applications. They have uses in the design and modeling of communication and ad hoc networks. Often these problems involve balancing fault tolerance and connectivity against cost of building and operating a network. Many standard network connectivity problems have been shown to be NP-Complete [10]. As a result, there is little hope of producing fast (polynomial time) algorithms to solve these problems (unless P = N P ). So the focus has shifted to giving fast (polynomial time) algorithms that approximately solve these problems. An approximation algorithm is said to have an approximation ratio of α if the cost of its output is always within a factor of α of the cost of the optimal solution. Technically, α can depend on the size of the problem instance, but a constant approximation ratio is better than one that grows. In Subsections 1.1 and 1.2, we introduce a number of standard graph connectivity problems and their notable approximation algorithms. There are many other connectivity problems and algorithmic tools that we omit from our discussion (See [12] for a more in-depth 1 survey). Then in Subsection 1.3, we summarize our contributions. In Section 2, we introduce our novel approach to approximating network design problems. The remaining sections will present our approximation algorithms based on this methodology. 1.1 Edge-Connectivity Problems One standard graph connectivity problems is Minimum 2-Edge-Connected Spanning Subgraph (2ECS). This problem takes as input a 2-edge-connected graph and outputs a 2-edge-connected spanning subgraph with minimum cardinality edge set. A 5/4 = 1.25approximation was proposed using a matching lower bound in [15]. A 4/3 ≈ 1.33-approximation was given by Vempala and Vetta [23]. Another notable approximation algorithm appears in [18], which achieves a 1.5 ratio using a graph carving method with linear runtime. This graph carving method is a special case of the dual-based approach we introduce in Section 2. One can generalize the problem of 2ECS to have weights on every edge. Then the output is the spanning subgraph with minimum total weight on its edges. This problem seems to be harder to approximate that the unweighted version. The best approximation known for the weighted problem was given by Khuller and Vishkin and achieves a 2-approximation in [18]. Later, Jain proposed a 2-approximation that applies to a more general class of Steiner problems [14]. Another generalization of 2ECS is to search for the k-edge-connected spanning subgraph with the least number of edges. Using a linear program rounding algorithm, this problem on a multigraph input has a 1 + 3/k-approximation if k is odd and a 1 + 2/k-approximation if k is even [9]. Further, in [9], it is shown that for any fixed integer k ≥ 2 that a (1 + )approximation cannot exist for arbitrary  > 0 (unless P = N P ). One of the most fundamental directed graph connectivity problems is Minimum Strongly Connected Spanning Subgraph (MSCS). This problem takes as input a strongly connected digraph and outputs a strongly connected spanning subgraph with minimum cardinality arc set. In [24], Vetta proposes the best approximation known for MSCS using a matching lower bound to get an approximation ratio of 1.5. There are two other notable approximation algorithms for MSCS. First, Khuller, Raghavachari and Young gave a greedy algorithm with a 1.61 +  approximation ratio [16], [17]. Second, Zhao, Nagamochi and Ibaraki give an algorithm that runs in linear time with a 5/3 ≈ 1.66-approximation ratio in [27]. This algorithm implicitly uses the dual of the corresponding cut-based linear program to bound the optimal solution. When MSCS is generalized to have weights on each arc, the best algorithm known is a 2-approximation. This straightforward algorithm works by computing an in-arborescence and an out-arborescence with the same root in the digraph, and outputting their union. This is the best algorithm known even when arc weights are restricted to be in {0, 1}. 1.2 Power Assignment Problems A well-studied area of network design focuses on the problem of assigning power levels to vertices of a graph to achieve some connectivity property. This is useful in modeling radio networks and ad hoc wireless networks. It is common in this type of problem to minimize total power consumed by the system. This class of problems take as input a directed simple 2 graph G = (V, E) and a cost function c : E → R+ . A solution to this problem assigns every vertex a non-negative power, p(v). We use H(p) to denote the spanning subgraph of G induced by the power assignment p (we will formally define P H(p) later). The minimization problem then is to find the minimum power assignment, p(v), subject to H(p) satisfying a specific property. The first work on Power Assignment was done by Chen and Huang [8], which assumed that E is bidirected. We say an instance of Power Assignment is bidirected if whenever uv ∈ E then vu ∈ E and c(uv) = c(vu). There has been a large amount of interest in this type of problem since 2000 (some of the earlier papers are [13], [22] and [26]). While we consider problems seeking strong connectivity, other works have focused on designing fault-tolerant networks. In [25], approximations for both problems seeking biconnectivity and edge-biconnectivity are given. Further, [20] considers the more general problems of k-connectivity and k-edge-connectivity. We consider an asymmetric version of Power Assignment that allows unidirectional links defined as follows. The power assignment induces a spanning directed subgraph H(p) where xy ∈ E(H(p)) if the arc xy ∈ E and p(x) ≥ c(xy). The goal is to minimize the total power subject to H(p) being strongly connected. This problem was shown to be NP-Complete in [6]. Many different approximations for this problem have been proposed, which are compared in [5]. If we assume the input digraph and cost function are bidirected, the best approximation known achieves a 1.85-approximation ratio [2]. We are particularly interested in a special case of asymmetric Power Assignment called Dual Power Assignment (DPA). This problem takes a bidirected instance of Asymmetric Power Assignment with cost function c : E → {0, 1}. This models a network where each node can operate at either high or low power, and finds a minimum sized set of nodes to assign high power to produce a strongly connected network. The best approximation known for DPA was proposed by [1] and achieves an 11/7 ≈ 1.57-approximation. This algorithm is based on interesting properties of Hamiltonian cycles. A greedy approach to approximating DPA was first given in [7] and achieved a 1.75-approximation ratio. Then in Călinescu in [3] showed that this greedy approach can be extended to match the 1.61 + -approximation ratio of Khuller et al. for MSCS in [16], [17]. A greedy algorithm based on the same heuristic was later shown to give a 5/3 ≈ 1.66-approximation with nearly linear runtime in [11]. 1.3 Our Results MSCS and DPA both have approximation algorithms based on very similar ideas. This raises the question of how these two problems are related. To answer this question, we propose a new connectivity problem generalizing both of them called Star Strong Connectivity (SSC), defined as follows: We call a set of arcs sharing a source endpoint a star. SSC takes a strongly connected digraph G = (V, E) and a set C of stars as inputSsuch that S F ∈C F = E. Then SSC finds a minimum cardinality set R ⊆ C such that (V, F ∈R F ) is strongly connected. SSC is exactly MSCS when all F ∈ C are restricted to have |F | = 1. Under this restriction, choosing any star in SSC would be equivalent to choosing its single arc in MSCS. Further, we make the following claim relating SSC and DPA (proof of this lemma is deferred to Section 3). 3 Lemma 1. When Star Strong Connectivity has a bidirected input digraph G (an arc uv exists if and only if the arc vu exists), it is equivalent to Dual Power Assignment. In some sense, SSC has a more elegant formulation than DPA. It removes the complexity of having two different classes of arcs. This benefit becomes very clear when constructing Integer Linear Programs for the two problems (our linear programs for SSC and DPA will be formally introduced in Section 3). Besides this difference in elegance, both the resulting programs for DPA and SSC constrained to have a bidirected input digraph are equivalent to each other. We introduce a novel dual-based approach to approximating connectivity problems. This methodology utilizes the cut-based linear programming relaxation of a connectivity problem. In Section 2, we give a full description of our approach and apply it to the problem of 2ECS. The resulting algorithm is equivalent to the 3/2-approximation given in [18]. Its value is solely in its simplicity and serving as an example of our approach. Applying our dual-based method to DPA gives a tight 3/2-approximation. This improves the previous best approximation known for DPA of 11/7 ≈ 1.57 [1]. Our algorithm and its analysis are made simpler by viewing it as an instance of SSC with a bidirected input digraph instead of DPA. In Section 3, we present our algorithm, prove its approximation ratio and show this bound is tight. Theorem 1. Dual Power Assignment has a dual-based 1.5-approximation algorithm. Integer Linear Programs are often used to formulate NP-Complete problems. An approximation that uses a linear programming relaxation typically cannot give a better approximation ratio that the ratio between solutions of the integer and relaxed programs. This ratio is known as the integrality gap of a program. For minimization problems, it is formally defined as the supremum of the ratio between the optimal integer solution and the optimal fractional solution over all problem instances. As a result of our analysis for Theorem 1, we prove an upper bound of 1.5 for DPA’s integrality gap. This improves the previous upper bound of 1.85 proven in [2]. Corollary 1. The integrality gap of the standard cut-based linear program for Dual Power Assignment is at most 1.5. In fact, we prove a slightly stronger statement. Our algorithm constructs integer primal and integer dual solutions. As a result, the gap between integer solutions of these two problems is at most 1.5. Now, we turn our focus to the more general problem of SSC. Our algorithm for DPA is dependent on the underlying digraph being bidirected. Further the 3/2-approximation for MSCS in [24] and 11/7-approximation for DPA in [1] do not seem to generalize to SSC. However the greedy approach used by Khuller et al. in [18] and [16] on MSCS and by Călinescu in [3] on DPA appears to generalize easily to SSC. Claim 1. SSC has a 1.61 +  polynomial approximation algorithm using a simple variation of the greedy algorithm of [16]. In Section 4, we improve on this 1.61 + -approximation by applying our dual-based approach to SSC. This produces an algorithm with a tight 1.6-approximation ratio. Since 4 MSCS is a subproblem of SSC, this approximation ratio also extends to it. As with our approximation of DPA, we observe that an upper bound on the integrality gap follows from our analysis. Theorem 2. Star Strong Connectivity has a dual-based 1.6-approximation algorithm. Corollary 2. The integrality gap of the standard cut-based linear program for Star Strong Connectivity (and thus MSCS) is at most 1.6. Again, we actually prove a slightly stronger statement. Since our algorithm constructs integer primal and integer dual solutions, the primal-dual integer gap of these two problems is at most 1.6. A lower bound on the integrality gap of a problem provides a bound on the quality of approximation that can be achieved with certain methods. Linear program rounding, primal-dual algorithms, and our dual-based algorithms are all limited by this value. Recently, Laekhanukit et al. proved the integrality gap of MSCS is at least 3/2 −  for any  > 0 [19]. 2 Dual-Based Methodology In Subsection 2.1, we describe the typical form of integer linear programs (ILPs) related to graph connectivity problems and give a high-level description of our dual-based approach for a general problem. Finally, we apply our dual-based approach to the problem of 2ECS as a simple example. 2.1 Cut-Based Linear Programs All the connectivity problems considered in this work have cut-based ILPs. In this type of program, the constraints are based on having at least a certain number of edges or arcs crossing each cut of the graph. We will give the standard cut-based ILP for Minimum 2Edge-Connected Spanning Subgraph to demonstrate this structure. For a cut ∅ ⊂ S ⊂ V , we use ∂E(S) to denote all edges with exactly one endpoint in S. Then the standard cut-based linear programming relaxation for 2ECS is the following. 2ECS Primal LP minimize X xe e∈E subject to X xe ≥ 2 , ∀∅ ⊂ S ⊂ V e∈∂E(S) xe ≥ 0 , ∀e ∈ E The integer programming formulation for 2ECS is given by adding the constraint that all xe are integer valued. The linear program will always have objective less than or equal to the objective of the integer program. 5 It is worth noting that this type of program has an exponential number of constraints, but it could be converted into a polynomial sized program using flow-based constraints. Previous algorithms have taken advantage of polynomial time linear program solvers to approximate 2ECS using its linear programming relaxation. However, our dual-based algorithms do not need to solve the linear program. As a result, we can keep it in the simpler cut-based form. Our method takes advantage of the corresponding dual linear program. The dual program will always have objective at most that of the original (primal) program. This property is known as weak duality. In fact, their optimal solutions will have equal objective, but we do not need this stronger property. The dual program corresponding to 2ECS is the following. 2ECS Dual LP maximize X 2yS ∅⊂S⊂V subject to X yS ≤ 1 , ∀e ∈ E e∈∂E(S) yS ≥ 0 , ∀∅ ⊂ S ⊂ V Since the optimal solution to our integer program is lowerbounded by that of the primal linear program, we know that the optimal integer solution is lowerbounded by every feasible solution to the dual program. The basic idea of our dual-based method is to build a feasible dual solution while constructing our integer primal solution. We construct our primal solution by repeatedly finding and contracting a problem specific type of subgraph: a cycle for 2ECS, a perfect set for SSC (defined later). Using a cut-based linear program, a dual solution will be a set of disjoint cuts (where the exact definition of disjoint is problem specific). We are interested in cuts that are disjoint from all cuts after contracting a subgraph. Later, we formally define these as internal cuts. We choose the subgraph to contract based on it having a number of disjoint internal cuts. When our algorithm terminates, the union of these disjoint internal cuts in each iteration will give a feasible dual solution. To apply this to a new connectivity problem, we first must define a contractible subgraph such that repeated contraction will yield a feasible primal solution. Definitions for disjoint and internal cuts will follow from the cut-based program and the contractible subgraphs. Finally, any polynomial runtime procedure that constructs a contractible subgraph with at least one internal cut produces an algorithm creating integer primal and dual solutions. The quality of the approximation depends directly on the number of internal cuts in each contraction. Our dual solution could use fractional cuts. However, this did not result in improvements in the approximation bounds for the problems studied in this paper. 2.2 Application to 2ECS We will illustrate our dual-based approach by giving a straightforward 3/2-approximation to 2ECS. This is neither best known in approximation ratio nor runtime. Its value is to serve 6 as a simple example of our dual-based approach. In [18], an equivalent 3/2-approximation is given for 2ECS that implicitly uses the dual bound. They also show that simple modifications of the algorithm allow it to run in linear time. Our approximation is based on iteratively selecting and contracting cycles in the graph until the graph is reduced to a single vertex (this approach has been used by multiple previous approximations). We claim that such a procedure will always produce a 2-edge-connected spanning subgraph. Consider any cut ∅ ⊂ S ⊂ V in the graph. At some point, we will select a cycle with vertices in both S and V \ S. This cycle must have two edges crossing the cut. Thus such a procedure will always produce a feasible solution. Consider the primal and dual programs for 2ECS given in Section 2.1. When the dual problem is restricted to integer values, it can be thought of as choosing a set of cuts such that no two cuts share any edges. Our algorithm builds a solution to this dual problem to lower bound the optimal primal solution. We say a cut S is internal to a cycle C if all edges in ∂E(S) have both endpoints in the vertices of C. To contract a cycle means to replace all vertices of the cycle with a single supervertex whose edge set is all edges with exactly one endpoint in the cycle. When contracting a cycle, we keep duplicate edges (and thus the resulting structure is a 2edge-connected multigraph). Contracting a cycle with an internal cut will remove all edges crossing that cut from the graph. As a result, after repeated contraction of cycles each with an internal cut, the set of all these internal cuts is dual feasible. Following from this, our algorithm will find a cycle with an internal cut, add the edges of the cycle to our approximate solution, contract the vertices of our cycle, and then repeat. Complete description of this process is given in Algorithm 1. Algorithm 1 Dual-Based Approximation for 2ECS 1: R = ∅ 2: while |V | = 6 1 do 3: Find a cycle C with an internal cut as shown in Lemma 2 4: Contract the vertices of C into a single vertex 5: R := R ∪ E(C) 6: end while Lemma 2. Every 2-edge-connected multigraph has a cycle with an internal cut. Proof. Let N (v) denote the neighbors of a vertex v. We give a direct construction for a cycle C with a vertex v̄ such that all neighbors of v̄ are in the cycle. Then the cut {v̄} will be internal to this cycle. Our construction maintains a path P and repeatedly updates a vertex v̄ to be the last vertex of the path as it grows. 1: Set P to any edge in G 2: Set v̄ to be the last vertex in the path P 3: while ∃u ∈ N (v̄) \ V (P ) do 4: P := P concatenated with the edge v̄u 5: v̄ := u 6: end while 7 Set w to be the vertex in N (v̄) earliest in P Set C to the cycle using v̄w and edges in P Our choice of C immediately gives us that N (v̄) ⊂ V (C), which implies that the cut {v̄} is internal to C. 7: 8: Let n denote the number of vertices and k denote the number of cycles contracted by Algorithm 1. Then we bound the optimal objective value (denoted by |OP T |) and the objective value of this algorithm’s output (denoted by |R|) as follows: Lemma 3. |OP T | ≥ max{n, 2k} Proof. Consider the dual solution given by combining the internal cuts in each cycle. This is feasible since any edge crossed by one of these internal cuts is removed from the graph in the following contraction. Thus we have a dual feasible solution with objective 2k. Further any 2ECS solution must have at least n edges. Then the cost of the optimal solution is at least max{n, 2k}. Lemma 4. |R| = n + k − 1 Proof. Let Ci be the number of cycles of size i contracted by our algorithm. Since each cycle of sizeP i reduces the number of vertices by i − 1 and our final graph a single vertex, we Phas n n know i=2 (i − 1)Ci = n − 1. Then our algorithm’s output has cost i=2 iCi = n + k − 1. Simple algebra can show ratio. 3 n+k−1 max{n,2k} < 23 . Thus this algorithm has a 1.5-approximation A 1.5-Approximation for DPA To apply our dual-based methodology to DPA, we need to formulate it as a cut-based integer linear program. Since DPA has two types of arcs (high and low power), the corresponding program has to distinguish between these. The program corresponding to SSC avoids having different types of arcs and thus has a simpler form. Then for ease of notation, we will give our dual-based algorithm for DPA by approximating an instance of SSC with a bidirected input digraph. In Lemma 1, we claimed these problems are equivalent and problem instances can be easily transformed between the two. We now prove this result. Proof. of Lemma 1. We give a procedures that will turn any instance of DPA on digraph H into an instance of SSC with a bidirected input digraph, (G, C), and the reverse direction. Our transformations have linear runtime and will not substantially increase the size of the problem instance. Then our equivalence will follow. We first consider transforming an instance of DPA into SSC. Let H0 be the digraph induced by assigning no vertices of H high power. Then H0 will only have zero cost arcs. Since instances of DPA are bidirected, no arcs cross between the strongly connected components of H0 . We then construct an instance of SSC with a vertex for each strongly connected component of H0 . For each vertex v in H0 , we add a star with source at the strong component of v and arcs going to each other strong component that v has an arc to in H. Note that G is bidirected. Feasible solutions to these DPA and SSC instances can be converted between 8 the two while preserving objective as follows: Given a feasible solution to DPA, for each vertex assigned high power add the corresponding star to our SSC solution. Similarly, given a feasible solution to SSC, we assign each vertex to high power when the corresponding star is in our SSC solution. This will produce a feasible DPA instance. Note these conversions will have equal objective since there is a one-to-one mapping between high power vertices and stars. Now we give a transformation for the reverse direction from an instance of SSC with a bidirected input digraph, (G, C). Our instance of DPA will have a vertex vF for every star F ∈ C. For each vertex v of G, consider the set of stars sourced at v, {F |source(F ) = 1}. Add zero-cost arcs forming a cycle over this set. For every pair of arcs, uv and vu, in our bidirected G and for every star F with uv ∈ F and star F 0 with vu ∈ F 0 , we add a one-cost arc between to vF and vF 0 . The resulting digraph will be bidirected, as is required for DPA. As with our previous transformation, there is a one-to-one relationship between high power vertices and stars. This relationship immediately gives a conversion between our feasible solutions that will maintain objective. We now proceed to construct a cut-based program for SSC and then give all the relevant definitions for our algorithms. Our approximations for both DPA and SSC will utilize these definitions. For the remainder of our definitions, we consider an instance of SSC on a digraph G = (V, E) and a set of stars C. Definition 1. For any star F ∈ C, we define source(F ) to be the common source vertex of all arcs in F . We define sinks(F ) to be the set of endpoints of arcs in F . Definition 2. For a cut, ∅ ⊂ S ⊂ V , we define ∂C(S) to be the set of all F ∈ C such that source(F ) ∈ S and at least one element of sinks(F ) is in V \ S. This notation allows us to use ∂C(S) as the set of all stars with an arc crossing from S to V \ S. Using these definitions, we can create a cut-based linear programming relaxation for SSC similar to those proposed in [21] and [5]. SSC Primal LP minimize X xF F ∈C subject to X xF ≥ 1 , ∀∅ ⊂ S ⊂ V F ∈∂C(S) xF ≥ 0 , ∀F ∈ C Lemma 5. When SSC Primal LP is restricted to xF ∈ Z, it is exactly SSC. We defer the proof of Lemma 5 to the appendix. Intuitively, the dual of SSC is to find the maximum set of cuts, such that no star F ∈ C crosses multiple of our cuts. Properly, we can consider fractional cuts in our dual problem, but our algorithm only uses integer solutions to the dual problem. 9 SSC Dual LP maximize X yS ∅⊂S⊂V subject to X yS ≤ 1 , ∀F ∈ C F ∈∂C(S) yS ≥ 0 3.1 , ∀∅ ⊂ S ⊂ V Definitions In our approximation of 2ECS, we repeatedly found cycles in the graph and contracted them. A cycle of length k, adds k to the cost of the solution and reduces the number of vertices by k − 1. A similar method has been applied to MSCS in many previous works. In [3], Călinescu proposed a novel way to extend this approach to DPA. Following from those definitions, we will use the following two definitions to define a contractible structure in SSC. Definition 3. A set Q ⊆ C is quasiperfect if and only if all F ∈ Q have a S distinct source(F ) and the subgraph with vertex set the sources of the stars of Q and arc set F ∈Q F is strongly S connected. (Here we abuse notation as F ∈Q F may contain arcs with endpoints outside of the source vertices of Q. Such arcs are ignored.) We will use source(Q) for a quasiperfect Q to be the set of all source vertices in Q. The distinction between source defined on F ∈ C and source defined on quasiperfect sets will always be clear from context. Definition 4. A set Q ⊆ C is perfect if and only if Q is quasiperfect and all F ∈ Q have sinks(F ) ⊆ source(Q). We define contracting a perfect set as follows: replace all the source vertices of the perfect set with a single supervertex whose arc set is all arcs with exactly one end point in our perfect set. We can combine duplicate arcs into a single arc during this contraction process. As a result of contraction, the size of a star may decrease, and a star may be removed if it has no remaining arcs. A quasiperfect Q adds |Q| cost and contracts the |Q| vertices of source(Q) into one, but may have extra arcs leaving the new supervertex. A perfect set has no such arcs, so the problem after contracting such a set will be another instance of SSC. Our next lemma describes how to expand any quasiperfect set into a perfect set. This an extension of Lemma 2 given by Calinescu in [3]. Lemma 6. Every quasiperfect set is a subset of some perfect set. Proof. Consider the following expansion procedure for any quasiperfect set Q. 1: while ∃F ∈ Q with u ∈ sinks(F ) \ source(Q) do 2: Find a path P from u to source(Q) that is internally disjoint from Q 10 u (a) (b) (c) Figure 1: Examples of both quasiperfect and perfect sets. A star is denoted by a square with a set of arcs leaving it. The vertex connected to the square by a regular line segment is the source. (a) A star made of three arcs. (b) A quasiperfect set of size five. If the arc to vertex u did not exist, this would be a perfect set. (c) A perfect set of size eight containing the previous example. for each arc e in P do add a star containing e to Q end for end while Line 2 of this construction can be implemented using a simple depth first search. Any star added must have had source outside of source(Q). So no star added will share a source vertex with any other star in Q. Further Q will still have a strongly connected subgraph. Thus each iteration of this procedure maintains the invariant that Q is quasiperfect. When this construction terminates, no such F exists. Therefore the resulting set Q is perfect. Each iteration also increases the size of Q, so it will terminate eventually. 3: 4: Our expansion procedure can be simplified slightly for DPA. Since the digraph is bidirected, lines 2 and 3 can just choose any star containing the reverse arc from u to source(F ). For the special case of MSCS, all stars have size exactly one. It follows that all quasiperfect sets will be perfect. In fact, for MSCS, it can easily be shown that all quasiperfect and perfect sets are cycles. Our approximation algorithms will repeatedly find perfect sets and contract them. As in our 2ECS example, the dual problem requires us to build a set of cuts that share no crossing stars. We use the following two definitions to relate the dual to perfect sets. Definition 5. Two cuts S1 and S2 are star-disjoint if and only if ∂C(S1 ) and ∂C(S2 ) are disjoint (i.e. ∂C(S1 ) ∩ ∂C(S2 ) = ∅). Definition 6. A cut S is internal to a set Q ⊆ C if and only if every F ∈ ∂C(S) has source(F ) ∈ source(Q) and sinks(F ) ⊆ source(Q). Then contracting a perfect set with internal cut S will remove all stars in ∂C(S) from the digraph. Then S must be star-disjoint from all cuts in the resulting digraph. 3.2 The 1.5-Approximation Algorithm Now we will give our approximation algorithm for DPA by considering any instance of SSC with a bidirected input digraph. In Lemma 7, we give a construction for a perfect set with 11 two star-disjoint internal cuts. Utilizing this lemma, our approximation algorithm becomes very simple. Our algorithm will repeatedly apply this construction and contract the resulting perfect set. This procedure is formally given in Algorithm 2. Algorithm 2 Dual-Based Approximation for Dual Power Assignment 1: R = ∅ 2: while |V | = 6 1 do 3: Find a perfect set Q with two star-disjoint internal cuts as shown in Lemma 7 4: Contract the sources of Q into a single vertex 5: R := R ∪ Q 6: end while Lemma 7. Every instance of SSC with a bidirected input digraph has a perfect set with two star-disjoint internal cuts. Proof. We consider an instance of SSC defined on a bidirected digraph G = (V, E). In the degenerate case, we have a digraph with only two vertices, u and v. Then the perfect set {{uv}, {vu}} will have star-disjoint internal cuts {u} and {v}. Now we assume |V | ≥ 3. Again, we let N (v) denote the neighbors of a vertex v. Note that the set of in-neighbors and out-neighbors for a vertex are identical since the digraph is bidirected. We call any vertex with exactly one neighbor a leaf. Then our assumption that |V | ≥ 3 implies some non-leaf vertex exists. Consider the following cycle construction in G (Figure 2 shows its possible outputs). 1: Set P to be any arc rv̄ ∈ E, where v̄ is not a leaf 2: while TRUE do 3: if ∃u ∈ V s.t. u ∈ N (v̄) \ V (P ) and u is not a leaf then 4: P := P concatenated with the arc v̄u 5: v̄ := u 6: else 7: Set w to be the vertex in N (v̄) ∩ V (P ) earliest in P 8: Set w̄ to be the successor of w in P 9: if ∃u ∈ V s.t. u ∈ N (w̄) \ V (P ) and u is not a leaf then 10: Replace P with the path using wv̄ instead of ww̄, reversing all arcs between v̄ and w̄ 11: P := P concatenated with the arc w̄u 12: v̄ := u 13: else 14: Set x to be the vertex in N (w̄) ∩ V (P ) earliest in P 15: Set C to the cycle using the arc v̄w, the reverse of arcs in P from w to x, the arc xw̄, and arcs in P from w̄ to v̄ 16: return C, v̄, w̄ 17: end if 18: end if 19: end while 12 p x w p w̄ x=w v̄ v̄ = w̄ (a) (b) Figure 2: Examples of cycles produced by our construction for Lemma 7. Dashed curves represent a path. We do not show the leaves that may exist next to v̄ or w̄. (a) Shows the general form of our cycle. (b) Shows the special case when |C| = 2. Note that it is possible for v̄ and w̄ to be the same vertex. We make the following claim about the output of this procedure. Lemma 8. For any instance of SSC with a bidirected input digraph and |V | ≥ 3, this construction will output a cycle C with vertices v̄, w̄ ∈ V (C) having the following two properties: 1. v̄ and w̄ are not leaves. 2. Each neighbor of v̄ or w̄ is either in V (C) or a leaf. Proof. Any strongly connected digraph with at least three vertices will have an initial arc rv̄ where v̄ is not a leaf. This guarantees that step 1 is possible. Then each iteration increases the length of the path P . It follows that there are at most |V | iterations before the construction terminates. For our first property, we maintain the invariant that v̄ is not a leaf. This is true from our initial choice of v̄, and also maintained in each u ∈ V chosen to extend P . Finally, w̄ is either equal to v̄ and thus not a leaf, or inside the path P and thus has two neighbors. For our second property, the choice of the cycle C implies that V (C) contains all vertices in P between x and v̄. All non-leaf neighbors of w̄ are at most as early as x in P . All non-leaf neighbors of v̄ are at most as early as w in P . Note that w is at most as early as x in p. Then all the non-leaf neighbors of v̄ and w̄ must be in the V(C). Using this cycle C, we will construct our perfect set with two star-disjoint internal cuts. Note our resulting perfect set may not fully contain C. Let Lv̄ and Lw̄ be the set of leaves adjacent to v̄ and w̄, respectively. Consider the case where there is a star F sourced at v̄ containing arcs to multiple leaves. Let l1 and l2 be two distinct leaves in sinks(F ). Then we expand the quasiperfect set {F } into a perfect set Q using Lemma 6. The resulting set is shown in Figure 3 (a). This Q will have internal cuts {l1 } and {l2 }. Note that if two cuts share no vertices, then they also share no crossing stars (i.e. they are star-disjoint). The same construction can be made for such a star sourced at w̄. For the remainder of our proof, we can assume no star exists sourced from v̄ or w̄ going to multiple leaves. Now we consider two separate cases: v̄ = w̄ and v̄ 6= w̄. 13 p p v̄ l1 l2 x=w x=w v̄ = w̄ v̄ = w̄ l l (a) (b) (c) u w̄ l v̄ v̄ (d) (e) Figure 3: Depicting the quasiperfect or perfect sets selected by our construction based on the cycle C with vertices v̄ and w̄ ∈ V (C). We omit additional arcs that could be part of each star shown. If such arcs exist, they will be handled by the expansion shown in Lemma 6. Note v̄ and w̄ are symmetric and each case shown applies to both. Case 1: v̄ = w̄. In this case, w must be the predecessor of v̄. We can conclude that |C| = 2. Further, v̄ is only adjacent to w and leaves. We know that v̄ is not a leaf. Therefore the set Lv̄ must be non-empty. Let l ∈ Lv̄ be a leaf of v̄. As previously shown, we can assume that no star sourced at v̄ contains multiple of our leaves. Then all stars containing the arc v̄l are either {v̄l, v̄w} or {v̄l}. Suppose the star F = {v̄l, v̄w} exists. Then we expand the quasiperfect set {F } into a perfect set Q using Lemma 6. The resulting perfect set will have {l} as an internal cuts since the only neighbor of l is v̄. Further, V \ {l} is internal to this perfect set since {v̄l, v̄w} and {v̄l} are the only stars containing this arc and all three vertices w, v̄, and l are inside the perfect set. These two internal cuts are star-disjoint since they have no common vertices. If the star {v̄l, v̄w} does not exist, then the star {v̄l} must exist. Therefore the set {{v̄l}, {lv̄}} is perfect and has internal cuts {l} and V \ {l}. These two possibilities are shown in Figure 3 (b) and (c). Case 2: v̄ 6= w̄. First suppose a star sourced at v̄ exists with an arc to a leaf l ∈ Lv̄ and an arc to a cycle vertex u ∈ V (C). Then let F be the star of this form with u nearest after v̄ in C (using an arbitrary direction around C). We construct a quasiperfect set by taking F and a star containing each arc of the cycle from u to v̄. We can expand 14 this quasiperfect set into a perfect set Q using Lemma 6. Then {l} is an internal cut to Q. This perfect set is shown in Figure 3 (d). We know that any star F sourced at v̄ with an arc to l cannot have an arc to any other leaf. Then our choice of Q gives us that all stars F crossing the cut V \ {l} have sinks(F ) ⊂ source(Q). Therefore the cut V \ {l} is also internal to Q. Now, we can assume no star sourced at v̄ exists with arcs into both Lv̄ and V (C). Then every star F crossing the cut {v̄} ∪ Lv̄ has sinks(F ) ⊂ V (C). The same claim holds for w̄ by symmetry. Then we construct a quasiperfect set by iterating over the arcs of C, selecting a star containing each arc. Let Q be the perfect set made by expanding this quasiperfect set using Lemma 6. This perfect set is shown in Figure 3 (e). We will have {v̄} ∪ Lv̄ as an internal cut since V (C) ⊆ source(Q). Similarly we also have the internal cut {w̄} ∪ Lw̄ . Since v̄ 6= w̄, the two internal cuts are star-disjoint. Therefore in either of our cases we can construct a perfect set with two star-disjoint internal cuts. This concludes our proof of Lemma 7. 3.3 Analysis of 1.5-Approximation Ratio Let I be the set of all possible SSC problem instances with bidirected input digraphs. We denote the solution from our algorithm on some I ∈ I as A(I) and the optimal solution as OP T (I). We let k denote the total number of perfect sets added by our algorithm. Further, we let Ai denote the number of perfect sets of size i added by the algorithm. Lemma 9. |A(I)| = n + k − 1 Proof. Observe that Ai = 0 for any i > n since the source of stars in a perfect set are distinct. Each perfect set of size i contracts P i − 1 vertices, and over the whole algorithm, we contract n vertices into 1. Therefore ni=2 (i − 1)A Pni = n − 1. Each perfect set of size i contributes i cost to our solution. Then our cost is i=2 iAi = n + k − 1. Lemma 10. |OP T (I)| ≥ n Proof. Consider the dual solution of assigning one to the cut {v} for all v ∈ V . This dual feasible solution has objective n. The lemma follows from weak duality. Lemma 11. |OP T (I)| ≥ 2k Proof. Whenever the algorithm adds a perfect set, we can identify two star-disjoint internal cuts. We construct a dual feasible solution by assigning each of our internal cuts yS = 1. To accomplish this, we must show that no star F crosses multiple of our internal cuts. Consider any star F ∈ C crossed by at least of our cuts. Let S be the first of our internal cuts with F ∈ ∂C(S). Since S is an internal cut, all arcs of F will be removed from the graph after contracting the corresponding perfect set. Thus this F will be crossing at most one of our internal cuts. So we have a dual feasible solution with objective 2k. The lemma follows from weak duality. 15 By taking a convex combination of Lemmas 10 and 11, we know the following: 1 2 (1) |OP T (I)| ≥ n + (2k). 3 3 Taking the ratio of Lemma 9 and Equation (1), we get a bound on the approximation ratio. Straightforward algebra on this ratio completes our proof of Theorem 1: n+k−1 |A(I)| 3 ≤ 2n 2k < = 1.5. |OP T (I)| 2 + 3 3 As a corollary, 1.5 upper bounds the ratio between integer primal and integer dual solutions to our program. This is easily verified on any SSC instance I by choosing A(I) for the integer primal and the larger of the two dual solutions used in Lemma 10 and 11. Corollary 1 follows from this observation. Further, our analysis of the approximation ratio is tight as shown by an example in our appendix. Theorem 3. The 1.5-approximation ratio of Algorithm 2 is tight. 4 A 1.6-Approximation for SSC As in our approximation for DPA, we need a method to construct perfect sets with internal cuts. Without the restriction to bidirected input digraphs, we are unable the guarantee two star-disjoint internal cuts in each perfect set. Such a construction would give SSC a 1.5-approximation. Instead, we guarantee the following weaker condition. Lemma 12. Every instance of SSC has a perfect set Q with either |Q| ≥ 4 and one internal cut, or two star-disjoint internal cuts. Proof. We use N + (v) to denote the set of out-neighbors of a vertex v in G. We use the following cycle construction, which is a simplification of the construction used for DPA. 1: Set P to be any arc rv̄ ∈ E 2: while ∃u ∈ N + (v̄) \ V (P ) do 3: P := P concatenated with the arc v̄u 4: v̄ := u 5: end while 6: Set w to be the vertex in N + (v̄) earliest in P 7: Set C to the cycle using v̄w and arcs in P 8: return C and v̄ Lemma 13. This construction will output a cycle C and v̄ ∈ V (C) such that N + (v̄) ⊆ V (C). Proof. Follows immediately from our choice of C. Using this C and v̄, we will construct our perfect set. We consider this in three separate cases: |C| ≥ 4, |C| = 3, and |C| = 2. 16 Case 1: |C| ≥ 4. We construct a quasiperfect set by iterating over the arcs of our cycle C, selecting a star containing each arc. Then let Q be the perfect set created by expanding this set using Lemma 6. Note that |Q| ≥ 4. Since N + (v̄) ⊂ V (C), the cut {v̄} will be internal to Q. Case 2: |C| = 3. Our cycle construction must have found a cycle C on vertices {v̄, u1 , u2 }. Then v̄ has the property that N + (v̄) ⊆ {u1 , u2 }. Suppose some of the cycle arcs, v̄u1 , u1 u2 , or u2 v̄, are part of a star with a vertex outside our cycle in its sink set. Then we can construct a quasiperfect set containing this star and a star for each other arc in the cycle. Expanding this quasiperfect set, as defined in Lemma 6, will produce a perfect set of size four or more with the internal cut {v̄}. So we assume that no such F exists, and thus C is a perfect set. If there exists a nontrivial path from u1 to u2 or from u2 to v̄ internally disjoint from V (C), then we can replace an arc of C with this path to get a larger cycle that has the same property with respect to v̄ (nontrivial meaning with |P | ≥ 2). Then we can apply Case 1 to handle the new cycle. Similarly, we can assume at least one of the following does not exist: path from u2 to u1 internally disjoint from V (C), path from u1 to v̄ internally disjoint from V (C), or the arc from v̄ to u2 . If all three of these existed and at least one of the paths is nontrivial, we could construct a larger cycle with the same property with respect to v̄ by starting at v̄, following the arc to u2 , following the path to u1 , finally following the path to v̄. We know the paths from u2 to u1 and u1 to v̄ are internally disjoint because any overlap would create a path from u2 to v̄. Thus this construction will produce a larger cycle containing all of neighbors of v̄. Then we can assume this structure does not exist. We handle the four possible cases of our assumption separately. Note that the strong connectivity of the digraph implies there exists a path between any pair of vertices. Let RC (u) be the set of vertices reachable by u without using any arcs with both endpoints in C. Subcase 2.1 No path from u2 to u1 exists that is internally disjoint from V (C). Note that we also assume no nontrivial path from u2 to v̄ exists. Then RC (u2 ) includes neither v̄ nor u1 . Further, the only arc crossing RC (u2 ) is u2 v̄ (since we have assumed the arc u2 u1 does not exist). It follows that RC (u2 ) is internal to any perfect set contracting all three cycle vertices since no star contains a cycle arc and an arc to a fourth external vertex. Furthermore, the cut {v̄} will be internal to any perfect set contracting all three cycle vertices. Therefore we select any star containing each of our cycle arcs to produce a perfect set with internal cuts {v̄} and RC (u2 ). These two cuts are star-disjoint since they have no vertices in common. Subcase 2.2 No path from u1 to v̄ exists that is internally disjoint from V (C). Note that we also assume no nontrivial path from u1 to u2 exists. Then RC (u1 ) includes neither v̄ nor u2 . Further, the only arc crossing this cut is u1 u2 (since we have 17 assumed the arc u1 v̄ does not exist). It follows that RC (u1 ) is internal to any perfect set contracting all three cycle vertices since no star contains a cycle arc and an arc to a fourth external vertex. Furthermore, the cut {v̄} will be internal to any perfect set contracting all three cycle vertices. Therefore we select any star containing each of our cycle arcs to produce a perfect set with internal cuts {v̄} and RC (u1 ). These two cuts are star-disjoint since they have no vertices in common. Subcase 2.3 The arc v̄u2 does not exist. Again, we select a perfect set made by selecting a star containing each arc of our cycle. The cut {v̄} is internal to C from our choice of C and v̄. Further, we know that no nontrivial path exists from v̄ to u2 internally disjoint from V (C) and no nontrivial path exists from u1 to u2 . Then we can conclude that the cut {v̄} ∪ RC (u1 ) is only crossed by the arc u1 u2 (since v̄u2 does not exist). Since we assumed no star containing a cycle arc and an arc to a fourth external vertex exists, {v̄} ∪ RC (u1 ) is also internal to our perfect set. These two cuts are star-disjoint because the arc v̄u2 does not exist. Subcase 2.4 The arcs v̄u2 , u2 u1 and u1 v̄ exist, but no nontrivial paths exist from u2 to u1 or from u1 to v̄ internally disjoint from V (C). Suppose any of the reversed cycle arcs v̄u2 , u2 u1 or u1 v̄ are part of a star containing an arc to a fourth vertex outside of V (C). Then we could construct a perfect set of size four or more with internal cut {v̄} based on this cycle. Now we assume no such stars exist. We select our perfect set by choosing any star containing each of our cycle arcs. The cut {v̄} will be internal to such a perfect set. Since no nontrivial path exists from u1 to u2 or to v̄ that is internally star-disjoint from V (C), the cut RC (u1 ) will only be crossed by the arcs u1 u2 and u1 v̄. Thus RC (u1 ) is internal to our perfect set. These two cuts are star-disjoint since they have no vertices in common. Thus under any case we can find two star-disjoint internal cuts in our cycle or a larger perfect set with one internal cut. Case 3: |C| = 2. Our cycle construction must have found a cycle C on vertices {v̄, u1 }. Note that the only arc leaving v̄ goes to u1 , and there is a star containing only this arc. The strong connectivity of our digraph implies there is a path from u1 to v̄. If a nontrivial path Q exists from u1 to v̄, then we can replace C with the cycle made by concatenating the arc v̄u1 with Q. This larger cycle can then be processed by either Case 1 or 2. So we can assume that the only path from u1 to v̄ is the arc between them. Consider the cut V \ {v̄}, which is only crossed by u1 v̄. Either there exists a F1 ∈ C containing u1 v̄ and some u1 u2 , or this cut is internal to any perfect set contracting v̄ and u1 . In the latter case, we can choose the perfect set {{v̄u1 }, {u1 v̄}}. This perfect set has two star-disjoint internal cuts: {v̄} and V \ {v̄}. If this F1 and u2 exist, then any nontrivial path Q from u2 to u1 would create a quasiperfect set of size at least four. Then by Lemma 6, we could find a perfect set of 18 size four or more with the internal cut {v̄}. Finally, we handle the case where the only path from u2 to u1 is the arc u2 u1 . Let R ⊂ V be the set of all vertices that can be reached by u2 without using the arc u2 u1 . Consider the cut given by R, which is only crossed by u2 u1 . Either there exists a F2 ∈ C containing u2 u1 and some u2 u3 , or R is internal to any perfect set contracting u1 and u2 . In the former case, expanding the quasiperfect set {F1 , F2 }, as defined in Lemma 6, will give a perfect set of size at least four with internal cut {v̄}. In the latter case, expanding the quasiperfect set {F1 }, as defined in Lemma 6, will give a perfect set with two star-disjoint internal cuts: {v̄} and R. Therefore regardless of the size of C, we can construct either a size four or more perfect set with an internal cut or a smaller perfect set with two star-disjoint internal cuts. This concludes our proof of Lemma 12. Using Lemma 12, our approximation algorithm is very simple. We repeatedly apply this construction and contract the resulting perfect set. This procedure is formally given in Algorithm 3. Algorithm 3 Dual-Based Approximation for Star Strong Connectivity 1: R = ∅ 2: while |V | = 6 1 do 3: Find a perfect set Q as shown in Lemma 12 4: Contract the sources of Q into a single vertex 5: R := R ∪ Q 6: end while 4.1 Analysis of 1.6-Approximation Ratio The analysis of our approximation ratio is very similar to the analysis given in Section 3.3. Let I be the set of all possible SSC problem instances. We denote the solution from our algorithm on some I ∈ I as A(I) and the optimal solution as OP T (I). We let Ai denote the number of perfect sets of size i added by the algorithm. Lemma 14. |A(I)| = n P iAi i=2 Proof. Each perfect set in Ai has i stars, and thus contributes i cost to our solution. Lemma 15. |OP T (I)| ≥ n > n P (i − 1)Ai i=2 Proof. Consider the dual solution of assigning one to the cut {v} for all v ∈ V . This dual feasible solution has objective n. Since each perfect set of size i added by the algorithm n P contracts i − 1 vertices, we know that n − 1 = (i − 1)Ai . The lemma follows from weak i=2 duality. 19 Lemma 16. |OP T (I)| ≥ 2A2 + 2A3 + n P Ai i=4 Proof. Whenever the algorithm adds a perfect set of size two, we can identify two stardisjoint internal cuts. Similarly, there are two star-disjoint internal cuts in every perfect set of size three and one internal cut in the remaining perfect sets. From the definition of internal cuts, we know that all of these internal cuts will be star-disjoint from previously added internal cuts. So we have a dual feasible solution and the lemma follows from weak duality. By taking a convex combination of Lemmas 15 and 16, we know the following: n n X 1 3 X Ai ) |OP T (I)| > ( (i − 1)Ai ) + (2A2 + 2A3 + 4 i=2 4 i=4 n X 3 5 1 = A2 + 2A3 + ( i − )Ai . 4 4 2 i=4 (2) Taking the ratio of Lemma 14 and Equation (2), we get a bound on the approximation ratio. Straightforward algebra on this ratio can show it is at most 8/5: n P |A(I)| < |OP T (I)| iAi i=2 5 A 4 2 + 2A3 + n P ≤ ( 34 i − 12 )Ai 8 = 1.6. 5 i=4 This finishes the proof of Theorem 2. Corollary 2 follows from the same observation made about our 1.5-approximation for DPA. Further, our analysis of the approximation ratio is tight as shown by an example in our appendix. Theorem 4. The 1.6-approximation ratio of Algorithm 3 is tight. 5 Conclusion We introduced a novel approach to approximating network design problems with cut-based linear programming relaxations. Our method combines the combinatorial (recursive) structure of the problem with the cut-based structure produced by the corresponding dual linear program. Identifying subgraphs that meet both the recursive and dual structural constraints can produce provably good approximations. We applied this methodology to a number of standard network design problems. In the case of Minimum 2-Edge-Connected Spanning Subgraph, the resulting algorithm is equivalent to a previously proposed 3/2-approximation [18]. For the problem of Minimum Strongly Connected Spanning Subgraph, we produce a tight 1.6-approximation. Although this is slightly worse than the 1.5-approximation of Vetta [24], our algorithm has notably fewer cases than Vetta’s algorithm. 20 We also applied our dual-based approach to a common power assignment network design problem. The resulting algorithm for Dual Power Assignment achieves the best approximation ratio known of 1.5 (improving on the previous best known 1.57-approximation of [1]). We introduced a new problem generalizing DPA and MSCS, which we call Star Strong Connectivity. Our approach gives a tight 1.6-approximation to SSC. Each of our approximation results also proves an upper bound on the integrality gap of the corresponding problem. Our dual-based approach can likely be applied to other unweighted connectivity problems with cut-based linear programs. Further application of this method will likely produce new approximation algorithms and improved upper bounds on their integrality gaps. Another interesting extension of this work would generalize SSC to have costs on each star. Even when costs are constrained to be in {0, 1}, Weighted SSC is at least as hard to approximate as Set Cover. This follows from a very simple reduction that was observed in [3]. As a consequence, any work on approximating the weighted variant will at best achieve a logarithmic approximation ratio. We believe the methods used in [4] will generalize to give Weighted SSC such a logarithmic approximation. Acknowledgments. This research was supported in part by a College of Science Undergraduate Summer Research Award at the Illinois Institute of Technology. We thank Gruia Călinescu for his many valuable comments and fruitful discussions, which notably improved the paper. References [1] Karim Abu-Affash, Paz Carmi, and Anat Parush Tzur. Dual power assignment via second Hamiltonian cycle. arXiv preprint, arXiv:1402.5783, 2014. [2] Gruia Călinescu. Approximate min-power strong connectivity. SIAM J. Discrete Math., 27(3):1527–1543, 2013. [3] Gruia Călinescu. 1.61-approximation for min-power strong connectivity with two power levels. Journal of Combinatorial Optimization, pages 1–21, 2014. [4] Gruia Călinescu, Sanjiv Kapoor, Alexander Olshevsky, and Alexander Zelikovsky. Network lifetime and power assignment in ad hoc wireless networks. In Giuseppe Di Battista and Uri Zwick, editors, Algorithms - ESA 2003, volume 2832 of Lecture Notes in Computer Science, pages 114–126. Springer Berlin Heidelberg, 2003. [5] Gruia Călinescu and Kan Qiao. Asymmetric topology control: Exact solutions and fast approximations. In INFOCOM, 2012 Proceedings IEEE, pages 783–791, March 2012. [6] Paz Carmi and Matthew J. Katz. Power assignment in radio networks with two power levels. Algorithmica, 47(2):183–201, 2007. 21 [7] Jian-Jia Chen, Hsueh-I Lu, Tei-Wei Kuo, Chuan-Yue Yan, and Ai-Chun Pang. Dual power assignment for network connectivity in wireless sensor networks. In Global Telecommunications Conference, 2005. GLOBECOM ’05. IEEE, volume 6, pages 5 pp.– 3642, Dec 2005. [8] Wen-Tsuen Chen and Nen-Fu Huang. The strongly connecting problem on multihop packet radio networks. Communications, IEEE Transactions on, 37(3):293–295, Mar 1989. [9] Harold N. Gabow, Michel X. Goemans, Éva Tardos, and David P. Williamson. Approximating the smallest k-edge connected spanning subgraph by LP-rounding. Netw., 53(4):345–357, July 2009. [10] Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York, NY, USA, 1979. [11] Benjamin Grimmer and Kan Qiao. Near linear time 5/3-approximation algorithms for two-level power assignment problems. In Proceedings of the 10th ACM International Workshop on Foundations of Mobile Computing, FOMC ’14, pages 29–38, New York, NY, USA, 2014. ACM. [12] Anupam Gupta and Jochen Koenemann. Approximation algorithms for network design: A survey. Surveys in Operations Research and Management Science, 16(1):3 – 20, 2011. [13] Mohammadtaghi Hajiaghayi, Nicole Immorlica, and Vahab S. Mirrokni. Power optimization in fault-tolerant topology control algorithms for wireless multi-hop networks. In in Proceedings of the 9th Annual International Conference on Mobile Computing and Networking. 2003, pages 300–312. ACM Press, 2003. [14] Kamal Jain. A factor 2 approximation algorithm for the generalized steiner network problem. Combinatorica, 21(1):39–60, 2001. [15] Raja Jothi, Balaji Raghavachari, and Subramanian Varadarajan. A 5/4-approximation algorithm for minimum 2-edge-connectivity. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’03, pages 725–734, Philadelphia, PA, USA, 2003. Society for Industrial and Applied Mathematics. [16] Samir Khuller, Balaji Raghavachari, and Neal Young. Approximating the minimum equivalent digraph. SIAM Journal on Computing, 24(4):859–872, 1995. [17] Samir Khuller, Balaji Raghavachari, and Neal Young. On strongly connected digraphs with bounded cycle length. Discrete Applied Mathematics, 69(3):281 – 289, 1996. [18] Samir Khuller and Uzi Vishkin. Biconnectivity approximations and graph carvings. J. ACM, 41(2):214–235, March 1994. [19] Bundit Laekhanukit, Shayan Oveis Gharan, and Mohit Singh. A rounding by sampling approach to the minimum size k-arc connected subgraph problem. In Proceedings of the 39th International Colloquium Conference on Automata, Languages, and Programming - Volume Part I, ICALP’12, pages 606–616, Berlin, Heidelberg, 2012. Springer-Verlag. 22 [20] Nhat X. Lam, Trac N. Nguyen, Min Kyung An, and Dung T. Huynh. Dual power assignment optimization and fault tolerance in wsns. Journal of Combinatorial Optimization, 30(1):120–138, 2015. [21] Tobias Polzin and Siavash Vahdati Daneshmand. On Steiner trees and minimum spanning trees in hypergraphs. Oper. Res. Lett., 31(1):12–20, 2003. [22] Ram Ramanathan and Regina Rosales-Hain. Topology control of multihop wireless networks using transmit power adjustment. In INFOCOM 2000. Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings. IEEE, volume 2, pages 404–413 vol.2, 2000. [23] Santosh Vempala and Adrian Vetta. Factor 4/3 approximations for minimum 2connected subgraphs. In Klaus Jansen and Samir Khuller, editors, Approximation Algorithms for Combinatorial Optimization, volume 1913 of Lecture Notes in Computer Science, pages 262–273. Springer Berlin Heidelberg, 2000. [24] Adrian Vetta. Approximating the minimum strongly connected subgraph via a matching lower bound. In Proceedings of the Twelfth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’01, pages 417–426, Philadelphia, PA, USA, 2001. Society for Industrial and Applied Mathematics. [25] Chen Wang, Myung-Ah Park, James Willson, Yongxi Cheng, Andras Farago, and Weili Wu. On approximate optimal dual power assignment for biconnectivity and edgebiconnectivity. Theoretical Computer Science, 396(13):180 – 190, 2008. [26] Roger Wattenhofer., Li Li, Paramvir Bahl, and Yi-Min Wang. Distributed topology control for power efficient operation in multihop wireless ad hoc networks. In INFOCOM 2001. Twentieth Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings. IEEE, volume 3, pages 1388–1397 vol.3, 2001. [27] Liang Zhao, Hiroshi Nagamochi, and Toshihide Ibaraki. A linear time 5/3approximation for the minimum strongly-connected spanning subgraph problem. Inf. Process. Lett., 86(2):63–70, April 2003. A Proof of Lemma 5 Consider some instance of SSC given by a digraph G = (V, E) and a set of stars C. Let ROP T ⊆ C be the optimal solution to SSC. Let x∗ be the optimal solution P to ∗SSC Primal LP when restricted to xF ∈ Z. We P then need to show that |ROP T | = F ∈C xF . First we show that |ROP T | ≥ F ∈C x∗F . Consider thePvector x produced by assigning all F ∈ ROP T value 1 and the rest value 0. Then |ROP T | = F ∈C xF . Our inequality will follow if we show x is a feasible solution to SSC Primal LP, since x∗ is the minimum feasible solution. From our construction, all xF ≥ 0. Further consider any cut ∅ ⊂ S ⊂ V . Since ROP T produces a strongly P connected spanning subgraph, some F ∈ ROP T crosses S. Since this xF = 1, we know F ∈∂C(S) xF ≥ 1. Thus x is feasible. 23 l1 u1 l2 u2 l3 u3 ... ... uk lk uk+1 w̄ v̄ Figure 4: Example instance of Gk used to show our 1.5-approximation ratio for DPA is tight. P ∗ ∗ Now we prove that |ROP T | ≤ F ∈C xF . We know that all xF ∈ {0, 1} (if a larger ∗ x∗F exists, our objective is reduced by reducing it to xP F = 1 without effecting feasibility). ∗ Consider the set of stars R = {F |xF = 1}. Then |R| = F ∈C x∗F . Our inequality will follow if we show R is a feasible solution to SSC, since ROP T is the minimum feasible solution. We S 0 0 prove this by contradiction. Let G be the digraph induced by R (i.e. G = (V, F ∈R F )). Assume G0 is not strongly connected. Then there exists s, t ∈ V such that there is no s, tpath in G0 . Consider the set Vs ⊆ V of all vertices u with a s, u-path. Note t ∈ / Vs . Then Vs is a cut with no arcs or stars crossing it. However, this contradicts the fact that x∗ is feasible. Thus we can conclude R is feasible. Lemma 5 follows. B Tightness of 1.5-Approximation Ratio for DPA We prove this by giving a family Gk of instances of SSC with a bidirected input digraphs where our algorithm can choose arbitrarily close to 3|OP T (Gk )|/2 stars. Our family of instances will only have stars of size one. Therefore, we can represent an instance of SSC using only the corresponding digraph. Further, since the digraph must be bidirected, we can represent it using an undirected graph. We define our family Gk as follows: Let V (Gk ) = {v̄, w̄} ∪ {u1 , u2 , ...uk+1 } ∪ {l1 , l2 , ...lk }. Let E(Gk ) contains v̄uk+1 , w̄uk , and all edges in the cycle v̄, u1 , u2 , ...uk+1 w̄ and the cycle v̄, u1 , l1 , u2 , l2 , ...lk , uk+1 , w̄. An example instance of Gk is depicted in Figure 4 Suppose Algorithm 2 is run on Gk . When our cycle construction is run, it could build the path uk+1 , w̄, uk , ...u2 , u1 , v̄ before terminating. Then it would choose the perfect set corresponding to the cycle v̄, uk+1 , w̄, uk , ...u2 , u1 . This set has disjoint internal cuts {v̄} and {w̄}. After this is contracted into a vertex s, the algorithm will have to choose the perfect set of size two contracting li into s for each 1 ≤ i ≤ k. Each of these sets have disjoint internal cuts {li } and V \ {li }. Therefore our algorithm could choose 3k + 3 stars. The optimal solution to Gk will choose the perfect set corresponding to the Hamiltonian cycle v̄, u1 , l1 , u2 , l2 , ...lk , uk+1 , w̄. This solution has objective 2k +3. Then the approximation 3k+3 . As k approaches infinity, the ratio achieved ratio achieved on Gk could be as large as 2k+3 on Gk approaches 3/2. 24 b0 b c0 a c d z y x a0 d0 x0 (a) y0 (b) b0 c0 a0 d0 x0 y0 (c) Figure 5: Example instances of Tk used to show our 1.6-approximation ratio for MSCS and SSC is tight. (a) T1 (b) T2 (c) T5 C Tightness of 1.6-Approximation Ratio for SSC We show our ratio is tight by giving a simple family of digraphs where our algorithm may choose arbitrarily close to a 1.6-approximation. We use an example where all |F | = 1 (i.e. when SSC is equivalent to MSCS). This allows us to describe any instance uniquely by giving its digraph. Figure 5 gives examples of our family of digraphs, Tk . Formally, Tk is recursively defined as follows: First, T1 is a digraph with vertices {a, b, c, d, x, y, z} and arcs of the cycles abcdxyz and yxca. Each Tk will have four specific vertices denoted by c, d, x and y. To construct Tk+1 from Tk , we replace x with the vertices {a0 , b0 , c0 , d0 , x0 , y 0 }. The arc from x to c is replaced with the arc from a0 to c. The arc from d to x is replaced with the arc from d to a0 . Similarly the two arcs between x and y are replaced with two arcs between y 0 and y. Further, we connect these new vertices with the arcs of the paths a0 b0 c0 d0 x0 y 0 and y 0 x0 c0 a0 . The vertices c0 , d0 , x0 and y 0 from our expansion of Tk are c, d, x and y for Tk+1 respectively. We prove the following two lemmas about Tk to establish the approximation ratio of Tk approaches 1.6 as k grows. Lemma 17. Every Tk has a Hamiltonian cycle containing the path dxy and of length 5k + 2. Proof. We prove this by induction. By the definition of T1 , it contains the Hamiltonian cycle abcdxyz. Then for our inductive step, we assume there is such a Hamiltonian cycle C in the digraph Tk . We consider the path made by the arcs of C in Tk+1 (note the arc xy becomes the arc y 0 y and dx becomes da0 ). Then the arcs of C form a path starting at y 0 , going through all vertices common with Tk and ending at a0 . Concatenating this with the path a0 b0 c0 d0 x0 y 0 will yield a Hamiltonian cycle in Tk+1 . Note this cycle contains the path d0 x0 y 0 . We added five new arcs to this cycle, giving a total size of 5k + 2 + 5 = 5(k + 1) + 2, which completes our inductive proof. Lemma 18. Our algorithm may choose 8k + 2 arcs on input Tk . 25 Proof. We prove this by induction. For T1 , our cycle construction could build the path cayx. Then the cycle cayx with internal cut {x} may be used to create our perfect set. Let w be the resulting supervertex after contracting these four vertices. The next three iterations of our algorithm will contract the cycles wd, wb and wz. Total this choose 10 arcs, confirming our base case. Now we assume our algorithm will produce a solution to Tk using 8k + 2 arcs. Given an instance of Tk+1 , consider the vertices added in our recursive construction: {a0 , b0 , c0 , d0 , x0 , y 0 }. As in our base case, the algorithm may contract the cycle y 0 x0 c0 a0 into a supervertex w. Then it can contract the cycles wd0 and wb0 . After these contractions, the six vertices that replaced x in Tk have been combined to a single vertex. Then it follows that after our algorithm selects these 8 arcs and contracts, Tk+1 becomes an instance of Tk . By our inductive assumption, this process could choose 8 + (8k + 2) = 8(k + 1) + 2 arcs. From Lemma 17, we know that the optimal solution to Tk costs 5k + 2. Combining this result with Lemma 18, we find Tk could have an approximation ratio of 8k+2 , which 5k+2 approaches 8/5 = 1.6. 26
8cs.DS
A CANONICAL MODULE CHARACTERIZATION OF SERRE’S (R1 ). arXiv:1506.02537v2 [math.AC] 19 Jan 2016 LUKAS KATTHÄN AND KOHJI YANAGAWA Abstract. In this short note, we give a characterization of domains satisfying Serre’s condition (R1 ) in terms of their canonical modules. In the special case of toric rings, this generalizes a result of the second author [9] where the normality is described in terms of the “shape” of the canonical module. 1. Introduction Let A be a noetherian (commutative) domain. Recall that A is said to satisfy Serre’s condition (R1 ) if all localizations Ap at prime ideals p of height at most one are regular local rings. In the present note, we characterize this condition in terms of their canonical modules under mild technical conditions (i)–(iii) on A (see §2 for the detail of these conditions). Our main result is the following: Theorem 2.2. Let A be a noetherian domain satisfying (i)–(iii) and let A denote the integral closure of A. Then following are equivalent: (1) The ring A satisfies Serre’s (R1 ). (2) There is a canonical module of A which is also a canonical module of A. (3) Some canonical module C of A has an A-module structure compatible with its A-module structure via the inclusion A ֒→ A. (4) For some (actually, any) canonical module C of A, the endomorphism ring HomA (C, C) is isomorphic to A. This theorem has a multigraded version. Let R be a Zn -graded domain, such that R0 is a field and R is a finitely generated R0 -algebra. Now R admits a *canonical module (i.e., canonical modules in the graded context), which is unique and denoted by ωR . Similarly, the integral closure R of R also admits a *canonical module ωR . Theorem 3.1. The following are equivalent: (1) R satisfies Serre’s (R1 ). (2) ωR is a canonical module of R (in the ungraded context). (3) ωR ∼ = ωR in ∗ Mod R, that is, ωR is a *canonical module of R. The motivation for these results stems from a related result by the second author for toric rings. Indeed, let k be a field and let M ⊂ Zd be a positive affine monoid, i.e. a finitely generated (additive) submonoid of Zd without nontrivial units. Theorem 1.1 L (Theorem 3.1, [9]). With the above notation, consider the monoid algebra k[M] = a∈M kxa . Then the following are equivalent: 2010 Mathematics Subject Classification. Primary 13C05; Secondary 13B22, 13D07. Key words and phrases. Canonical module; Serre’s R1 ; Affine semigroup ring. The second author was supported by the JSPS KAKENHI 25400057. 1 2 LUKAS KATTHÄN AND KOHJI YANAGAWA (a) k[M] is normal. (b) k[M] is Cohen-Macaulay and the canonical module ωk[M] is isomorphic to the ideal (xa | a ∈ M ∩ rel-int(R≥0 M)) of k[M] as (graded or ungraded) k[M]-modules. Here, for X ⊂ Rd , rel-int(X) means the relative interior of X. Since the ideal W R := (xa | a ∈ ZM ∩ rel-int(R≥0 M)) is known to be a *canonical module of the normalization R = k[ZM∩R≥0 M], 3.1 yields the following equivalence. (i) R = k[M] satisfies Serre’s (R1 ). (ii) W R is a canonical module of R. The above fact is clearly analogous to Theorem 1.1, while it uses W R instead of WR := (xa | a ∈ M ∩ rel-int(R≥0 M)). We also obtain a direct generalization of 1.1 as follows. Theorem 4.2. Let M be a (not necessarily positive) affine monoid and let C be a canonical module of R = k[M]. Then R satisfies Serre’s (R1 ) if and only if there is an injection WR ֒→ C with dim(C/WR ) < d−1. Here d is the height of the *maximal ideal of R. 2. General context Definition 2.1. Let (A, m, K) be a noetherian local ring of dimension d, and C a finitely generated A-module. We say C is a canonical module of A, if we have an isomorphism HomA (C, E(K)) ∼ = Hmd (A), where E(K) is the injective hull of the residue field K = A/m. If A is not local, we say that a finitely generated A-module C is a canonical module, if the localization Cm is a canonical module of Am for all maximal ideals m of A. If A is local, a canonical module C is unique up to isomorphism (if it exists). In the general case, it is not necessarily unique. In fact, for a rank one projective module M, C ⊗A M is a canonical module again. In this section, unless otherwise specified, A is a noetherian integral domain satisfying the following conditions: (i) For all maximal ideals m of A, we have dim Am = d. (ii) The integral closure A is a finitely generated A-module. (A basic reference of this condition is [7, Chapter 12].) (iii) A admits a dualizing complex DA• . (In the sequel, DA• will mean the normalized dualizing complex of A.) These are mild conditions. In fact, an integral domain which is finitely generated over a field satisfies them. We also remark that H −d (DA• ) is a canonical module of A. Moreover, if C is a canonical module of A, then the localization Cp is a canonical module of Ap for all prime ideals p by [1, Corollary 4.3], because A is a domain. Somewhat surprisingly, the following basic fact does not appear in the literature. Theorem 2.2. Let A be a noetherian domain satisfying (i)–(iii) and let A denote the integral closure of A. Then following are equivalent: (1) The ring A satisfies Serre’s (R1 ). (2) There is a canonical module of A which is also a canonical module of A. (3) Some canonical module C of A has an A-module structure compatible with its A-module structure via the inclusion A ֒→ A. THE CANONICAL MODULE AND SERRE’S (R1 ). 3 (4) For some (actually, any) canonical module C of A, the endomorphism ring HomA (C, C) is isomorphic to A. Proof. (1) ⇒ (2) : Assume that A satisfies Serre’s (R1 ). The short exact sequence 0 → A → A → A/A → 0 yields the following exact sequence: −d −d −d+1 • • • 0 = Ext−d (A/A, DA• ) = 0. A (A/A, DA ) → ExtA (A, DA ) → ExtA (A, DA ) → ExtA Since A satisfies Serre’s (R1 ), we have (A/A)p = 0 for every prime p of height one. Hence dim A/A < d−1, and the outer terms of the above sequence vanish. To see this, for a maximal ideal m of A, note that ExtiA (A/A, DA• )⊗A Am ∼ = ExtiAm ((A/A)m , DA• m ), where DA• m is the dualizing complex of the local ring Am . Hence we may assume that • A is a local ring with the maximal ideal m. Then, the Matlis dual of Ext−i A (A/A, DA ) i is the local cohomology module Hm (A/A). −d • • ∼ ∼ −d (D • ), and thus Anyway, it follows that Ext−d A A (A, DA ) = ExtA (A, DA ) = H −d ExtA (A, DA• ) is a canonical module of A. At the same time, since A is a finitely • generated as an A-module, Ext−d A (A, DA ) is a canonical module of A. (2) ⇒ (3) : Clear. (3) ⇒ (4) : Let C be a canonical module of A. Since C is a torsionfree A-module of rank 1, it can be regarded as an A-submodule of the field of fractions Q of A, and HomA (C, C) can be identified with (C : C) := { α ∈ Q | αC ⊆ C }. Moreover, since C is finitely generated, every α ∈ (C : C) ∼ = HomA (C, C) is integral over A (i.e., α ∈ A) by the Cayley-Hamilton theorem, hence (C : C) ⊆ A. By assumption, there exists a canonical module C ′ of A which admits an A-module structure. So for C ′ it holds that A ⊆ (C ′ : C ′ ) ⊆ A. Further, for every maximal ideal m of A it holds that Cm = Cm′ and hence (Cm : Cm ) = (A)m . Here (A)m is the localization of A at the multiplicatively closed set A \ m. Thus, it follows that HomA (C, C) ∼ = (C : C) = A. (4) ⇒ (1) : Let p be a height one prime ideal of A. Since A is a domain, the localization Ap is Cohen-Macaulay. Hence we have Ap = (A)p ∼ = Ap . = [HomA (C, C)]p ∼ = HomA (Cp , Cp ) ∼ p This means that A satisfies (R1 ).  In the next result, we assume that A is a noetherian local ring satisfying the conditions (ii) and (iii) above. The localization of an integral domain which is finitely generated over a field, and a complete local domain are typical example of these rings. The (S2 )-ification of a local ring A s the endomorphism ring HomA (C, C) of its (unique) canonical module C. See [2] for detail. Corollary 2.3. Let A be a local ring satisfying the conditions (ii) and (iii) above, and A′ its (S2 )-ification. Then A satisfies Serre’s (R1 ) if and only if so does A′ (equivalently, A′ is normal). Proof. Sufficiency: Clear from the implication (1) ⇒ (4) of Theorem 2.2. Necessity: Take a height 1 prime p of A. Let C be a canonical module of A, then Cp is a canonical module of Ap , and Ap ∼ = [HomA (C, C)]p = A′p . If = HomAp (Cp , Cp ) ∼ ′ ′ A satisfies (R1 ), then the localization Ap also.  4 LUKAS KATTHÄN AND KOHJI YANAGAWA 3. Multigraded context L In this section, let R = a∈Zn Ra be a Zn -graded domain. We assume that the degree zero part R0 = k is a field and that R is finitely generated as a k-algebra. Note that the ideal m which is generated by all homogeneous non-units is a proper ideal, which contains all proper homogeneous ideals. In other words, R is a *local ring with *maximal ideal m. Note that m is not necessarily a maximal ideal in the usual sense, though it is always a prime ideal. n The integral closure R of R is also √ a Z -graded *local ring with R0 a field. The *maximal ideal n of R satisfies n = mR and ht n = ht m. Let ∗ Mod R be the category of Zn -graded R-modules, and ∗ mod R its full subcategory consisting of finitely generated modules. For M ∈ ∗ Mod R, let M Homk (M−a , k) M ∨ := HomR (M, ∗E(R/m)) ∼ = a∈Zn be the Zn -graded Matlis dual of M, where ∗E(R/m) is the injective hull of R/m in ∗ Mod R. For the information on this duality, see [3, pp.312–313]. A module C ∈ ∗ mod R is called a *canonical module of R if it satisfies C ∨ ∼ = Hmd (R) (cf. [3, §14]), where d := ht m. But R0 is a field, so it holds that M ∼ = M ∨∨ for all ∗ M ∈ mod R, see [3, p.313]. Hence we can take the Matlis dual of the defining equation and obtain that ωR := Hmd (R)∨ is the unique *canonical module of R. Theorem 3.1. The following are equivalent: (1) R satisfies Serre’s (R1 ). (2) ωR is a canonical module of R (in the ungraded context). (3) ωR ∼ = ωR in ∗ Mod R, that is, ωR is a *canonical module of R. Proof. R can be considered as a graded quotient ring of a partial Laurent polynomial ±1 n ring S = k[x±1 1 , . . . , xl , y1 , . . . , ym ] admitting a Z -grading. So by graded Local n Duality [3, Theorem 14.4.1], there is some a0 ∈ Z with ExtcS (R, S(a0 )) ∼ = ωR , where c = dim S − dim R. Hence ωR is also a canonical R-module in the ungraded context (i.e., in the sense of Definition 2.1). So the implications (1) ⇔ (2) ⇐ (3) follow directly from 2.2. The implication (1) ⇒ (3) can be proved by a similar way to the implication (1) ⇒ (2) of 2.2. For this, note that ExtcS (R, S(a0 )) ∼ = ωR as R-modules. It follows from applying the graded local duality theorem to the R-module R.  4. Toric context that R is a toric ring, i.e., R = k[M] = LIn this asection, we consider the situation n kx for some affine monoid M ⊆ Z . Let C := R≥0 M ⊂ Rn = R ⊗Z Zn be the a∈M polyhedral cone spanned by M, and rel-int(C) its relative interior. Set WR := (xa | a ∈ M ∩ rel-int(C)), which is a Zn -graded ideal of R. In [9, Theorem 3.1], the second author showed that, for a Cohen-Macaulay toric ring R, it is normal if and only if WR is a canonical module. 4.2 below considerably generalizes this result. THE CANONICAL MODULE AND SERRE’S (R1 ). 5 Remark 4.1. Set M := ZM ∩ C. Then R = k[M] is Cohen-Macaulay and the ideal W R := (xa | a ∈ M ∩ rel-int(C)) is its *canonical module ωR . So 3.1 specializes to the statement that R satisfies (R1 ), if and only if W R is a *canonical module of R, and if and only if W R is a canonical module of R in the ungraded context. The first equivalence is implicitly stated in [8] and the previous work [6] of the first author. The proofs use explicit computation of the local cohomology Hmi (R). Theorem 4.2. Let M be a (not necessarily positive) affine monoid and let C be a canonical module of R = k[M]. Then R satisfies Serre’s (R1 ) if and only if there is an injection WR ֒→ C with dim(C/WR ) < d−1. Here d is the height of the *maximal ideal of R. Proof. First, assume that R satisfies (R1 ). The canonical inclusion R ֒→ R restricts to a homomorphism WR ֒→ W R . Serre’s (R1 ) implies that dim R/R < d − 1 (cf. the proof of Theorem 2.2) and thus dim W R /WR < d − 1. Moreover, W R is a canonical module of R, so by Theorem 3.1 it is a canonical module of R as well, so the claim follows. Next, assume that there is an inclusion WR ֒→ C with dim C/WR < d − 1. For a prime p ∈ Spec R, we denote by p∗ the ideal generated by the homogeneous elements in p. It is known that p∗ is again a prime ideal and that Rp is regular if and only if Rp∗ is regular, cf. [5, Propsition 1.2.5]. Consider a prime ideal p of height one. If p is not homogeneous, then p∗ = (0) and thus Rp∗ is the field of fractions of R. So Rp is regular in this case. On the other hand, if p is homogeneous then our assumption implies that Cp = (WR )p = pRp is a canonical module of Rp , For the second equality we use the fact that \ WR = {p ∈ ∗ Spec R | ht p > 0}, where ∗ Spec R is the set of Zn -graded prime ideals of R. Further Rp is a one-dimensional domain and thus Cohen-Macaulay, so the injective dimension of the canonical module pRp is finite, hence Rp is regular by [4, Corollary 2.3]. It means that R satisfies (R1 ).  Corollary 4.3. Assume that R satisfies Serre’s (S2 ). Then the following are equivalent. (1) R is normal. (2) WR is a canonical module of R (in the ungraded context). (3) W R is a canonical module of R (in the ungraded context). Example 4.4. We give two examples to show that Theorem 4.2 and Corollary 4.3 cannot be extended. (1) Even if R satisfies (R1 ), WR may not be canonical. Indeed, consider the affine monoid M := {(a, b) ∈ N2 | a + b ≡ 0 mod 2} \ {(1, 1)}. It is not difficult to see that WR has three minimal generators in the degrees (1, 3), (2, 2) and (3, 1). On the other hand, the *canonical module C of R = k[M] has only two generators, in the degrees (1, 1) and (2, 2). Thus WR is not a canonical module, even in the ungraded context. 6 LUKAS KATTHÄN AND KOHJI YANAGAWA (2) Moreover, even if WR is canonical, R may not be normal. For example, consider M := N2 \ {(1, 0)}. and R = k[M]. Here, M and thus R are clearly not normal, but nevertheless WR is a canonical module of R. Acknowledgments We wish to thank Professors W. Bruns, W. Vasconcelos, M. Hashimoto, P. Schenzel and R. Takahashi for several helpful comments and conversations. References [1] Y. Aoyama, Some basic results on canonical modules, J. Math. Kyoto Univ. 23 (1983), 85–94. [2] Y. Aoyama and S. Goto, On the endomorphism ring of the canonical module, J. Math. Kyoto Univ. 25 (1985), 21–30. [3] M. P. Brodmann and R. Y. Sharp. Local cohomology: an algebraic introduction with geometric applications, 2nd Ed. Cambridge university press, 2012. [4] S. Goto, F. Hayasaka, S. Iai, The a-invariant and Gorensteinness of graded rings associated to filtrations of ideals in regular local rings, Proc. Amer. Math. Soc. 131 (2003), 87–94 [5] S. Goto and K. Watanabe, On graded rings, II (Zn -graded rings), Tokyo J. Math. 1 (1978), 237–261. [6] L. Katthän, Non-normal affine monoid algebras, Manuscripta Math. 146 (2015), 223–233. [7] H. Matsumura, Commutative algebra, W.A. Benjamin, New York (1970). [8] U. Schäfer and P. Schenzel, Dualizing complexes of affine semigroup rings. Trans. Am. Math. Soc. 322, (1990) 561–582. [9] K. Yanagawa, Dualizing complexes of seminormal affine semigroup rings and toric face rings, J. Algebra 425 (2015), 367–391. Goethe-Universität Frankfurt, Institut für Mathematik, 60054 Frankfurt am Main, Germany E-mail address: [email protected] Department of Mathematics, Kansai University, Suita 564-8680, Japan E-mail address: [email protected]
0math.AC
SE3-Pose-Nets: Structured Deep Dynamics Models for Visuomotor Planning and Control arXiv:1710.00489v1 [cs.RO] 2 Oct 2017 Arunkumar Byravan, Felix Leeb, Franziska Meier and Dieter Fox Department of Computer Science & Engineering University of Washington, Seattle Abstract— In this work, we present an approach to deep visuomotor control using structured deep dynamics models. Our deep dynamics model, a variant of SE3-Nets, learns a low-dimensional pose embedding for visuomotor control via an encoder-decoder structure. Unlike prior work, our dynamics model is structured: given an input scene, our network explicitly learns to segment salient parts and predict their poseembedding along with their motion modeled as a change in the pose space due to the applied actions. We train our model using a pair of point clouds separated by an action and show that given supervision only in the form of point-wise data associations between the frames our network is able to learn a meaningful segmentation of the scene along with consistent poses. We further show that our model can be used for closedloop control directly in the learned low-dimensional pose space, where the actions are computed by minimizing error in the pose space using gradient-based methods, similar to traditional model-based control. We present results on controlling a Baxter robot from raw depth data in simulation and in the real world and compare against two baseline deep networks. Our method runs in real-time, achieves good prediction of scene dynamics and outperforms the baseline methods on multiple control runs. Video results can be found at: https://rse-lab.cs. washington.edu/se3-structured-deep-ctrl/ I. I NTRODUCTION Imagine we are receiving observations of a scene from a camera and we would like to control our robot to reach a target scene. Traditional approaches to visual servoing [1] decompose this problem into two parts: data-associating the current scene to the target (usually through the use of features) and modeling the effect of applied actions to changes to the scene, combining these in a tight loop to servo to the target. Recent work on deep learning has looked at learning similar predictive models directly in the space of observations, relating changes in pixels or 3D points directly to the applied actions [2]–[4]. Given a target scene, we can use this predictive model to generate suitable controls to visually servo to the target using model-predictive control [5]. Unfortunately, for this pipeline to work, we need an external system (such as [6], [7]) capable of providing long range data associations to measure progress. As we showed in prior work [4], instead of reasoning about raw pixels, we can predict scene dynamics by decomposing the scene into objects and predicting object dynamics instead. While this significantly improves prediction results, it still does not provide a clear solution to the data-association problem that we encounter during control - we still lack the capability to explicitly associate objects/parts across Fig. 1: An example scenario showing the initial (left) and target point cloud (right). SE3-P OSE -N ETS can be used to control the robot to reach the target state based only on raw depth data. Depth images colorized for display purposes only. scenes. We observe three key points: 1) We can dataassociate across scenes by learning to predict the poses of detected objects/parts in the scene (the pose implicitly provides tracking), 2) We can model the dynamics of an object directly in the predicted low-dimensional pose space, and 3) We can predict scene dynamics by combining the dynamics predictions of each detected part. We combine these ideas in this work to propose SE3-P OSE N ETS, a deep network architecture for efficient visuomotor control that jointly learns to data-associate across long term sequences. We make the following contributions: • We show how it is possible to learn predictive models that detect parts of the scene and jointly learn a consistent pose space for these parts with minimal supervision. • We demonstrate how a deep predictive model can be used for reactive visuo-motor control using simple gradient backpropagation and a more sophisticated Gauss-Newton optimization, reminiscent of approaches in inverse kinematics [8]. • We present results on real-time reactive control of a Baxter arm using raw depth images and velocity control, both in simulation and on real data. Fig 1 shows an example scenario where our proposed method can be applied to control the robot to reach the target state (right) from the initial state (left). II. R ELATED WORK Modeling scenes and dynamics: Our work builds on top of prior work on learning structured models of scene dynamics [4]. Unlike SE3-N ETS we now explicitly model data associations through a low-dimensional pose embedding that we train to be consistent across long sequences. Similar to Boots et al. [2], our model learns to predict point clouds based on applied actions, but through a more structured intermediate representation that reasons about objects and their motions. Unlike Finn et al. [3], we operate on depth data and reason about motion in 3D using masks and SE(3) transforms while training our networks in a supervised fashion given point-wise data associations across pairs of frames. Visuomotor control: Recently, there has been a lot of work on visuomotor control, primarily through the use of deep networks [5], [9]–[13]. These methods either directly regress to controls from visual data [10], [11], generate controls by planning on learned forward dynamics models [5], [9], through inverse dynamics models [12] or by reinforcement learning [13]. Similar to some of these methods, we generates controls by planning with a learned dynamics model, albeit in a learned low-dimensional latent space. Specifically, work by Finn et al. [5] is closely related, but differs in two main ways: unlike their approach which controls in the observation space through sampled actions (at ≈ 5Hz), our controller runs gradient based optimization on a learned low-dimensional pose embedding in real-time (> 30 Hz). Also, their approach requires an external tracker to measure progress while we explicitly learn to data associate across large motions. Our work borrows several ideas from prior work by Watter et al. [9] which learns a latent low-dimensional embedding for fast reactive control from pairs of images related by an action. Unlike their work though, we use a structured latent representation (object poses), predict object masks and use a physically grounded 3D loss that only models change in observations as opposed to a restrictive image reconstruction loss. Last, our losses are physically motivated similar to those proposed for training position-velocity encoders [13], but our learned pose embedding is significantly more structured and we train our networks end-to-end directly for control. Data association: Related work in the computer vision literature has looked at tackling the data association problem, primarily by matching visual descriptors, either hand-tuned [14], or more recently, learned using deep networks [15], [16]. In prior work, Schmidt et al. [15] learn robust visual descriptors for long-range associations using correspondences over short training sequences. Unlike this work, we only use correspondences between pairs of frames to learn a consistent pose space that lets us data associate across long sequences. Visual servoing: Finally, there have been multiple approaches to visual servoing over the years [1], [17], [18], including some newer methods that use deep learned features and reinforcement learning [19]. While these methods depend on an external system for data association or on pre-specified features, our system is trained end-to-end and can control directly from raw depth data. III. SE3-P OSE -N ETS Our deep dynamics model SE3-P OSE -N ETS decomposes the problem of modeling scene dynamics into three subproblems: a) modeling scene structure by identifying parts of the scene that move distinctly and by encoding their latent state as a 6D pose, b) modeling the dynamics of individual parts under the effect of the applied actions as a change in the latent pose space (parameterized as an SE(3) transform), and finally c) combining these local pose changes to model the dynamics of the entire scene. Each sub-problem is modeled by a separate component of the SE3-P OSE -N ET: • Modeling scene structure: An encoder (henc ) that decomposes the input point cloud (x1 ) into a set of K rigid parts, predicting per part a 6D pose (pk , k = 1 . . . K) and a dense segmentation mask (mk ) that highlights points belonging to that part • Modeling part dynamics: A pose transition network (htrans ) that models dynamics in the pose space, taking in the current poses (pt ) and action (ut ) to predict the change in poses (∆pt ) • Predicting scene dynamics: A transform layer (htf m ) that predicts the next point cloud (x̂t+1 ) given the current point cloud (xt ), predicted object masks (mt ) and the predicted pose deltas (∆pt ) by explicitly applying 3D rigid body SE(3) transforms on the input point cloud. Fig. 2 shows the network architecture of the SE3-P OSE -N ET. Next, we present the details of the three sub-components and outline a training procedure for training the SE3-P OSE -N ET end-to-end with minimal supervision. A. Modeling scene structure Given a 3D point cloud x from a depth sensor (represented as a 3-channel image, 3 x H x W), the encoder (blue block in Fig. 2) segments the scene into distinctly moving parts (m) and predicts a 6D pose per segmented part (p). (p, m) = henc (x) (1) The encoder has three parts, the first is a convolutional network that generates a latent representation of the input point cloud (x). This network has five convolutional layers, each followed by a max pooling layer. The latent representation is further used as input for the mask and pose predictions. Object masks: We use a de-convolutional network to predict a dense pixel-wise segmentation of the scene into it’s constituent parts (m). Similar to prior work [4], we use a fully-convolutional architecture with five de-convolutional layers and a skip-add architecture to improve the sharpness of the predicted segmentation. The masks predicted by this network are at full resolution with K channels (K x H x W), where K is a pre-specified hyper-parameter that is greater than or equal to the number of moving parts in the scene (including background). The predicted segmentation mask learns to attend to parts of the scene that move together, representing areas of the scene that can move independently as different parts. As in prior work [4], we formalize mask prediction as a soft-classification problem where the network outputs a k-length probability distribution which we sharpen to push towards a binary segmentation mask. Object poses: Given the encoded latent representation, we use a three layer fully-connected network to predict the 6D pose pk of each of the K segmented parts. We represent each pose by 6 numbers: a 3D position (y ∈ R3 ) and an 1 Bold fonts denote collections of items Pose and Mask Encoder : Transform Network: xt mt Pose Transition Network: xt+1 xt pt pt pt+1 ut Fully Connected ut Transform Network Convolution Max-Pool Batchnorm Deconvolution Batchnorm Concatenation ut pt+1 Transform Layer Pose Transition Network pt pt+1 Pose Loss (Lp) xt Pose Error (E) mt xt+1 Pose and Mask Encoder 3D Loss (Lx) Fig. 2: Top: xt SE3-P OSE -N ET pT Pose and Mask Encoder Pose and Mask Encoder xt xT c+1 pt Pose and Mask Encoder pt xt+1 architecture consisting of three components: the encoder (henc , shown in blue) that predicts dense segmentation masks (m) and 6D poses (p), a pose transition net (htrans ) that models the change in the pose space (∆p) as an effect of the applied action (u) and the transform layer that applies these pose changes to the current point cloud to generate a predicted point cloud (x̂). Bottom Left: Graph showing the procedure for training the SE3-P OSE -N ET along with two loss functions: a 3D loss on the predicted point cloud (Lx ) and a pose consistency loss (Lp ) relating the "next" poses predicted by the transform network (p̂t+1 ) and the encoder (pt+1 ). Bottom Right: Control using the SE3-P OSE -N ET. Given a target point cloud (xT ) encoded as poses (pT ) through the learned encoder, we use the learned transition model (htrans ) to plan a sequence of actions u0 , u1 , ..., uT by minimizing error (E) directly in the pose space from an initial point cloud p0 . orientation (R ∈ SO(3)), represented as a 3-parameter axisangle vector. As we show later, our pose network learns to predict consistent poses which can be used to data-associate observations over long sequences of motions. At a high level, the encoder implicitly learns the structure of observed scenes by persistently identifying parts and predicting a consistent pose for each part across multiple scenes. B. Modeling part dynamics Once we have identified the constituent parts of the scene and their poses, we can reason about the effect of applied actions on these parts. We model this notion of "part dynamics" through a fully-connected pose transition network that takes the predicted poses from the encoder (p) and applied actions (u) as input to predict the change in pose (∆p) for all K segmented parts: ∆p = htrans (p, u) (2) where ∆p = [R, T] is represented as an SE(3) transform per part, with a rotation Rk ∈ SO(3) (parameterized as an axis-angle transform) and a translation vector Tk ∈ R3 . The transition network first applies two fully connected layers to both inputs, concatenates their outputs followed by two final fully-connected layers to predict the pose-deltas. As we show later in Sec. IV we rely on good predictions of pose-deltas through the pose-transition network for efficient control. C. Predicting scene dynamics Finally, given the predicted scene segmentation (mt ) and the change in poses (∆pt ), we can model the dynamics of the input scene (xt ) under the effect of the applied action (ut ). We do this through the Transform layer (htf m ) which applies the predicted rigid rotations (Rt ) and translations (Tt ) to the input point cloud, weighted by the predicted mask probabilities (mt ). We predict the transformed point cloud (x̂t+1 ) as: K   X mkj x̂jt+1 = Rtk xjt + Ttk (3) t k=1 where x̂jt+1 is the 3D output point corresponding to input point xjt . In effect, we apply the kth rotation and translation (∆pk = [Rk , T k ]) to all points xj that belong to the corresponding object as indicated by the kth mask channel mk (assuming that the mask is binary after weight sharpening) to predict the transformed points x̂j belonging to that object. Repeating this for all objects gives us the transformed output point cloud (x̂). Note that this part has no trainable parameters. For more details, please refer to prior work [4]. D. Training We now outline a procedure to train the SE3-P OSE -N ET end-to-end, using supervision in the form of point-wise data associations across a pair of point clouds (xt , xt+1 ), related by an action (ut ) i.e. for each input point (xit ), we know it’s corresponding point in the next frame if it is visible (xit+1 ). No other supervision is given for learning the masks, poses, and the change in poses. Fig. 2 (bottom-left) shows a schematic of this procedure. Given two point clouds xt , xt+1 , we use the encoder to predict the corresponding masks and poses: pt , mt = henc (xt ) pt+1 , mt+1 = henc (xt+1 ) (4) Next, the predicted pose (pt ) and control (ut ) at t are used as input to the pose transition network to predict the change in pose from t to t + 1: ∆pt = htrans (pt , ut ) (5) Finally, we use the transform layer (3) to predict the next point cloud: x̂t+1 = htf m (xt , mt , ∆pt ) (6) The predicted mask (mt+1 ) at time t + 1 is discarded. We use two losses to train the entire pipeline end to end: • A 3D loss (Lx ) that penalizes the error between the predicted point cloud (x̂t+1 ) and the data associated target point cloud (x̃t+1 ). We use a normalized version of the mean-squared error (MSE) that measures the negative log-likelihood under a Gaussian centered around the target with a standard deviation dependent on the target magnitude: HW 1 X (x̂it+1 − x̃it+1 )2 (7) Lx = N αf˜i + β i=1 • where (f˜i = x̃it+1 − xit ) denotes the ground truth motion for point i relative to the input point cloud xt , HW is the number of points in the point cloud, N is the number of points that actually move between t and t + 1 and α & β are hyper-parameters (α = 0.5, β = 1e − 3 in all our experiments). This loss is aimed to tackle two main issues with a standard MSE loss: a) By normalizing the loss by a separate scalar per dimension (f˜i ) that depends on the target magnitude we make the loss scale invariant allowing us to treat equally parts that move less (such as the end-effector when only the wrist rotates) as those that have large motion (eg. the elbow), and b) By dividing the total error by the number of points (N ) that move in the scene, we treat scenes where very few points move equally as those where large parts move. A pose consistency loss (Lp ) that encourages consistency between the poses predicted by the encoder (pt , pt+1 ) and the change in pose predicted by the pose transition network (∆pt ): p̂t+1 = pt ⊕ ∆pt Lp = 1 I I X (p̂it+1 − pit+1 )2 i=1 (8) where ⊕ refers to composition in SE(3) pose space, p̂t+1 is the expected pose at t + 1 from composing the current pose (pt ) and the predicted pose change from the transition model (∆pt ) and I is the cardinality of pt . In essence, this loss constrains the encoder to predict poses that are consistent with the pose-deltas predicted by the transition model. This loss encourages global consistency in the pose space by enforcing local consistency over pairs of frames and is crucial for learning a pose space that is consistent across long term motions. The total loss for training (L) is a sum of the two losses: L = Lx + γLp , where γ controls the relative strengths of the two losses. We set γ = 10 in all our experiments. A key point to note is that we do not provide any explicit supervision to learn the pose space. While the consistency loss ensures that the poses are more or less globally consistent, it does not anchor them to a specific 3D position or orientation. As such, the poses learned by the network need not correspond directly to the canonical 6D pose of the parts - the predicted part position y k does not need to correspond to its center and the orientation need not be aligned to the part’s principal axes. Providing more constraints to regularize and physically ground the pose space is an interesting area for future work. IV. C LOSED -L OOP V ISUOMOTOR C ONTROL USING SE3-P OSE -N ETS We now show how an SE3-P OSE -N ET can be used for closed-loop visuomotor control to reach a target specified as a target depth image, essentially performing visual servoing [1]. A crucial component of every visual servoing system is to perform data association between the current image and the target image, which can then be used to generate controls that reduce the corresponding offsets. SE3-P OSE -N ETS solve this problem by making use of the learned, low-dimensional latent pose space. By enforcing frame-to-frame consistency in the pose space through the consistency loss (Eqn. 8), the pose space becomes consistent, that is, our encoder network learns to data-associate observations to unique poses which are consistent under the effect of actions. Importantly, these data associations are generated at the mask, or object level, resulting in an ability akin to object detection in computer vision. Unlike prior work [4], [20] which is restricted to operate in the observation space of 3D points and requires data associations between current and target points to be provided externally, we can now directly minimize error between the poses p0 and pT automatically extracted from the initial and the target depth image to recover the sequence of actions that takes the robot from p0 to pt . Additionally, unlike prior work [20], we do not need an external tracking system to measure progress toward the goal as our learned encoder implicitly tracks in the pose space. A. Reactive control Algorithm 1 presents a simple algorithm for reactive control using SE3-P OSE -N ETS that efficiently computes a closedloop sequence of controls that takes the robot from any initial state x0 to the specified target xT (the corresponding network Algorithm 1 Reactive visuomotor control Given: Target point cloud (xT ) Given: Pre-trained encoder (henc ) and transition model (htrans ) Given: Maximum control magnitude: umax Compute target pose: pT = henc (xT ) while not converged do Receive current observation (xt ) Predict current pose: pt = henc (xt ) Initialize control to all zeros: ut = 0 Predict change in pose: ∆pt = htrans (pt , ut ) Predict next pose: p̂t+1 = ptP ⊕ ∆pt I Compute pose error: E = I1 i=1 (p̂it+1 − piT )2 dE Compute gradient of error w.r.t. control: g = dUt g Compute control: ut = −umax ∗ ||g|| Execute control ut on the robot structure is given in the lower right panel of Fig. 2). Given a target point cloud, xT , the algorithm uses the learned encoder to predict the poses of the constituent parts pT = henc (xT ). This becomes the target to the controller. At every time step, the algorithm computes the pose embedding pt of the current observation xt . We would like to find controls that move these poses closer to the target poses. To do this, the algorithm makes a prediction through the learned pose transition model using the current poses (pt ) and an initial guess for the controls (here we use ut = 0), resulting in a predicted change in poses (∆pt ) and the corresponding predicted next pose (p̂t+1 ) 2 . To move these poses towards the targets, we formulate an error function E based on the mean-squared error between these predicted poses and the target poses. The algorithm then computes the gradient of this error with respect to the control inputs, which it uses to generate the next controls. We propose two ways of computing the gradient: • • Backpropagation: A simple approach to compute this gradient update is to backpropagate the gradients of the pose error E through the pose transition model. Unlike backpropagation during training, where we compute gradients w.r.t. the network weights, here we fix the weights and compute gradients over the input controls. The resulting control scheme is analogous to the Jacobian Transpose method from inverse kinematics [8], where backprop provides the gradient of the transition model. Gauss-Newton: A better approach is to compute the Gauss-Newton update: g = (J T J + λI)−1 J T ∗ gP (9) where J is the Jacobian of the transition model, and gP is the gradient of the pose error (E). However, instead of computing g via backpropagation, we condition the pose error gradient (gP ) based on the Jacobian’s pseudoinverse, where λ controls the strength of the conditioning 2 Even when using a zero control initialization, this forward pass through the network is necessary to get the correct gradients for the backward pass. (set to 1e-4 in all our experiments). In practice, this leads to significantly faster convergence with little to no additional overhead in computation compared to the backpropagation method as the Jacobian can be computed efficiently through finite differencing. We do this by running a single forward propagation with perturbed control inputs (perturbation set to 1e-3) stacked along the batch dimension to take advantage of GPU parallelism. Eqn. 9 is also analogous to the Damped Least Squares technique from inverse kinematics [8]. Finally, the algorithm computes the unit-vector in the direction of the computed update and scales this by a pre-specified control magnitude umax (1 radian in all our experiments) to get the next control ut . We execute this control on the robot and repeat in a closed-loop until convergence measured either by reaching a small error in the pose space (E < ) or a maximum number of iterations, whichever comes first. V. E VALUATION We first evaluate SE3-P OSE -N ETS on predicting the dynamics of a scene where a Baxter robot moves its right arm in front of the depth camera, both in simulation and in the real world. We also present results on control performance where the task is to control the joints of the Baxter’s right arm to reach a specified target observation. A. Task and Data collection We first provide details on the task setting in simulation. Our simulator uses OpenGL to render depth images from a camera pointed towards the robot (see Fig. 1) and is kinematic with little to no dynamics in the motion and no depth noise. We use this as a test bed to parse the effectiveness of the proposed algorithm and compare it to various baselines. We collected around 8 hours of training data in the simulator where the robot moves all joints on it’s right arm. Around half of the examples are whole arm motions where the robot plans a trajectory to reach a target end-effector position sampled randomly in the workspace in front of the robot. The rest of the motions are made of perturbations of individual joints on the robot from various initial configurations sampled to be within the viewpoint of the camera. These additional motions help in de-correlating the kinematic chain dependencies during training, improving performance especially on joints lower down the kinematic chain. Overall, this dataset has around 800,000 training images collected from a single fixed viewpoint. Similar to the simulated setting, we collect data from the real robot where the Baxter moves its right arm in front of an ASUS Xtion Pro camera placed around 2.5 meters from the robot. Data associations, ground truth masks, and ground truth flows are determined via the DART tracker [6] on the real data. We collected around 4.5 hours of training data on the real robot, with a 2:1 mix of whole arm motions and single joint motions. As before, the motions were generated through a planner that tries to get the end-effector to randomly sampled targets in the workspace. Unlike the simulated data, the depth data in the real world is quite noisy and there are significant Fig. 3: Masks generated by different networks on simulated (top) and real data (bottom). From left to right: Ground truth depth, ground truth masks, masks predicted by the SE3-P OSE -N ET, SE3-P OSE -N ET with joint angles, SE3-N ET and SE3-N ET with joint angles. Setting Simulated Real SE3-P OSE -N ETS 0.044 0.234 SE3-P OSE -N ETS + Joint Angles 0.038 0.224 SE3-N ETS 0.030 0.221 SE3-N ETS + Joint Angles 0.024 0.212 Flow 0.035 0.228 Flow + Joint Angles 0.030 0.218 TABLE I: Average per-point flow MSE (cm) across tasks and networks, normalized by the number of points M that move in the ground truth data (motion magnitude > 1mm). Our network achieves results slightly worse than the baseline networks on both simulated and real data. However, it is also solving additional tasks necessary for control. physical and dynamics effects. For both the simulated and real world settings, our controls are joint velocities (u). B. Baselines We compare the performance of our algorithm against five different baselines: • SE3-P OSE -N ETS + Joint Angles: Our proposed network with the joint angles of the robot given as an additional input to the encoder. We use this network as a strong baseline that uses significant additional information to inform the pose prediction. • SE3-N ETS : Prior work from [4] where the network directly predicts masks and change in poses given input point clouds and control. There is no explicit pose space in this network, so we do control in the full point cloud observation space for this network. • SE3-N ETS + Joint Angles: SE3-N ETS that additionally take in joint angles as inputs. • Flow Net: Baseline flow model from prior work [4]. This network directly regresses to a per-point 3D flow without any explicit SE(3) transforms or masks. • Flow Net + Joint Angles: Baseline flow network that additionally takes in joint angles as input. All baseline networks are trained on the same data as the SE3-P OSE -N ETS using the 3D normalized loss (Lx ). flow MSE (cm) across all baselines on both simulated and real data. SE3-N ETS achieve the best results on both the simulated and real datasets while the baseline flow network performs slightly worse. Unsurprisingly, networks that have access to the joint angles do better than those which do not, as they have strictly more information that is highly correlated with the sensor data. To initial surprise, the SE3-P OSE -N ETS have the largest prediction errors among all baseline models. However, this makes sense given the following considerations: a) SE3P OSE -N ETS are trained to explicitly embed the observations in a pose space from which they predict the scene dynamics, rather than using the input point cloud directly. While this provides more structure within the network and is necessary for the control task, it also restricts the prediction to go through an information bottleneck which generally makes the training problem harder. b) SE3-P OSE -N ETS additionally have to optimize for the consistency loss, which enforces constraints that are different from those of the prediction problem evaluated in this experiment. Fig. 3 visualizes the masks predicted by SE3-P OSE -N ETS and the baseline SE3-N ET on an example each from the simulated and real data along with the ground truth masks. Even without any supervision, SE3-P OSE -N ETS and SE3N ETS learn a detailed segmentation of the arm into multiple salient parts, most of which are consistent with ground truth segments on both the simulated and real data. C. Training details We implemented our networks in PyTorch using the Adam optimizer for training with a learning rate of 1e-4. All our networks used Batch Normalization [21] and the PReLU nonlinearity [22]. We set the maximum number of moving objects K = 8 for all our experiments (7 joints + background). We train each network for 100,000 iterations in simulation and 75,000 iterations on the real data, and use the network that achieves the least validation loss across all training iterations for all our results. D. Results on modeling scene dynamics First, we present results on the prediction task used for training all the networks. Table I shows the average per-point E. Control performance Next, we test the performance of the different networks on controlling the Baxter’s right arm to reach a target configuration, specified as a point cloud xT . We test both the control algorithms presented in Sec. IV using our SE3P OSE -N ET model and the baseline models by comparing their performance on a set of 11 distinct servoing tasks (each with an average initial error of ~30 degrees per joint). We first detail a few specifics followed by an analysis of the results. Control with baseline models: While SE3-P OSE -N ETS learn a pose space that can be used for long-term data associations and control, the baseline models operate directly Fig. 4: Convergence of joint angle error in simulated Baxter control tasks. (left): without joint angles, (middle) without joint angles and detected failure case removed (for all methods), (right) with joint angles. SE3-P OSE -N ETS perform as well or better than baseline methods even though baseline models have additional information in the form of ground truth-associations. Fig. 5: Convergence of joint angle error on real Baxter control tasks (left) without joint angles (right) with joint angles (averaged across joint 0,1,2,3). in the space of observations and thus require external data associations in the observation space to be able to do any control at all. For the simulation experiments, we provide these baseline algorithms with ground-truth associations and use the procedure outlined in Alg. 1 using the MSE between the predicted point cloud x̂t+1 and the target xT as the error to be minimized for generating controls. It is important to keep in mind that the baseline models have an advantage over SE3-P OSE -N ETS for the control task as they get strictly more information in the form of ground-truth data associations. Metric and Task specification: We use the mean absolute error in the joint angles as the metric for measuring control performance. We run all models to convergence (based on the pose error for SE3-P OSE -N ETS and 3D point/flow error for the baseline models) or for a maximum of 200 iterations. Additionally, for SE3-P OSE -N ETS we terminate if the pose error increases for 10 consecutive iterations. We integrate joint velocities forward to generate position commands for the robot both in simulation and the real world. Simulation results: Fig. 4 plots the error in joint angles as a function of the number of control iterations. The plots on the left and middle show results on networks that use only raw depth as input - we control the first six joints of the robot using these networks. The right figure shows results for networks that additionally use joint angles as input - we control all 7 joints of the robot with these networks. In general, SE3P OSE -N ETS achieve excellent performance compared to the baseline models, converging quickly to an almost zero error even in the absence any external data associations. The flow model performs comparably to the SE3-P OSE -N ETS while SE3-N ETS converge far slower. We highlight a few key results: 1) For all methods, Gauss-Newton based optimization (GN) leads to faster convergence than Backprop. This is to be expected as Gauss-Newton conditions the gradient based on pseudo-second order information. 2) Baseline models perform worse given joint angles than without. This is due to an issue of credit assignment during gradient computation - the networks learn erroneous causations (when there are only correlations) between the input joint angles and the predicted flows which diminishes the control’s contribution to the prediction problem and subsequently affects the gradient. 3) All models struggle to model the motion of the final wrist joint due to increasing correlations along the kinematic chain that result in a small contribution of the joint’s own motion to the full movement of the wrist. SE3-P OSE -N ETS can overcome this problem given input joint angles (Fig. 4, right) which provides encouraging proof that adding in the joint state supplements information that is hard to parse directly from the visual state. 4) SE3-N ETS converge slowly due to a lack of good control initializations that are needed to ensure that the network starts off with a meaningful segmentation - given zero controls the SE3-N ET can choose not to segment the arm at all, and finally 5) Good performance of SE3-P OSE N ETS indicates that the learned pose space is consistent across large motions and can be used for fast reactive control, albeit not quite as robust as the baseline methods given data associations. SE3-P OSE -N ETS fail to minimize the pose error on one of the tested configurations leading to an increasing error in Fig. 4, left. Our termination check that looks for increasing pose errors does correctly identify this case and we are able to succeed on all the other examples (Fig. 4, middle). We discuss ways to further improve the robustness of our approach in Sec. VI. Real robot results: We further test the control performance using SE3-P OSE -N ETS on a few real world examples. We do not compare to any baselines as they need an explicit external data association system to be feasible. On the real robot, we restrict ourselves to controlling the first four joints of the right arm using the SE3-P OSE -N ET and control the first six joints using the model that additionally takes in joint angles as input. Fig. 5 shows the errors as a function of the iteration count. Both models converge very quickly which indicates that our network is able to control robustly even in the presence of sensor noise and unmodeled dynamics. Surprisingly, there is very little difference between GN and Backprop algorithms on the real data. A video showing realtime control results on the Baxter can be found here. Speed: SE3-P OSE -N ETS optimize errors directly in the low-dimensional pose space for control. This leads to significant speedups compared to the baselines: while both the flow and SE3-N ETS can operate at around 10Hz (excluding the data-association pipeline), SE3-P OSE -N ETS run in realtime (30Hz) including the pose detection part. VI. D ISCUSSION This paper presents SE3-P OSE -N ETS, a framework for learning predictive models that enable control of objects in a scene. In the context of a robot manipulator, we showed they solve this problem by learning a predictive model for the individual parts of the manipulator, as in prior work [4]. Additionally, SE3-P OSE -N ETS learn a consistent pose space for these parts, essentially learning to detect the 6D poses of manipulator parts in the raw depth images. This detection capability enables SE3-P OSE -N ETS to solve the data association problem that is crucial for relating the current observation of the manipulator to a desired target observation. The difference between these poses can be used to generate control signals to move the manipulator to its target pose, similar to visual servoing applied to an image of the manipulator. We also showed how the learned network can be used to determine the gradients needed for the control signals. Our experiments show that SE3-P OSE -N ETS generate control superior to representations learned by previous techniques, even when these are provided with external data associations. Furthermore, in addition to providing data associations, SE3-P OSE -N ETS allow us to compute controls directly in the low dimensional pose space, enabling far more efficient control than techniques that operate in the raw perception space. Crucially, all these abilities are learned in a single framework based on raw data traces solely annotated with frame-to-frame point cloud correspondences. Overall, the control performance shown by our SE3-P OSE N ETS is extremely encouraging and provides a strong proof of concept that such networks can learn a consistent pose space that provides long-range correspondences and fast reactive control. While this provides reason to rejoice, there are a multiple areas for improvement: 1) As shown in the real robot results, SE3-P OSE -N ETS (and other baselines) have difficulties handling joints further down the kinematic chain (joints 4,5,6 for the Baxter) whose motions are significantly correlated to the motions of the joints above. Additionally, the end-effector has poor visibility on depth images. Adding state information in the form of encoder data significantly alleviates this issue but does not fully solve it. There are potentially multiple ways to improve the model to tackle this problem, including curriculum and active learning along with better regularization and physical grounding of the pose space to remove inconsistencies. 2) A key area for future work is in extending our system to interact with and manipulate external objects. Here, a consistent pose space for objects in the scene will enable the robot to plan its motion toward the objects, enabling smooth interactions. 3) Finally, while we have shown that SE3-P OSE -N ETS can be used for single-step reactive control, we would like to do long-term planning using model based techniques such as iterative LQG [23] to leverage the full strength the latent pose space, i.e., fast real-time rollouts directly in the pose space. ACKNOWLEDGMENTS This work was funded in part by the National Science Foundation under contract number NSF-NRI-1637479 and STTR number 1622958 awarded to LULA robotics. We would also like to thank NVIDIA for generously providing a DGX used for this research via the UW NVIDIA AI Lab (NVAIL). R EFERENCES [1] S. Hutchinson, G. D. Hager, and P. I. Corke, “A tutorial on visual servo control,” IEEE transactions on robotics and automation, vol. 12, no. 5, pp. 651–670, 1996. [2] B. Boots, A. Byravan, and D. Fox, “Learning predictive models of a depth camera & manipulator from raw execution traces,” in ICRA. IEEE, 2014, pp. 4021–4028. [3] C. Finn, I. Goodfellow, and S. Levine, “Unsupervised learning for physical interaction through video prediction,” in NIPS, 2016. [4] A. Byravan and D. Fox, “Se3-nets: Learning rigid body motion using deep neural networks,” in Robotics and Automation (ICRA), 2017 IEEE International Conference on. IEEE, 2017, pp. 173–180. [5] C. Finn and S. Levine, “Deep visual foresight for planning robot motion,” in Robotics and Automation (ICRA), 2017 IEEE International Conference on. IEEE, 2017, pp. 2786–2793. [6] T. Schmidt, R. A. Newcombe, and D. Fox, “Dart: Dense articulated real-time tracking.” in RSS, 2014. [7] R. Anderson, D. Gallup, J. T. Barron, J. Kontkanen, N. Snavely, C. Hernández, S. Agarwal, and S. M. Seitz, “Jump: virtual reality video,” ACM Transactions on Graphics (TOG), 2016. [8] S. R. Buss, “Introduction to inverse kinematics with jacobian transpose, pseudoinverse and damped least squares methods.” [9] M. Watter, J. Springenberg, J. Boedecker, and M. Riedmiller, “Embed to control: A locally linear latent dynamics model for control from raw images,” in NIPS, 2015, pp. 2728–2736. [10] N. Wahlström, T. B. Schön, and M. P. Deisenroth, “From pixels to torques: Policy learning with deep dynamical models,” arXiv preprint arXiv:1502.02251, 2015. [11] S. Levine, C. Finn, T. Darrell, and P. Abbeel, “End-to-end training of deep visuomotor policies,” JMLR, vol. 17, no. 39, pp. 1–40, 2016. [12] P. Agrawal, A. Nair, P. Abbeel, J. Malik, and S. Levine, “Learning to poke by poking: Experiential learning of intuitive physics,” arXiv preprint arXiv:1606.07419, 2016. [13] R. Jonschkowski, R. Hafner, J. Scholz, and M. Riedmiller, “Pves: Position-velocity encoders for unsupervised learning of structured state representations,” arXiv preprint arXiv:1705.09805, 2017. [14] D. G. Lowe, “Distinctive image features from scale-invariant keypoints,” IJCV, vol. 60, no. 2, pp. 91–110, 2004. [15] T. Schmidt, R. Newcombe, and D. Fox, “Self-supervised visual descriptor learning for dense correspondence,” IEEE Robotics and Automation Letters, vol. 2, no. 2, pp. 420–427, 2017. [16] X. Wang and A. Gupta, “Unsupervised learning of visual representations using videos,” in Proceedings of the IEEE International Conference on Computer Vision, 2015, pp. 2794–2802. [17] B. Espiau, F. Chaumette, and P. Rives, “A new approach to visual servoing in robotics,” Geometric reasoning for perception and action, pp. 106–136, 1993. [18] F. Chaumette, S. Hutchinson, and P. Corke, “Visual servoing,” in Springer Handbook of Robotics, 2016, pp. 841–866. [19] A. X. Lee, S. Levine, and P. Abbeel, “Learning visual servoing with deep features and fitted q-iteration,” arXiv preprint arXiv:1703.11000, 2017. [20] C. Finn and S. Levine, “Deep visual foresight for planning robot motion,” arXiv preprint arXiv:1610.00696, 2016. [21] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” arXiv preprint arXiv:1502.03167, 2015. [22] K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” in ICCV, 2015, pp. 1026–1034. [23] E. Todorov and W. Li, “A generalized iterative lqg method for locallyoptimal feedback control of constrained nonlinear stochastic systems,” in ACC. IEEE, 2005, pp. 300–306.
3cs.SY
An Introduction to Quantum Computing, Without the Physics Giacomo Nannicini IBM T.J. Watson, Yorktown Heights, NY [email protected] Last updated: February 14, 2018. arXiv:1708.03684v3 [cs.DM] 13 Feb 2018 Abstract This paper is a gentle but rigorous introduction to quantum computing intended for discrete mathematicians. Starting from a small set of assumptions on the behavior of quantum computing devices, we analyze their main characteristics, stressing the differences with classical computers, and finally describe two well-known algorithms (Simon’s algorithm and Grover’s algorithm) using the formalism developed in previous sections. This paper does not touch on the physics of the devices, and therefore does not require any notion of quantum mechanics. Numerical examples on an implementation of Grover’s algorithm using open-source software are provided. 1 Introduction Quantum computing is a relatively new area of computing that has the potential to greatly speedup the solution of certain problems. However, quantum computers work in a fundamentally different way than classical computers. This introduction aims to explain the basic principles underpinning quantum computing. It assumes the reader is at ease with linear algebra, and with basic concepts in classical computing such as Turing machines, and algorithm complexity. The literature contains many textbooks on quantum computing: a comprehensive reference is [Nielsen and Chuang, 2002], whereas more modern textbooks that are more accessible to non-physicists are [Mermin, 2007, Rieffel and Polak, 2011]. However, those books are timeconsuming reads. There are not many short introductions that are truly accessible to nonphysicists: [Rieffel and Polak, 2000] is noteworthy, as it actually uses very little physics. The approach used in this work is, as far as we are aware, different from the literature in the sense that it abstracts entirely away from quantum physics: we study a quantum computing device starting from a small set of assumptions, and rigorously derive the remaining properties. The assumptions are verified in the real world because of the laws of quantum mechanics, but it is not necessary to understand why they hold: as long as we are willing to take a small leap of faith and believe that these assumptions are true, the rest will follow. The exposition in this work is more formal than in other surveys in the literature, but in some sense more mathematically precise: it defines the necessary concepts in a rigorous ways, rather than relying on examples or intuition, and provides formal proofs. 1.1 Overview The paper is structured as follows. • In the rest of this section we discuss notation and linear algebra preliminaries. • In Section 2 we define the state of a quantum computer. • In Section 3 we discuss the operations that can be applied by a quantum computer. • In Section 4 we analyze Simon’s algorithm, which gives an example of a fundamental principle in quantum algorithms known as destructive interference. • In Section 5 we analyze Grover’s algorithm, showcasing amplitude amplification, another fundamental principle in quantum algorithms. • Finally, Section 6 shows how to implement Grover’s algorithm using QISKit, an opensource Python library for quantum computation. The material in this paper is developed to support a graduate-level module in quantum computing. In our experience with blackboard-style delivery in the classroom, the material can be split into four modules of 90-120 minutes each, covering Sections 1-2, Section 3, Section 4, and Section 5 respectively; plus, if desired, a hands-on class on numerics using Section 6. In the classroom, we suggest introducing Definitions 3-5 only when they are used, and of course many of the details can be skipped, adjusting the flow as necessary: we highlight with light gray background parts of the material that can be skipped, or briefly summarized, without significantly impairing understanding of subsequent parts. 1.2 Model of computation The quantum computing device is, in abstract terms, similar to a classical computing device: it has a state, and the state of the device evolves according to certain operations. More specifically, the model of computation that we consider is inspired by the current generation of quantum computing hardware, and it works as follows: 1. The state of the quantum computer is contained in a quantum register, which is initialized in a predefined way. 2. The state evolves according to operations specified in advance according to an algorithm. 3. At the end of the computation, some information on the state of the quantum register is obtained by means of a special operation, called a measurement. All terms in italics will be the subject of the assumptions mentioned earlier, upon which our exposition will build. Note that this type of computing device is similar to a Turing machine, except for the presence of a tape. It is possible to assume the presence of a tape and be more formal in defining a device that is the quantum equivalent of a Turing machine, see [Deutsch, 1985], but there is no need to do so for the purposes of this work. 1.3 Basic definitions and notation A discussion on quantum computers requires notational devices to switch back and forth from the decimal and the binary representation of integers, some bit operations, and familiarity with the properties of the tensor product. We describe here the necessary concepts and the notation, so that the reader can come back to this section at any time to clarify symbols. Definition 1. Given two vector spaces V and W over a field K with bases e1 , . . . , em and f1 , . . . , fn respectively, the tensor product V ⊗ W is another vector space over K of dimension mn. The tensor product space is equipped with a bilinear operation ⊗ : V × W → V ⊗ W . The vector space V ⊗ W has basis ei ⊗ fj ∀i = 1, . . . , m, j = 1, . . . , n. 2 If the origin vector spaces are complex Hilbert spaces H of the for Cn , and we choose the standard basis (consisting of the orthonormal vectors that have a 1 in a single position and 0 elsewhere) in the origin vector spaces, then the tensor product is none other than the Kronecker product, which is itself a generalization of the outer product. This is formalized next. Definition 2. Given A ∈ Cm×n , B ∈ Cp×q , the Kronecker product A ⊗ B is the matrix D ∈ Cmp×nq defined as:   a11 B . . . a1n B  a21 B . . . a2n B    D := A ⊗ B =  . ..  . .  . .  am1 B . . . amn B If we choose the standard basis over the vector spaces Cm×n and Cp×q , then the bilinear operation ⊗ of the tensor product Cm×n ⊗ Cp×q is simply the Kronecker product. In this paper we always work with complex Hilbert spaces H of the form Cn , using the standard basis. With a slight but common abuse of notation, we will therefore use tensor product to refer to the Kronecker and outer products. The next proposition states some properties of the tensor product that will be useful in the rest of this paper. Proposition 1. Let A, B : Cm×m , C, D ∈ Cn×n be linear transformations on V and W respectively, u, v ∈ C m , w, x ∈ Cn , and a, b ∈ C. The tensor product satisfies the following properties: (i) (A ⊗ C)(B ⊗ D) = AB ⊗ CD. (ii) (A ⊗ C)(u ⊗ w) = Au ⊗ Cw. (iii) (u + v) ⊗ w = u ⊗ w + v ⊗ w. (iv) u ⊗ (w + x) = u ⊗ w + u ⊗ x. (v) au ⊗ bw = abu ⊗ w. (vi) (A ⊗ C)∗ = A∗ ⊗ C ∗ . Above and in the following, the notation A∗ denotes the conjugate transpose of A. Given a matrix A, the notation A⊗n indicates the tensor product of A with itself n times, and the same notation will be used for Hilbert spaces: A⊗n := A ⊗ A · · · ⊗ A, | {z } H⊗n := H ⊗ H · · · ⊗ H . | {z } n times n times To work with the binary representation of integer numbers, we use the following definitions. Definition 3. For any integers q > 0 and 0 ≤ j ≤ 2q − 1, we denote by jBq ∈ {0, 1}q the vector containing the binary representation of j on q digits. Definition 4. For any integers q > 0 and 0 ≤ j ≤ 2q − 1, 0 ≤ k ≤ 2q − 1, we denote by j ⊕q k the bitwise modulo 2 addition (bitwise XOR), defined as: ( 0 if (jBq )p = (kBq )p j ⊕q k = h (hBq )p = 1 otherwise. When the subscript is omitted, it is intended to be 1, i.e., ⊕ is the same as ⊕1 . 3 Definition 5. For any integers q > 0 and 0 ≤ j ≤ 2q − 1, 0 ≤ k ≤ 2q − 1, we denote by j •q k the bitwise dot product, defined as: j •q k = q X (jBq )h (kBq )h . h=1 The last piece of notation that we need is the bra-ket notation, used in quantum mechanics. As mentioned earlier, this paper will not touch on any quantum mechanical concepts, however there is an undeniable advantage in the quantum notation in that it puts the most important information in the center of the symbols, rather than relegate it to a marginal role in the subscript or superscript. Furthermore, a goal of this work is to equip the reader with the necessary tools to understand quantum computing papers, hence it is important to familiarize with the bra-ket notation. Definition 6. Given a Hilbert space H ≡ Cn , a quantity ψ ∈ H enclosed in a ket, denoted |ψi, is a vector and can be thought of as a column vector. A quantity φ ∈ H∗ enclosed in a bra, denoted hφ|, is a vector in the dual space, and can be thought of as a row vector that is the conjugate transpose of φ ∈ H. Thus, an expression such as hψ|φi is an inner product in the Hilbert space. The Hilbert spaces used in this work will be of the form (C2 )⊗q , where q is a given integer. It is therefore convenient to specify the basis elements of such spaces.     0 1 2 . The standard , |1i1 = Definition 7. The standard basis for C is denoted by |0i1 = 1 0 basis for (C2 )⊗q , which has 2q elements, is denoted by |0iq , |1iq , . . . , |2q − 1iq . We now define more formally our ket notation for basis vectors. • For any q-digit binary string x ∈ {0, 1}q , |xi is the 2q -dimensional basis vector (C2 )⊗q Pq−1 inq−j−1 corresponding to the binary string, i.e., the basis vector with a 1 in position j=0 2 xj , > and 0 elsewhere. For example: |101i is the 8-dimensional basis vector (0 0 0 0 0 0 1 0) . • When x is any integer ≤ 2q − 1, |xiq is the 2q -dimensional basis vector |xBq i ∈ (C2 )⊗q , i.e. the basis vector in which x is expressed as a binary string on q digits. We always use the subscript |xiq whenever is a basis state. For example: |6i3 = |101i is the 8-dimensional basis vector (0 0 0 0 0 0 1 0)> . Notice that according to our notation, |0i = |0i1 and |1i = |1i1 , i.e., the subscript can be omitted for the basis vectors in C2 . We provide an example of this notation below. Example 1. Let us write the basis elements of (C2 )⊗2 = C2 ⊗ C2 :     1 0 0 1   |1i2 = |0i ⊗ |1i = |01i =  |0i2 = |0i ⊗ |0i = |00i =  0 0 0 0     0 0 0 0   |2i2 = |1i ⊗ |0i = |10i =  |3i2 = |1i ⊗ |1i = |11i =  1 0 . 0 1 Thus, the index in the standard basis for (C2 )⊗q of the basis element corresponding to a tensor product of basis elements of C2 is given simply by the decimal number corresponding to the binary string obtained by concatenating the indices of the basis elements of C2 . 4 2 Qubits and quantum state According to our computational model, a quantum computing device has a state that is stored in the quantum register. Qubits are the quantum counterpart of the bits found in classical computers: a classical computer has registers that are made up of bits, whereas a quantum computer has a single quantum register that is made up of qubits. The state of the quantum register, and therefore of the quantum computing device, is defined next. ⊗q Assumption 1. The state of q qubits is a unitary vector in C2 = C2 ⊗ · · · ⊗ C2 . Remark 1. If we pick basis for C2 , then a single qubit (q = 1) can be represented   the standard   1 0 as α|0i + β|1i = α +β where α, β ∈ C and |α|2 + |β|2 = 1. 0 1 ⊗q Remark 2. Given the standard basis for each C2 , a basis for C2 is given by: |0iq = |0i ⊗ · · · ⊗ |0i ⊗ |0i = |0Bq i | {z } q times |1iq = |0i ⊗ · · · ⊗ |0i ⊗ |1i = |1Bq i | {z } q times .. . |2q − 1iq = |1i ⊗ · · · ⊗ |1i = |(2q − 1)Bq i. {z } | q times P q −1 P q −1 |αj |2 = αj |jiq , with αj ∈ C and 2j=0 The state of q qubits can be represented as: |ψi = 2j=0 1. ⊗q It is important to notice that C2 is a 2q -dimensional space. This is in sharp contrast with the state of classical bits: given q classical bits, their state is a binary string in {0, 1}q , which is a q-dimensional space. In other words, the dimension of the state space of quantum registers grows exponentially in the number of qubits, whereas the dimension of the state space of classical registers grows linearly in the number of bits. Furthermore, to represent a quantum state we need complex coefficients: a q-qubit quantum register “stores” 2q complex coefficients, which is an enormous amount of information compared to what is stored in a q-bit classical register. However, we will see in Section 3.2 that a quantum state cannot be accessed directly, therefore even if the quantum state contains a lot of information, we cannot get access to it as easily as with classical registers. 2.1 Basis states and superposition P q −1 Definition 8. We say that q qubits are in a basis state if their state |ψi = 2j=0 αj |jiq is such that ∃k : |αk | = 1, αj = 0 ∀j 6= k. Otherwise, we say that they are in a superposition. Example 2. Consider two qubits: |xi = α0 |0i + α1 |1i |yi = β0 |0i + β1 |1i. Then, the two qubits taken as a whole will be in state: |xi ⊗ |yi = α0 β0 |0i ⊗ |0i + α0 β1 |0i ⊗ |1i + α1 β0 |1i ⊗ |0i + α1 β1 |1i ⊗ |1i. 5 If both |xi and |yi are in a basis state, we have that either α0 or α1 is zero, and similarly either β0 or β1 is zero, while the nonzero coefficients have modulus one. Thus, only one of the coefficients in the expression of the state of |xi ⊗ |yi is nonzero, and in fact its modulus is one: all other coefficients are zero. This implies that if both |xi and |yi are in a basis state, |xi ⊗ |yi is in a basis state as well. But now assume that α0 = β0 = α1 = β1 = √12 : the qubits |xi and |yi are in a superposition. Then the state of |xi ⊗ |yi is 21 |00i + 12 |01i + 12 |10i + 12 |11i, which is a superposition as well. Notice that the normalization of the coefficients works out, as one can easily check with simple algebra: the tensor product of unitary vectors is unitary. The example clearly generalizes to an arbitary number of qubits. In fact the following proposition is trivially true: Proposition 2. For any q, q qubits are in a basis state if and only if each of the individual qubits is in a basis state. Notice that superposition does not have a classical equivalent: q classical bits are always in a basis state, i.e., the q bits will always correspond exactly to one of the 2q binary strings representing the numbers 0, . . . , 2q − 1. Indeed, superposition is one of the main features of quantum computers that differentiates them from classical computers. The second important feature is entanglement, that will be discussed next. 2.2 Product states and entanglement ⊗q We have seen that the state of q-qubits is a vector in C2 , which is a 2q dimensional space. Since this is a tensor product of C2 , i.e., the space in which single qubits live, it is natural to ask whether moving from single qubits to multiple qubits gained us anything at all. In other words, we want to investigate whether the quantum states that are representable on q qubits are simply the tensor product of q single qubits. We can answer this question ⊗q by using the definitions given above. The state of q qubits is a unitary vector in C2 , and it can be represented as: q −1 q −1 2X 2X |ψi = αj |jiq , |αj |2 = 1. j=0 j=0 Now let us consider the tensor product of q qubits, the j-th of which is in state βj,0 |0i + βj,1 |1i. Taking the tensor product we obtain the vector: |φi = 1 X 1 X jq−1 =0 jq−2 =0 ··· 1 q−1 X Y βk,jk |jq jq−1 . . . j0 i = j0 =1 k=0 q −1 q 2X Y βk,(jBq )k |jBq i, j=0 k=1 2 |βj,0 | + |βj,1 |2 = 1 ∀j = 1, . . . , q. P P P Q 2 The normalization condition for |φi implies that 1jq−1 =0 1jq−2 =0 · · · 1j0 =1 q−1 k=0 |βk,jk | = 1, P q −1 but it is more restrictive than that of |ψi. That is, there are values for αj with 2j=0 |αj |2 = 1 that cannot be expressed as coefficients satisfying the conditions for |φi. This is easily clarified with an example. Example 3. Consider two distinct qubits, i.e., two single-qubit states: |xi = α0 |0i + α1 |1i |yi = β0 |0i + β1 |1i. 6 Taken as a whole in a two-qubit system, they are in state: |xi ⊗ |yi = α0 β0 |00i + α0 β1 |01i + α1 β0 |10i + α1 β1 |11i, (1) with the normalization conditions |α0 |2 + |α1 |2 = 1 and |β0 |2 + |β1 |2 = 1. The general state of a two-qubit register |ψi is: |ψi = γ00 |00i + γ01 |01i + γ10 |10i + γ11 |11i, (2) with normalization condition |γ00 |2 +|γ01 |2 +|γ10 |2 +|γ11 |2 = 1. Comparing equations (1) and (2), we determine that a |ψi is of the form |xi ⊗ |yi if and only if it satisfies the relationship: γ00 γ11 = γ01 γ10 . (3) Clearly |xi ⊗ |yi yields coefficients that satisfy this condition. To see the converse, let θ00 , θ01 , θ10 , θ11 be the phases of γ00 , γ01 , γ10 , γ11 . Notice that (3) implies: |γ00 |2 |γ11 |2 = |γ01 |2 |γ10 |2 θ00 + θ11 = θ01 + θ10 . Then we can write: p 2 |γ00 | = |γ00 |2 (|γ00 |2 + |γ01 |2 + |γ10 |2 + |γ11 |2 ) p = |γ00 |4 + |γ00 |2 |γ01 |2 + |γ00 |2 |γ10 |2 + |γ01 |2 |γ10 |2 p p = |γ00 |2 + |γ01 |2 |γ00 |2 + |γ10 |2 , {z }| {z } | |γ00 | = p |α0 | |β0 | and similarly for other coefficients: p p |γ01 | = |γ00 |2 + |γ01 |2 |γ01 |2 + |γ11 |2 {z }| {z } | |α0 | |β1 | p p |γ10 | = |γ10 |2 + |γ11 |2 |γ00 |2 + |γ10 |2 | {z }| {z } |α1 | |β0 | p p |γ11 | = |γ10 |2 + |γ11 |2 |γ01 |2 + |γ11 |2 . | {z }| {z } |α1 | |β1 | To fully define the coefficients α0 , α1 , β0 , β1 we must determine their phases. We can assign: α0 = eiθ00 |α0 |, α1 = eiθ10 |α1 |, β0 = |β0 |, β1 = ei(θ01 −θ00 ) |β1 |. (4) It is now easy to verify that the state |ψi in (2) can be expressed as |xi ⊗ |yi in (1) with coefficients α0 , α1 , β0 , β1 as given in (4). We formalize the concept of expressing a quantum state as a tensor product of lowerdimensional quantum states as follows. ⊗q Definition 9. A quantum state |ψi ∈ C2 is decomposable if it can be expressed as a tensor product |ψ1 i ⊗ · · · ⊗ |ψk i of k > 2 quantum states on q1 , . . . , qk qubits respectively, with the property that q1 + · · · + qk = q. 7 ⊗q Definition 10. A quantum state |ψi ∈ C2 is a product state if it is decomposable into the tensor product of q single-qubit quantum states. Otherwise, it is entangled. Notice that a general quantum state |ψi could be the product of two or more lowerdimensional quantum state, e.g., |ψi = |ψ1 i ⊗ |ψ2 i, with |ψ1 i and |ψ2 i being entangled states. In such a situation, |ψi still exhibits some entanglement, but in some sense it can still be “simplified”. Generally, according to the definition above, a quantum state is called entangled as long as it cannot be fully decomposed. Example 4. Consider the following two-qubit state: 1 1 1 1 |00i + |01i + |10i + |11i. 2 2 2 2    This is a product state because it is equal to √12 |0i + √12 |1i ⊗ √12 |0i + the following two-qubit state: 1 1 √ |00i + √ |11i 2 2  √1 |1i 2 . By contrast, is an entangled state, because it cannot be expressed as a product of two single-qubit states. 3 Operations on qubits Operations on quantum states must satisfy certain conditions, to ensure that applying an operation does not break the basic properties of the quantum state. Assumption 2. An operation applied by a quantum computer with q qubits, also called a gate, q q is a unitary matrix in C2 ×2 . Remark 3. A matrix U is unitary if U ∗ U = U U ∗ = I. A well-known property of unitary matrices is that they are norm-preserving; that is, given a unitary matrix U and a vector x, kU xk = kxk. Thus, for a q-qubit system, the quantum state q q q is a unitary vector ψ ∈ C2 , a quantum operation is a matrix U ∈ C2 ×2 , and the application q of U onto the state ψ is the unitary vector U ψ ∈ C2 . This leads to the following remarks: • Quantum operations are linear. • Quantum operations are reversible. While these properties may initially seem to be extremely restrictive, [Deutsch, 1985] shows that a universal quantum computer is Turing-complete, implying that it can simulate any Turingcomputable function with an additional polynomial amount of space, given sufficient time. Out of the two properties indicated above, the most counterintuitive is perhaps reversibility: the classical notion of computation is typically not reversible, because memory can be erased and, in the classical Turing machine model of computation, symbols are erased from the tape. However, [Bennett, 1973] shows that computations can be made reversible by means of extra space. The general idea to make a function invertible is to have separate input and output registers. This is a standard trick in quantum computing that will be discussed in Section 4, but in order to do that, we first need to introduce some notation for quantum circuits. 8 3.1 Notation for quantum circuits A quantum circuit is represented by indicating which operations are performed on each qubit, or group of qubits. For a quantum computer with q qubits, we represent q qubit lines, where the bottom line indicates qubit 1 and the rest are given in ascending order from the bottom. Operations are represented as gates; from now, the two terms are used interchangeably. Gates take qubit lines as input, have the same number of qubit lines as output, and apply the unitary matrix indicated on the gate to the quantum state of those qubits. Figure 1 is a simple example. qubit 3 qubit 2 U qubit 1 Figure 1: A simple quantum circuit. Note that circuit diagrams are read from left to right, but because each gate corresponds to applying a matrix to the quantum state, the matrices corresponding to the gates should be written from right to left in the mathematical expression describing the circuit. For example, in the circuit in Figure 2, the outcome of the circuit is the state BA|ψi, because we start with |ψi A B BA|ψi Figure 2: Order of the operations in a quantum circuit. state |ψi, and we first apply the gate with unitary matrix A, and then B. Gates can also be applied to individual qubits. Because a single qubit is a vector in C|2 , a single-qubit gate is a unitary matrix in C2×2 . Consider the same three-qubit device, and suppose we want to apply the gate only to the first qubit. We would write it as in Figure 3 qubit 3 U qubit 2 qubit 1 Figure 3: A circuit with a single-qubit gate. From an algebraic point of view, the action of our first example in Figure 1 on the quantum state is clear: the state of the three qubits is mapped onto another three-qubit state, as U acts on all the qubits. To understand the example in Figure 3, where U is a single-qubit gate that acts on qubit 3 only, we must imagine that an identity gate is applied to all the empty qubit lines. Therefore, Figure 3 can be thought of as indicated in Figure 4. qubit 3 U qubit 2 I qubit 1 I Figure 4: Equivalent representation of a circuit with a single-qubit gate. 9 This circuit can be interpreted as applying the U ⊗ I ⊗ I to the three-qubit state |ψi. Notice that by convention U , applied to qubit 3, appears in the leftmost term of the tensor product, because the basis for C2 ⊗ C2 ⊗ C2 has elements |000i, |001i, . . . , |111i where by convention we label qubit 3 the leftmost qubit. In particular, if we have a product state |xi ⊗ |yi ⊗ |zi, we can write labels as indicated in Figure 5. |xi |xi |yi |yi |zi U U |zi Figure 5: Effect of a single-qubit gate on a product state. This is because (I ⊗ I ⊗ U )(|xi ⊗ |yi ⊗ |zi) = |xi ⊗ |yi ⊗ U |zi. If the system is in an entangled state, however, the action of (I ⊗ I ⊗ U ) cannot be determined in such a simple way, because the state cannot be factored as a product state. Thus, for a general entangled state, the effect of the circuit is as indicated in Figure 6. Notice that this fact is essentially the reason why simulation    |ψi (I ⊗ I ⊗ U )|ψi   U Figure 6: Effect of a single-qubit gate on an entangled state. of quantum computations on classical computers takes exponential space: to simulate the effect even of a single-qubit gate on the entangled state |ψi, we have to explicitly compute the 2q × 2q matrix (I ⊗ I ⊗ U ), and then apply it to |ψi. As long as the quantum state is not entangled computations can be carried out on each qubit independently, but entanglement requires us to keep track of the full quantum state in 2q -dimensional complex space, leading to large amounts of memory required. 3.2 Input-output, and measurement gates We will first note that by convention, the initial quantum state of the quantum computing device is |0iq . Any algorithm will have to start from this state. Of course, this does not prevent the algorithm to modify the state and transform it into a more suitable one. Examples of how this can be done will be seen in subsequent sections. The important part is that if there is any data that has to be fed to the algorithm, this data will take the form of a circuit that performs some operation on the quantum state. Therefore, the input to a quantum computing device is a circuit, or a set of circuits, which are then combined in an algorithm: the algorithm may be self-contained in the quantum computer, or it may involve an external, classical computing device that uses quantum computations as a subroutine. But what is the output of the quantum computer? So far we characterized properties of quantum states and quantum gates. Remarkably, the state of a q-qubit quantum device has dimension 2q , exponentially larger than the dimension of q classical bits. However, there is a catch: in a classical computer we can simply read the state of the bits, whereas in a quantum computer we do not have direct, unrestricted access to the quantum state. Information on the quantum state is only gathered through a measurement gate, indicated in the circuit diagram in Figure 7. We now formally define the effect of a single-bit measurement. 10 |ψi M Figure 7: Single-qubit measurement. Assumption 3. Information on the state of a quantum computing P q −1 device can only be obtained through a measurement. Given a q-qubit quantum state |ψi = 2j=0 αj |jiq , a measurement gate P P 2 on qubit k outputs 0 with probability j:(jBq )k =0 |αj | , and 1 with probability j:(jBq )k =1 |αj |2 . Let x ∈ {0, 1} be the measured value. After the measurement, the quantum state becomes: X αj qP |jiq . 2 j:(jBq )k =x j:(jBq )k =x |αj | The original quantum state is no longer recoverable. Remark 4. The state of the quantum system after a measurement collapses to a linear combination of only those basis states that are consistent with the outcome of the measurement. The measurement rule for single-qubit implies a very simple and natural expression for the probability of observing a given binary string when measuring all the qubits. P q −1 αj |jiq , measuring the q qubits in Proposition 3. Given a q-qubit quantum state |ψi = 2j=0 2 q any order yields jBq with probability |αj | , for j = 0, . . . , 2 − 1. Proof. We need to show that the probability of observing jBq after q single-qubit measurements is equal to |αj |2 . We can do this by induction on q. The case q = 1 is trivial. We now M show how to go from q − 1 to q. In terms of notation, we will write Pr(i = x) to denote the probability that the measurement of qubit i yields x ∈ {0, 1}. If it is important to indicate M the quantum state on which the measurement is performed, we denote it as Pr|ψi (i = x). Suppose the qubits are measured in an abitrary order π(1), . . . , π(q). After measuring the first qubit, the quantum state becomes: X X αk qP |φi = |kiq := βk |kiq , 2 k:(kBq )π(1) =(jBq )π(1) |αk | k:(kBq )π(1) =(jBq )π(1) k:(kBq )π(1) =(jBq )π(1) where the coefficients βk , as given above, are only defined for k : (kBq )π(1) = (jBq )π(1) . Regarding the probability of measuring the outcomes, we can write:   M M Pr π(1) = (jBq )π(1) , . . . , π(q) = (jBq )π(q) = |ψi     M M M M Pr π(2) = (jBq )π(2) , . . . , π(q) = (jBq )π(q) |π(1) = (jBq )π(1) Pr π(1) = (jBq )π(1) = |ψi |ψi     M M M Pr π(2) = (jBq )π(2) , . . . , π(q) = (jBq )π(q) Pr π(1) = (jBq )π(1) . |φi |ψi By the definition of single-qubit measurement, we have:   X M Pr π(1) = (jBq )π(1) = |ψi k:(kBq )π(1) =(jBq )π(1) 11 |αk |2 . By the induction hypothesis:   M M Pr π(2) = (jBq )π(2) , . . . , π(q) = (jBq )π(q) = |φi X k:(kBq )π(h) =(jBq )π(h) ∀h=1,...,q |αk |2 X X |βk |2 = k:(kBq )π(h) =(jBq )π(h) ∀h=1,...,q |αk |2 , k:(kBq )π(1) =(jBq )π(1) where the summation is only over indices for which (kBq )π(1) = (jBq )1 by definition of |φi. Carrying out the multiplication, we obtain:   M M Pr π(1) = (jBq )π(1) , . . . , π(q) = (jBq )π(q) = |ψi |αk |2 X X k:(kBq )π(h) =(jBq )π(h) ∀h=1,...,q X |αk |2 = 2 |αk | k:(kBq )π(1) =(jBq )π(1) k:(kBq )π(1) =(jBq )π(1) X |αk |2 = |αj |2 . k:(kBq )h =(jBq )h ∀h=1,...,q Proposition 3 above shows that the two circuits in Figure 8 are equivalent. M |ψi M |ψi M M Figure 8: Multiple-qubit measurement. In other words, the single-qubit measurement gate is sufficient to measure any number of qubits in the most natural way, i.e., the measurement outcomes on the q qubits occur with probability that is exactly equal to the square of the state coefficients αj . Notice that with this simple rule, it is easy to compute the probability of measuring a given string on a given subset of the qubits: we just need to add up the modulus squared of the coefficients for all those basis states that contain the desired string in the desired position. Example 5. Consider again the following two-qubit state: 1 1 1 1 α00 |00i + α01 |01i + α10 |10i + α11 |11i = |00i + |01i + |10i + |11i. 2 2 2 2 We remarked that this is a product state. Let qubit QR be the qubit on the right (i.e., the second digit in the two-digit binary strings), and qubit QL the qubit on the left (i.e., the first digit in 12 the two-digit binary strings). Then: M 2 Pr(QL = 0) = |α00 | + |α01 | 2 M Pr(QL = 1) = |α10 |2 + |α11 |2 M Pr(QR = 0) = |α00 |2 + |α10 |2 M Pr(QR = 1) = |α01 |2 + |α11 |2  2  2 1 1 = + 2 2  2  2 1 1 + = 2 2  2  2 1 1 = + 2 2  2  2 1 1 + = 2 2 = 1 2 = 1 2 = 1 2 1 = . 2 Suppose we measure QR and we obtain 1 as the outcome of the measurement. Then the state of the two-qubit systems collapses to: 1 1 √ |01i + √ |11i. 2 2 The outcome distribution for QL for this new state is: M Pr(QL = 0) = 1 2 1 M Pr(QL = 1) = . 2 Hence, the probability of measuring 0 or 1 from qubit QL did not change after the measurement. Consider now the following entangled two-qubit state: 1 1 β00 |00i + β11 |11i = √ |00i + √ |11i. 2 2 Doing the calculations, we still have: 1 2 1 M Pr(QR = 0) = |β00 |2 = 2 1 2 1 M Pr(QR = 1) = |β11 |2 = . 2 M M Pr(QL = 0) = |β00 |2 = Pr(QL = 1) = |β11 |2 = Suppose we measure qubit QR and we obtain 1 as the outcome of the measurement. Then the state of the two-qubit system collapses to: |11i. If we measure QL from this state, we obtain: M M Pr(QL = 0) = 0 Pr(QL = 1) = 1. The situation is now very different: the probability of the outcomes from a measurement on QL have changed after measuring QR. This is exactly the concept of entanglement: when two or more qubits are entangled, they affect each other, and measuring one qubit changes the probability distribution for the other qubits. This can be seen in terms of conditional probabilities: if, for M M M all x, y ∈ {0, 1}, we have Pr(QL = x) = Pr(QL = x|QR = y), then the two qubits are not M M M entangled (product state), whereas if Pr(QL = x) 6= Pr(QL = x|QR = y) for some x, y, there is entanglement. 13 3.3 The no-cloning principle Because measurement destroys the quantum state, it is natural to look for a way to create a copy of a quantum state. If a clone could be created, it would be possible to perform measurements on the clone, so that the original state would not be destroyed. Furthermore, cloning would allow us to take several measurements of the same set of qubits without having to repeat the circuit that creates the quantum state. However, it turns out that cloning is impossible: this is a direct consequence of the properties of quantum gates. Proposition 4. Let |ψi be an arbitrary quantum state on n qubits. There does not exist a unitary matrix that maps |ψi ⊗ |0in to |ψi ⊗ |ψi. Proof. Suppose there exists such a unitary U . Then for any two quantum states |ψi, |φi on n qubits, we have: U (|ψi ⊗ |0in ) = |ψi ⊗ |ψi U (|φi ⊗ |0in ) = |φi ⊗ |φi. Using these equalities, we can write: hφ|ψi = hφ|ψih0|0in == hφ|ψi ⊗ h0|0in = (hφ| ⊗ h0|n )(|ψi ⊗ |0in ) = (hφ| ⊗ h0|n )U ∗ U (|ψi ⊗ |0in ) = (hφ| ⊗ hφ|)(|ψi ⊗ |ψi) = hφ|ψi2 . But hφ|ψi = hφ|ψi2 is only true if hφ|ψi is equal to 0 or to 1, contradicting the fact that |φi, |ψi are arbitrary quantum states. The above proposition shows that we cannot copy a quantum state. This establishes that we cannot “cheat” the destructive effect of a measurement by simply cloning the state before the measurement. Hence, whenever we run a circuit that produces an output quantum state, in general we can only reproduce the output quantum state only by repeating all the steps of the algorithm. 3.4 Basic operations and universality Existing quantum computing hardware does not allow the user to specify just any unitary matrix in the code. Quantum gates have to be constructed out of a set of basic gates. We will now discuss what these basic gates are, and how they can be combined to form other operations. The first operations that we discuss are the Pauli gates. Definition 11. The four Pauli gates are the following single-qubit gates:     1 0 0 1 I= X= 0 1 1 0     0 −i 1 0 Y = Z= . i 0 0 −1 Proposition 5. The Pauli gates form a basis for C2×2 , they are Hermitian, and they satisfy the relationship XY Z = iI. 14 The X, Y, Z gates all correspond to 90◦ rotations, around different axes. The X gate flips a qubit: X|0i = |1i X|1i = |0i. This is the equivalent of a NOT gate in classical computers. At the same time, the Z gate is also called a phase-flip gate: it leaves |0i unchanged, and maps |1i to −|1i. Z|0i = |0i Z|1i = −|1i. A single-qubit gate that is used in many quantum algorithms is the Hadamard gate:   1 1 1 H=√ . 2 1 −1 The action of H is as follows: 1 H|1i = √ (|0i − |1i) 2 1 H|0i = √ (|0i + |1i) 2 In subsequent sections we will need an algebraic expression for the action of Hadamard gates on basis states. The effect of H on a single-qubit basis state |xi1 (where x = 0 or 1) can be summarized as follows: 1 1 1 X x H|xi1 = √ (|0i + (−1) |1i) = √ (−1)k·x |ki1 . 2 2 k=0 This is consistent with our previous definition. If we apply H ⊗n on an n-qubit basis state |xin , we obtain: 1 1 Pn−1 X X 1 H ⊗n |xin = √ (−1) j=0 kj ·(xBn )j+1 |kn−1 i1 ⊗ · · · ⊗ |k0 i1 ··· 2n k =0 k =0 1 =√ 2n n−1 0 n −1 2X k•n x (−1) (5) |kin , k=0 where •n is the bitwise dot product, as defined in Section 1.3. When considering multiple Hadamard gates in parallel, we will also make use of the following relationship, that can be easily verified using the definition:   1 H ⊗n−1 H ⊗n−1 ⊗n H =√ (6) ⊗n−1 −H ⊗n−1 . 2 H The next proposition shows one of the reasons why the Hadamard gate is frequently employed in many quantum algorithms. Proposition 6. Given a q-qubit quantum device initially in the state |0iq , applying the Hadamard gate P to all qubits, equivalent to the matrix H ⊗q , yields the uniform superposition of basis states 2q −1 1 √ |jiq . q j=0 2 Proof. The state |0iq can also be written as |0i⊗q . Therefore we have: H ⊗q ⊗q |0i ⊗q = (H|0i)  = ⊗q 2q −1 1 1 1 X √ |0i + √ |1i =√ |jiq . 2 2 2q j=0 15 Remark 5. The uniform superposition of the 2q basis states on q qubits can be obtained from the initial state |0iq applying q gates only. Many quantum algorithms (for example, the algorithms discussed in Sections 4 and 5) start by setting the state of the quantum device to a uniform superposition, and then apply further operations which, by linearity, are simultaneously applied to all the possible binary strings. This is remarkable advantage of quantum computing over classical computing. The multiple Hadamard can be represented by one of the equivalent circuits given in Figure 9 |0i H √1 2 (|0i + |1i) |0i |0i H √1 2 (|0i + |1i) |0i |0i H √1 2 (|0i + |1i) H ⊗3 |0i √1 2 √1 2 √1 2 (|0i + |1i) (|0i + |1i) (|0i + |1i) Figure 9: Two representations for multiple Hadamard gates. In general, since single-qubit gates are unitary matrices, they can be represented by the following parameterized matrix:   −i(φ+λ)/2 e cos(θ/2) −e−i(φ−λ)/2 sin(θ/2) U (θ, φ, λ) = ei(φ−λ)/2 sin(θ/2) ei(φ+λ)/2 cos(θ/2) All single-qubit gates can be obtained by an appropriate choice of parameters θ, φ, λ. Another fundamental gate is the CNOT gate, also called “controlled NOT”. The CNOT gate is a two-qubit gate that has a control bit and a target bit, and acts as follows: if the control bit is |0i, nothing happens, whereas if the control bit is |1i, the target bit is flipped. The corresponding circuit is given in Figure 10 • Figure 10: The CNOT, or controlled-NOT, gate. The matrix description of the gate with control qubit 2  1 0 0 0 1 0 CNOT21 =  0 0 0 0 0 1 and target qubit 1 is as follows:  0 0 . 1 0 We can easily see that the effect of CNOT is as follows: CNOT21 |00i = |00i CNOT21 |01i = |01i CNOT21 |10i = |11i CNOT21 |11i = |10i. An interesting feature of the CNOT gate is that it can be used to swap two qubits. Considering that CNOT, as all quantum gates, is a linear map, this may sound surprising. The SWAP can be constructed as depicted in Figure 11. Proposition 7. The circuit above, constructed with three CNOTs, swaps qubits 1 and 2. 16 • • • Figure 11: A circuit that swaps two qubits. Proof. By linearity, it suffices to show that the circuit above maps |00i → |00i, |01i → |10i, |10i → |01i, and |11i → |11i. We have: CNOT21 CNOT12 CNOT21 |00i = CNOT21 CNOT12 |00i = CNOT21 |00i = |00i. CNOT21 CNOT12 CNOT21 |01i = CNOT21 CNOT12 |01i = CNOT21 |11i = |10i. CNOT21 CNOT12 CNOT21 |10i = CNOT21 CNOT12 |11i = CNOT21 |01i = |01i. CNOT21 CNOT12 CNOT21 |11i = CNOT21 CNOT12 |10i = CNOT21 |10i = |11i. Therefore, the SWAP circuit maps: α00 |00i + α01 |01i + α10 |10i + α11 |11i → α00 |00i + α01 |10i + α10 |01i + α11 |11i. The SWAP circuit is particularly important for practical reasons: in the current generation of quantum computing hardware, qubits can typically only interact with a small set of the other qubits (e.g., their neighbors on a chip). By “interaction” between a pair of qubits we mean that we can apply a two-qubit gate on the pair. Thanks to the SWAP, as long as the connectivity graph of the qubits on the device is a connected graph, any two qubits can interact with each other: if the qubits are not directly connected (e.g., physically located next to each other on the chip), we just need to SWAP one of them as many times as is necessary to bring it to a location that is directly connected to the other. This way, we can assume that each qubit can interact with all other qubits from a theoretical point of view, even if from a practical perspective this may require extra SWAP gates. The types of gates that we presented here can be shown to be sufficient to construct any unitary matrix with arbitrary precision. Definition 12. An ordered set of gates S that yields the unitary matrix A is an -approximation of a unitary matrix U if supψ:kψk=1 k(U −A)ψk < . A set of gates that yields an -approximation of any unitary matrix on any given number of qubits is called a universal set of gates. Theorem 1. (Solovay-Kitaev [Kitaev, 1997, Nielsen and Chuang, 2002]) Let U ∈ C2×2 be an arbitrary unitary matrix. Then there exists a constant c such that there exists a sequence S of gates of length O(logc 1 ) that is an -approximation of U and consists only of H, Rπ/4 =   1 0 π and CNOT gates. 0 ei 4 The theorem implies that just two single-qubit gates together with CNOT allow us to build any single-qubit gate with arbitrary precision. [Dawson and Nielsen, 2005] gives a proof with c ≈ 3.98. More recent work gives improved algorithm with smaller c, in fact even c = 1 (but different constants), see [Selinger, 2012, Kliuchnikov et al., 2016]. To go from single-qubit gates to general q-qubit gates, one needs at most O(4q ) gates (since each gate on q qubits has 2q × 2q elements), and the decomposition can be done in terms of single-qubit gates and CNOTs. In other words, the set of gates consisting of single-qubit gates and CNOT is universal, and in fact even a restricted set of single-qubit gates (the two gates indicated in Theorem 1) is universal. 17 This shows that with a very small set of basic gates, we can construct any unitary matrix in any dimension, although this may require many operations. Once again, this is important for practical reasons: the current generation of quantum hardware only allows (natively) singlequbit gates and CNOT gates, but all other gates can be constructed from these. We conclude our discussion on basic operations with a quantum circuit for the logic AND gate. Although this gate is not used by the algorithm described later, it is used in the numerical examples. We already know that the X gate performs the logic NOT: having access to the AND guarantees that we can construct any Boolean circuit (since we stated already in Section 3 that quantum computers are Turing-complete, being able to perform Boolean logic is of course a requirement). The quantum version of the AND gate is the CCNOT (doubly-controlled NOT) gate, that acts on three qubits: it has two control qubits, and swaps the third qubit if and only if both control qubits are |1i. The gate is depicted in Figure 12. The action of CCNOT can be • • Figure 12: The CCNOT, or doubly-controlled-NOT, gate. described as: |xi1 ⊗ |yi1 ⊗ |zi1 → |xi1 ⊗ |yi1 ⊗ |z ⊕ (x · y)i1 , where x, y, z ∈ {0, 1}. Notice that if z = 0, CCNOT computes the logical AND between x and y. Of course, following our earlier discussion, CCNOT can beconstructed  from single-qubit and 1+i 1−i √ 2 2 has the property that CNOT gates. This is shown in Figure 13, where X = 1−i 1+i 2 2 √ 2 ( X) = X. It is a simple exercise to verify, using linearity, that the circuit in Figure 13 is equivalent to CCNOT. • • • √ X • • √ X ∗ √ X Figure 13: Decomposition of CCNOT in terms of single-qubit and CNOT gates. 3.5 Can we solve NP-hard problems? It is important to remark that even if we can easily create a uniform superposition of all basis states, the rules of measurement imply that using just this easily-obtained superposition does not allow us satisfactorily solve NP-complete problems such as, for example, SAT (the satisfiability problem). Indeed, suppose we have a quantum circuit Uf that encodes a SAT formula on n boolean variables; in other words, a unitary Uf : |jin ⊗ |0i1 → |jin ⊗ |f (j)i1 , where f (j) is 1 if the binary string jBn satisfies the formula, and 0 if not. We might tempted to P be q −1 apply H ⊗n to the initial state |0in to create the uniform superposition √12q 2j=0 |jiq , apply Uf to this superposition (which evaluates the truth assignment of all possible binary strings), 18 and then perform a measurement on all qubits. But measuring the state:   q −1 2X 2q −1 1 1 X   Uf √ |jiq ⊗ |0i1 = √ |jiq ⊗ |f (j)i1 2q j=0 2q j=0 will return a binary string that satisfies the formula if and only if the last qubit has value 1 after the measurement, and this happens with a probability that depends on the number of binary assignments that satisfy the formula. If, for example, the SAT problem at hand is solved by exactly ρ assignment out of 2n possible assignment, then the probability of finding the solution after one measurement is 2ρn , and we have done nothing better than randomly sampling a binary string. Clearly, this is not a good algorithm for SAT. In fact, in general solving NP-hard problems in polynomial time with quantum computers is not believed to be possible: nobody has shown P = NP yet. However, we will see in the next sections two examples of quantum algorithms that are faster than any known classical algorithm. The basic principle employed by these algorithms is to start with a uniform superposition of basis states, then apply operations that make the basis states interact with each other so that the modulus of the coefficients for some (desirable) basis states increase, which implies that the other coefficients decrease. Of course, how to do that in order to solve a specific problem is exactly where the crux of the matter lies. 4 A simple period finding problem: Simon’s algorithm In this section we describe a quantum algorithm that gives an expected exponential speedup with respect to classical algorithms. Admittedly, the problem that this algorithm solves is not very useful, but the ideas shown here give us a flavor of what quantum computation can do. In fact, this algorithm was an inspiration for the well-known and groundbreaking work of Shor on integer factorization [Shor, 1997]: a large part of Shor’s algorithm relies on the solution of a period finding problem, and Simon’s algorithm solves a simplified problem of the same flavor. Shor’s algorithm is, however, much more involved than Simon’s algorithm, and a full treatment requires several number-theoretical results that are beyond the scope of this introductory material. Thus, we will focus on Simon’s algorithm, but at the end of this paper the reader should be capable of undertaking the study of Shor’s algorithm by himself or herself. For Simon’s algorithm, we are told that there exists a function f : {0, . . . , 2n − 1} → {0, . . . , 2n − 1} with the property that f (x) = f (z) if and only if x = z ⊕n a, for some unknown a ∈ {0, . . . , 2n − 1}. We do not know anything else about the function, and the goal is to find a only by querying the function. Remark 6. For both Simon’s algorithm and Grover’s algorithm, the complexity of an algorithm is determined only in terms of the number of calls to the function f . Considerations on what the function f actually implements, and how many operations are performed inside of f , are not part of our analysis. Our goal is to find a in the smallest possible number of calls to f . Notice that if a = 0 then the function is one-to-one, whereas if a 6= 0 the function is two-toone, because for every x, there is exactly another number in domain for which the function has the same value. The function f is assumed to be given as a quantum circuit on q = 2n qubits, depicted in Figure 14 This particular form of the function, that maps |xin ⊗|yin to |xin ⊗|y ⊕n f (x)in , is typical of the quantum world. Notice that if y = 0, then |y ⊕n f (x)in = |f (x)in so the circuit computes the 19 |xin /n |yin /n Uf /n |xin /n |y ⊕n f (x)in Figure 14: The circuit implementing Uf for Simon’s problem. desired function. Furthermore, this is a reversible function, because applying the same circuit Uf goes back to the initial state: Uf Uf (|xin ⊗ |yin ) = Uf (|xin ⊗ |y ⊕n f (x)in ) = |xin ⊗ |y ⊕n f (x) ⊕n f (x)in = |xin ⊗ |yin . 4.1 Classical algorithm Because we do not know anything about the number a, the best we can do is to feed inputs to the function, and try to extract information from the output. The number a is determined once we find two distinct inputs x, z such that f (x) = f (z), because then x = z ⊕n a which implies x ⊕n z = a. Suppose we have evaluated m distinct input values and we did not find a match. Then a 6= x ⊕n z for all x, z previously evaluated, therefore we have eliminated at most m(m − 1)/2 values of a. (Fewer values may have been eliminated if we test inputs for which x ⊕n y ⊕ z for any three input values x, y, z already tested. In fact, if we test w such that w = x ⊕n y ⊕ z, we have that w ⊕n z = x ⊕n y, therefore the value w ⊕n z had already been eliminated from the list of possible valus of a.) Since m(m − 1)/2 is small compared to 2n , the probability of success m(m−1) is very small until we have evaluated a number of inputs that is in the order of 2n+1 2n . In particular, to guarantee a probability of success of at least ρ, we need m(m−1) ≥ ρ2n , 2n+1 √ n for any positive constant ρ, the number of required which implies that m ∈ O( ρ2 ). Hence, √ iterations is exponential. After evaluating 2n+1 + 1 ∈ O(2n/2 ) distinct input values satisfying the condition outlined above for non-matching triplets, we are guaranteed that a matching pair has been found, or we can safely determine that a = 0. 4.2 Simon’s algorithm: quantum computation Using a quantum computer, we can determine a much faster. The idea, first described in [Simon, 1997], is to apply the circuit in Figure 15. |0in /n H ⊗n |0in /n /n /n H ⊗n Uf /n M /n Figure 15: Quantum circuit used in Simon’s algorithm. From an algebraic point of view, this corresponds to the following operation: (H ⊗n ⊗ I ⊗n )Uf (H ⊗n ⊗ I ⊗n )(|0in ⊗ |0in ). We now analyze the output of the quantum circuit, by looking at the quantum states at intermediate steps of the circuit. Let |ψi be the state just before the Uf gate, |φi the state just after Uf , and |χi the final state. In other words: |ψi = (H ⊗n ⊗ I ⊗n )(|0in ⊗ |0in ) |φi = Uf (H ⊗n ⊗ I ⊗n )(|0in ⊗ |0in ) |χi = (H ⊗n ⊗ I ⊗n )Uf (H ⊗n ⊗ I ⊗n )(|0in ⊗ |0in ). 20 For |ψi, we know that H ⊗n creates a uniform superposition of |jin , j = 0, . . . , 2n − 1 over the first n quantum bits. Therefore we can write: n |ψi = (H ⊗n ⊗I ⊗n 2 −1 1 X )(|0in ⊗ |0in ) = √ |jin ⊗ |0in . 2n j=0 By linearity, applying Uf to this state yields: n n 2 −1 2 −1 1 X 1 X |φi = Uf |ψi = √ |jin ⊗ |0 ⊕ f (j)in = √ |jin ⊗ |f (j)in . 2n j=0 2n j=0 We now need to analyze the effect of applying further Hadamard gates on the top lines of the circuit. Using (5), the next step in the circuit is given by: n |χi = (H ⊗n ⊗n ⊗I n n 2 −1 1 X )√ |jin ⊗ |f (j)in = 2n j=0 2 −1 2 −1 1 X X (−1)k•n j |kin ⊗ |f (j)in . = n 2 (7) j=0 k=0 When we make a measurement on the top n qubit lines of |χi, we obtain one of the states |kin with probability equal to the the sum of the square of the coefficient of the states |kin ⊗|f (j)i, for all j. It is easier to analyze the case a 6= 0 first: we will deal with the case a = 0 laterin Section 4.3. Assuming a 6= 0, |kin ⊗ |f (j)in = |kin ⊗ |f (j ⊕n a)in . Define the equivalence relationship ∼ as x ∼ y if and only if x = y ⊕n a, and let R be the quotient set {0, . . . , 2n − 1}/ ∼. In other words, R contains exactly half of the integers from 0 to 2n − 1, and in particular for each j ∈ {0, . . . , 2n − 1} it contains exactly one among j and j ⊕n a (it does not matter which one it contains). Then, for each k, the basis state |kin appears in the top qubit lines exactly in the 2n−1 states |kin ⊗ |jin for j ∈ R. For each j ∈ R, the coefficient of the basis state |kin ⊗ |jin is exactly the sum of the coefficients in (7) for |kin ⊗ |jin and |kin ⊗ |j ⊕n ain , that is: (−1)k•n j + (−1)k•n (j⊕a) (−1)k•n j + (−1)k•n j (−1)k•n a = 2n 2n  k• j n (−1) 1 + (−1)k•n a = . 2n Therefore the probability of obtaining the binary string kBn after measuring the top qubit lines is:  !2  !2 ( 1 X (−1)k•n j 1 + (−1)k•n a (−1)k•n j 1 + (−1)k•n a if k •n a ≡ 0 mod 2 1 n−1 = n−1 = 2 2n 2 2n 0 if k •n a ≡ 1 mod 2, j∈R n where the multiplication factor 2n−1 comes from the fact that |R| = 22 . Thus, the only binary strings that have positive probability to be measured are those strings kBn for which k •n a ≡ 0 mod 2. The remaining strings are never sampled: by carefully applying quantum operations we have reduced their state coefficients to zero, a phenomenon known as destructive interference. Notice that unless k = 0, then there is a nonempty set of bits for which the modulo 2 sum of a must vanish. In this case, unless we are unlucky and we obtain the vector k = 0 or some other 21 unlucky cases that will be specified later, we can express one of such bits as a modulo 2 sum of the others, and we eliminate half of the possible values for a. Our discussion shows that with a single quantum computation, in the case a 6= 0 with high probability we learn very valuable information about a, and we can approximately halve the search space for a. It now remains to fully specify in a more precise manner how this information can be used, and how to deal with the case a = 0. 4.3 Simon’s algorithm: description and analysis The quantum algorithm described in the previous section yields information on a, but it does not output a directly. To recover a, further calculations have to be performed. This is a typical situation in quantum algorithms: a quantum computation measures some properties of the desired answer; then, classical computations are used to analyze these properties and obtain the desired answer. Thus, even if the quantum algorithm does not explicitly output the desired answer, it allows us to get closer to our goal. In the specific case of the problem discussed here, the quantum computation allows us to learn k such that k •n a ≡ 0 mod 2. We embed this equation into an algorithm as follows: we initialize E ← ∅; then, while the system of equations E does not have a unique solution, we apply the circuit described in the previous section to obtain k, and add the equation k •n a ≡ 0 mod 2 to E. We can have two possible situations: either the system has a unique solution a 6= 0, or the only possible solution is a = 0. The former case requires n linearly independent vectors kBn , where independence is intended modulo 2, whereas the latter may occur with even less than n linear equations. Because at every iteration we obtain a random k for which k •n a ≡ 0 mod 2, our discussion above indicates that we have to obtain (at most) n linearly independent vectors kBn to ensure that the system has a unique solution. In continuous space, uniform random sampling of vectors yields linearly independent vectors with probability 1. In this case we are considering linear independence among vectors that have coefficients 0 or 1, and independence is in terms of the modulo 2 sum, so the argument is less clear; however, it is possible to show that the probability of obtaining n such linearly independent vectors after sampling n + t times is bounded below by 1 − 21t [Mermin, 2007, Apx. G]. This lower bound does not depend on n. Hence, with overwhelming probability after slightly more than n executions of the quantum circuit, and therefore O(n) queries to the function f , we determine the solution to the problem with a classical computation that can be performed in polynomial time (i.e., O(n2 ) to determine a solution to the system of linear equations modulo 2). We remark that once the unique a is determined, we can easily verify that it is the solution by querying the function, and this approach works in a finite number of steps for any value of a including a = 0 (if at any iteration we determine that the only possible solution for the system of equations is a = 0, we can terminate and return that solution). Compare the O(n) queries of this approach with the O(2n/2 ) queries that are required by a classical algorithm, and we have shown an exponential speedup. This algorithm shows a typical feature of quantum algorithms: there is a classical computation to verify that the correct solution to the problem has been found – in this case, the verification is carried out by checking whether the system of equations has a unique solution. Indeed, quantum algorithms are probabilistic algorithm, and we can only try to increase the probability that the correct answer is returned. For this reason, we need a way to deterministically (i.e., classically) verify correctness. In other words, the quantum algorithm is applied to a problem for which it is difficult to compute the solution, but once the solution is obtained, it 22 is easy to verify that it is correct. 5 Black-box search: Grover’s algorithm Simon’s algorithm gives an exponential speedup with respect to a classical algorithm, but it solves a very narrow problem that does not have practical applications. We now describe an algorithm that gives only a polynomial – more specifically, quadratic – speedup with respect to classical, but it applies to a very large class of problems. The algorithm is known as Grover’s search [Grover, 1996]. The problem solved by the algorithm can be described as black-box search: we are given a circuit that computes an unknown function on binary variables, and we want to determine for which value(s) of the input the function gives output 1. In other words, we are trying to determine the unique binary string that satisfies a property encoded by a circuit. The original paper [Grover, 1996] describes this as looking for a certain element in a database. Such an algorithm can be applied whenever we are searching for a specific element in a set, and we do not have enough information to do anything smarter than a brute force search, i.e., testing all elements in the set. As mentioned earlier, the basic idea of the algorithm is to start with the uniform superposition of all basis states, and iteratively increase the coefficients of basis states that correspond to binary strings for which the unknown function gives output 1. We need some definitions. Let f : {0, . . . , 2n − 1} → {0, 1}, and assume that there exists a unique ` ∈ {0, . . . , 2n − 1} : f (`) = 1, i.e., there is a unique element in the domain of the function that yields output 1. We want to determine `. Remark 7. Grover’s search can also be applied to the case in which there are multiple input values that yield output 1, and we want to retrieve any of them; however, the analysis in that case is slightly more convoluted, and is not pursued here in detail. By the end of our analysis, the reader will have all the necessary tools to study this extension. 5.1 Classical algorithm Given the problem definition, classical search cannot do better than O(2n ) operations. Indeed, any deterministic classical algorithm may need to explore all 2n possible input values before finding `: given any deterministic classical algorithm, there exists a permutation π of {0, . . . , 2n − 1} that represents the longest execution path (i.e., sequence of values at which f is queried) of such algorithm. Then, if ` = π(2n − 1) the algorithm will require O(2n ) queries to determine the answer, which is clearly the worst case. At the same time, a randomized algorithm requires O(2n ) function calls to have at least a constant positive probability to determine `, and the expected number of function calls to determine the answer is 2n−1 , i.e., the expected number of flips of a biased coin with probability of heads equal to 2−n until we obtain the first heads. 5.2 Grover’s search: algorithm description The quantum search algorithm proposed in [Grover, 1996] requires q = n + 1 qubits. The function f is encoded by a unitary Uf : |jin ⊗ |yi1 → |jin ⊗ |y ⊕ f (j)i1 . The outline of the algorithm is as follows. The algorithm starts with the uniform superposition of all basis states on n qubits. The last qubit (n + 1) is used as an auxiliary qubit, and 23 (a) Initialization. (b) Sign flip. 2A 2A A A (c) Computation of the average. (d) Inversion about the average. Figure 16: Sketch of Grover’s algorithm. The bars represent the coefficients of the basis states. it is initialized to H|1i. We obtain the quantum state |ψi. Then, these operations are repeated several times: (i) Flip the sign of the vectors for which Uf gives output 1. (ii) Invert all the coefficients of the quantum state around the average coefficient. A full cycle of the two operations above increases the coefficient of |`in ⊗ (|0i − |1i), and after a certain number of cycles (to be specified later), the coefficient of the state |`in ⊗ (|0i − |1i) is large enough that it can be obtained from a measurement with probability close to 1. This phenomenon is known as amplitude amplification. A sketch of the ideas for the algorithm is depicted in Figure 16: we have eight basis states, and suppose the fourth basis state is the target basis state |`i. The representation is purely meant to convey intuition, and does not geometrically represent the vectors encoding the quantum state, but solely the amplitude of the coefficients. In Figure 16a, all basis states have the same coefficient. In Figure 16b, the coefficient of the target basis state has its sign flipped. In Figure 16c, we can see that the average value of the coefficients is slightly below the coefficient for the undesired states. Taking twice the average and subtracting each coefficient now yields the red bars in Figure 16d, where the target basis state |`i has a coefficient with much larger value than the rest, and will therefore be measured with higher probability. 24 We now describe the steps above more in detail. 5.2.1 Initialization The algorithm is initialized applying H ⊗(n+1) (I ⊗n ⊗ X)|0in+1 . We have: (I ⊗n ⊗ X)|0in+1 = |0in ⊗ |1i H ⊗(n+1) (I ⊗n ⊗ X)|0in+1 = n −1 2X j=0 n 2X −1 1 √ |jin ⊗ (|0i − |1i) = αj |jin ⊗ (|0i − |1i) = |ψi. 2n j=0 Note that the initial coefficients are real numbers. Since the steps below will map real numbers to real numbers, we only need to consider real numbers through the course of the algorithm. 5.2.2 Sign flip: step (i) To flip the sign of the target state |`in ⊗ (|0i − |1i), we apply Uf to |ψi. We now show why this flips the sign of |`in ⊗ |0i.   n −1 2X Uf |ψi = Uf  αj |jin ⊗ (|0i − |1i) j=0 = α` |`in ⊗ (|1i − |0i) + n −1 2X αj |jin ⊗ (|0i − |1i) j=1 j6=`   2n −1 X   = αj |jin  −α` |`in +  ⊗ (|0i − |1i). j=1 j6=` As the expression above suggests, we can always think of the last qubit as being in the unentangled state (|0i − |1i), with the sign flip affecting only the first n qubits. Therefore, the state that we obtain by applying Uf to |ψi is the same as |ψi except that the sign of the basis states |`in ⊗ |0i and |`in ⊗ |1i has been flipped. 5.2.3 Inversion about the average: step (ii) To perform the inversion about the average, we want to perform the following operation: ! ! n −1 n −1 n −1 2X 2X 2X αk − αj |jin , αj |jin → 2 2n j=0 j=0 k=0 P n −1 αk where 2k=0 2n is the average, and therefore we are taking twice the average and subtracting each coefficient from it. This is realized by the following matrix: 2  2  2 2 2 2 ... 2n − 1 2n 2n 2n 2n . . . 2n 2 2  2n   2n 2n . . . 2n   2 2 2n − 1 . . . 2n  2 2  ⊗n T = . ..  =  .. . −I , . . . . .  . . . ..  .  . 2 2n 2 2n ... 2 2n −1 25 2 2n 2 2n ... 2 2n where the equal elements 21n over each row compute the average coefficient, the numerator 2 of the fraction takes twice the average, and finally we subtract the identity to subtract each individual coefficient from twice the average. From the definition of the Hadamard in (5), we can see that (H ⊗n )jk = √12n (−1)j•n k . But now if we let:   2 0 ... 0 0 0 . . . 0   2n ×2n , R = . ..  ∈ R . . . . . . 0 0 ... 0 then we can write (H ⊗n RH ⊗n )jk = (H ⊗n )j0 R00 (H ⊗n )0k = 0. Therefore, using the fact that H ⊗n H ⊗n = I ⊗n , we have: 2 2n , because Rjk = 0 for j 6= 0, k 6= T = H ⊗n RH ⊗n − I ⊗n = H ⊗n (R − I ⊗n )H ⊗n = −H ⊗n (I ⊗n − R)H ⊗n = −H ⊗n diag(−1, 1, . . . , 1)H ⊗n := −H ⊗n DH ⊗n . | {z } (8) 2n The expression (8) also shows that T is a unitary, because H ⊗n is unitary (tensor product of unitary matrices) and D is diagonal with ones on the diagonal. We must find a way to construct the matrix D := diag(−1, 1, . . . , 1). This will be discussed in the next section. For now, we summarize our analysis of the inversion about the average by concluding that it can be performed applying T = −H ⊗n DH ⊗n to the n qubits of interest (i.e., all qubits except the auxiliary qubit that we used for the sign flip of step (i)). 5.2.4 Constructing the matrix D We give a sketch of the idea of how to construct D = diag(−1, 1, . . . , 1). Notice that the effect of this quantum operation is to flip the sign of the coefficient of the basis state |0in , and leave each other coefficient untouched. Instead of flipping the sign of |0in , let us start by seeing how to flip the sign of |1in while leaving all other coefficients untouched. Let Cn−1 Z be the gate that applies Z to qubit 1 if qubits 2, . . . , n are 1, and does nothing otherwise. This is a generalization of the CNOT gate, and it is called “controlled Z”. Cn−1 Z in the case of two qubits (n = 2) is given by the following matrix:   1 0 0 0 0 1 0 0   CZ =  0 0 1 0  . 0 0 0 −1 Notice that in the two-qubit case, the two circuits depicted in Figure 17 are equivalent. • • Z H H Figure 17: Controlled-Z gate on two qubits: two possible representations. Carrying out the matrix multiplications will confirm that the circuit on the right in Figure 17 implements exactly the CZ matrix as defined above. Thus, the controlled Z gate can be easily realized with available gates. 26 If we have access to the Cn−1 Z gate, we can write: D = X ⊗n (Cn−1 Z)X ⊗n , because this operations flips the sign of the coefficient of a basis state if and only if if all qubits have value 0 in the basis state. In circuit form, it can be written as depicted in Figure 18. X • X X • X X .. . • X .. . X Z X Figure 18: Quantum circuit implementing the S operation described for Grover’s algorithm. Of course, one has to construct the operation Cn−1 Z. There are several ways to do so. One way, suggested by [Barenco et al., 1995], is a recursive scheme that we show in Figure 19 for n = 5 qubits, but that clearly can be generalized√to arbitary qubits. √ √ The idea is to exploit the fact that Z has a square root, i.e., a matrix Z such that Z Z = Z. Notice how the scheme decomposes Cn−1 Z into two copies of Cn−2 Z plus a constant number of gates. This yields a decomposition with O(n2 ) gates, see [Barenco et al., 1995] for details. To conclude, the construction of D, and therefore of the whole circuit implementing step (ii) of Grover’s search, can be performed in O(n2 ) gates. • • • • √ Z • • • • • • • √ √ ∗ Z Z Figure 19: Decomposition of Cn−1 Z. 5.3 Determining the number of iterations Let Q be the matrix that applies a single iteration of Grover’s search, consisting of steps (i) and (ii) above. It is paramount to determine how many iterations should be performed, so that the coefficient of the desired basis state |`i ⊗ (|0i − |1i) is as large as possible, and the state can be measured. This is what we attempt to do in this section. Since the last, auxiliary qubit is always in state |0i − |1i and is unentangled, we can ignore it. Let   n |ψD i = |`in , −1 2X  1 √ n |ψU i =  |jin    2 −1 j=1 j6=` 27 be the desirable and undesirable quantum states, respectively. At iteration k of the algorithm q let n us denote the quantum state by |ψk i = dk |ψD i + uk |ψU i. Initially, d0 = √12n and u0 = 2 2−1 n , where notice that √ to obtain u0 from the value of an individual coefficient in |ψU i we have multiplied by 2n − 1 for normalization. At step (i), the algorithm flips dk |ψD i + uk |ψU i → −dk |ψD i + uk |ψU i. There is only one state with coefficient dk , and there are 2n − 1 states with coefficient uk , so the value of the coefficient for these states is, respectively, dk and √2unk−1 . Their average at iteration k is therefore: √ n (2n − 1) √2n1 −1 uk − dk 2 − 1uk − dk Ak = = . n 2 2n At step (ii), the algorithm maps αh → 2Ak − αh for each coefficient αh . Therefore: −α` → 2Ak + α` αh → 2Ak − αh ∀h 6= `, √ and to obtain uk from αh we need to multiply by 2n − 1, so the mapping of step (ii) can be written, overall, as: √ −dk |ψD i + uk |ψU i → (2Ak + dk )|ψD i + (2Ak 2n − 1 − uk )|ψU i = dk+1 |ψD i + uk+1 |ψU i, where we defined: dk+1 = 2Ak + dk √ uk+1 = 2Ak 2n − 1 − uk . Performing the substitution of Ak , we obtain: √ √ n   2 − 1uk − dk 1 2 2n − 1 + dk = 1 − n−1 dk + uk dk+1 = 2 2n 2 2n √ n √   2 − 1uk − dk √ n 2 2n − 1 1 uk+1 = 2 2 − 1 − uk = − dk + 1 − n−1 uk . 2n 2n 2   dk This transformation is exactly a clockwise rotation of the vector by a certain angle θ, uk because it has the form    cos θ sin θ uk − sin θ cos θ dk and it satisfies the relationship sin2 θ + cos2 θ = 1. and in our case we have: √ 2 2n − 1 . sin θ = 2n (9) Notice that because this value of the sine is very small (for large n), then we can use the approximation sin x ≈ x (when x is close to 0) to write: √ 2 2n − 1 θ= . (10) 2n 28 Overall, the above analysis shows that each iteration performs a rotation by an angle θ of the vectors |ψD i and |ψU i. So after k iterations we obtain the following coefficients: dk = cos kθd0 + sin kθu0 uk = − sin kθd0 + cos kθu0 . In order to maximize the probability of obtaining |ψD i after a measurement, remember that |u0 |  |d0 |, so the best choice is to pick kθ = π2 which yields the largest value of |dk |. Using (10), the optimal number of iterations of Grover’s search algorithm is: 2n π π√ n k≈ √ n ≈ 2 . 4 4 2 −1 (11) After these many iterations, we have a probability close to 1 of measuring |ψD i and obtaining the sought state |`i. Comparing this with a classical algorithm, that requires O(2n ) iterations, we obtained a quadratic speedup. Remark 8. If we perform more iterations of Grover’s algorithm than the optimal number, the probability of measuring the desired state actually goes down, and reduces our chances of success. Therefore, it is important to choose the right number of iterations. Of course, the approximation for θ given in (10) is only valid for large n: for smaller n, it is better to compute the optimal number of iterations deriving θ from (9). We conclude this section by noticing that in case there are multiple input values on which f has value 1, we should amend the above analysis adjusting the values for d0 and u0 , but the main steps remain the same. 6 Numerical implementation of Grover’s algorithm We conclude the paper showing how to implement Grover’s algorithm using the open-source Python library QISKit [QISKit, 2017]. One of the advantages of using QISKit is that the code is self-explanatory. The library requires Python 3 and can be installed via pip: pip i n s t a l l q i s k i t We apply Grover’s algorithm to the problem of finding a satisfying assignment for an instance of the Exactly-1 3-SAT problem, which is defined as follows: Problem (Exactly-1 3-SAT): Determining a satisfying assignment containing one true literal per clause. W Input: SAT formula in conjunctive normal form m k=1 Ck over n Boolean variables x1 , . . . , xn , with 3 literals per clause C1 , . . . , Cm . Output: Does there exist an assignment of x1 , . . . , xn such that every clause C1 , . . . , Cm has exactly one True literal? This problem is NP-hard [Garey and Johnson, 1972]. In our implementation, an instance of Exactly-1 3-SAT is specified as a list of clauses, where each clause contains three integers: a positive integer is the index of a positive literal, a negative integer is the index of a negative literal. For example, the Python list of lists [[1, 2, −3], [−1, −2, −3], [−1, 2, 3]] 29 represents the instance: (x1 ∨ x2 ∨ ¬x3 ) ∧ (¬x1 ∨ ¬x2 ∨ ¬x3 ) ∧ (¬x1 ∨ x2 ∨ x3 ). (12) We use this formula in the example given below. To apply Grover’s algorithm we will use three basic subroutines: a subroutine to construct the initial state, a subroutine to compute the black-box function Uf , and a subroutine to perform the inversion about the average. We will discuss them in order. 6.1 Initial state Before we construct the initial state, let us give names to some of the quantum registers (i.e., groups of quantum qubits) that we need. Grover’s algorithm applies to a function with an n-qubit input and a single-qubit output. We call f in the input register, of size n, and f out the output register, of size 1. We construct the initial state as follows. def i n p u t s t a t e ( c i r c u i t , f i n , f o u t , n ) : ””” ( n+1)− q u b i t i n p u t s t a t e f o r Grover s e a r c h . ””” for j in range ( n ) : c i r c u i t . h( f i n [ j ] ) circuit . x( f out ) c i r c u i t . h( f out ) This is equivalent to the circuit given in Figure 20. |0in /n H ⊗n |0i1 X H /n Figure 20: Initialization step of Grover’s algorithm. 6.2 Black-box function Uf Implementing Uf for the Exactly-1 3-SAT problem is the most complex part of the code, and it can be done in several ways. To favor simplicity, we decompose the problem of computing Uf by introducing m auxiliary qubits (these are often called “ancillas” in the quantum computing literature), one for each clause. For each clause we construct a circuit that sets the corresponding auxiliary qubit to 1 if and only if the clause has exactly one true literal. Finally, the output register of Uf is set to 1 if and only if all m auxiliary qubits are 1. In Figure 21 we show a circuit that sets the bottom qubit y to 1 for the clause x1 ∨¬x2 ∨x3 . The idea is as follows. The X gate x1 • • x2 • • X X x3 • • y Figure 21: Quantum circuit setting the bottom qubit to 1 if the clause x1 ∨ ¬x2 ∨ x3 is satisfied by exactly one literal. flips the qubit corresponding to x2 , since x2 appears negated in the clause. Using three CNOT gates, we set y = x1 ⊕ ¬x2 ⊕ x3 , implying that y = 1 if an odd number of literals is satisfied. Since we want y = 1 if and only if exactly one literal is satisfied, we use a triply-controlled NOT 30 gate to finally obtain y = x1 ⊕ ¬x2 ⊕ x3 ⊕ (x1 ∧ ¬x2 ∧ x3 ), as desired. The final X gate resets the state of qubit x2 . To implement this circuit in QISKit, there is a small obstacle: the triply-controlled NOT gate is not part of the basic gate set. This can be done with a strategy similar to what is discussed in Section 5.2.4 for the Cn−1 Z gate. However, for simplicity we instead implement the triply-controlled NOT gate using three CCNOT gates and one auxiliary qubit, implementing the circuit in Figure 22: this has the drawback of requiring an extra qubit, but it is easier to understand. We can quickly verify that the circuit sets q5 to 1 if and only if q1 , q2 , q3 are 1; the final CCNOT resets the state of the auxiliary qubit q4 . q1 • • q2 • • q3 • q4 • q5 Figure 22: A possible implementation of a triply-controlled NOT gate. The implementation proceeds as follows. We loop over the clauses, using index k = 0, . . . , m − 1. For each clause we implement the circuit in Figure 21, setting the auxiliary qubit aux[k] to 1 if clause Ck+1 is satisfied. We then perform a multiply-controlled NOT operation to ensure that the output register f out is 1 if all m auxiliary qubits are 1. Finally, we run the same circuit in reverse to reset the state of the auxiliary qubits. def b l a c k b o x u f ( c i r c u i t , f i n , f o u t , aux , n , e x a c t l y 1 3 s a t f o r m u l a ) : ””” C i r c u i t t h a t computes t h e b l a c k −box f u n c t i o n from f i n t o f o u t . Creat e a c i r c u i t t h a t v e r i f i e s w h e t h e r a g i v e n e x a c t l y −1 3−SAT f o r m u l a i s s a t i s f i e d by t h e i n p u t . The e x a c t l y −1 v e r s i o n r e q u i r e s e x a c t l y one l i t e r a l o u t o f e v e r y c l a u s e t o be s a t i s f i e d . ””” n u m c l a u s e s = len ( e x a c t l y 1 3 s a t f o r m u l a ) for ( k , c l a u s e ) in enumerate ( e x a c t l y 1 3 s a t f o r m u l a ) : # This l o o p e n s u r e s aux [ k ] i s 1 i f an odd number o f l i t e r a l s # are true f o r l i t e r a l in c l a u s e : if l i t e r a l > 0: c i r c u i t . cx ( f i n [ l i t e r a l −1] , aux [ k ] ) else : c i r c u i t . x ( f i n [− l i t e r a l −1]) c i r c u i t . cx ( f i n [− l i t e r a l −1] , aux [ k ] ) # F l i p aux [ k ] i f a l l l i t e r a l s a r e t r u e , u s i n g a u x i l i a r y q u b i t # ( a n c i l l a ) aux [ n u m c l a u s e s ] c i r c u i t . ccx ( f i n [ 0 ] , f i n [ 1 ] , aux [ n u m c l a u s e s ] ) c i r c u i t . ccx ( f i n [ 2 ] , aux [ n u m c l a u s e s ] , aux [ k ] ) # F l i p b a c k t o r e v e r s e s t a t e o f n e g a t i v e l i t e r a l s and a n c i l l a c i r c u i t . ccx ( f i n [ 0 ] , f i n [ 1 ] , aux [ n u m c l a u s e s ] ) f o r l i t e r a l in c l a u s e : if l i t e r a l < 0: c i r c u i t . x ( f i n [− l i t e r a l −1]) # The f o r m u l a i s s a t i s f i e d i f and o n l y i f a l l a u x i l i a r y q u b i t s 31 # e x c e p t aux [ n u m c l a u s e s ] a r e 1 i f ( n u m c l a u s e s == 1 ) : c i r c u i t . cx ( aux [ 0 ] , f o u t [ 0 ] ) e l i f ( n u m c l a u s e s == 2 ) : c i r c u i t . ccx ( aux [ 0 ] , aux [ 1 ] , f o u t [ 0 ] ) e l i f ( n u m c l a u s e s == 3 ) : c i r c u i t . ccx ( aux [ 0 ] , aux [ 1 ] , aux [ n u m c l a u s e s ] ) c i r c u i t . ccx ( aux [ 2 ] , aux [ n u m c l a u s e s ] , f o u t [ 0 ] ) c i r c u i t . ccx ( aux [ 0 ] , aux [ 1 ] , aux [ n u m c l a u s e s ] ) else : r a i s e V a l u e E r r o r ( ’We o n l y a l l o w a t most 3 c l a u s e s ’ ) # F l i p b a c k any a u x i l i a r y q u b i t s t o make s u r e s t a t e i s c o n s i s t e n t # f o r f u t u r e e x e c u t i o n s o f t h i s r o u t i n e ; same l o o p as a bo v e . for ( k , c l a u s e ) in enumerate ( e x a c t l y 1 3 s a t f o r m u l a ) : f o r l i t e r a l in c l a u s e : if l i t e r a l > 0: c i r c u i t . cx ( f i n [ l i t e r a l −1] , aux [ k ] ) else : c i r c u i t . x ( f i n [− l i t e r a l −1]) c i r c u i t . cx ( f i n [− l i t e r a l −1] , aux [ k ] ) c i r c u i t . ccx ( f i n [ 0 ] , f i n [ 1 ] , aux [ n u m c l a u s e s ] ) c i r c u i t . ccx ( f i n [ 2 ] , aux [ n u m c l a u s e s ] , aux [ k ] ) c i r c u i t . ccx ( f i n [ 0 ] , f i n [ 1 ] , aux [ n u m c l a u s e s ] ) f o r l i t e r a l in c l a u s e : if l i t e r a l < 0: c i r c u i t . x ( f i n [− l i t e r a l −1]) 6.3 Inversion about the average The inversion about the average is discussed in Sections 5.2.3-5.2.4. This can be implemented as follows. def i n v e r s i o n a b o u t a v e r a g e ( c i r c u i t , f i n , n ) : ””” Apply i n v e r s i o n a b o u t t h e a v e r a g e s t e p o f Grover ’ s a l g o r i t h m . ””” # Hadamards e v e r y w h e r e for j in range ( n ) : c i r c u i t . h( f i n [ j ] ) # D m a t r i x : f l i p s t h e s i g n o f t h e s t a t e |000 > o n l y for j in range ( n ) : circuit . x( f in [ j ]) n c o n t r o l l e d Z ( c i r c u i t , [ f i n [ j ] f o r j in range ( n − 1 ) ] , f i n [ n −1]) for j in range ( n ) : circuit . x( f in [ j ]) # Hadamards e v e r y w h e r e a g a i n for j in range ( n ) : c i r c u i t . h( f i n [ j ] ) The above routine requires a Cn−1 Z gate; we implement it, for three qubits, using a CCNOT gate and two Hadamards. 32 def n c o n t r o l l e d Z ( c i r c u i t , c o n t r o l s , t a r g e t ) : ””” Implement a Z g a t e w i t h m u l t i p l e c o n t r o l s ””” i f ( len ( c o n t r o l s ) > 2 ) : r a i s e V a l u e E r r o r ( ’ The c o n t r o l l e d Z with more than 2 ’ + ’ c o n t r o l s i s not implemented ’ ) e l i f ( len ( c o n t r o l s ) == 1 ) : c i r c u i t . h( target ) c i r c u i t . cx ( c o n t r o l s [ 0 ] , t a r g e t ) c i r c u i t . h( target ) e l i f ( len ( c o n t r o l s ) == 2 ) : c i r c u i t . h( target ) c i r c u i t . ccx ( c o n t r o l s [ 0 ] , c o n t r o l s [ 1 ] , t a r g e t ) c i r c u i t . h( target ) 6.4 Putting everything together To run Grover’s algorithm, we have to initialize a quantum program with the desired number of qubits, and apply the routines described above. Notice that for three qubits the optimal number of Grover iterations is two, see (11) (the sin θ approximation is not accurate for n = 3, but doing the calculations more carefully, we can verify that two iterations is still optimal). Including the small, necessary setup to initialize a quantum program with QISKit (“classical registers” are used to store the result of a measurement), this results in the following code: import s y s from q i s k i t import QuantumProgram , QuantumCircuit from q i s k i t . t o o l s import v i s u a l i z a t i o n # Make a quantum program f o r t h e n−b i t Grover s e a r c h . n = 3 # Exactly −1 3−SAT f o r m u l a t o be s a t i s f i e d , i n c o n j u n c t i v e # normal form . We r e p r e s e n t l i t e r a l s with i n t e g e r s , p o s i t i v e o r # negative to i n d i c a t e a boolean v a r i a b l e or i t s negation . e x a c t l y 1 3 s a t f o r m u l a = [ [ 1 , 2 , −3] , [ −1 , −2, −3] , [ −1 , 2 , 3 ] ] # D e f i n e t h r e e quantum r e g i s t e r s : ’ f i n ’ i s t h e s e a r c h s p a c e ( i n p u t # t o t h e f u n c t i o n f ) , ’ f o u t ’ i s b i t used f o r t h e output o f f u n c t i o n # f , aux a r e t h e a u x i l i a r y b i t s used by f t o perform i t s # computation . QPS SPECS = { ’ circuits ’ : [{ ’ name ’ : ’ g r o v e r ’ , ’ quantum registers ’ : [ { ’ name ’ : ’ f i n ’ , ’ s i z e ’ : n } , { ’ name ’ : ’ f o u t ’ , ’ s i z e ’ : 1 } , { ’ name ’ : ’ aux ’ , ’ s i z e ’ : l e n ( e x a c t l y 1 3 s a t f o r m u l a ) + 1 } , ], ’ classical registers ’: [ { ’ name ’ : ’ ans ’ , ’ s i z e ’ : n } , ]}] 33 } qp = QuantumProgram ( s p e c s=QPS SPECS) qc = qp . g e t c i r c u i t ( ’ g r o v e r ’ ) f i n = qp . g e t q u a n t u m r e g i s t e r ( ’ f i n ’ ) f o u t = qp . g e t q u a n t u m r e g i s t e r ( ’ f o u t ’ ) aux = qp . g e t q u a n t u m r e g i s t e r ( ’ aux ’ ) ans = qp . g e t c l a s s i c a l r e g i s t e r ( ’ ans ’ ) i n p u t s t a t e ( qc , f i n , f o u t , n ) # Apply two f u l l i t e r a t i o n s b l a c k b o x u f ( qc , f i n , f o u t , aux , n , e x a c t l y 1 3 s a t f o r m u l a ) i n v e r s i o n a b o u t a v e r a g e ( qc , f i n , n ) b l a c k b o x u f ( qc , f i n , f o u t , aux , n , e x a c t l y 1 3 s a t f o r m u l a ) i n v e r s i o n a b o u t a v e r a g e ( qc , f i n , n ) # Measure t h e output r e g i s t e r i n t h e c o m p u t a t i o n a l b a s i s f o r j in range (n ) : qc . measure ( f i n [ j ] , ans [ j ] ) # Execute c i r c u i t r e s u l t = qp . e x e c u t e ( [ ’ g r o v e r ’ ] , backend =’ l o c a l q a s m s i m u l a t o r ’ , coupling map=None , s h o t s =2048) # Get c o u n t s and p l o t h i s t o g r a m counts = r e s u l t . get counts ( ’ grover ’ ) v i s u a l i z a t i o n . plot histogram ( counts ) That’s it! We have successfully executed Grover’s algorithm. The resulting histogram is given in Figure 23: with only two calls to the black-box function Uf , we sample the correct string 101 (the only solution of (12)) with probability ≈ 95%. The QISKit allows running experiments on real quantum computing hardware accessible on the cloud via the IBM Q experience, changing the backend argument in the call to qp.execute(). However, the current generation of quantum computing devices has limited qubit connectivity, i.e., it only allows the application of two-qubit gates between certain pairs of qubits. The code listed in this paper assumes an all-to-all connectivity, which makes for much simpler code. The interested reader can modify the code to allow for limited connectivity, using SWAP gates when necessary. References [Barenco et al., 1995] Barenco, A., Bennett, C. H., Cleve, R., DiVincenzo, D. P., Margolus, N., Shor, P., Sleator, T., Smolin, J. A., and Weinfurter, H. (1995). Elementary gates for quantum computation. Physical review A, 52(5):3457. [Bennett, 1973] Bennett, C. H. (1973). Logical reversibility of computation. IBM journal of Research and Development, 17(6):525–532. [Dawson and Nielsen, 2005] Dawson, C. M. and Nielsen, M. A. (2005). The Solovay-Kitaev algorithm. Technical Report quant-ph/0505030, arXiv. 34 Figure 23: Histogram of output probabilities. [Deutsch, 1985] Deutsch, D. (1985). Quantum theory, the Church-Turing principle and the universal quantum computer. In Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, volume 400, pages 97–117. The Royal Society. [Garey and Johnson, 1972] Garey, M. R. and Johnson, D. S. (1972). Computers and intractability, volume 29. W. H. Freeman and Company, New York, NY. [Grover, 1996] Grover, L. K. (1996). A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM Symposium on Theory of Computing, pages 212–219. ACM. [Kitaev, 1997] Kitaev, A. Y. (1997). Quantum computations: algorithms and error correction. Russian Mathematical Surveys, 52(6):1191–1249. [Kliuchnikov et al., 2016] Kliuchnikov, V., Maslov, D., and Mosca, M. (2016). Practical approximation of single-qubit unitaries by single-qubit quantum clifford and t circuits. IEEE Transactions on Computers, 65(1):161–172. [Mermin, 2007] Mermin, N. D. (2007). Quantum computer science: an introduction. Cambridge University Press. [Nielsen and Chuang, 2002] Nielsen, M. A. and Chuang, I. (2002). Quantum computation and quantum information. Cambridge University Press, Cambridge. [QISKit, 2017] QISKit (2017). Quantum information software kit. https://www.qiskit.org/. Accessed Feb 2018. [Rieffel and Polak, 2000] Rieffel, E. and Polak, W. (2000). An introduction to quantum computing for non-physicists. ACM Computing surveys, 32(3):300–335. 35 [Rieffel and Polak, 2011] Rieffel, E. G. and Polak, W. H. (2011). Quantum computing: A gentle introduction. MIT Press. [Selinger, 2012] Selinger, P. (2012). Efficient Clifford+T approximation of single-qubit operators. arXiv preprint arXiv:1212.6253. [Shor, 1997] Shor, P. W. (1997). Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput., 26(5):1484–1509. [Simon, 1997] Simon, D. R. (1997). On the power of quantum computation. SIAM journal on computing, 26(5):1474–1483. 36
8cs.DS
LOSSY ASYMPTOTIC EQUIPARTITION PROPERTY FOR GEOMETRIC NETWORKED DATA STRUCTURES arXiv:1704.00243v2 [cs.IT] 22 Nov 2017 By Kwabena Doku-Amponsah University of Ghana Abstract. This article extends the Generalized Asypmtotic Equipartition Property of Networked Data Structures to cover the Wireless Sensor Network modelled as coloured geometric random graph (CGRG). The main techniques used to prove this result remains large deviation principles for properly defined empirical measures on CGRGs. As a motivation for this article, we apply our results to some data from Wireless Sensor Network for Monitoring Water Quality from a Lake. 1. Introduction Field data we often encounter from the study of the environment are usually structured according to geometry and the connectivity between the locations that make up the environment. Example,data from (i) monitoring air quality at key industrial sites, (ii) looking for key contaminating agents from the exhausts of public buses, (iii) monitoring the cleanliness in lakes and many more, are all structured according to the geometry of the area of study and the connectivity of the location that make up the environment. To design and implement simplex (Linear programming) algorithm for the solution of generalized network flow problems of the geometric structured network data ,see example [1], or to find an efficient coding scheme or an approximate pattern matching algorithms, see example [2], we need an information theory for such data structures, and the lossy Asymptotic Equipartition Property (AEP) for the geometric networked data structures is key to finding an information theory for the data structure. See [6] and [7] for similar results for other types of data structures. The aim of this article is to extend the Lossy AEP for Networked Data Structures modelled as Coloured Random Graph (CRG), see [6, Theorem 2.1], to cover the WSN. To be specific we model the Geometric Networked Data Structures ( WSN) as a CGRG and use some of the large deviation techniques developed in [7] to prove a strong law of large numbers (SLLN), see Lemma 3.3, for the random network. Using the SLLN and the techniques deployed in [9] we extend the Lossy AEP to cover the WSN. The remaining part of the paper is organized as follows: Section 2 contains the main result of the paper and an application to some data from environmental science. See, Theorem 2.1 in Subsection 2.1 and the application in Subsection 2.2. Section 3 gives the proof of the main result; starting with the LDPs (Lemmas 3.1 and 3.2) in Subsection 3.1, followed by statement and proof of a strong law of large numbers, see Lemma 3.3 and ending with derivation of the main results from the SLLN in subsection 3.2. Mathematics Subject Classification : 94A15, 94A24, 60F10, 05C80 Keywords: Information theory, rate-distortion theory,exponential equivalent measures, relative entropy, geometric networked data structures, wireless sensor networks. Address: Statistics Department, University of Ghana, Box LG 115, Legon,Ghana. E-mail: [email protected]. 2 K. DOKU-AMPONSAH 2. Generalized AEP for CGRG Process 2.1 Main Result  We consider two CGRG processes X [z] = (X(z1 ), X(z2 )) : zi zj ∈ E, i, j = 1, 2, 3, ..., n, i 6=  and Y [z] = (Y (zi ), Y (zj )) : zi zj ∈ E, i, j = 1, 2, 3, ..., n, i 6= j which take values G[z] = G(X , z1 , z2 , z3 , ..., zn ) and Ĝ[z] = Ĝ(X , z1 , z2 , z3 , ..., zn ), resp., the spaces of finite graphs X and z1 , z2 , z3 , ..., zn ∈ [0, 1]d . We equip G[z] , Ĝ[z] with their Borel σ−fields Fx and F̂x . Let (πω) j in on Px (πω) and Py denote the probability measures of the entire processes X [z] and Y [z]. By Px and Py we denote the coloured geometric random graphs X [z] and Y [z] conditioned to have empirical colour measure π and empirical pair measure ω. See, example [3]. We always assume that X [z] and Y [z] are independent of each other. By X we denote a finite alphabet and denote by N (X ) the space of counting measure on X equipped with the discrete topology. By M(X ) we denote the space of probability measures on X equipped with the weak topology and M∗ (X ) the space of finite measures on X equipped with the weak topology. We define the process-level empirical measure Ln,[z] induced by X [z] and Y [z] on G[z] × Ĝ[z] by 1 X  (βx (z), βy (z)), for (βx (z), βy (z)) ∈ M[(X × N (X ))2 ]. δ Ln,[z](βx (z), βy (z)) = BX (zv ), BY (zv ) n v∈[n] Ln,[z],1(βx (z)) := 1 X δ n v∈[n]  (βx (z)) and L BX (zv ) 2 n,[z],2(βy (z)) := 1 X δ n v∈[n]  (βy (z)) BY (zv ) for (βx (z), βy (z)) ∈ M[(X × N (X )) ]. Throughout the rest of the article we will assume that X [z] and Y [z] are CGRG processes, See [11]. (n) For n ≥ 1, let Px denote the marginal distribution of X [z] on [n] = {1, 2, 3, ..., n} taking with respect (πω) (n) (πω) to Px and Qy denote the marginal distribution Y [z] on [n] = {1, 2, 3, ..., n} with respect to Py . Let σ : X × N (X ) × X × N (X ) → [0, ∞) be an arbitrary non-negative function and define a sequence of single-letter distortion measures σ (n) : G[z] × Ĝ[z] → [0, ∞), n ≥ 1 by  1 X  (n) σ Bx (zi ), By (zi ) , σ (x, y) = n i∈[n] where Bx (zi ) = (x(zi ), Lx (zi )) and By (zi ) = (y(zi ), Ly (zi )). Given α ≥ 0 and x ∈ G[z] , we denote the distortion-ball of radius α by n o B(x, α) = y ∈ Ĝ[z] : σ (n) (x, y) ≤ α . We shall call the measure µ ∈ M[(X × N (X ))2 ] consistent if µ1 , µ2 are both consistent marginals of µ. Refer to [7, Equation 2.1] for the concept of consistent measures. For (π, ω) ∈ M(X ) × M(X × X ), we write Y e−ω(a,b)/π(a) [ω(a, b)/π(a)]ℓ(b) , for ℓ ∈ N (X ) pπω (a, l) = π(a) ℓ(b)! b∈X LOSSY VERSION OF AEP FOR WSN 3 and define the rate function I1 : M[(X × N (X ))2 ] → [0, ∞] by J1 (µ) =  H µ k pπω ⊗ pπω ), if µ is consistent and µ1,1 = µ1,2 = π, ∞ otherwise, (2.1) where  pπω ⊗ pπω (ax , ay ), (lx , ly ) = pπω (ax , lx )pπω (ay , ly ). By x ≈ p we mean x has distribution p. For (π, ω) ∈ M(X ) × M(X × X ), we write αav (π, ω) = hloghetσ(BX , BY ) , pπω i, pπω i. Assume   (n) αmin (π, ω) = EP (n) essinf Y ≈ Q(n) σ (n) (X, Y ) → αmin (π, ω). x For n > 1, we write y Rn (Pn(x) , Qn(y) , α) := inf Vn and n1 n o H(Vn k Pn(x) × Qn(y) ) : Vn ∈ M(G × Ĝ) n o (n) (n) α∞ (π, ω) := inf α ≥ 0 : sup R (P , Q , α) < ∞ . n x min y n≥1 Theorem 2.1 (ii) below provides a Lossy AEP for WSN data structures. Theorem 2.1. Suppose X [z] and Y [z] are CGRG process. Assume σ are bounded function. Then,  (πω) (i) with P(x) − probability 1, conditional on the event Ψ(Ln,[z],1) = Ψ(Ln,[z],2) = (π, ω) the n o random variables σ (n) (x, Y [z] ) satisfy an LDP with deterministic, convex rate-function n o Jσ (t) := inf J1 (µ) : hσ, µi = t . µ   (ii) for all α ∈ αmin (π, ω), αav (π, ω) , except possibly at α = α∞ min (π, ω)    1 lim − log Q(n) B(X [z] , α) = R P(πω) , P(πω) , α almost surely, (2.2) x y x n→∞ n where R(p, q, α) = inf µ H(µ k p × q). 2.2 Application: Wireless Sensor Network for Monitoring Water Quality from a Lake. Let consider a WSN (to monitor the cleanliness in lakes, particularly those used as sources of drinking water) consisting of sensors capable of carrying out some processing, gathering sensory information and communicating with other connected nodes in the network modelled as coloured geometric random graph on n location, say z1 , z2 , ..., zn . By SG we denote sensors capable of carrying out some processing, gathering sensory information while communicating with other sensors and SI sensors gathering sensory information while communicating with other sensors. Suppose the locations are ∆(d) z1 , z2 , ..., zn ∈ [0, 1]d partition into nπn (SG) block of SG and nπn (SI) block of SI, and nkωn k ∆(d) ∆(d) ∆(d) number of communication links divided into nωn (SG, SI), nωn (SI, SG), nωn (SG, SG)/2, ∆(d) nωn (SI, SI)/2 different interactions, respectively, for ∆(d) a function which depends on the connec∆(d) tivity radius of the WSN. Assume πn converges π and ωn converges ω ∆(d) . If we take σ(s, r) = (s−r)2 then, by Theorem 2.1 we have the rate-distortion of 4 K. DOKU-AMPONSAH R(P, Q, α) =  0, if α ≥ 2ω ∆(d) (SG, SI) + ω ∆(d) (SG, SG) + ω ∆(d) (SI, SI) + 2ω ∆(d) (SI, SG). ∞ otherwise, (2.3) d/2 where ω ∆(d) (a, b) = π  λ[d] (a, b))π(a)π(b). See, [6] for the relationship between the connectivity d/2 ! radius and λ[d] . We refer to [13] for more on modelling of the physical environment using the Wireless Sensor Network. 3. Proof of Theorem 2.1. 3.1 LDPs.   Recall from [7] that X = (X(u), X(v)) : uv ∈ E and Y = (Y (u), Y (v)) : uv ∈ E are CRG processes with values from G = G(X ) and Ĝ = Ĝ(X ), resp., the spaces of finite graphs on X . We define the process-level empirical measure Ln induced by X and Y on G × Ĝ by 1 X  (βx , βy ), for (βx , βy ) ∈ M[(X × N (X ))2 ]. Ln (βx , βy ) = δ B (v), B (v) X Y n v∈[n] Lemma 3.1 (Exponential Equivalence). Suppose (X[z] , Y [z] ) are CGRG on the d− dimensional Torus and (X, Y ) are CRG. Then, conditional on the event Ψ(Ln,[ z],1 ) = Ψ(Ln,[z],2) = Ψ(Ln,1 ) = Ψ(Ln,2 ) = (π, ω) the law of Ln,[z] is exponentially equivalent to the law of L.n Proof. We denote by (X̃, Ỹ ) the random allocation process and notice from [6, Lemma 3.1] and [5, Lemma 0.4] that conditional on Ψ(Ln,[z],1) = Ψ(Ln,[z],2) = Ψ(Ln,1 ) = Ψ(Ln,2 ) = (π, ω) the law of (X [z] , Y [z] ) is exponentially equivalent to the law of (X̃, Ỹ  ) and the law of (X̃, Ỹ ) is exponentially equivalent to the law of (X, Y ). Therefore, conditional on Ψ(Ln,[z],1) = Ψ(Ln,[z],2) = Ψ(Ln,1 ) = Ψ(Ln,2 ) = (π, ω) we have (X [z] , Y [z] ) exponentially equivalent to (X, Y ).  Lemma 3.2 (LDP). Suppose (X [z] , Y [z] ) are coloured geometric random graph on the d− dimensional Torus. Then, conditional on the event Ψ(Ln,[z],1) = Ψ(Ln,[z],2) = (π, ω) the law of Ln,[z] obeys a process level LDP with good rate function J1 The proof of this Lemma 3.2 which follows from 3.1 [7, Theorem ] and [10, Theorem 4.2.13], is omitted from the paper. 3.2 Derivation of the AEP. We write M := M[(X × N (X ))2 ] and define the set C ε by n o ε Cπω = µ ∈ M: sup |µ(βx , βy ) − pπω ⊗ pπω (βx , βy )| ≥ ε . βx ,βy ∈X ×N (X ) Lemma 3.3 (SLLN). Suppose the sequence of measures (πn , ωn ) converges to the pair of measures  ε (πn , ωn ). For any ε > 0 we have limn→∞ P(πn ,ωn ) Cπω = 0. ε defined above is a closed subset of M and so by Lemma 3.2 we have that Observe that Cπω lim sup n→∞  1 ε log P(πn ,ωn ) Cπω ≤ − infε J1 (µ). µ∈C n (3.1) LOSSY VERSION OF AEP FOR WSN 5 We use proof by contradiction to show that the right hand side of (3.1) is negative.Suppose that there ε such that J (µ ) ↓ 0. Then, there is a limit point µ ∈ F with J (µ) = 0. exists sequence µn in Cπω 1 n 1 1 Note J1 is a good rate function and its level sets are compact, and the mapping µ 7→ J1 (µ)) lower semi-continuity. Now J1 (µ) = 0 implies µ(βx , βy ) = pπω ⊗ pπω (βx , βy ), for all βx , βy ∈ X × N (X ) ε . which contradicts µ ∈ Cπω (i) Notice σ (n) (X [z] , Y [z] ) = hσ, Ln,[z]i and if Λ is open (closed) subset of M then  Λσ := µ : hσ, µi ∈ Λ is also open (closed) set since σ is bounded function. − inf t∈In(Λ) Jσ (t) = − inf J1 (µ) n o ≤ lim inf n1 log P σ (n) (X [z] , Y [z] ) ∈ Λ X [z] = x, Ψ(Ln,[z],1) = Ψ(Ln,[z],2) = (πn , ωn ) n→∞ n o ≤ lim n1 log P σ (n) (X [z] , Y [z] ) ∈ Λ X [z] = x, Ψ(Ln,[z],1) = Ψ(Ln,[z],2) = (πn , ωn ) n→∞ n o ≤ lim sup n1 log P σ (n) (X [z] , Y [z] ) ∈ Λ X [z] = x, Ψ(Ln,[z],1) = Ψ(Ln,[z],2 ) = (πn , ωn ) µ∈ln(Λσ ) n→∞ ≤− inf µ∈cl(Λσ ) J1 (µ) = − inf Jσ (t). t∈cl(Λ) (ii) Observe that σ are bounded, therefore by Varadhan’s Lemma and convex duality, we have πω ∗ R(Pπω x , Py , α) = sup[tα − H∞ (t)] = H∞ (α) t∈R where ∗ H∞ (t) := lim 1 n→∞ n log Z D nt σ, Ln,[z] e E Q(n) y (dy) exits for P almost everywhere x. Using bounded convergence, we can show that E D Z Z h i nt σ, L n,[z] H∞ (t) := lim Hn (t) = lim n1 log e Q(n) Px(n) (dx). (dy) y n→∞ n→∞ Using Lemma 3.3, by boundedness of σ we have that n  1X 1 H (nt) = log EQ(n) etσ(Bx (j),By (j) → hloghetσ(BX [z] ,BY [z] ) , pπω i, pπω i = αav (π, ω). n n y n j=1 Also let (n) αmin (π, ω) := lim t↓−∞ Hn (t) t (n) (n) so that Hn∗ (α) = ∞ for α < αmin (π, ω), while Hn∗ (α) < ∞ for α > αmin (π, ω). Observe that for n < ∞   (n) we have αmin (π, ω) = EP (n) essinf Y ≈ Q(n) σ (n) (X [z] , Y [z] ) , which converges to αmin (π, ω). Applying x y similar arguments as [9, Proposition 2] we obtain  ∗ Rn (Px(n) , Q(n) y , α) = sup tα − Hn (t) := Hn (α) t∈R Now we observe from [9, Page 41] that the converge of Hn∗ (·) → H∞ (·) is uniform on compact subsets of R. Moreover, Hn is convex, continuous functions converging informally to H∞ and hence we can invoke [12, Theorem 5] to obtain 6 K. DOKU-AMPONSAH Hn∗ (α) = lim lim sup inf δ→0 n→∞ |α̂−α|<δ Hn∗ (α̂). Applying similar arguments as [9, Page 41] in the lines after equation (64) we have (2.3) which completes the proof. Conflict of Interest The author declares that he has no conflict of interest. Acknowledgement This extension has been mentioned in the author’s PhD Thesis at University of Bath. reference [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] I. Ali, A. Charnes and T. Song(1986). Design and Implementation of Data Structures for Generalized Networks. Journal of Information and Optimization Sciences, 7(), 81-104. T.M. Cover and J.A. Thomas(1991). Elements of Information Theory. Wiley Series in Telecommunications, (1991). K. Doku-Amponsah.(2006). Large deviations and basic information theory for hierarchical and networked data structures. PhD Thesis, Bath (2006). K. Doku-Amponsah(2012). Asymptotic equipartition propeties for hierarchical and networked structures. ESAIM: PS 16 (2012): 114-138.DOI: 10.1051/ps/2010016. K. Doku-Amponsah(2014). Exponential Approximation, Method of types for Empirical Neighbourhood Measures of Random graphs by Random Allocation. Int. J. Stat. & Prob., 3(2),110-120 (2014). K. Doku-Amponsah.(2017). Lossy Asymptotic Equipartition Property for Networked Data Structures. J. Math. & Stat. 13(2):152-158 K. Doku-Amponsah(2015). Joint large deviation result for empirical measures of the coloured random geometric graphs. SpringerPlus.2016, 5:1140; Vol. 4, No. 1 (2015),pp. 87-93 K. Doku-Amponsah(2017). Lossy Asymptotic Equipartition Property For Hierarchical Data Structures. Far East J. Math. Sc. 101(5):1013-1024. A. Dembo and I. Kontoyiannis(2002). Source Coding, Large deviations and Approximate Pattern. Invited paper in IEEE Transaction on information Theory, 48(6):15901615,June (2002). A. Dembo and O. Zeitouni.(1998) Large deviations techniques and applications. Springer, New York, (1998). (1998). D.B. Penman. Random graphs with correlation structure. PhD Thesis, Sheffield 1998. C.E. Shannon(1948). A Mathematical Theory of Communication. Bell System Tech. J., 27:379-423,623-656. P. Stanley-Marbell,T. Basten,J. Rousselot, R. S. Olive,H. Karl,M. Geilen,R. Hoes,Gerhard Fohler and J-D. Decotignie(2008). System Models in Wireless Sensor Network. ES Reports ISSN:1574-9517, ESR-2008-06, 1 May 2008
7cs.IT
19 System Identification of NN-based Model Reference Control of RUAV during Hover Bhaskar Prasad Rimal1, Idris E. Putro2, Agus Budiyono2, Dugki Min3 and Eunmi Choi1 1Graduate School of Business IT, Kookmin University Jeongneung-Dong, Seongbuk-Gu, Seoul, 136-702, Korea 2Department of Aerospace Information Engineering, Konkuk University 3School of Computer Science and Engineering, Konkuk University Hwayang-dong, Gwangjin-gu, Seoul 13-701, Korea 1. Introduction Unmanned aerial vehicles (UAVs) are becoming more and more popular in a wide field of applications nowadays. UAVs are used in number of military application for gathering information and military attacks. In the future will likely see unmanned aircraft employed, offensively, for bombing and ground attack. As a tool for research and rescue, UAVs can help find humans lost in the wilderness, trapped in collapsed buildings, or drift at sea. It is also used in civil application in fire station, police observation of crime disturbance and natural disaster prevention, where the human observer will be risky to fight the fire. There is wide variety of UAV shapes, sizes, configuration and characteristics. Therefore, there is a growing demand for UAV control systems, and many projects either commercial or academic destined to design a UAV autopilot were held recently. A lot of impressive results had already been achieved, and many UAVs, more or less autonomous, are used by various organizations. An Artificial Neural Network (ANN) [3] is an information processing paradigm that is stimulated by the way biological nervous systems, such as the brain, process information. The key element of this paradigm is the novel structure of the information processing system. Basically, a neural network (NN) is composed of a set of nodes (Fig. 1). Each node is connected to the others via a set of links. Information is transmitted from the input to the output cells depending of the strength of the links. Usually, neural networks operate in two phases. The first phase is a learning phase where each of the nodes and links adjust their strength in order to match with the desired output. A learning algorithm is in charge of this process. When the learning phase is complete, the NN is ready to recognize the incoming information and to work as a pattern recognition system. ANNs, like people, learn by example. An ANN is configured for a specific application, such as pattern recognition or data classification, through a learning process. Learning in biological systems involves adjustments to the synaptic connections that exist between the neurons. www.intechopen.com 396 Artificial Neural Networks - Industrial and Control Engineering Applications In recent years, there is a wide momentum of ANNs in the control system arena, to design the UAVs. Any system in which input is not proportional to output is known as non-linear systems. The main advantages of ANNs are having the processing ability to model nonlinear systems. ANNs are very suitable for identification of non-linear dynamic systems. Multilayer Perceptron model have been used to model a large number of nonlinear plants. We can vary the number of hidden layers to minimize the mean square error. ANNs has been used to formulate a variety of control strategies [1] [2]. The NN approach is a good alternative for physical modeling techniques for nonlinear systems. Fig. 1. General Neural Network Architecture A fundamental difficulty of many non-linear control systems, which potentially could deliver better performance, is extremely difficult to theoretically predict the behavior of a system under all possible circumstances. In fact, even design envelope of a controller often remains largely uncertain. Therefore, it becomes a challenging task to verify and validate the designed controller under all possible flight conditions. A practical solution to this problem is extensive testing of the system. Possibly the most expensive design items are the control and navigation systems. Therefore, one of main questions that each system designer has to face is the selection of appropriate hardware for UAV system. Such hardware should satisfy the main requirements without contravening their boundaries in terms of quality and cost. In UAV design this kind of consideration is especially important due to the safety requirements expressed in airworthiness standards. Therefore question is how to find the optimal solution. Thus, simulation is necessary. Basically there are two type of simulation is needed while designing UAVs systems, they are Software-In-the-Loop (SIL) [5] simulation and Hardware-In-the-Loop (HIL) simulation [4]. To utilize the SIL configuration, the un-compiled software source code, which normally runs on the onboard computer, is compiled into the simulation tool itself, allowing this software to be tested on the simulation host computer. This allows the flight software to be tested without the need to tie-up the flight hardware, and was also used in selection of hardware. HILS simulates (Fig. 2) a process such that input and output signals show the timedependent values as real-time operating components. It is possible to test embedded system under real time with various test conditions. It provides the UAV developer to test many aspects of autopilot hardware, finding the real time problems, test the reliability, and many more. The simulation can be done with the help of Matlab Simulink program environment. This program can be considered as a facility fully competent for this task. Simulink is the most www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 397 Fig. 2. UAV Architecture: Hardware-in-the-loop Simulation popular tool, it was not only used for a SIL Simulation of the complete UAV system but also to create the simulation code of a HIL Simulator that runs in real time. The system identification is the first and crucial step for the design of the controller, simulation of the system and so on. Frequently it is necessary to analyze the flight data in the frequency domain to identify the UAV system. This paper demonstrates how ANN can be used for non linear identification and controller design. The simulation processes consists of designing a simple system, and simulates that system with the help of model reference control block in Matlab/Simulink [6]. The paper is organized as follows: Section 2 describes some related work. Section 3 deals with system identification and control on the basis of NNs. Details of design and control system with NNs approaches is describes in section 4. In section 5, simulations are performed on RUAVs system and finally, conclusions are drawn in section 6. 2. Related work Robust control techniques are capable for adapting themselves for changing the dynamics which are necessary for autonomous flight. This kind of controller can be designed with the help of system identification. There are lots of work had already done in UAV area in the context of ANNs. Mettler B. et al., [12] describe the process and result of the dynamic modeling of a model-scale unmanned helicopter using system identification. E. D. Beckmann et al., [13] explained the nonlinear modeling of a small-scale helicopter and the identification of its dynamic parameters using prediction error minimization methods. NN approaches have excellent performance than classical technique for modeling and identifying nonlinear dynamic systems [15] [16]. There is also numerous system identification techniques had been developed to model nonlinear systems. Some of them are Fuzzy identification [20] [27], state-space identification [21], frequency domain analysis [22], NN based identification [23] [26]. The exception is given by LPV identification [25] which is applicable for the entire flight envelope. The learning ability is the beauty of NN that has been utilized widely for system identification and control applications. Shim D. H. et al. [28] described time-domain system identification approaches to design the control system for RUAVs. www.intechopen.com 398 Artificial Neural Networks - Industrial and Control Engineering Applications 3. System identification and control The main idea of system identification is often to get a model that can be used for controller design. System identification (SI) [7] provides the idea of making mathematical models of dynamics systems, starting from experimental data, measurements, and observations. It is widely used for applications ranging from control system design and signal processing to time series analysis. The system identification is used to verify and test the control system parameters that are associated with the six-degree-of-freedom system using the test flight data. The simulation results and the statistical error analysis are provided for both the cases. Fig. 5 shows the flow of control system design with the system identification model. Basically System identification is the experimental approach to process modeling and it includes the following five steps as shown in Fig. 3 The system considered as a black box (Fig. 4) which receives some inputs that lead to some output. The concern here is: what kind of parameters for a particular black box can correlate the observed inputs and outputs? Experiment Design Selection of Model Structure Cost function -Errors-In-Variables , Least Squares , Bayes …………….. -Linear , Fuzzy Logic, Neural Network ……………... Optimization Scheme -Levenberg-Marquardt, Gauss-Newton, Generic Algorithms , Backpropagation …………….. Choice of the Criteria to Fit Parameter Estimation -Prior Knowledge, Random, Prior Model ………….. Stopping Criteria Minimum Cost Errors-In-variables Early Stopping ………………. Model Validation Accepted Plant Model Fig. 4. System Identification Modeling Procedure www.intechopen.com Not Accepted System Identification of NN-based Model Reference Control of RUAV during Hover Black Box Input 399 Output Fig. 5. Black box view of System Identification Can these parameters help designer to predict the outputs for a new given set of inputs? This is the basic problem of system identification. Neural networks have been applied successfully in the identification and control of dynamic systems. Popular neural network architectures for prediction and control that have been implemented in the NN Toolbox™ software are: • Model Predictive Control • NARMA-L2 (Feedback Linearization) Control • Model Reference Control There are typically two steps involved when using neural networks for control systems: • System identification • Control design In the system identification stage, we develop a neural network model of the plant that we want to control. The flow of control system design with system identification is shown in Fig 5. In the control design stage, we use the neural network plant model to design (or train) the controller using the propagation of the controlling error through the NN model. Training produces the optimal connection weights for the networks by minimizing the errors between NN output and the plant output over the entire set of samples. Among many network training algorithms Levenberg-Marquardt (LM) algorithm [14] is performed. This approach provides a gradient based technique allowing fast error minimization. The major aim of training is to get the appropriate values of the weights for closest possible prediction through repetitive iterations. The LM method works on the principle of minimizing the mean squared error between actual output of the system and predicted output of the network and can be calculated with the following formula. VN (θ ) = 2 1 N ( y(t ) − yˆ (t ) ) ∑ N t =1 (1) Where yˆ (t ) = g(θ ,φ (t )) (2) θ = ( a1 , a2 ,...ana , b1 , b2 , bnb ) (3) φ (t ) = ( y(t − 1),..y(t − na), u(t − nk ),..u(t − nk − nb + 1)) (4) Here φ is the matrix of past inputs and outputs. To find the coefficient θ , there are many assumptions and detailed knowledge of the plant is required. In each of the three control architectures mention above, system identification stage is identical but control design stage is different. For model predictive control, the plant model is used to predict future behavior of the plant, and an optimization algorithm is used to select the control input that optimizes future performance. www.intechopen.com 400 Artificial Neural Networks - Industrial and Control Engineering Applications Fig. 5. Flow of Control System Design with System Identification d Reference Model + y^ NN Plant Model + NN Controller ec Model Error + Command Input r Control Error + eI Plant Output Plant u Control Input y Fig. 6. Neural Network MRC architecture For NARMA-L2 control, the controller is simply a rearrangement of the plant model. We used model reference control to simulate the nonlinear identification and control of UAV. For model reference control, the controller is a neural network that is trained to control a plant so that it follows a reference model. The neural network plant model is used to assist in the controller training. The neural model reference control architecture uses two neural networks: a controller network and a plant model network, as shown in the Fig. 6. The plant model is identified first, and then the controller is trained so that the plant output follows the reference model output. The system identification error can be defined by eI = y − yˆ and the tracking error www.intechopen.com (5) System Identification of NN-based Model Reference Control of RUAV during Hover ec = y − d 401 (6) Controller parameters are updated based on error computed from the system output and the NN model of the plant. They describe the input /output behavior of the system using a set of weights. Such models can be interpreted as a weighted combination of several local models resulting in a nonlinear global model. Hence the mismatch between the nonlinearities of local models and process is less significant compared with single nonlinear model. Therefore neural network modeling has been applied especially to modeling tasks with uncertain nonlinearities, uncertain parameters and or high complexity. In the case of multi-input multi-output (MIMO) plants, the plant identification stage is same as that for single-input single-output (SISO) except that the NN model has many neurons in the output layer as the number of outputs of actual plant. Fig. 7 shows the control of a MIMO plant using NN controller. Fig. 7. Control of a MIMO plant using NN controller 3.1 Training of model using NN Iterative training is conducted to minimize mean square error (MSE) using Levenberg Marquardt (LM) algorithm. The LM is gradient based approach that allows fast error minimization. The mission of training is to obtain the most suitable and optimized values of the weights for closest prediction through iterations. The training process (Fig 8) is an iterative and can be stopped either when total training error reaches a bottom threshold or when training error ceases to decrease any further. There is flexibility for varying number of neurons in the hidden layers to optimize error. Starting from a small number of neurons, the number can be gradually increased or decrease until an accepted training error is achieved. Once the NN is successfully trained, it can be used to obtain a linear model of the plant from the available input and output values. Figure shows the behavior of plant input and output. It can be seen that the output response is different in each time slot with the variation of input weights. As a typical case, 1000 different sets of initial weights are considered for the network with 10 hidden neurons. www.intechopen.com 402 Artificial Neural Networks - Industrial and Control Engineering Applications Fig. 8. Plant Input/output behavior during training The network architecture for MIMO model of NN is shown in figure 9. In a particular equilibrium condition, no inertial and aerodynamic coupling, the behavior of RUAV can be divided into lateral and longitudinal dynamics mode and train with MIMO. The longitudinal cyclic deflection and collective control input is used to control the longitudinal dynamics mode whereas lateral cyclic deflection and pedal control input is used to control the lateral dynamics mode. The NN has trained with four system inputs and six outputs. The number of hidden layer is considered. The network is trained with different sets of data collected from the real flight tests of the RUAV. Figure 9 describes the longitudinal dynamics mode as longitudinal cyclic deflection and collective control are provided as inputs (U) to the system and pitch rate and forward velocity (u) are considered as the outputs (Y) of the system that results four outputs pitch angle ( θ ), forward velocity (u),vertical velocity (w) and pitch angular rate (q). Similarly, lateral cyclic deflection and pedal control are provided as inputs to the system and vertical velocity and roll rate are considered as the outputs of the system that results roll angle ( ϕ ), lateral velocity (v), roll angular rate (p), yaw angular rate (r). Figure 10 illustrates a scenario of getting performance behavior of the identification with plant process during training (21 Epochs), where the training data and testing data are following almost same behavior. www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 403 Fig. 9. MIMO model of NN Fig. 10. A scenario of getting performance behavior of the identification with plant process during training (Trainlm at 21 Epochs), where the training data and testing data are following almost same behavior www.intechopen.com 404 Artificial Neural Networks - Industrial and Control Engineering Applications 4. Design of control system The key challenge to deploy the designed control system of UAV is the potential risk and cost. So, to minimize the cost and the potential risk, we have to test and simulate the control system rigorously to get high degree of precision of safeness. Design, testing and simulation are the iterative process and this can be accomplished by executing several pair of design, test, and simulation. The simulation of UAV control system consist a group of nonlinear Simulink models which is used to estimate the capabilities of controllers. Generally, these models are employed both in evolutionary search to estimate the robustness of a particular controller, and later to verify and validate the designed controllers through extensive simulation with several test cases in different conditions. An UAV represents a complex non-linear system with 6 Degree of Freedom (6-DOF), and having high degree of coupling. It is anticipated that the most effective control on such a system can be gained with an appropriate non-linear controller. NNs have attracted a great deal of attention owing to their ability to learn non-linear functions from input-output data examples [8]. Applied to control field, NNs are essentially nonlinear models that can be useful to solve non-linear control problems [9]. 4.1 Mathematical model of RUAV dynamics Basic starting point for UAV control design is to find out the state space matrix from 6-DOF equations of motion by linearizing with proper assumptions. The state of a system is a set of variables (Fig. 11) such that the knowledge of these variables and the input functions will, with the equations describing the dynamics, provide the future state and output of the system. The state of the system is described by the set of the first-order differential equations written in terms of state variables [x1 x2 ………xn]. Fig. 11. System inputs and outputs The state space is defined as the n-dimensional space in which the components of the n state vector represent its coordinate axes. The state equations of a system are a set of n first-order differential equations, where n is the number of independent states. Many control problems, however, that require multiple outputs be controlled simultaneously, to do control of such system, multiple inputs must be manipulated, usually they are orchestrated as MIMO. The helicopter is a complex MIMO system with high correlation. UAV autopilot is an example of MIMO where speed, altitude, pitch, roll, and yaw angles must be maintained and throttle, several rudders, and flaps are available as control variables. The UAV systems consist of a six degree of freedom, nonlinear complex systems. Budiyono A. et al., [11] illustrate the nonlinear rigid body equations of motion of helicopter (Eq.7-15) that describes the vehicle’s translational motion and angular motion about three reference axes. www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 405 ∑ X = m(u − rv + qw) + mg sin θ (7) ∑ Y = m(ru +v − pw) − mg sin φ cosθ (8) ∑ Z = m( −qu + pv − w) − mg cosφ cosθ (9) ∑ L = I xx p − ( I yy − I zz )qr (10) ∑ M = I yy q − ( I zz − I xx )pr (11) ∑ N = I zzr − ( I xx − I yy )pq (12) φ = p + (q sin φ + r cos φ )tan θ (13) θ = q cos φ − r sin φ (14) ϕ = (q sin φ + r cos φ )secθ (15) Where the vector u, v, w and p, q, r are the fuselage velocities and angular rates in the body coordinate system, respectively. X, Y, Z are the external forces acting on the helicopter center of gravity and L, M, N are the external moments. State space and transfer-function models can be generalized to MIMO models. These first-order differential equations can be written in a general form that can be represented in matrix notation. x = Ax + Bu (16) y = Cx + Du Where x = ⎡⎣u w q θ a1s v p r φ b1s ⎤⎦ ′ (17) And u = ⎡⎣δ long δ coll δ lat δ ped ⎤⎦ (18) The MIMO transfer-function matrix can be obtained from state space model by G( s ) = C ( sI − A)−1 B + D where A ∈ n * n , B ∈ n * m , C ∈ l * n , D ∈ l * m . The descriptions of all parameters are shown in Table 1 and Table 2. Where A, B and C are the representation of the system matrix, input matrix and output matrix respectively. A, B, C and D depends on the flight regime with nominal parameter values for hovering and cruising. Then, u is a vector of the inputs, x is the element state vector, and y is a vector containing outputs. It is easy to see that each linear state space system of Equation (16) can be expressed as a linear time invariant (LTI) transfer functions. The procedure is to take Laplace transformation of the both sides of Equation (16) and use an algorithm is given by Leverrier-Fadeeva-Frame formula [10]. Another approach is to use Matlab functions directly. Let us take a transfer function of UAV (Eq. 19-20) to model and simulate. www.intechopen.com 406 Artificial Neural Networks - Industrial and Control Engineering Applications Parameter Fuselage Linear Motion Symbol u v w p q r a1s b1s Fuselage Angular Motion Rotor TipPath-Plane Pitch Roll Description Forward velocity Lateral velocity Vertical velocity Roll Angular Rate Pitch Angular Rate Yaw Angular Rate Longitudinal Flapping Angle Lateral Flapping Angle Pitch Angle Roll Angle θ φ Table 1. Model states. Control Description Longitudinal Cyclic Deflection Lateral Cyclic Deflection δ long δ lat δ ped δ coll Units Dimensionless [-1, 1] Dimensionless [-1, 1] Pedal control Input Dimensionless [-1, 1] Collective Control Input Dimensionless [0, 1] Table 2. Control input variables. ⎡ Xu ⎢ ⎢ 0 ⎢ Mu ⎢ ⎢ 0 ⎢ 0 A=⎢ ⎢ 0 ⎢L ⎢ u ⎢ 0 ⎢ ⎢ 0 ⎢ 0 ⎣ 0 Zw 0 0 0 0 0 Nw 0 0 0 −g −g 0 0 Za 1 s 0 0 M a 1s 1 0 0 −1 0 Aa 1s 0 0 0 0 0 L a 1s 0 0 0 0 0 0 0 0 Ba 1s ⎡ 0 ⎢Z ⎢ col ⎢ M col ⎢ ⎢ 0 ⎢ 0 B=⎢ ⎢ 0 ⎢ 0 ⎢ ⎢ N col ⎢ ⎢ 0 ⎢⎣ 0 www.intechopen.com 0 0 Mv 0 0 Yv Lv 0 0 0 0 0 0 0 0 Np 0 Zr 0 0 0 0 0 Nr 0 0 0 0 0 g 0 0 0 0 1 −1 0 0 0 0 0 0 0 0 0 0 0 0 Alon 0 0 0 Yped 0 0 0 Blon N ped 0 0 0 ⎤ 0 ⎥⎥ 0 ⎥ ⎥ 0 ⎥ Alat ⎥ ⎥ 0 ⎥ 0 ⎥ ⎥ 0 ⎥ ⎥ 0 ⎥ Blat ⎥⎦ 0 ⎤ ⎥ Zb 1s ⎥ M b 1s ⎥ ⎥ 0 ⎥ Ab 1s ⎥ ⎥ g ⎥ Lb 1s ⎥⎥ 0 ⎥ ⎥ 0 ⎥ Bb 1s ⎥⎦ (19) (20) System Identification of NN-based Model Reference Control of RUAV during Hover ⎡1 ⎢0 ⎢ ⎢0 ⎢ ⎢0 ⎢0 C=⎢ ⎢0 ⎢0 ⎢ ⎢0 ⎢ ⎢0 ⎢⎣0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ⎡0 ⎢0 ⎢ ⎢0 ⎢ ⎢0 ⎢0 D=⎢ ⎢0 ⎢0 ⎢ ⎢0 ⎢ ⎢0 ⎢⎣0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0⎤ 0 ⎥⎥ 0⎥ ⎥ 0⎥ 0⎥ ⎥ 0⎥ 0⎥ ⎥ 0⎥ ⎥ 0⎥ 0 ⎥⎦ 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0⎤ 0 ⎥⎥ 0⎥ ⎥ 0⎥ 0⎥ ⎥ 0⎥ 0⎥ ⎥ 0⎥ ⎥ 0⎥ 1 ⎥⎦ 407 (21) (22) The descriptions of all parameters used in Eq. 19-20 are shown in Table 3 Parameter Zw Zr Zbls Zals Yv Xu Nw Nr Np Mv Mu Mbls Mals Lv Lu Lals Lbls Bals Bbls Aals Abls g Zcol Yped Ncol Nped Mcol Blon Blat Alat Alon Description Stability derivative Force of gravity Control derivative Cyclic input sensitivity Table 3. Parameters of model constants for fuselage linear motion equations, model constants for tip-path-plane and augmented yaw dynamics, and model constants for angular motion. The objective of training a NN is to minimize the error between the output of NN and the desired output. First, we use models (Eq. 19-20) to generate training data. Then by propagation algorithm, all the weights in NN plant can be adjusted through the training sets until the NN plant outputs are very close to the plant outputs. This completes the system identification. Second, we will choose a reference model which allows the desired behavior. Let us use a flight data from Eq. 23-24 for design and simulation. www.intechopen.com 408 Artificial Neural Networks - Industrial and Control Engineering Applications A= 0 0 −9.8 −9.8 0 0 0 0 0 ⎤ ⎡ −0.78501 ⎢ ⎥ 0 − 0.065145 0 0 − 56.659 0 0 − 0.79784 − 0.0045036 1344.1 ⎢ ⎥ ⎢ 0.35712 0 0 0 92.468 −0.063629 0 0 0 56.515 ⎥ ⎢ ⎥ 0 0 1 0 0 0 0 0 0 0 ⎥ ⎢ ⎢ 0 0 −1 0 −11.842 0 0 0 0 −7.1176 ⎥ (23) ⎢ ⎥ 0 0 0 0 0 0.11245 0 0 9.8 9.8 ⎥ ⎢ ⎢ 0.46624 0 0 0 −0.6588 −0.083441 0 0 0 131.19 ⎥⎥ ⎢ ⎢ −9.9435 −0.30115 0 1.0349 0 0 0 0 0 0 ⎥ ⎢ ⎥ 0 0 0 0 0 0 1 0 0 0 ⎢ ⎥ ⎢ −1 −14.687 ⎦⎥ 0 0 0 0 2.1755 0 0 0 ⎣ B= 0 0 0 ⎤ ⎡ 0 ⎢ ⎥ 0.71986 0 0 0 ⎥ ⎢ ⎢ 1.4468 0 0 0 ⎥ ⎢ ⎥ 0 0 0 0 ⎢ ⎥ ⎢ 0 0 4.3523 ⎥ −11.198 ⎢ ⎥ 0 204.28 0 ⎥ ⎢ 0 ⎢ 0 0 0 0 ⎥⎥ ⎢ ⎢ −3.5204 0 −7.5159 0 ⎥ ⎢ ⎥ 0 0 0 0 ⎥ ⎢ ⎢ 0 2.9241 0 11.712 ⎥⎦ ⎣ (24) Eigenvalues: The key dynamics can be seen from the system’s Eigen values and Eigen vectors, are listed in Table 4. The system is stable with damping because all the real parts of the eigenvalues are negative. The simulation (Fig. 12) shows clearly that the system is stable but having damping. Damping Freq. (rad/s) 1 Sno -2.01e-002 + 8.27e-003i Eigenvalue 9.25e-001 2.17e-002 2 -2.01e-002 - 8.27e-003i 9.25e-001 2.17e-002 3 -1.83e-001 + 9.01e-001i 1.99e-001 9.19e-001 4 -1.83e-001 - 9.01e-001i 1.99e-001 9.19e-001 5 -2.82e-001 + 5.79e-001i 4.37e-001 6.44e-001 6 -2.82e-001 - 5.79e-001i 4.37e-001 6.44e-001 7 -5.93e+000 + 6.22e+000i 6.90e-001 8.59e+000 8 -5.93e+000 - 6.22e+000i 6.90e-001 8.59e+000 9 -7.37e+000 + 1.06e+001i 5.73e-001 1.29e+001 10 -7.37e+000 - 1.06e+001i 5.73e-001 1.29e+001 Table 4. Eignevalues of the helicopter system www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 409 Fig. 12. Transfer function of system 5. Experimental results and analysis In this experiment we used NN approach to train MIMO model and capture the phenomena of flight dynamics. This simulation is divided into two parts longitudinal mode and Lateral mode. The NN approach considers separate lateral and longitudinal network with inertial coupling between the networks taken into consideration. These networks trained individually by making it MIMO model. Basically system identification process consists of gathering experimental data, estimate model from data and validate model with independent data. NN controller is designed in such a way that makes the plant output to follow the output of a reference model. The main target is to play with fine tuning of controller in order to minimize the state error. The experiment is carried out with System identification procedures with Prediction Error Method (PEM) algorithm using System Identification Toolbox using Levenberg-Marquardt (LM) algorithm. We observe NN approach to get better result of System identification that shows the perfect matching and shown as RUAV Longitudinal Dynamics and RUAV Lateral Dynamics in the following fig. 13-18 The prediction error of the output responses is described in Fig. 14. The autocorrelation function almost tend to zero and the cross correlation function vary in the range of -0.1to 0.1. This shows the dependency between prediction error and δ coll , δ long but the dependency rate is very less. www.intechopen.com 410 Artificial Neural Networks - Industrial and Control Engineering Applications Longitudinal Dynamics Mode Analysis (a) Pitch Angle ( θ ) (b) Forward Velocity (u) (c) Vertical velocity (w) www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover (d) Pitch Angular Rate (q) Fig. 13. Output response with network response in Longitudinal dynamics mode (a) Pitch Angle ( θ ) www.intechopen.com 411 412 Artificial Neural Networks - Industrial and Control Engineering Applications (b) Forward velocity (u) (c) Vertical velocity (w) www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover (d) Pitch Angular Rate (q) Fig. 14. Autocorrelation and Cross-correlation of output response in longitudinal mode The histogram of prediction error is shown in Fig. 15. Fig. 15. Histogram of Prediction errors in Longitudinal Mode www.intechopen.com 413 414 Artificial Neural Networks - Industrial and Control Engineering Applications Lateral Dynamics Mode Analysis (a) Roll Angle ( ϕ ) (b) Lateral Velocity (v) (c) Roll Angular Rate (P) www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 415 (d) Yaw Angular Rate (r) Fig. 16. Output response with network response in lateral dynamics mode The prediction error of the output responses is described in Fig. 17. Similarly, in lateral mode also, the autocorrelation function almost tend to zero and the cross correlation function vary in the range of -0.1to 0.1. This shows the dependency between prediction error and δ lat , δ ped but the dependency rate is very less. (a) Roll Angle ( ϕ ) www.intechopen.com 416 Artificial Neural Networks - Industrial and Control Engineering Applications (b) Lateral Velocity (v) (c) Roll Angular Rate (P) www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 417 (d) Yaw Angular Rate (r) Fig. 17. Autocorrelation and Cross-correlation of output response in lateral mode The histogram of prediction error is shown in Fig. 18. 6. Conclusion UAV control system is a huge and complex system, and to design and test a UAV control system is time-cost and money-cost. This chapter considered the simulation of identification of a nonlinear system dynamics using artificial neural networks approach. This experiment develops a neural network model of the plant that we want to control. In the control design stage, experiment uses the neural network plant model to design (or train) the controller. We used Matlab to train the network and simulate the behavior. This chapter provides the mathematical overview of MRC technique and neural network architecture to simulate nonlinear identification of UAV systems. MRC provides a direct and effective method to control a complex system without an equation-driven model. NN approach provides a good framework to implement MEC by identifying complicated models and training a controller for it. 7. Acknowledgment “This research was supported by the MKE (Ministry of Knowledge and Economy), Korea, under the ITRC (Information Technology Research Center) support program supervised by the NIPA (National IT Industry Promotion Agency)” (NIPA-2010-C1090-1031-00003) www.intechopen.com 418 Artificial Neural Networks - Industrial and Control Engineering Applications Fig. 18. Histogram of Prediction errors in Longitudinal Mode 8. References [1] A. U. Levin, k. s Narendra,” Control of Nonlinear Dynamical Systems Using Neural Networks: Controllability and Stabilization”, IEEE Transactions on Neural Networks, 1993, Vol. 4, pp.192-206 [2] A. U. Levin, k. s Narendra,” Control of Nonlinear Dynamical Systems Using Neural Networks- Part II: Observability, Identification and Control”, IEEE Transactions on Neural Networks, 1996, Vol. 7, pp. 30-42 [3] David E. Rumelhart et al., “The basic ideas in neural networks”, Communications of the ACM, v.37 n.3, p.87-92, March 1994 [4] E. R. Mueller, "Hardware-in-the-loop Simulation Design for Evaluation of Unmanned Aerial Vehicle Control Systems", AIAA Modeling and Simulation Technologies Conference and Exhibit , 20 - 23 August, 2007, Hilton Head, South Carolina [5] E. N. Johnson and S. Fontaine, "Use of flight simulation to complement flight testing of low-cost UAVs", AIAA Modeling and Simulation Technologies Conference and Exhibit, Montreal, Canada, 2001 [6] MATLAB and Simulink for Technical Computing, Available from: http://www.mathworks.com [7] Oliver Nelles, "Nonlinear System Identification: From Classical Approaches to Neural Networks and Fuzzy Models, Springer www.intechopen.com System Identification of NN-based Model Reference Control of RUAV during Hover 419 [8] Cybenko, G., “Approximation by Superposition of a Sigmoidal Function, Mathematics of Control, Signals and Systems, 303-314. [9] N. K. and K. Parthasarathy, Gradient methods for the optimization of dynamical systems containing neural networks. IEEE Trans. on Neural Networks, 252-262. [10] B.G Martzios and F.L. Lewis, “An algorithm for the computation of the transfer function matrix of generalized two-dimensional systems ” Journal of Circuit, System, and Signal Processing, Volume 7, Number 4 / December, 1988 [11] Budiyono A, Sudiyanto T, Lesmana H., “First Principle Approach to Modelling of Small Scale Helicopter”, International Conference on Intelligent Unmanned System, 2007 [12] B. Mettler, T. Kanade, M.B. Tischler, "System Identification Modeling of a Model-Scale Helicopter", CMU-RI-TR-00-03. 2000. [13] E. D. Beckmann, G. A. Borges, "Nonlinear Modeling, Identification and Control for a Simulated Miniature Helicopter," Robotic Symposium. LARS’08, pp.53-58, 2008. [14] D. W. Marquardt. “An algorithm for least-squares estimation of nonlinear parameters”. SIAM Journal on Applied Mathematics, Vol. 11 No.2 pp. 431–441, 1963. [15] S. Haykin, “Neural networks: A comprehensive foundation”, IEEE Press, New York, USA, 1994 [16] K. S. Narendra and K. Parthasarathy, “Identification and control of dynamical systems using neural networks,” IEEE Transactions on Neural Networks, vol. 1, no. 1, pp. 4–27, 1990. [17] La Civita, M., G., P., Messner, W. C., and Kanade, T., “Design and Flight Testing of a High-Bandwidth H∞ Loop Shaping Controller for a Robotic Helicopter,” Proceedings of the AIAA Guidance, Navigation, and Control Conference, No. AIAA 2002-4836, 2002. [18] Sahasrabudhe, V., & Celi, R., “Improvement of off-design characteristics in integrated rotor-flight control system optimization”. AHS, annual forum 53rd Virginia Beach, VA, April 29–May 1, 1997, Proceedings. Alexandria, VA, American Helicopter Society, 1997. Vol. 1 (A97-29180 07-01). [19] Smerlas, A., Postlethwaite, I., Walker, D. J., Strange, M. E., Howitt, J., Horton, R. I., Gubbels, A. W., & Baillie, S. W. , “Design and flight testing of an H-infinity controller for the NRC Bell 205 experimental fly-by-wire helicopter. AIAA GNC conference, 1998. [20] Li-Xin Wang, “Design and analysis of fuzzy identifiers of nonlinear dynamic systems”. IEEE Transactions on Automatic Control, 40(1), 1995. [21] Shaaban A. Salman, Vishwas R. Puttige, and Sreenatha G. Anavatti, “Real-time Validation and Comparison of Fuzzy Identification and State-space Identification for a UAV Platform” Proceeding of the 2006 IEEE International Conference on Control Applications, pages 2138–2143, 2006. [22] R. Pintelon and J. Schoukens, “System Identification: A Frequency Domain Approach” Wiley-IEEE Press, 1st edition, 2001. [23] Kumpati S. Narendra and Kannan Parthasarathy, “Identification and Control of Dynamical Systems Using Neural Networks” IEEE transaction on Neural Networks, 1(1), 1990. [24] Magnus Norgaard, “Neural Network Based System Identification Tool Box”, Version 2, 2000 www.intechopen.com 420 Artificial Neural Networks - Industrial and Control Engineering Applications [25] Budiyono, A. and Sutarto, H.Y., Linear Parameter Varying Model Identification for Control of Rotorcraft-based UAV, Fifth Indonesia-Taiwan Workshop on Aeronautical Science, Technology and Industry, Tainan, Taiwan, November 13-16, 2006 [26] M. M. Korjani, O.Bazzaz, M. B. Menhaj, ”Real time identification and control of dynamics systems using recurrent neural network”, Journal of Artificial Intelligence Review, Springer, August 2009 [27] W. Yu, X. Li, “Recurrent fuzzy neural networks for nonlinear system identification”, 22nd IEEE International Symposium on Intelligent Control Part of IEEE Multiconference on Systems and Control, Singapore, 1-3 October 2007. [28] Shim D. H., Kin H. J., Sastry. “Control System Design for Rotorcraft-based Unmanned Aerial Vehicles using Time-domain System Identification”. IEEE International Conference on Control Application, 2000. pp. 808-813 www.intechopen.com
3cs.SY
Generic Program Monitoring by Trace Analysis⋆ Erwan Jahier1 and Mireille Ducassé2 arXiv:cs/0311016v1 [cs.PL] 14 Nov 2003 1 2 Vérimag, Centre Equation - 2 avenue de Vignate 38610 Gières IRISA/INSA, Campus Universitaire de Beaulieu, F-35042 Rennes cedex, France Summary. Program execution monitoring consists of checking whole executions for given properties, and collecting global run-time information. Monitoring helps programmers maintain their programs. However, application developers face the following dilemma: either they use existing monitoring tools which never exactly fit their needs, or they invest a lot of effort to implement relevant monitoring code. In this article we argue that, when an event-oriented tracer exists, the compiler developers can enable the application developers to easily code their own monitors. We propose a high-level primitive, called foldt, which operates on execution traces. One of the key advantages of our approach is that it allows a clean separation of concerns; the definition of monitors is totally distinct from both the user source code and the language compiler. We give a number of applications of the use of foldt to define monitors for Mercury program executions: execution profiles, graphical abstract views, and test coverage measurements. Each example is implemented by a few lines of Mercury. keywords: monitoring, automated debugging, trace analysis, test coverage, Mercury. 1 Introduction Program maintenance and trace analysis. Several experimental studies (e.g., [Hatton, 1997]) show that maintenance is the most expensive phase of software development: the initial development represents only 20 % of the cost, whereas error fixing and addition of new features after the first release represent, each, 40 % of the cost. Thus, 80 % of the cost is due to the maintenance phase. A key issue of maintenance is program understanding. In order to fix logical errors, programmers have to analyze their program symptoms and understand how these symptoms have been produced. In order to fix performance errors, programmers have to understand where the time is spent in the programs. In order to add new functionality, programmers have to understand how the new parts will interact with the existing ones. ⋆ This work has been partially sponsored by the Esprit project ARGO, Industrial RTD Project no 25503 2 Erwan Jahier and Mireille Ducassé Program analysis tools help programmers understand programs. For example, type checkers [Pfenning, 1992] help understand data inconsistencies. Slicing tools [Gallagher & Lyle, 1991,Tip, 1995] help understand dependencies among parts of a program. Tracers give insights into program executions [Eisenstadt & Brayshaw, 1988]. Some program analysis tools automatically analyze program execution traces. They can give very precise insights of program (mis)behavior. We have shown how such trace analyzers can help users debug their programs. In our automated debuggers, a trace query mechanism helps users check properties of parts of traced executions in order to understand misbehavior [Ducassé, 1999a,Ducassé, 1999b,Jahier & Ducassé, 1999a]. In this article, we show that trace analysis can be pushed toward monitoring to further help understand program behavior. Whereas debuggers are tools that retrieve run-time information at specific program points, monitors collect information relative to the whole program executions. For example, some monitors gather statistics which help detect heavily used parts that need to be optimized; other monitors build graphs (e.g., control flow graphs, dynamic call graphs, proof trees) that give a global understanding of the execution. Execution monitoring. Monitors are trace analyzers which differ from debuggers. Monitoring is mostly a “batch” activity whereas debugging is mostly an interactive activity. In monitoring, a set of properties is specified beforehand; the whole execution is checked; and the global collected information is displayed. In debugging, the end-user is central to the process; he specifies on the fly the very next property to be checked; each query is induced by the user’s current understanding of the situation at the very moment it is typed in. Monitoring is therefore less versatile than debugging. The properties specified for monitoring have a much longer lifetime, they are meant to be used over several executions. It is, nevertheless, impossible to foresee all the properties that programmers may want to check on executions. One intrinsic reason is that these properties are often driven by the application domain. Therefore monitoring systems must provide some genericity. Existing approaches to implement monitors. Unfortunately, monitors are generally implemented by ad hoc instrumentation. This instrumentation requires a significant programming effort. When done at a low level, for example by modifying the compiler and the runtime system, it requires deep knowledge that mostly only the language compiler implementors have. However, the monitored information is often application-dependent, and application programmers or end-users know better what has to be monitored. But instrumenting compilers is almost impossible for them. An alternative to low-level instrumentation is source-level instrumentation; run-time behavior information can be extracted by source-to-source Generic Program Monitoring by Trace Analysis 3 transformation, as done for ML [Tolmach & Appel, 1995,Kishon et al., 1991] and Prolog [Ducassé & Noyé, 2000] for instance . Such instrumentation, although simpler than low-level compiler instrumentation, can still be too complex for most programmers. Furthermore, for certain new declarative programming languages like Mercury [Somogyi et al., 1996], instrumentation may even be impossible. Indeed, in Mercury, the declarative semantics is simple and well defined, but the operational semantics is complex. For example, the compiler reorders goals according to its needs. Furthermore, input and output can be made only in deterministic predicates. This complicates code instrumentation. Thus, ad hoc instrumentation is tedious at a low level and it may be impossible at a high level. On the other hand, the difficult task of instrumenting the code to extract run-time information has, in general, already been achieved to provide a debugger. Debuggers, which help users locate faults in programs are based on tracers. These tracers generate execution traces which provide a precise and faithful image of the operational semantics of the traced language. These traces often contain sufficient information to base monitors upon them. Our Proposal. In this article, we propose a high-level primitive built on top of an event oriented execution tracer. The proposed monitoring primitive, called foldt, is a fold which operates on a list of events. An event oriented trace is a sequence of events. An event is a tuple of event attributes. An event attribute is an elementary piece of information that can be extracted from the current state of the program execution. Thus, a trace can be seen as a sequence of tuples of a database ordered by time. Many tracers are event-oriented: for example, Prolog tracers based on Byrd box model [Byrd, 1980], tracers for C such as Dalek [Olsson et al., 1990] and Coca [Ducassé, 1999a], the Egadt tracer for Pascal [Fritzson et al., 1994], the Esa tracer for Ada [Howden & Shi, 1996], and the Ebba tracer for distributed systems [Bates, 1995]. One of the key advantages of our approach is that it allows a clean separation of concerns; the definition of the monitors is totally distinct from both the user source code and the language compiler. We have implemented foldt on top of the Mercury trace. We give a number of applications of the foldt operator to compute various monitors: execution profiles, graphical abstract views, and test coverage measurements. Each example is implemented by a few lines of Mercury which can be written by any Mercury programmer. These applications show that the Mercury trace, indeed, contains enough information to build a wide variety of interesting monitors. Detailed measurements show that, under some requirements, foldt can have acceptable performance for executions of several millions of execution events. Therefore our operator lays the foundation for a generic and powerful monitoring environment. The proposed scheme has been inte- 4 Erwan Jahier and Mireille Ducassé grated into the Mercury environment. It is fully operational and part of the Mercury distribution. Note that we have implemented the foldt operator on top of Mercury mostly for historical reasons. We acknowledge that some of the monitors were particularly easy to write thanks to the neatness of Mercury libraries, in particular the set library (e.g., Figure 10). Nevertheless, foldt could be implemented for any system with an event-oriented tracer. Plan. In Section 2, we introduce the foldt operator and describe its current implementation on top of the Mercury tracer. In Section 3, we illustrate the genericity of foldt with various kinds of monitors. All the examples are presented at a level of detail that does not presuppose any knowledge of Mercury. Section 4 discusses performance issues of foldt. Section 5 compares our contribution with related work. A thorough description of the Mercury trace can be found in Appendix A. Appendix B lists a Mercury program solving the n queens problem, which is used at various places in the article as an input for our monitors. 2 A high-level trace processing operator: foldt In this section, we first define the foldt operator over a general trace in a language-independent manner. We describe an implementation of this operator for Mercury program executions, and then present its current user interface. 2.1 Language independent foldt definition A trace is a list of events; analyzing a trace therefore requires to process such a list. The standard functional programming operator fold encapsulates a simple pattern of recursion for processing lists. It takes as input arguments a function, a list, and an initial value of an accumulator; it outputs the final value of the accumulator; this final value is obtained by successively applying the function to the current value of the accumulator and each element of the list. As demonstrated by Hutton [Hutton, 1999], fold has a great expressive power for processing lists. Therefore, we propose a fold-like operator to process execution traces; we call this operator foldt. Before defining foldt, we define the notions of event and trace for sequential executions. Definition 1. (Execution event, Event attributes, Execution trace) An execution event is an element of the Cartesian product E = A1 × ... × An , where Ai for i ∈ {1, ..., n} are arbitrary sets called event attributes. An execution trace is a (finite or infinite) sequence of execution events; the set of all execution traces is denoted by T. We note |t| the size (its number of events) of a finite trace t ∈ T and |t| = ∞ the size of infinite traces. Generic Program Monitoring by Trace Analysis 5 The following definition of foldt is a predicative definition of a fold operating on a finite number of events of a (possibly infinite) trace. The set of predicates over τ1 × ... × τn is denoted by pred(τ1 , ..., τn ). Definition 2. (foldt) A foldt monitor of type τ ×τ ′ is a 3-tuple : (init, collect, post process) ∈ pred(τ ) × pred(E, τ, τ ) × pred(τ, τ ′ ) such that: ∀t = (ei )i>0 ∈ T, either n+1 (1) |t| < ∞ ∧ (∃!(V . V0n, ..., Vn ) ∈ τ (init(V0 ) i=1 collect(ei , Vi−1 , Vi ) ∧ post process(Vn , Res))) n+1 (2) ∃!n < |t|, ∃!(V0 , ..., , ∀x ∈ τ. VnVn ) ∈ τ (init(V0 ) ∧ i=1 collect(ei , Vi−1 , Vi ) ∧ post process(Vn , Res) ∧ ¬collect(en+1 , Vn , x)) Res is called the result of the monitor (init, collect, post process) on trace t. We use the notation ∃!n to mean that there exists a unique n, and (ei )i>0 for the sequence (in the mathematical sense) e1 , e2 , e3 , .... Operationally, an accumulator of type τ is used to gather the collected information. It is first initialized (V0 ). The predicate collect is then applied to each event of the trace in turn, updating the accumulator along the way (Vi ). There are two ways to stop this process: (1) the folding process stops when the end of the execution is reached if the trace is finite (|t| < ∞); (2) if collect fails before the end of the execution is reached (∀x ∈ τ. (¬collect(en+1 , Vn , x))). In both cases, the last value of the accumulator (Vn ) is processed by post process, which returns a value (Res) of type τ ′ (post process(Vn , Res)). Note that this definition holds for finite and infinite traces (thanks to the second case of Definition 2). This is convenient to analyze programs that run permanently. The ability to end the foldt process before the end of the execution is also convenient to analyze executions part by part as explained in Section 2.3. A further interesting property, which is useful to execute several monitors in a single program execution, is the possibility to simultaneously apply several fold on the same list using a tuple of fold [Bird, 1987]; in other words: foldt(i1 , c1 , p1 ) × ... × foldt(in , cn , pn ) = foldt(i1 × ... × in , c1 × ... × cn , p1 × ... × pn ) where: ∀a1 , ..., an ∈ τ1 × ... × τn , i1 × ... × in (a1 , ..., an ) ⇔ i1 (a1 ) ∧ ... ∧ in (an ), ∀e ∈ E, ∀a1 , ..., an ∈ τ1 × ... × τn , ∀a′1 , ..., a′n ∈ τ1′ × ... × τn′ , c1 × ... × cn (e, a1 , ..., an , a′1 , ..., a′n ) ⇔ c1 (e, a1 , a′1 ) ∧ ... ∧ cn (e, an , a′n ), ∀a1 , ..., an ∈ τ1 × ... × τn , p1 × ... × pn (a1 , ..., an , a′1 , ..., a′n ) ⇔ p1 (a1 , a′1 ) ∧ ... ∧ pn (an , a′n ). 6 Erwan Jahier and Mireille Ducassé 2.2 An implementation of foldt for Mercury We prototyped an implementation of foldt for the Mercury programming language. After a brief presentation of Mercury and its trace system, we describe our foldt implementation. Mercury and its trace Mercury [Somogyi et al., 1996] is a logic and functional programming language. The principal differences with Prolog are as follows. Mercury supports functions and higher-order terms. Mercury programs are free from side-effects; even input and output are managed in a declarative way. Mercury strong type, mode and determinism system allows a lot of errors to be caught at compile time, and a lot of optimizations to be done. The trace generated by the Mercury tracer [Somogyi & Henderson, 1999] is adapted from Byrd box model [Byrd, 1980]. Its attributes are the event number, the call number, the execution depth, the event type (or port), the determinism, the procedure (defined by a module name, a name, an arity and a mode number), the live arguments, the live non-argument variables, and the goal path. A detailed description of these attributes together with an example of event is given in appendix A. The foldt implementation An obvious and simple way to implement foldt would be to store the whole trace into a single list, and then to apply a fold to it. This naive implementation is highly inefficient, both in time and in space. It requires creating and processing a list of possibly millions of events. Most of the time, creating such a list is simply not feasible because of memory limitations. With the current Mercury trace system, several millions of events are generated each second, each event requiring several bytes. To implement realistic monitors, run-time information needs to be collected and analyzed simultaneously (on the fly), without explicitly creating the trace. In order to achieve analysis on the fly, we have implemented foldt by modifying the Mercury trace system, which works as follows: when a program is compiled with tracing switched on, the generated C code1 is instrumented with calls to the tracer (via the C function trace). Before the first event (resp. after the last one), a call to an initialization C function trace init (resp. to a finalization C function trace final) is inserted. When the trace system is entered through either one of the functions trace, trace init, or trace final, the very first thing it does is to look at an environment variable that tells whether the Mercury program has been invoked from a shell, from the standard Mercury debugger (mdb), or from another debugger (e.g., Morphine [Jahier & Ducassé, 1999a]). We have added a new possible value for that environment variable which indicates whether the 1 Currently, the only Mercury back-end that has a tracer is one that relies on a C compiler to produce its executable code. Generic Program Monitoring by Trace Analysis 7 program has been invoked by foldt. In that case, the trace init function dynamically links the Mercury program under execution with the object file that contains the object code of collect, initialize, and post process. Dynamically linking the program to its monitor is very convenient because neither the program nor the monitor need to be recompiled. Once the monitor object file has been linked with the program, the C function trace init can call the procedure initialize to set the value of a global variable accumulator variable (of type τ ). At each event, the C function trace calls the procedure collect which updates accumulator variable. If collect fails or if the last event is reached, the C function trace final calls the procedure post process with accumulator variable and returns the new value of this accumulator (now of type τ ′ ). 2.3 The current user interface of foldt for Mercury In this Section, we first describe what the user needs to do in order to define a monitor with foldt. Then, we show how this monitor can be invoked. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 % 1 - Define the type of the accumulator: :- type accumulator_type == < A Mercury type >. % 2 - Initialize the accumulator: initialize(Accumulator) :< Mercury goals which initialize the accumulator >. % 3 - Update the accumulator: collect(Event, AccumulatorIn, AccumulatorOut) :< Mercury goals which update the accumulator >. % 4 - Optionally, post-process the last value of the accumulator: :- type collected_type == < A Mercury type >. post_process(Accumulator, FoldtResult) :< Mercury goals which post-process the accumulator >. Fig. 1. What the user needs to define to use foldt Defining monitors We chose Mercury to be the language in which users define the foldt monitors to monitor Mercury programs. As a matter of fact, it could have been any other language that has an interface with C, since the trace system of Mercury is written in C. The choice of Mercury, however, is quite natural; people who want to monitor Mercury programs are likely to be Mercury programmers. 8 Erwan Jahier and Mireille Ducassé The items users need to implement in order to define a foldt monitor are given in Figure 1. Lines preceded by ‘%’ are comments. First of all, since Mercury is a typed language, one first needs to define the type of the accumulator variable accumulator type (line 2). Then, one needs to define initialize which gives the initial value of the accumulator, and collect which updates the accumulator at each event(line 9). Optionally, one can also define the post process predicate which processes the last value of the accumulator. post process takes as input a variable of type accumulator type (τ ) and outputs a variable of type collected type (τ ′ ). If collected type is not the same type as accumulator type, then one needs to provide its definition too (line 13). Types and modes of predicates initialize, collect and post process should be consistent with the following Mercury declarations: :- pred initialize(accumulator type::out) is det. :- pred collect(event::in, accumulator type::in, accumulator type::out) is semidet. :- pred post process(accumulator type::in, collected type::out) is det. These declarations state that initialize is a deterministic predicate (is det), namely it succeeds exactly once, and it outputs a variable of type accumulator type; collect is a semi-deterministic predicate, namely it succeeds at most once, and it takes as input an event and an accumulator. If collect fails, the monitoring process stops at the current event. This can be very useful, for example to stop the monitoring process before the end of the execution if the collecting data is too large, or to collect data part by part (e.g., collecting the information by slices of 10000 events). This also allows foldt to operate over non-terminating executions. The type event is a structure made of all the event attributes. To access these attributes, we provide specific functions which types and modes are: “:- func <attribute_name>(event::in) = <attribute_type>::out.”, which takes an event and returns the event attribute corresponding to its name. For example, the function call depth(Event) returns the depth of Event. The complete list of attribute names is given in Appendix A. Figure 2 shows an example of monitor that counts the number of predicate invocations (calls) that occur during a program execution. We first import library module int (line 1) to be able to manipulate integers. Predicate initialize initializes the accumulator to ‘0’ (line 3). Then, for every execution event, collect increments the counter if the event port is call, and leaves it unchanged otherwise (line 5). Since collect can never fail here, the calls to collect proceed until the last event of the execution is reached. Note that those five lines of code constitute all the necessary lines for this monitor to be run. For the sake of conciseness, in the following figures containing monitors, we sometimes omit the module importation directives as well as the type of the accumulator when the context makes them clear. Generic Program Monitoring by Trace Analysis 1 2 3 4 5 9 :- import_module int. :- type accumulator_type == int. initialize(0). collect(Event, C0, C) :if port(Event) = call then C = C0+1 else C = C0. Fig. 2. count call, a monitor that counts the number of calls using foldt Invoking foldt Currently, foldt can be invoked from a Prolog query loop interpreter. We could not use Mercury for that purpose because there is no Mercury interpreter yet. We have implemented a Prolog predicate named run mercury, which takes a Mercury program call as argument, and which forks a process in which this Mercury program runs in coroutining with the Prolog process. The two processes communicate via sockets. When the first event of the Mercury program is reached, the hand is given to the Prolog process which waits for a foldt query. The command foldt has two arguments; the first one should contain the name of the file defining the monitor to be run; the second one is a variable that will be unified with the result of the monitor. When foldt is invoked, (1) the file containing the monitor is used to automatically produce a Mercury module named foldt.m (by adding the declarations of initialize, collect, and post process, as well as the definitions of the event type and the attribute accessing functions); (2) foldt.m is compiled, producing the object file foldt.o; (3) foldt.o is dynamically linked with the Mercury program under coroutining. Of course, steps (1) and (2) are only performed if the file containing the monitor is newer than the object file foldt.o. A monitor stops either because the end of the execution is reached, or because the collect predicate failed; in the latter case, the current event (i.e., the event the next query will start at) is the one occurring immediately after the event where collect failed. [morphine]: run_mercury(queens), foldt(count_call, Result). A 5 queens solution is [1, 3, 5, 2, 4] Last event of queens is reached Result = 146 More? (;) [morphine]: Fig. 3. Invoking foldt monitor of Figure 2 from an interpreter A possible session for invoking the monitor of Figure 2 is given in Figure 3. At the right-hand side of the ‘[morphine]:’ prompt, there are the characters 10 Erwan Jahier and Mireille Ducassé typed in by a user. The line in italic is output by the Mercury program; all the other lines are output by the Prolog process. We can therefore see that the program queens (which solves the 5 queens problem, cf Appendix B) produces 146 procedure calls. Illustration of the advantage of calling foldt from a Prolog query loop Being able to call foldt from a Prolog interpreter loop enables users to write scripts that control several foldt invocations. Figures 4 and 5 illustrate this. The monitor of Figure 4 computes the maximal depth for the next 500 events. In the session of Figure 5, a user (via the [user]. directive) defines the predicate print max depth that calls the monitor of Figure 4 and prints its result in loop until the end of the execution is reached. This is useful for example for a program that runs out of stack space to check whether this is due to a very deep execution and to know at which events this occurs. Note that the fact that the monitor is dynamically linked with the monitored program has an interesting side-effect here: one can change the monitor during the foldt query resolution (by modifying the file where this monitor is defined). Indeed, in our example, one could change the interval within which the maximal depth is searched from 500 to 100. The monitor would be (automatically) recompiled, but the foldt query would not need to be killed and rerun. This can be very helpful to monitor a program that runs permanently; the monitored program is simply suspended while the monitor is recompiled. 1 2 3 4 initialize(acc(0, 0)). collect(Event, acc(N0, D0), acc(N0+1, max(D0, depth(Event)))) :N0 < 500. % stops after 500 events Fig. 4. Monitor that computes the maximal execution depth by interval of 500 events As a matter of fact (as the prompt suggests), the Prolog query loop that we use is Morphine [Jahier & Ducassé, 1999a], an extensible debugger for Mercury “à la Opium” [Ducassé, 1999b]. The basic idea of Morphine is to build on top of a Prolog query loop a few coroutining primitives connected to the trace system (like foldt). Those primitives let one implement all classical debugger commands as efficiently as their hand-written counter-parts; the advantage is, of course, that they let users implement more commands than the usual hard-coded ones, fitting their own needs. Invoking foldt from a debugger has a further advantage; it makes it very easy to call a monitor during a debugging session, and vice versa. Indeed, Generic Program Monitoring by Trace Analysis 11 [morphine]: [user]. print_max_depth :foldt(max_depth, acc(_, MaxDepth)), print("The maximal depth is "), print(MaxDepth), nl, print_max_depth. ^D [morphine]: run_mercury(qsort), print_max_depth. The maximal depth is 54 The maximal depth is 28 The maximal depth is 50 [0, 2, 4, 6, 7, 8, ..., 94, 95, 99, 99] Last event of qsort is reached The maximal depth is 53 [morphine]: Fig. 5. A possible session using the monitor of Figure 4 some monitors are very useful for understanding program runtime behavior, and therefore can be seen as debugging tools. 3 Applications In this section, we describe various execution monitors that can be implemented with foldt. We first give monitors which compute three different execution profiles: number of events at each port, number of goal invocations at each depth, and sets of solutions. Then, we describe monitors that produce two types of execution graphs: dynamic control flow graph and dynamic call graph. Finally, we introduce two test coverage criteria for logic programs, and we give the monitors that measure them. 3.1 Execution profiles Counting the number of events at each port In Figure 2, we have given a monitor that counts the number of goal invocations. Figure 6 shows how to extend this monitor to count the number of events at each port. We need 5 counters that we store in an array. In the current implementation of foldt, the default mode of the second and third argument of collect, respectively equal to in and out, can be overridden; here, we override them with array di and array uo (lines 4 and 5). Modes array di and array uo are special modes that allow arrays to be destructively updated. Predicate initialize creates an array Array of size 5 with each element initialized to 0 (line 8). Predicate collect extracts the port from the cur- 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Erwan Jahier and Mireille Ducassé :- import_module int, array. :- type accumulator_type == array(int). :- mode acc_in :: array_di. :- mode acc_out :: array_uo. initialize(Array) :init(5, 0, Array). collect(Event, Array0, Array) :Port = port(Event), port_to_int(Port, IntPort), lookup(Array0, IntPort, N), set(Array0, IntPort, N+1, Array). :- pred port_to_int(port::in, int::out) is det. port_to_int(Port, Number) :( if Port = call then Number = 0 else if Port = exit then Number = 1 else if Port = redo then Number = 2 else if Port = fail then Number = 3 else Number = 4 ). Fig. 6. A monitor that counts the number of events at each port rent event (line 11) and converts it to an integer (line 12)2 . This integer is used as an index to get (lookup/3) and set (set/4) array values. The goal lookup(Array0, IntPort, N) returns in N the IntPortth element of Array0. The goal set(Array0, IntPort, N+1, Array) sets the value N+1 in the IntPortth element of Array0 and returns the resulting array in Array. Counting the number of calls at each depth Figure 7 implements a monitor that counts the number of calls at each depth. Predicate initialize creates an array of size 32 with each element initialized to 0 (line 4). At call events (line 7), predicate collect extracts the depth from the current event (line 8) and increments the corresponding counter (lines 10 and 14). Whenever the upper bound of the array is reached, i.e., whenever semidet lookup/4 fails (line 9), the size of the array is doubled (lines 13). Collecting solutions The monitor of Figure 8 collects the solutions produced during the execution. We define the type solution as a pair containing a procedure and a list of arguments (line 1). The collected variable is a list 2 As a matter of fact, there are more ports than the ones handled by port to int/2 in Figure 6 (cf Appendix A); we ignore them here for the sake of conciseness. Generic Program Monitoring by Trace Analysis 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 % Module importation and accumulator type (array of int) omitted initialize(Acc) :init(32, 0, Acc). collect(Event, Acc0, Acc) :( if port(Event) = call then Depth = depth(Event), ( if semidet_lookup(Acc0, Depth, N) then set(Acc0, Depth, N+1, Acc) else size(Acc0, Size), resize(Acc0, Size*2, 0, Acc1), set(Acc1, Depth, 1, Acc) ) else Acc = Acc0 ). Fig. 7. A monitor that counts the number of calls at each depth 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 :- type solution ---> proc_name/arguments. :- type accumulator_type == list(solution). initialize([]). collect(Event, AccIn, AccOut) :( if port(Event) = exit, Solution = proc_name(Event)/arguments(Event), not(member(Solution, AccIn)) then AccOut = [Solution | AccIn] else AccOut = AccIn ). Fig. 8. A monitor that collects all the solutions 13 14 Erwan Jahier and Mireille Ducassé of solutions (line 2), which is initialized to the empty list (line 4). If the current port is exit (line 8) and if the current solution has not been already produced (lines 9,10), then the current solution is added to the list of already collected solutions (line 12). Note that for large programs, it would be better to use a table from predicate names to set of solutions instead of lists. 3.2 Graphical abstract views Other execution abstract views that are widely used and very useful in terms of program understanding are given in terms of graphs. In the following, we show how to implement monitors that generate graphical abstractions of program executions such as control flow graphs and dynamic call graphs. We illustrate the use of these monitors by applying them to the 5 queens program given in Appendix B. This 100 line program generates 698 events for a board of 5 × 5. In this article, we use the graph drawing tool dot [Koutsofios & North, 1991]. More elaborated visualization tools such as in [Stasko et al., 1998] would be desirable, especially for large executions. This is, however, beyond the scope of this article. user/0 main/2 data/1 queen/2 print_list/3 print_list_2/3 qperm/2 safe/1 qdelete/3 nodiag/3 Fig. 9. The dynamic control flow graph of 5 queens Dynamic control flow graphs We define the dynamic control flow graph of a logic program execution as the directed graph where nodes are predicates Generic Program Monitoring by Trace Analysis 15 of the program, and arcs indicate that the program control flow went from the origin to the destination node. The dynamic control flow graph of the 5 queens program is given in Figure 9. We can see, for example, that, during the program execution, the control moves from predicate main/2 to predicate data/1, from predicate data/1 to predicate data/1 and predicate queen/2. Note that such a graph (or variants of it) is primarily useful for tools and only secondarily for humans. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ::::- type type type type predicate ---> proc_name/arity. arc ---> arc(predicate, predicate). graph == set(arc). accumulator_type ---> collected_type(predicate, graph). initialize(collected_type("user"/0, set__init)). collect(Event, Acc0, Acc) :Port = port(Event), ( if (Port = call ; Port = exit ; Port = fail ; Port = redo) then Acc0 = collected_type(PreviousPred, Graph0), CurrentPred = proc_name(Event) / proc_arity(Event), Arc = arc(PreviousPred, CurrentPred), set__insert(Graph0, Arc, Graph), Acc = collected_type(CurrentPred, Graph) else % other events Acc = Acc0 ). Fig. 10. A monitor that calculates dynamic control flow graphs An implementation of a monitor that produces such a graph is given in Figure 10. Graphs are encoded by a set of arcs, and arcs are terms composed of two predicates (lines 1 to 3). The collecting variable is composed of a predicate and a graph (line 4); the predicate is used to remember the previous node. The collecting variable is initialized with the fake predicate user/0, and the empty graph (line 6). At call, exit, redo, and fail events (line 10), we insert in the graph an arc from the previous predicate to the current one (lines 11 to 14). Note that in our definition of dynamic control flow graph, the number of times each arc is traversed is not given. Even if the control goes between two nodes several times, only one arc is represented. One can imagine a variant where, for example, arcs are labeled by a counter; one just needs to use multi-sets instead of sets. The result of such a variant applied to the 5 queens program is displayed Figure 11. Note that here, the queens program was linked with a version of the library that has been compiled without trace 16 Erwan Jahier and Mireille Ducassé user/0 1 main/2 1 data/1 1 1 1 queen/2 1 print_list/3 1 1 1 1 print_list_2/3 11 9 safe/1 17 qperm/2 126 10 47 8 47 qdelete/3 117 17 nodiag/3 63 Fig. 11. The dynamic control flow graph of 5 queens annotated with counters information. This is the reason why one should not be surprised not to see any call to, e.g, io write string/3 in this figure. Dynamic call graphs A static call graph of a program is a graph where the nodes are labeled by the predicates of the program, and where arcs between nodes indicate potential predicate calls. We define the dynamic call graph of a logic program execution as the sub-graph of the (static) call graph composed of the arcs and nodes that have actually been traversed during the execution. For example, in Figure 12, we can see that predicate main/2 calls predicates data/1, queen/2, and print list/2. In this particular example, the static and dynamic call graphs are identical. An implementation of a monitor that builds the dynamic call graphs is given in Figure 13. In order to define this monitor, we use the same data structures as for the previous one, except that we replace the last traversed predicate by the whole call stack in the collected variable type (line 2). This stack is necessary in order to be able to get the direct ancestor of the current predicate. The set of arcs is initialized to the empty set (lines 4) and the stack is initialized to a stack that contains a fake node user/0 (line 5). In order Generic Program Monitoring by Trace Analysis 17 user / 0 main / 2 queen / 2 safe / 1 qperm / 2 nodiag / 3 qdelete / 3 print_list / 3 data / 1 print_list_2 / 3 Fig. 12. The dynamic call graph of 5 queens 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 % Definition of pred, arc, and graph types omitted (cf previous monitor) :- type accumulator_type ---> ct(stack(predicate), graph). initialize(ct(Stack, set__init)) :stack__push(stack__init, "user"/0, Stack). collect(Event, ct(Stack0, Graph0), Acc) :Port = port(Event), CurrentPred = proc_name(Event) / proc_arity(Event), update_call_stack(Port, CurrentPred, Stack0, Stack), ( if Port = call then PreviousPred = stack__top_det(Stack0), set__insert(Graph0, arc(PreviousPred, CurrentPred), Graph), Acc = ct(Stack, Graph) else Acc = ct(Stack, Graph0) ). :- pred update_call_stack(trace_port_type::in, predicate::in, stack(predicate)::in, stack(predicate)::out) is det. update_call_stack(Port, CurrentPred, Stack0, Stack) :( if ( Port = call ; Port = redo ) then stack__push(Stack0, CurrentPred, Stack) else if ( Port = fail ; Port = exit ; Port = exception ) then stack__pop_det(Stack0, _, Stack) else % other events Stack = Stack0 ). Fig. 13. A monitor that computes dynamic call graphs 18 Erwan Jahier and Mireille Ducassé to construct the set of arcs, we insert at call events an arc from the previous predicate to the current one (line 12). The call stack is maintained on the fly by the update call stack/4 predicate; the current predicate is pushed onto the stack at call and redo events (line 22), and popped at exit, fail, and exception events (line 24). The result of the execution of this monitor applied to the 5 queens program is displayed in Figure 12. Note that the call stack is actually available in the Mercury trace. We have intentionally not use it here for didactical purpose in order to demonstrate how this information can easily (but not cheaply!) be reconstructed on the fly. 3.3 Test coverage In this section, we define two notions of test coverage for logic programs, and we show how to measure the corresponding coverage rate of Mercury program executions using the foldt primitive. The aim here is not to provide the ultimate definition of test coverage for logic programs, but rather to propose two possible definitions, and to show how the corresponding coverage rate measurements can be quickly prototyped. As a consequence, the proposed monitors cannot pretend to be optimal either in functionality, or in implementation. Test coverage and logic programs The aim of test coverage is to assess the quality of a test suite. In particular, it helps to decide whether it is necessary to generate more test cases or not. For a given coverage criterion, one can decide to stop testing when a certain percentage of coverage is reached. The usual criterion used for imperative languages are instruction and branch criteria [Beizer, 1990]. The instruction coverage rate achieved by a test suite is the percentage of instructions that have been executed. The branch coverage rate achieved by a test suite is the percentage of branches that have been traversed during its execution. One of the weaknesses of instruction and branch coverages is due to Boolean expressions. The problem occurs when a Boolean expression is composed by more than one atomic instruction: it may be that a test suite covers each value of the whole condition without covering all values of each atomic part of the condition. For example, consider the condition ‘A or B’ and a test suite where the two cases ‘A = true, B = f alse’ and ‘A = f alse, B = f alse’ are covered. In that case, every branch and every instruction is exercised, and nevertheless, B never succeeded. If B is erroneous, even 100% instruction and branch coverage will miss it. Whereas in imperative programs, you get conditional branches only in the conditions of if-then-else and loops, in logic programs you get them at every unification and call (whose determinism allows failure); therefore this issue is crucial for logic programs. Generic Program Monitoring by Trace Analysis 19 Predicate coverage In order to address the above problem, we need a coverage criterion that checks that each single predicate defined in the tested program succeeds and fails a given number of times. But we do not want to expect every predicate to fail because some, like printing predicates, are intrinsically deterministic. Therefore, we want a criterion that allows the test designer to specify how many times a predicate should succeed and fail. Therefore we define a predicate criterion as a pair composed of a predicate and a list of exit and fail. In the case of Mercury, we can take advantage of the determinism declaration to automatically determine if a predicate should succeed and fail. Here is an example of predicate criterion that can be automatically defined according to the determinism declaration of each predicate: ‘det’ predicates: 1 ‘semidet’ predicates: 1 ‘multi’ predicates: 2 ‘nondet’ predicates: 2 success success, 1 failure successes successes, 1 failure Then, we define the predicate coverage rate of a logic program test suite as the percentage of program predicate criteria that are covered during the execution of the suite. To compute that rate, one just needs to look at exit and fail events to see which criterion is covered. Figure 14 shows a foldt monitor that measures the predicate coverage rate of the queens program. The accumulator variable is a table (map) from procedure name to predicate criterion (line 2). A predicate criterion is represented by a list of exit and fail events; the type pred crit also contains a list of call numbers (line 1), initially empty (lines 6 to 14). They are used to remember encountered exits (lines 37 to 43). Indeed, if an execution produces two exit events for a predicate, it does not mean that a given call of this predicate has succeeded twice; it can be due to another call, for example recursive. Hence, we can remove an exit atom from the list of ports to be covered only if, either it is the first time the predicate exits (line 24), or if the current call number has been encountered before (line 28). Symmetrically, since all multi and nondet predicates that are called end up with a fail event, a failure can be considered as covered only if no exit events occurred for the current call number before (lines 24 and 30). The current distribution of Morphine3 have support to automatically generate such monitors, run them, and compute the coverage percentage. Monitors are generated by parsing the source files in order to get the procedure determinisms that are necessary to be able to produce the right number of exit and fail atoms. 3 cf the file extras/morphine/source/generate pred cov.m and the pred cov Morphine command (both in extras.tgz available on the Mercury ftp and web sites). 20 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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 Erwan Jahier and Mireille Ducassé :- type pred_crit ---> pc(list(call_number), list(port)). :- type accumulator_type == map(proc_name, pred_crit). initialize(Map) :map__init(Map0), map__det_insert(Map0, map__det_insert(Map1, map__det_insert(Map2, map__det_insert(Map3, map__det_insert(Map4, map__det_insert(Map5, map__det_insert(Map6, map__det_insert(Map7, map__det_insert(Map8, "main", pc([], [exit]), Map1), "data", pc([], [exit]), Map2), "print_list", pc([], [exit]), Map3), "print_list_2",pc([], [exit]), Map4), "safe", pc([], [exit,fail]), Map5), "nodiag", pc([], [exit,fail]), Map6), "qperm", pc([], [exit,exit,fail]), Map7), "qdelete",pc([], [exit,exit,fail]), Map8), "queen", pc([], [exit,exit,fail]), Map). collect(Event, Map0, Map) :Port = port(Event), Proc = proc_name(Event), CallN = call(Event), ( if (Port = exit ; Port = fail), pc(CNL0, PL0) = map__search(Map0, Proc) then ( if CNL0 = [] then remove_port(Port, PL0, PL) else if member(CallN, CNL0) then (if Port = exit then remove_port(exit, PL0, PL) else PL = PL0) else % not member(CallN, CNL0) and not (CNL0 = []) (if Port = exit then PL = PL0 else remove_port(fail, PL0, PL)) ), ( if PL = [] then map__delete(Map0, Proc, Map) else ( if Port = exit, not member(CallN, CNL0) then CNL = [CallN | CNL0] else CNL = CNL0 ), map__update(Map0, Proc, pc(CNL, PL), Map)) else Map = Map0 ). :- pred remove_port(port::in, list(port)::in, list(port)::out) is det. remove_port(Port, L0, L) :if list__delete_first(L0, Port, L1) then L = L1 else L = L0. :- type collected_type == assoc_list(proc_name, pred_crit). post_process(Map, AssocList) :- map__to_assoc_list(Map, AssocList). Fig. 14. A monitor that measures the predicate coverage rate of the n queens program Generic Program Monitoring by Trace Analysis 21 Call site coverage The previous coverage criterion only checks that at least one exit for each predicate is covered. The problem is that 100% predicate coverage does not imply 100% instruction nor branch coverage. To ensure 100% instruction and branch coverage, we need a criterion that ensures that every predicate invocation in the program succeeds and fails. Hence we need a definition attached to call sites (or goals) and not only to predicates. To achieve that, we just need, for example, to take advantage of line numbers and having a table from procedure names and line numbers to list of ports as accumulator. The monitor that measures call site coverage rate of Mercury program executions is therefore roughly the same as the one given in Figure 14, where the accumulator type becomes: :- type proc ---> p(declared_module_name, proc_name, line_number). :- type call_site_crit ---> csc(list(call_number), list(port)). :- type accumulator_type == map(proc, call_site_crit). Here again, such monitors are generated automatically parsing the source files4 . 4 Experimental Evaluation In the previous section we have shown the flexibility and power of the foldt primitive. The aim of this section is to assess the performance of the current foldt implementation. When executing a monitor, some time is spent in the normal program execution (Tprog ); and some extra time is spent in the trace system of Mercury (∆trace ), in the interface between the tracer and the foldt mechanism 5 (∆inte ), in the basic foldt mechanism (∆f oldt ), and also in the monitor itself (∆<monitor> ). Hence, if we call T the execution time of a monitored program, we have: T = Tprog + ∆trace + ∆inte + ∆f oldt + ∆<monitor> In the following, we measure: Tprog , Ttrace = Tprog + ∆trace , Tinte = Tprog + ∆trace + ∆inte , and Tf oldt = Tprog + ∆trace + ∆inte + ∆f oldt . We compare Ttrace , Tinte , and Tf oldt against Tprog . We will therefore compute the following ratios: Rt = Ttrace /Tprog , 4 5 Ri = Tinte /Tprog and Rf = Tf oldt /Tprog cf the file extras/morphine/source/generate call site cov.m and the call site cov Morphine command. The Mercury predicate collect is called from the Mercury tracer which is written in C. 22 Erwan Jahier and Mireille Ducassé 4.1 Methodology Hardware and software. The measurements given in the following show the results of experiments run on a DELL inspiron 7500, with a 433 MHz Celeron, 192 Mb of RAM, running under the Linux 2.2.14 operating system. The machine was very lightly loaded; no X server, no network, simply the basic operating system and a Prolog process in a console to run the measurement scripts. The Prolog system is Eclipse 4.1 [Eclipse, 1999]. The Mercury compiler is a stable snapshot of 14 June 20016. The results are consistent with experiments run on a SUN Sparc Enterprise 250 (2 x UltraSPARC-II, 296MHz, 512 Mb of RAM) running Solaris 2.7 (figures not given here). Time measuring command. In order to measure the program execution times, we use the benchmark det predicate of the benchmarking.m Mercury standard library. This predicate repeats the body of a program any given number of times. This is very important for small programs, as the startup cost very often dominates the execution cost. In the following experiments, each program is re-executed until it runs at least for 20 seconds. Each experiment has been done five times, and the deviation was smaller than 1 %. Monitored programs. The monitored programs are the Mercury benchmark suite7 , composed of programs adapted from the Prolog benchmark suite of [Van Roy & Despain, 1992]. In order to have a wider range of execution sizes, we also measure n queens for n=10,11, as well as mastermind, a 1100 lines Mercury program which solves a mastermind game8 . Mercury compilation grades. In the following, the compilation grade gnt refers to Mercury modules compiled with the command mmc --grade asm fast.gc.picreg, which means that no trace event is generated. It is the grade used to measure the plain execution time of programs (Tprog ). The compilation grade gt refers to Mercury modules compiled with mmc --grade asm fast.gc.picreg --trace deep --trace-optimized, which means that all events related to all the predicates of the module, except library predicates, are generated. This grade is used in the following to measure the time spent in the basic trace system (Ttrace ), the time spent in the interface between the basic tracer and the foldt mechanism (Tinte ), the time spent in the basic foldt mechanism (Tf oldt ) and the time spent in the monitors (T<monitor> ). 6 7 8 The last official release is numbered 0.10.1 The source code of this benchmark suite can be found on the Mercury ftp site ftp://www.mercury.cs.mu.oz.au/pub/mercury/mercury-tests-*.tar.gz The full source code of the Mercury mastermind program can be found at first author web site Generic Program Monitoring by Trace Analysis 23 Measuring Tprog . If the programs are compiled in grade gnt , then their execution does not produce any trace and their measured execution duration (Tmeasured ) is exactly Tprog . Tprog = Tmeasured if compilation grade is gnt Measuring Ttrace . If the programs are compiled in grade gt , then their execution calls the Mercury tracer. In order to measure the cost of the basic tracer, we have to ensure that the tracer is systematically called at each event, but that it does not do anything else than entering and exiting the top-level switch of the trace system. Ttrace = Tmeasured if compilation grade is gt and ∆inte = 0, ∆f oldt = 0, and ∆<monitor> = 0 In order to ensure that ∆inte = 0, ∆f oldt = 0 and ∆<monitor> = 0, we use the continue command of the Mercury tracer without specifying any break-point. Indeed, with that command, at each event, the trace system is entered; if the event does not correspond to one of the specified breakpoints, the normal execution is resumed. In our measurements, as no break-point is specified, the whole execution is traversed, and nothing is executed but the basic tracing mechanism. Measuring Tinte . In order to measure the cost of the interface between the basic tracer and the foldt mechanism, we have to ensure that the tracer is systematically called at each event, that it enters and exits the top-level switch of the trace system, that it prepares the context to call the collect predicate defined for the monitor, but that it does not compute anything else, in particular it should not retrieve any event attribute. Tinte = Tmeasured if compilation grade is gt and ∆f oldt = 0, and ∆<monitor> = 0 In order to ensure that ∆f oldt = 0, we have implemented a degenerate foldt such that no event attribute is computed (we have replaced these computations by void values). In order to ensure that ∆<monitor> = 0, we use a monitor that does not compute anything (collect( E, A, A).). Measuring Tf oldt . In order to measure the cost of the basic foldt mechanism, we have to ensure that collect is called at each event for a monitor that computes nothing. Tf oldt = Tmeasured if compilation grade is gt and ∆<monitor> = 0 In order to make sure that ∆<monitor> = 0, we call foldt with a trivial monitor, that does not compute anything (collect( E, A, A).). 24 Erwan Jahier and Mireille Ducassé Two of the current attributes are very costly to retrieve: the live arguments and the line number. The live arguments can be very large data structures. The line number corresponds to the line where the goal is called and not where the predicate is defined. It is dynamically retrieved. Many interesting monitors can be run without these attributes. Indeed, for the monitors we propose in this article, only one monitor uses the live arguments and one monitor uses the line number. Monitors that do not use these costly attributes can disable them. As a consequence, the measurements of Tf oldt are made with these two attributes disabled. 4.2 Resulting table Table 1. Cost of the foldt mechanisms on benchmarks. Ttrace = Tprog + ∆trace , Tinte = Tprog + ∆trace + ∆inte , Tf oldt = Tprog + ∆trace + ∆inte + ∆f oldt , Rt = Ttrace /Tprog , Ri = Tinte /Tprog , Rf = Tf oldt /Tprog , Rf∗ = (Tf oldt − ∆inte )/Tprog program events Tprog Ttrace Rt in ms in ms Tinte Ri in ms Tf oldt Rf Rf∗ in ms queens-5 698 0.03 0.24 7.5 2 61.5 2.07 63 9.5 query 935 0.09 0.28 3 1.53 16.5 1.58 17 3.5 deriv 1,540 0.05 0.11 2.5 0.64 14 0.66 14.5 3 qsort 1,564 0.1 0.48 5 4.03 42 4.16 43.5 6.5 nrev 1,619 0.14 0.54 4 4.44 32.5 4.58 33.5 5 primes 2,192 0.21 0.8 4 6.23 30 6.51 31 5.5 cqueens 3,789 0.14 1.26 9.5 11.11 81 11.39 82 11.5 crypt 4,602 0.72 1.8 3 11.16 16 11.54 16.5 3.5 poly 79,070 6.44 29 4.5 226.2 35.5 233.4 36.5 6 tak 190,831 3.88 57.1 15 553.7 142 572.4 148 20 queens-10 4,289,986 257 1530 6 12760 50.5 13200 51.5 8 mastermind 9,106,510 3630 6500 2 30490 31520 9 2.5 32,384,320 2103 12030 6 97010 46.5 100190 48 7.5 queens-11 8.5 Table 1 illustrates the cost of the basic tracer, the cost of the interface between the tracer and foldt, as well as the cost of foldt on the benchmark programs described in the previous sections. The first column contains the names of the monitored programs. The second column contains the numbers Generic Program Monitoring by Trace Analysis 25 of execution events generated by the program executions compiled in grade gt (all events are generated, except events relative to library predicates). The programs are sorted wrt this number of events, from queens-5, 698 events, to queens-11, more than 32 millions of events. The third column contains the execution times of the programs compiled without any trace information (Tprog ). The fourth column contains the execution times of the programs compiled in grade gt and run under the control of the tracer without tracing anything (Ttrace = Tprog + ∆trace ). The fifth column contains the overhead factor of the basic trace mechanism (Rt = Ttrace /Tprog ). The sixth column contains the execution times of the programs compiled in grade gt and run under the control of the tracer, and where the degenerate foldt is called with an empty monitor (Tinte = Tprog + ∆trace + ∆inte ). The seventh column contains the overhead factor of the trace and the interface between the tracer and foldt (Ri = Tinte /Tprog ). The eighth column contains the execution time of the programs compiled in grade gt and run under the control of foldt with an empty monitor (Tf oldt = Tprog +∆trace +∆inte +∆f oldt ). The ninth column contains the overhead factor of the trace, the interface and the basic foldt mechanism (Rf = Tf oldt /Tprog ). The tenth column contains the overhead factor of the trace and the basic foldt mechanism, with the interface cost divided (Rf∗ oldt = (Tf oldt − ∆inte )/Tprog ). The time measurements have been rounded off two digits after the dot. The ratios have been rounded up to the nearest half. 4.3 Discussion In this section, we discuss the resulting ratios of Table 1. Two extremes: tak and mastermind. The tak program has ratios much higher than the other programs. The tracer overhead is already 15, the interface overhead is 142 and the foldt overheads are 148 and 20. This program is actually a single predicate four times recursive. It already broke the stacks of the reference tracer used in [Ducassé & Noyé, 2000]. This code is an extreme case to test compiler optimization capabilities. As many optimizations, such as last call optimization, cannot be applied to traced code, the better the compiler is, the worse debugger and monitor ratios look. Program Tak is very untypical of real life programs. The ratios related to tak are not taken into account in the averages given below. On the other hand mastermind has very low ratios. The tracer overhead is 2, the interface overhead is 8.5 and the foldt overheads are 9 and 2.5. The mastermind program uses a lot of library predicates which are not traced9 and monitored in detail. This is typical of real life programs. It is encouraging that the more realistic program has the best ratios. However, the other benchmarks do not use untraced libraries, in order to be fair, the ratios related to mastermind are not taken into account in the averages given below. 9 their calls and exits are traced, but not what happens inside these calls 26 Erwan Jahier and Mireille Ducassé In the following, averages are, thus, computed without the figures related to tak and mastermind. The ratios are not correlated with the number of events. Program queens-5, which has only 698 events, has very bad ratios, whereas crypt, almost five thousand events, and poly, almost eighty thousand events, have better ratios than the average. The same program, n queens, run for n= 5,10 and 11, always has comparable ratios. This seems to indicate that the overheads depend mostly of the monitored program and is somewhat constant for a given program. Overhead of the tracer. The average of the tracer overhead is 5. It is a very good ratio. Prolog tracers can easily have an overhead over 20 [Ducassé & Noyé, 2000]. A low ratio for the tracer is, of course, a good starting point to build efficient generic monitors. Overhead of the interface between the tracer and foldt. The average of the interface overhead is 39. This is very high and it is the main source of inefficiency of our current implementation. It illustrates how crucial the implementation of this interface is for efficient generic monitoring. The problems comes from the fact that the monitor programs have to be integrated in the tracer. In our particular case, the Mercury predicate collect is called from the Mercury tracer which is written in C. In order to call Mercury code from C with the current (low-level back-end of the) Mercury compiler, machine registers need to be saved and restored. Since the collect predicate is called several million times, this has a noticeable influence on the performance. A way to remove this overhead could be to use the new MLDS back-end of the Mercury compiler, which generates high-level C code that does not use machine registers; unfortunately, the trace system is not supported for the MLDS back-end at the time of this writing. Once the MLDS Mercury back-end is available, calling the collect predicate will actually be compiled as a simple C procedure call from within C code. The overhead of the interface between the tracer and foldt should thus become smaller. One important lesson learned from these measurements is as follows. Whether the monitors and the tracer are implemented in the same programming language or not, the integration of the compiled monitors should not cost more than a procedure call. The monitors must therefore be compiled into the same target language as the tracer. Furthermore, no run-time verifications should be made. The monitors should therefore have no side-effect on the traced execution. It should thus be statically checked that monitors only update their own (fresh) variables. Overhead of foldt. The average of the foldt overhead is 40. Most of it is due to the overhead of the interface discussed above. Assuming that the above Generic Program Monitoring by Trace Analysis 27 fix could be done and that the interface overhead indeed becomes negligible, we have computed an ideal ratio: Rf∗ = (Tf oldt − ∆inte )/Tprog . The average of the overhead of foldt without the interface cost is 6.5. As the average of the tracer overhead is 5, we can say that the foldt overhead is acceptable. In the context of Mercury, this is especially true because the developers of Mercury claim that Mercury programs executed in trace mode are faster than the equivalent Prolog programs executed in optimized mode in the faster Prolog systems [Somogyi & Henderson, 1999]. Unused event attributes. As already mentioned, some attributes can be very costly to compute. When they are not needed it should be possible to disable them. In the current implementation of foldt, this is already the case for the list of live arguments and the line numbers. The foldt overhead has been measured without the cost of the live arguments and the line numbers. Some measurements, not reported here, showed that this has an impact on the performance. Granularity of the instrumentation. In order to measure the worst case, we have made the Mercury tracer systematically generate all the possible events. Not all monitors need such a fine-grained instrumentation. For example, for the monitor that counts the number of events at each depth, only call events are necessary. When one (hard-)codes a specific monitor, one only instruments the code where it is necessary. As a matter of fact, the Mercury tracer enables users to specify what type of events, if any, should be generated for a given module (the only restriction is that, if some events are generated for a predicate, call events must be present). Hence, programmers can already take advantage of this possibility to optimize their monitor. As further work, we plan to automate this optimization, namely, to automatically generate the appropriate compiling option for a given monitor. Conclusion on performance. The cost of monitors is generally superseded by the cost of the foldt mechanism, except for time demanding monitors such as the one that computes dynamic call graphs and coverage rates for which we have yet another slowdown of a factor ranging from 1.5 to 5. Hence, our conclusion is that with a fast tracer, an interface between the tracer and foldt reduced to procedure calls, and the possibility to disable the computation of heavy non-necessary attributes, generic monitoring can be efficient enough. 5 Related work Programmable debuggers. We designed 3 programmable debuggers, Opium for Prolog [Ducassé, 1999b], Coca for C [Ducassé, 1999a] and Morphine for Mercury [Jahier & Ducassé, 1999a]. They are based on a Prolog query loop plus a handful of coroutining primitives connected to the trace system. Those 28 Erwan Jahier and Mireille Ducassé primitives allow a Prolog system to communicate with the debugged program. Opium, Coca and Morphine are full debugging programming languages in which all classical debuggers commands can be implemented straightforwardly and efficiently. However, their set of primitives are not well suited for monitoring. All the monitors implemented with foldt can easily be implemented with the debugger set of primitives [Jahier & Ducassé, 1999b], but resulting monitors require too many context switches and too much socket traffic between the program and the monitor. With programs of several million execution events, such monitors can be four orders of magnitude slower than their counterparts that use foldt [Jahier, 2000a]. Automated development of monitors. Jeffery et al. designed the Alamo system [Templer & Jeffery, 1998,Jeffery et al., 1998,Jeffery, 1999], that aims at easing the development of monitors for C programs. As in our approach, their monitoring architecture is based on event filtering, and monitors can be programmed. Their system performs trace extraction whereas we rely on an already available tracer; this saves us a tedious task which has already been done and optimized. On the other hand, we do not have the full control of the information available in the trace. Note however that, so far, we have be able to reconstruct missing information, for example the call stack of Figure 13. Moreover, to avoid code explosion, Jeffery et al. perform part of the event filtering at compilation time. This means that they need to recompile the program each time they want to execute another monitor, whereas we only need to dynamically link the monitor to the monitored program. Alamo and the monitored program are running in coroutining, but within the same address space. Eustace and Srivastava developed Atom [Eustace & Srivastava, 1995], a system that also aims at easing the implementation of monitors. The difference with Alamo is that monitors are implemented with procedure calls and global variables which is much more efficient than coroutining. However, the language provided by Atom is less expressive than the Alamo’s. Alamo and Atom have influenced the design of foldt and we tried to take the best of both: a full and high-level programming language implemented by procedure calls. The advantages of our architecture over [Eustace & Srivastava, 1995] and [Jeffery et al., 1998] are the following: • A higher level interface makes the code of our monitors compact, easy to write and read, and therefore to maintain. Of course, this point is difficult to assess. We hope that the numerous and various examples given in Section 3 convince the reader that it is indeed the case. Nonetheless, we see three conjectures explaining why the code is more compact and more elegant. Firstly, users do not have to deal with code instrumentation directives; the instrumentation has already been done. Secondly, we take advantage of the expressive power of fold; using high order predicates such as fold for processing lists has proven to be con- Generic Program Monitoring by Trace Analysis 29 cise and far less prone to error than processing lists manually. A third reason is that our monitors are written in Mercury, which is a considerably higher level language than C or C-like languages which are used in [Eustace & Srivastava, 1995,Jeffery et al., 1998]. • Provided that an event-oriented tracer exists, the foldt operator is easy to implement. To implement it, the work done inside the Mercury runtime system, which corresponds to the really technical part, amounts to only 61 modified lines and 292 new lines of (C) code. Kishon and al. [Kishon & Hudak, 1995] use a denotational and operational continuation semantics to formally define monitors for a simple functional programming language. The kind of monitors they define are profilers, debuggers, and statistic collectors. From the operational semantics, a formal description of the monitor, and a program, they derive an instrumented executable file that performs the specified monitoring activity. The semantics of the original programs is preserved. They use partial evaluation to make their monitors reasonably efficient. The main disadvantage with this approach is that they are rebuilding a whole execution system from scratch, without taking advantage of existing compilers. We strongly believe that it is important to have the same execution system for debugging, monitoring and producing the final executable program. As noted by [Brooks et al., 1992], some errors only occur in presence of optimizations, and vice versa; some programs can only be executed in their optimized form because of time and memory constraints; when searching for “hot spots”, it is better to do it as much as possible with the optimized program as many things can be optimized away; and finally, sometimes, the error comes from the optimizations themselves. In our setting we can easily mix traced and non-traced code. Efficient monitoring. Patil and Fisher [Patil & Fischer, 1997] address the problem of performance monitoring by delegating the monitoring activities to a second processor that they call a shadow processor. Their approach is very efficient; the monitored program is practically not slowed down, but the set of monitoring commands they propose cannot be extended. We mentioned in the previous section that we could reduce the number of events generated by the tracer. For example, in [Ball & Larus, 1992], given a static control flow graph, algorithms can place tracing instructions in optimal ways for computing statistics on imperative program executions. 6 Conclusion In this article we have proposed a generic monitoring framework based on foldt10, a high-level primitive that allows users to easily specify what they 10 Available in Morphine, which can be downloaded from the Mercury ftp and web sites. 30 Erwan Jahier and Mireille Ducassé want to monitor. We illustrated it on various examples that demonstrate its genericity and its simplicity of use. We defined two preliminary notions of test coverage for logic programs and showed how to prototype coverage rates measurements with our primitive. Testing and monitoring tools are missing from many declarative systems: foldt allows some of these tools to be easily defined and implemented. Measurements showed that the performance of the primitive on the above examples can be acceptable for executions of several million trace events. To sum up the advantages of our framework, we can say that it is: • Easy to implement: because it is based on an existing tracer (292 new, and 61 modified lines of codes in our current implementation). • Efficient: because the trace is not stored. • Flexible and easy to use: as illustrated by the given applications about execution profiles, graphical abstract displays and test coverage. Acknowledgments We would like to thank Fergus Henderson for his technical support and his many contributing ideas; Pierre Deransart, Baudouin Le Charlier and Olivier Ridoux for fruitful discussions; Jean-Philippe Pouzol for his comments on earlier versions of this article. Finally, we are grateful to the thorough anonymous reviews which have helped us a lot improve the article. References Ball & Larus, 1992. Ball, T., & Larus, J.R. (1992). Optimally profiling and tracing programs. Pages 59–70 of: 19th ACM Symposium on Principles of Programming Languages. Bates, 1995. Bates, Peter C. (1995). Debugging heterogeneous distributed systems using event-based models of behavior. ACM Transactions on Computer Systems, 13(1), 1–31. Beizer, 1990. Beizer, B. (1990). Software testing techniques. Vol. 2nd ed. Int. Thomson Computer Press. Bird, 1987. Bird, R. S. (1987). An introduction to the theory of lists. Pages 3– 42 of: Broy, M. (ed), Logic of Programming and Calculi of Discrete Design. Springer-Verlag. Brooks et al., 1992. Brooks, G., Hansen, G.J., & Simmons, S. (1992). A new approach to debugging optimized code. Pages 1–11 of: SIGPLAN’92 Conference on Programming Language Design and Implementation. Byrd, 1980. Byrd, L. (1980). Understanding the control flow of Prolog programs. Pages 127–138 of: Tränlund, S.-A. (ed), Logic Programming Workshop. Ducassé, 1999a. Ducassé, M. (1999a). Coca: An automated debugger for C. Pages 504–513 of: Proceedings of the 21st Int. Conference on Software Engineering. ACM Press. Generic Program Monitoring by Trace Analysis 31 Ducassé, 1999b. Ducassé, M. (1999b). Opium: An extendable trace analyser for Prolog. Journal of Logic Programming, 39, 177–223. Special issue on Synthesis, Transformation and Analysis of Logic Programs, A. Bossi and Y. Deville (eds). Ducassé & Noyé, 2000. Ducassé, M., & Noyé, J. (2000). Tracing Prolog programs by source instrumentation is efficient enough. Journal of Logic Programming, 43(2), 157–172. Eclipse, 1999. Eclipse. (1999). The ECLiPSe Constraint Logic Programming System, ECLiPSe 4.1 - User Manual. IC.Parc. http://www-icparc.doc.ic.ac.uk/eclipse/. Eisenstadt & Brayshaw, 1988. Eisenstadt, M., & Brayshaw, M. (1988). The Transparent Prolog Machine TPM: an execution model and graphical debugger for Logic Programming. Journal of Logic Programming, 5(4), 277–342. Eustace & Srivastava, 1995. Eustace, A., & Srivastava, A. (1995). ATOM: A flexible interface for building high performance program analysis tools. Winter 1995 USENIX Conference. Fritzson et al., 1994. Fritzson, P., Auguston, M., & Shahmehri, N. (1994). Using assertions in declarative and operational models for automated debugging. Journal of Systems Software, 25, 223–239. Gallagher & Lyle, 1991. Gallagher, K.B., & Lyle, J.R. (1991). Using program slicing in software maintenance. IEEE Transactions on Software Engineering, 17(8), 751–761. Hatton, 1997. Hatton, L. (1997). Does OO sync with the way we think? IEEE Software, 15(3), 46–54. Howden & Shi, 1996. Howden, W.E., & Shi, G.M. (1996). Linear and structural event sequence analysis. Pages 98–106 of: Zeil, Steven J. (ed), Proceedings of the 1996 Int. Symposium on Software Testing and Analysis. ACM Press. Hutton, 1999. Hutton, G. (1999). A tutorial on the universality and expressiveness of fold. Journal of Functional Programming, 355–372. Jahier, 2000a. Jahier, E. (2000a). Analyse dynamique de programmes : mise en oeuvre automatisée d’analyseurs performants et spécification de modèles d’exécution. Ph.D. thesis, INSA de Rennes. Partly in English. Jahier, 2000b. Jahier, E. (2000b). Collecting graphical abstract views of Mercury program executions. Pages 100–115 of: Proceedings of the 4th Int. Workshop on Automated Debugging. Jahier & Ducassé, 1999. Jahier, E., & Ducassé, M. (1999). A generic approach to monitor program executions. Pages 139–153 of: Schreye, D. De (ed), Int. Conference on logic programming. MIT Press. Jahier & Ducassé, 1999a. Jahier, E., & Ducassé, M. (1999a). Morphine 0.2 User and Reference Manuals. Jahier & Ducassé, 1999b. Jahier, E., & Ducassé, M. (1999b). Un traceur d’exécutions de programmes ne sert pas qu’au débogage. Pages 297–311 of: Fages, F. (ed), Actes des Journées Francophones de Programmation Logique et par Contraintes. Hermès. Jeffery, 1999. Jeffery, C. (1999). Program monitoring and visualization. Springer. ISBN 0-387-98644-8. Jeffery et al., 1998. Jeffery, C., Zhou, W., Templer, K., & Brazell, M. (1998). A lightweight architecture for program execution monitoring. ACM SIGPLAN Notices, 33(7), 67–74. Kishon & Hudak, 1995. Kishon, A., & Hudak, P. (1995). Semantics directed program execution monitoring. Journal of Functional Programming, 5(4), 501–547. 32 Erwan Jahier and Mireille Ducassé Kishon et al., 1991. Kishon, A., Hudak, P., & Consel, C. (1991). Monitoring semantics: a formal framework for specifying, implementing and reasoning about execution monitors. ACM SIGPLAN Notices, 26(6), 338–352. Koutsofios & North, 1991. Koutsofios, E., & North, S. (1991). Drawing graphs with dot. TR 910904-59113-08TM. AT&T Bell Laboratories. Olsson et al., 1990. Olsson, R.A., Crawford, R.H., & Ho, W.W. (1990). Dalek: A GNU, improved programmable debugger. Pages 221–232 of: USENIX Association (ed), Summer 1990 USENIX Conference. USENIX Association. Patil & Fischer, 1997. Patil, H., & Fischer, C. (1997). Low-cost, concurrent checking of pointer and array accesses in C programs. Software Practice and Experience, 27(1), 87–110. Pfenning, 1992. Pfenning, F. (ed). (1992). Types in Logic Programming. MIT Press. ISBN 0-262-16131-1. Somogyi & Henderson, 1999. Somogyi, Z., & Henderson, F. (1999). The implementation technology of the Mercury debugger. Pages 35–49 of: Proceedings of the 10th Workshop on Logic Programming Environments, vol. 30(4). Elsevier, Electronic Notes in Theoretical Computer Science. Somogyi et al., 1996. Somogyi, Z., Henderson, F., & Conway, T. (1996). The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming, 29, 17–64. Stasko et al., 1998. Stasko, J., Domingue, J., Brown, M. H., & Price, B. A. (eds). (1998). Software visualization: Programming as a multimedia experience. MIT Press. Templer & Jeffery, 1998. Templer, K.S., & Jeffery, C.L. (1998). A configurable automatic instrumentation tool for ANSI C. Pages 249–259 of: Proceedings of the Automated Software Engineering Conference. IEEE Computer Society. Tip, 1995. Tip, F. (1995). Generic techniques for source-level debugging and dynamic program slicing. Pages 516–530 of: Mosses, Peter D., Nielsen, Mogens, & Schwartzbach, Michael I. (eds), TAPSOFT ’95: Theory and Practice of Software Development. LNCS, vol. 915. Springer-Verlag. Tolmach & Appel, 1995. Tolmach, A., & Appel, A.W. (1995). A debugger for Standard ML. Journal of Functional Programming, 5(2), 155–200. Van Roy & Despain, 1992. Van Roy, P., & Despain, A. M. (1992). Highperformance logic programming with the Aquarius Prolog compiler. Computer, 25(1), 54–68. Generic Program Monitoring by Trace Analysis A 33 Mercury execution events The Mercury trace is an adaptation of Byrd’s box model [Byrd, 1980]. In this section, we describe the Mercury execution events that constitute the Mercury execution trace. More information about the Mercury tracer can be found in [Somogyi & Henderson, 1999]. The different attributes provided by the Mercury tracer are: 1. Chronological event number (chrono11). Each event has a unique event number according to its rank in the trace. It is a counter of events. 2. Goal invocation number or call number (call). Unlike chronological event number, several events have the same goal invocation number. All events related to a given goal have a unique goal number given at invocation time. 3. Execution depth (depth). It is the depth of the goal in the proof tree, namely the number of its ancestor goals + 1. 4. Event type or port (port). We distinguish between external events that occur at procedure entries and exits, which are the traditional ports introduced by Byrd [Byrd, 1980], and the internal events which refers to what is occurring inside a procedure. External events are: • call a new goal is invoked • exit the current goal succeeds • fail the current goal fails • redo another solution for the current goal is asked for on backtracking. • exception the execution raises an exception Internal events are: • disj the execution is entering a branch of a disjunction • switch the execution is entering a branch of a switch (a switch is a disjunction in which each branch unifies a ground variable with a different function symbol. In that case, at most one disjunction provides a solution). • if the execution is entering the condition branch of an if-then-else • then the execution is entering the “then” branch of an if-then-else • else the execution is entering the “else” branch of an if-then-else • first the execution enters a C code fragment for the first time • later the execution re-enters a C code fragment 5. Determinism (det). It characterizes the number of potential solutions for a given goal. The determinism markers of Mercury are: det for procedures which have exactly 1 solution, semidet for those which have 0 or 1 solution, nondet for those which have any number of solutions, multi for those which have at least 1 solution, failure for those that have no solution, and erroneous for those which lead to a runtime error. 11 The names of the attribute accessing functions are in bold in between parentheses. 34 Erwan Jahier and Mireille Ducassé 6. Procedure (proc). It is defined by: • a flag telling if the procedure is a function or a predicate (proc type) • a definition module (def module) • a declaration module (decl module) The declaration module is the module where the user has declared the procedure. The defining module is the module where the procedure is effectively defined from the compiler point of view. They may be different if the procedure has been inlined. • a name (name) • an arity (arity) • a mode number (mode number). The mode number is an integer coding the mode of the procedure. When a predicate has only one mode, the mode number of its corresponding procedure is 0. Otherwise, the mode number is the rank in the order of appearance of the mode declaration. 7. List of live arguments (args). A variable is live at a given point of the execution if it has been instantiated and if the result of that instantiation is still available in the runtime system. Destructive input (di mode), for example, are not kept until the procedure exits. 8. List of live Argument types (arg types). 9. List of local live variables (local vars). Some live variables are not arguments of the current procedure. 10. Goal path (goal path). The goal path indicates in which part of the code the current internal event occurs. if, then and else branches of an ifthen-else are denoted by ?, e and t respectively; conjuncts, disjuncts and switches are denoted by ci, di and si, where i is the conjunct (resp. disjunct, switch) number. For example, if an event with goal path [c3, e, d1] is generated, it means that the event occurred in the first branch of a disjunction, which is in the else branch of an if-then-else, which is in the third conjunction of the current goal. External events have an empty goal path. The event structure is illustrated by Figure 15. The displayed structure is related to an event of the execution of a qsort program which sorts the list of integers [3, 1, 2] using a quick sort algorithm. The information contained in that structure indicates that qsort:partition/4-012 is currently invoked, it is the tenth trace event being generated, the sixth goal being invoked, and it has four ancestors (depth is 5). At this point, only the first two arguments of partition/4 are instantiated: the first one is bound to the list of integers [1, 2] and the second one to the integer 3 ; the third and fourth arguments are not live, which is indicated by the atom ‘-’. There are two live local variables: H, which is bound to 12 ‘-0’ denotes the mode number; here, ‘0’ means that qsort was declared with only one mode (namely, :- mode qsort(in, in, out, out) is det). If more than one mode is declared, ‘0’ denotes the first mode, ‘1’ the second one, etc. Generic Program Monitoring by Trace Analysis chrono call depth port det proc_type def_module decl_module name arity mode_number arg arg_types local_vars goal_path 35 10 6 5 then det predicate qsort qsort partition 4 0 [ [1, 2], 3, -, - ] [list(int), int, -, - ] [ live_var("H", 1, int), live_var("T", [2], list(int)) ] [s1, c2, t] Fig. 15. A Mercury trace event the integer 1, and T, which is bound to the list of integers [2]. The goal path tells that this event occurred in the then branch (t) of the second conjunction (c2) of the first switch (s1) of partition/4. B The Mercury queens program :- module queens. :- interface. :- import_module io. :- pred main(io__state, io__state). :- mode main(di, uo) is cc_multi. :- implementation. :- import_module list, int. main --> ( { data(Data), queen(Data, Out) } -> io__write_string("A 5 queens solution is "), print_list(Out) ; io__write_string("No solution\n") ). :- pred data(list(int)). :- mode data(out) is det. 36 Erwan Jahier and Mireille Ducassé :- pred queen(list(int), list(int)). :- mode queen(in, out) is nondet. :- pred qperm(list(T), list(T)). :- mode qperm(in, out) is nondet. :- pred qdelete(T, list(T), list(T)). :- mode qdelete(out, in, out) is nondet. :- pred safe(list(int)). :- mode safe(in) is semidet. :- pred nodiag(int, int, list(int)). :- mode nodiag(in, in, in) is semidet. data([1,2,3,4,5]). queen(Data, Out) :qperm(Data, Out), safe(Out). qperm([], []). qperm([X|Y], K) :qdelete(U, [X|Y], Z), K = [U|V], qperm(Z, V). qdelete(A, [A|L], L). qdelete(X, [A|Z], [A|R]) :qdelete(X, Z, R). safe([]). safe([N|L]) :nodiag(N, 1, L), safe(L). nodiag(_, _, []). nodiag(B, D, [N|L]) :NmB is N - B, BmN is B - N, ( D = NmB -> fail ; D = BmN -> fail ; true ), D1 is D + 1, Generic Program Monitoring by Trace Analysis nodiag(B, D1, L). :- pred print_list(list(int), io__state, io__state). :- mode print_list(in, di, uo) is det. print_list(Xs) --> ( { Xs = [] } -> io__write_string("[]\n") ; io__write_string("["), print_list_2(Xs), io__write_string("]\n") ). :- pred print_list_2(list(int), io__state, io__state). :- mode print_list_2(in, di, uo) is det. print_list_2([]) --> []. print_list_2([X|Xs]) --> io__write_int(X), ( { Xs = [] } -> [] ; io__write_string(", "), print_list_2(Xs) ). 37 data([1, 2, 3, 4, 5]) qperm([1, 2, 3, 4, 5], [1, 3, 5, 2, 4]) qdelete(1, [1, 2, 3, 4, 5], [2, 3, 4, 5]) qdelete(3, [2, 3, 4, 5], [2, 4, 5]) qdelete(3, [3, 4, 5], [4, 5]) qdelete(5, [5], []) s qperm([2, 3, 4, 5], [3, 5, 2, 4]) nodiag( qperm([2, 4, 5], [5, 2, 4]) nodiag( qdelete(5, [2, 4, 5], [2, 4]) qdelete(5, [4, 5], [4]) queen([1 qperm([2, 4], [2, 4]) qdelete(2, [2, 4], [4]) qdelete(4, [4], []) nodia qperm([4], [4]) nod qperm([], []) no
6cs.PL
KaHIP v2.00 – Karlsruhe High Quality Partitioning User Guide arXiv:1311.1714v6 [cs.DC] 1 Mar 2017 Peter Sanders and Christian Schulz Karlsruhe Institute of Technology (KIT), Karlsruhe, Germany Email: {sanders, christian.schulz}@kit.edu Abstract This paper severs as a user guide to the graph partitioning framework KaHIP (Karlsruhe High Quality Partitioning). We give a rough overview of the techniques used within the framework and describe the user interface as well as the file formats used. Moreover, we provide a short description of the current library functions provided within the framework. Contents 1 Introduction 2 Graph Partitioning Algorithms within KaHIP 2.1 KaFFPa . . . . . . . . . . . . . . . . . . . 2.2 KaFFPaE . . . . . . . . . . . . . . . . . . 2.3 KaBaPE . . . . . . . . . . . . . . . . . . . 2.4 Specialized Techniques for Social Networks 2.5 ParHIP – Parallel High Quality Partitioning 2.6 Better Process Mapping . . . . . . . . . . . 2.7 Node Separators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 5 6 6 6 6 7 Graph Format 3.1 Input File Format . . . . . . . . . . . 3.1.1 Metis File Format . . . . . . . 3.1.2 Binary File Format for ParHIP 3.2 Output File Formats . . . . . . . . . . 3.2.1 Partition . . . . . . . . . . . . 3.2.2 Node Separator . . . . . . . . 3.3 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 8 8 8 8 9 9 . . . . . . . 10 11 12 13 13 13 13 15 3 4 3 . . . . . . . . . . . . . . . . . . . . . User Interface 4.1 KaFFPa . . . . . . . . . . . . . . . . . . . 4.2 KaFFPaE / KaBaPE . . . . . . . . . . . . . 4.3 ParHIP – Parallel High Quality Partitioning 4.3.1 ParHIP . . . . . . . . . . . . . . . 4.3.2 Graph Conversion . . . . . . . . . 4.3.3 Evaluation . . . . . . . . . . . . . 4.4 Node Separators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 15 16 16 Library 5.1 Graph Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 17 18 4.5 4.6 5 4.4.1 Partition Converter 4.4.2 Biseparators . . . . Label Propagation . . . . . Graph Format Checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introduction Given a graph G = (V, E) and a number k > 1, the graph partitioning asks for a division of the graphs vertex set into k disjoint blocks of roughly equal size such that some objective function is minimized. The most common formulation minimizes the number of edges that run between the blocks. An example is given in Figure 1. Nowadays, the graph partitioning problem has many applications in different areas such as parallel scientific computing or graph computations [35, 7, 41, 12, 4, 5, 29], route planning [20, 25, 38, 21, 19, 22, 9, 10], VLSI Design [1, 2, 17, 8] or in solving sparse linear equation systems [13]1 . There has been a vast amount of research on graph partitioning. We refer the reader to [6] for more material on graph partitioning. KaHIP - Karlsruhe High Quality Partitioning - is a family of graph partitioning programs based on the publications [30, 31, 33, 16, 28, 32, 36]. It includes KaFFPa (Karlsruhe Fast Flow Partitioner) in its variants Strong, Eco and Fast, KaFFPaE (KaFFPaEvolutionary) which is a parallel evolutionary algorithm that uses KaFFPa to provide combine and mutation operations, as well as KaBaPE which extends the evolutionary algorithm. Moreover, we include algorithms to output a vertex separator from a given partition. KaHIP focuses on a version of the problem that constrains the maximum block size to (1 + ) times the average block size and tries to minimize the total cut size, i.e. the number of edges that run between blocks. To be more precise, consider an undirected graph G = (V = {0, . . . , n − 1}, E, c, ω) with edge weights ω P: E → R>0 , 0 ) := node weights c : V → R , n = |V |, and m = |E|. We extend c and ω to sets, i.e. c(V ≥0 v∈V 0 c(v) and P ω(E 0 ) := e∈E 0 ω(e). We are looking for blocks of nodes V1 ,. . . ,Vk that partition V , i.e., V1 ∪ · · · ∪ Vk = V and c(V ) Vi ∩Vj = ∅ for i 6= j. The balancing constraint demands Pthat ∀i ∈ {1..k} : |Vi | ≤ (1+)d k e for some imbalance parameter . The objective is to minimize the total cut i<j w(Eij ) where Eij := {{u, v} ∈ E : u ∈ Vi , v ∈ Vj }. Methods to optimize the maximum communication volume of a partition are also included in the package. There is also a version of the program that enables to balance nodes and edges between the blocks which is in particular important for applications in which workload is associated with the edges as well such as sparse matrix vector multiplications or in graph processing frameworks. In this case, we set the node P weight to c(v) + degω (v) for a c(V )+ v degω (v) node v ∈ V and set the balance constraint to ∀i ∈ {1..k} : |Vi | ≤ (1 + )d e. k The purpose of the manual is to give a very rough overview over the techniques used in the partitioning programs, as well as to serve as a guide and manual on how to use our algorithms. We start with a short overview of the algorithms implemented within our graph partitioning framework. This is followed by a description of the graph format that is used. It is basically the same graph format that is used by Metis [18] and Chaco [15], and that has been used during the 10th DIMACS Implementation Challenge on Graph Clustering and Graph Partitioning [3]. We then give an overview over the user interface of KaFFPa, KaFFPaE and KaBaPE and explain which program to use to derive node separators. We finish this manual with the description of the library functions provided by the current release. Figure 1: An example mesh that is partitioned into four blocks indicated by the colors. 1 Let us know if we have missed your application here! 3 2 Graph Partitioning Algorithms within KaHIP We now give a rough overview over the algorithms implemented in our graph partitioning framework. For details on the algorithms, we refer the interested reader to the corresponding papers. Figure 2 gives an overview over the techniques used with the framework. 2.1 KaFFPa A successful heuristic for partitioning large graphs is the multilevel graph partitioning approach, where the graph is recursively contracted to create smaller graphs which should reflect the same basic structure as the input graph. After applying an initial partitioning algorithm to the smallest graph, the contraction is undone and, at each level, a local search method is used to improve the partitioning induced by the coarser level. KaFFPa is a multilevel graph partitioning framework which contributes a number of improvements to the multilevel scheme which lead to enhanced partitioning quality. This includes flow-based methods, improved local search and repeated runs similar to the approaches used in multigrid solvers. Local improvement algorithms are usually variants of the FM algorithm [11]. The variant KaFFPa uses is organized in rounds. In each round, a priority queue P is initialized with all vertices that are incident to more than one block, in a random order. The priority is based on the gain g(i) = maxP gP (i) where gP (i) is the decrease in edge cut when moving i to block P . Local search then repeatedly looks for the highest gain node v and moves it to the corresponding block that maximizes the gain. However, in each round a node is moved at most once. After a node is moved, its unmoved neighbors become eligible, i.e. its unmoved neighbors are inserted into the priority queue. When a stopping criterion is reached, all movements after the best-found cut that occurred within the balance constraint are undone. This process is repeated several times until no improvement is found. Max-Flow Min-Cut Local Improvement. KaFFPa additionally uses more advanced local search algorithms. The first method is based on max-flow min-cut computations between pairs of blocks, in other words, a method to improve a given bipartition. Roughly speaking, this improvement method is applied between all pairs of blocks that share a non-empty boundary. The algorithm constructs a flow problem by growing an area around the given boundary vertices of a pair of blocks such that each s-t cut in this area yields a feasible bipartition of the original graph/pair of blocks within the balance constraint. One can then apply a max-flow min-cut algorithm to obtain a min-cut in this area and therefore a non-decreased cut between the original pair of blocks. This is improved in multiple ways, for example, by iteratively applying the method, searching in larger areas for feasible cuts, and applying most balanced minimum cut heuristics. For more details we refer the reader to [30]. Multi-try FM. The second method for improving a given partition is called multi-try FM. This local improvement method moves nodes between blocks in order to decrease the cut. Previous k-way methods were initialized with all boundary nodes, i.e., all boundary nodes were eligible for movement at the beginning. Roughly speaking, the multi-try FM algorithm is a k-way improvement method that is initialized with a single boundary node, thus achieving a more localized search. This is repeated several rounds. The algorithm has a higher chance to escape local optima. For more details about the multi-try FM algorithm we refer the reader to [30, 36]. Iterated Multilevel Algorithms. KaFFPa extends the concept of iterated multilevel algorithms which was introduced for graph partitioning by Walshaw et al. [39]. The main idea is to iterate the multilevel-scheme using different random seeds for coarsening and uncoarsening. Once the graph is partitioned, edges that are between two blocks are not contracted so that the given partition can be used as initial partition on the coarsest level. This ensures non-decreased partition quality since the refinement algorithms of KaFFPa guarantee no worsening. KaFFPa 4 uses F-cycles as a potentially stronger iterated multilevel algorithm. The detailed description of F-cycles for the multilevel graph partitioning framework can be found in [30]. 2.2 KaFFPaE KaFFPaE (KaFFPaEvolutionary) is a distributed evolutionary algorithm to tackle the graph partitioning problem. KaFFPaE uses KaFFPa to provide new effective combine and mutation operators. Roughly speaking, to combine two partitions of a population of the algorithm, the coarsening phase of KaFFPa is modified such that no cut edge of either of the input partitions is contracted. This ensures that both input partitions can be used as initial partition on the coarsest level and moreover that exchanging good parts of solutions can be exchanged effectively. Intuitively, the combine operator assembles good parts of solutions into a single partition. The combine operation framework is very flexible so that a partition can be combined with an arbitrary domain specific graph clustering. Moreover, the algorithm is parallelized such that each process has its own population of partitions and independently performs combine and mutation operations. This is combined with a scalable communication protocol similar to randomized rumor spreading to distribute high quality partitions among the processes. Overall, the system is able to improve the best known partitioning results for many inputs and also in a short amount of time for graphs of moderate size. mapping [TR17] highly parallel [TPDPS17] separators [SEA16] road [ALX12,GIS15] social [SEA14,IPDPS15,ALX15] hypergraphs [ALX16] distr. evol. alg. [ALENEX12] [DIMACS12] highly balanced: A [SEA13] 0 V− 0 B −1 0 −1 −1 C F− A 0 0 B −1 0 −1 −1 C B A C [ESA11] cycles a la multigrid W− input graph [IPDPS10] edge ratings match + ... Output Partition flows etc. [ESA11] local improvement ... parallel [IPDPS10] [SEA12/14] contract initial uncontract Multilevel Graph Partitioning partitioning Figure 2: Overview over the techniques used in the KaHIP graph partitioning framework. 5 2.3 KaBaPE KaFFPa and KaFFPaE compute partitions of very high quality when some imbalance  > 0 is allowed. However, they are not very good for small values of , in particular for the perfectly balanced case  = 0. Hence, we developed new techniques for the graph partitioning problem with strict balance constraints, that work well for small values of  including the perfectly balanced case. The techniques relax the balance constraint for node movements, but globally maintain balance by combining multiple local searches. This is done by reducing the combination problem to finding negative cycles in a directed graph, exploiting the existence of efficient algorithms for this problem. From a meta-heuristic point of view the proposed algorithms increase the neighborhood of a strictly balanced solution in which local search is able to find better solutions. Moreover, we provide efficient ways to explore this neighborhood. Experiments indicate that previous algorithms have not been able to find such rather complex movements. KaBaPE also provides balancing variants of these techniques that are able to make infeasible partitions feasible. In contrast to previous algorithms such as Scotch [26], Jostle [40] and Metis [18], KaBaPE is able to guarantee that the output partition is feasible. 2.4 Specialized Techniques for Social Networks We also include specialized techniques for social networks. On social networks matching-based multilevel algorithms have the problem that they can not shrink the graph effectively due to the irregular structure of the graphs, To overcome this, we defined an algorithm that contracts size-constraint clusterings [23]. Here, a fast and cutbased label propagation algorithm was used to compute the clusterings. The same algorithm can be used during uncoarsening as a fast and very simple local search algorithms. To enable the methods use a preconfiguration of the algorithm that has the word social in its name. For more details on this particular method we refer the reader to [23]. Additionally, these algorithms can now also be used within the evolutionary algorithms KaFFPaE/KaBaPE. This work was joint work with Henning Meyerhenke. Moreover, in Glantz et al. [14] we looked at algorithms and edge ratings improving the maximum communication volume of a partition (which are not yet integrated into the system). 2.5 ParHIP – Parallel High Quality Partitioning A large part of the project are distributed memory parallel algorithms designed for networks having a hierarchical cluster structure such as web graphs or social networks. Unfortunately, previous parallel graph partitioners originally developed for more regular mesh-like networks do not work well for complex networks. Here we address this problem by parallelizing and adapting the label propagation technique originally developed for graph clustering. By introducing size constraints, label propagation becomes applicable for both the coarsening and the refinement phase of multilevel graph partitioning. This way we exploit the hierarchical cluster structure present in many complex networks. We obtain very high quality by applying a highly parallel evolutionary algorithm to the coarsest graph. The resulting system is both more scalable and achieves higher quality than state-of-the-art systems like ParMetis or PT-Scotch. For large complex networks the performance differences are very big. As an example, our algorithm partitions a web graph with 3.3G edges in 16 seconds using 512 cores of a high-performance cluster while producing a high quality partition – none of the competing systems can handle this graph on our system. For more details, we refer the reader to [24]. 2.6 Better Process Mapping Communication and topology aware process mapping is a powerful approach to reduce communication time in parallel applications with known communication patterns on large, distributed memory systems. We address the problem as a quadratic assignment problem (QAP), and include algorithms to construct initial mappings of processes to processors as well as fast local search algorithms to further improve the mappings. By exploiting assumptions 6 that typically hold for applications and modern supercomputer systems such as sparse communication patterns and hierarchically organized communication systems, we arrive at significantly more powerful algorithms for these special QAPs. Our multilevel construction algorithms employ perfectly balanced graph partitioning techniques and excessively exploit the given communication system hierarchy. For more details, we refer the reader to [37]. 2.7 Node Separators The node separator problem asks to partition the node set of a graph into three sets A, B and S such that the removal of S disconnects A and B. We use flow-based and localized local search algorithms withing a multilevel framework to compute node separators [34]. A common way to obtain a node separator is the following. First, we compute a partition of the graph into two sets V1 and V2 . Clearly, the boundary nodes in V1 would yield a feasible separator and so would the boundary nodes in the opposite block V2 . Since we are interested in a small separator, we could simply use the smaller set of boundary nodes. It is worth mentioning that we also provide an extended method which can be used to obtain a k-way node separator, i.e. k blocks V1 , . . . , Vk and a set S such that after the removal of the nodes in S there no edge running between the blocks V1 , . . . , Vk . The method of Pothen et al. [27] creates a 2-way node separator from the set of cut edges of a previously computed partition. As in the original work, we can use this method in our framework as a post-processing step to compute a node separator from a set of cut edges. The method computes the smallest node separator that can be found by using a subset of the boundary nodes. The main idea is to compute a subset S of the boundary nodes such that each cut edge is incident to at least one of the nodes in S. Such a set called a vertex cover. It is easy to see that S is a node separator since the removal of S eliminates all cut edges. We can then compute a k-way node separator by computing a k-partition using KaFFPa and applying the described flow problem between all pairs of blocks that share a non-empty boundary afterwards. All pair-wise separators together are then be used as a k-way separator. 7 3 Graph Format 3.1 3.1.1 Input File Format Metis File Format The graph format used by our partitioning programs is the same as used by Metis [18], Chaco [15] and the graph format that has been used during the 10th DIMACS Implementation Challenge on Graph Clustering and Partitioning. The input graph has to be undirected, without self-loops and without parallel edges. To give a description of the graph format, we follow the description of the Metis 4.0 user guide very closely. A graph G = (V, E) with n vertices and m edges is stored in a plain text file that contains n + 1 lines (excluding comment lines). The first line contains information about the size and the type of the graph, while the remaining n lines contain information for each vertex of G. Any line that starts with % is a comment line and is skipped. The first line in the file contains either two integers, n m, or three integers, n m f . The first two integers are the number of vertices n and the number of undirected edges of the graph, respectively. Note that in determining the number of edges m, an edge between any pair of vertices v and u is counted only once and not twice, i.e. we do not count the edge (v, u) from (u, v) separately. The third integer f is used to specify whether or not the graph has weights associated with its vertices, its edges or both. If the graph is unweighted then this parameter can be omitted. It should be set to 1 if the graph has edge weights, 10 if the graph has node weights and 11 if the graph has edge and node weights. The remaining n lines of the file store information about the actual structure of the graph. In particular, the ith line (again excluding comment lines) contains information about the ith vertex. Depending on the value of f , the information stored in each line is somewhat different. In the most general form (when f = 11, i.e. we have node and edge weights) each line has the following structure: c v1 w1 v2 w2 . . . vk wk where c is the vertex weight associated with this vertex, v1 , . . . , vk are the vertices adjacent to this vertex, and w1 , . . . , wk are the weights of the edges. Note that the vertices are numbered starting from 1 (not from 0). Furthermore, the vertex-weights must be integers greater or equal to 0, whereas the edge-weights must be strictly greater than 0. 3.1.2 Binary File Format for ParHIP In order to read files efficiently in parallel, we also use a binary file format. We give a brief description here, for an in-depth description have a look at parallel_graph_io.cpp:483-535). However note that we provide tools to convert the input file format from the previous section into the binary file format. This includes an external memory converter if the graph that needs to be converted does not fit into the memory that is used for conversion. Additionally, ParHIP can also read the simple Metis format (less efficiently). The file uses 64bit unsigned longs. It starts with three 64bit unsigned longs, the version number (currently set to 3), the number of nodes n and the third one the number of edges of the graph. The next n + 1 unsigned longs store offsets. More precisely, the ith long is the position in which the outgoing edges of vertex i start. Starting at this position the edge targets are stored (one unsigned long for each). The n + 1 long in the set of offsets stores can be used to determine the end of the file. Node IDs start at 0. 3.2 3.2.1 Output File Formats Partition The output format of a partition is also similar to the output format of a partition provided by Metis. It is basically a text file named tmppartitionk where k is the number of blocks given as input to the partitioning program. This 8 5 1 2 1 3 1 2 7 1 3 3 7 5 1 1 3 3 4 3 4 1 1 4 6 1 6 1 4 3 1 10 11 2 1 7 1 1 3 2 3 4 3 1 7 4 1 7 5 1 7 1 2 2 2 3 1 4 1 6 1 71 51 6 1 4 4 516 6 5 3 Figure 3: An example graph and its representation in the graph format. The IDs of the vertices are drawn within the cycle, the vertex weight is shown next to the circle (red) and the edge weight is plotted next to the edge (blue). file contains n lines. In each line the block ID of the corresponding vertex is given, i.e. line i contains the block ID of the vertex i (here the vertices are numbered from 0 to n − 1). The block IDs are numbered consecutively from 0 to k − 1. ParHip also has the option to store partitions in a binary format. These can also be converted using the toolbox program. 3.2.2 Node Separator If the output is a node separator then the same format as used for a partition is used. However, in this case the nodes of the separator get the block ID k where as the other nodes maintain their original block id. 3.3 Troubleshooting KaHIP should not crash! If KaHIP crashes it is mostly due to the following reasons: the provided graph contains self-loops or parallel edges, there exists a forward edge but the backward edge is missing or the forward and backward edges have different weights, or the number of vertices or edges specified does not match the number of vertices or edges provided in the file. Please use the graphcheck tool provided in our graph partitioning package to verify whether your graph has the right input format. If our graphcheck tool tells you that the graph that you provided has the correct format and KaHIP crashes anyway, please write us an email. 9 4 User Interface KaHIP contains the following programs: kaffpa, kaffpaE, partition_to_vertex_separator, node_separator, graphchecker, evaluator, parhip, graph2binary, graph2binary_external, toolbox. To compile these programs you need to have Argtable, g++, OpenMPI and scons installed (we use argtable-2.10, g++-4.8.0, OpenMPI-1.4.1 and scons-1.2). Once you have that you can execute compile.sh in the main folder of the release. When the process is finished the binaries can be found in the folder deploy. We now explain the parameters of each of the programs briefly. General Guide: There are many programs contained already in the framework. The following table may helps you to find the right program for your use case: Use case Default Partitioning Problem Checking Graph for Correctness Evaluate Partitioning Metrics Fast Sequential Partitioning, Mesh Good Sequential Partitioning, Mesh Very Good Sequential Partitioning, Mesh Fast Sequential Partitioning, Social Good Sequential Partitioning, Social Very Good Sequential Partitioning, Social Mapping to Processor Networks Highest Quality, Mesh Highest Quality, Social Parallel Partitioning Distributed Memory Parallel, Mesh Distributed Memory Parallel, Social Convert Metis to Binary Evaluate and Convert Partitions Node Separators Two Node Separators k-way Separators Programs kaffpa, kaffpaE graph_checker evaluator kaffpa with preconfiguration set to fast kaffpa with preconfiguration set to eco kaffpa with preconfiguration set to strong kaffpa with preconfiguration set to fastsocial kaffpa with preconfiguration set to ecosocial kaffpa with preconfiguration set to strongsocial use the enable_mapping option kaffpaE, use mpirun, large time limit kaffpaE, use mpirun, large time limit, preconfig strongsocial parhip, graph2binary, graph2binary_external, toolbox parhip, preconfigs ecomesh, fastmesh, ultrafastmesh parhip, preconfigs ecosocial, fastsocial, ultrafastsocial graph2binary, graph2binary_external toolbox partition_to_vertex_separator, node_separator node_separator use kaffpa to create k-way partition, and then partition_to_vertex_separator to create separator 10 4.1 KaFFPa Description: This is the multilevel graph partitioning program. Usage: kaffpa file --k=<int> [--help] [--seed=<int>] [--preconfiguration=variant] [--imbalance=<double>] [--time_limit=<double>] [--enforce_balance] [--input_partition=<string>] [--balance_edges] [--output_filename=<string>] [–enable_mapping --hierarchy_parameter_string=<string> --distance_parameter_string=<string> [--online_distances]] Options: file --k=<int> --help --seed=<int> --preconfiguration=variant --imbalance=<double> --time_limit=<double> --enforce_balance --balance_edges --input_partition=<string> --enable_mapping --hierarchy_parameter_string=<string> --distance_parameter_string=<string> --online_distances --output_filename=<string> Path to graph file that you want to partition. Number of blocks to partition the graph into. Print help. Seed to use for the random number generator. Use a preconfiguration. (Default: eco) [strong| eco | fast | fastsocial| ecosocial| strongsocial ]. Strong should be used if quality is paramount, eco if you need a good tradeoff between partition quality and running time, and fast if partitioning speed is in your focus. Configurations with a social in their name should be used for social networks and web graphs. Desired balance. Default: 3 (%). Time limit in seconds s. The default value is set to 0s, i.e. one partitioner call will be made. If you set a time limit t, kaffpa will repeatedly call the multilevel method until the time limit is reached and return the best solution found. Use this option only on graphs without vertex weights. If this option is enabled, kaffpa guarantees that the output partition is feasible, i.e. fulfills the specified balance constraint. Use this option to balance the edges among the blocks as well as the nodes. In this case node weights are set to c(v) + degω (v) for a node v ∈ V and the balance constraint is adapted accordingly. You can specify an input partition. If you do so, KaFFPa will try to improve it. Enable mapping algorithms to map quotient graph onto processor graph defined by hierarchy and distance options. (Default: disabled) Specify as 4:8:8 for 4 cores per PE, 8 PEs per rack, ... and so forth. Specify as 1:10:100 if cores on the same chip have distance 1, PEs in the same rack have distance 10, ... and so forth. Do not store processor distances in a matrix, but do recomputation. (Default: disabled) Specify the output filename (default tmppartition$k). 11 4.2 KaFFPaE / KaBaPE Description: This is the distributed evolutionary algorithm to tackle the graph partitioning problem. It includes also the perfectly balance case  = 0. Usage: mpirun -n P kaffpaE file --k=<int> [--help] [--seed=<int>] [--preconfiguration=variant] [--imbalance=<double>] [--time_limit=<double>] [--mh_enable_quickstart] [--mh_optimize_communication_volume] [--mh_enable_kabapE] [--mh_enable_tabu_search] [--kabaE_internal_bal=<double>] [--input_partition=<string>] [--balance_edges] [--output_filename=<string> ] Options: P file --k=<int> --help --seed=<int> --preconfiguration=variant --imbalance=<double> --time_limit=<double> --mh_enable_quickstart --mh_optimize_communication_volume --mh_enable_kabapE --mh_enable_tabu_search --kabaE_internal_bal=<double> --balance_edges --input_partition=<string> --output_filename=<string> Number of processes to use. Path to graph file that you want to partition. Number of blocks to partition the graph into. Print help. Seed to use for the random number generator. Use a preconfiguration. (Default: strong) [strong | eco | fast | fastsocial | ecosocial | strongsocial ]. Strong should be used if quality is paramount, eco if you need a good tradeoff between partition quality and running time, and fast if partitioning speed is in your focus. Configurations with a social in their name should be used for social networks and web graphs. Desired balance. Default: 3 (%). Time limit in seconds s. The default value is set to 0s, i.e. one partitioner call will be made by each PE. In order to use combine operations you have to set a time limit t > 0. kaffpaE will return the best solution after the time limit is reached. A time limit t = 0 means that the algorithm will only create the initial population. Enables the quickstart option. In this case each PE creates a few partitions and these partitions are distributed among the PEs. Modifies the fitness function of the evolutionary algorithm so that communication volume is optimized. Enables the combine operator of KaBaPE. Enables our version of combine operation by block matching. The internal balance parameter for KaBaPE (Default: 0.01) (1 %) Use this option to balance the edges among the blocks as well as the nodes. In this case node weights are set to c(v) + degω (v) for a node v ∈ V and the balance constraint is adapted accordingly. You can specify an input partition. If you do so, KaFFPaE will try to improve it. Specify the output filename (default tmppartition$k). 12 4.3 4.3.1 ParHIP – Parallel High Quality Partitioning ParHIP Description: This is the distributed memory parallel program to compute a partition. Usage: mpirun -n P parhip file --k=<int> [--help] [--seed=<int>] [--preconfiguration=variant] [--imbalance=<int>] [--vertex_degree_weights] [--save_partition] [--save_partition_binary ] Options: P file --seed=<int> --k=<int> --help --imbalance=<int> --preconfiguration=variant --vertex_degree_weights --save_partition --save_partition_binary 4.3.2 Number of processes to use. Path to graph file to partition. (Either Metis format or binary format) Seed to use for the PRNG. Number of blocks to partition the graph. Print help. Desired balance. Default: 3 (%). Use a preconfiguration. (Default: fast) [ecosocial | fastsocial | ultrafastsocial | ecomesh | fastmesh | ultrafastmesh]. Use 1+deg(v) as vertex weights. Enable this tag if you want to store the partition to disk. Enable this tag if you want to store the partition to disk in a binary format. Graph Conversion Description: This is the program to convert a Metis graph format into the binary graph format. The program ending with _external does the task in external memory. Usage: graph2binary[_external] 4.3.3 metisfile outputfilename Evaluation Description: This is the toolbox program to convert partitions and to evaluate them. Usage: mpirun -n P toolbox file --k=<int> [--help] =<int>] --input_partition=<string> [--save_partition] [--save_partition_binary ] [--evaluate] 13 Options: P file --k=<int> --help --input_partition=file --save_partition --save_partition_binary --evaluate Number of processes to use. Path to graph file to partition. (Either Metis format or binary format) Number of blocks to graph is partitioned in. Print help. Path to partition file to convert. Enable this tag if you want to store the partition to disk. Enable this tag if you want to store the partition to disk in a binary format. Enable this tag the partition to be evaluated. 14 4.4 4.4.1 Node Separators Partition Converter Description: This is the program that computes a k-way vertex separator given a k-way partition of the graph. Use this approach if k > 2. Usage: partition_to_vertex_separator file --k=<int> --input_partition=<string> [--help] [--seed=<int>] [--output_filename] Options: file --k=<int> --input_partition=<string> --help --seed=<int> --output_filename=<string> 4.4.2 Path to the graph file. Number of blocks the graph is partitioned in by using the input partition. Input partition to compute the vertex separator from. Print help. Seed to use for the random number generator. Specify the output filename (default tmpseparator). Biseparators Description: This is the program that computes a 2-way vertex separator. Use this approach if k = 2. Usage: node_separator file [--seed=<int>] [--preconfiguration=variant] [--help] [--output_filename] Options: file --help --imbalance=<double> --seed=<int> --preconfiguration=variant --output_filename=<string> Path to the graph file. Print help. Desired balance. Default: 20 (%). Seed to use for the random number generator. Use a preconfiguration. (Default: strong) [strong | eco | fast | fastsocial | ecosocial | strongsocial ]. Strong should be used if quality is paramount, eco if you need a good tradeoff between partition quality and running time, and fast if partitioning speed is in your focus. Configurations with a social in their name should be used for social networks and web graphs (they use a different kind of coarsening scheme). Specify the output filename (default tmpseparator). 15 4.5 Label Propagation Description: This is the program that a size-constrained label propagation clustering. Usage: label_propagation file [--cluster_upperbound=<int>] [--label_propagation_iterations] [--help] [--seed=<int>] [--output_filename] Options: file --cluster_upperbound=<int> --label_propagation_iterations=<int> --help --seed=<int> --output_filename=<string> 4.6 Path to the graph file. Set a size-constraint on the size of a cluster. For example, specifying a value of 10 means that each cluster can have at most 10 vertices (or a weight of 10 if the graph is weighted). By default there is no sizeconstraint, so that each node can potentially be in on cluster. Set the number of label propagation iterations. The default value is 10. Print help. Seed to use for the random number generator. Specify the output filename (default tmpclustering). Graph Format Checker Description: This program checks if the graph specified in a given file is valid. Usage: graphchecker file Options: file Path to the graph file. 16 5 Library Some of the programs above can be directly accessed in C/C++ by using the library that we provide, i.e. the graph partitioners KaFFPaFast, KaFFPaEco and KaFFPaStrong (more will follow) can be called using this library. In this section we describe how the library can be used, the methods can be accessed and describe the parameters of these functions. The functions described in this section can be found in the file interface/kaHIP_interface.h. An example program that calls and links the library can be found in misc/example_library_call/. To try, go into this directory, run ./compile.sh and then the program ./interfactest. 5.1 Graph Data Structure To make it easy for you to try KaHIP, we use a more or less similar interface to that provided by Metis. Most importantly, we use the same graph data structure. The graph data structure is an adjacency structure of the graph which includes weights for the vertices and edges if there are any. The adjacency structure is a compressed sparse row (CSR) format. We closely follow the description of the Metis 4.0 user guide: The CSR format is a widely used scheme for storing sparse graphs. In this format the adjacency structure of a graph with n vertices and m edges is represented using two arrays xadj and adjncy. The xadj array is of size n + 1 whereas the adjncy array is of size 2m (this is because for each edge between vertices v and u we store both a forward edge (v, u) and a backward edge (u, v)). The adjacency structure of the graph is stored as follows. First of all, the vertex numbering starts from 0. The adjacency list of vertex i is stored in the array adjncy starting at index xadj[i] and ending at (but not including) index xadj[i + 1] (i.e. adjncy[xadj[i]] through and including adjncy[xadj[i + 1]−1]). That is, for each vertex i, its adjacency list is stored in consecutive locations in the array adjncy, and the array xadj is used to point to where it begins and where it ends. The weights of the vertices (if any) are stored in an additional array called vwgt. If the graph has n vertices then the array contains n elements, and vwgt[i] will store the weight of the ith vertex. The vertex-weights must be integers greater or equal to zero. If all the vertices of the graph have the same weight (e.g. the graph is unweighted), then the array vwgt can be set to NULL. The weights of the edges (if any) are stored in additional array called adjwgt. This array contains 2m elements, and the weight of edge adjncy[j] is stored at location adjwgt[j]. The edge-weights must be integers greater than zero. The weight of a forward edge (u, v) has to be equal to the weight of the backward edge (v, u) and parallel edges as well as self-loops are not allowed. If all the edges of the graph have the same weight (e.g. the graph is unweighted), then the array adjwgt can be set to NULL. 0 xadj: 0 2 5 7 9 12 adjncy: 1 4 0 2 4 1 3 2 4 0 1 3 1 4 2 3 Figure 4: An example unweighted graph with its graph data structure. 17 5.2 Functions Currently we provide two functions, e.g. kaffpa and node_separator. The function kaffpa corresponds to the mulilevel partitioner KaFFPa and the function node_separator used KaFFPa to compute a partition and from that a node separator is derived. Main Partitioner Call void kaffpa(int* n, int* vwgt, int* xadj, int* adjcwgt, int* adjncy, int* nparts, double* imbalance, bool suppress_output, int seed, int mode, int* edgecut, int* part); Parameters n vwgt xadj adjcwgt adjncy nparts imbalance suppress_output seed mode edgecut part Number of vertices of the graph. This is the vertex weight array described in Section 5.1. The array should have size n. If your graph does not have vertex weight you can use a null pointer as an argument. This is the xadj array described in Section 5.1 which holds the pointers to the adjacency lists of the vertices. The array should have size n + 1. This is the adjacency weight array described in Section 5.1 which holds the weights of the edges if they exists. The array should have size 2m. If your graph does not have edge weights you can use a null pointer as an argument. This is the adjacency array described in Section 5.1 which holds the adjacency lists of the vertices. The array should have size 2m. This parameter specifies the number of blocks you want the graph to be partitioned in. This parameter controls the amount of imbalance that is allowed. For example, setting it to 0.03 specifies an imbalance of 3% which means on unweighted graphs that each block has to fulfill the constraint |Vi | ≤ (1 + 0.03)|V |/k. If this option is enabled then no output of the partitioning library is printed to stdout. Seed to use for the random number generator. One out of FAST, ECO, STRONG, FASTSOCIAL, ECOSOCIAL, STRONGSOCIAL. Configuration names correpond to the default configuration names of the multilevel partitioner KaFFPa. This is an output parameter. It represents the edge cut of the computed partition. This is an output parameter. It has to be an already allocated array of size n. After the function call this array contains the information of the blocks of the vertices, i.e. the block of the ith vertex is given in part[i]. 18 Node+Edge Balanced Partitioner Call This function will try to balance nodes and edges among the blocks. Use this function if you want to use KaFFPa for applications in which workload is also associated with edges, e.g. sparse matrix vector multiplications or in graph processing frameworks. void kaffpa_balance_NE(int* n, int* vwgt, int* xadj, int* adjcwgt, int* adjncy, int* nparts, double* imbalance, bool suppress_output, int seed, int mode, int* edgecut, int* part); Parameters n vwgt xadj adjcwgt adjncy nparts imbalance suppress_output seed mode edgecut part Number of vertices of the graph. This is the vertex weight array described in Section 5.1. The array should have size n. If your graph does not have vertex weight you can use a null pointer as an argument. This is the xadj array described in Section 5.1 which holds the pointers to the adjacency lists of the vertices. The array should have size n + 1. This is the adjacency weight array described in Section 5.1 which holds the weights of the edges if they exists. The array should have size 2m. If your graph does not have edge weights you can use a null pointer as an argument. This is the adjacency array described in Section 5.1 which holds the adjacency lists of the vertices. The array should have size 2m. This parameter specifies the number of blocks you want the graph to be partitioned in. This parameter controls the amount of imbalance that is allowed. For example, setting it to 0.03 specifies an imbalance of 3% which means on unweighted graphs that each block has to fulfill the constraint |Vi | ≤ (1 + 0.03)|V |/k. If this option is enabled then no output of the partitioning library is printed to stdout. Seed to use for the random number generator. One out of FAST, ECO, STRONG, FASTSOCIAL, ECOSOCIAL, STRONGSOCIAL. Configuration names correpond to the default configuration names of the multilevel partitioner KaFFPa. This is an output parameter. It represents the edge cut of the computed partition. This is an output parameter. It has to be an already allocated array of size n. After the function call this array contains the information of the blocks of the vertices, i.e. the block of the ith vertex is given in part[i]. 19 Node Separator void node_separator(int* n, int* vwgt, int* xadj, int* adjcwgt, int* adjncy, int* nparts, double* imbalance, bool suppress_output, int seed, int mode, int* num_separator_vertices, int** separator); Parameters n vwgt xadj adjcwgt adjncy nparts imbalance suppress_output seed mode num_separator_vertices separator Number of vertices of the graph. This is the vertex weight array described in Section 5.1. The array should have size n. If your graph does not have vertex weight you can use a null pointer as an argument. This is the xadj array described in Section 5.1 which holds the pointers to the adjacency lists of the vertices. The array should have size n + 1. This is the adjacency weight array described in Section 5.1 which holds the weights of the edges if they exists. The array should have size 2m. If your graph does not have edge weights you can use a null pointer as an argument. This is the adjacency array described in Section 5.1 which holds the adjacency lists of the vertices. The array should have size 2m. This parameter specifies the number of blocks you want the graph to be partitioned in as a base to compute a separator from. If the size of the separator is your objective, we recommend to set this parameter to 2. This parameter controls the amount of imbalance that is allowed. For example, setting it to 0.03 specifies an imbalance of 3% which means on unweighted graphs that each block has to fulfill the constraint |Vi | ≤ (1 + 0.03)|V |/k. If this option is enabled then no output of the partitioning library is printed to stdout. Seed to use for the random number generator. One out of FAST, ECO, STRONG, FASTSOCIAL, ECOSOCIAL, STRONGSOCIAL. Configuration names correpond to the default configuration names of the multilevel partitioner KaFFPa. This is an output parameter. It represents the number of separator vertices, i.e. the size of the array separator. This is an output parameter. After the function call this array contains the ids of the separator vertices. Using KaHIP within Java Projects KaHIP can be used within Java project via JNI. A small example on how to do this is provided in the folder misc/java_jni_wrapper/ of the project. To run the example perform the following commands in the main folder: ./compile.sh cd misc/java_jni_wrapper ./makeWrapper.sh java KaHIPWrapper 20 References [1] C. J. Alpert and A. B. Kahng. Recent Directions in Netlist Partitioning: A Survey. Integration, the VLSI Journal, 19(1-2):1–81, 1995. [2] C. J. Alpert, A. B. Kahng, and S. Z. Yao. Spectral Partitioning with Multiple Eigenvectors. Discrete Applied Mathematics, 90(1):3–26, 1999. [3] D. Bader, H. Meyerhenke, P. Sanders, and D. Wagner. 10th DIMACS Implementation Challenge – Graph Partitioning and Graph Clustering, http://www.cc.gatech.edu/dimacs10/. [4] E. G. Boman, K. D. Devine, and S. Rajamanickam. Scalable Matrix Computations on Large Scale-Free Graphs Using 2D Graph Partitioning. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC’13. ACM, 2013. [5] A. Buluç and K. Madduri. Graph partitioning for scalable distributed graph computations. In Graph Partitioning and Graph Clustering, pages 83–102, 2012. [6] A. Buluç, H. Meyerhenke, I. Safro, P. Sanders, and C. Schulz. Recent Advances in Graph Partitioning. In Algorithm Engineering – Selected Topics, to appear, 2014. [7] Ü. V. Çatalyürek and C. Aykanat. Decomposing Irregularly Sparse Matrices for Parallel Matrix-Vector Multiplication. In Proceedings of the 3rd International Workshop on Parallel Algorithms for Irregularly Structured Problems, volume 1117 of LNCS, pages 75–86. Springer, 1996. [8] J. Cong and J. Shinnerl. Multilevel Optimization in VLSICAD. Springer, 2003. [9] D. Delling, A. V. Goldberg, T. Pajor, and R. F. Werneck. Customizable Route Planning. In Proceedings of the 10th International Symposium on Experimental Algorithms, volume 6630 of LCNS, pages 376–387. Springer, 2011. [10] D. Delling and R. F. Werneck. Faster Customization of Road Networks. In 12th Symposium on Experimental Algorithms, volume 7933 of LNCS, pages 30–42. Springer, 2013. [11] C. M. Fiduccia and R. M. Mattheyses. A Linear-Time Heuristic for Improving Network Partitions. In Proceedings of the 19th Conference on Design Automation, pages 175–181, 1982. [12] J. Fietz, M. Krause, C. Schulz, P. Sanders, and V. Heuveline. Optimized Hybrid Parallel Lattice Boltzmann Fluid Flow Simulations on Complex Geometries. In Proceedings of Euro-Par 2012 Parallel Processing, volume 7484 of LNCS, pages 818–829. Springer, 2012. [13] A. George. Nested Dissection of a Regular Finite Element Mesh. SIAM Journal on Numerical Analysis, 10(2):345–363, 1973. [14] R. Glantz, H. Meyerhenke, and C. Schulz. Tree-based Coarsening and Partitioning of Complex Networks. Technical Report ArXiv:1402.2782, 2014. [15] B. Hendrickson. Chaco: Software for Partitioning Graphs. ~bahendr/chaco.html. http://www.cs.sandia.gov/ [16] M. Holtgrewe, P. Sanders, and C. Schulz. Engineering a Scalable High Quality Graph Partitioner. Proceedings of the 24th IEEE International Parallal and Distributed Processing Symposium, pages 1–12, 2010. 21 [17] A. B. Kahng, J. Lienig, I. L. Markov, and J. Hu. VLSI Physical Design - From Graph Partitioning to Timing Closure. Springer, 2011. [18] G. Karypis and V. Kumar. A Fast and High Quality Multilevel Scheme for Partitioning Irregular Graphs. SIAM Journal on Scientific Computing, 20(1):359–392, 1998. [19] T. Kieritz, D. Luxen, P. Sanders, and C. Vetter. Distributed Time-Dependent Contraction Hierarchies. In Proceedings of the 9th International Symposium on Experimental Algorithms, volume 6049 of LNCS, pages 83–93. Springer, 2010. [20] U. Lauther. An Extremely Fast, Exact Algorithm for Finding Shortest Paths in Static Networks with Geographical Background. In Proceedings of the Münster GI-Days, 2004. [21] D. Luxen and D. Schieferdecker. Candidate Sets for Alternative Routes in Road Networks. In Proceedings of the 11th International Symposium on Experimental Algorithms (SEA’12), volume 7276 of LNCS, pages 260–270. Springer, 2012. [22] J. Maue, P. Sanders, and D. Matijevic. Goal Directed Shortest Path Queries Using Precomputed Cluster Distances. ACM Journal of Experimental Algorithmics, 2007. [23] H. Meyerhenke, P. Sanders, and C. Schulz. Partitioning Complex Networks via Size-constrained Clustering. Technical Report ArXiv:1402.3281, 2014. [24] Henning Meyerhenke, Peter Sanders, and Christian Schulz. Parallel graph partitioning for complex networks. In 2015 IEEE International Parallel and Distributed Processing Symposium, IPDPS 2015, Hyderabad, India, May 25-29, 2015, pages 1055–1064, 2015. [25] R. H. Möhring, H. Schilling, B. Schütz, D. Wagner, and T. Willhalm. Partitioning Graphs to Speedup Dijkstra’s Algorithm. Journal of Experimental Algorithmics (JEA), 11(2006), 2007. [26] F. Pellegrini. Scotch Home Page. http://www.labri.fr/pelegrin/scotch. [27] A. Pothen, H. D. Simon, and K. P. Liou. Partitioning Sparse Matrices with Eigenvectors of Graphs. SIAM Journal on Matrix Analysis and Applications, 11(3):430–452, 1990. [28] I. Safro, P. Sanders, and C. Schulz. Advanced Coarsening Schemes for Graph Partitioning. In Proceedings of the 11th International Symposium on Experimental Algorithms (SEA’12), volume 7276 of LNCS, pages 369–380. Springer, 2012. [29] S. Salihoglu and J. Widom. GPS: A Graph Processing System. In SSDBM, page 22, 2013. [30] P. Sanders and C. Schulz. Engineering Multilevel Graph Partitioning Algorithms. In Proceedings of the 19th European Symposium on Algorithms, volume 6942 of LNCS, pages 469–480. Springer, 2011. [31] P. Sanders and C. Schulz. Distributed Evolutionary Graph Partitioning. In Proceedings of the 12th Workshop on Algorithm Engineering and Experimentation (ALENEX’12), pages 16–29, 2012. [32] P. Sanders and C. Schulz. High Quality Graph Partitioning. In Proceedings of the 10th DIMACS Implementation Challenge - Graph Clustering and Graph Partitioning, pages 1–17. AMS, 2013. [33] P. Sanders and C. Schulz. Think Locally, Act Globally: Highly Balanced Graph Partitioning. In Proceedings of the 12th International Symposium on Experimental Algorithms (SEA’12), LNCS. Springer, 2013. [34] Peter Sanders and Christian Schulz. Advanced Multilevel Node Separator Algorithms. In Proceedings of the 15th International Symposium on Experimental Algorithms, 2016. 22 [35] K. Schloegel, G. Karypis, and V. Kumar. Graph Partitioning for High Performance Scientific Simulations. In The Sourcebook of Parallel Computing, pages 491–541, 2003. [36] C. Schulz. Hiqh Quality Graph Partititioning. PhD thesis, Karlsruhe Institute of Technology, 2013. [37] C. Schulz and J. L. Träff. Better Process Mapping and Sparse Quadratic Assignment. Technical report, Karlsruhe Institute of Technology, University of Vienna and Technical University Vienna, 2017. [38] F. Schulz, D. Wagner, and C. D. Zaroliagis. Using Multi-Level Graphs for Timetable Information. In 4th Workshop on Algorithm Engineering and Experiments, volume 2409 of LNCS, pages 43–59. Springer, 2002. [39] C. Walshaw. Multilevel Refinement for Combinatorial Optimisation Problems. Annals of Operations Research, 131(1):325–372, 2004. [40] C. Walshaw and M. Cross. JOSTLE: Parallel Multilevel Graph-Partitioning Software – An Overview. In Mesh Partitioning Techniques and Domain Decomposition Techniques, pages 27–58. Civil-Comp Ltd., 2007. [41] M. Zhou, O. Sahni, K. D Devine, M. S. Shephard, and K. E Jansen. Controlling Unstructured Mesh Partitions for Massively Parallel Simulations. SIAM Journal on Scientific Computing, 32(6):3201–3227, 2010. 23
8cs.DS
On the Kernel of Z2s -Linear Hadamard Codes∗† Cristina Fernández-Córdoba, Carlos Vela, Mercè Villanueva arXiv:1801.05189v1 [cs.IT] 16 Jan 2018 January 17, 2018 Abstract The Z2s -additive codes are subgroups of Zn 2s , and can be seen as a generalization of linear codes over Z2 and Z4 . A Z2s -linear Hadamard code is a binary Hadamard code which is the Gray map image of a Z2s additive code. It is known that the dimension of the kernel can be used to give a complete classification of the Z4 -linear Hadamard codes. In this paper, the kernel of Z2s -linear Hadamard codes and its dimension are established for s > 2. Moreover, we prove that this invariant only provides a complete classification for some values of t and s. The exact amount of nonequivalent such codes are given up to t = 11 for any s ≥ 2, by using also the rank and, in some cases, further computations. Keywords: kernel, Hadamard code, Z2s -linear code, Z2s -additive code, Gray map, classification. Mathematics Subject Classification (2000): 94B25, 94B60 1 Introduction Let Z2s be the ring of integers modulo 2s with s ≥ 1. The set of n-tuples over Z2s is denoted by Zn2s . In this paper, the elements of Zn2s will also be called vectors over Z2s of length n. A binary code of length n is a nonempty subset of Zn2 , and it is linear if it is a subspace of Zn2 . Equivalently, a nonempty subset of Zn2s is a Z2s -additive if it is a subgroup of Zn2s . Note that, when s = 1, a Z2s -additive code is a binary linear code and, when s = 2, it is a quaternary linear code or a linear code over Z4 . Two binary codes, C1 and C2 , are said to be equivalent if there is a vector a ∈ Zn2 and a permutation of coordinates π such that C2 = {a + π(c) : c ∈ C1 }. Two Z2s -additive codes, C1 and C2 , are said to be permutation equivalent if they differ only by a permutation of coordinates, that is, if there is a permutation of coordinates π such that C2 = {π(c) : c ∈ C1 }. The Hamming weight of a binary vector u ∈ Zn2 , denoted by wtH (u), is the number of nonzero coordinates of u. The Hamming distance of two binary vectors u, v ∈ Zn2 , denoted by dH (u, v), is the number of coordinates in which ∗ This work has been partially supported by the Spanish MINECO under Grants TIN201677918-P (AEI/FEDER, UE) and MTM2015-69138-REDT, and by the Catalan AGAUR under Grant 2014SGR-691. The authors are with the Department of Information and Communications Engineering, Universitat Autònoma de Barcelona, 08193 Cerdanyola del Vallès, Spain. † The material in this paper was presented in part at “5th International Castle Meeting on Coding Theory and Applications” in Vihula Manor, Estonia, 2017 [9]. 1 they differ. Note that dH (u, v) = wtH (v − u). The minimum distance of a binary code C is d(C) = min{dH (u, v) : u, v ∈ C, u 6= v} The Lee weight of an element i ∈ Z2s is wtL (i) = min{i, P 2s − i} and the Lee weight of a vector n u = (u1 , u2 , . . . , un ) ∈ Zn2s is wtL (u) = j=1 wtL (uj ) ∈ Z2s . The Lee distance of two vectors u, v ∈ Zn2s is dL (u, v) = wtL (v − u). The minimum distance of a Z2s -additive code C is d(C) = min{dL (u, v) : u, v ∈ C, u 6= v}. In [12], a Gray map from Z4 to Z22 is defined as φ(0) = (0, 0), φ(1) = (0, 1), φ(2) = (1, 1) and φ(3) = (1, 0). There exist different generalizations of this Gray s−1 map, which go from Z2s to Z22 [7, 8, 13, 14]. The one given in [7], by Carlet, s−1 is the map φ : Z2s → Z22 defined as follows: φ(u) = (us−1 , . . . , us−1 ) + (u0 , . . . , us−2 )Y, (1) where u ∈ Z2s , [u0 , u1 , . . . , us−1 ]2 is the binary expansion of u, that is u = Ps−1 i s−1 which columns i=0 2 ui (ui ∈ {0, 1}), and Y is a matrix of size (s − 1) × 2 s−1 are the elements of Z2 . Note that (us−1 , . . . , us−1 ) and (u0 , . . . , us−2 )Y are binary vectors of length 2s−1 , and that the rows of Y form a basis of a first order Reed-Muller code. The generalization given in [13] can be defined in terms of the elements of a Hadamard code [14]. In this paper, we will focus on Carlet’s Gray map P P φ, which is a particular case of the last one satisfying that s−1 λi φ(2i ) = φ( λi 2i ) as we will see later. Then, we define Φ : Zn2s → Zn2 2 as the component-wise Gray map φ. Let C be a Z2s -additive code of length n. We say that its binary image C = Φ(C) is a Z2s -linear code of length 2s−1 n. Since C is a subgroup of Zn2s , t it is isomorphic to an abelian structure Zt21s × Zt22s−1 × · · · × Z4s−1 × Zt2s , and we say that C, or equivalently C = Φ(C), is of type (n; t1 , . . . , ts ). Note that |C| = 2st1 2(s−1)t2 · · · 2ts . Unlike linear codes over finite fields, linear codes over rings do not have a basis, but there exists a generator matrix for these codes. If C is a Z2s -additive code of type (n; t1 , . . . , ts ), then a generator matrix of C with minimum number of rows has exactly t1 + · · · + ts rows. Two structural properties of binary codes are the rank and the dimension of the kernel. The rank of a binary code C is simply the dimension of the linear span, hCi, of C. The kernel of a binary code C is defined as K(C) = {x ∈ Zn2 : x + C = C} [3]. If the all-zero vector belongs to C, then K(C) is a linear subcode of C. Note also that if C is linear, then K(C) = C = hCi. We denote the rank of a binary code C as rank(C) and the dimension of the kernel as ker(C). These parameters can be used to distinguish between nonequivalent binary codes, since equivalent ones have the same rank and dimension of the kernel. A binary code of length n, 2n codewords and minimum distance n/2 is called a Hadamard code. Hadamard codes can be constructed from normalized Hadamard matrices [2, 17]. Note that linear Hadamard codes are in fact first order Reed-Muller codes, or equivalently, the dual of extended Hamming codes [17, Ch.13 §3]. The Z2s -additive codes that, under the Gray map Φ, give a Hadamard code are called Z2s -additive Hadamard codes and the corresponding binary images are called Z2s -linear Hadamard codes. The Z4 -linear Hadamard codes of length 2t can be classified by using either the rank or the dimension of the kernel [15, 18]. Specifically, it is known that for a Z4 -linear Hadamard code C of type (2t−1 ; t1 , t2 ), ker(C) = t1 + t2 + 1 if t1 > 2, and ker(C) = 2t1 + t2 if t1 = 1 or 2, where t2 = t + 1 − 2t1 . For 2 any integer t ≥ 3 and each t1 ∈ {1, . . . , ⌊(t + 1)/2⌋}, there is a unique (up to equivalence) Z4 -linear Hadamard code of type (2t−1 ; t1 , t + 1 − 2t1 ), and all these codes are pairwise nonequivalent, except for t1 = 1 and t1 = 2, where the codes are equivalent to the linear Hadamard code [15]. Therefore, the number of nonequivalent Z4 -linear Hadamard codes of length 2t is ⌊ t−1 2 ⌋ for all t ≥ 3, and it is 1 for t = 1 and t = 2. Linear codes over Zps , which are a generalization of Z2s -additive codes, were studied by Blake [4] and Shankar [19] in 1975 and 1979, respectively. Nevertheless, the study of codes over rings increased significantly after the publication of some good properties of linear codes over Z4 and the definition of the Gray map [12]. After that, Z2s -additive codes and their images under the Gray map are deeply studied, for example, in [7], and later in [20] and [11]. In [14], Krotov studied Z2s -linear Hadamard codes and their dual codes by using different generalizations of the Gray map. Recently, in [1], considering Carlet’s generalization of the Gray map, two-weight Z2s -linear codes are studied. Note that Z2s -linear Hadamard codes are in fact a particular case of these two-weight codes. In this paper, in order to try to classify the Z2s -linear Hadamard codes of length 2t , for any t ≥ 3 and s > 2, we establish the kernel and its dimension for these codes. Moreover, we point out that this invariant does not always provide a complete classification, once we fix t ≥ 3 and s > 2, unlike for s = 2. However, we give some new classification results for t ≤ 11 and any s > 2. This correspondence is organized as follows. In Section 2, we recall some results and we prove new ones related to the Carlet’s generalized Gray map. In Section 3, we describe the construction of the Z2s -linear Hadamard codes of type (n; t1 , . . . , ts ) when this Gray map is used. This result is already proved in [14] in a more general way, but using other techniques. In Section 4, we establish for which types these codes are linear, and we give the kernel and its dimensions whenever they are nonlinear. In section 5, through several examples, we show that, unlike for s = 2, the dimension of the kernel is not enough to classify completely Z2s linear Hadamard codes for some values of t and s. Moreover, we give the exact amount of nonequivalent such codes up to t = 11 for any s ≥ 2, by using also the rank and, in some cases, further computations. Finally, in Section 6, we give some conclusions and further research on this topic. 2 Generalized Gray Map In this section, we present some general results about the Carlet’s generalized Gray map, which will be used to prove the main results related to Z2s -linear Hadamard codes and given in next sections. Let ei be the vector that has 1 in the ith position and 0 otherwise. Let u, v ∈ Z2s and [u0 , u1 , . . . , us−1 ]2 , [v0 , v1 , . . . , vs−1 ]2 be the binary expansions of u and Ps−1 v, respectively. The operation “⊙” on Z2s is defined as u ⊙ v = i=0 2i ui vi . Note that the binary expansion of u ⊙ v is [u0 v0 , u1 v1 , . . . , us−1 vs−1 ]2 . Proposition 2.1 [20] Let u, v ∈ Z2s . Then, φ(u) + φ(v) = φ(u + v − 2(u ⊙ v)). Corollary 2.1 Let u ∈ Z2s and 0 ≤ p ≤ s − 1. Then, φ(u) + φ(2p ) = φ(u + 2p − 2p+1 up ), where [u0 , u1 . . . , us−1 ]2 is the binary expansion of u. 3 Corollary 2.2 Let u ∈ Z2s . Then, φ(u) + φ(2s−1 ) = φ(u + 2s+1 ). Lemma 2.1 Let u ∈ {2s−2 , . . . , 2s−1 − 1} ∪ {3 · 2s−2 , . . . , 2s − 1} ⊂ Z2s . Then, φ(u) + φ(2s−2 ) = φ(u + 2s−2 + 2s−1 ). Proof. By Proposition 2.1, we have that φ(u)+φ(2s−2 ) = φ(u+2s−2 −2(u⊙ 2 )). The binary expansion of 2s−2 is [0, . . . , 0, 1, 0]2 and, if u ∈ {2s−2 , . . . , 2s−1 − 1} ∪ {3 · 2s−2 , . . . , 2s − 1}, the binary expansion of u is [u0 , u1 , . . . , us−3 , 1, us−1 ]2 . Then, −2(u ⊙ 2s−2 ) = 2s−1 and the statement follows.  s−2 Corollary 2.3 Let v ∈ {2s−2 , 3 · 2s−2 } and U = {2s−2 , . . . , 2s−1 − 1} ∪ {3 · 2s−2 , . . . , 2s − 1} ⊂ Z2s . Then,  φ(u + v + 2s−1 ) if u ∈ U φ(u) + φ(v) = φ(u + v) if u ∈ Z2s \ U. Proof. Straightforward from Corollary 2.1 and Lemma 2.1.  Ps−2 Ps−2 Lemma 2.2 Let λi ∈ Z2 , i ∈ {0, . . . , s−2}. Then, i=0 λi φ(2i ) = φ( i=0 λi 2i ), where 2i ∈ Z2s . Proof. Let yi be the ith row of Y . By the definition of φ given by (1), Ps−2 Ps−2 Ps−2 we know that i=0 λi φ(2i ) = i=0 λi ei+1 Y = i=0 λi yi+1 = λY , where λ = Ps−2 i (λ0 , . . . , λs−2 ). Since [λ0 , . . . , λs−2 , 0]2 is the binary expansion of i=0 λi 2 , Ps−2 i then we have that λY = φ( i=0 λi 2 ).  Proposition 2.2 [7] Let u, v ∈ Z2s . Then, dH (φ(u), φ(v)) = wtH (φ(u − v)). Lemma 2.3 Let u ∈ Z2s . Then, dH (φ(u), φ(2s−1 )) + dH (φ(u), φ(0)) = 2s−1 . Proof. By the properties of the distance, we have that dH (φ(u), φ(2s−1 )) + dH (φ(u), φ(0)) = wtH (φ(2s−1 ) − φ(u)) + wtH (φ(u)). Then, since φ(2s−1 ) = 1, wtH (φ(2s−1 ) − φ(u)) = 2s−1 − wtH (φ(u)), and the result follows.  Corollary 2.4 Let u, v ∈ Z2s . Then, dH (φ(u), φ(v + 2s−1 )) + dH (φ(u), φ(v)) = 2s−1 . Proof. Straightforward from Corollary 2.1 and Lemma 2.3.  3 Construction of Z2s -Linear Hadamard Codes The description of a generator matrix having minimum number of rows for a Z4 -additive Hadamard code, as long as recursive constructions of these matrices, are given in [15]. In [14], these results are generalized for any s > 2. In 4 this section, we give another proof of the theorem that establishes that the constructed matrices generate Z2s -linear Hadamard codes, in the case that Carlet’s Gray map is considered. Let Ti = {j · 2i−1 : j ∈ {0, 1, . . . , 2s−i+1 − 1}} for all i ∈ {1, . . . , s}. Note that T1 = {0, . . . , 2s − 1}. Let t1 , t2 ,. . . ,ts be nonnegative integers with t1 ≥ 1. Consider the matrix At1 ,...,ts whose columns are of the form zT , z ∈ {1} × T1t1 −1 × T2t2 × · · · × Tsts . Example 3.1 For s = 3, for example, we have the following matrices:       11 1111 11111111 1,0,1 1,1,0 2,0,0 A = , A = , A = , 04 0246 01234567     1111 1111 11111111 11111111 A1,1,1 =  0 2 4 6 0 2 4 6  , A2,0,1 =  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7  , 0000 4444 00000000 44444444   11111111 11111111 11111111 11111111 A2,1,0 =  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7  . 00000000 22222222 44444444 66666666 Let 0, 1, 2, . . . , 2s − 1 be the vectors having the elements 0, 1, 2, . . . , 2s − 1 from Z2s repeated in each coordinate, respectively. The order of a vector u over Z2s , denoted by ord(u), is the smallest positive integer m such that mu = 0. Any matrix At1 ,...,ts can be obtained by applying the following iterative construction. We start with A1,0,...,0 = (1). Then, if we have a matrix A = At1 ,...,ts , for any i ∈ {1, . . . , s}, we may construct the matrix   A A ··· A Ai = . (2) 0 · 2i−1 1 · 2i−1 · · · (2s−i+1 − 1) · 2i−1 ′ ′ Finally, permuting the rows of Ai , we obtain a matrix At1 ,...,ts , where t′j = tj for j 6= i and t′i = ti + 1. Example 3.2 From the matrix A1,0,0 = (1), we obtain the matrix A2,0,0 ; and from A2,0,0 we can construct A2,0,1 , where A2,0,0 and A2,0,1 are the matrices given in Example 3.1. Note that we can also generate another matrix A2,0,1 as follows: from A1,0,0 = (1) we obtain the matrix A1,0,1 given in Example 3.1, and from A1,0,1 we can construct the matrix   1111111111111111 A1 =  0 4 0 4 0 4 0 4 0 4 0 4 0 4 0 4  . 0011223344556677 Then, after permuting the rows of A1 , we have the matrix   1111111111111111 A2,0,1 =  0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7  , 0404040404040404 which is different to the matrix A2,0,1 of Example 3.1. These two matrices A2,0,1 generate permutation equivalent codes. 5 Along this paper, we consider that the matrices At1 ,t2 ,...,ts are constructed recursively starting from A1,0,...,0 in the following way. First, we add t1 − 1 rows of order 2s , up to obtain At1 ,0,...,0 ; then t2 rows of order 2s−1 up to generate At1 ,t2 ,0,...,0 ; and so on, until we add ts rows of order 2 to achieve At1 ,t2 ,...,ts . t1 ,...,ts , where Let Ht1 ,...,ts be the Z2s -additive code generated by the P matrix A t1 , . . . , ts ≥ 0 with t1 ≥ 1. Let n = 2t−s+1 , where t = ( si=1 (s − i + 1) · ti ) − 1. It is easy to see that Ht1 ,...,ts is of length n and has |Ht1 ,...,ts | = 2s n = 2t+1 codewords. Note that this code is of type (n; t1 , t2 , . . . , ts ). Let H t1 ,...,ts = Φ(Ht1 ,...,ts ) be the corresponding Z2s -linear code. Example 3.3 The code H1,0,...,0 is generated by A1,0,...,0 = (1), so H1,0,...,0 = Z2s . This code has length n = 1, cardinality 2s and minimum distance 1. Thus, H 1,0,...,0 = Φ(H1,0,...,0 ) has length N = 2s−1 , cardinality 2N = 2s and minimum (Hamming) distance N/2 = 2s−2 , so it is a binary Hadamard code. Actually, H 1,0,...,0 = Φ(Z2s ) is the binary linear Hadamard code of length 2s−1 [7], or equivalently, the first order Reed-Muller code of length 2s−1 , denoted by RM (1, s − 1) [17, Ch.13 §3]. The result given by Theorem 3.1 is already proved in [14]. In that paper, it is shown that each Z2s -linear Hadamard code is equivalent to H t1 ,...,ts for some t1 , . . . , ts ≥ 0 with t1 ≥ 1, considering a generalized Gray map that includes the one given by Carlet. We present a new proof of this theorem, in the case that Carlet’s Gray map is considered. This new proof does not use neither the dual of the Z2s -additive codes nor another generalization of the Gray map for these dual codes, unlike the proof given in [14]. Let G be a generator matrix of a Z2s -additive code C of length n. Then, (G · · · G) is a generator matrix of the r-fold replication code of C, (C, . . . , C) = {(c, . . . , c) : c ∈ C}, of length r · n. Theorem 3.1 [14] Let t1 , . . . , ts be nonnegative integers with t1 ≥ 1. The Z2s t1 ,...,ts linear code H P of type (n; t1 , t2 , . . . , ts ) is a binary Hadamard code of length s t 2 , with t = ( i=1 (s − i + 1) · ti ) − 1 and n = 2t−s+1 . Proof. We prove this theorem by induction on the integers ti , i ∈ {1, . . . , s}. First, by Example 3.3, the code H 1,0,...,0 is a Hadamard code. Let H = Ht1 ,...,ts be the Z2s -additive code of length n generated by the matrix A = At1 ,...,ts . We assume that H = Φ(H) is a Hadamard code of length N = 2s−1 n. Let i ∈ {1, . . . , s}. Define Ai as in (2) and let Hi be the Z2s additive code generated by the matrix Ai . We have that Hi is permutation ′ ′ equivalent to Ht1 ,...,ts , where t′j = tj for j 6= i and t′i = ti + 1. Now, we shall prove that Hi = Φ(Hi ) is a Hadamard code. Note that Hi can be seen as the union of 2s−i+1 cosets of the 2s−i+1 -fold replication code of H, (H, . . . , H), which are (H, . . . , H) + r · wi , (3) for r ∈ {0, . . . 2s−i+1 −1}, where wi = (0, 2i−1 , 2·2i−1 , . . . , (2s−i+1 −1)·2i−1 ). The code H of length n has cardinality 2s n. It is easy to see that Hi has length ni = 2s−i+1 n and cardinality 22s−i+1 n. Therefore, the length of Hi = Φ(Hi ) is Ni = 2s−1 ni and the cardinality 2Ni . Now, we just have to prove that the minimum distance of Hi is Ni /2. 6 By Proposition 2.2, the minimum distance of Hi is equal to the minimum weight of Hi . Thus, we just have to check that the minimum weight of any coset (3) is Ni /2. When r = 0, we have that wtH (Φ((u, . . . , u))) = 2s−i+1 wtH (Φ(u)) = 2s−i+1 N/2 = Ni /2. Otherwise, when r 6= 0, we consider wtH (Φ((u, . . . , u) + r · wi )) = dH (Φ((u, . . . , u)), Φ(r · wi )). (4) Note that, by construction, the coordinates of any nonnegative multiple of wi can be partitioned into two multisets V and V ′ such that |V | = |V ′ | = 2s−i and there is a bijection from V to V ′ mapping any element v ∈ V into an element v′ ∈ V ′ such that v′ − v = 2s−1 . Therefore, (4) can be written as X X dH (Φ(u), Φ(v)) + dH (Φ(u), Φ(v′ )) = v′ ∈V ′ v∈V X dH (Φ(u), Φ(v)) + dH (Φ(u), Φ(v + 2s−1 )) = v∈V |V | · 2s−1 n = 2s−i 2s−1 n = Ni /2, (5) where (5) holds by Corollary 2.4.  Example 3.4 Let H2,0,0 be the Z8 -additive code generated by A2,0,0 given in Example 3.1. The Z8 -linear code H 2,0,0 = Φ(H2,0,0 ) has length N = 32, 2N = 64 codewords and minimum (Hamming) distance N/2 = 16. Therefore, it is a binary Hadamard code. 4 Kernel of Z2s -Linear Hadamard Codes The computation of the kernel and its dimension for Z4 -linear Hadamard codes is given in [15, 18]. In this section, we generalize these results for Z2s -linear Hadamard codes with s > 2. First, we establish when these codes are linear, and, in the case that they are nonlinear, we construct the kernel and compute its dimension. Proposition 4.1 The Z2s -linear Hadamard codes H 1,0,...,0 and H 1,0,...,0,1,0 , with s > 2, are linear. Proof. By Example 3.3, we know that H 1,0...,0 is linear. Now, we consider H = H1,0,...,0,1,0 and H = Φ(H). Recall that the code H is generated by   1 1 1 1 1,0,...,0,1,0 A = . 0 2s−2 2s−1 3 · 2s−2 Let β i = (2i , 2i , 2i , 2i ) for 0 ≤ i ≤ s − 1, β s = (0, 2s−1 , 0, 2s−1 ) and β s+1 = β i) : 0 ≤ (0, 2s−2 , 2s−1 , 3 · 2s−2 ). Let C be the linear code generated by B = {Φ(β Ps+1 β i ) ∈ C, where i ≤ s + 1}. Now, we prove that C ⊆ H. Let c = i=0 λi Φ(β λi ∈ Z2 . By Corollary 2.2, we only have to see that β s+1 ) + c′ = λs+1 Φ(β s−2 X i=0 7 β i ) ∈ H. λi Φ(β Ps−2 β i) = On the one hand, if λs+1 = 0, then we have that c′ ∈ H, since i=0 λi Φ(β Ps−2 Φ( i=0 λiβ i ) by Lemma 2.2. On the other hand, if λs+1 = 1, then we have Ps−2 that c′ = Φ((0, 2s−2 , 2s−1 , 3 · 2s−2 )) + Φ((u, u, u, u)), where u = i=0 λi 2i . Let U = {2s−2 , . . . , 2s−1 − 1} ∪ {3 · 2s−2 , . . . , 2s − 1} ⊂ Z2s . Then, by Corollary 2.3, c′ = Φ((0, 2s−2 , 2s−1 , 3 · 2s−2 ) + (u, u, u, u) + (0, 2s−1, 0, 2s−1 )) if u ∈ U , and c′ = Φ((0, 2s−2 , 2s−1 , 3 ·2s−2 )+ (u, u, u, u)) if u ∈ Z2s \ U . In both cases, c′ ∈ H. Since |C| = |H| = 2s+2 , then C = H, and thus H is linear.  Let u = (u1 , . . . , un ) ∈ Zn2s and [ui,0 , ui,1 , . . . , ui,s−1 ]2 be the binary expansion of ui , i ∈ {1, . . . , n}. Let p be an integer such that p ∈ {0, . . . , s − 1}. Then, we denote by u(p) the binary vector having in the ith coordinate the pth element of the binary expansion of ui , that is, u(p) = (u1,p , . . . , un,p ). Lemma 4.1 If v = 2b (0, 1, . . . , 2a − 1) ∈ Zn2s , with n = 2a and b ≤ s − 1, then wtH (v(p) ) = 2a−1 for all p ∈ {b, . . . , a + b − 1}. Proof. The 2a coordinates of v contain exactly the 2a elements of Z2s which have a binary expansion of the form [0, . . . , 0, vb , vb+1 , . . . , va+b−1 , 0, . . . , 0]2 with vp ∈ {0, 1}, for all p ∈ {b, . . . , a + b − 1}. Note that we have 2a different elements of Z2s , represented by exactly a binary coordinates. Hence, half of the coordinates of v satisfy that vp = 1 and the other half that vp = 0. Therefore, wtH (v(p) ) = 2a /2 = 2a−1 for all p ∈ {b, . . . , a + b − 1}.  As shown in [15], the codes H 1,t2 and H 2,t2 , t2 ≥ 0, are the only Z4 -linear Hadamard codes which are linear. In [11], it is proved that the codes H 1,0,...,0,ts , ts ≥ 0, are linear. The next result shows that, for s > 2 and ts ≥ 0, the codes H 1,0,...,0,1,ts and H 1,0,...,0,ts are linear, and they are the only Z2s -linear Hadamard codes which are linear. Theorem 4.1 The codes H 1,0,...,0,1,ts and H 1,0,...,0,ts , with s > 2 and ts ≥ 0, are the only Z2s -linear Hadamard codes which are linear. Proof. First, we show that these codes are linear by induction on ts . By Proposition 4.1, the codes H 1,0,...,0 and H 1,0,...,0,1,0 are linear. We assume that H = Φ(H), where H = H1,0,...,0,ts−1 ,ts , ts−1 ∈ {0, 1} and ts ≥ 0, is linear. Now, we prove that Hs = H 1,0,...,0,ts−1 ,ts +1 is linear. Since H is a linear Hadamard code of length 2ts +2ts−1 −1 , it is the Reed-Muller code RM (1, ts + 2ts−1 − 1) [17, Ch.13 §3]. By the iterative construction (2), we have that Hs = {Φ((h, h) + (0, v)) : h ∈ H, v ∈ {0, 2s−1 }}. By Corollary 2.2, Hs = {(Φ(h), Φ(h) + Φ(v)) : h ∈ H, v ∈ {0, 2s−1}} = {(h′ , h′ + v′ ) : h′ ∈ H, v′ ∈ {0, 1}}, which corresponds to the Reed-Muller code RM (1, ts + 2ts−1 ). Therefore, Hs is linear. Now, we prove the nonlinearity of H = Φ(H), where H = H1,0,...,0,2,0 . Let r = (0, 2s−2 , 2s−1 , 3 · 2s−2 ). Recall that H has length 16 and is generated by   1 1 1 1 . r r r A1,0,...,0,2,0 =  r s−2 s−1 s−2 0 2 2 3·2 By Corollaries 2.2 and 2.3, we have Φ((r, r, r, r))+Φ((0, 2s−2 , 2s−1 , 3 · 2s−2 )) = Φ(z), where z = (r, r, r, r) + (0, 2s−2 , 2s−1 , 3 · 2s−2 ) + (0, u, 0, u) and u = 8 (0, 2s−1 , 0, 2s−1 ). Since H is linear over Z2s , z ∈ H if and only if (0, u, 0, u) ∈ H. Since wtH (Φ((0, u, 0, u))) = 4 · 2s−1 = N/4, where N is the length of H, Φ((0, u, 0, u)) 6∈ H, so Φ(z) 6∈ H. Therefore, H = H 1,0,...,0,2,0 is nonlinear. Let H = Φ(H), where H = Ht1 ,...,ts . For any i ∈ {1, . . . , s}, we define ′ ′ Hi = Φ(Hi ), where Hi = Ht1 ,...,ts , t′i = ti + 1 and t′j = tj for j 6= i. Next, we consider H = Φ(H), where H = H1,0,...,0 , and we prove that Hi is nonlinear for any i ∈ {1, . . . , s−2}. Note that the generator matrix of Hi has two rows: w1 = 1 and w2 = 2i−1 (0, 1, . . . , 2s+1−i − 1). By Corollary 2.1, we know (i−1) that Φ(w2 )+Φ(2i−1 ) = Φ(w2 +2i−1 −2i w2 ). Therefore, we just need to show (i−1) (i−1) i that 2 w2 6∈ Hi . We have that wtH (w2 ) = 2s−i by Lemma 4.1. Since (i−1) i s−1 i s−2 2 6∈ {0, 2 }, wtH (φ(2 )) = 2 . Then, wtH (Φ(2i w2 )) = 2s−i · 2s−2 = 2s−2−i t 2 . Recall that the length of H is N = 2 , where t = 2s − i. Therefore, we (i−1) (i−1) have that wtH (Φ(2i w2 )) = 2t−2 = N/4, and then Φ(2i w2 ) 6∈ Hi . Finally, in general, for H = Φ(H), where H = Ht1 ,...,ts , we prove that if H is nonlinear, then Hi is nonlinear for any i ∈ {1, . . . , s}. Assume that Hi is linear. Then, by the iterative construction (2), for any u, v ∈ H, we have that (u, . . . , u), (v, . . . , v) ∈ Hi . Moreover, since Hi is linear, Φ((u, . . . , u)) + Φ((v, . . . , v)) = Φ((a, . . . , a) + λ · 2i−1 (0, 1, . . . , 2s−i+1 − 1)) ∈ Hi , where a ∈ H and λ ∈ Z2s . Therefore, Φ(u) + Φ(v) = Φ(a) ∈ H, and we have that H is linear and the result follows.  Let At1 ,...,ts be the generator matrix of Ht1 ,...,ts , considered along this paper, and let wi be the ith row vector of At1 ,...,ts . By construction, w1 = 1 and ord(wi ) ≤ ord(wj ) if i > j. We define σ ∈ {1, . . . , s} as the integer such that ord(w2 ) = 2s+1−σ . Note that σ = 1 if t1 > 1, and σ = min{i : ti > 0, i ∈ {2, . . . , s}} if t1 = 1. In the case σ = s, the code is H1,0,...,0,ts , which is linear. Example 4.1 Considering all nonnegative integer solutions with t1 ≥ 1 of the equation 5 = 3t1 + 2t2 + t3 − 1, we have that the Z8 -linear Hadamard codes of length 2t = 32 are the following: H 1,0,3 , H 1,1,1 and H 2,0,0 . By Theorem 4.1, we have that H 1,0,3 and H 1,1,1 are linear, so ker(H 1,0,3 ) = ker(H 1,1,1 ) = 6. By the same theorem, we also have that H 2,0,0 is nonlinear, so ker(H 2,0,0 ) < 6. Proposition 4.2 Let H = Ht1 ,...,ts be the Z2s -additive Hadamard code of type (n; t1 , . . . , ts ) such that Φ(H) is nonlinear. Let Hb be the subcode of H which contains all the codewords of order two. Let P = {2p }σ−2 p=0 if σ ≥ 2, and P = ∅ if σ = 1. Then, + * s−2 X 2i ) ⊆ K(Φ(H)) Φ(Hb ), Φ(P ), Φ( i=0 and ker(Φ(H)) ≥ σ + Ps i=1 ti . P Proof. Let H = Φ(H) and τ = si=1 ti . Let Q = {(ord(wq )/2)wq }τq=0 . Since Hb contains all the elements of H of order two, we have that the set Φ(Q) is a base for the binary linear subcode Hb = Φ(Hb ) of H. By Corollary 2.2, for all b ∈ Hb and u ∈ H, we have that Φ(b) + Φ(u) = Φ(b + u) ∈ H and, therefore, Hb ⊆ K(H). Assume σ ≥ 2. Now, we prove that Φ(2p ) ∈ K(H) for all p ∈ {0, . . . , σ − 2}. Equivalently, we show that Φ(2p ) + Φ(u) ∈ H for all u ∈ H. If u ∈ H, 9 then u = λ · 1 + u′ , where λ ∈ Z2s and ord(u′ ) ≤ ord(w2 ) = 2s+1−σ . Let u = (u1 , . . . , un ) ∈ Zn2s and [ui,0 , ui,1 , . . . , ui,s−1 ]2 be the binary expansion of ui , i ∈ {1, . . . , n}. Let [λ0 , λ1 , . . . , λs−1 ]2 be the binary expansion of λ ∈ Z2s . By Corollary 2.1, we have that Φ(2p ) + Φ(u) = Φ(2p + u − 2p+1 u(p) ), where u(p) = (u1,p , . . . , un,p ). Note that if v ∈ Z2s is of order 2j , then its binary expansion is of the form [0, . . . , 0, 1, vs−j+1 , . . . , vs−1 ]2 . Since p ∈ {0, . . . , σ − 2} and ord(u′ ) ≤ 2s+1−σ , we have that u(p) = (λp , . . . , λp ). Therefore, 2p+1 u(p) = λp 2p+1 ∈ H and Φ(2p ) + Φ(u) = Φ(2p + u − λp 2p+1 ) ∈ H. Ps−2 Next, we show that Φ( i=0 2i ) ∈ K(H). Let u = (u1 , . . . , un ) ∈ H and v = Ps−2 i (v1 , . . . , vn ) = i=0 2 . First, we prove that φ(vi ) + φ(ui ) = φ(vi + ui − 2ui ) for all i ∈ {1, . . . , n}. Note that the binary expansion of vi and ui are [1, . . . , 1, 0]2 and [ui,0 , ui,1 , . . . , ui,s−1 ]2 , respectively. Then, it is easy to check that 2(vi ⊙ ui ) = 2ui . Therefore, by Proposition 2.1, φ(vi ) + φ(ui ) = φ(vi + ui − 2ui ). Hence, Φ(v) + Φ(u) = Φ(v + u − 2u) ∈ H for all u ∈ H. Ps−2 Finally, we have to see that the elements of the set {Φ(Q), Φ(P ), Φ( i=0 2i )} are linearly independent. By construction, the generator matrix At1 ,...,ts is a block upper triangular matrix, so it is easy to see that the codewords in Φ(Q) Ps−2 are linearly independent of the ones in {Φ(P ), Φ( i=0 2i )}. Note that σ < s since H is nonlinear. Ps−2 Thus, by Lemma 2.2, it is easy to see that the codewords in {Φ(P ), Φ( i=0 2i )} are linearly independent. Therefore, we have that the dimension of the linear span of this set is σ + τ , so ker(H) ≥ σ + τ .  Ps−1 Lemma 4.2 Let v ∈ Z2s and λi ∈ Z2 , i ∈ {0, . . . , s−1}. Then, v⊙ i=0 λi 2i = Ps−1 i i=0 v ⊙ λi 2 . Proof. Let v ∈ Z2s and [v0 , v1 , . . . , vs−1 ]2 its binary expansion. By definiPs−1 Ps−1 tion, we have that v ⊙ i=0 λi 2i = i=0 vi λi 2i . Note that vi λi 2i = v ⊙ λi 2i , Ps−1 Ps−1 so v ⊙ i=0 λi 2i = i=0 v ⊙ λi 2i .  Lemma 4.3 Let H = Ht1 ,...,ts be the Z2s -additive Hadamard code of type (n; t1 , Ps−2 Ps−2 . . . , ts ). Let N = { i=σ−1 λi 2i : λi ∈ Z2 } \ { i=σ−1 2i } if σ ≤ s − 1. Then, Φ(N ) ∩ K(Φ(H)) = {0}. Ps−2 Proof. Let H = Φ(H). Let u = i=σ−1 λi 2i ∈ N such that Φ(u) ∈ K(H). We want to prove that u = 0. By construction, the second row w2 of At1 ,...,ts is a 2t−2s+σ -fold replication of v = 2σ−1 (0, 1, . . . , 2s+1−σ − 1), and ord(w2 ) = 2s+1−σ . By Proposition 2.1, we have that Φ(w2 ) + Φ(u) = Φ(w2 + u − 2(w2 ⊙ u)). Since Φ(u) ∈ K(H), 2(w2 ⊙ u) ∈ H. Note that, by Lemma 4.2, we have that 2(w2 ⊙ u) = Ps−2 Ps−2 (i) i i 2 i=σ−1 wP 2 ⊙ λi 2 = 2 i=σ−1 λi w2 2 ∈ H. s Let τ = i=1 ti . If τ = 2, then H has length 2s+1−σ and the only vectors in At1 ,...,ts are 1 and w2 = v. If τ ≥ 3, for i ∈ {3, . . . , τ }, the ith row wi of At1 ,...,ts contains zeros in the first 2s+1−σ coordinates by construction. Since σ ≤ s − 1, τ ≥ 2, and hence any element of H restricted to the first 2s+1−σ coordinates is Ps−2 (i) λi w2 2i of the form µ1 1 + µ2 v for some µ1 , µ2 ∈ Z2s . We have that 2 i=σ−1 P s−2 restricted to the first 2s+1−σ coordinates is 2 i=σ−1 λi v(i) 2i , so we have to Ps−2 find µ1 , µ2 ∈ Z2s such that 2 i=σ−1 λi v(i) 2i = µ1 1 + µ2 v. 10 Since the first coordinate of v is 0, the first coordinate of v(i) is 0 for all Ps−2 i. Then, we have that µ1 = 0, so 2 i=σ−1 λi v(i) 2i = µ2 v. Note that v = Ps−1 Ps−1 (i) i Ps−1 Ps−2 (i) i (i) i (i) i i=σ−1 v 2 . i=0 v 2 = i=σ−1 v 2 . Therefore, 2 i=σ−1 λi v 2 = µ2 Since u ∈ N , there exists j ∈ {σ − 1, . . . , s − 2} such that λj = 0. Then, regrouping the terms, we obtain that s−2 X (µ2 − 2λi )v(i) 2i + µ2 v(j) 2j + µ2 v(s−1) 2s−1 = 0. i=σ−1 i6=j s−1 Note that {v(i) }i=σ−1 is a subset of a basis of the RM (1, t). Then, we have i that (µ2 − 2λi )2 = 0, for i ∈ {σ − 1, · · · , s − 2} \ {j}, µ2 2j = 0 and µ2 2s−1 = 0. As a result, µ2 = 0 and λi = 0 for all i ∈ {σ − 1, · · · , s − 2}. Hence, u = Ps−2 i i=σ−1 λi 2 = 0, and the result holds.  code of type (n; t1 , Lemma 4.4 Let H = Ht1 ,...,ts be the Z2s -additive Hadamard P . . . , ts ). Let wi be the ith row of At1 ,...,ts and τ = si=1 ti . Let M = {v = Ps−2 Ps−2 Pτ −ts i i i=σ−1 λi 2 : λi ∈ Z2 }\{ i=σ−1 2 } i=2 λi wi : λi ∈ Z2s , ord(v) > 2}, N = { if σ ≤ s − 1 and M + N = {vM + vN : vM ∈ M ∪ {0}, vN ∈ N }. Then, Φ(M + N ) ∩ K(Φ(H)) = {0}. Proof. Let H = Φ(H), which has length N = 2t = n · 2s−1 . By Lemma 4.3, we already know that Φ(N )∩K(H) = {0}. Now, we prove that Φ(M)∩K(H) = ∅. Pτ −ts s+1−σ Let v = , i=2 λi wi ∈ M. Since ord(v) > 2 and ord(wi ) ≤ 2 p ord(v) = 2 for some 2 ≤ p ≤ s + 1 − σ. By the iterative construction (2) of At1 ,...,ts , we know that all the elements of Z2s of order equal to or less than 2p appear as a coordinate of v. Moreover, exactly half of the coordinates of v are of order 2p . We consider two cases depending on the value of p. First, we consider that 2 < p ≤ s + 1 − σ. We have that Φ(v) + Φ(2s−p ) = Φ(v + 2s−p − 2s−p+1 v(s−p) ) by Corollary 2.1. As before, it is enough to see that 2s−p+1 v(s−p) 6∈ H to prove that Φ(v) 6∈ K(H). Since half of the coordinates of v are of order 2p and the other half are of order less than 2p , we have that half of the coordinates of 2s−p+1 v(s−p) are equal to 2s−p+1 and the rest of coordinates are zero. Note that 2s−p+1 6∈ {0, 2s−1 } since p > 2. Therefore, since wtH (φ(2s−p+1 )) = 2s−2 , we have that wtH (Φ(2s−p+1 v(s−p) )) = n/2 · 2s−2 = 2t−2 = N/4 and hence Φ(v) 6∈ K(H). Next, we consider that p = 2, that is, ord(v) = 4. Then, ord(λi wi ) = 4 or λi = 0 for all i ∈ {2, . . . , τ − ts }. By Proposition 2.1, Φ(v) + Φ(2s−σ−1 w2 ) = Φ(v + 2s−σ−1 w2 − 2(v ⊙ 2s−σ−1 w2 )). Again, it is enough to see that 2(v ⊙ 2s−σ−1 w2 ) 6∈ H to show that Φ(v) 6∈ K(H). Note that 2s−σ−1 w2 is a 2t−s−1 fold replication of b1 = (0, 2s−2 , 2s−1 , 3·2s−2 ). Now, we consider the coordinates divided into groups of 4 consecutive coordinates, which will be referred to as blocks. Note that every block of λi wi contains the same value in its 4 coordinates, for all i ∈ {3, . . . , τ − ts }. If λ2 = 0, then every block of v also contains the same value in its 4 coordinates. Thus, every block in 2(v ⊙ 2s−σ−1 w2 ) is of the form 2(k ⊙ b1 ) for some 11 k ∈ {0, 2s−2 , 2s−1 , 3 · 2s−2 }. We have that  (0, 0, 0, 0) if k ∈ {0, 2s−1 } 2(k ⊙ b1 ) = s−1 s−1 (0, 2 , 0, 2 ) if k ∈ {2s−2 , 3 · 2s−2 }. By construction, note that v contains the same number of blocks k for each k ∈ {0, 2s−2 , 2s−1 , 3 · 2s−2}. Then, it is easy to see that wtH (Φ(2(v ⊙ 2s−σ−1 w2 ))) = wtH (φ(2s−1 )) · 4 · n/16 = 2s−1 · n/4 = 2t−2 = N/4, so Φ(v) 6∈ K(H) in this case. Otherwise, if λ2 6= 0, then every block of v is of the form bi + k, for some i ∈ {1, 2} and k ∈ {0, 2s−2 , 2s−1 , 3 · 2s−2 }, where b1 = (0, 2s−2 , 2s−1 , 3 · 2s−2 ) and b2 = (0, 3 · 2s−2 , 2s−1 , 2s−2 ). Then, we have that  (0, 0, 0, 0) if k ∈ {2s−2 , 3 · 2s−2 } 2((bi + k) ⊙ b1 ) = s−1 s−1 (0, 2 , 0, 2 ) if k ∈ {0, 2s−1 }, for i ∈ {1, 2}. Again, by construction, v contains the same number of blocks bi + k for each k ∈ {0, 2s−2 , 2s−1 , 3 · 2s−2 }. Therefore, as before, wtH (Φ(2(v ⊙ 2s−σ−1 w2 ))) = N/4, and Φ(v) 6∈ K(H). We have just shown that Φ(M) ∩ K(H) = ∅. Now, we prove that Φ(M + N ) ∩ K(H) = {0}. Let v = vM + vN ∈ M + N \{0}, where vM ∈ M and vN ∈ N . We just proved that Φ(v) 6∈ K(H) if vM = 0 or vN = 0. Therefore, we can assume that vM 6= 0 and vN 6= 0. We know that vN = (v, . . . , v). Let [v0 , v1 , . . . , vs−1 ]2 be the binary expansion of v. Let vN1 and vN2 be the elements of Z2s having binary expansion [0, . . . , 0, vs−p , . . . , vs−1 ]2 and [v0 , . . . , vs−p−1 , 0, . . . , 0]2 , respectively. Then, vN = vN1 +vN2 , where vNi = (vNi , . . . , vNi ) for i ∈ {1, 2}. Since ord(vM ) = 2p with 2 ≤ p ≤ s + 1 − σ, the binary expansion of each one of its coordinates of is of the form [0, . . . , 0, (vM )s−p , . . . , (vM )s−1 ]2 . Note that we also have that ord(vN1 ) ≤ ord(vM ) by construction. On the one hand, we consider 2 < p ≤ s + 1 − σ. It is easy to see that 2(vN2 ⊙ 2s−p ) = 0. Therefore, wtH (Φ(2(v ⊙ 2s−p ))) = wtH (Φ(2((vM + vN1 ) ⊙ 2s−p ))). Since ord(vN1 ) ≤ ord(vM ), it is easy to see that there exists a permutation of coordinates π such that π(vM + vN1 ) = vM . Thus, wtH (Φ(2((vM + vN1 ) ⊙ 2s−p ))) = wtH (Φ(2(vM ⊙ 2s−p ))) and the result holds by using the same arguments as above. On the other hand, we consider that p = 2. Note that ord(vM ) = 4, and then ord(vN1 ) = 4. It is easy to see that 2(vN2 ⊙ 2s−σ−1 w2 ) = 0, hence we have that wtH (Φ(2(v ⊙ 2s−σ−1 w2 ))) = wtH (Φ(2((vM + vN1 ) ⊙ 2s−σ−1 w2 ))). Recall t−s−1 that 2s−σ−1 -fold replication of b1 . Taking into account that 2 is the 2 Pτ −tw s vM = i=2 λi wi , note that the blocks of vM + vN1 are of the form k for some k ∈ {0, 2s−2 , 2s−1 , 3·2s−2 } if λ2 = 0; or bi +k for some k ∈ {0, 2s−2 , 2s−1 , 3·2s−2 } and i ∈ {1, 2} if λ2 6= 0. Therefore, the proof is analogous to the above one to show that Φ(v) 6∈ K(H) with v ∈ M. Then, the result holds.  Theorem 4.2 Let H = Ht1 ,...,ts be the Z2s -additive Hadamard code of type (n; t1 , . . . , ts ) such that Φ(H) is nonlinear. Let Hb be the subcode of H which contains all the codewords of order two. Let P = {2p }σ−2 p=0 if σ ≥ 2, and P = ∅ if σ = 1. Then, + * s−2 X i 2 ) = K(Φ(H)) Φ(Hb ), Φ(P ), Φ( i=0 12 and ker(Φ(H)) = σ + Ps i=1 ti . Proof. The result follows by Proposition 4.2 and Lemma 4.4.  Corollary 4.1 Let H = Ht1 ,...,ts be the Z2s -additive Hadamard code of type (n; t1P , . . . , ts ) such that Φ(H) is nonlinear. Let wi be the ith row of At1 ,...,ts and s τ = i=1 ti . Let Q = {(ord(wq )/2)wq }τq=0 and P = {2p }σ−2 p=0 if σ ≥ 2, and Ps−2 i P = ∅ if σ = 1. Then, {Φ(Q), Φ(P ), Φ( i=0 2 } is a basis of K(Φ(H)). Example 4.2 Let H 2,0,0 be the Z8 -linear Hadamard code considered in Example 3.4. By Theorem 4.2, we have that ker(H 2,0,0 ) = 3. Moreover, we can construct K(H 2,0,0 ) from a basis, by Corollary 4.1. First, we have that Q = {4, (0, 4, 0, 4, 0, 4, 0, 4)}. Since σ = 1, in this case, we have that P = ∅. Thus, K(H 2,0,0 ) = hΦ(4), Φ((0, 4, 0, 4, 0, 4, 0, 4)), Φ(3)i. 5 Classification of Z2s -Linear Hadamard Codes The classification of the Z4 -linear Hadamard codes of length 2t , for any t ≥ 3, using the rank or the dimension of the kernel is shown in [15, 18]. In this section, we show that the dimension of the kernel can not be used to establish a complete classification of the Z2s -linear Hadamard codes of length 2t , in general, for any t ≥ 3 and s > 2. However, we see that this invariant allows us to show some partial results on the classification of these codes, through some examples. First of all, recall that, for any t ≥ 3, only the Z4 -linear Hadamard codes H 1,t2 and H 2,t2 of length 2t are linear [15], so these are equivalent to the ReedMuller code RM (1, t). By Theorem 4.1, for any t ≥ 3 and s > 2, there are also at most two Z2s -linear Hadamard codes of length 2t , H 1,0,...,0,1,ts and H 1,0,...,0,ts , that are linear. Moreover, the following result implies that we can focus on t ≥ 5 and 2 ≤ s ≤ t − 2 to try to classify the nonlinear ones. Theorem 5.1 Let At,s be the number of nonequivalent Z2s -linear Hadamard codes of length 2t . Then,   0 if t ≥ 3 and s ≥ t + 2 1 if t ≥ 3 and s ∈ {t − 1, t, t + 1} At,s =  1 if t = 4 and s = 2, and the Z2s -linear Hadamard code is linear when At,s = 1. Moreover, if t ≥ 5 and 2 ≤ s ≤ t − 2, then At,s ≥ 2, and there is one which is linear and at least one which is nonlinear. Proof. First, if t ≥ 3 and s ≥ t + 2, then the equation t= s X i=1  (s − i + 1) · ti − 1, (6) with t1 ≥ 1, has not any nonnegative integer solution, so At,s = 0. If t ≥ 3 and s = t + 1, then (6) has only one solution (t1 , . . . , ts ) = (1, 0, . . . , 0). If t ≥ 3 and 13 s = t, (6) has only the solution (1, 0, . . . , 0, 1). If t ≥ 3 and s = t − 1, (6) has exactly two solutions (1, 0, . . . , 0, 2) and (1,0,. . . ,0,1,0). Note that, when t = 3 and s = 2, both solutions are (1, 2) and (2, 0). By Theorem 4.1, for all the above solutions, we obtain a linear code H t1 ,...,ts . Finally, if t ≥ 5 and 2 ≤ s ≤ t−2, (6) always has the solutions (1, 0, . . . , 0, t− s + 1) and (1, 0, . . . , 0, 1, t − s − 1), which give a linear code. However, for these cases, there is at least another solution. On the one hand, if s = 2, At,s = ⌊(t−1)/2⌋ ≥ 2 since t ≥ 5 [15]. On the other hand, if s = 3, (2, 0, · · · , 0, t−2s+1) is a solution since t ≥ 2s − 1 when t ≥ 5; and if s ≥ 4, (1, 0, · · · , 0, 1, 0, t − s − 2) is a solution. Therefore, for all the cases, At,s ≥ 2 by Theorem 4.1.  The following example shows that the dimension of the kernel can not be used, in general, to classify completely all nonlinear Z2s -linear Hadamard codes of length 2t , once t ≥ 5 and 2 < s ≤ t − 2 are fixed. Example 5.1 The Z8 -linear Hadamard codes of length 2t = 256 are the following: H 1,0,6 , H 1,1,4 , H 1,2,2 , H 1,3,0 , H 2,0,3 , H 2,1,1 and H 3,0,0 . The first two are equivalent as they are linear by Theorem 4.1. The remaining ones have kernels of dimension 7, 6, 6, 5 and 4, respectively, by Theorem 4.2. Therefore, by using this invariant, we can say that all of them are nonequivalent, with the exception of H 1,3,0 and H 2,0,3 which have the same dimension of the kernel. For these two codes, by using the computer algebra system Magma [6], we have computed that rank(H 1,3,0 ) = 12 and rank(H 2,0,3 ) = 11, so they are also nonequivalent. Actually, all these nonlinear codes have ranks 10, 12, 11, 13 and 17, respectively, so we can use the rank instead of the dimension of the kernel to classify completely the Z8 -linear Hadamard codes of length 256. As shown in the next example, for some values of t ≥ 5 and 2 < s ≤ t−2, it is indeed possible to establish a complete classification by using just the dimension of the kernel, like it happens for any t ≥ 5 and s = 2 [15]. Example 5.2 By Theorem 4.2, it is possible to check that for any 5 ≤ t ≤ 7 and 2 ≤ s ≤ t − 2, all nonlinear Z2s -linear Hadamard codes of length 2t have a different dimension of the kernel, so this invariant allows us to classify them. For t = 8, t = 9, t = 10 and t = 11, it also works, except when s ∈ {3}, s ∈ {3, 4}, s ∈ {3, 4, 5} and s ∈ {3, 4, 5, 6}, respectively. For these given values of t and s, we can just obtain a partial classification by using the kernel. By using Magma, we have also computed the rank of the nonlinear Z2s -linear Hadamard codes of length 2t , for any 5 ≤ t ≤ 11 and 2 ≤ s ≤ t − 2. Tables 1 and 4 show the values of (t1 , . . . , ts ) and the pair (r, k), where r is the rank and k the dimension of the kernel, for all nonlinear Z2s -linear Hadamard codes of length 2t , for 5 ≤ t ≤ 10. Note that the results given by Example 5.1, and Example 5.2 for 5 ≤ t ≤ 10, can also be checked by looking at these tables. These tables also show that all nonlinear Z2s -linear Hadamard codes of length 2t have a different value of the rank, once 5 ≤ t ≤ 10 and 2 ≤ s ≤ t − 2 are fixed. Therefore, for these cases, as in Example 5.1, we have that the codes are pairwise nonequivalent, so we have a complete classification by using the rank and we can establish the following result. 14 Z4 t=5 (t1 , . . . , ts ) (r, k) (3, 0) (7,4) (2, 0, 0) t=6 (t1 , . . . , ts ) (r, k) (3, 1) (8,5) (8,3) (1, 2, 0) (2, 0, 1) (8,5) (9,4) (1, 1, 0, 0) (9,4) Z8 Z16 Z32 t=7 (t1 , . . . , ts ) (3, 2) (4, 0) (1, 2, 1) (2, 0, 2) (2, 1, 0) (1, 0, 2, 0) (1, 1, 0, 1) (2, 0, 0, 0) (1, 0, 1, 0, 0) (r, k) (9,6) (11,5) (9,6) (10,5) (12,4) (9,6) (10,5) (14,3) (10,5) Table 1: Rank and kernel for all nonlinear Z2s -linear Hadamard codes of length 2t . Theorem 5.2 Let At,s be the number of nonequivalent Z2s -linear Hadamard codes of length 2t . Then, for any t ≥ 3 and 2 ≤ s ≤ t − 1, At,s ≤ |{(t1 , . . . , ts ) ∈ Ns : t = s X i=1  (s − i + 1) · ti − 1, t1 ≥ 1}| − 1. Moreover, for any 3 ≤ t ≤ 11 and 2 ≤ s ≤ t − 1, this bound is tight. Proof. Straightforward from Theorem 4.1, the proof of Theorem 5.1, Tables 1 and 4, and further computations by using Magma for t = 11.  By Theorems 5.2 and 5.1 (or Tables 1 and 4), we can obtain exactly the number of nonequivalent Z2s -linear Hadamard codes of length 2t , for some values of t and s. Table 2 shows these numbers, for 3 ≤ t ≤ 11 and 2 ≤ s ≤ 9. The cases where the dimension of the kernel is not enough to classify these codes are shown in bold type. However, in all these cases, the rank can be used to obtain the classification. t Z4 Z8 Z16 Z32 Z64 Z128 Z256 Z512 3 1 1 1 0 0 0 0 0 4 1 1 1 1 0 0 0 0 5 2 2 1 1 1 0 0 0 6 2 3 2 1 1 1 0 0 7 3 4 4 2 1 1 1 0 8 3 6 5 4 2 1 1 1 9 4 7 8 6 4 2 1 1 10 4 9 10 9 6 4 2 1 11 5 11 14 12 10 6 4 2 Table 2: Number At,s of nonequivalent Z2s -linear Hadamard codes of length 2t . The values of At,2 given in Table 2 where already proved in [15]. Specifically, in that paper, it is shown that there are ⌊ t−1 2 ⌋ nonequivalent Z4 -linear Hadamard codes of length 2t for all t ≥ 3. Next, we focus on establishing 15 some relationships between the already known Z2s -linear Hadamard codes with s = 2 and the ones with s > 2, once only the length 2t is fixed. First, Example 5.3 shows that there are Z2s -linear Hadamard codes, with s > 2, which are not equivalent to any Z4 -linear Hadamard code. Then, Example 5.4 also shows that there are Z4 -linear Hadamard codes which are not equivalent to any Z2s -linear Hadamard codes with s > 2. Example 5.3 Let H 2,0,0 be the Z8 -linear Hadamard code of length 32 considered in Examples 3.4 and 4.2. Recall that ker(H 2,0,0 ) = 3 by Theorem 4.2, and hence H 2,0,0 is nonlinear. It is known that there are three Z4 -linear Hadamard codes of length 32, H 1,4 , H 2,2 and H 3,0 . The first two are linear, and the last one has ker(H 3,0 ) = 4 by Theorem 4.2 or [15]. Hence, there is no Z4 -linear Hadamard code equivalent to the Z8 -linear Hadamard code H 2,0,0 . Example 5.4 By Table 1, for t = 5, there are only two nonlinear Z2s -linear Hadamard codes, H 3,0 and H 2,0,0 . In Example 5.3, we have seen that they are not equivalent, since they have different dimension of the kernel. Other examples like this one can be found when t is odd. For example, by Tables 1 and 4 and further computations in Magma, for t = 7, t = 9 and t = 11, there are Z4 -linear Hadamard codes, H 4,0 , H 5,0 and H 6,0 , respectively, which are not equivalent to any Z2s -linear Hadamard codes with s > 2 of the same length, by using both invariants, the rank and the dimension of the kernel. It is also worth to mention that there are Hadamard codes, called Z2 Z4 linear Hadamard codes, which came from the image of a generalized Gray map β of subgroups of Zα 2 × Z4 . Note that if α = 0, they correspond to Z4 -linear Hadamard codes. More information on Z2 Z4 -linear codes in general can be found in [5]. The classification of Z2 Z4 -linear Hadamard codes of length 2t with α 6= 0 is given in [18], where it is shown that there are ⌊ 2t ⌋ nonequivalent of such codes, for all t ≥ 3; and either the rank or the dimension of the kernel can be used to classify them, like for Z4 -linear Hadamard codes. Recall that there t are ⌊ t−1 2 ⌋ nonequivalent Z4 -linear Hadamard codes of length 2 for all t ≥ 3 [15]. However, in [16], it is shown that each Z2 Z4 -linear Hadamard code with α = 0, that is, each Z4 -linear Hadamard code, is equivalent to a Z2 Z4 -linear Hadamard code with α 6= 0, so there are only ⌊ 2t ⌋ nonequivalent Z2 Z4 -linear Hadamard codes of length 2t . The following example shows that there are Z2 Z4 -linear Hadamard codes (with α 6= 0) which are not equivalent to any Z2s -linear Hadamard codes with s ≥ 2. Example 5.5 For t = 4, there is a Z2 Z4 -linear Hadamard code (with α 6= 0) which is not equivalent to any Z4 -linear Hadamard code [16]. This code has parameters (r, k) = (6, 3) [18], so it is not equivalent to any Z2s -linear Hadamard code with s ≥ 2, since all of them are linear by Theorem 5.1. Other examples like this one can be found when t is even. For example, for t = 6, t = 8 and t = 10, there is also a Z2 Z4 -linear Hadamard code (with α 6= 0) which is not equivalent to any Z4 -linear Hadamard code [16]. They have parameters (10, 4), (15, 5) and (21, 6) [18], respectively, so again they are not equivalent to any Z2s linear Hadamard code with s ≥ 2 of length 26 , 28 and 210 , respectively, by Tables 1 and 4. 16 Finally, we focus on establishing how many nonequivalent Z2s -linear Hadamard codes of length 2t there are, once only the length 2t is fixed for some values of t. First, we give some lower and upper bounds. From Tables 1 and 4, and further computations in Magma for t = 11, we can determine a lower bound (K) taking into account just the dimension of the kernel. This lower bound can be improved (RK) if we consider both invariants, the rank and the dimension of the kernel. These results are summarized in Table 3, where we give these bounds for all 3 ≤ t ≤ 11. t lower bound K lower bound RK upper bound 3 1 1 1 4 1 1 1 5 3 3 3 6 3 3 5 7 5 6 10 8 5 7 16 9 7 11 26 10 7 13 38 11 9 20 57 Table 3: Bounds for the number At of nonequivalent Z2s -linear Hadamard codes of length 2t . An upper bound can be given easily by considering all nonequivalent Z2s linear Hadamard codes of length 2t , once t and s are fixed, as it is shown in the next theorem. These values for all 3 ≤ t ≤ 11 are also shown in Table 3. Theorem 5.3 Let At,s be the number of nonequivalent Z2s -linear Hadamard codes of length 2t . Let At be the number of nonequivalent Z2s -linear Hadamard Pt−2 t codes of length 2 , for any s ≥ 2. Then, At ≤ s=2 (At,s − 1) + 1. Theorem 5.4 There are exactly 1,1,3, 3 and 6 nonequivalent Z2s -linear Hadamard codes of length 2t for t equal to 3, 4, 5, 6 and 7, respectively. Proof. For t equal to 3, 4 and 5, the result is true, since the lower and upper bounds given in Table 3 coincides. By using Magma, it is possible to check that, for t = 6, both Z2s -linear Hadamard codes having the same parameters (r, k) = (8, 5) are equivalent; and the ones having (r, k) = (9, 4) are also equivalent. Therefore, in this case, the upper bound goes from 5 to 3, and then coincides with the lower bound given in Table 3. Similarly, or t = 7, it is also possible to check that the codes having the same parameters (r, k) are all equivalent, so the upper bound became equal to the lower bound 6, and the result also holds.  6 Conclusions The kernel of Z2s -linear Hadamard codes of length 2t has been studied for s > 2. We compute the kernel of these codes and its dimension in order to classify them, like it is done for s = 2. We first have considered that the parameters t and s are fixed. Examples 5.1 and 5.2 show that, only for some values of t and s, we can use the dimension of the kernel to distinguish between nonequivalent Z2s -linear Hadamard codes of length 2t . However, when this is not possible, by using Magma, we also show that in these examples the rank is enough to classify them. A further research on this topic would be to determine exactly for which values of t and s the dimension of the kernel classify them, or to compute the rank of these codes in order to prove that this invariant is enough to established their complete classification, for any t and s. 17 Z4 t=8 (t1 , . . . , ts ) (3, 3) (4, 1) (r, k) (10,7) (12,6) t=9 (t1 , . . . , ts ) (3, 4) (4, 2) (5, 0) (1, 2, 3) (1, 3, 1) (2, 0, 4) (2, 1, 2) (2, 2, 0) (3, 0, 1) (r, k) (11,8) (13,7) (16,6) (11,8) (13,7) (12,7) (14,6) (17,5) (18,5) (1, 2, 2) (1, 3, 0) (2, 0, 3) (2, 1, 1) (3, 0, 0) (10,7) (12,6) (11,6) (13,5) (17,4) Z16 (1, 0, 2, 1) (1, 1, 0, 2) (1, 1, 1, 0) (2, 0, 0, 1) (10,7) (11,6) (13,5) (15,4) (1, 0, 2, 2) (1, 0, 3, 0) (1, 2, 0, 0) (1, 1, 0, 3) (1, 1, 1, 1) (2, 0, 0, 2) (2, 0, 1, 0) (11,8) (13,7) (18,5) (12,7) (14,6) (16,5) (20,4) Z32 (1, 0, 0, 2, 0) (1, 0, 1, 0, 1) (1, 1, 0, 0, 0) (10,7) (11,6) (15,4) (1, 0, 0, 2, 1) (1, 0, 1, 0, 2) (1, 0, 1, 1, 0) (1, 1, 0, 0, 1) (2, 0, 0, 0, 0) (11,8) (12,7) (14,6) (16,5) (26,3) (1, 0, 0, 1, 0, 0) (11,6) (1, 0, 0, 0, 2, 0) (1, 0, 0, 1, 0, 1) (1, 0, 1, 0, 0, 0) (11,8) (12,7) (16,5) (1, 0, 0, 0, 1, 0, 0) (12,7) Z8 Z64 Z128 Z256 t = 10 (t1 , . . . , ts ) (3, 5) (4, 3) (5, 1) (1, 2, 4) (1, 3, 2) (1, 4, 0) (2, 0, 5) (2, 1, 3) (2, 2, 1) (3, 0, 2) (3, 1, 0) (1, 0, 2, 3) (1, 0, 3, 1) (1, 1, 0, 4) (1, 1, 1, 2) (1, 1, 2, 0) (1, 2, 0, 1) (2, 0, 0, 3) (2, 0, 1, 1) (2, 1, 0, 0) (1, 0, 0, 2, 2) (1, 0, 0, 3, 0) (1, 0, 1, 0, 3) (1, 0, 1, 1, 1) (1, 0, 2, 0, 0) (1, 1, 0, 0, 2) (1, 1, 0, 1, 0) (2, 0, 0, 0, 1) (1, 0, 0, 0, 2, 1) (1, 0, 0, 1, 0, 2) (1, 0, 0, 1, 1, 0) (1, 0, 1, 0, 0, 1) (1, 1, 0, 0, 0, 0) (1, 0, 0, 0, 0, 2, 0) (1, 0, 0, 0, 1, 0, 1) (1, 0, 0, 1, 0, 0, 0) (1, 0, 0, 0, 0, 1, 0, 0) Table 4: Rank and kernel for all nonlinear Z2s -linear Hadamard codes of length 2t . We have also considered that only the length 2t is fixed. Examples 5.4 and 5.5 seem to point out that for any t odd (t even), there is exactly one Z4 -linear Hadamard code (Z2 Z4 -linear Hadamard code with α 6= 0) of length 2t which is not equivalent to any Z2s -linear Hadamard code with s > 2; and the others Z4 -linear Hadamard codes (Z2 Z4 -linear Hadamard codes with α 6= 0) of the 18 (r, k) (12,9) (14,8) (17,7) (12,9) (14,8) (17,7) (13,8) (15,7) (18,6) (19,6) (24,5) (12,9) (14,8) (13,8) (15,7) (18,6) (19,6) (17,6) (21,5) (28,4) (12,9) (14,8) (13,8) (15,7) (19,6) (17,6) (21,5) (27,4) (12,9) (13,8) (15,7) (17,6) (27,4) (12,9) (13,8) (17,6) (13,8) same length are equivalent to a Z8 -linear Hadamard code, although they may also have other structures with s > 3. Another further research in this sense would be to establish whether this is always true; and whether all Z2s -linear Hadamard codes of the same length, having the same rank and dimension of the kernel, are equivalent. Finally, we have established some bounds for the exact number of nonequivalent Z2s -linear Hadamard codes of length 2t , when both t and s are fixed, and when just t is fixed; denoted by At,s and At , respectively. For some values of t and s, we provide their exact values, by using Magma. It would also be interesting to determine them for any possible t and s, as a further research; as well as equivalent results by considering the generalized Gray map used in [14]. References [1] Alahmadi, A., Sepasdar, Z., Shi, M., Solé, P.: On two-weight Z2k -codes. Designs, Codes and Cryptography (2017). doi:10.1007/s10623-017-0390-0 [2] Assmus, E. F., Key, J. D.: Designs and their codes. Cambridge University Press, Great Britain (1992). [3] Bauer, H., Ganter, B., Hergert, F.: Algebraic techniques for nonlinear codes. Combinatorica, 3, no. 1, pp. 21–33 (1983). [4] Blake, I.F.: Codes over integer residue rings. Inform. Control, 29, pp. 295– 300 (1975). [5] Borges, J., Fernández-Córdoba, C., Pujol, J., Rifà, J., Villanueva, M.: Z2 Z4 -linear codes: generator matrices and duality. Designs, Codes and Cryptography, 54, no. 2, pp. 167–179 (2010). [6] Bosma W., Cannon, J. J., Fieker, C., book of Magma functions, Edition 2.22 http://magma.maths.usyd.edu.au/magma/. Steel, A.: 5669 pages Hand(2016). [7] Carlet, C.: Z2k -linear codes. IEEE Trans. Inform. Theory, 44, no. 4, pp. 1543–1547 (1998). [8] Dougherty, S. T., Fernández-Córdoba, C.: Codes Over Z2k , Gray Map and Self-Dual Codes. Advances in Mathematics of Communications, 5, no. 4, pp. 571–588 (2011). [9] Fernández-Córdoba, C., Vela, C., Villanueva, M.: On the Kernel of Z2s linear Hadamard Codes. Coding theory and Applications, ICMCTA 2017. Lecture Notes in Computer Science, 10495, pp. 107–117 (2017). [10] Fernández-Córdoba, C., Vela, C., Villanueva, M.: Construction and Classification of the Z2s -linear Hadamard codes. Electronic Notes in Discrete Mathematics, 54, pp. 247–252 (2016). [11] Gupta, M. K., Bhandari M.C., Lal, A.K.: On some linear codes over Z2s . Designs, Codes and Cryptography, 36, no. 3, pp. 227–244 (2005). 19 [12] Hammons, A. R., Kumar, P. V., Calderbank, A. R., Sloane, N. J. A., Solé, P.: The Z4 -linearity of Kerdock, Preparata, Goethals and related codes. IEEE Trans. Inform. Theory, 40, no. 2, pp. 301–319 (1994). [13] Honold, T., Nechaev, A. A.: Weighted modules and representations of codes. Probl. Inf. Transm., 35, no. 3, pp. 1839 (1999). [14] Krotov, D. S.: On Z2k -dual binary codes. IEEE Trans. Inf. Theory, 53, no 4, pp. 1532–1537 (2007). [15] Krotov, D. S.: Z4 -linear Hadamard and extended perfect codes. International Workshop on Coding and Cryptography, ser. Electron. Notes Discrete Math. 6, pp. 107–112 (2001). [16] Krotov, D. S., Villanueva, M.: Classification of the Z2 Z4 -linear Hadamard codes and their automorphism groups. IEEE Trans. Inf. Theory, 61, no. 2, pp. 887–894 (2015). [17] MacWilliams, F. J., Sloane, N. J. A.: The theory of error-correcting codes. 16, Elsevier (1977). [18] Phelps, K. T., Rifà, J., Villanueva, M.: On the additive (Z4 -linear and nonZ4 -linear) Hadamard codes: rank and kernel. IEEE Trans. Inf. Theory, 52, no. 1, pp. 316–319 (2006). [19] Shankar, P.: On BCH codes over arbitrary integer rings. IEEE Trans. Inf. Theory, 25, no. 4, pp. 480–483 (1979). [20] Tapia-Recillas, H., Vega, G.: On Z2k -linear and quaternary codes. SIAM J. Discrete Math., 17, no. 1, pp. 103–113 (2003). 20
7cs.IT
New Results on Finite-Time Stability: Geometric Conditions and Finite-Time Controllers arXiv:1802.08151v3 [math.DS] 3 Apr 2018 Kunal Garg Abstract— This paper presents novel controllers that yield finite-time stability for linear systems. We first present a necessary and sufficient condition for the origin of a scalar system to be finite-time stable. Then we present novel finitetime controllers based on vector fields and barrier functions to demonstrate the utility of this geometric condition. We also consider the general class of linear controllable systems, and present a continuous feedback control law to stabilize the system in finite time. Finally, we present simulation results for each of these cases, showing the efficacy of the designed control laws. I. I NTRODUCTION Finite Time Stability (FTS) has been a well-studied concept, motivated in part from a practical viewpoint due to properties such as achieving convergence in finite time, as well as exhibiting robustness with respect to (w.r.t.) disturbances [1]. Classical optimal control theory provides several examples of systems that exhibit convergence to the equilibrium in finite time [2]. A well-known example is the double integrator with bang-bang time-optimal feedback control [3]; these approaches typically involve solutions that render discontinuous system dynamics. The approach in [4] considers finite-time stabilization using time-varying feedback controllers. The authors in [5] focus on continuous autonomous systems and present Lyapunov-like necessary and sufficient conditions for a system to exhibit FTS, while in [6] they provide geometric conditions for homogeneous systems to exhibit FTS. [7] extended the notion of finite-time stability from autonomous to time-varying dynamical systems, see also [8]. The authors in [9] provided necessary and sufficient geometric conditions for the finite-time stability of a scalar system, and used the structure of phase portraits for second order systems to develop a class of finite-time systems. In [10], the authors presented a method to construct a finite-time consensus protocol. [11] presents necessary and sufficient conditions for FTS of linear, time-varying systems, as well as an output feedback controller that yields finite-time stability. [12] addresses the problem of FTS for small-time controllable systems. FTS has regained much attention in the recent few years as well; [13]–[15] present FTS results for neural-network systems, output feedback tracking and control of multi-agent systems, respectively. In [16], the authors consider the problem of finite-time consensus and provide a method to bound the position and velocity errors to The authors are with the Department of Aerospace Engineering, University of Michigan, Ann Arbor, MI, USA; {kgarg, dpanagou}@umich.edu. The authors would like to acknowledge the support of the NASA Grant NNX16AH81A. Dimitra Panagou a small residual set in finite-time. In [17], the authors analyze the finite-time consensus problem for strongly connected graphs of heterogeneous systems. Other recent work includes [18], [19], in which finite-time stability is studied in hybrid systems framework. In [9], the authors presented a sufficient geometric condition in terms of the integral of the multiplicative inverse of the system dynamics, evaluated between any initial point p and the origin. In this paper, we present a necessary condition in terms of the derivative of the system dynamics evaluated at the origin, which is much easier to check than the former one. We also present a necessary and sufficient condition in terms of bounds on the system dynamics and utilize it to design finite-time controllers for different classes of systems. In addition, we consider a general class of linear controllable systems, whereas the aforementioned work considered a very special class of linear or nonlinear systems. In [20], the authors considered the problem of finite-time stabilization of double integrator systems. In this paper, we prove that under the effect of our controller, the closed-loop trajectories of any linear controllable system would converge to the equilibrium point in finite-time. As case studies, we consider a nonholonomic system guided by a vector field, a single integrator system guided by a barrier-function based controller, and controllable LTI system stabilized at an arbitrary equilibrium point, and design finite-time controllers for each one of them. The paper is organized as follows: Section II presents an overview of the theory of FTS. In Section III we present new geometric conditions to establish FTS for scalar systems. Section IV presents a finite-time Barrier function based controller for obstacle avoidance and convergence to the goal location. In Section V, we present novel control laws for a class of linear controllable systems for FTS. Section VI evaluates the performance of the proposed finite-time controllers via simulation results. Our conclusions and thoughts on future work are summarized in Section VII. II. OVERVIEW OF F INITE T IME S TABILITY Let us consider the system: ẏ = f (y(t)), (1) where y ∈ R, f : R → R and f (0) = 0. In [5], the authors define finite-time stability as follows: The origin is said to be a finite-time-stable equilibrium of (1) if there exists an open neighborhood N ⊂ D of the origin and a function T : N \ {0} → (0, ∞), called the settling-time function, such that the following statements hold: 1) Finite-time convergence: For every x ∈ N \ {0}, ψ x is defined on [0, T (x)), ψ x (t) ∈ N \ {0} for all t ∈ [0, T (x)), and limt→T (x) ψ x (t) = 0. Here, ψ x : [0, T (x)) → D is the unique right maximal solution of system (1). 2) Lyapunov stability: For every open neighborhood U of 0, there exists an open subset Uδ of N containing 0 such that, for every x ∈ Uδ \ {0}, ψ x (t) ∈ U , for all t ∈ [0, T (x)). The origin is said to be a globally finite-time-stable equilibrium if it is a finite-time-stable equilibrium with D = N = Rn . The authors also presented Lyapunov like conditions for finite-time stability of system (1): Theorem 1: [5] Suppose there exists a continuous function V : D → R such that the following hold: (i) V is positive definite (ii) There exist real numbers c > 0 and α ∈ (0, 1) and an open neighborhood V ⊆ D of the origin such that V̇ (y) + c(V (y))α ≤ 0, y ∈ V \ {0}. (2) Then origin is finite-time stable equilibrium of (1). A. Notations We denote kxk the Euclidean norm kxk2 of vector x, and |x| the absolute value of the scalar x. The sign(x) function is defined as:   −1, x < 0; 0, x = 0; (3) sign(x) =  1, x > 0. III. N EW CONDITION FOR F INITE - TIME STABILITY A. Geometric Conditions for FTS The authors in [9] stated a geometric condition on the system dynamics for the equilibrium to be finite-time stable: 1) yf (y) < 0 for y ∈ N \{0}, and yf (y) = 0 when y = 0, and R0 2) p fdy (y) < ∞ for all p ∈ R. These conditions are not useful in practice as, in general, it R0 is difficult to evaluate the integral p fdy (y) for an arbitrary vector field f (y). Hence, we present conditions which are easier to check. Note that these results follow immediately from [9]. First, we present a necessary and sufficient condition for the origin of a scalar system to be finite-time stable: Theorem 2: Consider the system: ẋ = h(x), x ∈ D ⊂ R, (4) such that h(0) = 0, and x h(x) < 0 ∀x 6= 0, i.e., the origin is a stable equilibrium. Then the origin is finite time stable equilibrium for system (4) if and only if: ∃ D ⊂ R containing the origin such that ∀x ∈ D, sign(x)h(x) ≤ −k|x|α , where k > 0, 0 < α < 1. (5) Proof: First we prove the sufficiency: Choose the candidate Lyapunov function V (x) = 12 x2 . Taking its time derivative along the trajectories of (4), we obtain: V̇ = x h(x) = |x| sign(x)h(x). Since sign(x)h(x) ≤ −k|x|α , k > 0, 0 < α < 1, we have: β V̇ ≤ |x|(−k|x|α ). Choosing β = 1+α 2 and c = k2 , we get V̇ ≤ −cV (x)β where 0 < β < 1 and c > 0. Hence, from Theorem 1, we get that the origin is finite-time stable. Now we prove the necessity: If origin of the system (4) is finite-time stable, then there exist a positive definite function V (x) satisfying conditions of Theorem 4.3 in [5]. Since V (x) is a positive definite function, we can bound it from below and above as: k1 x2j ≤ V (x) ≤ k2 x2j , where k1 , k2 > 0 and j is a positive integer. In some neighborhood D0 ∈ R, we can bound the derivative as: ∂V (x) ≤ k4 |x|2j−1 , ∂x for some k3 , k4 > 0. From Theorem 4.3 in [5], we have that V̇ (x) + c(V (x))β ≤ 0 as the origin is finite-time stable. Thus: ∂V (x) V̇ (x) = h(x) ≤ −c(V (x))β ⇒ ∂x ∂V (x) − |h(x)| ≤ −c(V (x))β ⇒ ∂x ∂V (x) |h(x)| ≥ c(V (x))β ⇒ ∂x k4 |x|2j−1 |h(x)| ≥ c(V (x))β k3 |x|2j−1 ≤ sign(x) Now, for any γ > β, there exists a domain Dγ ⊂ R containing the origin, such that V (x)β ≥ V (x)γ . Choose 1 the smallest γ = γ1 such that 1 − 2j < γ1 < 1. With this choice of γ, we get: k4 |x|2j−1 |h(x)| ≥ c(V (x))β ≥ cV (x)γ1 ≥ c(k1 x2j )γ1 . ck γ1 Now choose k = k14 > 0, and 0 < α = 2j(γ1 −1)−1 < 1. It follows that: |h(x)| ≥ k|x|α . Now, multiply both sides by sign(x) sign(h(x)) = −1, to get: sign(x)h(x) ≤ −k|x|α . Choosing D = D0 ∩ Dγ1 completes the proof. Next we provide a necessary geometric condition in terms of the derivative of the vector field h(x): Theorem 3: If system (4) is finite time stable, then ∂h(x) = −∞ (6) ∂x x=0 Proof: This can be verified by taking the left and right derivative of the function at 0. First, take the right derivative: h(l) −klα h(l) − h(0) = lim+ ≤ lim+ = −∞. l l l l→0 l→0 l→0 Now, for the left-derivative, we note that for l < 0, from (5), −h(l) ≤ −k|l|α . Using this, we get lim+ h(0) − h(l) −h(l) −k|l|α = lim ≤ lim = −∞. l l l l→0− l→0+ l→0+ This completes the proof. lim Note that this is not a sufficient condition: take x(t) = 2 x0 e−t as a counter example. This system goes to origin only as t → ∞. Taking its first and second time derivative, 2 2 we get ẋ(t) = −2tx0 e−t and ẍ(t) = (−2 + 4t2 )x0 e−t . Now, condition (6) can be re-written in the following form: dh(x) dx = x=0 d2 x(t) dt dt2 dx(t) 2 = x=0 (−2 + 4t2 )x0 e−t −2tx0 e−t2 = lim −2t = −∞. t→∞ t=∞ 2 Hence, even though the system x(t) = x0 e−t is not finitetime stable, it satisfies (6). These conditions can be used to verify finite-time stability of scalar systems. Now we present some examples to demonstrate how these conditions can be utilized to design finite-time controllers. B. Example: Trajectory Tracking Consider a vehicle modeled under unicycle kinematics given by:     ẋ u cos θ ẏ  =  u sin θ  , (7) ω θ̇  T where q = r T θ ∈ X ⊂ R3 is the state vector of  T the vehicle, comprising the position vector r = x y and the orientation w.r.t. the global frame  T θ of the agent G, u = u ω ∈ U ⊂ R2 is the control input vector comprising the linear velocity u and the angular velocity ω of the vehicle. The control objective is to track a trajectory given by rg (t) which is continuously differentiable in its argument. We seek vector field based controller which can converge the trajectories of closed-loop system to the desired trajectory in finite-time. First we design a vector field to achieve this: Fp = −kre (t)kre (t)kα−1 + ṙg (t), (8) where k > 0, 0 < α < 1 and re (t) = r(t) − rg (t). The control law is given by: u = kFp k, (9) ω = −kω sign (θ − ϕp ) |θ − ϕp |α + ϕ̇p , (10)   Fpy where ϕp , arctan Fpx is the orientation of the vector field Fp . Theorem 4: Under control law (9)-(10), system (7) tracks the trajectory rg (t) in finite time. Before stating the main theorem, we present an intermediate result that is used also later in the paper: Lemma 1: Origin of the following system is a finite-time stable equilibrium: ẋ = −kxkxkα−1 k>0 0 < α < 1. V (x) = 1 kxk2 . 2 The time derivative of this function along the system trajectories of (11) read: V̇ (x) = xT (−kxkxkα−1 ) = −kkxk1+α = −cV (x)β , x=0 For the above example, x = 0 at t = ∞. Using this and substituting the expressions of ẋ(t) and ẍ(t), we get dh(x) dx Proof: Consider the candidate Lyapunov function (11) 1+α < 1. Hence, from where c = 2 2 k > 0 and β = 1+α 2 Theorem 1, we get that the equilibrium point 0 is finite-time stable. Note that for scalar case, right hand side simply reads −kx|x|α−1 = −k sign(x)|x|α . Now we prove Theorem 4: Proof: Consider error term re (t) = r(t)  − rg (t). Its u cos θ time derivative reads ṙe (t) = ṙ(t) − ṙg (t) = − u sin θ ṙg (t). From Lemma 1, re (t) goes to origin in finite-time if ṙe (t) = −kre kre kα−1 with k > 0 and 0 < α < 1. Hence, we need that   ud cos θd = −kre kre kα−1 + ṙg (t) (12) ud sin θd where ud and θd denote the desired linear speed and orientation, respectively. Let ∠(·) denote signed angle. From (8) and (12), we have that ϕp = ∠Fp = θd and u = ud = kFp k. Hence, if the system tracks vector field Fp in finite-time, it will track the desired trajectory rg (t) in finite-time. Define θe = θ − θd . Choose candidate Lyapunov function V (θe ) = 1 2 2 θe . Taking its time derivative along (10), we get: V̇ (θe ) = θe θ̇e = θe (θ̇ − θ̇d ) = θe (ω − θ̇d ) (10) = θe (−kω sign (θ − ϕp ) |θ − ϕp |α + ϕ̇p − θ̇d ). Since θd = ϕp , we get: V̇ (θe ) = θe (−kω sign (θ − ϕp ) |θ − ϕp |α ) = −kω θe sign(θe )|θe |α = −kω |θe |1+α = −kω (2V (θe )) 1+α 2 ≤ −cV (θe )β , 1+α where c = kω 2 2 and β = 1+α < 1. Hence, θe (t) 2 converges to zero in finite time. This along with the fact that the magnitude of linear speed given out of (9) is equal to the desired linear speed ud implies that ṙ(t) = −kre (t)kre (t)kα−1 . Hence, re (t) → 0 in finite time and which implies that the system trajectory r(t) converges to rg (t) in finite-time. Note that for the error dynamics of orientation θe , from (10), one can get θ̇e = −kω sign(θe )|θe |α = h(θe ) =⇒ θe h(θe ) = −kω |θe |1+α =⇒ sign(θe )h(θe ) = −kω |θe |α Also, dh(θe ) dθe dh(θe dθe = −kω sign(θe )|θe |α−1 which implies = −∞ since α < 1. Hence, both the conditions θe =0 presented in Theorem 2 and 3 are getting satisfied. IV. O BSTACLE AVOIDANCE U SING BARRIER F UNCTION BASED C ONTROLLER Consider a vehicle modeled under single integrator dynamics as ẋ = u, (13) where x, u ∈ Rn . The problem of reaching to a specified goal location in finite time can be formulated mathematically as follows: ∃t∗ < ∞ s.t ∀t ≥ t∗ kx(t) − τ k = 0 Lemma 3: Gradient of the Barrier function, ∇B(x) is non-zero everywhere except the equilibrium point τ and at ko − τ k + dc − 1 (o − τ ) (16) ko − τ k 1 Proof: Define xo , (kx − ok − dc +  ). Gradient of the Barrier function (14) reads: x=τ +2 ∇B(x) =2 kx − τ k2 x − o x−τ − xo x2o kx − ok Hence, ∇B(x) = 0 implies: where τ is the desired goal location, while that of obstacle avoidance can be written as: x−τ kx − τ k x − o = , kx − τ k 2xo kx − ok kx(t) − ok ≥ dc ∀t ≥ t0 , which holds only if x − τ is along x − o and kx − τ k = 2xo since left hand side of the equation is a unit vector. Denote kx−τ k = a, kx−ok = b and ko−τ k = c. Since x−o and x − τ are co-linear and due to the assumption ko − τ k > dc , we get that a = b + c. From that, we get 2 a = b + c = 2x0 = 2b − 2dc +  1 2 =⇒ b = c + 2dc − ⇒ a = 2(c + dc − )   From this, we get that 1 o−τ x − τ = 2(c + dc − ) .  ko − τ k where o represents the location of the obstacle and t0 is the starting time. Here, we model the obstacle as circular discs of radius ρo . The vehicle is required to maintain a safe distance dm from the obstacle. Hence choosing dc = dm + ρo implies that vehicle maintains the required minimum distance from the boundary of the obstacle if kx−ok ≥ dc . We assume that the obstacle is located in such a manner that ko − τ k > 2dc so that at the desired location is sufficiently far away from the obstacle. We also assume that agent starts sufficiently far away from the obstacle so that kx(t0 ) − ok > dc . We seek a continuous feedback-law ui such that the system (13) reaches its goal location while maintaining safe distance from the obstacle. More specifically, we seek a Barrier-function based controller for this problem. First we define the Barrier function as follows: kx − τ k2 , (14) B(x) = kx − ok − dc + 1 where   1 is a very large number. We choose the controller of the form: u = −k1 ∇Bk∇B(x)kα−1 , (15) where k1 > 0 and 0 < α < 1. With this controller, we have the following result: Theorem 5: Under the control law (15), the point x = τ is FTS equilibrium for the closed-loop system (13), and the closed-loop system trajectories will remain safe w.r.t. the obstacle. Before presenting the proof, we present some useful Lemmas: Lemma 2: In the domain Do = {x | kx − ok > dc }, the Barrier function B(x) is bounded as B(x) ≤ kx − τ k2 . Proof: In the chosen domain: kx − ok ≥ dc =⇒ kx − ok − dc ≥ 0 1 1 =⇒ kx − ok − dc + ≥   1 =⇒ ≤ kx − ok − dc + 1 kx − τ k2 =⇒ B(x) = ≤ kx − τ k2 . kx − ok − dc + 1 As c = ko − τ k = koτ k we get x=τ +2 koτ k + dc − 1 oτ . koτ k Lemma 4: In any closed, compact domain D ⊂ Rn containing point τ and excluding the region D̄ = {x | kx − pk < r p = τ +θ(o−τ ) , θ ≥ 1}, where r is an arbitrary small positive number, the gradient of Barrier function B(x) can be bounded as k∇Bk ≥ ckx − τ k, (17) where c > 0. Proof: From (14), it can be easily verified that ∇B(τ ) = 0. Choose D1 = {x | kx − τ k < ∆}, where ∆ is a very small positive number. Choose domain D̃ = D \ D1 . Recall that D doesn’t include the ray D̄, so D̃ does not include the point as in Lemma 3. Hence, from Lemma 3, at any point x ∈ D̃, ∇B(x) 6= 0 and since D̃ is a closed domain, we can find c1 = minx∈D̃ k∇B(x)k kx−τ k > 0. Therefore, we have that ∀ x ∈ D̃, k∇Bk ≥ c1 kx − τ k. Now, consider D2 = {x | kx − τ k ≤ ∆}. In a very small neighborhood of τ , the Hessian matrix ∇2 B(x)  0 (i.e. ∇2 B is a positive definite matrix). Therefore, using the gradient inequality (First-order condition for convexity), we have that ∀x ∈ D2 , B(τ ) ≥ B(x) + ∇B(x)T (τ − x) =⇒ 0 ≥ B(x) − ∇B(x)T (x − τ ) =⇒ ∇B(x)T (x − τ ) ≥ B(x). From (14), one can easily see that B(x) can be bounded as B(x) ≥ c2 kx − τ k2 . Also, using Cauchy-Schwartz inequality, we have that ∇B(x)T (x − τ ) ≤ k∇B(x)kkx − τ k. Therefore, we have that k∇B(x)kkx − τ k ≥ ∇B(x)T (x − τ ) ≥ B(x) ≥ c2 kx − τ k2 =⇒ k∇B(x)k ≥ c2 kx − τ k S Since D = D̃ D2 , choosing c = min{c1 , c2 } gives us the required result. Now we are ready to prove Theorem 5: Proof: From Lemma 3, we have that ∇B(x) = 0 at the equilibrium point τ and at the point x = τ +µ(o−τ ) where µ takes the value as per Lemma 3. Lets assume that the initial condition is such that x(t0 ) doesn’t lie on the ray D̄ defined as per Lemma 4. Consider the open domain around the goal location Do as defined in Lemma 2. Define D = Do \ D̄ (see figure 1. Since D̄ is a closed domain and Do is open, domain D is an open domain around the equilibrium τ . for any x ∈ D, where K = ( 1 )β k1 c1+α and β = 1+α 2 < 1. Thus, we have that the equilibrium x = τ is finite-time stable. Safety is trivial from the construction of Barrier function: since V̇ (x) is negative, V (x) = B(x) would remain bounded and hence, the denominator of B(x) would have non-zero positive value. Choose  greater than 1 over this minimum non-zero value would ensure kx−ok−dc > 0. V. FINITE TIME STABILITY OF LTI SYSTEMS Consider the system ẋ = Ax + Bu, where x ∈ to stabilize we seek a Theorem 1 (18) Rn u ∈ U ⊂ Rn , A, B ∈ Rn×n . Objective is the origin of (18) in finite time. Mathematically, continuous feedback law so that conditions of are satisfied. A. Multi-Input Case Theorem 6: Assume B is full rank in (18). Then, the feedback control law u(x) = K1 x + K2 xα (19) where K1 is such that A + BK1 is Hurwitz, K2 = −B −1 and xα = xkxkα−1 , Fig. 1. The working domain D and the excluded region D̄. Choose the candidate Lyapunov function V (x) = B(x). For simplifying the notation, define xe = x−τ and drop the argument x for the functions B and ∇B. Taking the time derivative of V (x) along the trajectories of (13), we have: V̇ (x) =(∇B)T (−k1 ∇Bk∇Bkα−1 ) = − k1 k∇Bk1+α From Lemma 4, we have that k∇Bk ≥ ckxe k. Using this, we get: V̇ ≤ − k1 c1+α kxk1+α Using the result from Lemma 2, we have that B ≤ kxe k2 . Hence, we get: V (x) = B(x) ≤ kxe k2 ⇒ 1 − kxe k2 ≤ − V (x) ⇒  1+α 1 1+α − kxe k ≤ − 1+α V (x) 2  2 Hence, we have that: V̇ (x) ≤ −k1 c1+α |xe k1+α ≤ −KV (x)β , (20) with 0 < α < 1 stabilizes the origin of closed-loop system (18) in finite-time. Proof: Since B is full rank, (A, B) is controllable. Therefore, there exists a gain K1 s.t. Re(eig(A+BK1 )) < 0 i.e., there exists a positive definite matrix Q s.t. (A + BK1 )T P + P (A + BK1 ) = −Q where P is a positive definite matrix. Choose candidate Lyapunov function V (x) = xT Px. Taking time derivative of V (x) along the closed-loop trajectories of system (18), we get: V̇ (x) = xT P (Ax + Bu) + (Ax + Bu)T P x = xT P (Ax + BK1 x + BK2 xα ) + (Ax + BK1 x + BK2 xα )T P x = xT (P à + ÃT P )x + xT P BK2 xα + xTα K2T B T P x where à = A + BK1 . Choose K2 = −B −1 . Hence we have that (P BK2 + K2T B T P ) = −2P . Therefore V̇ (x) = −xT Qx − 2xT P xα ≤ −2xT P xα Now, for any symmetric matrix P , xT P y can be bounded as λmin (P )xT y ≤ xT P y ≤ λmax (P )xT y if xT y > 0. From (20), we have that xT xα > 0 for all x 6= 0. Hence, we have that xT P xα ≥ λmin (P )xT xα . Also, we can bound V (x) by λmin (P )kxk2 ≤ xT P x ≤ λmax (P )kxk2 =⇒ V (x) ≤ λmax (P )kxk2 =⇒ V (x)β ≤ kkxk2β = kkxk1+α where k = (λmax (P ))β > 0 and β = 1+α 2 Theorem 7: System (23) reaches the desired state xd in finite with the control law V̇ (x) ≤ −2xT P xα ≤ −2λmin (P )xT xα n X ai xi − kn sign(xn − xdn )|xn − xdn |α , (24) = −2λmin (P )xT xkxkα−1 = −2λmin (P )kxk1+α u = ẋdn − ≤ −2λmin (P ) < 1. Hence i=1 V (x)β ≤ −cV (x)β k β =⇒ V̇ (x) + cV (x) ≤ 0 (P ) > 0 and 0 < β < 1 since 0 < α < 1. where c = 2λmin k Therefore, from Theorem 1, we have that the origin is finitetime stable for closed-loop system. This was a restrictive case since we assumed matrix B to be full rank. Before we present the most general case, we state a result that we would require: Lemma 5: Consider the scalar system ẋ = ax + bu b 6= 0. (21) x converges to any C 1 trajectory given by xd (t) ∈ R in finite time with control law 1 u = (−ax − k sign(x − xd )|x − xd |α + ẋd (t)), b (22) where k > 0 and 0 < α < 1. Proof: Choose candidate Lyapunov function V (x) = 1 (x − xd )2 . The time derivative of this function along the 2 closed loop trajectory reads V̇ (x) = (x − xd )(ẋ − ẋd ) = (x − xd )(ax + bu − ẋd ) (22) where ki > 0, xdi is given out of (26) and n−1 n < α < 1. Furthermore, the controller u remains bounded. Proof: System (23) can be re-written in the following form:     ẋ1 x2  ..    ..  .    . (25)  = . ẋn−1    x n Pn ẋn i=1 ai xi + u For x1 → xd1 in finite-time, the desired time-rate of x1 , i.e. desired x2 (denoted as xd2 ) should be xd2 = −k1 sign(x1 − xd1 )|x1 − xd1 |α + ẋd1 , where k1 > 0 and 0 < α < 1 (see Lemma 5). As we assume xd1 to be constant, we have ẋd1 = 0. Similarly, in general form, one car write: xdi+1 = −ki sign(xi − xdi )|xi − xdi |α + ẋdi , where 1 ≤ i ≤ n−1 and ki > 0. Choose candidate Lyapunov function n X 1 (xi − xdi )2 V (x) = 2 i=1 Taking the time derivative of the candidate Lyapunov function along the closed loop system trajectory with controller (24), we get = (x − xd )(−k sign(x − xd )|x − xd |α ) = −k|x − xd |1+α = −cV (x)β , 1+α where c = k2 2 and β = 1+α 2 < 1. Hence, from Theorem 1, we get that x(t) − xd (t) → 0 in finite time. Now we present the most general case of linear controllable systems and show that any controllable system can be controlled in finite time. V̇ (x) = (xi − xdi )(xi+1 − ẋdi ) + (xn − xdn )(u + n X aj xj − ẋdn ) j=1 = Since the system is assumed to be controllable, we start with controllable canonical form: n−1 X (xi − xdi )(xi+1 − xdi+1 + xdi+1 − ẋdi ) i=1 + (xn − xdn )(u + (23) n X aj xj − ẋdn ) j=1 n where x ∈ R and u ∈ R and system matrices have form     0 1 0 ... 0 0 0 0 0  0 1 0 · · · 0      ..  ..  .. ..  .. .   . . .  B= A= . .  0 0 ···    0 1 0  0 0 0   0 ··· 0 1 0 a1 a2 a3 · · · · · · an 1   T Let xd = xd1 0 · · · 0 be the desired state. We propose a continuous, state-feedback control law u so that ∃ T < ∞ such that ∀t ≥ T , x(t) = xd : n−1 X i=1 B. Linear Controllable System ẋ = Ax + Bu, (26) = + n−1 X i=1 n−1 X (xi − xdi )(xi+1 − xdi+1 ) (xi − xdi )(−ki sign(xi − xdi )|xi − xdi |α ) i=1 + (xn − xdn )(−kn sign(xn − xdn )|xn − xdn |α ) = n−1 X (xi − xdi )(xi+1 − xdi+1 ) + i=1 ≤ V (x) − n X i=1 n X i=1 ki |xi − xdi |α+1 , −ki |xi − xdi |α+1 n−1 P i=1 0.5 (xi −xdi )(xi+1 ≤ 21 kxe k2 = V (x). Define k̄ = min ki x-xg i so that we get V̇ (x) ≤ V (x) − k̄ n X |xi − xdi |α+1 = V (x) − k̄kxe k1+α 1+α , i=1 Error Terms as -0.5  T and where xe , x1 − xd1 x2 − xd2 . . . xn − xdn kxe k1+α is (1 + α)−norm of vector x raised to power e 1+α (1 + α). Using the norm inequality for equivalent norms, we have that kxe k2 ≤ kxe k1+α since 1 + α < 2. From this,we get V̇ (x) ≤V (x) − k̄kxe k1+α = V (x) − k̄(kxe k22 ) 2 y-yg 0 -1 0 2 4 6 8 10 Time (s) Fig. 2. Deviation from Desired Trajectory with time. 1+α 2 =⇒ V̇ (x) ≤ V (x) − cV (x)β , (xdi+1 )n−i = −ki |xi − xdi |(n−i+1)α−(n−i) + (xdi )n−i+1 . n−i and (xdi )n−i+2 is Each (xdi+1 )n−i is bounded if α > n−i+1 bounded. (xd2 )n−1 = −k1 |x1 − xd1 |nα−(n−1) is bounded if α > n−1 n . Hence, with this choice of α, all the derivatives (xdi )(n−i+2) and the controller remain bounded. This shows that any controllable LTI system can be controlled (and trivially, stabilized to origin) in finite-time from any initial condition. VI. S IMULATIONS A. Simulation results for Section III-B We consider a sinusoidal trajectory as the desired trajec T tory, i.e. rg (t) = t cos(t) . Figure 2 shows the errors or deviations of coordinates x(t) and y(t) from the desired coordinates xg (t) and yg (t). Figure 3 shows the actual and desired trajectory for the closed-loop system. It can be seen from the figures that trajectory r(t) = (x(t), y(t)) converges to the desired trajectory rg (t) in finite time. B. Simulation results for Section IV We consider the (13)  T desired goal location for  the system T as τ = 10 20 and the obstacle at o = 4 6 of radius 1. We use the safe distance dc = 2. Figure 5 shows the path of the vehicle. Figure 4 shows the distance of the vehicle from its goal location, which becomes 0 in finite time. y β where β = 1+α 2 < 1 and c = k̄2 . From [21], we get that 1−α in domain Ω = {x | V (x) < c}, the equilibrium point xd is finite-time stable. Now, in order to be able to stabilize the system in finite-time from any given initial condition, we 1−α for all i choose the control gains such that ki > V (x(0)) β 2 V (x(0))1−α 1−α so that k̄ > and V (x(0)) < c. Since V̇ (x) ≤ 2β 0, we get that V (x)1−α ≤ V (x(0))1−α ≤ c and hence the closed-loop system would be finite time stable. Furthermore, with α > n−1 n , it can be verified that the controller (24) remain bounded: from (26), ẋdn = −kn−1 |xi − xd |2α−1 + ẍdn−1 . Define (v)(k) as the k − th time derivative of v, so that we get Actual Trajectory Desired Trajectory 2 0 -2 0 2 4 6 8 10 x Fig. 3. Actual and Desired Trajectories C. Simulation results for Section V-B We consider 4 states for the system (23). The desired location is chosen as xd = [5, 0, 0, 0]T . Figure 6 shows the trajectory of the system. Again, it can be seen from the figure that the system converges to its desired state in finite time. VII. C ONCLUSIONS AND F UTURE W ORK We presented new geometric conditions for scalar systems in terms the system dynamics evaluated to establish finitetime stability. We demonstrated the utility of the condition through 2 examples where a vector-field based controller is designed for finite-time convergence. We also presented a novel method of designing finite-time Barrier function based control law for obstacle avoidance. Finally, we presented a novel continuous finite-time feedback controller for a general class of linear controllable systems. Our current research focuses on Hybrid and Switched systems. Therefore, in future, we would like to devise condition equivalent to Branicky’s condition for Switching systems to be finite-time stable under arbitrary switching. Also, we would also like to expand our collection of finite-time controllers for a general class of non-linear systems. R EFERENCES [1] E. Ryan, “Finite-time stabilization of uncertain nonlinear planar systems,” in Mechanics and control. Springer, 1991, pp. 406–414. [2] E. P. Ryan, “Optimal relay and saturating control system synthesis.” Institution of Electrical Engineers, 1982. [3] M. Athans and P. L. Falb, Optimal control: an introduction to the theory and its applications. Courier Corporation, 2013. 6 20 5 States of the System kx − τ k Distance of vehicle from Desired Goal Location 25 15 10 5 Trajectory of the System x1 x1d 4 3 2 1 0 0 20 40 60 80 100 0 0 Time (s) Fig. 4. Fig. 6. [16] [17] [18] [19] [20] Vehicle Path in presence of Obstacle. [4] J.-M. Coron, “On the stabilization in finite time of locally controllable systems by means of continuous time-varying feedback law,” SICON, vol. 33, no. 3, pp. 804–833, 1995. [5] S. P. Bhat and D. S. Bernstein, “Finite-time stability of continuous autonomous systems,” SICON, vol. 38, no. 3, pp. 751–766, 2000. [6] ——, “Geometric homogeneity with applications to finite-time stability,” Mathematics of Control, Signals, and Systems (MCSS), vol. 17, no. 2, pp. 101–127, 2005. [7] W. M. Haddad, S. G. Nersesov, and L. Du, “Finite-time stability for time-varying nonlinear dynamical systems,” in American Control Conference, 2008. IEEE, 2008, pp. 4135–4139. [8] Q. Hui, W. M. Haddad, and S. P. Bhat, “Semistability, finite-time stability, differential inclusions, and discontinuous dynamical systems having a continuum of equilibria,” IEEE Transactions on Automatic Control, vol. 54, no. 10, pp. 2465–2470, 2009. [9] V. T. Haimo, “Finite time controllers,” SICON, vol. 24, no. 4, pp. 760–770, 1986. [10] L. Wang and F. Xiao, “Finite-time consensus problems for networks of dynamic agents,” IEEE Trans. on Automatic Control, vol. 55, no. 4, pp. 950–955, 2010. [11] F. Amato, M. Ariola, and C. Cosentino, “Finite-time stability of linear time-varying systems: analysis and controller design,” IEEE Trans. on Automatic Control, vol. 55, no. 4, pp. 1003–1008, 2010. [12] Y. Hong, “Finite-time stabilization and stabilizability of a class of controllable systems,” Systems & control letters, vol. 46, no. 4, pp. 231–236, 2002. [13] X. Liu, J. Cao, W. Yu, and Q. Song, “Nonsmooth finite-time synchronization of switched coupled neural networks,” IEEE Trans. on cybernetics, vol. 46, no. 10, pp. 2360–2371, 2016. [14] S. Li, X. Wang, and L. Zhang, “Finite-time output feedback tracking control for autonomous underwater vehicles,” IEEE Journal of Oceanic Engineering, vol. 40, no. 3, pp. 727–751, 2015. [15] X. Wang, S. Li, and P. Shi, “Distributed finite-time containment 4 6 8 10 Time (s) Distance of the vehicle from desired goal location. Fig. 5. 2 [21] Time Evolution of the system states with time. control for double-integrator multiagent systems,” IEEE Trans. on Cybernetics, vol. 44, no. 9, pp. 1518–1528, 2014. Y. Wang, Y. Song, M. Krstic, and C. Wen, “Fault-tolerant finite time consensus for multiple uncertain nonlinear mechanical systems under single-way directed communication interactions and actuation failures,” Automatica, vol. 63, pp. 374–383, 2016. Y. Zheng and L. Wang, “Finite-time consensus of heterogeneous multiagent systems with and without velocity measurements,” Systems & Control Letters, vol. 61, no. 8, pp. 871–878, 2012. Y. Li and R. G. Sanfelice, “Results on finite time stability for a class of hybrid systems,” in American Control Conference (ACC), 2016. IEEE, 2016, pp. 4263–4268. ——, “A robust finite-time convergent hybrid observer for linear systems,” in CDC. IEEE, 2013, pp. 3349–3354. S. P. Bhat and D. S. Bernstein, “Continuous finite-time stabilization of the translational and rotational double integrators,” IEEE Trans. on automatic control, vol. 43, no. 5, pp. 678–682, 1998. Y. Shen and X. Xia, “Semi-global finite-time observers for nonlinear systems,” Automatica, vol. 44, no. 12, pp. 3152–3156, 2008.
3cs.SY
arXiv:1801.02790v2 [cs.DS] 16 Feb 2018 Better and Simpler Error Analysis of the Sinkhorn-Knopp Algorithm for Matrix Scaling Sanjeev Khanna∗ University of Pennsylvania [email protected] Deeparnab Chakrabarty Dartmouth College [email protected] February 19, 2018 Abstract Given a non-negative n × m real matrix A, the matrix scaling problem is to determine if it is possible to scale the rows and columns so that each row and each column sums to a specified target value for it. The matrix scaling problem arises in many algorithmic applications, perhaps most notably as a preconditioning step in solving linear system of equations. One of the most natural and by now classical approach to matrix scaling is the Sinkhorn-Knopp algorithm (also known as the RAS method) where one alternately scales either all rows or all columns to meet the target values. In addition to being extremely simple and natural, another appeal of this procedure is that it easily lends itself to parallelization. A central question is to understand the rate of convergence of the Sinkhorn-Knopp algorithm. Specifically, given a suitable error metric to measure deviations from target values, and an error bound ε, how quickly does the Sinkhorn-Knopp algorithm converge to an error below ε? While there are several non-trivial convergence results known about the Sinkhorn-Knopp algorithm, perhaps somewhat surprisingly, even for natural error metrics such as ℓ1 -error or ℓ2 -error, this is not entirely understood. In this paper, we present an elementary convergence analysis for the Sinkhorn-Knopp algorithm that improves upon the previous best bound. In a nutshell, our approach is to show (i) a simple bound on the number of iterations needed so that the KL-divergence between the current row-sums and the target row-sums drops below a specified threshold δ, and (ii) then show that for a suitable choice of δ, whenever KL-divergence is below δ, then the ℓ1 -error or the ℓ2 -error is below ε. The well-known Pinsker’s inequality immediately allows us to translate a bound on the KL divergence to a bound on ℓ1 -error. To bound the ℓ2 -error in terms of the KL-divergence, we establish a new inequality, referred to as (KL vs ℓ1 /ℓ2 ). This inequality is a strengthening of Pinsker’s inequality and may be of independent interest. Our analysis of ℓ2 -error significantly improves upon the best previous convergence bound for ℓ2 -error. 1 Introduction In the matrix scaling problem one is P given an n × non-negative matrix A, and positive integer vectors r ∈ Zn>0 Pm n m m and c ∈ Z>0 with the same ℓ1 norm i=1 ri = j=1 cj = h. The objective is to determine if there exist diagonal matrices R ∈ Rn×n and S ∈ Rm×m such that the ith row of the matrix RAS sums to ri for all 1 ≤ i ≤ n and the jth column of RAS sums to cj for all 1 ≤ j ≤ m. Of special importance is the case when n = m and r ≡ c ≡ 1n , the n-dimensional all-ones vector – the (1, 1)-matrix scaling problem wishes to scale the rows and columns of A to make it doubly stochastic. This problem arises in many different areas ranging from transportation planning [13, 27] to quantum mechanics [35, 1]; we refer the reader to a recent comprehensive survey by Idel [16] for more examples. One of the most natural algorithms for the matrix scaling problem is the following Sinkhorn-Knopp algorithm [36, 37], which is known by many names including the RAS method [5] and the Iterative Proportional Fitting Procedure [33]. The algorithm starts off by multiplicatively scaling all the columns by the columns-sum times cj to get a matrix A(0) with column-sums c. Subsequently, for t ≥ 0, it obtains the B (t) by scaling each row of A(t) by the ∗ This work was supported in part by the National Science Foundation grants CCF-1552909 and CCF-1617851. 1 respective row-sum times ri , and obtain A(t+1) by scaling each column of B (t) by the respective column sums time cj . More precisely, (t) (t) Aij Bij (t) (t+1) ∀t ≥ 0, Bij := Pm := Pn · ri , Aij · cj (t) (t) j=1 Aij i=1 Bij Aij (0) Aij := Pn · cj i=1 Aij The above algorithm is simple and easy to implement and each iteration takes O(nnz(A)), the number of non-zero entries of A. Furthermore, it has been known for almost five decades [36, 37, 14, 38] that if A is (r, c)-scalable then the above algorithm asymptotically1 converges to a right solution. More precisely, given ε > 0, there is some finite t by which one obtains a matrix which is “ε-close to having row- and column-sums r and c”. However, the rate of convergence of this simple algorithm is still not fully understood. Since the rate depends on how we measure “ε-closeness”, we look at two natural error definitions. For any t, let r(t) := A(t) 1m denote the ⊤ vector of row-sums of A(t) . Similarly, we define c(t) := B (t) 1n to be the vector of the column-sums of B (t) . Note Pn (t) Pm (t) that i=1 ri = j=1 cj = h for all t. The error of the matrix At (the error of matrix Bt similarly defined) is ℓ1 -error : error1 (At ) := ||r(t) − r||1 ℓ2 -error : error2 (At ) := ||r(t) − r||2 In this note, we give simple convergence analysis for both error norms. Our result is the following. n×m which is (r, c)-scalable, and any ε > 0, the Sinkhorn-Knopp algorithm Theorem 1. Given a matrix A ∈ R≥0  2  1. in time t = O h ln(∆ρ/ν) returns a matrix At or Bt with ℓ1 -error ≤ ε. ε2 2. in time t = O ρh ln (∆ρ/ν) · 1 ε + 1 ε2  returns a matrix At or Bt with ℓ2 -error ≤ ε. P P Here h = ni=1 ri = m j=1 cj , ρ = max(maxi ri , maxj cj ), ν = the maximum number of non-zeros in any column of A. mini,j:Aij >0 Aij , maxi,j Aij and ∆ = maxj |{i : Aij > 0}| is For the special case of n = m and r ≡ c ≡ 1n , we get the following as a corollary. n×n Corollary 2. Given a matrix A ∈ Z≥0 which is (1, 1)-scalable, and any ε > 0, the Sinkhorn-Knopp algorithm   2 returns a matrix At or Bt with ℓ1 -error ≤ ε. 1. in time t = O n ln(∆/ν) ε2 2. in time t = O n ln(∆/ν) · 1 ε + 1 ε2  returns a matrix At or Bt with ℓ2 -error ≤ ε. Here ∆ = maxj |{i : Aij > 0}| is the maximum number of non-zeros in any column of A. Remark 1.1. To our knowledge, the ℓ1 -error hasn’t been explicitly studied in the literature (but see last paragraph of Section 1.1), although for small ε ∈ (0, 1) the same can be deduced from previous papers on matrix scaling [21, 15, 20, 17]. One of our main motivations to look at ℓ1 -error arose from the connections to perfect matchings in bipartite graphs as observed by Linial, Samorodnitsky and Wigderson [21]. For the ℓ2 error, which is the better studied notion in the matrix scaling literature, the best analysis is due to Kalantari et al [19, 20]. They give a Õ(ρh2 /ε2 ) upper bound on the number of iterations for the general problem, and for the special case when m = n and the square matrix has positive permanent (see [19]), they give a Õ(ρ(h2 − nh + n)/ε2 ) upper bound. Thus, for (1, 1)-scaling, they get the same result as in Corollary 2. We get a quadratic improvement on h in the general case, and we think our proof is more explicit and simpler. 1 Computationally, this asymptotic viewpoint is unavoidable in the sense that there are simple examples for which the unique matrix scaling matrices example from Rothblum and  need to have irrational entries. For instance, consider the following  √  [32]. The matrix  √Schneider 1 1 ( 2 + 1)−1 0 2 0 ⊤ √ is with r ≡ c ≡ [1, 1] . The unique R and S matrices are , respectively, giving and 1 2 0 1 0 ( 2 + 2)−1 √ √   2− 2− 2 √1 . RAS = √ 2−1 2− 2 2 Remark 1.2. Both parts of Theorem 1 and Corollary 2 are interesting in certain regimes of error. When the error ε is “small” (say, ≤ 1) so that 1/ε2 ≥ 1/ε, then statement 2 of Corollary 2 implies statement 1 by Cauchy-Schwarz. However, this breaks down when ε is “large” (say ε = δn for some constant δ > 0). In that case, statement 1 implies that in O(ln n/δ 2 ) iterations, the ℓ1 -error is ≤ δn, but Statement 2 only implies that in O(ln n/δ 2 ) iterations, the ℓ2 norm is ≤ δn. This “large ℓ1 -error regime” is of particular interest for an application to approximate matchings in bipartite graphs discussed below. Applications to Parallel Algorithms for Bipartite Perfect Matching. As a corollary, we get the following application, first pointed by Linial et al [21], to the existence of perfect matchings in bipartite graphs. Let A be the adjacency matrix of a bipartite graph G = (L ∪ R, E) with Aij = 1 iff (i, j) ∈ E. If G has a perfect matching, then clearly there is a doubly stochastic matrix X in the support of A. This suggests the algorithm of running the Sinkhorn-Knopp algorithm to A, and the following claim suggests when to stop. Note that each iteration can be run in O(1) parallel time with m-processors where m is the number of edges. Lemma 1.1. If we find a column (or row) stochastic matrix Y in the support of A such that error1 (Y ) ≤ nε, then G has a matching of size ≥ n(1 − ε). P  P P n Y − 1 ≥ Proof. Suppose Y is column stochastic. Given S ⊆ L, consider i∈S,j∈ΓS Yij = |S| + i∈S j=1 ij Pn P P Pn Pn |S| − i=1 j=1 Yij − 1 ≥ |S| − error1 (Y ) ≥ |S| − nε. On the other hand, i=1 Yij = i∈S,j∈ΓS Yij ≤ j∈ΓS |ΓS|. Therefore, for every S ⊆ L, |ΓS| ≥ |S| − nε. The claim follows by approximate Hall’s theorem. Corollary 3 (Fast Parallel Approximate Matchings). Given a bipartite graph G of max-degree ∆ and an ε ∈ (0, 1), O(ln ∆/ε2 )-iterations of Sinkhorn-Knopp algorithm suffice to distinguish between the case when G has a perfect matching and the case when the largest matching in G has size at most n(1 − ε). Thus the approximate perfect matching problem in bipartite graphs is in NC for ε as small as polylogarithmic in n. This is not a new result and can indeed be obtained from the works on parallel algorithms for packing-covering LPs [22, 40, 3, 24], but the Sinkhorn-Knopp algorithm is arguably simpler. 1.1 Perspective As mentioned above, the matrix scaling problem and in particular the Sinkhorn-Knopp algorithm has been extensively studied over the past 50 years. We refer the reader to Idel’s survey [16] and the references within for a broader perspective; in this subsection we mention the most relevant works. We have already discussed the previously best known, in their dependence on h, analysis for the Sinkhorn-Knopp algorithm in Remark 1.1. For the special case of strictly positive matrices, better rates are known. Kalantari and Khachiyan [17] showed that √ for positive matrices and the (1, 1)-scaling problem, the Sinkhorn-Knopp algorithm obtains ℓ2 error ≤ ε in O( n ln(1/ν)/ε)-iterations; this result was extended to the general matrix scaling problem by Kalantari et al [20]. In a different track, Franklin and Lorenz [14] show that in fact the dependence on ε can be made logarithmic, and thus the algorithm has “linear convergence”, however their analysis2 has a polynomial dependence of (1/ν). All these results use the positivity crucially and seem to break down even with one 0 entry. The Sinkhorn-Knopp algorithm has polynomial dependence on the error parameter and therefore is a “pseudopolynomial” time approximation. We conclude by briefly describing bounds obtained by other algorithms for the matrix scaling problem whose dependence on ε is logarithmic rather than polynomial. Kalantari and Khachiyan [18] describe a method based on the ellipsoid algorithm which runs in time O(n4 ln(n/ε) ln(1/ν)). Nemirovskii and Rothblum [26] describe a method with running time O(n4 ln(n/ε) ln ln(1/ν)). The first strongly polynomial time approximation scheme (with no dependence on ν) was due to Linial, Samoridnitsky, and Wigderson [21] who gave a Õ(n7 ln(h/ε)) time algorithm. Rote and Zachariasen [31] reduced the matrix scaling problem to flow problems to 2 [14] never make the base of the logarithm explicit, but their proof shows it can be as large as 1 − 1/ν 2 . 3 give a O(n4 ln(h/ε)) time algorithms for the matrix scaling problem. To compare, we should recall that Theorem 1 shows that our algorithm runs in time O(nnz(A)h2 /ε2 ) time. Very recently, two independent works obtain vastly improved running times for matrix scaling. Cohen et al [10] give Õ(nnz(A)3/2 ) time algorithm, while Allen-Zhu et al [2] give a Õ(n7/3 +nnz(A)·(n+n1/3 h1/2 )) time algorithm; the tildes in both the above running times hide the logarithmic dependence on ε and ν. Both these algorithms look at the matrix scaling problem as a convex optimization problem and perform second order methods. After the first version of this paper was made public, we were pointed out another recent paper by Altschuler, Weed and Rigollet [4] who also study the ℓ1 -error and obtain the same result as part 1 of our Theorem. Indeed their proof techniques are very similar to what we use to prove part 1. 2 Entropy Minimization Viewpoint of the Sinkhorn-Knopp Algorithm There have been many approaches (see Idel [16], Section 3 for a discussion) towards analyzing the Sinkhorn-Knopp algorithm including convex optimization and log-barrier methods [17, 20, 23, 6], non-linear Perron-Frobenius theory [25, 38, 14, 9, 17], topological methods [29, 7], connections to the permanent [21, 19], and the entropy minimization method [8, 11, 12, 15] which is what we use for our analysis. We briefly describe the entropy minimization viewpoint. Given two non-negative matrices M and N let us define the Kullback-Leibler divergence3 between M and N as follows   X 1 X Mij D(M, N ) := (1) Mij ln h Nij 1≤i≤n 1≤j≤m with the convention that the summand is zero if both Mij and Nij are 0, and is ∞ if Mij > 0 and Nij = 0. Let Φr be the set of n × m matrices whose row-sums are r and let Φc be the set of n × m matrices whose column sums are c. Given matrix A suppose we wish to find the matrix A∗ = arg minB∈Φr ∩Φc D(B, A). One algorithm for this is to use the method of alternate projections with respect to the KL-divergence [8] (also known as I-projections [11]) which alternately finds the matrices in Φr and Φc closest in the KL-divergence sense to the current matrix at hand, and then sets the minimizer to be the current matrix. It is not too hard to see (see Idel [16], Observation 3.17 for a proof) that the above alternate projection algorithm is precisely the Sinkhorn-Knopp algorithm. Therefore, at least in this sense, the right metric to measure the distance to optimality is not the ℓ1 or the ℓ2 error as described in the previous section, but the rather the KL-divergence between the normalized vectors as described below. (t) (t) Let πr := r(t) /h be the n-dimensional probability vector whose ith entry is ri /h; similarly define the m(t) dimensional vector πc . Let πr denote the n-dimensional probability vector with the ith entry being ri /h; similarly define πc . Recall that the KL-divergence between two probability distributions p, q is defined as DKL (p||q) := P n i=1 pi ln(qi /pi ). The following theorem gives the convergence time for the KL-divergence.   n×m Theorem 4. If the matrix A ∈ R≥0 is (r, c)-scalable, then for any δ > 0 there is a t ≤ T = ⌈ ln(1+2∆ρ/ν) ⌉ with δ (t) (t) either DKL (πr ||πr ) ≤ δ or DKL (πc ||πc ) ≤ δ. Recall, ρ = max(maxi ri , maxj cj ), ν = ∆ = maxj |{i : Aij > 0}| is the maximum number of non-zeros in any column of A. mini,j:Aij >0 Aij , maxi,j Aij and Proof. Let Z := RAS be a matrix with row-sums r and column-sums c for diagonal matrices R, S. Recall A0 is the matrix obtained by column-scaling A. Note that the minimum non-zero entry of A0 is ≥ ν/∆. Lemma 2.1. D(Z, A0 ) ≤ ln(1 + 2∆ρ/ν) and D(Z, At ) ≥ 0 for all t. Proof. By definition, m n 1 XX Zij ln D(Z, A(t) ) = h j=1 i=1 3 The Zij (t) Aij ! m n 1 X X Zij = cj ln h j=1 i=1 cj Zij (t) Aij ! KL-divergence is normally stated between two distributions and doesn’t have the 1/h factor. Also the logarithms are usually base 2. 4 For a fixed j, the vectors  Z1j cj , Z2j Znj cj , . . . , cj  and  (t) A1j cj (t) , A2j cj (t) ,..., Anj cj  are probability vectors, and therefore the above is a sum of cj -weighted KL-divergences which is always non-negative. For the upper bound, one can use the fact (Inequality 27, [34]) that for any two distributions p and q, D(p||q) ≤ ln(1 + ||p−q||22 qmin ) ≤ ln(1 + 2 qmin ) where (0) qmin is the smallest non-zero entry of q. For our purpose, we note that the minimum non-zero probability of the Aj distribution being ≥ ν/∆ρ. Therefore, the second summand is at most ln(1 + 2∆ρ/ν) giving us D(Z, A(0) ) ≤ Pm 1 j=1 cj · ln(1 + 2∆ρ/ν) = ln(1 + 2∆ρ/ν). h Lemma 2.2. D(Z, A(t) ) − D(Z, B (t) ) = DKL (πr ||πr(t) ) and D(Z, B (t) ) − D(Z, A(t+1) ) = DKL (πc ||πc(t) ) Proof. The LHS of the first equality is simply ! (t) m n Bij 1 XX Zij ln (t) h j=1 i=1 A ! m n ri 1 XX Zij ln (t) h j=1 i=1 ri ! m n ri X 1X ln Zij (t) h i=1 ri j=1 ! n  X ri  ri /h · ln (t) h r /h i=1 = ij = = i since Pm j=1 (t) Zij = ri . The last summand is precisely DKL (πr ||πr ). The other equation follows analogously. (t) (t) The above two lemmas easily imply the theorem. If for all 0 ≤ t ≤ T , both DKL (πr ||πr ) > δ and DKL (πc ||πc ) > δ, then substituting in Lemma 2.2 and summing we get D(Z, A(0) ) − D(Z, A(T +1) ) > T δ > ln(1 + 2∆ρ/ν) contradicting Lemma 2.1. Theorem 1 follows from Theorem 4 using connections between the KL-divergence and the ℓ1 and ℓ2 norms. One is the following famous Pinsker’s inequality which allows us to easily prove part 1 of Theorem 1. Given any two probability distributions p, q, 1 (Pinsker) DKL (p||q) ≥ · ||p − q||21 2 (t) Proof of Theorem 1, Part 1. Apply (Pinsker) on the vectors πr and πr to get DKL (πr ||πr(t) ) ≥ Set δ := ε2 2h2 h2 ln(∆ρ/ν) time ε2 ||r(t) − r||1 ≤ ε. and apply Theorem 4. In O from the above inequality would imply 1 ||r(t) − r||21 2h2   (t) we would get a matrix with δ > DKL (πr ||πr ) which To prove Part 2, we need a way to relate the ℓ2 norm and the KL-divergence. In order to do so, we prove a different lower bound which implies Pinsker’s inequality (with a worse constant), but is significantly stronger in certain regimes. This may be of independent interest in other domains. Below we state the version which we need for the proof of Theorem 1, part 2. This is an instantiation of the general inequality Lemma 3.1 whcih we prove in Section 3. Lemma 2.3. Given any pair of probability distributions p, q over a finite domain, define A := {i : qi > 2pi } and B := {i : qi ≤ 2pi }. Then, ! X X (qi − pi )2 DKL (p||q) ≥ (1 − ln 2) · |qi − pi | + (KL vs ℓ1 /ℓ2 ) pi i∈A i∈B 5 (t) Proof of Theorem 1, Part 2. We apply Lemma 2.3 on the vectors πr and πr . Lemma 2.3 gives us DKL (πr ||πr(t) ) ≥ C· (t) 1 X (ri − ri )2 1 X (t) |ri − ri | + h h ri i∈A C h ≥ i∈B X i∈A (t) |ri 1 X (t) − ri | + (ri − ri )2 ρ i∈B ! ! where C = 1 − ln 2. If the second summand in the parenthesis of the RHS is ≥ 12 ||r(t) − r||22 , then we get (t) (t) C ||r(t) − r||22 . Otherwise, we have DKL (πr ||πr ) ≥ √C2h ||r(t) − r||2 , where we used the DKL (πr ||πr ) ≥ 2ρh weak fact that the sum of some positive numbers is at least the square-root of the sum of their squares. In any case, we get the following   C C (t) (t) (t) 2 (2) DKL (πr ||πr ) ≥ min ||r − r||2 , √ ||r − r||2 2ρh 2h  To complete the proof of part 2 of Theorem 1, set δ := 2ρh 1C+ 1 and apply Theorem 4. In O ρh ln (∆ρ/ν) · 1ε + ε12 ( ε ε2 ) (t) time we would get a matrix with δ ≥ DKL (πr ||πr ). If the minimum of the RHS of (2) is the first term, then we get ||r(t) − r||22 ≤ ε2 implying the ℓ2 -error is ≤ ε. If the minimum is the second term, then we get ||r(t) − r||2 ≤ √ε2ρ < ε since ρ ≥ 1. 3 New Lower Bound on the KL-Divergence We now establish a new lower bound on KL-divergence which yields (KL vs ℓ1 /ℓ2 ) as a corollary. Lemma 3.1. Let p and q be two distributions over a finite n-element universe. For any fixed θ > 0, define the sets Aθ := {i ∈ [n] : qi ≥ (1 + θ)pi } and Bθ = [n] \ Aθ = {i ∈ [n] : qi ≤ (1 + θ)pi }. Then we have the following inequality   2 !  X qi − pi 1 X ln(1 + θ) · (3) |qi − pi | + pi DKL (p||q) ≥ 1 − θ θ pi i∈Aθ i∈Bθ When θ = 1, we get (KL vs ℓ1 /ℓ2 ). Proof of Lemma 3.1: We need the following fact which follows from calculus; we provide a proof later for completeness.   . Then, and bθ := θ1 1 − ln(1+θ) Lemma 3.2. Given any θ > 0, define aθ := ln(1+θ) θ θ • For t ≥ θ, (1 + t) ≤ eaθ t 2 • For t ≤ θ, (1 + t) ≤ et−bθ t Define ηi := qi −pi pi . Note that Aθ = {i : ηi > θ} and Bθ is the rest. We can write the KL-divergence as follows DKL (p||q) := n X i=1 pi ln(pi /qi ) = − n X pi ln(1 + ηi ) i=1 For i ∈ Aθ , since ηi > θ, we upper bound (1 + ηi ) ≤ eaθ ηi using Lemma 3.2. For i ∈ Bθ , that is ηi ≤ θ, we P 2 upper ηi ) ≤ eηi −bθ ηi using Lemma 3.2. Lastly, we note i pi ηi = 0 since p, q both sum to 1, implying P bound (1 +P i∈Aθ pi ηi . Putting all this in the definition above we get i∈Bθ pi ηi = − X X X X X DKL (p||q) ≥ −aθ · pi ηi − pi ηi + bθ pi ηi2 = (1 − aθ ) pi ηi + bθ pi ηi2 i∈Aθ i∈Bθ The proof of inequality (3) follows by noting that bθ = i∈Bθ 1−aθ θ . 6 i∈Aθ i∈Bθ Proof of Lemma 3.2. The proof of both facts follow by proving non-negativity of the relevant function in the relevant interval. Recall aθ = ln(1 + θ)/θ and bθ = θ1 (1 − aθ ). We start with the following three inequalities about the log-function. For all z > 0, z + z 2 /2 > (1 + z) ln(1 + z) > z and ln(1 + z) > z − z 2 /2 (4) 1+ θ The third inequality in (4) implies aθ > 1 − θ/2 and thus, bθ < 1/2. The first inequality in (4) implies aθ < 1+θ2 which in turn implies bθ > 1/2(1 + θ). For brevity, henceforth let us lose the subscript on aθ and bθ . Consider the function f (t) = eat − (1 + t). Note that f ′ (t) = aeat − 1 which is increasing in t since a > 0. So, for any t ≥ θ, we have f ′ (t) ≥ aeaθ − 1 = (1+θ) ln(1+θ) − 1 ≥ 0, by the second inequality in (4). Therefore, f is θ increasing when t ≥ θ. The first part of Fact 3.2 follows since f (θ) = 0 by definition of a. Consider the function g(t) = et(1−bt) − (1 + t). Note that g(0) = g(θ) = 0. We break the argument in two parts: we argue that g(t) is strictly positive for all t ≤ 0, and that g(t) is strictly positive for t ∈ (0, θ). This will prove the second part of Fact 3.2.  The first derivative is g ′ (t) = (1−2bt)et(1−bt) −1 and the second derivative is g ′′ (t) = et(1−bt) (1 − 2bt)2 − 2b . Since b < 1/2, we have 2b < 1, and thus for t ≤ 0, g ′′ (t) > 0. Therefore, g ′ is strictly increasing for t ≤ 0. However, g ′ (0) = 0, and so g ′ (t) < 0 for all t < 0. This implies g is strictly decreasing in the interval t < 0. Noting g(0) = 0, we get g(t) > 0 for all t < 0. This completes the first part of the argument. 1 For the second part, we first note that g ′ (θ) < 0 since b > 2(1+θ) . That is, g is strictly decreasing at θ. On the ′ other hand g is increasing at θ. To see this, looking at g is not enough since g ′ (0) = 0. However, g ′′ (0) > 0 since b < 1/2. This means that 0 is a strict (local) minimum for g implying g is increasing at 0. In sum, g vanishes at 0 and θ, and is increasing at 0 and decreasing at θ. This means that if g does vanish at some r ∈ (0, θ), then it must vanish once again in [r, θ) for the it to be decreasing at θ. In particular, g ′ must vanish three times in (0, θ) and thus four times in [0, θ) since g ′ (0) = 0. This in turn implies g ′′ vanishes three times in [0, θ) which is a contradiction since g ′′ is a quadratic in t multiplied by a positive term. We end by proving (4). This also follows the same general methodology. Define p(z) := (1 + z) ln(1 + z) − z and q(z) := p(z) − z 2 /2. Differentiating, we get p′ (z) = ln(1 + z) > 0 for all z > 0, and q ′ (z) = ln(1 + z) − z < 0 for all z > 0. Thus, p is increasing, and q is decreasing, in (0, ∞). The first two inequalities of (4) follow since 1 z2 p(0) = q(0) = 0. To see the third inequality, define r(z) = ln(1+z)−z+z 2/2 and observe r′ (z) = 1+z −1+z = 1+z which is > 0 if z > 0. Thus r is strictly increasing, and the third inequality of (4) follows since r(0) = 0. 3.1 Comparison with other well-known inequalities We connect (KL vs ℓ1 /ℓ2 ) with two well known lower bounds on the KL-Divergence. First we compare with Pinsker’s inequality (Pinsker). To see that (KL vs ℓ1 /ℓ2 ) generalizes (Pinsker) with a weaker constant, note that ||p − q||21 = X i∈A |qi − pi | + X i∈B |qi − pi | !2 ≤2 X i∈A |qi − pi | !2 +2 X i∈B |qi − pi | pi pi !2 The first parenthetical term above, since it is ≤ 1, is at most the first summation in the parenthesis of (KL vs ℓ1 /ℓ2 ). The second parenthetical term above, by Cauchy-Schwarz, is at most the second summation in the parenthesis of (KL vs ℓ1 /ℓ2 ). Thus (KL vs ℓ1 /ℓ2 ) implies DKL (p||q) ≥ (1 − ln 2) ||p − q||21 2 that of (Pinsker). For instance, suppose On the other hand, the RHS of (KL √ vs ℓ1 /ℓ2 ) can be much larger than 1 √ pi = 1/n for all i, q1 = 1/n + 1/ n, and for i 6= 1, qi = 1/n − (n−1) . The RHS of (Pinsker) is Θ(1/n) while n √ that of (KL vs ℓ1 /ℓ2 ) is Θ(1/ n) which is the correct order of magnitude for DKL (p||q). 7 The KL-divergence between two distributions is also at least the Hellinger distance between them. Before proceeding, let us define this distance. Given two distributions p, q over [n], DHellinger (p, q) := n X √ √ 2 ( pi − qi ) i=1 !1/2 The following inequality is known (see Reiss [30] p 99, Pollard [28] Chap 3.3, or the webpage [39] for a proof). For any two distributions p, q, DKL (p||q) ≥ D2Hellinger (p, q) (KL-vs-Hellinger) It seems natural to compare the RHS of (KL vs ℓ1 /ℓ2 ) and (KL-vs-Hellinger) (we thank Daniel Dadush for bringing this to our attention). As the subsequent calculation shows, the RHS of (KL vs ℓ1 /ℓ2 ) is in fact Θ(D2Hellinger (p, q)). In particular, this implies one can obtain (by reverse engineering the argument below) part 2 of Theorem 2 via the application of (KL-vs-Hellinger) as well. For the set A = {i : qi > 2pi }, we know X √ qi + √ √ √ pi = Θ( qi − pi ). Therefore, X √ X √ √ √ √ √ 2 (qi − pi ) = ( qi + pi ) ( qi − pi ) = Θ ( qi − pi ) i∈A i∈A i∈A ! For any i ∈ B = {i √ : qi ≤ 2p  i }, let qi = (1 + ηi )pi where −1 ≤ ηi ≤ 1. Via a Taylor series expansion it is not hard to check 1 + η2i − 1 + ηi = Θ(ηi2 ) in this range of ηi . Observing that pi  qi − pi pi 2 = ηi2 pi and   ηi p √ 2 √ ( pi − qi ) = 2pi 1 + − 1 + ηi 2 we get that the RHS of (KL vs ℓ1 /ℓ2 ) is Θ(D2Hellinger (p, q)). Acknowledgements We thank Daniel Dadush for asking the connection between our inequality and Hellinger distance, and Jonathan Weed for letting us know of [4]. References [1] S. Aaronson. Quantum computing and hidden variables. Phys. Rev. A, 71:032325, Mar 2005. 1 [2] Z. Allen Zhu, Y. Li, R. Oliveira, and A. Wigderson. Much faster algorithms for matrix scaling. 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS, 2017. 4 [3] Z. Allen Zhu and L. Orecchia. Using optimization to break the epsilon barrier: A faster and simpler widthindependent algorithm for solving positive linear programs in parallel. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, San Diego, CA, USA, pages 1439–1456, 2015. 3 [4] J. Altschuler, J. Weed, and P. Rigollet. Near-linear time approximation algorithms for optimal transport via sinkhorn iteration. In I. Guyon, U. von Luxburg, S. Bengio, H. M. Wallach, R. Fergus, S. V. N. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pages 1961–1971, 2017. 4, 8 [5] M. Bacharach. Estimating nonnegative matrices from marginal data. International Economic Review, 6(3):294– 310, 1965. 1 8 [6] H. Balakrishnan, I. Hwang, and C. J. Tomlin. Polynomial approximation algorithms for belief matrix maintenance in identity management. In 2004 43rd IEEE Conference on Decision and Control (CDC) (IEEE Cat. No.04CH37601), volume 5, pages 4874–4879 Vol.5, Dec 2004. 4 [7] R. Bapat and T. Raghavan. An extension of a theorem of Darroch and Ratcliff in loglinear models and its application to scaling multidimensional matrices. Linear Algebra and its Applications, 114:705 – 715, 1989. Special Issue Dedicated to Alan J. Hoffman. 4 [8] L. Bregman. 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(3):200 – 217, 1967. 4 [9] R. A. Brualdi, S. V. Parter, and H. Schneider. The diagonal equivalence of a nonnegative matrix to a stochastic matrix. Journal of Mathematical Analysis and Applications, 16(1):31 – 50, 1966. 4 [10] M. B. Cohen, A. Madry, D. Tsipras, and A. Vladu. Matrix scaling and balancing via box constrained newton’s method and interior point methods. 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS, 2017. 4 [11] I. Csiszar. I-divergence geometry of probability distributions and minimization problems. Ann. Probab., 3(1):146–158, 02 1975. 4 [12] I. Csiszar. A geometric interpretation of Darroch and Ratcliff’s generalized iterative scaling. Ann. Statist., 17(3):1409–1413, 09 1989. 4 [13] W. E. Deming and F. F. Stephan. On a least squares adjustment of a sampled frequency table when the expected marginal totals are known. Ann. Math. Statist., 11(4):427–444, 12 1940. 1 [14] J. Franklin and J. Lorenz. On the scaling of multidimensional matrices. Linear Algebra and its Applications, 114:717 – 735, 1989. Special Issue Dedicated to Alan J. Hoffman. 2, 3, 4 [15] L. Gurvits and P. N. Yianilos. The deflation-inflation method for certain semidefinite programming and maximum determinant completion problems. Technical report, NEC Research Institute, 4 Independence Way, Princeton, NJ 08540, 1998. 2, 4 [16] M. Idel. A review of matrix scaling and Sinkhorn’s normal form for matrices and positive maps. ArXiv e-prints, Sept. 2016. 1, 3, 4 [17] B. Kalantari and L. Khachiyan. On the rate of convergence of deterministic and randomized RAS matrix scaling algorithms. Oper. Res. Lett., 14(5):237–244, 1993. 2, 3, 4 [18] B. Kalantari and L. Khachiyan. On the complexity of nonnegative-matrix scaling. Linear Algebra and its Applications, 240:87 – 103, 1996. 3 [19] B. Kalantari, I. Lari, F. Ricca, and B. Simeone. On the complexity of general matrix scaling and entropy minimization via the RAS algorithm. Technical Report, n.24, Department of Statistics and Applied probability, La Sapienza University, Rome, 2002. 2, 4 [20] B. Kalantari, I. Lari, F. Ricca, and B. Simeone. On the complexity of general matrix scaling and entropy minimization via the RAS algorithm. Math. Program., 112(2):371–401, 2008. 2, 3, 4 [21] N. Linial, A. Samorodnitsky, and A. Wigderson. A deterministic strongly polynomial algorithm for matrix scaling and approximate permanents. Combinatorica, 20(4):545–568, 2000. 2, 3, 4 [22] M. Luby and N. Nisan. A parallel approximation algorithm for positive linear programming. In Proceedings of the Twenty-fifth Annual ACM Symposium on Theory of Computing, STOC ’93, pages 448–457, New York, NY, USA, 1993. ACM. 3 9 [23] S. M. Macgill. Theoretical properties of biproportional matrix adjustments. Environment and Planning A, 9(6):687–701, 1977. 4 [24] M. W. Mahoney, S. Rao, D. Wang, and P. Zhang. Approximating the Solution to Mixed Packing and Covering LPs in Parallel O(ε−3 ) Time. In 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, July 11-15, 2016, Rome, Italy, pages 52:1–52:14, 2016. 3 [25] M. Menon. Reduction of a matrix with positive elements to a doubly stochastic matrix. Proceedings of the American Mathematical Society, 18(2):244–247, 1967. 4 [26] A. Nemirovskii and U. Rothblum. On complexity of matrix scaling. Linear Algebra and its Applications., 302:435–460, 1999. 3 [27] J. d. D. Ortúzar and L. G. Willumsen. Modelling Transport. John Wiley & Sons, Ltd, 2011. 1 [28] D. Pollard. A User’s Guide to Measure Theoretic Probability. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2001. 8 [29] T. Raghavan. On pairs of multidimensional matrices. Linear Algebra and its Applications, 62:263 – 268, 1984. 4 [30] R.-D. Reiss. Approximate distributions of order statistics. Springer-Verlag, 1989. 8 [31] G. Rote and M. Zachariasen. Matrix scaling by network flow. In Proceedings of the Eighteenth Annual ACMSIAM Symposium on Discrete Algorithms, SODA ’07, pages 848–854, Philadelphia, PA, USA, 2007. Society for Industrial and Applied Mathematics. 3 [32] U. Rothblum and H. Schneider. Scalings of matrices which have prespecified row sums and column sums via optimization. Linear Algebra and its Applications, 114:737 – 764, 1989. Special Issue Dedicated to Alan J. Hoffman. 2 [33] L. Ruschendorf. Convergence of the iterative proportional fitting procedure. Ann. Statist., 23(4):1160–1174, 1995. 1 [34] I. Sason and S. Verdú. Upper bounds on the relative entropy and rényi divergence as a function of total variation distance for finite alphabets. In 2015 IEEE Information Theory Workshop - Fall (ITW), Jeju Island, South Korea, October 11-15, 2015, pages 214–218. IEEE, 2015. 5 [35] E. Schrödinger. Über die umkehrung der naturgesetze. Preuss. Akad. Wiss., Phys.-Math. Kl., 1931. 1 [36] R. Sinkhorn. Diagonal equivalence to matrices with prescribed row and column sums. The American Mathematical Monthly, 74(4):402–405, 1967. 1, 2 [37] R. Sinkhorn and P. Knopp. Concerning nonnegative matrices and doubly stochastic matrices. Pacific J. Math., 21(2):343–348, 1967. 1, 2 [38] G. W. Soules. The rate of convergence of sinkhorn balancing. Linear Algebra and its Applications, 150:3 – 40, 1991. 2, 4 [39] Xi’an. Statistics stack exchange. https://stats.stackexchange.com/questions/130432/differences-betw Dec 27, 2014. [Online; accessed 15-January-2018]. 8 [40] N. E. Young. Sequential and parallel algorithms for mixed packing and covering. In 42nd Annual Symposium on Foundations of Computer Science, FOCS, Las Vegas, Nevada, USA, pages 538–546, 2001. 3 10
8cs.DS
Covert Communications with A Full-Duplex Receiver over Wireless Fading Channels Jinsong Hu∗† , Khurram Shahzad†, Shihao Yan† , Xiangyun Zhou†, Feng Shu∗ , Jun Li∗ arXiv:1711.03684v1 [cs.IT] 10 Nov 2017 ∗ School of Electronic and Optical Engineering, Nanjing University of Science and Technology, Nanjing, Jiangsu, China † Research School of Engineering, The Australian National University, Canberra, ACT, Australia Emails:{jinsong hu, shufeng, jun.li}@njust.edu.cn, {khurram.shahzad, shihao.yan, xiangyun.zhou}@anu.edu.au Abstract—In this work, we propose a covert communication scheme where the transmitter attempts to hide its transmission to a full-duplex receiver, from a warden that is to detect this covert transmission using a radiometer. Specifically, we first derive the detection error rate at the warden, based on which the optimal detection threshold for its radiometer is analytically determined and its expected detection error rate over wireless fading channels is achieved in a closed-form expression. Our analysis indicates that the artificial noise deliberately produced by the receiver with a random transmit power, although causes self-interference, offers the capability of achieving a positive effective covert rate for any transmit power (can be infinity) subject to any given covertness requirement on the expected detection error rate. This work is the first study on the use of the full-duplex receiver with controlled artificial noise for achieving covert communications and invites further investigation in this regard. I. I NTRODUCTION The Internet of Things (IoT) offers promising solutions to the materialization of concepts envisioning everything smart [1], and with this vision coming to reality in the recent years, the dependency of users on wireless devices is also rapidly increasing. Due to the broadcast nature of wireless channels, the security and privacy of wireless communications has been an ever-increasing concern, which now is the biggest barrier to the wide-spread adoption of IoT technologies [2]. Traditional security techniques offer protection against eavesdropping through encryption, guaranteeing the integrity of messages over the air. However, it has been shown in the recent years that even the most robust encryption techniques can be defeated by a determined adversary. Physical-layer security, on the other hand, exploits the dynamic characteristics of the wireless medium to minimize the information obtained by eavesdroppers [3]. However, it does not provide protection against the detection of a transmission in the first place, which can offer an even stronger level of security, as the transmission of encrypted transmission can spark suspicion in the first place and invite further probing by skeptical eavesdroppers. On the contrary, apart from protecting the content of communication, covert communication (also termed low probability of detection communication) aims to enable a wireless transmission between two users while guaranteeing a negligible detection probability of this transmission at a warden. Such communications are also highly desirable by government and military organizations, who are interested in keeping their activities hidden over the air. Covert communication has recently drawn significant research interests and is emerging as a cutting-edge technique in the context of wireless communication security [4], [5]. The fundamental limits of covert communication have been studied under various channels, such as additive white Gaussian noise (AWGN) channel [6], binary symmetric channel (BSC) [7], and discrete memoryless channel (DMC) [8]. A positive rate has been proved to be achievable when the warden has uncertainty on his receiver noise power [9], [10], the warden does not know when the covert communication happens [11], or an uniformed jammer comes in to help [12]. Most recently, [13] examined the impact of noise uncertainty on covert communication by considering two practical uncertainty models. In addition, the effect of imperfect channel state information and finite blocklength on covert communication has been investigated in [14] and [15], respectively, while covert communication in one-way relay networks over Rayleigh fading channels is examined in [16]. In this work, we explore the possibilities and conditions of covert communications in quasi-static wireless fading channels, exploiting the presence of an artificial noise (AN) generated by a full-duplex receiver [17], [18]. Using a full-duplex receiver offers a two-fold benefit relative to generating AN by a separate and independent jammer. Firstly, it enables a higher degree of control over the transmitted AN signals (e.g., its power), thus causing further deliberate confusion at the warden. Secondly, the cutting-edge self-interference cancellation techniques (e.g., [17], [18]) can be adopted to provide higher data rates for covert communications with the full-duplex receiver. Although the use of AN and jamming signals generated by the full-duplex receiver has been widely used in the literature (e.g., [19], [20]) for enhancing physicallayer security, to the best of our knowledge, this use has never been studied in the context of covert communications and thus motivates our first study in this regard. The contributions of this work are summarized as follows. • We propose the use of a full-duplex receiver (Bob) to achieve covert communications in wireless fading channels, where the desired level of covertness is achieved by controlling the random transmit power of AN (from zero to a maximum value) at Bob to deliberately confuse the warden (Willie). • For the radiometer detector, we derive the exact expression for the detection error rate for given channel realizations from the transmitter (Alice) and Bob to hbb hab Alice haw Tx Rx hbw Bob Willie Fig. 1. Covert communications with a full-duplex receiver. • Willie, based on which the optimal detection threshold is analytically determined. Surprisingly, our analysis shows that for some of these channel realizations guaranteeing a non-zero detection error rate requires the maximum transmit power of AN at Bob to approach infinity. Due to the unknown wireless channels from Alice and Bob to Willie, we analytically characterize the expected detection error rate at Willie from the perspective of Alice and derive the optimal maximum transmit power of AN at Bob in order to maximize the effective covert rate for a given covertness requirement on this expected detection error rate. Interestingly, our analysis indicates that a positive effective covert rate can always be achieved for any Alice’s transmit power of covert signals subject to any covertness requirement, while an upper bound on this effective covert rate exists that is achieved by increasing Alice’s transmit power to infinity. II. S YSTEM M ODEL A. Communication Scenario and Assumptions As shown in Fig. 1, we consider a wireless communication scenario, where Bob (i.e., the receiver) operates in fullduplex mode and Alice (i.e., the transmitter) wants to transmit covertly to Bob with the aid of AN generated by Bob, while Willie (i.e., the warden) tries to detect this covert transmission. The channels from Alice-to-Bob, Alice-to-Willie, and Bob-toWillie, are denoted by hab , haw , and hbw , respectively, while the self-interference channel of Bob is denoted by hbb . We assume that the wireless channels are subject to independent quasi-static Rayleigh fading, where the channel coefficient remains constant over one communication slot of n channel uses and changes independently from slot to slot. The mean value of |hj |2 over different slots is denoted by λj , where the subscript j can be ab, bb, aw, bw. Alice and Willie are assumed to have a single antenna, while besides the single receiving antenna, Bob uses an additional antenna for transmission of AN in order to deliberately confuse Willie. We assume that Bob knows hab , while Willie knows haw and hbw . If Alice transmits, the signal received at Bob is given by p p (1) yb [i] = Pa hab xa [i] + φPb hbb vb [i] + nb [i], where xa is the signal transmitted by Alice satisfying E[xa [i]x†a [i]] = 1, i = 1, 2, . . . , n is the index of each channel use, vb is the AN signal transmitted by Bob satisfying E[vb [i]vb† [i]] = 1, and nb [i] is the AWGN at Bob with σb2 as its variance, i.e., nb [i] ∼ CN (0, σb2 ). Since the AN signal is known to Bob, the residual noise can be rebuilt and eliminated by self-interference cancellation. In this work, we assume that the self-interference cannot be totally cancelled and we denote the self-interference cancellation coefficient by φ. Thus, φ = 0 refers to the ideal case, while 0 < φ ≤ 1 corresponds to different self-interference cancellation levels [21]. We denote the transmit powers of Alice and Bob by Pa and Pb , respectively, where Pa is fixed and publicly known by Willie and Bob. In contrast, Pb changes from slot to slot and follows a continuous uniform distribution over the interval [0, Pbmax ] with probability density function (pdf) given by fPb (x) = ( 1 Pbmax if 0, otherwise. 0 ≤ x ≤ Pbmax , (2) Since Willie possesses knowledge of haw and hbw in the slot under consideration, for a constant transmit power at Bob, it is straightforward for him to flag a covert transmission when an additional power from Alice is received. The purpose of introducing randomness in Bob’s transmit power is to create uncertainty in Willie’s received power, such that Willie is unsure whether an increase in the received power is due to Alice’s transmission or simply a variation in the transmit power of the Bob’s AN signal. Note that we consider the uniform distribution as an initial example and other distributions will be explored in future work. B. Detection Metrics At Willie We focus on one communication slot, where Willie has to decide whether Alice transmitted to Bob, or not. Thus Willie faces a binary hypothesis testing problem, where the null hypothesis H0 states that Alice did not transmit, while the alternative hypothesis H1 states that Alice did transmit to Bob. Under these hypotheses, the signal received at Willie is given by ( p Pb hbw vb [i] + nw [i], H0 , p (3) yw [i] = p Pa haw xa [i] + Pb hbw vb [i] + nw [i], H1 , 2 where nw [i] is the AWGN at Willie with a variance of σw . We note that the value of Pb in the given slot is unknown to Willie, while the value of Pa is publicly known. The ultimate goal for Willie is to detect whether yw comes from H0 or H1 . By application of Neyman-Pearson criterion, the optimal decision rule for Willie to minimize his detection error using the Likelihood Ratio test is given by [14] D1 Tw ≷ τ, (4) D0 Pn where Tw = 1/n i=1 |yw [i]|2 is the average power received at Willie in the slot, τ is a predetermined threshold and D1 and D0 are the decisions in favor of H1 and H0 respectively. In this work, we consider an infinite number of channel uses i.e., n → ∞, thus ( 2 Pb |hbw |2 + σw , H0 , Tw = (5) 2 2 Pa |haw | + Pb |hbw |2 + σw , H1 . Willie has to make a decision regarding Alice’s action at the end of this communication slot. We define the false alarm rate (or Type I error) as the probability that Willie makes a decision in favour of H1 while H0 is true and denote it by α = P(D1 |H0 ). Similarly, the miss detection rate (or Type II error) is defined as the probability of Willie making a decision in favour of H0 , while H1 is true, and it is denoted by β = P(D0 |H1 ). Under the assumption of equal a priori probabilities of hypotheses H0 and H1 , the detection performance of Willie is measured by its detection error rate, which is defined as ξ , α + β. III. D ETECTION P ERFORMANCE (6) AT W ILLIE We first analyze Willie’s detection performance in terms of false alarm and miss detection rates. Next, the optimal detection threshold at Willie, minimizing the detection error rate is considered. A. False Alarm and Miss Detection Rates Lemma 1. The false alarm and miss detection rates at Willie are given by  2 τ < σw ,   1, 2 τ −σw 2 (7) α= 1 − P max |hbw |2 , σw ≤ τ ≤ ρ1 , b   0, τ > ρ1 ,  τ < ρ2 ,  0, τ −ρ2 , ρ2 ≤ τ ≤ ρ3 , max (8) β= 2  Pb |hbw | 1, τ > ρ3 , where 2 ρ1 , Pbmax |hbw |2 + σw , 2 ρ2 , Pa |haw |2 + σw , 2 ρ3 , Pbmax |hbw |2 + Pa |haw |2 + σw . Proof: From (5), the false alarm rate is given by   2 α = P Pb |hbw |2 + σw >τ  2   1, h i τ < σw , 2 τ −σw 2 P Pb > |hbw |2 , σw = ≤ τ ≤ ρ1 ,   0, τ > ρ1 . Similarly, the miss detection rate is given by   2 β = P Pa |haw |2 + Pb |hbw |2 + σw <τ    0, h i τ < ρ2 , τ −ρ2 = P Pb < |hbw |2 , ρ2 ≤ τ ≤ ρ3 ,   1, τ > ρ3 . (9) (10) where we have used the uniform pdf of Pb , given by fPb (x) in (2). B. Optimal Detection Threshold In this section, we derive the optimal value of the detection threshold τ that minimizes the detection error rate ξ at Willie. Theorem 1. Under the assumption of a radiometer at Willie, the optimal threshold for his detector’s threshold is ( [ρ1 , ρ2 ], ρ1 < ρ2 , ∗ τ = (11) [ρ2 , ρ1 ], ρ1 ≥ ρ2 , and the corresponding detection error rate is given by  ρ1 < ρ2 ,  0, ∗ 2 ξ = Pa |haw |  1 − max , ρ1 ≥ ρ2 , Pb |hbw |2 (12) where ρ1 and ρ2 are as defined earlier in Lemma 1. Proof: We first note that ρ3 ≥ max(ρ1 , ρ2 ). When ρ1 < ρ2 , following (7) and (8), the detection error rate at Willie is  2 1, τ ≤ σw ,   2  τ −σw  2  1 − , σ < τ ≤ ρ1 , max  w Pb |hbw |2 ξ= (13) 0, ρ1 < τ ≤ ρ2 ,  τ −ρ2   , ρ ≤ τ < ρ , max 2 2 3    Pb |hbw | 1, τ ≥ ρ3 . Thus Willie can simply set τ ∈ [ρ1 , ρ2 ] to ensure ξ = 0 when Pa |haw |2 > Pbmax |hbw |2 , and hence can detect the covert transmission with probability one. When ρ1 ≥ ρ2 , the detection error rate at Willie is  2 1, τ ≤ σw ,   2  τ −σ  2 w    1 − Pbmax |hbw |2 , σw < τ ≤ ρ2 , 2 a |haw | (14) ξ= 1 − PPmax |hbw |2 , ρ2 < τ ≤ ρ1 ,  b  τ −ρ  2  ρ1 ≤ τ < ρ3 ,  P max |hbw |2 ,   b 1, τ ≥ ρ3 . We first note that ξ = 1 is the worst case scenario for Willie 2 and thus Willie does not set τ ≤ σw or τ > ρ3 . We also note that ξ in (14) is a continuous decreasing function of 2 τ when σw < τ ≤ ρ2 . Thus, Willie will set ρ2 as the threshold to minimize ξ in this case. For ρ1 ≤ τ < ρ3 , ξ is an increasing function of τ . Thus Willie will set ρ1 as the threshold to minimize ξ if ρ1 ≤ τ < ρ3 . When ρ2 ≤ τ < ρ1 , the value of ξ is constant with the minimum value 1 − (Pa |haw |2 )/(Pbmax |hbw |2 ). Remark 1. We note here that although the noise variance 2 at Willie i.e., σw appears in the calculation of radiometer’s optimal threshold, it does not affect the detection error rate, ξ ∗ , at Willie. On the other hand, the transmit power limit at Bob directly affects ξ ∗ , since as Pbmax → ∞, ξ ∗ → 1. IV. P ERFORMANCE OF C OVERT C OMMUNICATION In this section, we first analyze the transmission outage probability at Bob. Next, we consider optimizing the effective covert rate achieved in the system subject to a certain covert constraint. A. Transmission Outage Probability from Alice to Bob Following (1), the signal-to-interference-plus-noise ratio (SINR) at Bob is given by γb = Pa |hab |2 . φPb |hbb |2 + σb2 (15) 0 We assume here that the transmission rate from Alice to Bob is predetermined, and is denoted by R. Due to the randomness in |hab |2 , |hbb |2 , and Pb , the transmission outage probability from Alice to Bob still incurs when C < R, where C is the channel capacity from Alice to Bob. Lemma 2. The transmission outage probability from Alice to Bob is given by δ = 1 − λab e 2 µσb −λ ab ln(µφλbb Pbmax + λab ) − ln(λab ) , µφλbb Pbmax (16) where µ = (2Rab − 1)/Pa . Proof: Based on the definition of the transmission outage probability, we have  Pa |hab |2 R <2 −1 δ=P φPb |hbb |2 + σb2 Z Pbmax Z +∞ Z µ(φPb |hbb |2 +σb2 ) fPb (x)f|hbb |2 (y)× =  0 0 0 f|hab |2 (z)dxdydz, We next derive P[ρ1 ≥ ρ2 ] and E[ξ ∗ |ρ1 ≥ ρ2 ], which are given by   P max |hbw |2 P[ρ1 ≥ ρ2 ] = P |haw |2 ≤ b Pa Z +∞ Z PbPmax y a = f|hbw |2 (x)f|haw |2 (y)dxdy (17) 0 Pbmax λbw = , Pa λaw + Pbmax λbw (21) and   Pa |haw |2 ρ1 ≥ ρ2 E[ξ |ρ1 ≥ ρ2 ] = 1 − max E Pb |hbw |2 max Z +∞ Z PbP y a x Pa f|h |2 (x)f|hbw |2 (y)dxdy = 1 − max Pb y aw 0 ( 0  Pa λaw P max λbw = 1 − max ln 1 + b Pb λbw Pa λaw ) Pbmax λbw , (22) − Pa λaw + Pbmax λbw ∗ and substituting them into (20) completes the proof. C. Optimal AN Power and Covert Rate The problem of maximizing the effective covert rate achievable in the considered system subject to a certain covert constraint is given by (P1) max Pbmax s. t. and solving this integral gives the desired result. Rc (23) ξ ∗ ≥ 1 − ǫ, where Rc , R(1 − δ). B. Expected Detection Error Rate Since Alice and Bob do not know the instantaneous realization of haw or hbw , we consider the expected value of ξ ∗ over all realizations of haw and hbw as the measure of covertness from Alice and Bob’s perspective. We denote the expected detection error rate at Willie as ξ ∗ . Then, the covertness requirement can be written as ξ ∗ ≥ 1 − ǫ, where ǫ ∈ [0, 1] specifies a predetermined covert constraint. Theorem 2. Under the optimal threshold setting, the expected detection error rate at Willie is given by 2 ξ ∗ (t) = −t + t ln t + 1, (18) Theorem 3. For any given transmit power Pa at Alice, and a covertness constraint, ǫ, the optimal choice for Pbmax to maximize the effective covert rate is given by Pbmax∗ = Pa λaw (1 − tǫ )/(tǫ λbw ), (24) and the maximum effective covert rate is given by   (1−tǫ ) 2 ln (2R − 1)φλbb λλaw + 1 (2R −1)σb λ t ∗ ǫ bw ab − , Rc = Rλab e Pa λab (1−tǫ ) (2R − 1)φλbb λaw λbw tǫ (25) where tǫ is the solution of ξ ∗ (t) = 1 − ǫ for t, and ξ ∗ (t) is as defined in (18). Proof: We first determine the monotonicity of ξ ∗ (t) with respect to t. The first derivative is given as where t , (Pa λaw )/(Pa λaw + Pbmax λbw ). (19) Proof: From (12), the expected ξ ∗ is given by ξ ∗ = P[ρ1 < ρ2 ] × 0 + P[ρ1 ≥ ρ2 ] × E[ξ ∗ |ρ1 ≥ ρ2 ] = P[ρ1 ≥ ρ2 ] × E[ξ ∗ |ρ1 ≥ ρ2 ]. (20) ∂ξ ∗ (t) = −2t + ln t + 1. ∂t (26) To determine the monotonicity of κ(t) , −2t + ln t + 1, we again consider the first derivative as 1 ∂κ(t) = −2 + . ∂t t (27) Noting that t ∈ [0, 1), we conclude that κ(t) is a monotonically increasing function with t for 0 ≤ t < 1/2, while it is a monotonically decreasing function with t for 1/2 ≤ t < 1. Since the maximum value of κ(t) is κ(1/2) = − ln 2 for t ∈ [0, 1), we conclude that ∂ξ ∗ (t)/∂t < 0 for t ∈ [0, 1), thus ξ ∗ (t) monotonically decreases with t. This leads to the conclusion that ξ ∗ monotonically increases with Pbmax . Next, we will prove that the effective covert rate, Rc , monotonically decreases with Pbmax . Setting µφλbb Pbmax = x, from (16), we have δ = 1 − λab exp[−(µσb2 )/λab ]ν(x), where ln(x + λab ) − ln(λab ) . (28) x In order to determine the monotonicity of ν(x) with respect to x, we consider the first derivative as ν(x) = x x+λab − ln(x + λab ) + ln(λab ) ∂ν(x) , (29) = ∂x x2 where we note that whether ∂ν(x)/∂x > 0 or ∂ν(x)/∂x < 0 depends on g(x) , x/(x + λab ) − ln(x + λab ) + ln(λab ). We thus consider the first derivative of g(x) as x ∂g(x) . =− ∂x (x + λab )2 1 0.8 0.6 0.4 0.2 0 -10 0 10 20 30 40 Fig. 2. Transmission outage probability δ vs. Pbmax , where Pa = 0 dB and φ = 0.01. 1 (30) Noting that x ≥ 0 and ∂g(x)/∂x ≤ 0, it can be seen that g(x) monotonically decreases with x. Thus g(x) ≤ g(0) = 0 and ∂ν(x)/∂x ≤ 0, which means that ν(x) is a monotonically decreasing function with Pbmax , which leads to δ monotonically increasing with Pbmax . As such, Rc monotonically decreases with Pbmax . Since ξ ∗ monotonically increases with Pbmax , we can obtain the optimal value of Pbmax using the constraint in (23). Then, using (16) and (24), we can obtain the maximum ∗ effective covert rate Rc . Corollary 1. When the transmit power at Alice increases, the maximum effective covert rate approaches a fixed value given by   λaw (1−tǫ ) R ln (2 − 1)φλ + 1 bb λbw λab tǫ ∗ lim Rc = Rλab , (31) (1−tǫ ) R Pa →∞ (2 − 1)φλbb λaw λbw tǫ Proof: Following (25), exp{−(2R − 1)σb2 /(Pa λab )} → 1 as Pa → ∞. We note that having a higher transmit power at Alice benefits Bob, but also increases Willie’s probability of detecting the covert transmission. Thus to maintain the same level of covertness, Bob has to increase the AN power as well. Here, Corollary 1 implies that having higher transmit power at Alice has diminishing returns as the increase in self-interference due to AN’s power cancels out the benefit of higher transmit power at Alice. V. N UMERICAL R ESULTS AND D ISCUSSION In this section, we present numerical results to study the performance of covert communication. For simplicity, we set λab = λbb = λaw = λbw = 1. As mentioned earlier, 2 the value of σw does not affect the detection error rate at 0.8 0.6 0.4 0.2 0 -20 -10 0 10 20 Fig. 3. Expected detection error rate at Willie, ξ ∗ vs. Pbmax . Willie, and hence the performance of the proposed covert communication scheme. We first examine the transmission outage probability at Bob and the detection performance at Willie. Next, the impact of different system parameters on the achievable effective covert rate subject to a specific covert constraint is investigated. In Fig. 2, we illustrate the transmission outage probability δ versus Pbmax with different values of σb2 and R. In this figure, we first observe that transmission outage probability δ is a monotonically increasing function of Pbmax . This is due to the fact that the term φPb |hbb |2 , representing the self-interference, always presents a barrier for effective communication from Alice to Bob. It is also observed that δ increases with Bob’s receiver noise variance σb2 and the predetermined rate R. Fig. 3 shows ξ ∗ , the expected detection error rate at Willie, versus Pbmax for different values of Pa . In this figure, we 0.9 ACKNOWLEDGMENTS 0.8 This work was supported in part by the National Natural Science Foundation of China (Nos. 61472190, 61501238, and 61771244) and the Australian Research Council’s Discovery Projects (DP150103905). 0.7 0.6 R EFERENCES 0.5 0.4 0.3 0.2 0.1 0 -10 0 10 20 30 ∗ Fig. 4. Maximum effective covert rate Rc vs. Alice’s transmit power Pa , where R = 1, σb2 = 0 dB, and φ = 0.01. first observe that the expected detection error rate, ξ ∗ , is a monotonically increasing function of Pbmax , as the power used to transmit the AN hinders the detection process at Willie to detect any covert transmission from Alice. It is also validated by the observation that when Pbmax is increased sufficiently, ξ ∗ → 1 and the covert transmission becomes harder to detect. We also observe that ξ ∗ is a monotonically decreasing function of Pa , since a higher transmit power used by Alice increases the probability of being detected by Willie. This can also be noted from the observation that when Pbmax is sufficiently small, ξ ∗ → 0, and Willie can easily detect the covert transmission. These observations are also consistent with our earlier comments in Remark 1. Fig. 4 depicts the maximum achievable effective covert ∗ rate Rc versus Pa for different values of ǫ. We first observe ∗ that Rc is a monotonically increasing function of Pa and ǫ. This observation is consistent with our understanding of the presented system, since increasing Pa increases the received SNR at Bob, while an increase in ǫ relaxes the covertness ∗ constraint. We also observe that Rc approaches a fixed value when Pa is sufficiently large, which validates the correctness of our Corollary 1. VI. C ONCLUSION In this work, we analytically examined how a full-duplex receiver can aid in receiving information covertly from a transmitter by generating AN with a random transmit power. By controlling the transmit power range of the AN, a positive effective covert rate can always be achieved for any covertness requirement on the expected detection error at the warden. This work presented the first study on the possibilities and conditions of achieving covert communications by exploiting a full-duplex receiver with AN. It is expected that future work will devise improved covert transmission schemes, leading to a better tradeoff between covertness and achievable covert rates. [1] A. A. Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, and M. Ayyash, “Internet of Things: A Survey on Enabling Technologies, Protocols, and Applications,” IEEE Commun. Surveys Tuts., vol. 17, no. 4, pp. 2347– 2376, Jun. 2015. [2] Y. Zhang, Y. Shen, H. Wang, J. Yong, and X. Jiang, “On Secure Wireless Communications for IoT Under Eavesdropper Collusion,” IEEE Trans. Autom. Sci. Eng., vol. 13, no. 3, pp. 1281–1293, Dec. 2015. [3] M. Bloch and J. Barros, Physical-Layer Security: From Information Theory to Security Engineering, 1st ed. Cambridge, UK: Cambridge University Press, 2011. [4] B. A. Bash, D. Goeckel, D. Towsley, and S. Guha, “Hiding information in noise: fundamental limits of covert wireless communication,” IEEE Commun. Mag., vol. 53, no. 12, pp. 26–31, Dec. 2015. [5] M. Bloch, “Covert communication over noisy channels: A resolvability perspective,” IEEE Trans. Inf. Theory, vol. 62, no. 5, pp. 2334–2354, May 2016. [6] B. A. Bash, D. Goeckel, and D. Towsley, “Limits of reliable communication with low probability of detection on AWGN channels,” IEEE J. Sel. Areas Commun., vol. 31, no. 9, pp. 1921–1930, Sep. 2013. [7] P. H. Che, M. Bakshi, and S. Jaggi, “Reliable deniable communication: Hiding messages in noise,” in Proc. IEEE Int. Symp. Inf. Theory, Jul. 2013, pp. 2945–2949. [8] L. Wang, G. W. Wornell, and L. Zheng, “Fundamental limits of communication with low probability of detection,” IEEE Trans. Inf. Theory, vol. 62, no. 6, pp. 3493–3503, Jun. 2016. [9] S. Lee, R. J. Baxley, M. A. Weitnauer, and B. T. Walkenhorst, “Achieving undetectable communication,” IEEE J. Sel. Topics Signal Process., vol. 9, no. 7, pp. 1195–1205, Oct. 2015. [10] D. Goeckel, B. A. Bash, S. Guha, and D. Towsley, “Covert communications when the warden does not know the background noise power,” IEEE Commun. Lett., vol. 20, no. 2, pp. 236–239, Feb. 2016. [11] B. A. Bash, D. Goeckel, and D. Towsley, “LPD communication when the warden does not know when,” in Proc. IEEE Int. Symp. Inf. Theory, Jul. 2014, pp. 606–610. [12] T. V. Sobers, B. A. Bash, S. Guha, D. Towsley and D. Goeckel, “Covert Communication in the Presence of an Uninformed Jammer,” IEEE Trans. Wireless Commun., vol. 16, no. 19, pp. 6193–6206, Sep. 2017. [13] B. He, S. Yan, X. Zhou, and V. K. N. Lau, “On covert communication with noise uncertainty,” IEEE Commun. Lett., vol. 21, no. 4, pp. 941–944, Apr. 2017. [14] K. Shahzad, X. Zhou, and S. Yan, “Covert communication in fading channels under channel uncertainty,” in Proc. IEEE VTC Spring, Jun. 2017, pp. 1–5, arXiv:1703.02169. [15] S. Yan, B. He, Y. Cong, and X. Zhou, “Covert communication with finite blocklength in AWGN channels,” in Proc. IEEE ICC, May 2017, pp. 1–6, arXiv:1701.08891. [16] J. Hu, S. Yan, X. Zhou, F. Shu, J. Li, and J. Wang, “Covert communication achieved by a greedy relay in wireless networks,” arXiv preprint arXiv:1708.00905, pp. 1–12, Aug. 2017. [17] M. Duarte, C. Dick, and A. Sabharwal, “Experiment-Driven Characterization of Full-Duplex Wireless Systems,” IEEE Trans. Wireless Commun., vol. 11, no. 12, pp. 4296–4307, Nov. 2012. [18] D. Bharadia, E. Mcmilin, and S. Katti, “Full Duplex Radios,” in Proc. ACM SigComm, Aug. 2013, pp. 375–386. [19] G. Zheng, I. Krikidis, J. Li, A. P. Petropulu, and B. E. Ottersten, “Improving physical layer secrecy using full-duplex jamming receivers,” IEEE Trans. Signal Process., vol. 61, no. 20, pp. 4962–4974, Oct. 2013. [20] W. Li, M. Ghogho, B. Chen, and C. Xiong, “Secure communication via sending artificial noise by the receiver: Outage secrecy capacity/region analysis,” IEEE Commun. Lett., vol. 16, no. 10, pp. 1628–1631, Oct. 2012. [21] E. Everett, A. Sahai, and A. Sabharwal, “Passive self-interference suppression for full-duplex infrastructure nodes,” IEEE Trans. Wireless Commun., vol. 13, no. 2, pp. 680–694, Feb. 2014.
7cs.IT
Traffic-Aware Transmission Mode Selection in D2D-enabled Cellular Networks with Token System Yiling Yuan∗, Tao Yang∗, Hui Feng∗, Bo Hu∗† , Jianqiu Zhang∗, Bin Wang∗ and Qiyong Lu∗ arXiv:1703.00660v3 [cs.IT] 13 Jun 2017 ∗ Research Center of Smart Networks and Systems, School of Information Science and Engineering † Key Laboratory of EMW Information (MoE) Fudan University, Shanghai, China, 200433 Emails: {yilingyuan13, taoyang, hfeng, bohu, jqzhang01, wangbin, lqyong}@fudan.edu.cn Abstract—We consider a D2D-enabled cellular network where user equipments (UEs) owned by rational users are incentivized to form D2D pairs using tokens. They exchange tokens electronically to “buy” and “sell” D2D services. Meanwhile the devices have the ability to choose the transmission mode, i.e. receiving data via cellular links or D2D links. Thus taking the different benefits brought by diverse traffic types as a prior, the UEs can utilize their tokens more efficiently via transmission mode selection. In this paper, the optimal transmission mode selection strategy as well as token collection policy are investigated to maximize the long-term utility in the dynamic network environment. The optimal policy is proved to be a threshold strategy, and the thresholds have a monotonicity property. Numerical simulations verify our observations and the gain from transmission mode selection is observed. I. I NTRODUCTION To meet the dramatically increasing traffic demand and provide better user experience, the device-to-device (D2D) communication has been proposed recently. This technology, which enables direct communication between two mobile users in proximity, has attracted attention in both industry and academic [1]–[3]. The adoption of D2D communication allows high-rate, low-delay and low-power transmissions [4]. Recent researches on D2D communication mainly focus on developing various optimization and game theory frameworks for mode selection, resource allocation or interference management in order to maximize throughput or to improve energy efficiency [5]–[7]. These studies are based on the assumption that there are many devices already in D2D communication mode. However, this assumption needs to be re-examined in realistic scenarios. The UEs are possessed by self-interested users who aim to maximize their individual utilities. In practice, they would have no incentive to provide D2D service unless receiving satisfactory rewards. Therefore, it is crucial to design a proper incentive mechanism to encourage UEs to form D2D pairs [8]. In this paper, we design a token-based incentive system. In such system, UEs pay tokens to or gain tokens from other UEs in exchange for D2D service. Some previous works have investigated the token system on cooperative relaying in cellular networks [9], [10]. In [9], authors designed a token incentive scheme from the perspective of a system designer. In [10], authors investigated how UEs can learn the token gathering strategies online. However, neither of them takes into account how UEs make decisions when facing two alternatives, i.e. D2D link versus cellular link. The former one has to consume tokens while the latter one does not. In practice, there are various types of traffic which will result in different benefits in D2D communication. If the decision on transmission mode selection is considered, tokens can be utilized more efficiently. Intuitively, the UE could spend more tokens on more beneficial traffic types to improve his utility. Therefore, it is crucial to answer the question “when to use tokens” or “which transmission mode to choose” equivalently. To the best of our knowledge, our work is the first attempt in literature to investigate token consuming policy in the token system designed for D2D-enabled cellular networks. In this paper, we consider a D2D-enabled cellular network where UEs are incentivized to form D2D pair using tokens. We formulate a Markov decision process (MDP) model to characterize the interaction between each UE and environment. i.e. transmission mode selection policy and token collection strategy. When traffic arrives, a UE needs to first choose the transmission mode, and then determines whether to accept D2D request if idle. The objective of a UE is to maximize his long-term utility, which is defined as the difference between the benefit he obtains when receiving data through D2D link and the cost he pays when providing D2D service. Furthermore, the structure of the optimal policy is investigated. Unlike [10], [11], the optimal policy is analytically proved to be threshold in the number of the tokes instead of just taking this property as an assumption. Moreover, it turns out that the threshold increases as a function of the benefits of the traffic types. The numerical simulations verify our observations and the gain from transmission mode selection is observed. The rest of this paper is organized as follows. In Section II, the system model is discussed. In Section III, the MDP model for individual UE’s decision problem is developed. In Section IV, we investigate the structure of the optimal policy. Section V gives some numerical simulation results, and finally section VI concludes this paper. II. S YSTEM M ODEL A. Network Model In this paper, we consider a D2D-enabled wireless cellular network and the slot based system is adopted. At each slot, when traffic arrives, such as transferring a file, the UE will choose the transmission mode and start a transmission procedure. The transmission modes include cellular mode and D2D mode. The former mode corresponds to the conventional cellular communication and the latter mode represents D2D communication. According to the given policy as well as the available information, the decision is made at the beginning of each slot. Note that each slot may last several seconds and each type of traffic may last multiple slots. Without loss of generality, we assume that for any type, D2D mode can always obtain higher benefit than cellular mode. It is reasonable due to lower power consumption and higher throughput of D2D link. Suppose the utility for cellular mode is 0 for convenience. Considering different requirements for different traffic types, we define the specific utility for each type of traffic according to its characteristics. There are some widely used classification in literature under various practical consideration. Basically, in terms of throughput requirements, traffic can be divided into two types, stream traffic and elastic traffic [12]. Besides, traffic can also be classified as video traffic, audio traffic and file transfer according to the types of applications [13]. Similar to [14], we do not specify a concrete traffic classification. Instead, we assume there are N types of traffic and the traffic type set is denoted as S o = {s1 , s2 , · · · , sN }. Especially, we regard s0 as a special type of traffic, namely, the idle state. Hence we can define the extended traffic type set as S = S o ∪ {s0 }. The stationary probability of each type P s ∈ S is p(s) with 0 < p(s) < 1 and s∈S p(s) = 1. We denote bs as the benefit of D2D mode for traffic type s ∈ S o . Moreover, we assume that 0 < bs1 < bs2 < · · · < bsN . B. Token System Although D2D communication has multiple advantages, the UEs are generally reluctant to provide D2D service since this incurs cost and provides them with no reward. To overcome this difficulty, we use token system to incentive UEs to accept D2D requests. Specifically, a UE must spend tokens in exchange for receiving data through D2D link, and can only earn tokens by providing D2D service for other UEs. Because the device works in half-duplex mode and the traffic demand must be met, so it is reasonable to assume that only in idle state, a UE can provide D2D transmission service. The token system has many advantages [9]. First, there is no extra payment exchange involved, which avoids many financial problems associated with other monetary incentive schemes. Second, no personal information exchange is required, which allows secure implementation. Recently, several techniques which could enable electronic token transaction, have been proposed [15]. We assume that our token system is implemented using such technologies. The entire system is described as follows. Consider UE j decides to start a D2D transmission. At this point, UE j sends a D2D request to the selected UE j ∗ under a predefined criterion. If the request is accepted, UE j will pay one token to UE j ∗ through token exchange system. Otherwise, the UE j will seek another UE to forward his traffic. If there is no UE accepting TABLE I: Action spaces State (s, k) Action space s 6= s0 AM s = s0 AR Action aM = 0 aM = 1 aR = 0 aR = 1 Physical meanings choose cellular mode choose D2D mode accept any D2D request refuse any D2D request the request, UE j has to deliver the data through BS. Moreover, we assume that the UE can serve only one UE simultaneously. Therefore, an idle UE will choose only one or reject all when he receives multiple D2D requests. III. P ROBLEM F ORMULATION In this section, we formulate the optimal policy for a UE based on MDP model. When a UE has no token, he has no choice but to choose cellular mode. In addition, a UE would spend as many tokens as possible on the traffic types with high utility in order to maximize his utility. Therefore, it is needed to investigate the optimal strategy, which includes transmission mode selection policy and token collection strategy. A. State and Action Spaces Token holding state: At any given slot t, the UE holds kt ∈ K = {0, 1, · · · , K} tokens, where K is the maximal number of tokens allowed in the system. Traffic type state: At different slots, the UE may have different type of traffic. Denote the type of traffic in slot t as st ∈ S. Assume that the traffic types of different slots are independent mutually. The state parameters defined above can be used to describe the UE’s private information at slot t. Hence, let Ωt = (st , kt ) denote the state of the UE at slot t. When s 6= s0 , which means a specified traffic arrives, the UE can take an action to choose D2D mode or cellular mode. We denote the action taken when s 6= s0 as aM ∈ AM = {0, 1}. aM = 0 and aM = 1 represent the cellular mode and D2D mode, respectively. When s = s0 , the UE can decide whether to accept D2D requests from other UEs. In this situation, we denote the action taken as aR ∈ AR = {0, 1}. aR = 0 is the action that the UE chooses to accept the D2D request to earn one token, and aR = 1 represents the action that the UE refuses to provide D2D service for other UEs. Putting all these together, the action space A(s, k) is shown in Table.I. B. Transition Probability Now we discuss the state transition probability. Let P {(s′ , k ′ )|(s, k), a} denote the state transition probability function, which represents the probability that the UE transfers from state Ω = (s, k) to state Ω′ = (s′ , k ′ ) depending on the action a. Because the D2D request may not be accepted and a UE may not receive any D2D requests even if he takes the action aR = 0, the state transition is influenced by the complicated varying environment. We use a stochastic model to describe the environmental dynamics. The associated environmental TABLE II: Environmental factors Parameters p q Physical meanings probability of receiving D2D requests probability of its D2D request being accepted factors are shown in Table.II. Specifically, we use 0 < p < 1 to denote the probability of receiving D2D requests when the UE takes the action aR = 0, and use 0 < q < 1 to denote the probability of the D2D request being accepted when the UE takes the action aM = 1. These parameters are unknown a priori, but can be learned from history or other reinforcement learning methods [16], such as Q-learning. Consequently, the state transition probability is presented in (1). We will explain it in detail later. P {(s′ , k ′ )|(s, k), a} =  ′ p(s ){(1 − aM ) + aM (1 − q)}      p(s′ )qaM    ′   p(s ) p(s′ ){aR + (1 − aR )(1 − p)}    p(s′ )p(1 − aR )     p(s′ )    0 s 6= s0 , k > 0, k ′ = k s 6= s0 , k > 0, k ′ = k − 1 s 6= s0 , k = 0, k ′ = k . s = s0 , k < K, k ′ = k s = s0 , k < K, k ′ = k + 1 s = s0 , k = K, k ′ = k otherwise (1) At first, we consider the case in which s 6= s0 thus a = aM ∈ AM . If k > 0, the number of tokens can decrease by one or stay unchanged depending on the selected action. There are two possibilities for the transition from (s, k) to (s′ , k): the first situation is that the UE takes the action aM = 0, indicating P {(s′ , k)|(s, k), aM = 0} = p(s′ ); the other one suggests that the D2D request is rejected by all potential UEs while the UE takes the action aM = 1, and it corresponds to P {(s′ , k)|(s, k), aM = 1} = p(s′ )(1 − q). Therefore, we obtain P {(s′ , k)|(s, k), aM } = p(s′ ){(1 − aM ) + aM (1 − q)} when putting them together. Transition from (s, k) to (s′ , k−1) will happen only when the UE takes the action aM = 1 and the D2D request is accepted. Thus, the transition probability is p(s′ )qaM , which means that the transition is possible only when aM = 1. Besides, the probability of transition from (s, 0) to (s′ , 0) is p(s′ ) no matter which action is taken since the action aM = 1 is meaningless here. Otherwise the transition probability is zero. Following the similar argument, we can get the transition probability when the UE is idle. C. Reward When the UE provides D2D service for another UE, the cost incurred is defined as c. The cost can be thought as the average cost of all possible D2D transmissions because we only care about the average utility in our model. Thus, we can get the expected reward µ(s, k, a) depending on state (s, k) and action a as follows. ( −cp(1 − aR ) s = s0 . (2) E{µ(s, k, a)} = qaM bs I(k > 0) s 6= s0 where E{·} is the expectation and I(·) is the indicator function. D. Optimization Problem Formulation A policy π is defined as a function to specify the action π(s, k) to be taken for the state (s, k). When s = s0 , π(s, k) represents the transmission mode selection policy and it corresponds to token collection policy when s 6= s0 . The expected utility obtained by executing policy π starting at state (s0 , k0 ) is given by ∞ X β t µ(st , kt , π(st , kt ))}, (3) V π (s0 , k0 ) = E{ t=0 where β ∈ (0, 1) is the discounted factor. Our goal is to find the optimal policy π ∗ to maximize the expected utility, which can be expressed as the optimization problem shown in (4). π ∗ = arg max V π (s0 , k0 ). (4) π Value iteration or policy iteration [17] can be used to obtain the optimal policy when p and q are known. When these environmental parameters are unknown, Q-learning [16] can be adopted. IV. O PTIMAL P OLICY FOR A S INGLE UE In this section, we investigate the structure of optimal policy. We will prove that the optimal policy is threshold. In [9], this property is proved only for one-dimensional state case, but a two-dimensional state case is analyzed here. ∗ Let V ∗ (s, k) = V π (s, k) for brevity. It is given by the solution of Bellman equation shown in (5) [17]. V ∗ (s, k) = ( max a∈A(s,k) E{µ(s, k, a)} + β X ′ ′ ∗ ) p(s , k |s, k, a)V (s, k) . s′ ∈S (5) ∗ The optimal policy π (s, k) is the action a ∈ A(s, k) to maximize the right hand side of Bellman equation. It is easy to find out that π ∗ (s, 0) = 0(s 6= s0 ) and π ∗ (s0 , K) = 1. From the Bellman equation, it turns out that the optimal strategy has the following one-shot deviation property [9]. Lemma 1: The optimal strategy π ∗ has following property: (1) For s 6= s0 , k > 0, π ∗ (s, k) = 0 if and only if X β p(s′ ) {V ∗ (s′ , k) − V ∗ (s′ , k − 1)} ≥ bs . (6) s′ ∈S (2) For s = s0 , k < K, π ∗ (s, k) = 0 if and only if X β p(s′ ) {V ∗ (s′ , k + 1) − V ∗ (s′ , k)} ≥ c. (7) s′ ∈S Proof: For s 6= s0 , k > 0, based on Bellman equation (5), π ∗ (s, k) = 0 if and only if X qaM bs + β p(s′ , k ′ |s, k, aM )V ∗ (s, k) ≥ qaM bs + aM =0 s′ ∈S β X s′ ∈S p(s′ , k ′ |s, k, aM )V ∗ (s, k) aM =1 . Algorithm 1 Value Iteration Algorithm Initialize: V 0 (s, k) = 0, ∀s ∈ S, ∀k ∈ K Loop: 1 Update the policy {π n+1 (s, k)}: Set π n+1 (s, 0) = 0(s 6= s0 ) and π n+1 (s0 , K) = 1 (1) For s 6= s0 , if β P s′ ∈S p(s ′ ) {V n (s′ , k) − V n (s′ , k − 1)} ≥ bs . then π n+1 (s, k) = 0 and π n+1 (s, k) = 1 otherwise. (2) For s = s0 , if β P s′ ∈S p(s ′ ) {V n (s′ , k + 1) − V n (s′ , k)} ≥ c. then π n+1 (s, k) = 0 and π n+1 (s, k) = 1 otherwise. 2 Update the utility function {V n+1 (s, k)}: V n+1 (s, k) =E{µ(s, k, π n+1 (s, k))}+ X β p(s′ , k ′ |s, k, π n+1 (s, k))V n (s, k) s′ ∈S Until: maxs,k |V n+1 (s, k) − V n (s, k)| < ǫ P we define ∆n (k) , s′ ∈S p(s′ )V n (s′ , k + 1), and then the following inequality holds by using the induction hypothesis: ∆n (s, k + 1) − ∆n (s, k) ≤ ∆n (s, k) − ∆n (s, k − 1). (9) We first show the threshold structure of π n+1 (s, k). It suffices to prove that if π n+1 (s, k + 1) = 0, then π n+1 (s, k) = 0. When s 6= s0 , given the step 2 of the algorithm and using (9), we get the inequality ∆(k)−∆(k−1) ≥ ∆(k+1)−∆(k) ≥ bs , so π n+1 (s, k) = 0. Similarly, we can prove it when s = s0 . Next we will prove that given the utility function obtained in step 2 of the algorithm, (8) holds for n + 1. When s 6= s0 , we only need to consider four cases due to the threshold structure of the policy. Case 1: π n+1 (s, k − 1) = π n+1 (s, k) = 0 and π n+1 (s, k + 1) = 1. Thus V n+1 (s, k − 1) = ∆n (k − 1), V n+1 (s, k) = ∆n (k), V n+1 (s, k + 1) = qbs + q∆n (k) + (1 − q)∆n (k + 1). Then, we can get: Using the transition probability in (1), we can obtain the following inequality. X X β p(s′ )V ∗ (s′ , k) ≥ qbs + β p(s′ ){(1 − q)V ∗ (s′ , k)+ s′ ∈S s′ ∈S qV ∗ (s′ , k − 1)}. After some simple algebraic operations, inequality (6) can be verified. Following the similar argument, we can prove the second part of Lemma 1. The LHS of (6) is the opportunity cost for using one token at this point and the RHS of (6) is the immediate utility brought by this action. Since the opportunity cost is higher than the immediate utility, the UE will choose aM = 0, namely cellular mode. We can interpret (7) in a similar way. Here we assume that the the environmental factors p and q are known as a prior. Thus the value iteration algorithm can be used to obtain the optimal policy, which is depicted in Algorithm 1. Now we show the marginal decrease of the utility function V n (s, k) at each iteration of Algorithm 1. This property is depicted in Theorem 1 in detail. Theorem 1 (The marginal diminishing utility): At each iteration of Algorithm 1, the following inequality holds: V n (s, k+1)−V n (s, k) ≤ V n (s, k)−V n (s, k−1), n ≥ 0. (8) Proof: We will use induction to show that (8) holds for n ≥ 0. 1) Due to the initiation step of Algorithm 1, (8) holds for all n = 0. 2) Suppose the induction hypothesis holds for some n ≥ 0. In order to prove (8) holds for n + 1, the proof includes two parts. At first we will show that π n+1 (s, k) has threshold structure, which will be used to verify (8) for n + 1 in the second part. And for the sake of notational conciseness, V n+1 (s, k + 1) − V n+1 (s, k) =bs q + (1 − q){∆(k + 1) − ∆(k)} (a) ≤ q{∆(k) − ∆(k − 1)} + (1 − q){∆(k + 1) − ∆(k)} ≤∆(k) − ∆(k − 1) =V n+1 (s, k) − V n+1 (s, k − 1). Using the fact that π n+1 (s, k) = 0 amounts to ∆n (k)−∆n (k− 1) ≤ bs , we can obtain inequality (a). Case 2: π n+1 (s, k − 1) = 0 and π n+1 (s, k) = π n+1 (s, k + 1) = 1. Thus V n+1 (s, k − 1) = ∆n (k − 1), V n+1 (s, k) = bs + q∆n (k − 1) + (1 − q)∆n (k), V n+1 (s, k + 1) = qbs + q∆n (k) + (1 − q)∆n (k + 1). Then, the following inequality can be obtained: V n+1 (s, k) − V n (s, k − 1) =qbs − q{∆(k) − ∆(k − 1)} + {∆(k) − ∆(k − 1)} (a) ≥ ∆(k) − ∆(k − 1). Inequality (a) holds because when π n+1 (s, k) = 1, then ∆n (k) − ∆n (k − 1) ≥ bs . Moveover, we can find out that: V n+1 (s, k + 1) − V n (s, k) =q∆(k) − ∆(k − 1) + (1 − q)∆(k + 1) − ∆(k) ≤∆(k) − ∆(k − 1). Therefore, it is obvious that (8) holds for n+1 in this situation. For the case where π n+1 (s, k − 1) = π n+1 (s, k) = n+1 π (s, k + 1) = 0 or π n+1 (s, k − 1) = π n+1 (s, k) = n+1 π (s, k + 1) = 1, it is easy to verify the inequality. Similarly, we can verify the inequality V n+1 (s, k + 1) − V n+1 (s, k) ≤ V n+1 (s, k) − V n+1 (s, k − 1) when s = s0 . 1 Optimal policy Remark 1: Theorem 1 indicates that the marginal reward of owning an additional token decreases. The incentive of holding a token is that the UE can use the token to request D2D service to improve his utility. However, keeping tokens has inherent risk modeled by β, which exponentially “discounts” future rewards. Furthermore, from the proof of Theorem 1, we can find an important fact that the optimal policy is a threshold strategy in k for a given traffic type. Proposition 1 (Threshold structure): The optimal policy is a threshold strategy when the traffic type is given. Specifically, there exits a constant Kth (s) depending on the type of traffic s ∈ S, such that: ( 0 k < Kth (s) ∗ π (s, k) = . (10) 1 k ≥ Kth (s) 0.8 0.6 0.4 0.2 0 0 5 10 15 s4 s2 s3 s0 s1 Traffic 20 Number of tokens (k) 0 types(s) Fig. 1: Structure of the optimal policy with β = 0.99, p = 0.5, q = 0.5. p=q=0.5 10 q=0.5,β=0.99 12 s s1 1 Additionally, Theorem 1 implies that V ∗ (s′ , k + 1) − V ∗ (s′ , k) ≤ V ∗ (s′ , k) − V ∗ (s′ , k − 1). Therefore, we have X β p(s′ ) {V ∗ (s′ , k + 1) − V ∗ (s′ , k)} ≤ bs , s′ ∈S which implies that π ∗ (s, k + 1) = 1. Intuitively, for traffic type s 6= s0 , if the UE chooses D2D mode when owning k tokens, he is more likely to still choose D2D mode when more tokens is available. In fact, many research works make this assumption due to its simplicity when they build their models. Unlike these works, we analytically prove that optimal policy has a threshold structure instead of just assuming this property without rigorously proving its optimality. Remark 2: According to Proposition 1, only |S| thresholds is needed to define the optimal policy. Therefore, the size of search space would be significantly reduced due to the small amount of traffic types. Note that this property still holds when the traffic types of adjacent slots are dependent. Moreover, it turns out that the thresholds have a monotonicity property. Proposition 2 (Monotonicity): If bi < bj (i, j 6= s0 ), then Kth (j) ≤ Kth (i) where Kth (s) is the threshold defined in Proposition 1. Proof: It is sufficient to verify that if bi < bj (i, j 6= s0 ) ∗ and π ∗ (j, k) = 0, then According to Lemma 1, P π (i, k)′ = 0. we can find out that s′ ∈S p(s )V n (s′ , k) − V n (s′ , k − 1) ≥ bj ≥ bi , and thus we can get π ∗ (i, k) = 0 using the sufficient condition for the optimal policy. Proposition 2 implies that the more beneficial traffic types have higher probability to be served in D2D mode due to the 2 Optimal thresholds s 3 6 4 2 0 0.88 s2 10 s3 8 6 4 2 0.9 0.92 0.94 0.96 0.98 0 0.4 1 Discount factor (a) Optimal thresholds with different β 0.5 0.6 p 0.7 0.8 (b) Optimal thresholds with different p p=0.5,β=0.99 20 s1 Optimal thresholds s′ ∈S 8 Optimal thresholds Proof: We only consider the case when s 6= s0 here and the proof is similar when s = s0 . Recall that π ∗ (s, 0) = 0(s 6= s0 ), therefore it is sufficient to show that if π ∗ (s, k) = 1(k ≥ 1, s 6= s0 ), then π ∗ (s, k + 1) = 1. Suppose π ∗ (s, k) = 0(s 6= s0 ). According to Lemma 1, we find out that X β p(s′ ) {V ∗ (s′ , k) − V ∗ (s′ , k − 1)} ≤ bs . s 15 s2 s3 10 5 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 q (c) Optimal thresholds with different q Fig. 2: Thresholds with different parameters lower threshold. It means that the UE will spend more tokens on those traffic types. Consequently, the UE’s long-term utility is improved. V. N UMERICAL S IMULATIONS In this section, we give simulations to verify the analyzed results. At first, we present several numerical results to show the structure of the optimal policy and illustrate the behavior of the optimal threshold Kth (s)(s 6= s0 ) with respect to other parameters. We assume that s1 , s2 , s3 , s4 belongs to S o and ps0 = ps1 = ps2 = ps3 = ps4 = 0.2. The benefits of these traffic types are 3, 4, 5, 6, respectively, the cost c = 1 and K = 20. These parameters are set for illustration purpose, and a more realistic scenario will be considered later. The optimal policy is given Fig.1. As indicated in Proposition 1, the optimal policy is threshold in the token state k. Fig.2a shows the thresholds vary with respect to the discount where b1 = 1, b2 = 5, b3 = 2.6949 and b4 = 0.0235. In our simulations, Psnr = 10db and θ = 1500kbps for D2D mode. Meanwhile, Psnr = 5db and θ = 1000kbps for cellular mode. Moreover, the stationary probability is set as ps0 = 0.3, psv = 0.2 and pse = 0.5. Let the environmental factors p = q = 0.8 and they are known as a prior. The discount factor β is set to be 0.99 and the cost c is set to be 0.4. The simulation runs 106 slots. A greedy policy is considered for comparison. We assume that the UE will choose D2D mode when having any tokens, and the goal of this policy is to optimize the token collection strategy only. Fig.3a shows the distribution of token usage over different traffic types. We can find out that the distribution is proportional to ps when the greedy policy in executed. In contrast, since the different benefits of different traffic types are distinguished, more tokens are spent on the more beneficial traffic types and the number of tokens spent on the least beneficial traffic type se dramatically decreases. Fig.3b presents the average utilities of two policy with different discount factor β. The utilities of both policy increase with increasing β due to the fact users with higher β are more far-sighted. Moreover, the gain obtained by considering transmission mode selection can be observed. However, the gap tends towards zero when 0.8 0.45 Optimal Policy Greedy Policy 0.7 Greedy Policy Optimal Policy 0.4 0.6 Average Utility Tokens usage distribution factor β. Note that the threshold for the most beneficial traffic type is always one, which is omitted here. The optimal threshold is non-decreasing in β. It is because, if a UE is farsighted, he intends to wait for a better chance to consume tokens, i.e. more beneficial traffic types, and thus has less incentive to use tokens if the benefit of the current traffic is low. Fig.2b illustrates the thresholds vary with respect to the environmental factor p. The optimal threshold decreases as p increases. This happens allowing for being easier to collect tokens as p increases, which leads to more incentive for the UE to use tokens albeit bs is low. Fig.2c shows the variation of the thresholds with respect to the environmental factor q. The optimal threshold decreases as q decreases, since that the D2D request is seldom accepted when q is low, and thus a UE has more incentive to take every opportunity to seek D2D service. Additionally, as proved in Proposition 2, the threshold decreases with the increase in benefit bs . Furthermore, we give simulations to show the gain obtained from transmission mode selection. A more realistic scenario is considered, where traffic is divided into two types: sv -video traffic and se -elastic traffic. Thus the extended traffic type set is denoted as S = {s0 , sv , se }. The mean opinion score (MOS) is often used as a subjective measure of the network quality in literature. The benefit of each traffic type in our simulation is defined as the difference in the MOS obtained by two transmission modes. The MOS estimations of two traffic types depend on experienced Peak Signal-to-Noise-Ratio (PSNR) Psnr and throughput θ, respectively. They are expressed as follows [14]: 3.5 , (11) Qsv (Psnr ) = 4.5 − 1 + exp(b1 (Psnr − b2 )) (12) Qse (θ) = b3 log(b4 θ), 0.5 0.4 0.3 0.35 0.3 0.2 0.25 0.1 0 elastic traffic video traffic Traffic type 0.2 0.65 0.7 0.75 0.8 0.85 0.9 0.95 Discount Factor (a) Token usage distribution (b) Average utility comparison Fig. 3: Performance Comparison β is small. That’s because the UE with low β is myopia so that he inclines to spend token no matter the traffic type is, which is similar to the greedy policy. Besides, the emergence of plateau of the curves is because the variation of β is not large enough to change the policy. VI. C ONCLUSION In this paper, we consider a D2D-enabled cellular network where selfish UEs are incentivized to form D2D pairs using tokens. We formulate a MDP model to characterize UE’s behavior including transmission mode selection strategy as well as token collection policy. Moreover, we prove that the optimal strategy is threshold in the token state and show that the threshold increases as a function of the benefits related to the the traffic types. In our future work, we will explore the optimal selection of the maximum number of tokens so that the incentive mechanism can approach the altruism mechanism. R EFERENCES [1] 3GPP, “Technical specification group services and system aspects: Feasibility study for proximity services (ProSe),” 3rd Generation Partnership Project (3GPP), TR 22.803 Rel-12, 2012. [2] K. Doppler, M. Rinne, C. Wijting, C. Ribeiro, and K. Hugl, “Device-todevice communication as an underlay to lte-advanced networks,” IEEE Commun. Mag., vol. 47, no. 12, pp. 42–49, Dec 2009. [3] A. Asadi, Q. Wang, and V. Mancuso, “A survey on device-to-device communication in cellular networks,” IEEE Commun. Surveys Tuts., vol. 16, no. 4, pp. 1801–1819, Fourthquarter 2014. [4] G. Fodor, E. Dahlman, G. Mildh et al., “Design aspects of network assisted device-to-device communications,” IEEE Commun. Mag., vol. 50, no. 3, pp. 170–177, March 2012. [5] C.-H. Yu, K. Doppler et al., “Resource sharing optimization for deviceto-device communication underlaying cellular networks,” IEEE Trans. Wireless Commun., vol. 10, no. 8, pp. 2752–2763, August 2011. [6] D. Feng, G. Yu, C. Xiong et al., “Mode switching for energy-efficient device-to-device communications in cellular networks,” IEEE Trans. Wireless Commun., vol. 14, no. 12, pp. 6993–7003, Dec 2015. [7] D. Wu, J. Wang, R. Hu, Y. Cai, and L. Zhou, “Energy-efficient resource sharing for mobile device-to-device multimedia communications,” IEEE Trans. Veh. Technol., vol. 63, no. 5, pp. 2093–2103, Jun 2014. [8] P. Li and S. Guo, “Incentive mechanisms for device-to-device communications,” IEEE Netw., vol. 29, no. 4, pp. 75–79, July 2015. [9] J. Xu and M. van der Schaar, “Token system design for autonomic wireless relay networks,” IEEE Trans. Commun., vol. 61, no. 7, pp. 2924–2935, July 2013. [10] N. Mastronarde, V. Patel, J. Xu, L. Liu, and M. van der Schaar, “To relay or not to relay: Learning device-to-device relaying strategies in cellular networks,” IEEE Trans. Mobile Comput., vol. PP, no. 99, pp. 1–1, 2015. [11] C. Shen, J. Xu, and M. van der Schaar, “Silence is gold: Strategic interference mitigation using tokens in heterogeneous small cell networks,” IEEE J. Sel. Areas Commun., vol. 33, no. 6, pp. 1097–1111, June 2015. [12] M. Haddad, S. Elayoubi, E. Altman, and Z. Altman, “A hybrid approach for radio resource management in heterogeneous cognitive networks,” IEEE J. Sel. Areas Commun., vol. 29, no. 4, pp. 831–842, April 2011. [13] A. Reis, J. Chakareski, A. Kassler, and S. Sargento, “Distortion optimized multi-service scheduling for next-generation wireless mesh networks,” in INFOCOM Workshops, March 2010, pp. 1–6. [14] Q. Wu, Z. Du, P. Yang, Y. Yao, and J. Wang, “Traffic-aware online network selection in heterogeneous wireless networks,” IEEE Trans. Veh. Technol., vol. 65, no. 1, pp. 381–397, Jan 2016. [15] L. Buttyan and J.-P. Hubaux, “Nuglets: a virtual currency to stimulate cooperation in self-organized mobile ad hoc networks,” Tech. Rep., 2001. [16] L. P. Kaelbling, M. L. Littman, and A. W. Moore, “Reinforcement learning: A survey,” Journal of artificial intelligence research, pp. 237– 285, 1996. [17] D. P. Bertsekas, Dynamic Programming and Optimal Control, Vol. II. Athena Scientific, 2007.
7cs.IT
Journal of Machine Learning Research 1–12, 2017 Algorithmic Learning Theory 2017 Hypotheses testing on infinite random graphs Daniil Ryabko [email protected] arXiv:1708.03131v1 [cs.LG] 10 Aug 2017 INRIA, 40 av. de Halley, 59650 Villeneuve d’Ascq, France Editors: Steve Hanneke and Lev Reyzin Abstract Drawing on some recent results that provide the formalism necessary to definite stationarity for infinite random graphs, this paper initiates the study of statistical and learning questions pertaining to these objects. Specifically, a criterion for the existence of a consistent test for complex hypotheses is presented, generalizing the corresponding results on time series. As an application, it is shown how one can test that a tree has the Markov property, or, more generally, to estimate its memory. 1. Introduction Huge, world-wide graphs permeate our lives. These graphs carry enormous amount of information which is vital for many applications to analyse and exploit. Some of the questions one often seeks to answer have the form: is my model for the graph correct? others, does this graph have this or that property? Following the approach of classical statistics, this kind of questions can be formulated as testing a complex hypothesis: asking whether the distribution that generates the data (here, the given graph) belongs to a set of distributions H0 (the null hypothesis) versus this distribution belongs to a set H1 (the alternative). This formulation presents an important caveat, which is obvious yet often overlooked: for the approach to work, the distribution generating the data has to belong either to H0 or to H1 . If not, the answer of the test will be arbitrary and completely useless. In other words, if the test gives the answer Hδ , where δ is 0 or 1, this answer should be interpreted as “Hδ is true, or a low-probability event happened, or neither H0 nor H1 is true”. The mathematical results concern the low-probability event; the third possibility is left to be excluded at a different level, that is to say, informally, from application specifics alone. What it means in practice is that the alternative H1 has to be sufficiently general as to assure that it captures the distribution of the data in case the null is wrong. In other words, it should be a general, qualitative hypothesis, whose validity is self-evident on the application level. It appears that the existing approaches fail to provide this kind of generality. In fact, H1 is often a rather specific model (a set of distributions), such as Erdös-Rényi or, to take a more general example, stochastic block model; see, for example, (Arias-Castro et al., 2014; Bubeck et al., 2016) and references. H0 is then a hypothesis about the parameters of the model. Such methods may be applied to graphs for which H1 is obviously wrong; it is clear, for example, that no social network is an Erdös-Rényi graph. It is instructive to take a look at classical statistics where the hypotheses testing formulation originates, and to appreciate the fact that the situation is radically different in this field. Thus, classical alternative hypotheses, such as that the distribution that generates the c 2017 D. Ryabko. Ryabko sample at hand is Gaussian, or, more generally, that the samples are independent and identically distributed, already serve a great variety of applications. Indeed, many distributions appearing in nature can reasonably supposed to be Gaussian, and sampling procedures do often give independent and identically distributed samples — at least to the extent to which one can formally argue about natural phenomena at all. Yet in other applications, these assumptions break, and more general alternatives are in order. Thus, stock market data, human-generated or biological texts, as well as many other data sources produce samples that are not independent at all. A more general alternative (which is, of course, not universal either) is that the distribution of the sample is stationary. This is perhaps the most general assumption used in statistics; its meaning can roughly be described as that it does not matter whether we have started to record observations at time 0 or at some other time index. The goal of this paper is to bring this kind of generality to hypotheses testing on random graphs, and to initiate the study of the questions that emerge. This is possible thanks to the work (Benjamini and Curien, 2012), which, based on the foundations laid out in (Aldous and Lyons, 2007; Lyons and Peres, 2016), defines stationarity of infinite random graphs and opens the way to use basic facts from ergodic theory on these objects. However, the authors stop short of considering any problems of estimation, learning or statistical analysis. Here we take the first steps towards filling this gap. After laying down some further definitions, we transfer some fundamental results from hypothesis testing on stationary time series to the new formalisms. The main result is a criterion for the existence of consistent tests for hypotheses concerning infinite random graphs; the criterion is applied to show that some relatively simple hypotheses can or cannot be tested. As one of the applications, it is shown that it is possible to test that an infinite random tree is Markov or has memory of a given order. Related work: property testing. A rather different approach to testing hypotheses about graphs is known as property testing. This approach, initiated in (Goldreich et al., 1998) (with some ideas going back to (Blum et al., 1993; Rubinfeld and Sudan, 1996)), considers finite, fixed, deterministic, combinatorial objects, such as graphs, but randomized procedures. The question is whether a graph has a certain property. A testing procedure samples only a small amount of the graph data, and is supposed to return the correct answer with high probability. While the graph has a finite size (n vertices), the test is supposed to sample a portion which is independent of n, which means that the graph can be arbitrarily large (one can say, practically infinite). This is a very ambitious goal. The weak point, however, is again the kind of alternative hypothesis considered. The null H0 is of course just the set of all graphs that have the property of interest. The alternative is the set of all graphs that are at least ε far from all the graphs in H0 . The underlying distance is that of modifying up to ε elements of the graph. Two models are typically considered: dense graphs, where the number of edges is Θ(n2 ), and bounded-degree graphs. The distance changes accordingly: removing εn2 edges in the former case and εn in the latter. In either case, there is a potentially vast and unruly buffer zone between H0 and H1 , in which the answer of the test is essentially arbitrary. The main results concern characterizing those properties for which efficient tests exist. In particular, (Alon and Shapira, 2008) shows that all so-called hereditary properties (those that are closed under removal of vertices) are 2 Hypotheses testing on infinite random graphs testable. See (Ron, 2010; Goldreich and Ron, 1997) for an overview of the results in this area. 2. Setup: Infinite random graphs The formal setup in this section is mainly after (Benjamini and Curien, 2012), see also (Benjamini and Schramm, 2011; Aldous and Lyons, 2007), with some differences that will be pointed out. A graph G = (VG , EG ) is a pair of a set of vertices VG and a set of edges EG . The vertex set VG is finite or countably infinite. A graph can be either directed or undirected, so the set EG is either that of ordered or unordered pairs of vertices (this distinction is irrelevant for the formalisms used here); we do not consider multi-edges or self-loops. In this work we assume all graphs to have degree bounded by a constant M ∈ N. A network is a graph G together with a map m from VG to a finite set X of data points (also called marks (Aldous and Lyons, 2007)), so that each vertex a ∈ VG is associated with a data point Xa ∈ X . We are thinking of the data points as of, say, the content of web pages or the (complete) data associated with a user of a social network. A rooted graph (network) is a pair (G, o) of a graph (network) and a vertex o ∈ VG . Two graphs (G, o) (G′ , o′ ) are isomorphic if there is a pair of bijections ϕV : VG → VG′ and ϕE : EG → EG′ such that for any edge e = (v1 , v2 ) ∈ EG we have ϕE (e) = (ϕV (v1 ), ϕV (v2 )), and, additionally, the mapping preserves the roots: ϕV (o) = o′ . For networks we also require that the data points associated with v and ϕV (v) are the same for all v ∈ GV . In other words, isomorphisms are just relabellings of a graph. The isomorphism relation (for graphs as well as for networks) is denoted ≃. We generally do not distinguish between a graph and its isomorphism class. The structure of a probability space on networks can be introduced as follows. For a rooted graph (G, o) denote BG (o, r) a ball in G of radius r around o, that is, the induced subgraph of G consisting of all vertices of graph distance at most r from o. Define the radius r(G) of (G, o′ ) as the maximal graph distance between any vertex in G and o′ . For a finite rooted network (G, o′ ) define the set FG of rooted networks as FG := {(G, o) : ∃r ∈ N BG (o, r) ≃ (G, o′ )}. Let also r(FG ) := r(G). Note that we consider only graphs G whose degree is bounded by M , so that there are, for each r ∈ N, only finitely many different sets (isomorphism classes) BG (o, r). Since the set {FG : G is a finite rooted network } is countable, we can use the notation (Fi )i∈N . It is easy to see that (Fi )i∈N is a standard basis of a probability space. Denote this probability space (G∗ , F) where F is the sigma algebra generated by (Fi )i∈N . Similarly, one can define a standard probability space on the set of networks with a distinguished walk o1 , o2 , . . . (rather than just one root o); denote this i ,i ∈ N probability space (G→ , F→ ). Here F→ is the sigma algebra generated by the sets F→ of all finite networks with a distinguished walk of length i. A difference with the setup in (Benjamini and Curien, 2012) is that we use an explicit standard basis, rather than just saying that the probability space is Polish. To do so, we require a known upper bound M on the degree of the possible networks we consider, rather than saying that they are all of bounded degree. This will ensure the compactness with respect to the distributional distance introduced shortly. See also (Benjamini and Schramm, 2011) for a similar metric on the set of networks resulting in a compact metric space. The 3 Ryabko space of all bounded-degree random networks (without a fixed bound M ) is Polish but is not compact. Denote P(G∗ ) and P(G→ ) the set of all probability distributions on (G∗ , F) and (G→ , F) respectively. For distributions on a standard probability space the distributional distance (Gray, 1988) is defined as follows. For µ1 , µ2 ∈ P(G∗ ) (or µ1 , µ2 ∈ P(G→ )) let X d(µ1 , µ2 ) := wk |µ1 (Fk ) − µ2 (Fk )| (1) k∈N (in the case of G→ the sum is over F k → ), where wk is a summable sequence of positive real weights which is assumed fixed throughout the paper, e.g. wk := 1/k(k + 1). The facts about distributional distance relayed here apply to any standard probability space, and are not specific to G∗ and G→ . A detailed exposition can be found in (Gray, 1988). Specifically, we will use the following. Proposition 1 The spaces G∗ and G→ are compact with respect to the topology of the distributional distance. One can define the shift operator on the set of networks with distinguished walk: θ : (G, (on )n≥1 ) → (G, (on+1 )n≥1 ). Call a measure µ→ stationary if it is invariant under θ: for any A ∈ F→ we have µ(A) = µ(θ −1 (A)). A stationary distribution µ is ergodic if µ→ is ergodic for θ, that is, any shift-invariant set has probability 0 or 1. Denote S ′ (E ′ ) the set of all stationary (ergodic) measures in P(G→ ). Again, the facts about stationary and ergodic distributions that we use apply to any dynamical system defined over a standard probability space (Gray, 1988). Specifically, we will use the ergodic theorem and ergodic decomposition introduced below. Given a network (G, (OP n )n≥1 ) and k ∈ N define the frequency of occurrence of Fk in 1 O1 , . . . , ON as νN (Fk ) = N N i=1 I(G,Oi )∈Fk . Proposition 2 (Ergodic theorem) Let µ be a stationary ergodic distribution on (G→ , F→ ). For any k ∈ N we have νN (Fk ) → µ((G, o) ∈ Fk )a.s. The space P(G→ ) can be endowed with a structure of probability space induced by the distributional distance. Denote P(P(G→ )) the resulting space of probability measures. This allows us to formulate the following statement known as ergodic decomposition. Informally, it means that any stationary measure can be represented as first selecting, according to some probability distribution, a stationary ergodic measure, and then using that distribution to generate the data (here, a network and a random walk on that network). Proposition 3 (Ergodic decomposition) RFor any µ ∈ S ′ there exists a measure Wµ ∈ P(P(G→ )) such that Wµ (E ′ ) = 1 and µ(B) = dWµ (µ)µ(B) for any B ∈ F→ . Proposition 4 The set S ′ is a closed subset of P(G→ ), and therefore compact. 4 Hypotheses testing on infinite random graphs So far, stationarity and ergodicity have been defined for measures on G→ , that is, for measures generating an infinite graph with a distinguished walk. What we want, however, is stationarity and ergodicity for measures generated infinite (rooted) graphs. This is done using simple random walks as follows (Benjamini and Curien, 2012). Given a graph (G, o), one can consider a simple random walk (On )n∈N on G starting at o and proceeding, on each time step, to the neighbour of the current vertex chosen uniformly at random. To any probability measure µ on G∗ there corresponds a probability measure µ→ on G→ , defined by taking a simple random walk on G starting at o, where (G, o) is generated by µ. A distribution µ on G∗ is called stationary (ergodic) if µ→ is stationary (ergodic). Another (equivalent, see (Benjamini and Curien, 2012)) definition of stationarity is to to say that (G, o) = (G, On ) in distribution for all n ∈ N (or, equivalently, for n = 1). That is, the distribution is invariant under re-rooting along a simple random walk. Denote S (E) the set of all stationary (ergodic) measures µ ∈ P(G∗ ). Benjamini and Curien (2012) define stationarity and ergodicity on G∗ directly (via random walks as above), rather than passing through notions on G→ first (the space G→ is still needed, but not S ′ and E ′ ). This makes the shift operator θ stochastic. Here we have chosen deterministic θ in order to be able to use the theory about dynamical systems, specifically, the ergodic decomposition. Now the ergodic theorem above applies to measures on G∗ as well. For ergodic decomposition, we need additionally the following simple observation. Proposition 5 The set S is a closed subset of S ′ . For any µ ∈ S the measure Wµ whose existence is asserted in Proposition 3 (the ergodic decomposition), is concentrated on E, that is, Wµ (E) = 1. Proof For the first statement, take any convergent sequence µn ∈ S, n ∈ N. It converges to a measure µ ∈ S ′ , that is, to a stationary measure on S→ . We need to show that µ ∈ S, that is, the distribution of the distinguished walk O1 , O2 , . . . is that of a random walk. For that it is enough to show that O2 is selected uniformly at random from the neighbours of O1 = o. This follows from the fact that the distribution of µi (BG (o, 1)) converges to µ(BG (o, 1)), since for each µi the distribution of O2 is as desired. The second statement is by construction: by definition, the distribution µ is obtained by taking a random walk starting at the root of a (random) rooted graph (G, o). Thus the probability of the event {(G, o) : given the distribution of (On )n∈N conditionally on (G, o) is that of a simple random walk} is 1, so its probability is 1 with respect to Wµ -almost every measure. 3. Sampling, estimation Next we need to define some way to sample an infinite (random) network. There are many ways of doing this; for example, having a large connected subnetwork Gn that grows with time n, or sampling nodes according to some a priori distribution. For now we define a sampling scheme of the former type that is most easy to analyse given the definitions above. This definition is based on a simple random walk. To be more precise, let (G, o) be an infinite random network, generated by a distribution µ, and let O := (On )n∈N be a trajectory of a simple random walk over G with O1 = o. For 5 Ryabko each k ∈ N define sk (O) as the set of all k-neighbours of all nodes (On )n∈N : sk (O) := {v ∈ G : ∃i ∈ N, v is at graph distance at most k from Oi }. Similarly define sk (O1..n ). The sampling scheme is defined as follows. Let k(n) : N → N be some non-decreasing function that goes to infinity with n. Given an infinite random network (G, o) and n ∈ N, the sampling is based on the set sk(N ) (O1..N ), where (On )n∈N is a simple random walk over G with O1 = o. That is, we take a random walk of length n starting at o, and then query all k(n)-neighbours of all the vertices visited. Define also the random variable SN (G, o) := sk(N ) (O1..N ). For any k ∈ N define µ̂(Fk ) as N1 νn (O1..N , Fk ) if r(Fk ) ≤ k(n) and µ̂(Fk ) = 0 otherwise. With this definition, only the set SN (G, o) is used for constructing the estimates µ̂. The empirical estimates of the distributional distance are defined by replacing (say) µ1 (F i ) in (1) with µ̂G (Fi ): X d(Sn (G, o), µ′ ) := wk |µ̂(Fk ) − µ′ (Fk )| k∈N From the ergodic theorem (Proposition 2) we can derive the following. Proposition 6 For any stationary ergodic distribution µ ∈ P(G∗ ) generating a random network (G, o), we have lim d(Sn (G, o), µ) = 0 µ→ − a.s. n→∞ Note that the “almost sure” statement is with respect to the distribution generating (G, o) and the random walk (ON )N ∈N that is used for sampling. P Proof Take an ε > 0 and find a K ∈ N such that k>K wk < ε. Then for each k = 1..K we have |µ̂(Fk ) − µ(Fk )| ≤ ε from some Nk on, as follows from the ergodic theorem. Let N := maxk=1..K Nk and increase N if necessary to have k(N ) > r(Fi ) for all i = 1..K. Now using the the definition (1) from all n > N we have d(Sn (G, o), µ) ≤ 2ε. 4. Testing: consistency and a criterion Given a pair of sets Hi ⊂ E, i ∈ {0, 1} and an infinite rooted graph (G, o) generated by a distribution µ ∈ H0 ∪ H1 , we want to test whether µ ∈ H0 versus µ ∈ H1 based on the sampling procedure described in the preceding section. A test is a family of functions ψ α indexed by α ∈ (0, 1) that take as input a finite network g with a distinguished walk O1 , . . . , ON and outputs a binary answer, where the answer i is interpreted as “the graph was generated by a distribution that belongs to Hi .” We will assume that (g, O1 , . . . , On ) has the form Sn (G) for some infinite network G, that is, it can be obtained via a sampling procedure described in the previous section. What this means is that for each i the vertex Oi has all of its k(n) neighbours in G. A test ϕ makes the Type I error if it says 1 while H0 is true, and it makes Type II error if it says 0 while H0 is false. 6 Hypotheses testing on infinite random graphs Definition 7 (consistency) Call a test ψ α , α ∈ (0, 1) consistent as a test of H0 against H1 if: (i) The probability of Type I error is always bounded by α: for every µ ∈ H0 , every n ∈ N and every α ∈ (0, 1) µ→ (ψ α (Sn (G, o)) = 1) ≤ α, and (ii) Type II error is made not more than a finite number of times with probability 1: µ→ ( lim ψ α (Sn (G, o)) = 1) = 1 n→∞ for every µ ∈ H1 and every α ∈ (0, 1). The following theorem is a generalization of the result of Ryabko (2012). With the set-up above, the proof carries over directly from (Ryabko, 2012). Theorem 8 (Criterion for the existence of consistent tests) Let H0 ⊂ E. The following statements are equivalent: (i) There exists a consistent test for H0 against E\H0 . (ii) The set H0 has probability 1 with respect to ergodic decomposition of every µ in the closure of H0 : Wµ (H0 ) = 1 for each µ ∈ cl H0 . 5. Some examples of testable and non-testable properties Theorem 8 allows us to obtain a number of results on the existence of tests for various properties pertaining to both the graph structure and the data at vertices. The criterion it provides turns out to be rather easy to verify. Proposition 9 Let H0 := {P ∈ E : P (Fi ) = 0, ∀i ∈ I} where I ⊂ N is a finite or countable index set. That is, H0 consists of consist of all stationary ergodic distributions such that certain finite subgraphs have probability 0. Then there exists a consistent test for H0 against its complement to E. Proof The statement follows directly from Theorem 8. Indeed, it is enough to check it for I a singleton, since this property is preserved under taking countable intersections. Moreover, clearly the property Pi (Fi = 0) is preserved when taking the limit of distributions Pi , and if P (Fi ) = 0 for a stationary distribution then the same must hold for all its ergodic components. Note that one cannot replace P (Fi ) = 0 in the formulation with P (Fi ) ≤ α, where α ∈ (0, 1) is fixed, even though the set H0 is closed. The reason is that this set is not closed under taking ergodic decompositions. While relatively simple, Proposition 9 allows us to establish the existence of consistent tests for a great many graph properties, such as cycle- or clique-freeness, and so on. Moreover, in this case it is easy to construct an actual test whose existence Proposition 9 7 Ryabko establishes: it is enough to reject H0 if any of the elements Fi occurs along the random walk and accept it otherwise. It is worth mentioning some negative results that carry over from hypothesis testing on stationary time series. Since time series are a special case of infinite random graphs, the negative results apply directly, without any extra proof. In particular, the hypotheses of homogeneity and independence concerning a pair of infinite random graphs state that the distributions of the graphs are the same (homogeneity), or are independent (independence). Thus, from the corresponding results on time series (Ryabko, 2010b, 2017) we establish the following. Proposition 10 There is no consistent test for the hypotheses of homogeneity or independence. Another set of examples of testable properties is provided in the next section. 6. Markov trees A (rooted) tree is a graph without cycles. Children of a vertex are its neighbours that are farther away from the root. Here we consider only leafless trees, that is, there are no vertices without children; in addition, the data at vertices (marks) is assumed to take values in a finite alphabet. For a vertex v of a tree denote c(v) its number of children, d(v) its distance to the root, and v0 (v), . . . , vd−1 (v) the path from the root to v, where v0 (v) is always the root. Let us call stationary distributions on infinite random graphs that produce trees w.p. 1 stationary trees. Definition 11 (simple trees, Markov trees) Call a stationary tree simple if the distributions of children of a vertex v are conditionally independent given its path to the root v0 (v), . . . , vd−1 (v). Call a simple stationary tree k-order Markov if, given the path to the root, the distribution of the number of children, as well as the distribution of the data m(v) at the vertex, depends only on the last k nodes in the path: P (c(v), m(v)|v0 (v), . . . , vd−1 (v)) = P (c(v), m(v)|vd−k (v)..vd−1 (v)). Denote Mk , k ≥ 0 (Mk ) the set of all k-order stationary (ergodic) Markov trees, M∗ := ∪k∈∞ Mk and ST (ET ) the set of all stationary (ergodic) simple trees. The case k = 0, that is, the set of memoryless trees, is the well-studied class known as Galton-Watson trees, e.g., (Lyons et al., 1995). These represent the graph version of i.i.d. time series. A constructive definition of such trees is as follows. Starting with the root, each vertex v has c(v) children, where the random variables c(v) are independent and identically distributed, apart from c(o) specified below, with a certain distribution p := (p1 ..pM ). Here we also consider marks at vertices, which in this case are i.i.d. The marks at vertices are also i.i.d. with a fixed distribution. With the definition, the tree is not stationary because the root has one less neighbour than the rest of the vertices. As is shown in (Lyons et al., 1995), this is fixed simply by letting P (c(o) = k + 1) = pk , that is, shifting by 1 the number of children of the root. Clearly, this construction can be generalized to Markov trees defined above. A walk down a stationary tree is a simple random walk from the root that never goes up. In other words, on each next step the walk proceeds to the vertex selected uniformly 8 Hypotheses testing on infinite random graphs at random among all of the children of the current vertex. Define the walk-down k-order entropy of a stationary tree T as hk (T ) := Eh(c(v), m(v)|vd−k (v)..vd−1 (v)), where v is kth vertex on a random walk from the root down without backtracking. Clearly, hk (T ) ≥ hk+1 (T ). Define the entropy rate h∞ (T ) := limk→∞ hk (T ). These definition are a simple generalization of the corresponding notions in information theory, e.g., (Cover and Thomas, 2006). Observe that if a tree is stationary, so is the walk down. Moreover, the process   c(v1 ), m(v1 ) , c(v2 ), m(v2 ) , . . . (2) is just a stationary time series, which is k order Markov if and only if the tree is k order Markov. We can, furthermore, generalize the results on hypothesis testing from time series to trees, using the criterion from Theorem 8 and the corresponding results for time series. The reason to consider the walk down rather than the simple random walk of of Section 2 (that may go up) is that the latter breaks the Markov property of the tree — precisely because it may go up. Corollary 12 For every k ≥ 0 there exists a consistent test for the set Mk of k order Markov trees against its complement to the set of all stationary ergodic trees ET \Mk . There is no consistent test for the set of all finite-memory trees M∗ against its complement ET \M∗ . A test whose existence is claimed in the corollary can be obtained simply by applying a corresponding test for time series to the series (2); such tests can be found in (Ryabko and Astola, 2006; Ryabko et al., 2006). 7. Discussion In this work, a new framework for testing hypotheses about random graphs has been proposed. The main feature of the framework is its generality — most importantly, the generality of the alternative hypotheses allowed, which can be the complement of the null hypothesis to the set of all stationary infinite random graphs. Given the setup and definitions, the results are relatively simple: the proofs carry over from the corresponding results on time series. In this sense, these results are low-hanging fruit, which is none the less interesting because of it, and which is of course only available since the framework is new. The field for future work that opens is large and is potentially rich with many results (which may or may not be as simple to obtain). The main directions one can foresee are as follows. The first and the most obvious one is finding out, for various properties of graphs of interest, whether consistent tests exist. We do not list the relevant properties here, since they abound in the graph literature. When a consistent test does exist, the next question is constructing it. For the hypotheses considered in this paper this turns out to be simple, but this is not at all the case in general, even for time series; the general construction of the test in (Ryabko, 2012), unfortunately, is of little help for finding practical algorithms. Looking further afield, stationary random graphs appear to offer the possibility of studying a variety of learning problems. Perhaps one of the most intriguing is graph compression. Compression is, in a certain precise sense, equivalent to learning, and compressing 9 Ryabko an object to its theoretical limit can be considered learning everything there is to learn in it. For stationary time series, the entropy rate is this theoretical limit to compression, and it is achievable asymptotically (without knowing anything about the distribution of the sequence), see (Ryabko, 1988; Algoet, 1992). For stationary graphs, we now have a notion of entropy and it remains to be seen whether similar results can be obtained. Previous theoretical results on graph compression are limited to much smaller classes of distributions, such as Erdös-Rényi graphs (Choi and Szpankowski, 2012), and binary trees (Zhang et al., 2014). Other relevant statistical problems studied on stationary time series that can now be studied for stationary graphs include clustering (Ryabko, 2010a; Khaleghi et al., 2016; Ryabko, 2017) and prediction. One important difference with respect to time series is the notion of sampling. In time series, the sample is simply an initial segment of the sequence. All the results then are with respect to just one dimension of the sample: the length of the sequence (the dimensionality of the space or the size of the alphabet are of course important, but have nothing to do with the sampling). In particular, the consistency is typically asymptotic with the sample size growing to infinity. In graphs, a sample available to the statistician can be an essentially arbitrary part of the graph. It can “grow to infinity” in a variety of ways, which are clearly not equivalent from the learning point of view. Note that the empirical distribution over a sample does not necessarily converge to the graph distribution (Aldous and Lyons, 2007). Here we have opted for the notion of sampling that is the most simple one given the setup: sampling along a random walk (or a walk down, in the case of trees). This, however, may not be the most practical method. It remains to be seen what are the necessary conditions on a sample under which consistency can be obtained. This question relates directly to the problem of prediction: again, in time series, one is trying to predict the next symbol (or several), while for graphs there is no “next” vertex; there are many possibilities of what to try to predict, which should lead to different notions of consistency. References David Aldous and Russell Lyons. Processes on unimodular random networks. Electron. J. Probab., 12:no. 54, 1454–1508, 2007. P.H. Algoet. Universal schemes for prediction, gambling and portfolio selection. The Annals of Probability, 20(2):901–941, 1992. Noga Alon and Asaf Shapira. A characterization of the (natural) graph properties testable with one-sided error. SIAM Journal on Computing, 37(6):1703–1727, 2008. Ery Arias-Castro, Nicolas Verzelen, et al. Community detection in dense random networks. The Annals of Statistics, 42(3):940–969, 2014. Itai Benjamini and Nicolas Curien. Ergodic theory on stationary random graphs. Electron. J. Probab., 17:no. 93, 1–20, 2012. Itai Benjamini and Oded Schramm. Recurrence of distributional limits of finite planar graphs. In Selected Works of Oded Schramm, pages 533–545. Springer, 2011. 10 Hypotheses testing on infinite random graphs Manuel Blum, Michael Luby, and Ronitt Rubinfeld. Self-testing/correcting with applications to numerical problems. Journal of computer and system sciences, 47(3):549–595, 1993. Sébastien Bubeck, Jian Ding, Ronen Eldan, and Miklós Z Rácz. Testing for high-dimensional geometry in random graphs. Random Structures & Algorithms, 2016. Yongwook Choi and Wojciech Szpankowski. Compression of graphical structures: Fundamental limits, algorithms, and experiments. IEEE Transactions on Information Theory, 58(2):620–638, 2012. Thomas M. Cover and Joy A. Thomas. Elements of information theory. Wiley-Interscience, New York, NY, USA, 2006. ISBN 0-471-06259-6. Oded Goldreich and Dana Ron. Property testing in bounded degree graphs. In Proceedings of the twenty-ninth annual ACM symposium on Theory of computing, pages 406–415. ACM, 1997. Oded Goldreich, Shari Goldwasser, and Dana Ron. Property testing and its connection to learning and approximation. Journal of the ACM (JACM), 45(4):653–750, 1998. Robert M. Gray. Probability, Random Processes, and Ergodic Properties. Springer Verlag, 1988. Azadeh Khaleghi, Daniil Ryabko, Jérémie Mary, and Philippe Preux. Consistent algorithms for clustering time series. Journal of Machine Learning Research, 17:1–32, 2016. Russell Lyons and Yuval Peres. Probability on trees and networks, volume 42. Cambridge University Press, 2016. Russell Lyons, Robin Pemantle, and Yuval Peres. Ergodic theory on galtonwatson trees: speed of random walk and dimension of harmonic measure. Ergodic Theory and Dynamical Systems, 15(03):593–619, 1995. Dana Ron. Algorithmic and analysis techniques in property testing. Foundations and Trends in Theoretical Computer Science, 5(2):73–205, 2010. Ronitt Rubinfeld and Madhu Sudan. Robust characterizations of polynomials with applications to program testing. SIAM Journal on Computing, 25(2):252–271, 1996. B. Ryabko and J. Astola. Universal codes as a basis for time series testing. Statistical Methodology, 3:375–397, 2006. B. Ryabko, J. Astola, and A. Gammerman. Application of Kolmogorov complexity and universal codes to identity testing and nonparametric testing of serial independence for time series. Theoretical Computer Science, 359:440–448, 2006. Boris Ryabko. Prediction of random sequences and universal coding. Problems of Information Transmission, 24:87–96, 1988. 11 Ryabko Daniil Ryabko. Clustering processes. In Proc. the 27th International Conference on Machine Learning (ICML 2010), pages 919–926, Haifa, Israel, 2010a. Daniil Ryabko. Discrimination between B-processes is impossible. Journal of Theoretical Probability, 23(2):565–575, 2010b. Daniil Ryabko. Testing composite hypotheses about discrete ergodic processes. Test, 21(2): 317–329, 2012. Daniil Ryabko. Independence clustering (without a matrix). arxiv.org CoRR, 1703.06700, 2017. Jie Zhang, En-Hui Yang, and John C Kieffer. A universal grammar-based code for lossless compression of binary trees. IEEE Transactions on Information Theory, 60(3):1373–1386, 2014. 12
7cs.IT
Non-parametric sparse additive auto-regressive network models Hao Henry Zhou1 Garvesh Raskutti1,2,3 1 Department of Statistics, University of Wisconsin-Madison 2 3 Department of Computer Science Department of Electrical and Computer Engineering arXiv:1801.07644v2 [stat.ML] 24 Jan 2018 Abstract Consider a multi-variate time series (Xt )Tt=0 where Xt ∈ Rd which may represent spike train responses for multiple neurons in a brain, crime event data across multiple regions, and many others. An important challenge associated with these time series models is to estimate an influence network between the d variables, especially when the number of variables d is large meaning we are in the highdimensional setting. Prior work has focused on parametric vector auto-regressive models. However, parametric approaches are somewhat restrictive in practice. In this paper, we use the non-parametric sparse additive model (SpAM) framework to address this challenge. Using a combination of β and φ-mixing properties of Markov chains and empirical process techniques for reproducing kernel Hilbert spaces (RKHSs), we provide upper bounds on mean-squared error in terms of the sparsity s, logarithm of the dimension log d, number of time points T , and the smoothness of the RKHSs. Our rates are sharp up to logarithm factors in many cases. We also provide numerical experiments that support our theoretical results and display potential advantages of using our non-parametric SpAM framework for a Chicago crime dataset. Keywords: time series analysis, RKHS, non-parametric, high-dimensional analysis, GLM 1 Introduction Multi-variate time series data arise in a number of settings including neuroscience ([6, 9]), finance ([33]), social networks ([8, 1, 43]) and others ([17, 23, 30]). A fundamental question associated with multi-variate time series data is to quantify influence between different players or nodes in the network (e.g. how do firing events in one region of the brain trigger another, how does a change in stock price for one company influence others, e.t.c). To address such a question requires estimation of an influence network between the d different players or nodes. Two challenges that arise in estimating such an influence network are (i) developing a suitable network model; and (ii) providing theoretical guarantees for estimating such a network model when the number of nodes d is large. Prior approaches for addressing these challenges involve parametric approaches ([13, 12, 16]). In particular, [16] use a generalized linear model framework for estimating the high-dimensional influence network. More concretely, consider samples (Xt )Tt=0 where Xt ∈ Rd for every t which could represent continuous data, count data, binary data or others. We define p(.) to be an exponential family probability distribution, which includes, for example, the Gaussian, Poisson, Bernoulli and others to handle different data 1 types. Specifically, x ∼ p(θ) means that the distribution of the scalar x is associated with the density p(x|θ) = h(x)exp[ϕ(x)θ − Z(θ)], where Z(θ) is the so-called log partition function, ϕ(x) is the sufficient statistic of the data, and h(x) is the base measure of the distribution. For the prior parametric approach in [16], the j th time series observation of Xt+1 has the following model: Xt+1,j |Xt ∼ p(vj + d X A∗j,k Xt,k ), k=1 where A∗ ∈ Rd×d is the network parameter of interest. Theoretical guarantees for estimating A∗ are provided in [16]. One of the limitations of parametric models is that they do not capture non-linear effects such as saturation. Non-parametric approaches are more flexible and apply to broader network model classes but suffer severely from the curse of dimensionality (see e.g. [36]). To overcome the curse of dimensionality, the sparse additive models (SpAM) framework was developed (see e.g. [20, 25, 31, 32]). Prior approaches based on the SpAM framework have been applied in the regression setting. In this paper, we consider samples generated from a non-parametric sparse additive auto-regressive model, generated by the generalized linear model (GLM), Xt+1,j |Xt ∼ p(vj + d X ∗ (Xt,k )) fj,k (1) k=1 ∗ is an unknown function belonging to a reproducing kernel Hilbert space H . The goal is to where fj,k j,k ∗ ) estimate the d2 functions (fj,k 1≤j,k≤d . Prior theoretical guarantees for sparse additive models have focused on the setting where samples are independent. In this paper, we analyze the convex penalized sparse and smooth estimator developed and analyzed in [20, 31] under the dependent Markov chain model (1). To provide theoretical guarantees, we assume the Markov chain “mixes” using concepts of β and φ-mixing of Markov chains. In particular, in contrast to the parametric setting, our convergence rates are a function of β or φ mixing co-efficients, and the smoothness of the RKHS function class. We also support our theoretical guarantees with simulations and show through simulations and a performance analysis on real data the potential advantages of using our non-parametric approach. 1.1 Our contributions As far as we are aware, our paper is the first to provide a theoretical analysis of high-dimensional nonparametric auto-regressive network models. In particular, we make the following contributions. • We provide a scalable non-parametric framework using technologies in sparse additive models for high-dimensional time series models that capture non-linear, non-parametric framework. This provides extensions to prior on high-dimensional parametric models by exploiting RKHSs. 2 • In Section 4, we provide the most substantial contribution of this paper which is an upper bound on mean-squared error that applies in the high-dimensional setting. Our rates depend on the sparsity of the function, smoothness of each univariate function, and mixing co-efficients. In particular, our mean-squared error upper bound scales as: s log d , max √ mT r m 2 ˜ , T m up to logarithm factors, where s is the maximum degree of a given node, d is the number of nodes of the network, T is the number of time points. Here ˜m refers to the univariate rate for estimating a single function in RKHS with m samples (see e.g. [31]) and 1 ≤ m ≤ T refers to the number of blocks needed depending on the β and φ-mixing co-efficients. If the dependence is weak and m = O(T ), our mean-squared error bounds are optimal up to log factors as compared to prior work on independent models [31] while if dependence is strong m = O(1), we obtain the slower rate (up to log factors) of √1 T that is optimal under no dependence assumptions. • We also develop a general proof technique for addressing high-dimensional time series models. Prior proof techniques in [16] rely heavily on parametric assumptions and constraints on the parameters which allow us to use martingale concentration bounds. This proof technique explicitly exploits mixing co-efficients which relies on the well-known “blocking” technique for sequences of dependent random variables (see e.g. [27, 29]). In the process of the proof, we also develop upper bounds on Rademacher complexities for RKHSs and other empirical processes under mixing assumptions rather than traditional independence assumptions as discussed in Section 5. • In Section 6, we demonstrate through both a simulation study and real data example the flexibility and potential benefit of using the non-parametric approach. In particular we show improved prediction error performance on higher-order polynomials applied to a Chicago crime dataset. The remainder of the paper is organized as follows. In Section 2, we introduce the preliminaries for RKHSs, and beta-mixing of Markov chains. In Section 3, we present the non-parametric multi-variate auto-regressive network model and its estimating scheme. In Section 4, we present the main theoretical results and focus on specific cases of finite-rank kernels and Sobolev spaces. In Section 5, we provide the main steps of the proof, deferring the more technical steps to the appendix and in Section 6, we provide a simulation study that supports our theoretical guarantees and a performance analysis on Chicago crime data. 2 Preliminaries In this section, we introduce the basic concepts of RKHSs, and then the standard definitions of β and φ mixing for stationary processes. 3 2.1 Reproducing Kernel Hilbert Spaces First we introduce the basics for RKHSs. Given a subset X ⊂ R and a probability measure Q on X , we consider a Hilbert space H ⊂ L2 (Q), meaning a family of functions g : X → R, with kgkL2 (Q) < ∞, and an associated inner product h·, ·iH under which H is complete. The space H is a reproducing kernel Hilbert space (RKHS) if there exists a symmetric function K : X × X → R+ such that: (a) for each x ∈ X , the function K(x, ·) belongs to the Hilbert space H, and (b) we have the reproducing relation g(x) = hg, K(x, ·)iH for all g ∈ H. Any such kernel function must be positive semidefinite; under suitable regularity conditions, Mercers theorem [26] guarantees that the kernel has an eigen-expansion of the form 0 K(x, x ) = ∞ X µi Φi (x)Φi (x0 ) i=1 where µ1 ≥ µ2 ≥ µ3 ≥ ... ≥ 0 are a non-negative sequence of eigenvalues, and {Φi }∞ i=1 are the associated eigenfunctions, taken to be orthonormal in L2 (Q). The decay rate of these eigenvalues will play a crucial role in our analysis, since they ultimately determine the rate m , ˜m (to be specified later) for the univariate RKHSs in our function classes. Since the eigenfunctions {Φi }∞ i=1 form an orthonormal basis, any function g ∈ H has an expansion of the R P∞ g(x) = i=1 ai Φi (x), where ai = hg, Φi iL2 (Q) = X g(x)Φi (x)dQ(x) are (generalized) Fourier coeffiP∞ P cients. Associated with any two functions in H, say g(x) = ∞ i=1 bi Φi (x) are i=1 ai Φi (x) and f (x) = two distinct inner products. The first is the usual inner product in the space L2 (Q)-namely, hg, f iL2 (Q) := R X g(x)f (x)dQ(x). By Parseval’s theorem, it has an equivalent representation in terms of the expansion coefficients, namely hg, f iL2 (Q) = ∞ X ai bi . i=1 The second inner product, denoted hg, f iH is the one that defines the Hilbert space which can be written in terms of the kernel eigenvalues and generalized Fourier coefficients as hg, f iH = ∞ X ai bi µi i=1 . For more background on reproducing kernel Hilbert spaces, we refer the reader to various standard references [2, 34, 35, 38, 39]. Furthermore, for the subset Sj ∈ {1, 2, .., d}, let fj := P k∈Sj fj,k (xk ), where xk ∈ X and fj,k ∈ Hj,k is the RKHS that fj,k lies in. Hence we define the norm kfj k2Hj (Sj ) := X kfj,k k2Hj,k , k∈Sj where k · kHj,k denotes the norm on the univariate Hilbert space Hj,k . 4 2.2 Mixing Now we introduce standard definitions for dependent observations based on mixing theory [11] for stationary processes. Definition 1. A sequence of random variables Z = {Zt }∞ t=0 is said to be stationary if for any t0 and nonnegative integers t1 and t2 , the random vectors (Zt0 , ..., Zt0 +t1 ) and (Zt0 +t2 , ..., Zt0 +t1 +t2 ) have the same distribution. Thus the index t or time, does not affect the distribution of a variable Zt in a stationary sequence. This does not imply independence however and we capture the dependence through mixing conditions. The following is a standard definition giving a measure of the dependence of the random variables Zt within a stationary sequence. There are several equivalent definitions of these quantities, we are adopting here a version convenient for our analysis, as in [27, 40]. Definition 2. Let Z = {Zt }∞ t=0 be a stationary sequence of random variables. For any i1 , i2 ∈ Z ∪ {0, ∞}, let σii12 denote the σ-algebra generated by the random variables Zt , i1 ≤ t ≤ i2 . Then, for any positive integer `, the β-mixing and φ-mixing coefficients of the stochastic process Z are defined as β(`) = sup EB∈σ0t [ sup |P [A|B] − P [A]|] , φ(`) = t ∞ A∈σt+` sup |P [A|B] − P [A]|. ∞ ,B∈σ t t,A∈σt+` 0 Z is said to be β-mixing (φ-mixing) if β(`) → 0 (resp. φ(`) → 0) as ` → ∞. Furthermore Z is said to be algebraically β-mixing (algebraically φ-mixing) if there exist real numbers β0 > 0 (resp. φ0 > 0) and r > 0 such that β(`) ≤ β0 /`r (resp. φ(`) ≤ φ0 /`r ) for all `. Both β(`) and φ(`) measure the dependence of an event on those that occurred more than ` units of time in the past. β-mixing is a weaker assumption than φ-mixing and thus includes more general non-i.i.d. processes. 3 Model and estimator In this section, we introduce the sparse additive auto-regressive network model and the sparse and smooth regularized schemes that we implement and analyze. 3.1 Sparse additive auto-regressive network model From Equation (1) in Section 1, we can state the conditional distribution explicitly as: ( ) d d d Y X X ∗ ∗ P(Xt+1 |Xt ) = h(Xt+1,j )exp ϕ(Xt+1,j )(vj + fj,k (Xt,k )) − Z(vj + fj,k (Xt,k )) j=1 k=1 5 k=1 (2) ∗ is an unknown function belonging to a RKHS H , v ∈ [v d where fj,k min , vmax ] are known constant offset j,k parameters. Recall that Z(·) refers to the log-partition function and ϕ(·) refers to the sufficient statistic. This model has the Markov and conditional independence properties, that is, conditioning on the previous data at time point t − 1, the elements of Xt are independent of one another and Xt are independent with data before time t − 1. We note that while we assume that v is a known constant vector, if we assume there is some unknown constant offset that we would like to estimate, we can fold it into the estimation of f ∗ via appending a constant 1 column in Xt . We assume that the data we observe is (Xt )Tt=0 and our goal is to estimate f ∗ , which is constructed element∗ . However, in our setting where d may be large, the sample size T may not be sufficient even wise by fj,k under the additivity assumption and we need further structural assumptions. Hence we assume that the network function f ∗ is sparse which does not have too many non-zero functions. To be precise, we define the sparse supports (S1 , S2 , ..., Sd ) as: Sj ⊂ {1, 2, ..., d}, for any j = 1, 2, ..., d. We consider network function f ∗ is only non-zero on supports {Sj }dj=1 , which means f ∗ ∈ H(S) := {fj,k ∈ Hj,k |fj,k = 0 for any k ∈ / Sj }. The support Sj is the set of nodes that influence node j and sj = |Sj | refers to the in-degree of node j. In this paper we assume that the function matrix f ∗ is s-sparse, meaning that f ∗ belongs to H(S) where P |S| = dj=1 |Sj | ≤ s. From a network perspective, s represents the total number of edges in the network. 3.2 Sparse and smooth estimator The estimator that we analyze in this paper is the standard sparse and smooth estimator developed in [20, 31], for each node j. To simplify notation and without loss of generality, in later statements we assume Hj,k Pd refers to the same RKHS H, and define Hj = {fj |fj = k=1 fj,k , for any fj,k ∈ H} which corresponds to the additive function class for each node j. Further we define the empirical norm kfj,k k2T := Pd 1 PT 2 2 k=1 fj,k , the (L (PT ), 1) and (H, 1)-norms are t=0 fj,k (Xt,k ). For any function of the form fj = T given by kfj kT,1 = d X kfj,k kT , and kfj kH,1 = k=1 d X kfj,k kH k=1 respectively. Using this notation, we estimate fj∗ via a regularized maximum likelihood estimator (RMLE) by solving the following optimization problem, for any j ∈ {1, 2, .., d}: T 1 X fˆj = arg min (Z(vj + fj (Xt )) − (vj + fj (Xt ))ϕ(Xt+1,j )) + λT kfj kT,1 + λH kfj kH,1 . fj ∈Hj 2T (3) t=0 Here (λT , λH ) is a pair of positive regularization parameters whose choice will be specified by our theory. An attractive feature of this optimization problem is that, as a straightforward consequence of the representer 6 2 theorem [19, 35], it can be reduced to an equivalent convex program in RT × Rd . In particular, for each (j, k) ∈ {1, 2, ..., d}2 , let K denote the kernel function associated with RKHS H where fj,k belongs to. We define the collection of empirical kernel matrices Kj,k ∈ RT ×T with entries Kj,k t1 ,t2 = K(Xt1 ,k , Xt2 ,k ). As ˆ discussed in [20, 31], by the representer theorem, any solution fj to the variational problem can be expressed in terms of a linear expansion of the kernel matrices, fˆj (z) = d X T X α̂j,k,t K(zk , Xt,k ) k=1 t=1 for a collection of weights {α̂j,k ∈ RT (j, k) ∈ {1, 2, .., d}2 }. The optimal weights are obtained by solving the convex problem ! T d d X X 1 X Z(vj + Kj,k αj,k ) − (vj + Kj,k αj,k )ϕ(Xt+1,j ) α̂j = (α̂j,1 , ..., α̂j,d ) = arg min αj,k ∈RT 2T t=0 +λT d X k=1 r k=1 k=1 d Xq 1 j,k T Kj,k α . kK αj,k k22 + λH αj,k j,k T k=1 This problem is a second-order cone program (SOCP), and there are various algorithms for solving it to arbitrary accuracy in polynomial time of (T, d), among them interior point methods (e.g., see the book [5]). Other more computationally tractable approaches for estimating sparse additive models have been developed in [25, 32] and in our experiments section we use the package “SAM” based on the algorithm developed in [32]. However from a theoretical perspective the sparse and smooth SOCP defined above has benefits since it is the only estimator with provably minimax optimal rates in the case of independent design (see e.g. [31]). 4 Main results In this section, we provide the main general theoretical results. In particular, we derive error bounds on kfˆ−f ∗ k2 , the difference in empirical L2 (PT ) norm between the regularized maximum likelihood estimator, T fˆ, and the true generating network, f ∗ , under the assumption that the true network is s-sparse. First we incorporate the smoothness of functions in each RKHS H. We refer to m as the critical univariate rate, which depends on the Rademacher complexity of each function class. That m is defined as the minimal value of σ, such that v u∞ X 1 u √ t min(µi , σ 2 ) ≤ σ 2 , m i=1 where {µi }∞ i=1 are the eigenvalues in Mercer’s decomposition of the kernel related to the univariate RKHS (see [26]). In our work, we define ˜m as the univariate rate for a slightly modified Rademacher complexity, 7 which is the minimal value of σ, such that there exists a M0 ≥ 1 satisfying v r v u M0 uX ∞ u X log(M0 dT ) t Tu 2 t √ log(dT ){3 min(µi , σ 2 )} ≤ σ 2 . min(µi , σ ) + m m i=1 M0 +1 Remark. Note that since the left side of the inequality for ˜m is always larger than it for m , the definitions of ˜m and m tell us that m ≤ ˜m . Furthermore ˜m is of order O(m ∗ log(dT )2 ) for finite rank kernel and kernel with decay rate i−2α . See Subsection 4.3 for more details. The modified definition ˜m allows us to extend the error bounds on kfˆ − f ∗ k2 to the dependent case at the price of additional log factors. T 4.1 Assumptions We first state the assumptions in this subsection and then present our main results in the next subsection. Without loss of generality (by re-centering the functions as needed), we assume that Z fj,k (x)dP(x) = 0 for all fj,k ∈ Hj,k , all t. E[fj,k (Xt,j )] = X Besides, for each (j, k) ∈ {1, ..., d}2 , we make the minor technical assumptions: • For any fj,k ∈ H, kfj,k kH ≤ 1 and kfj,k k∞ ≤ 1. • For any H, the associated eigenfunctions in Mercers decomposition {Φi }∞ i=1 satisfy supx |Φi (x)| ≤ 1 for each i = 1, ..., ∞. The first condition is mild and also assumed in [31]. The second condition is satisfied by the bounded basis, for example, the Fourier basis. We proceed to the main assumptions by denoting smax = maxj sj as the P maximum in-degree of the network and denoting Hµ = ∞ i=1 µi as the trace of the RKHS H. Assumption 1 (Bounded Noise). Let wt,j = 21 (ϕ(Xt+1,j ) − Z 0 (vj + fj∗ (Xt ))), we assume that E[wt,j ] = 0 and with high probability wt,j ∈ [− log(dT ), log(dT )], for any j ∈ {1, 2, ..., d}, t = 1, 2, ..., T . Remark. It can be checked that for (1) Gaussian link function with bounded noise or (2) Bernoulli link function, wt,j = O(1) with probability 1. For other generalized linear model cases, such as (1) Gaussian ∗ ≤ 0 for any (j, k), link function with Gaussian noise or (2) Poisson link function under the assumption fj,k we have that |wt,j | ≤ C log(dT ) with probability at least 1 − exp(−c log(dT )) for some constants C and c (see the proof of Lemma 1 in [16]). Assumption 2 (Strong Convexity). For any x, y in an interval (vmin − a, vmax + a), ϑkx − yk2 ≤ [Z(x) − Z(y) − Z 0 (y)(x − y)] . 8 p Remark. For the Gaussian link function,√a = ∞ and ϑ = 1. For Bernoulli link function, a = (16 Hµ + p ,−vmin )+(16 Hµ +1)smax ) −1 . For Poisson link function, a = (16 H + 1)smax and ϑ = (e(max(vmax + 3) µ √ vmin −(16 Hµ +1)smax 1)smax and ϑ = e where recall that smax is the maximum in-degree of the network. Assumption 3 (Mixing). The sequence (Xt )∞ t=0 defined by the model (1) is a stationary sequence satisfying one of the following mixing conditions: (a) β-mixing with rβ > 1. (b) φ-mixing with rφ ≥ 0.781. We can show a tighter bound when rφ ≤ 2 using the concentration inequality from [22]. The condition rφ ≥ 0.781 arises from the technical condition in which (rφ + 2) × (2rφ − 1) ≥ 2rφ (see the Proof of Lemma 6). Numerous results in the statistical machine learning literature rely on knowledge of the βmixing coefficient [24, 37]. Many common time series models are known to be β-mixing, and the rates of decay are known given the true parameters of the process, for example, ARMA models, GARCH models, and certain Markov processes [28, 7, 10]. The φ-mixing condition is stronger but as we observe later allows a sharper mean-squared error bound. Assumption 4 (Fourth Moment Assumption). E[g 4 (x)] ≤ CE[g 2 (x)] for some constant C, for all g ∈ Fj := ∪|Sj |=sj Hj (Sj ), for any j ∈ {1, 2, .., d} where the expectation is taken over Q. Note that Assumption 4 is a technical assumption also required in [31] and is satisfied under mild dependence across the covariates. 4.2 Main Theorem Before we state the main result, we discuss the choiceof tuning parameters λT and λH .  q log(dT ) , where c1 > 0 is a sufficiently large Optimal tuning parameters: Define γm = c1 max m , m 2 = Ω(− log(γ )) and mγ 2 → ∞ as m → ∞. γ̃ constant, independent of T , s and d, and mγm m m = m max(γm , ˜m ). The parameter m is a function of T and is defined in Thm. 1 and Thm. 2. Then we have the following optimal choices of tuning parameters: r r √ √ m m 2 λT ≥ 8 2 γ̃m , λH ≥ 8 2 γ̃ , T T m r r m m 2 λT = O( γ̃m ), λH = O( γ̃ ). T T m Clearly it is possible to choose larger values of λT and λH at the expense of slower rates. Theorem 1. Under Assumptions 1, 2, 3 (a), and 4. Then there exists a constant C such that for each 1 ≤ j ≤ d, sj kfˆj − fj∗ k2T ≤ C 2 ϑ  log(dT ) √ + mT 9 r  m 2 ˜ , T m (4) with probability at least 1 − 1 T  − 2) c2 exp(−c3 mγm +T   1−c − c 0 , where m = T 0 c0 rβ −1 c0 rβ for β-mixing when rβ ≥ 1/c0 , and c2 and c3 are constants. The parameter c0 can be any number between 0 and 1. • Note that the term ˜2m accounts for the smoothness of the function class, ϑ accounts for the smoothness of the GLM loss, and m denotes the degree of dependence in terms of the number of blocks in T samples. • In the very weakly dependent case rβ → ∞ and m = O(T ), and we recover the standard rates for sparse additive models sj log d T + sj ˜2T (see e.g. [31]) up to logarithm factors. In the highly dependent case m = O(1), we end up with a rate proportional to √1 T (up to log factors in terms of T only) which is consistent with the rates for the lasso under no independence assumptions. • Note that we have provided rates on the difference of functions fˆj − fj∗ for each 1 ≤ j ≤ d. To obtain P rates for the whole network function fˆ − f ∗ , we simply add up the errors and note that s = d sj . j=1 1 ), we obtain • To compare to upper bounds in the parametric case in [16], if m = O(T ) and ˜2m = O( m the same rates. Note however that in [16] we require strict assumptions on the network parameter instead of the mixing conditions we impose here. • A larger c0 leads to a larger m and a lower probability from the term T − 1−c0 c0 . When rφ ≥ 2, Theorem 1 on β-mixing directly implies the results for φ-mixing. When 0.781 ≤ rφ ≤ 2, we can present a tighter result using the concentration inequality from [22]. Theorem 2. Under same assumptions as in Thm. 1, if we assume φ-mixing when 0.781 ≤ rφ ≤ 2, then there exists a constant C such that for each 1 ≤ j ≤ d, r   sj log(dT ) m 2 ∗ 2 ˆ √ kfj − fj kT ≤ C 2 ˜ , + ϑ T m mT with probability at least 1− T1 2 )2 ), where m −c2 exp(−c3 (mγm =T rφ rφ +2 (5) for φ-mixing when 0.781 ≤ rφ ≤ 2, c2 and c3 are constants. Note that m = T rφ rφ +2 is strictly larger than m = T rφ −1 rφ for rφ ≤ 2 which is why Theorem 2 is a sharper result. 4.3 Examples We now focus on two specific classes of functions, finite-rank kernels and infinite-rank kernels with polynomial decaying eigenvalues. First, we discuss finite (ξ) rank operators, meaning that the kernel function can be expanded in terms of ξ eigenfunctions. This class includes linear functions, polynomial functions, as well as any function class where functions have finite basis expansions. 10 Lemma 1. For a univariate kernel with finite rank ξ, ˜m = O q ξ m  log2 (ξdT ) . Using Lemma 1 and m calculated from [31] gives us the following result. Note that for T = O(m), we end up with the usual parametric rate. Corollary 1. Under the same conditions as Theorem 1, consider a univariate kernel with finite rank ξ. Then there exists a constant C such that for each 1 ≤ j ≤ d, kfˆj − fj∗ k2T ≤ C with probability at least 1 − 1 T sj ξ √ log4 (ξdT ), ϑ2 mT  − c2 exp(−c3 (ξ + log d)) + T   1−c − c 0 0 , where m = T (6) c0 rβ −1 c0 rβ for β-mixing when rβ ≥ 1/c0 , c2 and c3 are constants. Next, we present a result for the RKHS with infinitely many eigenvalues, but whose eigenvalues decay at a rate µ` = (1/`)2α for some parameter α ≥ 1/2. Among other examples, this includes Sobolev spaces, say consisting of functions with α derivatives (e.g., [4, 15]). Lemma  2. For a univariate kernel with eigenvalue decay µ` = (1/`)2α for some α ≥ 1/2, we have that  2α   2 log (dT ) 2α+1 √ . ˜m = O m Corollary 2. Under the same conditions as Theorem 1, consider a univariate kernel with eigenvalue decay µ` = (1/`)2α for some α ≥ 1/2. Then there exists a constant C such that for each 1 ≤ j ≤ d, 8α sj log 2α+1 (dT ) kfˆj − fj∗ k2T ≤ C 2 q , 2α−1 ϑ 2α+1 m T with probability at least 1 − 1 T −T −  1−c0 c0  , where m = T Note that if m = O(T ), we obtain the rate O( 2α for β-mixing when rβ ≥ 1/c0 . ) up to log factors which is optimal in the independent T 2α+1 case. 5 sj c0 rβ −1 c0 rβ (7) Proof for the main result (Theorem 1) At a high level, the proof for Theorem 1) follows similar steps to the proof of Theorem 1 in [31]. However a number of additional challenges arise when dealing with dependent data. The key challenge in the proof is that the traditional results for Rademacher complexities of RKHSs and empirical processes assume independence and do not hold for dependent processes. These problems are addressed by Theorem 3 and Theorem 4 in this work. 11 5.1 Establishing the basic inequality Our goal is to estimate the accuracy of fj∗ (·) for every integer j with 1 ≤ j ≤ d. We denote the expected L2 (P) norm of a function g as kgk22 = Ekgk2T where the expectation is taken over the distribution of (Xt )T . We begin the proof by establishing a basic inequality on the error function ∆j (.) = fˆj (.) − f ∗ (.). t=0 j Since fˆj (.) and fj∗ are, respectively, optimal and feasible for (3), we are guaranteed that T 1 X (Z(vj + fˆj (Xt )) − (vj + fˆj (Xt ))ϕ(Xt+1,j )) + λT kfˆj kT,1 + λH kfˆj kH,1 2T t=1 ≤ T 1 X (Z(vj + fj∗ (Xt )) − (vj + fj∗ (Xt ))ϕ(Xt+1,j )) + λT kfj∗ kT,1 + λH kfj∗ kH,1 . 2T t=1 Using our definition wt,j = 21 (ϕ(Xt+1,j ) − E[ϕ(Xt+1,j )|Xt ]) = 12 (ϕ(Xt+1,j ) − Z 0 (vj + fj∗ (Xt ))), that is T 1 X (Z(vj + fˆj (Xt )) − fˆj (Xt )(Z 0 (vj + fj∗ (Xt )) + 2wt,j )) + λT kfˆj kT,1 + λH kfˆj kH,1 2T t=1 ≤ T 1 X (Z(vj + fj∗ (Xt )) − fj∗ (Xt )(Z 0 (vj + fj∗ (Xt )) + 2wt,j )) + λT kfj∗ kT,1 + λH kfj∗ kH,1 . 2T t=1 Let BZ (·||·) denote the Bregman divergence induced by the strictly convex function Z, some simple algebra yields that T T 1 X 1X BZ (vj + fˆj (Xt )||vj + fj∗ (Xt )) ≤ ∆j (Xt )wt,j + λT k∆j kT,1 + λH k∆j kH,1 2T T t=1 (8) t=1 which we refer to as our basic inequality (see e.g. [14] for more details on the basic inequality). 5.2 Controlling the noise term ∗ (·) for any k = 1, 2, ..., d. Next, we provide control for the right-hand side of Let ∆j,k (·) = fˆj,k (·) − fj,k inequality (8) by bounding the Rademacher complexity for the univariate functions in terms of their L2 (PT ) and H norms. We point out that tools required for such control are not well-established in the dependent case which means that we first establish the Rademacher complexity result (Theorem 3) and the uniform convergence rate for averages in the empirical process (Theorem 4) for the dependent case (results for the independent case are provided as Lemma 7 in [31]). Theorem 3 (Rademacher complexity). Under Assumption 1, define the event ( ) r T √ 1X m 2 2 fj,k (Xt )wt,j ≤ 2 σ . Am,T = ∀(j, k) ∈ {1, 2, ..., d} , ∀σ ≥ ˜m , sup T kfj,k kH ≤1,kfj,k k2 ≤σ T t=1 Then P(Am,T ) ≥ 1 − 1 T. 12 Remark. We have a correction term q T m for m < T , in order to connect our Rademacher complexity result with mixing conditions. In the independnet case, m = T which has been proven in prior work. Theorem 4. Define the event ( Bm,T = where m = T c0 rβ −1 c0 rβ γm sup sup |kfj,k kT − kfj,k k2 | ≤ 2 j,k fj,k ∈BH (1),kfj,k k2 ≤γm for β-mixing with rβ ≥ 1/c0 . Then P(Bm,T ) ≥ 1 − ) (9) 2) c2 exp(−c3 mγm −T   1−c − c 0 0 for some constants c2 and c3 . Moreover, on the event Bm,T , for any g ∈ BH (1) with kgk2 ≥ γm , 3 kgk2 ≤ kgkT ≤ kgk2 . 2 2 (10) The proofs for Theorems 3 and 4 are provided in the appendix. Using Theorems 3 and 4, we are able to P providean upper bound onthe noise term T1 Tt=1 ∆j (Xt )wt,j in (8). In particular, recalling that γ̃m = q ) c1 max m , ˜m , log(dT , we have the following lemma. m Lemma 3. Given γ̃m = max(γm , ˜m ), on the event Am,T ∩ Bm,T , we have: r T √ 1X m 2 | fj,k (Xt )wt,j | ≤ 4 2 (γ̃m kfj,k kT + γ̃m kfj,k kH ) T T (11) t=1 for any fj,k ∈ H, for all (j, k) ∈ {1, 2, ..., d}2 . 5.3 Exploiting decomposability The reminder of our analysis involves conditioning on the event Am,T ∩Bm,T . Recalling the basic inequality (8) and using Lemma 3, on the event Am,T ∩ Bm,T defined in Theorems 3 and 4, we have: T √ 1 X BZ (vj +fˆj (Xt )||vj +fj∗ (Xt )) ≤ 4 2 2T r t=1 √ m γ̃m k∆j kT,1 +4 2 T r m 2 γ̃ k∆j kH,1 +λT k∆j kT,1 +λH k∆j kH,1 . T m Recalling that Sj denotes the true support of the unknown function fj∗ , we define ∆j,Sj := P k∈Sj ∆j,k , with a similar definition for ∆j,S C . We have that k∆j kT,1 = k∆j,Sj kT,1 + k∆j,S C kT,1 with a similar j j decomposition for k∆j kH,1 . We are able to show that conditioned on event Am,T ∩ Bm,T , the quantities k∆j kH,1 and k∆j kT,1 are not significantly larger than the corresponding norms as applied to the function ∆j,Sj . First, notice that we can obtain a sharper inequality in the process of getting our basic inequality (8), that is, T T 1 X 1X ∗ ˆ BZ (vj +fj (Xt )||vj +fj (Xt )) ≤ ∆j (Xt )wt,j +λT (kfj∗ kT,1 −kfj∗ +∆j kT,1 )+λH (kfj∗ kH,1 −kfj∗ +∆j kH,1 ). 2T T t=1 t=1 13 Using Lemma 3 and the fact that Bregman divergence is non-negative, on event Am,T ∩ Bm,T we obtain r r √ √ m m 2 γ̃m k∆j kT,1 +4 2 γ̃ k∆j kH,1 +λT (kfj∗ kT,1 −kfj∗ +∆j kT,1 )+λH (kfj∗ kH,1 −kfj∗ +∆j kH,1 ). 0≤4 2 T T m √ p √ pm 2 Recall our choice λT ≥ 8 2 m T γ̃m , λH ≥ 8 2 T γ̃m , that yields 0≤ λT λH k∆j kT,1 + k∆j kH,1 + λT (kfj∗ kT,1 − kfj∗ + ∆j kT,1 ) + λH (kfj∗ kH,1 − kfj∗ + ∆j kH,1 ). 2 2 Now, for any k ∈ SjC , we have ∗ ∗ ∗ ∗ kfj,k kT − kfj,k + ∆j,k kT = −k∆j,k kT , and kfj,k kH − kfj,k + ∆j,k kH = −k∆j,k kH . On the other hand, for any k ∈ Sj , the triangle inequality yields ∗ ∗ kfj,k kT − kfj,k + ∆j,k kT ≤ k∆j,k kT with a similar inequality for the terms involving k · kH . Given those bounds, we conclude that 0≤ λH λT k∆j kT,1 + k∆j kH,1 + λT (k∆j,Sj kT,1 − k∆j,S C kT,1 ) + λH (k∆j,Sj kH,1 − k∆j,S C kH,1 ). (12) j j 2 2 Using the triangle inequality k∆j k ≤ k∆j,Sj k + k∆j,S C k for any norm and rearranging terms, we obtain j k∆j,S C kT,1 + k∆j,S C kH,1 ≤ 3(k∆j,Sj kT,1 + k∆j,Sj kH,1 ), j j which implies k∆j kT,1 + k∆j kH,1 ≤ 4(k∆j,Sj kT,1 + k∆j,Sj kH,1 ). (13) This bound allows us to exploit the sparsity assumption, since in conjunction with Lemma 3, we have now bounded the right-hand side of the basic inequality (8) in terms involving only ∆j,Sj . In particular, still conditioning on event Am,T ∩ Bm,T and applying (13), we obtain T 1 X BZ (vj + fˆj (Xt )||vj + fj∗ (Xt )) ≤ C 2T t=1 r m 2 {γ̃m k∆j,Sj kT,1 + γ̃m k∆j,Sj kH,1 }, T p pm 2 for some constant C, where we have recalled our choices λT = O( m T γ̃m ) and λH = O( T γ̃m ). Finally, ∗ ˆ since both fj,k and f belong to BH (1), we have j,k ∗ k∆j,k kH ≤ kfˆj,k kH + kfj,k kH ≤ 2, which implies that k∆j,Sj kH,1 ≤ 2sj , and hence T 1 X BZ (vj + fˆj (Xt )||vj + fj∗ (Xt )) ≤ C 2T t=1 14 r m 2 (γ̃m k∆j,Sj kT,1 + sj γ̃m ). T 5.4 Exploiting strong convexity On the other hand, we are able to bound the Bregman divergence term on the left-hand side as well by noticing that (13) implies k∆j kH,1 ≤ 16sj , (14) ∗ belong to B (1) with kfˆ k ∗ since fˆj,k and fj,k H j,k ∞ ≤ 1 and kfj,k k∞ ≤ 1. Using bound (14), for any t, we conclude that |fˆj (Xt )| = |∆j (Xt ) + fj∗ (Xt )| = | d X ∆j,k (Xt,k ) + fj∗ (Xt )| k=1 ≤ d X k∆j,k kH max k k=1 q v u∞ uX ∗ K(Xt,k , Xt,k ) + |fj (Xt )| ≤ 16t µi sj + |fj∗ (Xt )| i=1 v  u∞ uX µi + 1 smax . ≤ 16t  i=1 Therefore, vj + fˆj (Xt ), vj + fj∗ (Xt ) ∈ [vmin − (16 pP∞ i=1 µi pP∞ + 1)smax , vmax + (16 i=1 µi + 1smax ] where we have function Z(·) is ϑ-strongly convex given Assumption 2. Hence r ϑ m 2 k∆j kT ≤ C {γ̃m k∆j,Sj kT,1 + sj γ̃m }. 2 T 5.5 (15) Relating the L2 (PT ) and L2 (P) norms P It remains to control the term k∆j,Sj kT,1 = k∈Sj k∆j,k kT . Ideally we would like to upper bound it by √ sj k∆j,Sj kT . Such an upper bound would follow immediately if it were phrased in terms of the k · k2 rather than the k · kT norm, but there are additional cross-terms with the empirical norm. Accordingly, we make use of two lemmas that relate the k · kT norm and the population k · k2 norms for functions in Fj := ∪Sj ⊂{1,2,...,d}|Sj |=sj Hj (Sj ). In the statements of these results, we adopt the notation gj and gj,k (as opposed to fj and fj,k ) to be clear that our results apply to any gj ∈ Fj . We first provide an upper bound on the empirical norm kgj,k kT in terms of the associated kgj,k k2 norm, one that holds uniformly over all components k = 1, 2, ..., d. Lemma 4. On event Bm,T , kgj,k kT ≤ 2kgj,k k2 + γm , for all gj,k ∈ BH (2) (16) for any (j, k) ∈ {1, 2, ..., d}2 . We now define the function class 2Fj := {f + f 0 |f, f 0 ∈ Fj }. Our second lemma guarantees that the empirical norm k · kT of any function in 2Fj is uniformly lower bounded by the norm k · k2 . 15 2 Lemma 5. Given properties of γm and δm,j = c4 { sj log d m + sj 2m }, we define the event Dm,T = {∀j ∈ [1, 2, ..., d], kgj kT ≥ kgj k2 /2 for all gj ∈ 2Fj with kgj k2 ≥ δm,j } where m = T T −  1−c0 c0 c0 rβ −1 c0 rβ (17) 2 ))− for β-mixing with rβ ≥ 1/c0 . Then we have P(Dm,T ) ≥ 1−c2 exp(−c3 m(minj δm,j  where c2 , c3 and c4 are constants.. Note that while both results require bounds on the univariate function classes, they do not require global P boundedness assumptions-that is, on quantities of the form k k∈Sj gj,k k∞ . Typically, we expect that the k · k∞ -norms of functions gj ∈ Fj scale with sj . 5.6 Completing the proof Using Lemmas 4 and 5, we complete the proof of the main theorem. For the reminder of the proof, let us condition on the events Am,T ∩ Bm,T ∩ Dm,T . Conditioning on the event Bm,T , we have k∆j,Sj kT,1 = X k∆j,k kT ≤ 2 k∈Sj X √ k∆j,k k2 + sj γm ≤ 2 sj k∆j,Sj k2 + sj γm . (18) k∈Sj Our next step is to bound k∆j,Sj k2 in terms of k∆j,Sj kT and sj γm . We split our analysis into two cases. √ Case 1: If k∆j,Sj k2 < δm,j = Θ( sj γm ), then we conclude that k∆j,Sj k1,T ≤ Csj γm . P Case 2: Otherwise, we have k∆j,Sj k2 ≥ δm,j . Note that the function ∆j,Sj = k∈Sj ∆j,k belongs to the class 2Fj so that it is covered by the event Dm,T . In particular, conditioned on the event Dm,T , we have k∆j,Sj k2 ≤ 2k∆j,Sj kT . Combined with the previous bound (18), we conclude that √ k∆j,Sj kT,1 ≤ C{ sj k∆j,Sj kT,2 + sj γm }. √ Therefore in either case, a bound of the form k∆j,Sj kT,1 ≤ C{ sj k∆j,Sj kT,2 + sj γm } holds. Substituting the inequality in the bound (15) yields ϑ k∆j k2T ≤ C1 2 r m √ 2 ( sj γ̃m k∆j,Sj kT + sj γ̃m ). T The term k∆j,Sj kT on the right side of the inequality is bounded by k∆j kT and the inequality still holds after replacing k∆j,Sj kT by k∆j kT . Through rearranging terms in that inequality, we get, k∆j k2T Because m T ≤ 1 and 1 ≤ 2C1 ϑ r  m √ 2 sj γ̃m k∆j kT + sj γ̃m . T (19) 1 ϑ ≥ 1, we can relax the inequality to     1 m 1/4 √ 1  m 1/2 2 2 k∆j kT ≤ 2C1 sj γ̃m k∆j kT + 2 sj γ̃m . ϑ T ϑ T 16 (20) We can derive a bound on k∆j kT from that inequality, which is r r   sj m 2 sj m log(dT ) 2 2 k∆j kT ≤ C2 2 γ̃ = C2 2 + max(m , ˜m ) ϑ T m ϑ T m r   sj log(dT ) m 2 √ = C2 2 + max(m , ˜m ) ϑ T mT r   sj log(dT ) m 2 √ + ˜ , = C2 2 ϑ T m mT (21) where C2 only depends on C1 . That completes the proof. 6 Numerical experiments Our experiments are two-fold. First we perform simulations that validate the theoretical results in Section 4. We then apply the SpAM framework on a Chicago crime dataset and show its improvement in prediction error and ability to discover additional interesting patterns beyond the parametric model. Instead of using the sparse and smooth objective in this paper, we implement a computationally faster approach through the R CRAN package “SAM”, which includes the first penalty term kfj k1,T but not the second term kfj k1,H ([42]). We also implemented our original optimization problem in ‘cvx’ however due to computational challenges this does not scale. Hence we use “SAM”. 6.1 Simulations We validate our theoretical results with experimental results performed on synthetic data. We generate many trials with known underlying parameters and then compare the estimated function values with the true values. For all trials the constant offset vector v is set identically at 0. Given an initial vector X0 , samples are generated consecutively using the equation Xt+1,j = fj∗ (Xt ) + wt+1,j , where wt+1,j is the noise chosen from a uniform distribution on the interval [−0.4, 0.4] and fj∗ is the signal function, which means that the log-partition function Z(.) is the standard quadratic Z(x) = 12 x2 and the sufficient statistic ϕ(x) = x. The signal function fj∗ is assigned in two steps to ensure that the Markov chain mixes and we incorporate sparsity. In the first step, we define sparsity parameters {sj }dj=1 all to be 3 (for convenience) and set up a d by d sparse matrix A∗ , which has 3 non-zero off-diagonal values on each row drawn from a 1 1 uniform distribution on the interval [− 2s , 2s ] and all 1 on diagonals. In the second step, given a polynomial order parameter r, we map each value Xt,k in vector Xt to (Φ1 (Xt,k ), Φ2 (Xt,k ), ..., Φr (Xt,k )) in Rr space, xi i! for any i in {1, 2, .., r}. We then randomly generate standardized vectors (b1j,k , b2j,k , b3j,k ) P P for every (j, k) in {1, 2, ..., d}2 and define fj∗ as fj∗ (Xt ) = dk=1 A∗j,k ( ri=1 bij,k Φi (Xt,k )). The tuning p parameter λT is chosen to be 3 log(dr)/T following the theory. We focus on polynomial kernels for where Φi (x) = which we have theoretical guarantees in Lemma 1 and Corollary 1 since the “SAM” package is suited to polynomial basis functions. 17 −4.5 0.006 −5 MSE log(MSE) 0.005 −5.5 0.004 0.003 −6 d −6.5 4.38 8 128 r 1 2 Time r 3 120 200 0.002 4.79 5.08 5.3 3 5.48 4 5 6 1 2 3 7 log2(Dimension d) log(Time T) (a) log(MSE) vs. log(Time T) (b) MSE vs. log(Dimension d) Figure 1: (a) shows the logarithm of MSE over a range of log T values, from 80 to 240 under the regression setting. (b) shows the MSE over a range of log d values, from 8 to 128 under the regression setting. In all plots the mean value of 100 trials is shown, with error bars denoting the 90% confidence interval for plot (a). For plot (b), we also have error bars results but we do not show them for the cleanness of the plot. The simulation is repeated 100 times with 5 different values of d (d = 8, 16, 32, 64, 128), 5 different numbers of time points (T = 80, 120, 160, 200, 240), and 3 different polynomial order parameters (r = 1, 2, 3) for each repetition. These design choices are made to ensure the sequence (Xt )Tt=0 is stable and mixes. Other experimental settings were also run with similar results. We present the mean squared error (MSE) of our estimates in Fig. 1. Since we select r values from the same vector (b1j,k , b2j,k , b3j,k ) for all polynomial order parameters, the MSE for different r is comparable and will be higher for larger r because of stronger absolute signal value. In Fig. 1(a), we see that MSE decreases in the rate between T −1 and T −0.5 for all combinations of r and d. For larger d, MSE is larger and the rate becomes slower. In Fig. 1(b), we see that MSE increases slightly faster than the log d rate for all combinations of r and T which is consistent with Theorem 1 and Corollary 1. Similarly we consider the Poisson link function and Poisson process for modeling count data. Given an initial vector X0 , samples are generated consecutively using the equation Xt+1,j ∼ Poisson(exp(fj∗ (Xt ))), where fj∗ is the signal function. The signal function fj∗ is again assigned in two steps to ensure the Poisson Markov process mixes. In the first step, we define sparsity parameters {sj }dj=1 all to be 3 and set up a d by d sparse matrix A∗ , which has 3 non-zero values on each row set to be −2 (this choice ensures the process mixes). In the second step given a polynomial order parameter r, we map each value Xt,k in vector Xt to (Φ1 (Xt,k ), Φ2 (Xt,k ), ..., Φr (Xt,k )) in Rr , where Φi (x) = xi i! for any i in {1, 2, .., r}. We then randomly generate standardized vectors for every (j, k) in {1, 2, ..., d}2 and define fj∗ as fj∗ (Xt ) = Pd P √ √ r ∗ i k=1 Aj,k ( i=1 bj,k Φi (Xt,k )). The tuning parameter λT is chosen to be 1.3(log d log T )( r/ T ). The (b1j,k , b2j,k , b3j,k ) simulation is repeated 100 times with 5 different numbers of time series (d = 8, 16, 32, 64, 128), 5 different numbers of time points (T = 80, 120, 160, 200, 240) and 3 different polynomial order parameters (r = 18 −2.0 0.08 MSE log(MSE) −2.5 0.06 −3.0 −3.5 −4.0 0.04 d 8 128 r Time r 1 2 4.38 120 200 3 0.02 4.79 5.08 5.3 3 5.48 4 5 6 1 2 3 7 log2(Dimension d) log(Time T) (a) log(MSE) vs. log(Time T) (b) MSE vs. log(Dimension d) Figure 2: (a) shows the logarithm of MSE behavior over a range of log T values, from 80 to 240 for the Poisson process. (b) shows the MSE behavior over a range of log d values, from 8 to 128 for the Poisson process. In all plots the mean value of 100 trials is shown, with error bars denoting the 90% confidence interval for plot (a). For plot (b), we also have error bars results but we do not show them for the cleanness of the plot. 1, 2, 3) for each repetition. These design choices are made to ensure the sequence (Xt )Tt=0 mixes. Other experimental settings were also considered with similar results, but are not included due to space constraints. We present the mean squared error (MSE) of our estimations in Fig. 2. Since we select r values from the same vector (b1j,k , b2j,k , b3j,k ) for all polynomial order parameters, the MSE tends to be higher for larger r because the process has larger variance. In Fig. 2 (a), we see that MSE decreases in the rate between T −1 and T −0.5 for all combinations of r and d. For larger d, MSE is larger and the rate becomes slower. In Fig. 2 (b), we see that MSE increases slightly faster than the log(d) rate for all combinations of r and T which is consistent with our theory. 6.2 Chicago crime data We now evaluate the performance of the SpAM framework on a Chicago crime dataset to model incidents of severe crime in different community areas of Chicago. 1 . We are interested in predicting the number of homicide and battery (severe crime) events every two days for 76 community areas over a two month period. The recorded time period is April 15, 2012 to April 14, 2014 as our training set and we choose the data from April 15, 2014 to June 14, 2014 to be our test data. In other words, we consider dimension d = 76 and time range T = 365 for training set and T = 30 for the test set. Though the dataset has records from 2001, we do not use all previous data to be our training set since we do not have stationarity over a longer period. 1 This dataset reflects reported incidents of crime that occurred in the City of Chicago from 2001 to present. Data is extracted from the Chicago Police Department’s CLEAR (Citizen Law Enforcement Analysis and Reporting) system https://data. cityofchicago.org 19 We choose a 2 month test set for the same reason. We choose time horizon to be two days so that number of crimes is counted over each two days. Since we are modeling counts, we use the Poisson GLM and the exponential link Z(x) = ex . We apply the “SAM” package for this task using B-spline as our basis. The degrees of freedom r are set to 1, 2, 3 or 4, where 1 means that we only use linear basis. In the first part of the experiment, we choose the tuning parameter λT using 3-cross validation; the validation pairs are chosen as 60 days back (i.e., February 15, 2012 to February 14, 2014 as the training set and February 15, 2014 to April 14, 2014 as the testing set), 120 days back and 180 days back from April 15, 2012 and April 15, 2014 but with the same time range as the training set and test set. Then we test SpAM with this choice of λT . The performance of the model is measured by Pearson chi-square statistic, which is defined as 29 1 X (Xt+1,j − fˆj (Xt ))2 30 fˆj (Xt ) t=0 on the 30 test points for the j th community area. The Pearson chi-square statistic is commonly used as the goodness-of-fit measure for discrete observations [18]. In Fig. 3, we show a box plot for the test loss on 17 non-trivial community areas, where “trivial” means that the number of crimes in the area follows a Poisson distribution with constant rate, which tells us that there is no relation between that area and other areas and no relation between different time. From Fig. 3, we can see that as basis become more complex from linear to B-spline with 4 degrees of freedom, the performance of fitting is gradually (although not majorly) improved. The main benefit of using higher-order (non-parametric) basis is revealed in Fig. 4 where we pick two community areas and plot the λT path performance for every r in Fig. 4. In the examples of two community areas shown in Fig. 4, we can see that the non-parametric SpAM has a lower test loss than linear model (r = 1). For community area 34, when r is set to be 3 and 4, the SpAM model discovers meaningful influences of other community areas on that area while the model with r equal to 1 or 2 choose a constant Poisson process as the best fitting. A similar conclusion holds for community area 56. Here r = 1 corresponds to the parametric model in [16]. Finally, we present a visualization of the estimated network for the Chicago crime data. Since the estimated model is a network, the sparse patterns can be represented as an adjacency matrix where 1 in the ith row and j th column means that the ith community area has influence on the j th community area and 0 means no effect. Given the adjacency matrix, we can use spectral clustering to generate clusters for different polynomial order r’s used in SpAM model, which are shown in Figs. 5 (a) and (b). For each case, even the location information is not used in learning at all, we find that the close community areas are clustered together. We see that the patterns from the non-parametric model (r = 3) is different from the parametric generalized linear model (r = 1) and they seem more smooth. It tells us that the non-parametric model proposed in this work can help us to discover additional patterns beyond the linear model. Even in other tasks, the clusters cannot represent the location information very well. In [3, 41], the authors proposed a covariate-assisted method to deal with this problem, which applies spectral clustering on L + λX T X, 20 Pearson statistics 0.8 0.7 r 0.6 1 2 3 4 0.5 0.4 1 2 3 4 r Figure 3: The boxplot shows the performance of SpAM on crime data measured by Pearson statistic for r = 1, 2, 3, 4-degrees of freedom in B-spline basis. Pearson statistic loss 1 2 0.65 3 4 r Pearson statistic loss r 0.70 0.75 1 2 3 4 0.70 0.60 0.65 0.55 0.60 1 2 3 0 log(λT) 1 2 log(λT) (a) Performance on community area 34 (b) Performance on community area 56 Figure 4: (a) shows the Pearson statistic loss on the number of crimes in community area 34. (b) shows the Pearson statistic loss on the number of crimes in community area 56. where L is the adjacency matrix, X are the covariates (latitude and longitude in our case), and λ is a tuning parameter. By using location information as the assisted covariate in spectral clustering, we obtain results in Fig. 5 (c)(d). Since the location information is used, we see in both cases that community areas are almost clustered in four groups based on location information. Again, we find that the patterns from non-parametric 21 model is different from the linear model and the separation between clusters is slightly clearer. 41.9 41.9 Latitude 42.0 Latitude 42.0 41.8 41.8 cluster 41.7 1 2 cluster 3 4 −87.9 1 2 41.7 −87.8 −87.7 −87.6 3 4 −87.9 −87.8 Longitude (a) r = 3 −87.6 (b) r = 1 41.9 41.9 Latitude 42.0 Latitude 42.0 41.8 41.8 cluster 41.7 −87.7 Longitude 1 2 cluster 3 4 −87.9 41.7 −87.8 −87.7 −87.6 1 2 3 4 −87.9 Longitude −87.8 −87.7 −87.6 Longitude (c) r = 3 using location information (d) r = 1 using location information Figure 5: (a) shows the clusters given by spectral clustering using the adjacency matrix from SpAM with polynomial order r = 3, (b) shows the clusters when polynomial order r = 1. To derive clusters in (c), compared to (a), we add location information to the adjacency matrix for r = 3. Similarly, we get clusters in (d) using location information compared to (b) for r = 1. 7 Acknowledgement This work is partially supported by NSF-DMS 1407028, ARO W911NF-17-1-0357, NGA HM0476-17-12003, NSF-DMS 1308877. 22 References [1] Y. Aı̈t-Sahalia, J. Cacho-Diaz, and R. J. A. Laeven. Modeling financial contagion using mutually exciting jump processes. Technical report, National Bureau of Economic Research, 2010. [2] Nachman Aronszajn. Theory of reproducing kernels. Transactions of the American mathematical society, 68(3):337–404, 1950. [3] N Binkiewicz, JT Vogelstein, and K Rohe. Covariate-assisted spectral clustering. Biometrika, 104(2):361–377, 2017. [4] Mikhail Shlemovich Birman and Mikhail Zakharovich Solomyak. Piecewise-polynomial approximations of functions of the classes Wpα . Matematicheskii Sbornik, 115(3):331–355, 1967. [5] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [6] E. N. Brown, R. E. Kass, and P. P. Mitra. Multiple neural spike train data analysis: state-of-the-art and future challenges. Nature neuroscience, 7(5):456–461, 2004. [7] Marine Carrasco and Xiaohong Chen. Mixing and moment properties of various garch and stochastic volatility models. Econometric Theory, 18(1):17–39, 2002. [8] V. Chavez-Demoulin and J. A. McGill. High-frequency financial data modeling using Hawkes processes. Journal of Banking & Finance, 36(12):3415–3426, 2012. [9] M. Ding, CE Schroeder, and X. Wen. Analyzing coherent brain networks with Granger causality. In Conf. Proc. IEEE Eng. Med. Biol. Soc., pages 5916–8, 2011. [10] Paul Doukhan. Mixing: properties and examples. Université de Paris-Sud. Département de Mathématique, 1991. [11] Paul Doukhan. Mixing: properties and examples. Springer-Verlag, 1994. [12] Konstantinos Fokianos, Anders Rahbek, and Dag Tjøstheim. Poisson autoregression. Journal of the American Statistical Association, 104(488):1430–1439, 2009. [13] Konstantinos Fokianos and Dag Tjøstheim. Log-linear Poisson autoregression. Journal of Multivariate Analysis, 102(3):563–578, 2011. [14] Sara A Geer. Empirical Processes in M-estimation, volume 6. Cambridge university press, 2000. [15] Chong Gu. Smoothing spline ANOVA models, volume 297. Springer Science & Business Media, 2013. [16] Eric C Hall, Garvesh Raskutti, and Rebecca Willett. Inference of high-dimensional autoregressive generalized linear models. arXiv preprint arXiv:1605.02693, 2016. 23 [17] Andréas Heinen. Modeling time series count data: an autoregressive conditional Poisson model. Available at SSRN 1117187, 2003. [18] David W Hosmer, Trina Hosmer, Saskia Le Cessie, Stanley Lemeshow, et al. A comparison of goodness-of-fit tests for the logistic regression model. Statistics in medicine, 16(9):965–980, 1997. [19] George Kimeldorf and Grace Wahba. Some results on tchebycheffian spline functions. Journal of mathematical analysis and applications, 33(1):82–95, 1971. [20] V. Koltchinskii and M. Yuan. Sparsity in multiple kernel learning. Annals of Statistics, 38:3660–3695, 2010. [21] Leonid Kontorovich. Measure concentration of strongly mixing processes with applications. PhD thesis, Weizmann Institute of Science, 2007. [22] Leonid Aryeh Kontorovich, Kavita Ramanan, et al. Concentration inequalities for dependent random variables via the martingale method. The Annals of Probability, 36(6):2126–2158, 2008. [23] David S Matteson, Mathew W McLean, Dawn B Woodard, and Shane G Henderson. Forecasting emergency medical service call arrival rates. The Annals of Applied Statistics, pages 1379–1406, 2011. [24] Daniel Mcdonald, Cosma Shalizi, and Mark Schervish. Estimating beta-mixing coefficients. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pages 516–524, 2011. [25] L. Meier, S. van de Geer, and P. Buhlmann. High-dimensional additive modeling. Annals of Statistics, 37:3779–3821, 2009. [26] James Mercer. Functions of positive and negative type, and their connection with the theory of integral equations. Philosophical transactions of the royal society of London. Series A, containing papers of a mathematical or physical character, 209:415–446, 1909. [27] Mehryar Mohri and Afshin Rostamizadeh. Stability bounds for stationary ϕ-mixing and β-mixing processes. Journal of Machine Learning Research, 11(Feb):789–814, 2010. [28] Abdelkader Mokkadem. Mixing properties of arma processes. Stochastic processes and their applications, 29(2):309–315, 1988. [29] Andrew Nobel and Amir Dembo. A note on uniform laws of averages for dependent processes. Statistics & Probability Letters, 17(3):169–172, 1993. 24 [30] Y. Ogata. Seismicity analysis through point-process modeling: A review. Pure and Applied Geophysics, 155(2-4):471–507, 1999. [31] Garvesh Raskutti, Martin J Wainwright, and Bin Yu. Minimax-optimal rates for sparse additive models over kernel classes via convex programming. Journal of Machine Learning Research, 13(Feb):389– 427, 2012. [32] P. Ravikumar, H. Liu, J. Lafferty, and L. Wasserman. SpAM: sparse additive models. Journal of the Royal Statistical Society, Series B, 2010. [33] Tina Hviid Rydberg and Neil Shephard. A modelling framework for the prices and times of trades made on the new york stock exchange. Technical report, Nuffield College, 1999. Working Paper W99-14. [34] Saburou Saitoh. Theory of reproducing kernels and its applications, volume 189. Longman, 1988. [35] Alex J Smola and Bernhard Schölkopf. Learning with kernels. GMD-Forschungszentrum Informationstechnik, 1998. [36] C. J. Stone. Additive regression and other nonparametric models. Annals of Statistics, 13(2):689–705, 1985. [37] Mathukumalli Vidyasagar. A theory of learning and generalization. Springer-Verlag New York, Inc., 2002. [38] Grace Wahba. Spline models for observational data. SIAM, 1990. [39] Howard L Weinert. Reproducing kernel Hilbert spaces: applications in statistical signal processing, volume 25. Hutchinson Ross Pub. Co., 1982. [40] Bin Yu. Rates of convergence for empirical processes of stationary mixing sequences. The Annals of Probability, pages 94–116, 1994. [41] Yilin Zhang, Marie Poux-Berthe, Chris Wells, Karolina Koc-Michalska, and Karl Rohe. Discovering political topics in facebook discussion threads with spectral contextualization. arXiv preprint arXiv:1708.06872, 2017. [42] Tuo Zhao and Han Liu. Sparse additive machine. In AISTATS, pages 1435–1443, 2012. [43] K. Zhou, H. Zha, and L. Song. Learning social infectivity in sparse low-rank networks using multidimensional Hawkes processes. In Proceedings of the 16th International Conference on Artificial Intelligence and Statistics (AISTATS), 2013. 25 8 Appendix In this Appendix, we give the proofs for Theorem 2, the two examples in Subsection 4.3, Theorems 3 and Theorem 4 (which are the key results used in the proof of Theorem 1). Then proofs for other Lemmas are presented in Subsection 8.5. 8.1 Proof of Theorem 2 The outline of this proof is the same as the outline of the proof for Theorem 1. The key difference here is that, given a φ-mixing process with 0.781 ≤ rφ ≤ 2, we are able to derive sharper rates for Theorem 4 and Lemma 5, which result in m = T rφ rφ +2 . For rφ ≤ 2 this rate is sharper since T rφ rφ +2 ≥T rφ −1 rφ . Specifically, using the concentration inequality from [22], we show two Lemmas which give us a larger m than Theorem 4 and Lemma 5. Lemma 6. Define the event ( Bm,T = γm |kfj,k kT − kfj,k k2 | ≤ sup sup 2 j,k fj,k ∈BH (1),kfj,k k2 ≤γm ) . rφ For a stationary φ-mixing process (Xt )Tt=0 with 0.781 ≤ rφ ≤ 2 and m = T rφ +2 , we have P(Bm,T ) ≥ 2 )2 ) where c and c are constants. 1 − c2 exp(−c3 (mγm 2 3 Moreover, on the event Bm,T , for any g ∈ BH (1) with kgk2 ≥ γm , kgk2 3 ≤ kgkT ≤ kgk2 . 2 2 2 Lemma 7. Given properties of γm and δm,j = c4 { sj log(d) m (22) + sj 2m }, we define the event Dm,T = {∀j ∈ [1, 2, ..., d], kgj kT ≥ kgj k2 /2 for all gj ∈ 2Fj with kgj k2 ≥ δm,j }. rφ For a φ-mixing process (Xt )Tt=0 with 0.781 ≤ rφ ≥ 2 and m = T rφ +2 , we have P(Dm,T ) ≥ 1 − 2 ))2 ) where c , c and c are constants. c2 exp(−c3 (m(minj δm,j 2 3 4 Following the outline of the proof for Theorem 1, we replace Theorem 4 and Lemma 5 by Lemma 6 and Lemma 7, which allows us to prove Theorem 2. 8.2 Proofs for Subsection 4.3 Now we give proofs for Lemmas 1 and Lemma 2 for the two examples in Subsection 4.3. 26 Proof for Lemma 1. : Recall our definition of ˜m , by choosing M0 as M0 = ξ, we have that v   r v u M0 u X ∞ u X log(M0 dT ) t Tu t √ log(dT ) 3 min(µi , σ 2 ) min(µi , σ 2 ) + m m i=1 i=M0 +1 v u ξ X log(ξdT ) log(dT ) u t √ min(µi , σ 2 ). =3 m (23) i=1 Since min(µi , σ 2 ) ≤ σ 2 , that equation is upper bounded by r ξ 3σ log(ξdT ) log(dT ). m (24) Since ˜m is the minimal value of σ such that (23) lower than σ 2 , from the upper bound (24) we can show that r ˜m = O ξ log(ξdT )2 m ! . Proof of Lemma 2: Before proving ˜m , we recall the discussion of m [31]. To simplify the discussion, we 1 . That assumption `2α 0 2 `0 , min(µi , σ ) = σ 2 when i < `0 assume that there exists an integer `0 such that σ 2 = doesn’t affect the rate which we’ll get for m . Using the definition of and min(µi , σ 2 ) = µi when i ≥ `0 . Therefore, since µi = (1/i)2α , we have v s r u∞ X 1 1− 1 1 1 u 1 1 2α 2 2 t √ = √ σ 2α . min(µi , σ ) ≤ √ `0 σ + 2α−1 2α − 1 `0 2α − 1 m m m i=1 α Hence m = O(m− 2α+1 ). For ˜m , we still define `0 to be σ 2 = 1 . `2α 0 We require the nuisance parameter M0 ≥ `0 , whose value will be assigned later. Again, using the fact that min(µi , σ 2 ) = σ 2 when i < `0 and min(µi , σ 2 ) = µi when i ≥ `0 and µi = (1/i)2α , we have v   r v u M0 u X ∞ u X u T log(M dT ) t t √0 min(µi , σ 2 ) log(dT ) 3 min(µi , σ 2 ) + m m i=1 i=M0 +1 s !   r s 1 log(M0 dT ) 1 1 1 T 1 1 2− √ ≤ log(dT ) 3 σ α+ − 2α−1 + 2α − 1 `2α−1 m 2α − 1 M02α−1 m M0 0 ! s r s 1 log(M0 dT ) 2α 1 1 T 1 1 √ = log(dT ) 3 + σ 2− α − 2α − 1 2α − 1 M02α−1 m 2α − 1 M02α−1 m   r r r 1 log(M0 dT ) 2α T 1 1  √ ≤ log(dT ) 3 σ 1− 2α + . α− 2α − 1 m 2α − 1 M 12 m 0 27 sq In order to obtain a similar rate as m , we set up the value of M0 such that !1+ T m 1 2α 1 α− 1 M0 2 = √1 . m 1 1 In other words, M0 = m 2α+1 T 2α−1 . After plugging in the value of M0 , we obtain an upper bound r r  4α !  2α+1 2α log(M0 dT ) 1− 1 1 1 √ √ log(dT ) 3 . σ 2α + 2α − 1 2α − 1 m m (25) Compare the upper bound (25) with σ 2 , we obtain α − 2α+1 ˜m = O(m 8.3 (log(M0 dT ) log(dT )) 2α 2α+1  )=O log(dT )2 √ m 2α !  2α+1 . Proof of Theorem 3 We consider single univariate function here and use f to refer each fj,k . Finally, we’ll use union bound to show that the result holds for every j, k. Before presenting the proof, we point out that there exists an equivalent class F, which means that sup f ∈F T T T 1X 1X 1X f (Xt )wt ≤ f (Xt )wt ≤ sup f (Xt )wt . sup √ T kf kH ≤1,kf k2 ≤σ T f ∈ 2F T t=1 t=1 (26) t=1 That function class F is defined as F = {f = ∞ X √ βi µi Φi (x)| i=1 ∞ X   −1 σ2 ≤ 1} where ηi = min 1, . µi ηi βi2 i=1 The equivalence is because of {f |kf kH ≤ 1, kf k2 ≤ σ} = {f = ∞ X ∞ i=1 i=1 P∞ P∞ ∞ X X √ βi2 ≤ 1, βi µi Φi (x)| µi βi2 ≤ σ 2 }, P∞ i=1 P∞ µi 2 µi 2 2 i=1 max(1, σ 2 )βi ≤ 1 ⇒ i=1 βi ≤ 1, i=1 σ 2 βi ≤ 1, and (2) P ∞ µi µi 2 2 i=1 max(1, σ 2 )βi ≤ i=1 (1 + σ 2 )βi ≤ 2. Next, we prove the results (1) P∞ 2 i=1 βi ≤ 1, P∞ ≤1⇒ for f ∈ F. Let’s define n 1X Φi (Xt )wt . Yn = T t=1 Then we have 1 Yn − Yn−1 = Φi (Xn )wn , T 1 E[Yn − Yn−1 |w1 , ..., wn−1 ] = E[Φi (Xn )|w1 , ..., wn−1 ]E[wn ] = 0. T 28 µi 2 i=1 σ 2 βi (27) It tells us that {Yn }Tn=1 is a martingale. Therefore, we are able to use Lemma 4 on Page 20 in [16]. Additionally, given that Φi (.) is bounded by 1 and Assumption 1 for wt , we know that |Yn − Yn−1 | = log(dT ) 1 |Φi (Xn )wn | ≤ . T T In order to use Lemma 4 in [16], we bound the so-called term Mni and hence the so-called summation term Dn in [16], which are n X   log(dT )i , and E (Yt − Yt−1 )i |w1 , ..., wt−1 ≤ n Ti t=1   X %i X %i log(dT )i % log(dT ) i % log(dT )/T Dn = , M ≤ n =n e −1− i! n i! Ti T Mni = i≥2 i≥2 for any nuisance parameter %. That bound on Dn is defined as D̂n . Then using the results from Lemma 4 in [16] that max(E[e%Yn ], E[e−%Yn ]) ≤ eD̂n for a martingale {Yn }Tn=1 and the Markov inequality, we are able to get an upper bound on the desired quantity Yn , that is,  P (|Yn | ≥ y) ≤E[e%|Yn | ]e−%y ≤ E[e%Yn ] + E[e−%Yn ] e−%y ≤ 2eD̂n −%y =2exp(n(e% log(dT )/T − 1 − By setting the nuisance parameter % =  T log(dT )  P (|Yn | ≥ y) ≤ 2exp −nH We can use the fact that H(x) ≥ 3x2 2(x+3) (28) % log(dT ) ) − %y). T yT log( n log(dT ) + 1), that yields the lowest bound Ty n log(dT )  , where H(x) = (1 + x) log(1 + x) − x. for x ≥ 0 to further simplify the bound and get  P (|Yn | ≥ y) ≤ 2exp −3T 2 y 2 2T y log(dT ) + 6n log(dT )2  . Plugging in the definition of Yn , this result means that   n 1X −3T 2 y 2 Φi (Xt )wt ≥ y) ≤ 2exp . P( T 2T y log(dT ) + 6n log(dT )2 t=1 Then by setting n = T , we get   T 1X −3T y 2 P( Φi (Xt )wt ≥ y) ≤ 2exp . T 2y log(dT ) + 6 log(dT )2 (29) t=1 Using union bound, we obtain an upper bound for the supreme over M0 such terms, which is P( sup i=1,2,..,M0   T 1X −3T y 2 Φi (Xt )wt ≥ y) ≤ exp + log(2M0 ) . T 2y log(dT ) + 6 log(dT )2 t=1 29 (30) 1 T We will show next that (30) enables us to bound supf ∈F PT t=1 f (Xt )wt , which is our goal. First, we decompose it into two parts sup f ∈F T 1X f (Xt )wt T t=1 ! T ∞ 1X X √ βi µi Φi (Xt ) wt T t=1 i=1 ! T ∞ X 1X √ Φi (Xt )wt βi µi T t=1 i=1 ! M0 T X 1 1X √ Φi (Xt )wt + P sup βi µi ∞ T ηi β 2 ≤1 T = P sup ∞ i=1 ηi βi2 ≤1 = P sup ∞ i=1 ηi βi2 ≤1 ≤ P sup ∞ i=1 ηi βi2 ≤1 t=1 i=1 i=1 i ∞ X T X √ βi µi ! Φi (Xt )wt . t=1 i=M0 +1 The second part can be easily bounded using Assumption 1 in following ! T ∞ ∞ X X 1 X √ √ sup µ Φ (X )w β ≤ sup βi µi log(dT ). i i t t i P∞ P ∞ ηi β 2 ≤1 T ηi β 2 ≤1 i=1 i t=1 i=M0 +1 i=1 i i=M0 +1 Using Cauchy-Schwarz inequality, this upper bound is further bounded by v v u X u X u ∞ u ∞ µi 2 t t sup η β log(dT ), i i P∞ ηi ηi β 2 ≤1 i=1 i i=M0 +1 i=M0 +1 which is smaller than v u X u ∞ t i=M0 +1 v u X u ∞ µi log(dT ) = t min(µi , σ 2 ) log(dT ). ηi i=M0 +1 1 2 i=1 ηi βi ≤1 T Our next goal is to show that we can bound the first part supP∞ PM0 i=1 βi √ using (30). To bound that, simply using Cauchy-Schwarz inequality, we get ! M0 T X 1X √ βi µi Φi (Xt )wt sup P∞ 2 ≤1 T η β i t=1 i=1 i=1 i v v !2 u M0 u M0 T uX µ uX 1X i t t 2 Φi (Xt )wt ηi βi ≤ P sup ∞ ηi T 2 ≤1 η β i t=1 i=1 i=1 i=1 i v u M0 T uX µi 1X ≤t sup Φi (Xt )wt . ηi i=1,2,..,M0 T t=1 i=1 Using (30), we show that the first part is upper bounded by v u M0 uX t min(µi , σ 2 )y, i=1 30 µi P T t=1 Φi (Xt )wt   + log(M0 ) . Therefore, after combining the bounds P on the two parts, we obtain the upper bound for supf ∈√2F T1 Tt=1 f (Xt )wt , which is with probability at least 1 − exp sup √ f ∈ 2F  −3T y 2 2y log(dT )+6 log(dT )2 v  v u M0 u X T ∞ uX √ u 1X f (Xt )wt ≤ 2 t min(µi , σ 2 )y + t min(µi , σ 2 ) log(dT ) , T t=1 i=1  + log(M0 ) . Further, after applying union bound on √ all (j, k) ∈ {1, 2, ..., d}2 and recalling the connection between {f |kf kH ≤ 1, kf k2 ≤ σ} and 2F, we can   y2 show that with probability at least 1 − exp 2y log(dT−3T + log(M0 ) + 2 log(d) , )+6 log(dT )2 with probability at least 1 − exp sup kfj,k kH ≤1kfj,k k2 ≤σ  i=M0 +1 −3T y 2 2y log(dT )+6 log(dT )2 v  v u M0 u X T ∞ u X X √ u 1 fj,k (Xt )wt,j ≤ 2 t min(µi , σ 2 )y + t min(µi , σ 2 ) log(dT ) , T t=1 i=1 i=M0 +1 for all (j, k) ∈ {1, 2, ..., d}2 and any M0 , y. )) log(dT ) √ , we obtain that, with probability at least 1 − Finally, by setting y = 3 (log(M0 dT T 1 M0 T , T 1X sup fj,k (Xt )wt kfj,k kH ≤1,kfj,k k2 ≤σ T t=1 v   v u M0 u X ∞ u X √ u (log(M dT )) t √0 ≤ 2 log(dT ) 3 min(µi , σ 2 ) . min(µi , σ 2 ) + t T i=1 i=M +1 0 Here, we assumed T ≥ 2, log(M0 dT ) ≥ 1. Our definition of ˜m guarantees that, if σ > ˜m , then v   v u M0 r u X ∞ u X √ √ u (log(M0 dT )) t m 2 2 2 t   √ 2 log(dT ) 3 min(µi , σ ) ≤ 2 σ . min(µi , σ ) + T T i=1 i=M +1 0 That completes our proof for Theorem 3. 8.4 Proof of Theorem 4 Since we have kfj,k k∞ ≤ 1, it suffices to bound P sup sup j,k fj,k ∈BH (1),kfj,k k2 ≤γm |kfj,k k2T − kfj,k k22 | γ2 ≥ m 4 ! . The proofs are based on the result for independent case from Lemma 7 in [31], which shows that there exists constants (c̃1 , c̃2 ) such that m P0 γ2 1 X 2 sup sup | fj,k (X̃t ) − kfj,k k22 | ≥ m 10 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m t=1 31 ! 2 ≤ c̃1 exp(−c̃2 mγm ), (31) where {X̃t }m t=1 are i.i.d drawn from the stationary distribution of Xt denoted by P0 . Let T = m`. We divide the stationary T -sequence XT = (X1 , X2 , ..., XT ) into m blocks of length `. We use Xa,b to refer the b-th variable in block a. Therefore, we can rewrite T 1X 2 γ2 P sup sup | fj,k (Xt ) − kfj,k k22 | ≥ m 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm T ! t=1 as ` m 1X 1 X 2 γ2 P sup sup | fj,k (Xa,b ) − kfj,k k22 | ≥ m 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm ` b=1 m a=1 P P Using the fact that sup | ..| ≤ sup |..|, (32) is smaller than P ` m b=1 a=1 1X 1 X 2 γ2 sup sup | fj,k (Xa,b ) − kfj,k k22 | ≥ m ` 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m which, by using the fact that P ( 1` P` ≥ c) ≤ P (∪`i=1 (ai ≥ c)) ≤ ! . (32) ! , P` ≥ c), is bounded by ! ` m 2 X 1 X 2 γm 2 | P sup sup fj,k (Xa,b ) − kfj,k k2 | ≥ . 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m i=1 ai i=1 P (ai a=1 b=1 Using the fact that the process is stationary, it is equivalent to m 1 X 2 γ2 | sup fj,k (Xa,` ) − kfj,k k22 | ≥ m `P sup 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m ! . (33) a=1 Our next steps are trying to bound the non-trivial part in (33). Because of Lemma 2 in [29], we can replace {Xa,l }m a=1 by their independent copies under probability measure P0 with a sacrifice of mβ(`). Then we are able to use (31) to bound the remaining probability. First, using Lemma 2 in [29], we have ! m 2 1 X 2 γm 2 | P sup sup fj,k (Xa,` ) − kfj,k k2 | ≥ 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m a=1 ! m 2 1 X 2 γ | ≤ P0 sup sup fj,k (Xa,` ) − kfj,k k22 | ≥ m + mβ(`). 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m a=1 Now, using (31), it is bounded by 2 c̃1 exp(2 log(d) − c̃2 mγm ) + mβ(`). Therefore, we get T γ2 1X 2 fj,k (Xt ) − kfj,k k22 | ≥ m P sup sup | 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm T ! t=1 m 1 X 2 γ2 ≤ `P sup sup | fj,k (Xa,` ) − kfj,k k22 | ≥ m 4 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m a=1 ≤ `c̃1 exp(2 log(d) − 2 c̃2 mγm ) + T β(`). 32 ! Recall that ` = T /m and the definition of β(`), which is equal to `−rβ , that bound hence is c̃1 exp(2 log(dT ) − 2 c̃2 mγm )  +T T m −rβ . c0 rβ −1 2 ≥ c2 log(dT ) and m = T c0 rβ , hence that probability is Recall our definition of γm with mγm 1    1−c − c 0 2 0 c̃3 exp(−c̃4 mγm ) + T , for some constants c̃3 and c̃4 . That completes the proof. For the follow-up statement, condition on the event g is in BH (1) and khk2 ≤ γm . Therefore, Bm,T , for any g ∈ BH (1) with kgk2 ≥ γm , we have h = γm kgk 2 we have g g γm kT − kγm k2 ≤ , kgk2 kgk2 2 kγm which implies 8.5 1 |kgkT − kgk2 | ≤ kgk2 . 2 Other proofs Proof of Lemma 3. The statement which we want to show is equivalent to T √ 1X fj,k (Xt )wt,j | ≤ 4 2kfj,k kH | T t=1 r kfj,k kT m 2 (γ̃ + γ̃m ) T m kfj,k kH (34) for any fj,k ∈ H, for any (j, k) ∈ [1, 2, ..., d]2 . For each j, k, we define ZT,j,k (w; `) := | T 1X fj,k (Xt )wt,j |. kfj,k kT ≤`,kfj,k kH ≤1 T sup t=1 We claim that on event Am,T ∩ Bm,T , √ ZT,j,k (w; `) ≤ 4 2 r m 2 (γ̃ + γ̃m `) for any (j, k) ∈ [1, 2, ..., d]2 . T m (35) We give the proof in following. Proof. Based on the sandwich inequality in Theorem 4, for any g ∈ BH (1), any σ ≥ γm , when kgk2 ≥ 2σ ≥ γm , kgkT ≥ kgk2 2 ≥ σ. Therefore, For any σ ≥ γm , if kgkT ≤ σ then kgk2 ≤ 2σ. 33 (36) Using this fact, we proceed the proof in two cases. Case 1: If ` ≤ γ̃m , then ZT,j,k (w; `) = | T 1X fj,k (Xt )wt,j | kfj,k kT ≤`,kfj,k kH ≤1 T sup t=1 ≤| 1 T kfj,k kT ≤γ̃m ,kfj,k kH ≤1 sup T X fj,k (Xt )wt,j |. t=1 Since γ̃m ≥ γm , using the fact (36), we get T 1X ZT,j,k (w; `) ≤ | sup fj,k (Xt )wt,j |. kfj,k k2 ≤2γ̃m ,kfj,k kH ≤1 T t=1 Further, since γ̃m ≥ ˜m , we are able to use Theorem 3 and show that r √ m 2 ZT,j,k (w; `) ≤ 4 2 γ̃ . T m Case 2: If ` ≥ γ̃m , we use scaling on f to transform it to Case 1, hence we can show a bound in following. T 1X ZT,j,k (w; `) = | sup fj,k (Xt )wt,j | kfj,k kT ≤`,kfj,k kH ≤1 T =| ` γ̃m t=1 T X sup k γ̃m fj,k kT ≤γ̃m ,k γ̃m fj,k kH ≤ γ̃m ` ` ` 1 T t=1 γ̃m fj,k (Xt )wt,j | ` T 1X˜ fj,k (Xt )wt,j | kf˜j,k kT ≤γ̃m ,kf˜j,k kH ≤1 T t=1 r √ m ≤4 2 `γ̃m . T ≤| ` γ̃m sup Therefore, statement (35) is true. 0 , we can assume kf 0 k = Next, we use proof by contradiction to prove (34). If (34) fails for a function fj,k j,k H 1, otherwise, statement also fails for 0 fj,k . 0 kfj,k kH T √ 1X 0 fj,k (Xt )wt,j ≥ 4 2 T r t=1 0 k . Now kf 0 k ≤ `, kf 0 k ≤ 1, but Then we let ` = kfj,k T j,k T j,k H √ m 2 0 0 (γ̃m kfj,k kH + γ̃m kfj,k kT ) = 4 2 T r m 2 (γ̃ + γ̃m `), T m which contradicts (35). Therefore, (34) is true. Proof of Lemma 4. First, using Theorem 4, on event Bm,T for any (j, k) ∈ [1, 2, ..., d]2 , kfj,k kT ≤ kfj,k k2 + γm for all fj,k ∈ BH (1) and kfj,k k2 ≤ γm . 2 34 (37) On the other hand, if kfj,k k2 > γm , then the sandwich relation in Theorem 4 implies that kfj,k kT ≤ 2kfj,k k2 . Therefore, we have kfj,k kT ≤ 2kfj,k k2 + γm for all fj,k ∈ BH (1). 2 The proof is completed by noticing gj,k = 2fj,k . Proof of Lemma 5. First, we point out that we only need to show that kgj kT ≥ δm,j /2 for all gj ∈ 2Fj with kgj k2 = δm,j , because if kgj k2 ≥ δm,j , we can scale gj to δm,j kgj k2 gj , which belongs to 2Fj as well since δm,j kgj k2 < 1. We choose a truncation level τ > 0 and define the function `τ (u) = { u2 if |u| ≤ τ τ2 otherwise Since u2 ≥ `τ (u) for all u ∈ R, we have T T 1X 2 1X gj (Xt ) ≥ `τ (gj (Xt )). T T t=1 t=1 The remainder of the proof consists of the following steps: (1) First, we show that for all gj ∈ 2F with kgj k = δm,j , we have 2 δm,j 1 E[`τ (gj (x))] ≥ E[gj2 (x)] = . 2 2 (2) Next we prove that sup gj ∈2Fj ,kgj k2 ≤δm,j | T 2 δm,j 1X `τ (gj (Xt )) − E[`τ (g(Xt ))]| ≤ , T 4 (38) t=1 with high probability for β mixing process with r ≥ 1/c0 . Putting together the pieces, we conclude that for any gj ∈ Fj with kgj k2 = δm,j , we have T T 2 2 2 δm,j δm,j δm,j 1X 2 1X gj (Xt ) ≥ `τ (gj (Xt )) ≥ − = , T T 2 4 4 t=1 t=1 with high probability (to be specified later). This shows that event Dm,T holds with high probability, thereby completing the proof. It remains to establish the claims. Part 1. Establishing the lower bound for E[`τ (gj (x))]: 35 Proof. We can not use the same proofs as in the independent case from [31], since each element from the multivariate variable x = (x1 , ..., xd ) is not independent from others in the stationary distribution. That is the reason why we need to have Assumption 4. In the independent case, Assumption 4 is shown to be true in [31]. Note that gj (x) = X gj,k (xj ), k∈U for a subset U of cardinality at most 2sj , we have 2 E[`τ (gj (x))] ≥ E[gj2 (x)I[|gj (x)| ≤ τ ]] = δm,j − E[gj2 (x)I[|gj (x)| ≥ τ ]]. Using Cauchy-Schwarz inequality and Markov inequality, we can show that 2 δm,j . τ2 √ = CE[gj2 (x)] given by Assumption 4, by choosing τ ≥ 2 C, we are able to show (E[gj2 (x)I[|gj (x)| ≥ τ ]])2 ≤ E[gj4 (x)]P (|gj (x)| ≥ τ ) ≤ E[gj4 (x)] 2 Since E[gj4 (x)] ≤ Cδm,j that 2 δm,j 1 E[`τ (gj (x))] ≥ E[gj2 (x)] = . 2 2 Part 2. Establishing the probability bound on | sup gj ∈2Fj ,kgj k2 ≤δm,j T 2 δm,j 1X `τ (gj (Xt )) − E[`τ (gj (X1 ))]| ≤ . T 4 t=1 Proof. Similar as the proof of Lemma. 3, we base our proof on the independent result from Lemma 4 in [31], which is m 2 δm,j 1 X 2 | P0 ( sup `τ (g(Xa )) − E[`τ (g(X1 ))]| ≥ ) ≤ c̃1 exp(−c̃2 mδm,j ). 12 gj ∈2Fj ,kgj k2 ≤δm,j m a=1 We let T = m`. Using the same facts and results as in the proof for Theorem 4, we have P( sup gj ∈2Fj ,kgj k2 ≤δm,j | T 2 δm,j 1X ) `τ (gj (Xt )) − E[`τ (gj (X1 ))]| ≥ T 4 t=1 ` m 2 δm,j 1X 1 X = P( sup | `τ (gj (Xa,b )) − E[`τ (g(Xa,1 ))]| ≥ ) m 4 gj ∈2Fj ,kgj k2 ≤δm,j ` b=1 a=1 m 2 δm,j 1 X ≤ `P0 ( sup | `τ (gj (Xa,` )) − E[`τ (g(Xa,` ))]| ≥ ) + T β(`). 4 gj ∈2Fj ,kgj k2 ≤δm,j m a=1 Using (39), we conclude that it is upper bounded by 2 `c̃1 exp(−c̃2 mδm,j ) + T( 2 )+T which is then upper bounded by c̃3 exp(−c̃4 mδm,j 36 − 1−c0 c0 T −rβ ) , m for constants c̃3 , c̃4 . (39) Now, we proved that all claims are correct. Therefore, we complete the proof. Proof of Lemma 6. For φ-mixing process with 0.781 ≤ φ ≤ 2, we can use the concentration inequality from [22] to show sharper rate in Lemma 6 than Theorem 4. That concentration inequality is presented in following. Lemma 8 (McDirmaid inequality in [22, 27]). Suppose S is a countable space, FS is the set of all subsets of Sn , Q is a probability measure on (Sn , FS ) and g : Sn → R is a c-Lipschitz function (with respect to the Hamming metric) on Sn for some c > 0. Then for any y > 0, y2 P(|g(X) − Eg(X)| ≥ y) ≤ 2exp − Pn−1 φ(`))2 2nc2 (1 + 2 `=1 ! . Its original version is for discrete space, which is then generalized to continuous case in [21]. Here, we use its special form for the φ-mixing process which is pointed out in [21] and [27]. For our statement, as pointed out in the proof for Theorem 4, since we have kfj,k k∞ ≤ 1, it suffices to bound P sup sup j,k fj,k ∈BH (1),kfj,k k2 ≤γm |kfj,k k2T − kfj,k k22 | γ2 ≥ m 4 ! . (40) The proofs are based on independent result from Lemma 7 in [31], which shows that there exists constants (c̃1 , c̃2 ) such that m P0 γ2 1 X 2 | fj,k (X̃t ) − kfj,k k22 | ≥ m sup sup 10 j,k fj,k ∈BH (1),kfj,k k2 ≤γm m ! 2 ≤ c̃1 exp(−c̃2 mγm ), t=1 where {X̃t }m t=1 are i.i.d drawn from the stationary distribution of Xt denoted by P0 . Now, we can use Lemma 8 to show the sharper rate. Recall that kfj,k k∞ ≤ 1, we define g(X) = sup fj,k ∈BH (1),kfj,k k2 ≤γm |kfj,k k2T − kfj,k k22 |. Then, |g(X) − g(Y )| ≤ sup fj,k ∈BH (1),kfj,k k2 ≤γm | T T 1X 1X 1 fj,k (Xt )2 − fj,k (Yt )2 | ≤ distHM (X, Y ), T T T t=1 t=1 where distHM (X, Y ) means the Hamming metric between X and Y , which equals to how many paired elements are different between X and Y . Thus, we know that g(X) is 1 T -Lipschitz with respect to the Hamming metric. Therefore, using Lemma 8, we show that P(|g(X) − Eg(X)| ≥ 2 4 γm T γm ) ≤ 2exp(− ). PT −1 8 128(1 + 2 `=1 φ(`))2 4 )). If Using the fact that φ(`) = `−rφ , we show that probability is bounded by O(exp(− min(T 2rφ −1 , T )γm 4 )). Since 0.781 ≤ we use union bound on d2 terms, that is at most O(exp(2 log(d) − min(T 2rφ −1 , T )γm 37 rφ ≤ 2, we show that rφ +2 rφ 4 T 2rφ −1 γm rφ +2 4 = Ω(m2 γ 4 ) and T γ 4 = (m rφ )γ 4 = Ω(m2 γ 4 ). = (m )2rφ −1 γm m m m m 2 2 at most c2 exp(−c3 (mγm ) ) for some constants (c2 , c3 ). 2 to show that Eg(X) ≤ γ8m . In other words, we need to show that for sufficient Therefore, the probability is The remaining proof is then large m, T γ2 1X 2 fj,k (Xt ) − kfj,k k22 | ≤ m T 8 | sup E fj,k ∈BH (1),kfj,k k2 ≤γm (41) t=1 First, we use the same fact and results as in the proof for Theorem 4 to show that | sup E[ fj,k ∈BH (1),kfj,k k2 ≤γm T 1X 2 fj,k (Xt ) − kfj,k k22 |] T t=1 ` m b=1 a=1 1X 1 X 2 = E[ sup | fj,k (Xa,b ) − kfj,k k22 |] m fj,k ∈BH (1),kfj,k k2 ≤γm ` ≤ 1 ` ` X m | sup E[ fj,k ∈BH (1),kfj,k k2 ≤γm b=1 1 X 2 fj,k (Xa,b ) − kfj,k k22 |] m a=1 m 1 X 2 | = E[ sup fj,k (Xa,` ) − kfj,k k22 |]. fj,k ∈BH (1),kfj,k k2 ≤γm m a=1 Using the fact that E[Z] = E[ZI(Z ≤ δ)] + E[ZI(Z ≥ δ)] ≤ δ + kZk∞ P(Z ≥ δ) and kfj,k k∞ ≤ 1, we show an upper bound m 1 X 2 | δ + 2P( sup fj,k (Xa,` ) − kfj,k k22 | ≥ δ) for any δ > 0. m fj,k ∈BH (1),kfj,k k2 ≤γm a=1 As in the proof of Theorem 4, we use Lemma 2 in [29] to connect the dependence probability with independence probability, which gives us δ + 2P( sup fj,k ∈BH (1),kfj,k k2 ≤γm ≤ δ + mφ(`) + P0 ( |kfj,k k2m − kfj,k k22 | ≥ δ) sup fj,k ∈BH (1),kfj,k k2 ≤t We choose δ to be 2 γm 10 , |kfj,k k2m − kfj,k k22 | ≥ δ). then using (40), we have the upper bound 2 γm γ2 γ2 2 + mφ(`) + P0 ( sup |kf k2m − kf k22 | ≥ m ) ≤ m + mφ(`) + c̃1 exp(−c̃2 mγm ). 10 10 10 f ∈BH (1),kf k2 ≤t 2 = Ω(− log(γ )), which is the same as [31]. Based on our assumptions, mφ(`) = We require mγm m 2 ) since mγ 2 → ∞ as m → ∞. Therefore, for sufficiently large m, that m(m2/rφ )−rφ = m−1 = o(γm m expectation is bounded by 2 γm 8 . That completes the proof. 38 For the follow-up statement, condition on event Bm,T , for any gj,k ∈ BH (1) with kgj,k k2 ≥ γm , we have g j,k hj,k = γm kgj,k k2 is in BH (1) and khj,k k2 ≤ γm . Therefore, we have kγm which implies gj,k gj,k γm kT − kγm k2 ≤ , kgj,k k2 kgj,k k2 2 1 |kgj,k kT − kgj,k k2 | ≤ kgj,k k2 . 2 Proof of Lemma 7. We follow the outline of proof for Lemma 5. The only difference is here is the proof for showing | sup gj ∈2Fj ,kgj k2 ≤δm,j T 2 δm,j 1X `τ (gj (Xt )) − E[`τ (g(Xt ))]| ≤ , T 4 t=1 with high probability for φ mixing process with 0.781 ≤ r ≤ 2. To show that, we use Lemma 8 as in the proof of Lemma 6 and define h(X) = | sup gj ∈2Fj ,kgj k2 ≤δm,j T 1X `τ (gj (Xt )) − E[`τ (gj (X1 ))]|. T t=1 We have T 1X τ2 |h(X) − h(Y )| ≤ sup | (`τ (gj (Xt )) − `τ (gj (Yt )))| ≤ distHM (X, Y ), T gj ∈2Fj ,kgj k2 ≤δm,j T t=1 which give us P(|h(X) − Eh(X)| ≥ 2 4 δm,j δm,j 2 ) ≤ O(exp(− min(T 2rφ −1 , T ) 4 )) ≤ c2 exp(−c3 (mδm,j )2 ), 8 τ following the same analyses as in the proof of Lemma 6. As in the proof of Lemma 6, we then need to show that for sufficient large m, E sup gj ∈2Fj ,kgj k2 ≤δm,j | T 2 δm,j 1X `τ (gj (Xt )) − E[`τ (gj (X))]| ≤ . T 8 t=1 Using the same facts and results as we mentioned in the proof of Theorem 4 and Lemma 6, we show the 39 upper bound in following. T 1X `τ (gj (Xt )) − E[`τ (gj (X1 ))]| E sup | gj ∈2Fj ,kgj k2 ≤δm,j T t=1 m ≤E | sup gj ∈2Fj ,kgj k2 ≤δm,j 1 X `τ (gj (Xa,` )) − E[`τ (gj (Xa,` ))]| m a=1 m ≤ δ + 2τ 2 P ( | sup gj ∈2Fj ,kgj k2 ≤δm,j 1 X `τ (gj (Xa,` )) − E[`τ (gj (X))]| ≥ δ) m a=1 m ≤ δ + 2τ 2 mφ(`) + 2τ 2 P0 ( sup gj ∈2Fj ,kgj k2 ≤δm,j ≤ ≤ 2 δm,j 12 2 δm,j 12 + 2τ 2 mφ(`) + 2τ 2 P0 ( | 1 X `τ (gj (Xa,` )) − E[`τ (gj (X))]| ≥ δ) m | sup gj ∈2Fj ,kgj k2 ≤δm a=1 m X 1 m a=1 `τ (gj (Xa,` )) − E[`τ (gj (X))]| ≥ 2 δm,j ) 12 2 + 2τ 2 mφ(`) + 2τ 2 c̃1 exp−(c̃2 mδm,j ), which is bounded by 2 δm,j 8 for sufficiently large m, using similar arguments as in the proof for Lemma 3. That completes the proof. 40
10math.ST
Deux améliorations concurrentes des PID Two competing improvements of PID controllers: A comparison Michel Fliess1,3 et Cédric Join2,3,4 1 LIX (CNRS, UMR 7161), École polytechnique, 91128 Palaiseau, France, [email protected] CRAN (CNRS, UMR 7039), Université de Lorraine, BP 239, 54506 Vandœuvre-lès-Nancy, France, [email protected] 3 AL.I.E.N. (ALgèbre pour Identification & Estimation Numériques), 7 rue Maurice Barrès, 54330 Vézelise, France, {michel.fliess, cedric.join}@alien-sas.com 4 Projet Non-A, INRIA Lille – Nord-Europe, France 2 arXiv:1801.10399v1 [cs.SY] 31 Jan 2018 RÉSUMÉ. Aujourd’hui, « commande sans modèle », ou « MFC », et « commande par rejet actif de perturbations », ou « ADRC », sont les approches les plus en vue pour préserver les avantages des PID, si populaires dans l’industrie, tout en atténuant leurs carences. Après un bref rappel sur MFC et ADRC, plusieurs exemples démontrent la supériorité du sans-modèle car permettant d’embrasser une classe beaucoup plus vaste de systèmes. ABSTRACT. In today’s literature Model-Free Control, or MFC, and Active Disturbance Rejection Control, or ADRC, are the most prominent approaches in order to keep the benefits of PID controllers, that are so popular in the industrial world, and in the same time for attenuating their severe shortcomings. After a brief review of MFC and ADRC, several examples show the superiority of MFC, which permits to tackle most easily a much wider class of systems. MOTS-CLÉS. PID, commande sans modèle, commande par rejet actif des perturbations, commande par platitude KEYWORDS. PID, model-free control, MFC, active disturbance rejection control, ADRC, flatness-based control 1. Ce que l’esprit voit le cœur le ressent. Malraux (La Condition humaine, Paris : Gallimard, 1933) Introduction On connaît la domination, écrasante dans l’industrie, des correcteurs de type « proportionnel-intégraldérivé », ou « PID » (voir, par exemple, [Åström & Hägglund (2006)], [Åström & Murray (2008)], [O’Dwyer (2009)]). À côté d’avantages aussi considérables que reconnus, singulièrement la simplicité conceptuelle et l’inutilité d’une modélisation mathématique, des manques flagrants conduisant trop souvent à une mise en œuvre pénible et à des performances médiocres. La recherche universitaire, si active en automatique, dite parfois « moderne » depuis plus de cinquante ans, y trouve en bonne part sa motivation. Elle suppose fréquemment une description par équations différentielles ou aux différences. Ses contributions, théoriques et pratiques, sont incontestables (voir, par exemple, [Åström & Murray (2008)], [Åström & Kumar (2014)]). Afin de ne pas trop alourdir cette publication, contentons-nous, ici, de citer deux apports, aux applications aussi nombreuses que diverses : le filtre de Kalman [Kalman (1960), Kalman & Bucy (1961)] et la platitude [Fliess et coll. (1995), Fliess et coll. (1999)]. Durant toutes ces années, on a tenté à maintes reprises, avec, semble-t-il, un succès mitigé jusqu’à récemment, de garder les avantages des PID tout en gommant leurs défauts. Deux voies, plutôt nouvelles, prévalent à l’heure actuelle : 1. la « commande sans modèle » [Fliess & Join (2013)], ou model-free control, désignée ici par MFC, son acronyme anglais ; 2. la « comande par rejet actif de perturbations », ou active disturbance rejection control, désignée c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 1 aussi par son acronyme anglais, ADRC. Cette méthode, issue avant tout des travaux de [Han (2009)] en Chine, a été développée par divers auteurs. Voir, par exemple, — les articles signés par [Aguilar-Ibañez et coll. (2017)], [Feng & Guo (2017)], [Gao (2014)] 1 , [Guo & Zhou (2015)], [Huang & Xue (2014)], [Inoue & Ishida (2016)], [Qi et coll. (2017)], [Madoński & Herman (2015)], [Polóni et coll. (2018)], [Tavasoli & Enjilela (2017)], [Vincent et coll. (2011)], [Wu & coll. (2015)], [Yao & Deng (2017)], [Zhang et coll. (2014)], [Zheng & Gao (2016)]) ; — les livres de [Guo & Zhao (2016)] et [Sira-Ramírez et coll. (2017)]. MFC et ADRC ont permis bien des applications, parfois spectaculaires. Les bibliographies des références plus haut sur l’ADRC en fournissent une liste assez complète. Pour le MFC, renvoyons à la bibliographie de [Fliess & Join (2013)], à [Abouaïssa et coll. (2017a), Abouaïssa et coll. (2017b)] et à leurs références. Des adeptes de l’ADRC ont publié des critiques, aussi vives qu’infondées, contre le MFC (voir, par exemple, [Madoński & Herman (2012)]). L’ignorance totale chez d’autres, comme [Guo & Zhao (2016)], des techniques du MFC aboutit à un exposé partial. Certains, comme [Cortés-Romero et coll. (2017)], effacent l’écart béant les séparant. Cet article use d’un droit de réponse légitime. Il vise à rétablir les faits, en exploitant, après avoir résumé les deux approches, plusieurs exemples académiques 2 . Puisse une discussion ouverte et fructueuse s’ensuivre 3 . Le paragraphe 2 résume MFC et ADRC. On s’y inspire pour l’ADRC du nouveau livre [Sira-Ramírez et coll. (2017)], plus clair. Le suivant exhibe des simulations numériques, qui vont du linéaire au non-linéaire en terminant par une équation aux dérivées partielles. Ils tendent à prouver la supériorité du sans-modèle. La conclusion évoque aussi : 1. l’influence sur la compréhension de questions naturelles ; 2. les retards ; 3. les équations aux dérivées partielles. 2. Les deux approches 2.1. MFC Emploi d’un théorème d’approximation On se restreint, afin de simplifier l’écriture, à un système SISO 4 , c’est-à-dire avec une seule commande u et une seule sortie y. On suppose la « fonctionnelle » correspondant à y, c’est-à-dire la fonction de la 1. Certains auteurs, comme [Gao (2014)], ont voulu faire remonter quelques-uns des principes de l’ADRC plus haut dans le temps, à [Poncelet (1870)] en particulier. 2. Aux lecteurs de comparer les applications concrètes grâce aux références bibliographiques. Une telle évaluation est, dans le cadre de cet article, impossible. 3. L’importance pour l’ADRC de la contribution chinoise est décisive. On doit souligner d’autant plus la grande qualité de maints travaux en Chine sur le MFC (voir, par exemple, [Ticherfatine & Quidam (2017), Wang et coll. (2017), Wang et coll. (2016), Zhang et coll. (2018)]). 4. Acronyme de Single-Input Single-Output. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 2 fonction u, causale, ou non-anticipative : ∀t > 0, y(t) = F (u(τ ) | 0 6 τ 6 t) (1) F dépend — du présent et du passé, mais pas du futur ; — de perturbations variées ; — de conditions initiales en t = 0. Exemple. Populaires en automatique (voir, par exemple, [Lamnabhi-Lagarrigue (1994), Rugh (1981)]) et dans divers domaines des sciences appliquées, les « séries de Volterra » sont des fonctionnelles du type Zt y(t) =h0 (t) + h1 (t, τ )u(τ )dτ + 0 Zt Zt h2 (t, τ2 , τ1 )u(τ2 )u(τ1 )dτ2 dτ1 + . . . 0 0 Zt Zt hν (t, τν , . . . , τ1 )u(τν ) . . . u(τ1 )dτν . . . dτ1 ... 0 0 + ... Elles apparaissent, notamment, comme solutions d’équations différentielles ordinaires assez générales (voir, par exemple, [Lamnabhi-Lagarrigue (1994)], [Rugh (1981)] et [Fliess et coll. (1983)]). On introduit — un compact I ⊂ [0, +∞[ ; — un compact C ⊂ C 0 (I), où C 0 (I) est l’ensemble des fonctions continues I → R, muni de la topologie de la convergence uniforme. Soit S la R-algèbre de Banach des fonctionnelles (1), causales et continues, I × C → R. D’après le théorème de Stone-Weierstraß (voir, par exemple, [Choquet (2000), Rudin (1967)]), toute sous-algèbre, contenant une constante non nulle et séparant les éléments de I × C, est dense dans S. Soit A ⊂ S l’ensemble des fonctionnelles satisfaisant des équations différentielles algébriques du type E(y, ẏ, . . . , y (a) , u, u̇, . . . , u(b) ) = 0 (2) où E est un polynôme à coefficients réels. Selon [Fliess & Join (2013)], A est dense dans S. Il est ainsi loisible de supposer que le système considéré est « bien » approché par un système (2). Soit un entier ν, 1 6 ν 6 a, tel que ∂E 6≡ 0 ∂y (ν) D’où, localement, d’après le théorème des fonctions implicites, y (ν) = E(y, ẏ, . . . , y (ν−1) , y (ν+1) , . . . , y (a) , u, u̇, . . . , u(b) ) Il en découle le système « ulta-local » y (ν) = F + αu (3) Souvent, en pratique, on sélectionne ν = 1. Voir [Fliess & Join (2013)] pour une explication. On rencontre parfois ν = 2. Jamais plus. Le praticien choisit α ∈ R tel que les trois termes de (3) aient le même ordre de grandeur. Il en découle qu’une identification précise du paramètre α est sans objet. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 3 PID intelligents Reprenons (3) avec ν = 2. Un « PID intelligent », ou « iPID », est défini par R Fest − ÿ ∗ − KP e − KI e − KD ė u=− α où — y ∗ est la trajectoire de référence ; — e = y − y ∗ est l’erreur de poursuite ; — KP , KI , KD ∈ R sont les gains ; — Fest est une estimée de F . Il vient Z ë = KP e + KI e + KD ė + F − Fest (4) (5) Si l’estimée Fest est « bonne », c’est-à-dire F − Fest w 0, déterminer les gains est immédiat pour obtenir une « bonne » poursuite. C’est un avantage important par rapport aux PID classiques. Si KD = 0, on a un « PI intelligent », ou « iPI », R Fest − ÿ ∗ − KP e − KI e u=− α (6) Si KI = 0, on a un « PD intelligent », ou « iPD », u=− Fest − ÿ ∗ − KP e − KD ė α (7) Avec ν = 1, on aboutit à un « P intelligent », ou « iP », u=− Fest − ÿ ∗ − KP e α (8) C’est le correcteur le plus courant dans la pratique du MFC 5 . La dynamique (5) devient ė = KP e + F − Fest Remarque 1. On démontre [d’Andréa-Novel et coll. (2010), Fliess & Join (2013)] qu’un iP (resp. iPD) est équivalent, en un certain sens, à un PI (resp. PID) classique. On comprend ainsi, sans doute pour la première fois, — l’universalité industrielle des PID, — la difficulté de leur réglage. Remarque 2. Dans tous les exemples MIMO 6 concrets rencontrés jusqu’à présent, on a toujours pu se ramener à des systèmes de type (3) en parallèle ou en cascade. La mise en place des correcteurs intelligents reste donc facile (voir [Bekcheva et coll. (2018), Lafont et coll. (2015), Menhour et coll. (2017)]) 7 . 5. Voir, à ce sujet, [Fliess & Join (2013)] et [Join et coll. (2017)]. 6. Acronyme de Multi-Input Multi-Output. 7. Aucun exemple concret n’a été découvert jusqu’à présent où cette approche est prise en défaut. Le « découplage », qui a suscité une recherche aussi abondante que prolixe en automatique théorique, linéaire ou non, est mis en question. Est-il besoin de rappeler une conclusion analogue [Fliess & Join (2013)] à propos de la « robustesse » ? c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 4 Estimation de F On peut approcher toute fonction [a, b] → R, a, b ∈ R, a < b, intégrable, c’est-à-dire très générale, par une fonction constante par morceaux (voir, par exemple, [Godement (1998)], [Rudin (1976)]). Par utilisation de fenêtres temporelles glissantes, l’estimation de F se ramène ainsi à celle d’une constante Φ. On présente, pour rester court, les calculs dans le cas ν = 1. Les règles du calcul opérationnel (voir, par exemple, [Erdélyi (1962)]) permettent de rééecrire (3) ainsi sY = Φ + αU + y(0) s On élimine la condition initiale y(0) en dérivant les deux membres par Y +s d ds : Φ dU dY =− 2 +α ds s ds On atténue le bruit en multipliant les deux membres par s−2 . La correspondance entre par −t permet de revenir au domaine temporel : 6 Fest (t) = − 3 τ d ds et le produit Zt [(τ − 2σ)y(σ) + ασ(τ − σ)u(σ)] dσ (9) t−τ où — τ > 0 est « petit » par rapport à la constante de temps la plus rapide ; — Fest (t) est la valeur numérique constante sur l’intervalle d’intégration attribuée à F . On obtient (9) en temps réel. On estime F , aussi en temps réel, par une formule différente grâce à (8) :   t Z 1 Fest (t) =  (ẏ ? − αu − KP e) dσ  τ (10) t−τ Après échantillonnage, (9) et (10) deviennent des filtres linéaires. Remarque 3. Au début, on estimait F en utilisant un dérivateur [Mboup et coll. (2009)] de y. Remarque 4. Voir [de Larminat (2009)] et [Carillo & Rotella (2015)] pour d’autres approches de l’estimation. 2.2. ADRC On se conforme à l’usage, contraire à celui du MFC, en présentant l’ADRC par une équation différentielle :   y (n) (t) = f t, y(t), ẏ(t), . . . , y (n−1) (t) + w(t) + a(t, y(t))u(t) (11) où — la fonction a 6= 0 est connue ; — l’ordre de dérivation n > 1 l’est aussi ; c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 5 — la fonction f , appelée, parfois, « perturbation interne », ou « endogène », l’est mal 8 ; — w est une « perturbation externe », ou « exogène ». La some f + w est la « perturbation totale ». En ignorant w, (11) devient :   (n) (n−1) y (t) = f t, y(t), ẏ(t), . . . , y (t) + a(t, y(t))u(t) (12) [Sira-Ramírez et coll. (2011)] a observé que (12) vérifie la propriété de platitude et que la sortie y est plate 9 . Si l’on emploie un « correcteur proportionnel intégral généralisé » [Fliess et coll. (2002)], ou « GPI », le « filtrage plat » (flat filtering), [Sira-Ramírez et coll. (2018)], ou les techniques algébriques d’estimation ([Fliess & Sira-Ramírez (2003), Fliess & Sira-Ramírez (2008), Fliess et coll. (2008)], et [Sira-Ramírez et coll. (2014)]), l’approche de l’ADRC s’en trouve d’autant plus simplifiée ([Cortés-Romero et coll. (2017), Sira-Ramírez et coll. (2017)]). La distance considérable entre la voie prise par Sira-Ramírez, ses collaborateurs et les autres protagonistes de l’ADRC (voir, en particulier, le livre [Guo & Zhao (2016)]) rend messéant, on en conviendra, un résumé plus complet. 3. Éléments de comparaison 3.1. Prolégomènes Posons F = f + w. Avec cette notation de la perturbation totale, (11) devient y (n) = F + au(t) (13) à comparer à (3), si l’on suppose a constant, propriété usuelle, du reste, dans la présentation de l’ADRC : 1. la platitude ne joue aucun rôle en MFC, alors qu’elle est essentielle en ADRC avec, en plus, la nécessité pour y en (12) d’être une sortie plate 10 ; 2. en cas de non-platitude, l’ADRC doit, par, exemple se satisfaire du système linéaire variationnel, ou tangent, qui est plat s’il est commandable (voir [Ramírez-Neria et coll. (2014)], [Sira-Ramírez et coll. (2017)] pour le pendule dit, souvent, de Furuta) ; 3. a en (11)-(12)-(13) est connu, alors qu’α en (3) est ajusté approximativement par l’opérateur 11 ; 4. l’ordre n de dérivation en (11)-(12)-(13) est connu et, donc, imposé, alors que ν en (3) est choisi par l’opérateur avec, toujours jusqu’à présent, une valeur faible, 1 ou 2. D’où la sélection d’exemples ci-dessous : ils n’entrent pas dans le cadre a priori de l’ADRC. 3.2. Un système linéaire Pour un système linéaire stationnaire, de dimension finie, commandabilité et platitude sont équivalentes [Fliess et coll. (1995)]. Pour un système SISO, la sortie y est plate si, et seulement si, le numérateur de 8. Cet emploi du mot « perturbation » pour désigner la structure mathématique du système nous semble malheureux. 9. C’est dire, rappelons-le, que u s’exprime comme fonction de y et de ses dérivées jusqu’à un ordre fini. On connaît la richesse de la littérature sur la platitude : voir, par exemple, [Åström & Murray (2008)], [Lévine (2009)], [Rigatos (2015], [Rotella & Zambettakis (2007)], [Rudolph (2003)], [Sira-Ramírez & Agrawal (2004)], et leurs bibliographies. 10. Ce fait est trop souvent ignoré par les tenants de l’ADRC. 11. De façon plus générale, la machinerie pour l’estimation et l’identification semblent moins simple avec l’ARDC. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 6 la fonction de transfert est constant [Fliess & Marquez (2000)]. Considérons donc le système défini par la fonction de transfert à numérateur non constant 12 : (s + 2)2 (s − 2)(s − 1)(s + 1) Ici, un modèle ultralocal du premier ordre est utilisé avec α = Kp = 1. Un bruit additif, blanc, gaussien, centré, d’écart type 0.01, affecte la sortie. Les figures 1 et 2 présentent les résultats avec une période d’échantillonnage de Te = 10ms. La poursuite de la trajectoire de référence y est excellente comme le montre le tracé figure 3. Pour cet exemple, contrairement à ce qui suit, on représente la trajectoire par une courbe de Bézier [Bézier (1986), Risler (1991] qui permet aisément des dérivées nulles en début et en fin. Commande 0.8 0.6 0.4 0.2 0 -0.2 -0.4 0 5 10 15 20 25 30 Time(s) Figure 1.: Commande Sortie 1.2 Sortie Trajectoire 1 0.8 0.6 0.4 0.2 0 -0.2 0 5 10 15 20 25 30 Time(s) Figure 2.: Sortie 12. Ce cas est d’autant plus éloquent qu’une présentation pour ingénieurs de l’ADRC [Herbst (2013)] ne considère que des fonctions de transfert à numérateurs constants. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 7 Erreur de poursuite 0.25 0.2 0.15 0.1 0.05 0 -0.05 -0.1 0 5 10 15 20 25 30 Time(s) Figure 3.: Erreur de poursuite 3.3. Cas non linéaires Cas 1 Avec p ẏ − y = sign(u). |u| on utilise (3) avec ν = 1, α = 0.1, KP = 1. Un bruit additif, gaussien, centré, d’écart-type 0.05, affecte la sortie. Avec une période d’échantillonnage Te = 10ms, les simulations, reportées sur les figures 4, 5 et 6, attestent d’une poursuite de trajectoire irréprochable. Commande 8 6 4 2 0 -2 -4 -6 -8 -10 0 5 10 15 20 25 30 35 40 Time(s) Figure 4.: Commande Cas 2 Avec ÿ − 1.5ẏ − y = (u + u̇)3 c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 8 Sortie Sortie Trajectoire 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 40 30 35 40 Time(s) Figure 5.: Sortie Erreur de poursuite 0.15 0.1 0.05 0 -0.05 -0.1 0 5 10 15 20 25 Time(s) Figure 6.: Erreur de poursuite c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 9 on choisit, pour (3), ν = 1, α = KP = 10. Avec un bruit sur y, additif, blanc, gaussien, centré, d’écarttype 0.01, et un échantillonnage de période Te = 10ms, la poursuite de trajectoire, exhibée par les figures 7, 8 et 9 est bonne. Commande 0.2 0.1 0 -0.1 -0.2 -0.3 -0.4 -0.5 -0.6 -0.7 -0.8 0 5 10 15 20 25 30 35 40 Time(s) Figure 7.: Commande Sortie Sortie Trajectoire 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 40 Time(s) Figure 8.: Sortie Cas 3 Avec ÿ + 3ẏ + 2y = sign(u).10|u| ν = 1, α = 10, KP = 1 en (3). Les résultats des figures 10, 11 et 12 sont excellents. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 10 Erreur de poursuite 0.08 0.06 0.04 0.02 0 -0.02 -0.04 -0.06 0 5 10 15 20 25 30 35 40 30 35 40 Time(s) Figure 9.: Erreur de poursuite Commande 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -0.1 0 5 10 15 20 25 Time(s) Figure 10.: Commande Sortie Sortie Trajectoire 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 40 Time(s) Figure 11.: Sortie c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 11 Erreur de poursuite 0.2 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 -0.25 0 5 10 15 20 25 30 35 40 Time(s) Figure 12.: Erreur de poursuite Cas 4 Quoique le système ẏ − y = (0.5ẏ + y)u soit plat, de sortie plate y, il est, en raison du produit ẏu et comme on le voit en (12), plus général que ceux considérés en ADRC. De plus, son instabilité le rend délicat à commander. En (3), on choisit ν = 1, α = 5, KP = 3. On ajoute un bruit additif sur la sortie, blanc, gaussien, centré, d’écart-type 0.05. La condition initiale est y(0) = 0.2. La période d’échantillonnage est Te = 10ms. Les résultats de poursuite de trajectoire reportés sur les figures 13, 14 et 15 sont tout à fait corrects. Commande 1 0.5 0 -0.5 -1 -1.5 -2 0 5 10 15 20 25 30 35 40 Time(s) Figure 13.: Commande Cas 5 Une littérature considérable a été consacrée au système, plutôt académique, des trois cuves, notamment en diagnostic, représenté par la figure 16 (voir, par exemple, [Noura et coll. (2009)] et ses réc 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 12 Sortie Sortie Trajectoire 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 40 30 35 40 Time(s) Figure 14.: Sortie Erreur de poursuite 0.3 0.2 0.1 0 -0.1 -0.2 -0.3 -0.4 0 5 10 15 20 25 Time(s) Figure 15.: Erreur de poursuite c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 13 férences). Confirmant la remarque 2, il témoigne de la simplicité du traitement des systèmes mulp2 p1 q1 q2 c1 c3 c2 s s s l1 l3 l2 q13 m1 q32 m3 q20 m2 q20 Figure 16.: Système des trois cuves tivariables par rapport à l’ADRC (voir, par exemple, [Guo & Zhao (2016)], [Inoue & Ishida (2016)], [Sira-Ramírez et coll. (2017)], et [Sun et coll. (2016)]). En voici la description par équations différentielles  p  |x1 − x3 | + u1 /S ẋ = −Dµ sign(x − x )  1 1 1 3   p p    ẋ = Dµ sign(x − x ) |x − x | − Dµ sign(x ) |x2 | + u2 (t)/S 2 3 3 2 3 2 2 2   p   ẋ = −Dµ sign(x − x ) |x − x |Dµ sign(x − x )p|x − x | 3 1 1 3 1 3 3 3 2 3 2 (14)  y = x  1 1     y2 = x 2      y3 = x3 où — — — — — xi , i = 1, 2, 3, est le niveau de liquide dans la cuve i, les commandes u , u sont les arrivées de liquide, √  1 2 D = Sp 2g /S, g = 9.81m.s−2 est la pesanteur, Les valeurs numériques suivantes sont empruntées à une maquette de laboratoire : — S = 0.0154m est la section des cuves, — Sp = 5.10−5 m est la section des tuyaux entre cuves, — µ1 = µ3 = 0.5, µ2 = 0.675 sont les coefficients de viscosité. On régule, selon le paragraphe 2.1., grâce à deux systèmes ultralocaux (3) en parallèle, d’ordre 1 et monovariables, de commandes et de sorties respectives u1 , u2 et y1 , y2 . Pour les deux, α = 100, KP = 0.5. Un bruit additif, blanc, gaussien, centré, d’écart-type 0, 5.10−3 , parasite les sorties. Les figures 17 à 21 rapportent les simulations obtenues avec un échantillonnage d’1s. Les poursuites de trajectoires sont excellentes (se rapporter à 19 et 22). En dépit du couplage physique évident, une variation de consigne dans la cuve 1 n’influence guère la poursuite dans la cuve 2. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 14 10 -4 3 2 1 0 -1 -2 -3 -4 -5 0 50 100 150 200 250 300 350 400 450 500 Time(s) Figure 17.: Commande de la pompe 1 0.45 0.4 Sortie Trajectoire 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 -0.05 0 50 100 150 200 250 300 350 400 450 500 450 500 Time(s) Figure 18.: Evolution du niveau dans la cuve 1 Erreur de poursuite 0.1 0.08 0.06 0.04 0.02 0 -0.02 -0.04 0 50 100 150 200 250 300 350 400 Time(s) Figure 19.: Erreur de poursuite pour la cuve 1 c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 15 10 -4 1.5 1 0.5 0 -0.5 -1 -1.5 0 50 100 150 200 250 300 350 400 450 500 Time(s) Figure 20.: Commande de la pompe 2 0.18 Sortie Trajectoire 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 -0.02 0 50 100 150 200 250 300 350 400 450 500 450 500 Time(s) Figure 21.: Evolution du niveau dans la cuve 2 Erreur de poursuite 0.02 0.015 0.01 0.005 0 -0.005 -0.01 -0.015 -0.02 0 50 100 150 200 250 300 350 400 Time(s) Figure 22.: Erreur de poursuite pour la cuve 2 c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 16 3.4. Paramètres répartis : une équation aux dérivées partielles Soit l’équation de la chaleur en une seule dimension d’espace ∂w ∂ 2w = ∂t ∂x2 (15) où — 0 6 x 6 1; — w(t, 1) = u(t) est la commande ; — w(t, 0) = 0.5 est la condition à l’autre bord ; — w(0, x) = 0.5 + (u(0) − 0.5)x est la condition initiale. On désire maîtriser l’évolution de w(t, x) en x = 1/3 (voir figure 24). Ici, ν = 1, α = KP = 10. Réalisées avec un bruit additif, blanc, gaussien, centré, d’écart type 0.01, et un échantillonnage de taille Te = 10ms, les simulations des figures 23, 24, 25 et 26 présentent d’excellents résultats. Commande 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Time(s) Figure 23.: Commande Sortie 0.7 Sortie Trajectoire 0.65 0.6 0.55 0.5 0.45 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Time(s) Figure 24.: Sortie c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 17 Erreur de poursuite 0.04 0.03 0.02 0.01 0 -0.01 -0.02 -0.03 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Time(s) Figure 25.: Erreur de poursuite 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 2 1.5 1 0.8 1 0.6 0.4 0.5 Time(s) 0.2 0 0 Distance x Figure 26.: Evolution de la température de poutre c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 18 Remarque 5. En calcul opérationnel (voir, par exemple, [Erdélyi (1962)]), (15) conduit à considérer √ des exponentielles de la forme exp(±x s). Nul besoin avec MFC de développements originaux pour la dérivation fractionnaire s1/2 et, on en fait la conjecture, pour toute dérivation non entière rencontrée en pratique. Ce n’est pas le cas avec l’ADRC (voir, par exemple, [Li et coll. (2016)]). 4. Conclusion Le MFC a déjà permis des avancées conceptuelles d’une importance certaine : 1. On fournit une explication, en [d’Andréa-Novel et coll. (2010)], [Fliess & Join (2013)], à l’universalité des PID et à leurs faiblesses, et ce pour la première fois. 2. En dépit de performances parfois insatisfaisantes, ALINEA 13 est l’algorithme le plus usité de régulation des accès d’autoroutes. Aucune justification n’en avait été publiée jusqu’à [Abouaïssa et coll. (2017 3. Réponse [Fliess & Join (2018)] à une question [Karin et coll. (2016)] sur la « compensation dynamique », en « biologie systémique », ou systems biology. Aucun succès de cet ordre ne peut, à notre connaissance, être porté au crédit de l’ADRC. Depuis [Ziegler & Nichols (1942), Ziegler & Nichols (1943)], des retards sont introduits pour faciliter le réglage des gains des PID. Ils perdent tout sens [Fliess & Join (2013)] avec les correcteurs intelligents associés au MFC. Avec, par contre, des retards physiques « assez importants », aucune solution définitive ne semble s’imposer à l’heure où ces lignes sont écrites, en dépit d’avancées prometteuses, tant en MFC (voir [Doublet et coll. (2016)], [Doublet et coll. (2017)], où α en (3) devient variable, et [Thabet et coll. (2017)], [Zhang et coll. (2018)]) qu’en ADRC (voir, par exemple, [Guo & Zhao (2016)], [Sira-Ramírez et coll. (2017)], [Xia & coll. (2009)], [Zhao & Gao (2014)]). Dominer cette question est un point clé. Quant aux systèmes a priori modélisés par des équations aux dérivées partielles, la situation reste assez floue, même si MFC compte déjà quelques réussites concrètes incontestables (voir, par exemple, [Join et coll. (2010)] 14 ). Bibliographie A BOUAÏSSA H., F LIESS M., J OIN C., « On ramp metering : Towards a better understanding of ALINEA via model-free control ». International Journal of Control, 90 (2017a) : 1018-1026. A BOUAÏSSA H., A LHAJ H ASAN O., J OIN C., F LIESS M., D EFER D., Energy saving for building heating via a simple and efficient model-free control design : First steps with computer simulations. 21st International Conference on System Theory, Control and Computing, Sinaia, 2017b. https://hal.archives-ouvertes.fr/hal-01568899/en/ AGUILAR -I BA ÑEZ C., S IRA -R AMÍREZ H., ACOSTA J. Á, « Stability of active disturbance rejection control for uncertain systems: A Lyapunov perspective ». International Journal of Robust and Nonlinear Control, (2017) : DOI: 10.1002/rnc.3812 13. Acronyme d’« Asservissement LINéaire d’Entrée Autoroutière ». 14. Il s’agit d’une installation hydroélectrique, souvent modélisée, comme les canaux, par une équation de Saint-Venant. La solution proposée, brevetée par EDF (Électricité de France) et l’École polytechnique, a reçu le prix de l’innovation 2010, catégorie « brevet », décerné par l’École polytechnique. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 19 D ’A NDRÉA -N OVEL B., F LIESS M., J OIN C., M OUNIER H., S TEUX B., « A mathematical explanation via “intelligent” PID controllers of the strange ubiquity of PIDs ». 18th Mediterranean Conference on Control & Automation, Marrakech, 2010. https://hal.archives-ouvertes.fr/inria-00480293/en/ Å STRÖM K.J., H ÄGGLUND T., Advanced PID Control. Research Triangle Park, NJ : Instrument Society of America, 2006. Å STRÖM K.J. , K UMAR P.R., « Control: A perspective ». Automatica, 50 (2014) : 3-43. Å STRÖM K.J., M URRAY R.M., Feedback Systems : An Introduction for Scientists and Engineers. Prinveton, NJ : Princeton University Press, 2008. B EKCHEVA M., J OIN C., M OUNIER H., « Quasi-model-free tracking of quadrotors », soumis (2018). B ÉZIER P., Courbes et surfaces. Paris : Hermès, 1986. C ARILLO F., ROTELLA F., « Some contributions to estimation for model-free control ». IFAC-PapersOnLine 48-28 (2015) : 150-155. C HOQUET G, (2000), Cours de topologie. Paris : Dunod, 2000. C ORTÉS -ROMERO J., J IMENEZ -T RIANA A., C ORAL -E NRIQUEZ H., S IRA - R AMÍREZ H., « Algebraic estimation and active disturbance rejection in the control of flat systems ». Control Engineering Practice, 61 (2017) : 173-182. D OUBLET M., J OIN C., H AMELIN F., « Model-free control for unknown delayed systems ». 3rd International Conference on Control and Fault-Tolerant Systems, Barcelone, 2016. https://hal.archives-ouvertes.fr/hal-01369776/en/ D OUBLET M., J OIN C., H AMELIN F., « Stability analysis for unknown delayed systems controlled by model-free control ». 21st International Conference on System Theory, Control and Computing, Sinaia, 2017. https://hal.archives-ouvertes.fr/hal-01578561/en/ E RDÉLYI A., Operational Calculus and Generalized Functions. New York : Holt Rinehart Winston, 1962. F ENG H., G UO B.-Z., « Active disturbance rejection control: Old and new results ». Annual Reviews in Control, (2017) : http://dx.doi.org/10.1016/j.arcontrol.2017.05.003 F LIESS M., J OIN C., « Model-free control ». International Journal of Control, 86 (2013) : 2228-2252. F LIESS M., J OIN C., « Dynamic compensation https://hal.archives-ouvertes.fr and homeostasis: a feedback control perspective ». F LIESS M., J OIN C., S IRA -R AMÍREZ H., « Non-linear estimation is easy ». International Journal of Modelling Identification and Control, 4 (2008) : 12-27. F LIESS M., L AMNABHI M., L AMNABHI -L AGARRIGUE F., « An algebraic approach to nonlinear functional expansions ». IEEE Transactions on Circuits and Systems, 30 (1983) : 554-570. F LIESS M., L ÉVINE J., M ARTIN Ph., ROUCHON P., « Flatness and defect of non-linear systems: introductory theory and examples ». International Journal of Control, 61 (1995) : 1327-1361. F LIESS M., L ÉVINE J., M ARTIN Ph., ROUCHON P., « A Lie-Bäcklund approach to equivalence and flatness of nonlinear systems ». IEEE Transactions on Automatic Control, 44 (1999) : 922-937. F LIESS M., M ARQUEZ R., « Continuous-time linear predictive control and flatness: a module-theoretic setting with examples ». International Journal of Control, 73 (2000) : 606-623. F LIESS M., M ARQUEZ R., D ELALEAU E., S IRA -R AMÍREZ H., « Correcteurs proportionnels intégraux généralisés ». ESAIM: Control Optimisation and Calculus of Variations, 7 (2002) : 23-41. F LIESS M., S IRA -R AMÍREZ H., « An algebraic framework for linear identification ». ESAIM: Control Optimisation and Calculus of Variations, 9 (2003) : 151-168. F LIESS M., S IRA -R AMÍREZ H., « Closed-loop parametric identification for continuous-time linear systems via new algebraic techniques ». H. Garnier, L. Wang (Eds): Identification of Continuous-time Models from Sampled Data, pp. 362-391, Londres : Springer, 2008. G AO Z., « On the centrality of disturbance rejection in automatic control ». ISA Transactions, 53 (2014) : 850-857. G ODEMENT R., Analyse mathématique II. Berlin : Springer, 1998. G UO B.-Z., Z HAO Z.-L., Active Disturbance Rejection Control for Nonlinear Systems: An Introduction. Singapore : Wiley, 2016. G UO B.-Z., Z HOU H.-C., « The active disturbance rejection control to stabilization for multi-dimensional wave equation with boundary control matched disturbance ». IEEE Transactions on Automatic Control, 60 (2015) : 143-157. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 20 H AN J., « From PID to active disturbance rejection control ». IEEE Transactions on Industrial Electronics, 56 (2009) : 900-906. H ERBST G., « A simulative study on active disturbance rejection control (ADRC) as a control tool for practitioners ». Electronics, 2 (2013) : 246-279. H UANG Y., X UE W., « Active disturbance rejection control: Methodology and theoretical analysis ». ISA Transactions, 53 (2014) : 963-976. I NOUE S., I SHIDA Y., « Design of a model-following controller using a decoupling active disturbance rejection control method ». Journal of Electrical & Electronic Systems, 5 (2016) : doi:10.4172/2332-0796.1000174 J OIN C., D ELALEAU E., F LIESS M., M OOG C.H., « Un résultat intrigant en commande sans modèle ». ISTE OpenScience Automatique, 1 (2017) : 9 p. https://hal.archives-ouvertes.fr/hal-01628322/en/ J OIN C., ROBERT G., F LIESS M., « Vers une commande sans modèle pour aménagements hydroélectriques en cascade ». 6e Conférence Internationale Francophone d’Automatique, Nancy, 2010. http://hal.archives-ouvertes.fr/inria-00460912/en/ K ALMAN R.E., « A new approach to linear filtering and prediction problems ». Transactions of the ASME - Journal of Basic Engineering, 82 (1960) : 35-45. K ALMAN R.E., B UCY R.S., « New results in linear filtering and prediction theory ». Transactions of the ASME - Journal of Basic Engineering, 83 (1961) : 95-107. K ARIN O., S WISA A., G LASER B., D OR Y., A LON U., « Dynamical compensation in physiological circuits ». Molecular Systems Biology, 12 (2016) : 886. DOI 10.15252/msb.20167216 Q I X., L I J., X IA Y., G AO Z., « On the robust stability of active disturbance rejection control for SISO systems ». Circuits, Systems, and Signal Processing, 36 (2017) : 65-81. LAFONT F., BALMAT J.-F., PESSEL N., FLIESS M., « A model-free control strategy for an experimental greenhouse with an application to fault accommodation ». Computers and Electronics in Agriculture, 110 (2015) : 139-149. L AMNABHI -L AGARRIGUE F., Analyse des systèmes non linéaires, Paris : Hermès, 1994. DE L ARMINAT Ph., Automatique appliquée (2e éd.). Paris : Hermès-Lavoisier, 2009. L ÉVINE J., Analysis and Control of Nonlinear Systems: A Flatness-based Approach. Berlin : Springer, 2009. L I D., D ING P., G AO Z., « Fractional active disturbance rejection control ». ISA Transactions, 62 (2016) : 109-119. M ADO ŃSKI R., H ERMAN P., « Model-free control or active disturbance rejection control? On different approaches for attenuating the perturbation ». 20th Mediterranean Conference on Control & Automation, Barcelone, 2012. M ADO ŃSKI R., H ERMAN P., « Survey on methods of increasing the efficiency of extended state disturbance observers ». ISA Transactions, 56 (2015) : 18-27. M BOUP M., J OIN C., F LIESS M., « Numerical differentiation with annihilators in noisy environment ». Numerical Algorithms, 50 (2009) : 439-467. M ENHOUR L., D’A NDRÉA-N OVEL B., F LIESS M., G RUYER D., M OUNIER H., « An efficient model-free setting for longitudinal and lateral vehicle control. Validation through the interconnected pro-SiVIC/RTMaps prototyping platform ». IEEE Transactions on Intelligent Transportation Systems, 2017. DOI: 10.1109/TITS.2017.2699283 N OURA H., T HEILLIOL D., P ONSART J.-C., C HAMSEDDINE A., Fault-tolerant Control Systems – Design and Practical Applications. Londres : Springer, 2009. O’DWYER A., Handbook of PI and PID Controller Tuning Rules (3rd ed.). Londres : Imperial College Press, 2009. P OLÓNI T., KOLMANOVSKY I., ROHA’-I LKIV B., « Simple input disturbance observer-based control: Case studies ». Journal of Dynamic Systems, Measurement, and Control, 140 (2018) : doi:10.1115/1.4037298 P ONCELET J.-V., Introduction à la mécanique industrielle (3e éd.). Paris : Gauthier-Villars, 1870. R AMÍREZ -N ERIA M., S IRA -R AMÍREZ H., G ARRIDO -M OCTEZUMA R., L UVIANO -J UÁREZ A., « Linear active disturbance rejection control of underactuated systems: The case of the Furuta pendulum ». ISA Transactions, 53 (2014) : 920-928. R IGATOS G.G., Nonlinear Control and Filtering Using Differential Flatness Approaches – Applications to Electromechanical Systems. Heidelberg : Springer, 2015. R ISLER J.-J., Méthodes mathématiques pour la CAO. Paris : Dunod, 1991. Traduction anglaise : Mathematical Methods in CAD. Cambridge : Cambridge University Press, 1992. ROTELLA F., Z AMBETTAKIS I., « Commande des systèmes par platitude ». Techniques de l’Ingénieur S7450 V1, 2007. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 21 RUDIN W., Functional Analysis. New York : McGraw-Hill, 1967. Traduction française : Analyse fonctionnelle, Paris : Ediscience, 2000. RUDIN W., Real and Complex Analysis. New York : McGraw-Hill, 1976. Traduction française : Analyse réelle et complexe, Paris : Dunod, 2009. RUDOLPH J., Beiträge zur flachheitsbasierten Folgeregelung linearer und nichtlinearer Systeme endlicher und unendlicher Dimension. Aachen : Shaker Verlag, 2003. RUGH W.J., Nonlinear System Theory – The Volterra/Wiener approach. The Johns Hopkins University Press, Baltimore, 1981. S IRA -R AMÍREZ H., AGRAWAL S.K., Differentially Flat Systems. New York : Marcel Decker, 2004. S IRA -R AMÍREZ H., G ARCÍA -RODRÍGUEZ C., C ORTÈS -ROMERO J., L UVIANO -J UÁREZ A., Algebraic Identification and Estimation Methods in Feedback Control Systems. Chichester : Wiley, 2014. S IRA -R AMÍREZ H., L UVIANO -J UÁREZ A., C ORTÈS -ROMERO J., « Control lineal robusto de sistemas no lineales diferencialmente planos ». Revista Iberoamericana de Automática e Informática Industrial, 8 (2011) : 14-28. S IRA -R AMÍREZ H., L UVIANO -J UÁREZ A., R AMÍREZ -N ERIA M., Z URITA -B USTAMANTE E.W., Active Disturbance Rejection Control of Dynamic Systems: A Flatness Based Approach. Oxford & Cambridge, MA : Elsevier, 2017. S IRA -R AMÍREZ H., Z URITA -B USTAMANTE E.W., L UVIANO -J UÁREZ A., « Robust flat filtering control of a nonlinear manipulator-direct current motor system ». Journal of Dynamic Systems Measurement and Control, 140 (2018) : doi:10.1115/1.4037386 S UN L., D ONG J., L I D., L EE K.Y., « A practical multivariable control approach based on inverted decoupling and decentralized active disturbance rejection control ». Industrial & Engineering Chemistry Research, 55 (2016) : 2008-2019. TAVASOLI A., E NJILELA V., « Active disturbance rejection and Lyapunov redesign approaches for robust boundary control of plate vibration ». International Journal of Systems Sciences, 48 (2017) : 1656-1670. T HABET H., AYADI M., ROTELLA F., « Design of adaptive PID controllers based on adaptive Smith predictor for ultralocal model control ». International Journal of Automation and Control, 11 (2017) : 222-238. T ICHERFATINE M., Q IDAM Z. (2017). « Model-free approach based intelligent PD controller for vertical motion reduction in fast ferries ». Turkish Journal of Electrical Engineering & Computer Sciences, 2017 DOI: 10.3906/elk-1703-224 V INCENT J., M ORRIS D., U SHER N., G AO Z., Z HAO S., N ICOLETTI A., Z HENG Q., « On active disturbance rejection based control design for superconducting RF cavities ». Nuclear Instruments and Methods in Physics Research A, 643 (2011) : 11-16. W U Y.-J., H UA Y.Y., L IU X.-D., « Design method of active disturbance rejection variable structure control system ». Mathematical Problems in Engineering, 2015. http://dx.doi.org/10.1155/2015/195720 X IA Y., F U M., S HI P., Analysis and Synthesis of Dynamical Systems with Time-Delays. Lecture Notes in Control and Information Sciences 387, Berlin : Springer, 2009. YAO J., D ENG W., « Active disturbance rejection adaptive control of uncertain nonlinear systems: theory and application ». Nonlinear Dynamics, 89 (2017) : 1611-1624. WANG H., T IAN Y., H AN S., WANG X., « ZMP theory-based gait planning and model-free trajectory tracking control of lower limb carrying exoskeleton system ». Studies in Informatics and Control, 26, 161-170, 2017. WANG H., Y E X., T IAN Y., Z HENG G., C HRISTOV N., « Model-free based terminal SMC of quadrotor attitude and position ». IEEE Transactions on Aerospace and Electronic Systems, 52, 2519-2528, 2016. Z HANG Y., FAN C., Z HAO F., A I Z., G ONG Z., « Parameter tuning of ADRC and its application based on CCCSA ». Nonlinear Dynamics, 76 (2014) : 1185-1194. Z HANG X., WANG H., T IAN Y., P EYRODIE L., WANG X., « Model-free based neural network control with time-delay estimation for lower extremity exoskeleton ». Neurocomputing, 272 (2018) : 178-188. Z HAO S., G AO Z., « Modified active disturbance rejection control for time-delay systems ». ISA Transactions, 53 (2014) : 882-888. Z HENG Q., G AO Z., « Active disturbance rejection control: between the formulation in time and the understanding in frequency ». Control Theory and Technology, 14 (2016) : 250-259. Z IEGLER J.G., N ICHOLS, N.B. (1942). « Optimum settings for automatic controllers ». Transactions of the ASME, 64 (1942) : 759-768. Z IEGLER J.G., N ICHOLS, N.B. (1943). « Process lags in automatic control circuits ». Transactions of the ASME, 65 (1943) : 433-444. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 22
3cs.SY
High-speed detection of emergent market clustering via an unsupervised parallel genetic algorithm Dieter Hendricks∗ , Tim Gebbie, Diane Wilcox School of Computational and Applied Mathematics, University of the Witwatersrand Johannesburg, WITS 2050, South Africa ∗ e-mail: [email protected] arXiv:1403.4099v4 [q-fin.CP] 2 Aug 2015 Abstract We implement a master-slave parallel genetic algorithm (PGA) with a bespoke log-likelihood fitness function to identify emergent clusters within price evolutions. We use graphics processing units (GPUs) to implement a PGA and visualise the results using disjoint minimal spanning trees (MSTs). We demonstrate that our GPU PGA, implemented on a commercially available general purpose GPU, is able to recover stock clusters in sub-second speed, based on a subset of stocks in the South African market. This represents a pragmatic choice for low-cost, scalable parallel computing and is significantly faster than a prototype serial implementation in an optimised C-based fourth-generation programming language, although the results are not directly comparable due to compiler differences. Combined with fast online intraday correlation matrix estimation from high frequency data for cluster identification, the proposed implementation offers cost-effective, near-real-time risk assessment for financial practitioners. Keywords: unsupervised clustering, genetic algorithms, parallel algorithms, financial data processing, maximum likelihood clustering 1. Introduction Advances in technology underpinning multiple domains have increased the capacity to generate and store data and metadata relating to domain processes. The field of data science is continuously evolving to meet the challenge of gleaning insights from these large data sets, with extensive research in exact algorithms, heuristics and meta-heuristics for solving combinatorial optimisation problems. The primary advantage of using exact methods is the guarantee of finding the global optimum for the problem. However, a disadvantage when solving complex (NP-hard) problems is the exponential growth of the execution time proportional to the problem instance size [23]. Heuristics tend to be efficient, but solution quality cannot be guaranteed and techniques are often not versatile [9]. Meta-heuristics attempt to consolidate these two approaches and deliver an acceptable solution in a reasonable time frame. A large number of meta-heuristics designed for solving complex problems exist in the literature and the genetic algorithm (GA) has emerged as a prominent technique, using intensive global search heuristics that explore a search space intelligently to solve optimisation problems. Although the algorithms must traverse large spaces, the computationally intensive calculations can be performed independently. Compute Unified Device Architecture (CUDA) is Nvidias parallel computing platform which is well suited to many computational tasks, particularly where data parallelism is possible. Implementing a GA to perform cluster analysis on vast data sets using this platform allows one to mine though the data relatively quickly and at a fraction of the cost of large data Preprint submitted to South African Journal of Science centres or computational grids. A number of authors have considered parallel architectures to accelerate GAs (see [35, 11, 18, 31, 32, 5, 4, 20] as examples). While the work of [20] is conceptually similar to the implementation proposed in this paper, a key difference is our choice of fitness function for the clustering scheme. Giada and Marsili propose an unsupervised, parameter-free approach to finding data clusters, based on the maximum likelihood principle [16]. They derive a log-likelihood function, where a given cluster configuration can be assessed to determine whether it represents the inherent structure for the dataset: cluster configurations which approach the maximum log-likelihood are better representatives of the data structure. This log-likelihood function is thus a natural candidate for the fitness function in a GA implementation, where the population continually evolves to produce a cluster configuration which maximises the log-likelihood. The optimal number of clusters is a free parameter, unlike in traditional techniques where the number of clusters needs to be specified a priori. While unsupervised approaches have been considered (see [30] and references therein), the advantage of the Giada and Marsili approach is that it has a natural interpretation for clustering in the application domain explored here. Monitoring intraday clustering of financial instruments allows one to better understand market characteristics and systemic risks. While genetic algorithms provide a versatile methodology for identifying such clusters, serial implementations are computationally intensive and can take a long time to converge to a best approximation. In this paper, we introAugust 4, 2015 duce a maintainable and scalable master-slave parallel genetic algorithm (PGA) framework for unsupervised cluster analysis on the CUDA platform, which is able to detect clusters using the Giada and Marsili likelihood function. By applying the proposed cluster analysis approach and examining the clustering behaviour of financial instruments, this offers a unique perspective to monitoring the intraday characteristics of the stock market and the detection of structural changes in near-real-time. The novel implementation presented in this paper builds on the contribution of Cieslakiewicz [7]. While this paper provides an overview and specific use-case for the algorithm, the authors are investigating aspects of adjoint parameter tuning, performance scalability and the impact on solution quality for varying stock universe sizes and cluster types. This paper proceeds as follows: Section 2 introduces cluster analysis, focusing on the maximum likelihood approach proposed by Giada and Marsili [15]. Section 3 discusses the master-slave PGA. Section 4 discusses the CUDA computational platform and our specific implementation. Section 5 discusses data and results from this analysis, before concluding in Section 6. 2.2.1. Cluster analysis based on the maximum likelihood principle Maximum likelihood estimation is a method of estimating the parameters of a statistical model. Data clustering on the other hand deals with the problem of classifying or categorising a set of N objects or clusters, so that the objects within a group or cluster are more similar than objects belonging to different groups. If each object is identified by D measurements, then an object can be represented as a tuple, x̄i = (xi(1) , ..., xi(n) ), i = 1, ..., N in a D-dimensional space. Data clustering will try to identify clusters as more densely populated regions in this vector space. Thus, a configuration of clusters is represented by a set S = {si , ..., sN } of integer labels, where si denotes the cluster that object i belongs to and N is the number of objects [16] (if si = s j = s, then object i and object j reside in the same cluster), and if si takes on values from 1 to M and M = N, then each cluster is a singleton cluster constituting one object only. 2.2.2. Analogy to the Potts model One can apply super-paramagnetic ordering of a q-state Potts model directly for cluster identification [3]. In a market Potts model, each stock can take on q-states and each state can be represented by a cluster of similar stocks [3, 22, 15]. Cluster membership is indicative of some commonality among the cluster members. Each stock has a component of its dynamics as a function of the state it is in and a component of its dynamics influenced by stock specific noise. In addition, there may be global couplings that influence all the stocks, i.e. the external field that represents a market mode. In the super-paramagnetic clustering approach, the cost function can be considered as a Hamiltonian whose low energy states correspond to cluster configurations that are most compatible with the data sample. Structures are then identified with N configurations S = {si }i=1 for the cluster indices si , which represents cluster to which the i-th object belongs. This allows one to interpret si as a Potts spin in the Potts model Hamiltonian with Ji j decreasing with the distance between objects [3, 22]. The Hamiltonian takes on the form: X 1X M h si , (1) Hg = − Ji j δ(si , s j ) − β i i s ,s ∈S 2. Cluster Analysis Cluster analysis groups objects according to metadata describing the objects or their associations [13]. The goal is to ensure that objects within a group exhibit similar characteristics and are unrelated to objects in other groups. The greater the homogeneity within a group, and the greater the heterogeneity between groups, the more pronounced the clustering. In order to isolate clusters of similar objects, one needs to utilise a data clustering approach that will recover inherent structures efficiently. 2.1. The correlation measure of similarity The correlation measure is an approach to standardise the data by using the statistical interdependence between data points. The correlation indicates the direction (positive or negative) and the degree or strength of the relationship between two data points. The most common correlation coefficient which measures the relationship between data points is the Pearson correlation coefficient, which is sensitive only to a linear relationship between them. The Pearson correlation is +1 in the case of a perfect positive linear relationship and -1 in the case of a perfect negative linear relationship and some value between 1 and +1 in all other cases, with values close to 0 signalling negligible interdependence. i j where the spins si can take on q-states and the external magnetic fields are given by hiM . The first term represents common internal influences and the second term represents external influences. We ignore the second term when fitting data, as we include shared factors directly in later sections when we discuss information and risk and the influence of these on price changes. In the Potts model approach one can think of the coupling parameters Ji j as being a function of the correlation coefficient [22, 15]. This is used to specify a distance function that is decreasing with distance between objects. If all the spins are related in this way then each pair of spins is connect by some non-vanishing coupling Ji j = Ji j (ci j ). In this model, the case where there is only one cluster can be thought of as a ground state. As the system becomes more excited, it could break up 2.2. Clustering procedures Any specific clustering procedure entails optimising some kind of criterion, such as minimising the within-cluster variance or maximising the distance between the objects or clusters. 2 into additional clusters and each cluster would have specific Potts magnetisations, even though nett magnetisation may remain zero for the complete system. Generically, the correlation would then be both a function of time and temperature in order to encode both the evolution of clusters, as well as the hierarchy of clusters as a function of temperature. In the basic approach, one is looking for the lowest energy state that fits the data. In order to parameterise the model efficiently one can choose to make the Noh ansatz [26] and use this to develop a maximumlikelihood approach [15] rather than explicitly solving the Potts Hamiltonian numerically [3, 22]. The variable c s is the internal correlation of the sth cluster, denoted by the following equation: 2.2.3. Giada and Marsili clustering technique Following Giada and Marsili [15], we assume that price increments evolve under Noh [26] model dynamics, whereby objects belonging to the same cluster should share a common component: q The maximum likelihood of structure S can be written as P (G∗ , S| x̄i ) ∝ expDL(S) (see [34]), where the resulting likelihood function per feature Lc is denoted by ! n2s − n s ns 1 X log + (n s − 1) log 2 . (8) Lc (S) = 2 s:n >1 cs ns − cs x̄i = g si η̄ si + 1 − g2si ¯i . cs = d=1 Ci, j δ si ,s δ s j ,s . (6) i=1 j=1 The variable Ci, j is the Pearson correlation coefficient of the data, denoted by the following equation: x̄i x¯j Ci, j = q . k x̄i 2 kk x¯j 2 k (7) s (2) From Equation 8, it follows that Lc = 0 for clusters of objects that are uncorrelated, i.e. where g∗S = 0 or c s = n s or when the objects are grouped in singleton clusters for all the cluster indexes (n s = 1). Equation 8 illustrates that the resulting maximum likelihood function for S depends on the Pearson correlation cofficient Ci, j and hence exhibits the following advantages in comparison to conventional clustering methods: Here, x̄i represents the features of object i and si is the label of the cluster that the object belongs to. The data has been normalised to have zero mean and unit variance. ¯i is a vector describing the deviation of object i from the features of cluster s and includes measurement errors, while η¯si describes clusterspecific features. g s is a loading factor that emphasises the similarity or difference between objects in cluster s. In this research the data set refers to a set of the objects, denoting N assets or stocks, and their features are prices across D days in the data set. The variable i is indexing stocks or assets, whilst d is indexing days. If g s = 1, all objects with si = s are identical, whilst if g s = 0, all objects are different. The range of the cluster index is from 1 to N in order to allow for singleton clusters of one object or asset each. If one takes Equation 2 as a statistical hypothesis and assumes that both η̄ si and ¯s are Gaussian vectors with zero mean and unit variance, for values of i, s = 1, ..., N, it is possible to compute the probability density P ({ x̄i }|G, S) for any given set of parameters (G, S) = ({g s }, {si }) by observing the data set {xi }, i, s = 1, ..., N as a realisation of the common component of Equation 2 as follows [16]: D *Y N +  q Y 2 P ({ x̄i }|G, S) = δ xi (t) − g si η̄ si + 1 − g si ¯i . N X N X • It is unsupervised: The optimal number of clusters is unknown a priori and not fixed at the beginning • The interpretation of results is transparent in terms of the model, namely Equation 2. Giada and Marsili state that max s Lc (S) provides a measure of structure inherent in the cluster configuration represented by the set S = {s1 , ..., sn } [16]. The higher the value, the more pronounced the structure. 3. Parallel Genetic Algorithms In order to localise clusters of normalised stock returns in financial data, Giada and Marsili made use of a simulated annealing algorithm [15, 16], with −Lc as the cost function for their application of the log-likelihood function on real-world data sets to substantiate their approach. This was then compared to other clustering algorithms, such as K-means, single linkage, centroid linkage, average linkage, merging and deterministic maximisation [16]. The technique was successfully applied to South African financial data by Mbambiso et al., using a serial implementation of a simulated annealing algorithm (see [24] and [14]). Simulated annealing and deterministic maximisation provided acceptable approximations to the maximum likelihood structure, but were inherently computationally expensive. We promote the use of PGAs as a viable an approach to approximate the maximum likelihood structure. Lc will be used as the fitness function and a PGA algorithm will be used to find the maximum for Lc , in order to efficiently isolate clusters in correlated financial data. (3) i=1 The variable δ is the Dirac delta function and h...i denotes the mathematical expectation. For a given cluster structure S , the likelihood is maximal when the parameter g s takes the values q  c s −n s    n2s −ns for n s > 1, g∗s =  (4)   0 for n ≤ 1. s The quantity n s in Equation 4 denotes the number of objects in cluster s, i.e. N X ns = δ si ,s . (5) i=1 3 determined independently for each of the candidate solutions. While a number of schemes have been proposed in the literature to achieve this parallelisation (see [17], [33] and [31]), we have chosen to implement the master-slave model. 3.1. GA principle and genetic operators One of the key advantages of GAs is that they are conceptually simple. The core algorithm can be summarised into the following steps: initialise population, evolve individuals, evaluate fitness, select individuals to survive to the next generation. GAs exhibit the trait of broad applicability [33], as they can be applied to any problem whose solution domain can be quantified by a function which needs to be optimised. Specific genetic operators are applied to the parents, in the process of reproduction, which then give rise to offspring. The genetic operators can be classified as follows: 3.2. Master-slave parallelisation Master-slave GAs, also denoted as Global PGAs, involve a single population, but distributed amongst multiple processing units for determination of fitness values and the consequent application of genetic operators. They allow for computation on shared-memory processing entities or any type of distributed system topology, for example grid computing [31]. Ismail provides a summary of the key features of the masterslave PGA [17]: The algorithm uses a single population (stored by the master) and the fitness evaluation of all of the individuals is performed in parallel (by the slaves). Communication occurs only as each slave receives the individual (or subset of individuals) to evaluate and when the slaves return the fitness values, sometimes after mutation has been applied with the given probability. The particular algorithm we implemented is synchronous, i.e. the master waits until it has received the fitness values for all individuals in the population before proceeding with selection and mutation. The synchronous master-slave PGA thus has the same properties as a conventional GA, except evaluation of the fitness of the population is achieved at a faster rate. The algorithm is relatively easy to implement and a significant speedup can be expected if the communications cost does not dominate the computation cost. The whole process has to wait for the slowest processor to finish its fitness evaluations until the selection operator can be applied. A number of authors have used the Message Parsing Interface (MPI) paradigm to implement a master-slave PGA. Digalakis and Margaritis implement a synchronous MPI PGA and shared-memory PGA, whereby fitness computations are parallelised and other genetic operators are applied by the master node only [12]. They demonstrate a computation speed-up which scales linearly with the number of processors for large population sizes. Zhang et al. use a centralised control island model to concurrently apply genetic operators to sub-groups, with a bespoke migration strategy using elite individuals from sub-groups [41]. Nan et al. used the MATLAB parallel computing and distributed computing toolboxes to develop a masterslave PGA [25], demonstrating its efficacy on the image registration problem when using a cluster computing configuration. For our implementation, we made use of the Nvidia CUDA platform to achieve massive parallelism by utilising the Graphical Processing Unit (GPU) Streaming Multiprocessors (SM) as slaves, and the CPU as master. Selection: The purpose of selection is to isolate fitter individuals in the population and allow them to propogate in order to give rise to new offspring with higher fitness values. We implemented the stochastic universal sampling selection operator, where individuals are mapped to contiguous segments on a line in proportion to their fitness values [2]. Individuals are then selected by sampling the line at uniformly spaced intervals. While fitter individuals have a higher probability of being selected, this technique improves the chances that weaker individuals will be selected, allowing diversity to enter the population and reducing the probability of convergence to a local optimum. Crossover: Crossover is the process of mating two individuals, with the expectation that they can produce a fitter offspring [33]. The crossover genetic operation involves the selection of random loci to mark a cross site within the two parent chromosomes, copying the genes to the offspring. A bespoke knowledge-based crossover operator was developed for our implementation [7], in order to incorporate domain knowledge and improve the rate of convergence. Mutation: Mutation is the key driver of diversity in the candidate solution set or search space [33]. It is usually applied after crossover and aims to ensure that genetic information is randomly distributed, preventing the algorithm from being trapped in local minima. It introduces new genetic structures in the population by randomly modifying some of its building blocks and enables the algorithm to traverse the search space globally. Elitism: Coley states that fitness-proportional selection does not necessarily favour the selection of any particular individual, even if it is the fittest [8]. Thus the fittest individuals may not survive an evolutionary cycle. Elitism is the process of preserving the fittest individuals by inherent promotion to the next generation, without undergoing any of the genetic transformations of crossover or mutation [33]. Replacement: Replacement is the last stage of any evolution cycle, where the algorithm needs to replace old members of the current population with new members [33]. This mechanism ensures that the population size remains constant, while the weakest individuals in each generation are dropped. 4. Computational Platform and Implementation Compute Unified Device Architecture (CUDA) is Nvidias platform for massively parallel high performance computing on the Nvidia GPUs. Compute Unified Device Architecture (CUDA) is Nvidias platform for massively parallel highperformance computing on the Nvidia GPUs. At its core are three key abstractions: a hierarchy of thread groups, shared Although GAs are very effective for solving complex problems, this positive trait can unfortunately be offset by long execution times, due to the traversal of the search space. GAs lend themselves to parallelisation, provided the fitness values can be 4 where si = 1, ..., K and i = 1, ..., N. Here, si is the cluster that object i belongs to. In terms of the terminology pertaining to GAs, it means that the ith gene denotes the cluster that the ith object or asset belongs to. The numbers of objects or assets is N, thus to permit the possibility of an all-singleton configuration, we let K = N. This representation was implemented by Gebbie et al. in their serial GA and was adopted in this research [14]. memories, and barrier synchronisation. Full details on the execution environment, thread hierarchy, memory hierarchy and thread synchronisation schemes have been omitted here, but we refer the reader to Nvidia technical documentation [27, 28] for a comprehensive discussion. 4.1. Specific computational environment The CUDA algorithm and the respective testing tools were developed using Microsoft Visual Studio 2012 Professional, with the Nvidia Nsight extension for CUDA-C projects. The following configurations were tested to determine the versatility of the CUDA clustering algorithms on the following architectures: We had the opportunity to test two candidate graphEnvironment GTX CUDA GTX MATLAB TESLA CUDA TESLA MATLAB Configuration Windows 7 Professional Service Pack 1 (64-bit), Intel Core i7-4770K [email protected] GHz, 32GB RAM, Nvidia GTX Titan Black with 6GB RAM, CC: 3.0, SM: 3.5 Windows 7 Professional Service Pack 1 (64-bit), Intel Core i7-4770K [email protected] GHz, 32GB RAM, Nvidia GTX Titan Black with 6GB RAM, CC: 3.0, SM: 3.5 Windows 7 Professional Service Pack 1 (64-bit), Intel Core i7-X980 [email protected] GHz, 24GB RAM, Nvidia TESLA C2050 with 2.5GB RAM, CC: 2.0, SM: 2.0 Windows 7 Professional Service Pack 1 (64-bit), Intel Core i7-X980 [email protected] GHz, 24GB RAM, Nvidia TESLA C2050 with 2.5GB RAM, CC: 2.0, SM: 2.0 4.2.2. Fitness function The Giada and Marsili maximum log-likelihood function Lc , as shown in Equation 8, was used as the fitness function. This is used to determine whether the cluster configuration represents the inherent structure of the data set, i.e. it will be used to detect if the GA converges to the fittest individual, which will represent a cluster configuration of correlated assets or objects in the data set. Framework CUDA 5.5 (parallel) MATLAB 2013a (serial) 4.2.3. Master-slave PGA implementation The unparalellised MATLAB GA implementation of the likelihood function by Gebbie, Wilcox and Mbambiso [14] served as a starting point. In order to maximise the performance of the GA, the application of genetic operators and evaluation of the fitness function were parallelised for the CUDA framework [7]. A summarised exposition is presented here. Emphasis was placed on outsourcing as much of the GA execution to the GPU and made use of GPU memory as extensively as possible [40]. The master-slave PGA uses a single population, where evaluation of the individuals and successive application of genetic operators are conducted in parallel. The global parallelisation model does not predicate anything about the underlying computer architecture, so it can be implemented efficiently on a shared-memory and distributed-memory model platform [33]. By delegating these tasks to the GPU and making extensive use of GPU memory, this minimises the data transfers between the host and device. These transfers have a significantly lower bandwidth than data transfers between shared or global memory and the kernel executing on the GPU. The algorithm in [14] was modified to maximise the performance of the master-slave PGA and have a clear distinction between the master node (CPU), which controls the evolutionary process by issuing the commands for the GA operations to be performed by the slave nodes (GPU streaming multiprocessors). The pseudocode for the algorithm implemented is shown in Algorithm 1. CUDA 5.5 (parallel) MATLAB 2013a (serial) Table 1: Development, testing and benchmarking environments ics cards for the algorithm implementation: the Nvidia GTX Titan Black and the Nvidia TESLA C2050. Both cards offer double-precision calculations and a comparable number of CUDA cores and TFLOPS (tera floating point operations per second), however the GTX card is significantly cheaper than the TESLA card. The primary reason for this is the use of ECC (error check and correction) memory on the TESLA cards, where extra memory bits are present to detect and fix memory errors [1]. The presence of ECC memory ensures consistency in results generated from the TESLA card, which is critical for rigorous scientific computing. In further investigations, the authors will explore the consistency of the solution quality generated from the GTX card, and whether the resultant error is small enough to justify the cost saving compared to the TESLA card. 4.2. Implementation The following objectives were considered in this research: 1) investigate and tune the behaviour of the PGA implementation using a pre-defined set of 40 simulated stocks featuring 4 distinct disjoint clusters; 2) identify clusters in a real-world dataset, viz. high-frequency price evolutions of stocks; and 3) test the efficiency of the GPU environment. 4.2.1. Representation We used integer-based encoding for the representation of individuals in the genetic algorithm, i.e. Individual = S = {s1 , s2 , ..., si−1 , si , ..., sN } (9) 5 Graphics card Compute capability SMs Max threads / thread block Thread block dimension Max thread blocks / multiprocessor Max number of stocks Max population size Algorithm 1 Master-slave PGA for cluster identification Initialise ecosystem for evolution Size the thread blocks and grid to achieve greatest parallelisation ON GPU: Create initial population while TRUE do ON GPU: Evaluate fitness of all individuals ON GPU: Evaluate state and statistics ON GPU: Determine if termination criteria are met if YES then Terminate ALGO; Exit While loop; else Continue end if ON GPU: Isolate fittest individuals ON GPU: Apply elitism ON GPU: Apply scaling ON GPU: Apply genetic operator: selection ON GPU: Apply genetic operator: crossover ON GPU: Apply genetic operator: mutation ON GPU: Apply replacement (new generation created) end while Report on results Clean-up (Deallocate memory on GPU/CPU; Release device) Nvidia GTX Titan Black 3.5 15 1024 32 16 3840 17 472 Nvidia Tesla C2050 2.0 14 1024 32 8 3584 18 720 Table 2: Restrictions on number of stocks and population size. For the Tesla card, Max number of stocks = (14) ∗ (1024/32) ∗ 8 = 3584 and Max population size = (65535/(3584/32)) ∗ 32 = 18720. We note that the efficiency of the algorithm may be compromised near the physical limits outlined in Table 2, since the CUDA memory hierarchy would force threads to access highlatency global memory banks more often. However, for the particular domain problem we are considering in this paper, the Johannesburg Stock Exchange consists of around 400 listed companies on its main board, which represents an upper limit on the number of stocks of interest for local cluster analysis. This is well within the physical limits of the algorithm, while still providing scope to extend the application to multiple markets. The details on the full implementation, as well as specific choices regarding initialisation, block sizes and threads per block, are given in [7]. To achieve data parallelism and make use of the CUDA thread hierarchy, we mapped individual genes onto a 2dimensional grid. Using the representation shown in Equation 9, assuming a population of 400 individuals and 18 stocks: 4.2.4. Key implementation challenges A key challenge in CUDA programming is adapting to the Single Program Multiple Data (SPMD) paradigm, where multiple instances of a single program use unique offsets to manipulate portions of a block of data [10]. This architecture suits data parallelism, whereas task parallelism requires a special effort. In addition, since each warp (group of 32 threads) is executed on a single SPMD processor, divergent threads in a warp can severely impact performance. In order to exploit all processing elements in the multi-processor, a single instruction is used to process data from each thread. However, if one thread needs to execute different instructions due to a conditional divergence, all other threads must effectively wait until the divergent thread re-joins them. Thus, divergence forces sequential thread execution, negating a large benefit provided by SPMD processing. The CUDA memory hierarchy contains numerous shared memory banks which act as a common data cache for threads in a thread block. In order to achieve full throughput, each thread must access a distinct bank and avoid bank conflicts, which would result in additional memory requests and reduce efficiency. In our implementation, bank conflicts were avoided by using padding, where shared memory is padded with an extra element such that neighbouring elements are stored in different banks [6]. CUDA provides a simple and efficient mechanism for thread synchronisation within a thread block via the syncthreads() barrier function, however inter-block communication is not directly supported during the execution of a kernel. Given that the genetic operators can only be applied once the entire population fitness is calculated, it is necessary to synchronise thread blocks assigned to the fitness computation operation. We implemented the CPU implicit synchronisation scheme [39, 29]. Since kernel launches are asynchronous, successive kernel launches are Individual1 = {1, 2, 4, 5, 7, ..., 6} Individual2 = {9, 2, 1, 1, 1, ..., 2} Individual3 = {3, 1, 3, 4, 6, ..., 2} .. . Individual400 = {8, 1, 9, 8, 7, ..., 3} would be mapped to grid cells, as illustrated in Figure 1. The data grid cells are mapped to threads, where each thread executes a kernel processing the data cell at the respective xycoordinate. Figure 1: Mapping of individuals onto the CUDA thread hierarchy Given the hardware used in this investigation (see Table 1), Table 2 outlines the restrictions on the permissible stock universe and population sizes imposed by the chosen mapping of individual genes to threads. A thread block dimension of 32 is chosen for larger problems, since this ensures that the permissible population size is larger than the number of stocks to cluster. 6 pipelined and thus the executions are implicitly synchronised with the previous launch, with the exception of the first kernel launch. Given the latency incurred on calls between the CPU and GPU, and the consequent drag on performance, GPU synchronisation schemes were explored which achieve the required inter-block communication. In particular, GPU simple synchronisation, GPU tree-based synchronisation and GPU lock-free synchronisation were considered [39]. Ultimately, the GPU synchronisation schemes were too restrictive for our particular problem, since the number of thread blocks would have an upper bound equal to the number of SMs on the GPU card. If the number of thread blocks is larger than the number of SMs on the card, execution may deadlock. This could be caused by the warp scheduling behaviour of the GPU, whereby active thread blocks resident on a SM may remain in a busy waiting state, waiting for unscheduled thread blocks to reach the synchronisation point. While this scheme may be more efficient for smaller problems, we chose the CPU synchronisation scheme in the interest of relative scalability. recovery of these induced clusters was used to tune the PGA parameters. The test set consisted of actual stock quoted midprice ticks aggregated into 3-minute bars from 28 September 2012 to 10 October 2012, viz. approximately 1800 data points for each stock. Stocks chosen represent the 18 most liquid stocks on the JSE for that period, according to traded volumes. For both data sets, correlation matrices were constructed from the time series data, as described in Section 4.2.4, to serve as inputs for the clustering algorithm. The test set results below show the summary statistics from a set 1760 correlation matrices of 18 JSE stocks. 5.2. Results We show a sample set of results here. Further discussion regarding aspects of the analysis are given in [7]. 5.2.1. Optimal algorithm settings Various investigations were undertaken to identify optimal adjoint parameters for the PGA. In each case, the algorithm was successively applied to the training set, with known disjoint clusters. Settings were varied until the rate of convergence was maximised. Once the optimal value for each adjoint parameter had been determined from the training set, the optimal algorithm configuration was deployed on the test set. In further investigations, the authors will study the effect of various adjoint parameter choices on the rate of convergence and algorithm efficiency for varying stock universe sizes. The following optimal configuration for the PGA was deployed on the test set, given a population size of 1000: 4.2.5. Data pre-processing To generate the N-stock correlation matrices to demonstrate the viability of the algorithm on real-world test data, data correlations were computed on data where missing data was addressed using zero-order hold interpolation [37]. The market mode was removed using the method suggested by Giada and Marsili [15] using a recursive averaging algorithm. A covariance matrix was then computed using an iterative online exponentially-weighted moving average (EWMA) filter with a default forgetting factor of λ = 0.98. The correlation matrix was computed from the covariance matrix and was cleaned using random matrix theory methods. In particular, Gaussian noise effects were reduced by eliminating eigenvalues in the Wishart range in a trace-preserving manner [37]. This enhanced the clusters and improved the stability of estimated sequence of correlation matrices. Adjoint parameter Number of generations Crossover probability (Pc ) Mutation probability (Pm ) Error tolerance Stall generations (G stall ) Elite size Crossover operator Mutation operator Knowledge-based crossover probability 4.2.6. Data post-processing Computed cluster configurations are read from the CUDA output flat file. Successively, an adjacency matrix is constructed by using data values from the correlation matrix in conjunction with computed cluster configuration of the respective data set. The adjacency matrix is then used to construct a disjoint set of Minimal Spanning Trees (MSTs), each tree capturing the interconnectedness of each cluster. Each MST exhibits n s − 1 edges, connecting the n s stocks of the cluster in such a manner that the sum of the weights of the edges is a minimum. Kruskal’s algorithm was used to generate the MSTs, which depict the linkages between highly correlated stocks, providing a graphical visualisation of the resultant set of disjoint clusters [21]. Value 400 0.9 0.1 0.00001 50 10 Knowledge-based operator Random replacement 0.9 Table 3: Development, testing and benchmarking environment 5.2.2. Benchmark timing results Table 4 illustrates the efficiency of the CUDA PGA implementation, compared to the MATLAB serial GA. Direct comparison between the MATLAB serial GA and CUDA PGA may be biased by the fundamental architecture differences of the two platforms. Nevertheless, we immediately observe a significant 10-15 times performance improvement for the test set cluster analysis run. This can be attributed to the utilisation of a parallel computation platform, a novel genetic operator and the algorithm tuning techniques employed. On the GTX platform, the CUDA PGA takes 0.80 seconds to identify residual clusters inherent in a single correlation matrix of 18 real-world stocks, demonstrating its potential as a near-real-time risk assessment tool. The outperformance of the GTX card is likely explained by the card’s relative faster core speed, memory speed, larger memory and memory bandwidth compared to the TESLA card. 5. Data and Results 5.1. Data This investigation used two sets of data: the training set and the test set. The training set consisted of a simulated time series of 40 stocks which exhibit known distinct, disjoint clusters. The 7 Although this may justify the use of the more cost-effective GTX card, it is not clear that this performance differential will persist as the size of the stock universe increases, or whether the GTX card preserves solution quality. We note that the scale of the performance improvement over the serial algorithm is not as important as the absolute result of obtaining sub-second computation time. The CUDA PGA thus serves the objective of nearreal-time risk assessment, whereby interesting phenomena from emerging stock cluster behaviour can be identified and acted upon to mitigate adverse scenarios. The scalability of these results should be investigated in further research, in particular the impact of the CUDA memory hierarchy on computation time as global memory accesses increase. These results assume correlation matrices are readily available as inputs for the cluster analysis algorithm. Further research to investigate computationally efficient correlation estimation for high-frequency data is a separate problem in the objective of developing a robust and practical near-real-time risk assessment tool. Although the results are promising, it is not clear that the SPMD architecture used by CUDA is well-suited for the particular problem considered. The required data dependence across thread blocks restricts the assignment of population genes to threads and results in a large number of synchronisation calls to ensure consistency of each generation. An MPI island model with distributed fitness computation and controlled migration is perhaps a more well-posed solution [36], however the cost of the setup required to achieve the equivalent speed-up provided by CUDA is important to consider. This should be explored in further research. however we notice that GFI, a gold mining company, appears in the financial cluster and FSR, a banking company, does not appear in the financial cluster. These are examples of short-term decoupling behaviour of individual stocks due to idiosyncratic factors. Figure 3: Morning trading (after UK open) residual clusters (28 September 2012 10:21) Figure 3 illustrates the effect of the UK market open on local trading patterns. We see a clear emergence of a single large cluster, indicating that trading activity by UK investors has a significant impact on the local market. When examining the large single cluster, all of the stocks have either primary of secondary listings in the US and UK. In particular, SAB and ANG have secondary listings on the London Stock Exchange (LSE), whereas BIL and AGL have primary listings on the LSE [19]. It is also unusual to see such a strong link (correlation) between AGL, a mining company, and CFR, a luxury goods company. This may be evidence that significant UK trading in these 2 stocks can cause a short-term elevated correlation, which may not be meaningful or sustainable. 5.2.3. Interpretation of real world test set results In this section, we illustrate a sample of the resultant cluster configurations which were generated from our model, represented graphically as MSTs [24, 7]. This serves as a particular domain application which provides an example of resulting cluster configurations which have meaningful interpretations. The thickness of the vertices connecting nodes gives an indication of the strength of the correlation between stocks. The South African equity market is often characterised by diverging behaviour between financial/industrial stocks and resource stocks and strong coupling with global market trends. Figure 4: Midday trading residual clusters (28 September 2012 12:21) Figure 4 considers midday trading patterns. We see that the clustering effect from UK trading has dissipated and multiple disjoint clusters have emerged. CFR has decoupled from AGL in the 2 hours after the UK market open, as we might expect. We see a 4-node financial/industrial cluster (NPN, MTN, ASA, IMP) and 4-node resource cluster (AGL, SAB, SOL, BIL); IMP, a mining company, appears in the financial/industrial cluster. Figure 5: Afternoon trading (after US open) residual clusters (28 September 2012 15:33) Figure 5 illustrates the effect of the US market open on local trading patterns. Similar to what we observed in Figure 3, we see the emergence of a large single cluster, driven by elevated short-term correlations amongst constituent stocks. This provides further evidence that significant trading by foreign investors in local stocks can cause a material impact on stock market dynamics. Figure 2: Morning trading residual clusters (28 September 2012 09:03) In Figure 2, we see 4 distinct clusters emerge as a result of the early morning trading patterns, just after market open. Most notably, a 6-node financial/industrial cluster (SLM, SBK, ASA, SHF, GFI, OML) and a 3-node resource cluster (BIL, SOL, AGL). At face value, these configurations would be expected, 8 Environment GTX CUDA GTX MATLAB TESLA CUDA TESLA MATLAB Framework CUDA 5.5 Serial CUDA 5.5 Serial Benchmark 18-stock test set (optimal config) 18-stock test set (optimal config) 18-stock test set (optimal config) 18-stock test set (optimal config) Median Time (s) 0.80 7.77 1.39 15.91 Min Time (s) 0.73 6.72 1.36 13.41 Max Time (s) 3.17 13.27 5.51 26.22 Table 4: Benchmark computational speed results 6. Conclusion Acknowledgment This paper verifies that the Giada and Marsili [15] likelihood function is a viable, parallelisable approach for isolating residual clusters in datasets on a GPU platform. Key advantages compared to conventional clustering methods are: 1) the method is unsupervised and 2) the interpretation of results is transparent in terms of the model. The implementation of the master-slave PGA showed that efficiency depends on various algorithm settings. The type of mutation operator utilised has a significant effect on the algorithms efficiency to isolate the optimal solution in the search space, whilst the other adjoint parameter settings primarily impact the convergence rate. According to the benchmark test results, the CUDA PGA implementation runs 10-15 times faster than the serial GA implementation in MATLAB for detecting clusters in 18-stock real world correlation matrices. Specifically, when using the Nvidia GTX Titan Black card, clusters are recovered in sub-second speed, demonstrating the efficiency of the algorithm. Provided intraday correlation matrices can be estimated from high frequency data, this significantly reduced computation time suggests intraday cluster identification can be practical, for near-real-time risk assessment for financial practitioners. Detecting cluster anomalies and measuring persistence of effects may provide financial practitioners with useful information to support local trading strategies. From the sample results shown, it is clear that intraday financial market evolution is dynamic, reflecting effects which are both exogenous and endogenous. The ability of the clustering algorithm to capture interpretable and meaningful characteristics of the system dynamics, and the generality of its construction, suggests the method can be successful in other domains. Further investigations include adjoint parameter tuning and performance scalability for varying stock universe sizes and cluster types, quantifying the variability of solution quality on the GTX architecture as a result of non-ECC memory usage and the investigation of alternative cost-effective parallelisation schemes. Given the SPMD architecture used by CUDA, the required data dependence across thread blocks restricts the assignment of population genes to threads and results in a large number of synchronisation calls to ensure consistency of each generation. An MPI island model with distributed fitness computation and controlled migration is perhaps a more well-posed solution to explore [36], however the cost of the setup required to achieve the equivalent speed-up provided by CUDA should be justified. This work is based on the research supported in part by the National Research Foundation of South Africa (Grant numbers 87830, 74223 and 70643). The conclusions herein are due to the authors and the NRF accepts no liability in this regard. References References [1] Advanced Clustering Technologies. HPC Cluster Blog - GTX vs Tesla. See http://www.headachefreehpc.com/company-blog/hpc-clusterblog-gtx-vs-tesla.html for further details. Accessed 2014-09-25. [2] J. Baker. Reducing bias and inefficiency in the selection algorithm. Proceedings of the Second International Conference on Genetic Algorithms and their Application, Hillsdale, New Jersey, pp. 14-21, 1987. [3] M. Blatt, S. Wiseman, E. Domany. Superparamagnetic clustering of data. Phys. Rev. Lett., vol. 76, no. 18, pp. 3251-3254, 1996. [4] C. Bohm, R. Noll, C. Plant, B. Wackersreuther. Density-based clustering using graphics processors. Proceedings of the 18th ACM conference on Information and Knowledge Management, CIKM 09, ACM: New York, pp. 661-670, 2009. [5] S. Brecheisen, H.P. Kriegel, M. Pfeifle. Parallel density-based clustering of complex objects. PAKDD, Lecture Notes in Computer Science, Germany, vol. 3918, pp. 179188, 2006. [6] A. Brodtkorb, T. Hagen, M. Saetra. Graphics processing unit (GPU) programming strategies and trends in GPU computing. Journal of Parallel and Distributed Computing, vol. 73, pp. 4-13, 2012. [7] D. Cieslakiewicz. Unsupervised asset cluster analysis implemented with parallel genetic algorithms on the Nvidia CUDA platform. MSc Dissertation, University of the Witwatersrand, 2014. [8] D. Coley. An introduction to genetic algorithms for scientists and engineers. World Scientific, 1999. [9] A. Colorni, M. Dorigo, F. Maffioli, V. Maniezzo, G. Righini, M. Trubian. Heuristics from nature for hard combinatorial optimization problems. International Transactions in Operational Research vol. 3, pp. 1-21, 1996. [10] F. Darema. SPMD model: past, present and future. Recent Advances in Parallel Virtual Machine and Message Passing Interface: 8th European PVM/MPI Users’ Group Meeting, 2001. [11] T. Dessel, D.P. Anderson, M. Magdon-Ismail, H. Newberg, B.K. Szymanski, C.A. Varela. An analysis of massively distributed evolutionary algorithms. Proceedings from 2010 IEEE Congress on Evolutionary Computation (CEC), Barcelona, pp. 1-8, 2010. [12] J. Digalakis, K. Margaritis. Parallel evolutionary algorithms on MessageParsing clusters. Proceedings of Parallel Computing Conference, 2003. [13] B. Everitt, S. Landau, M. Leese. Cluster Analysis. Taylor and Francis, 2001. [14] T. Gebbie, D. Wilcox, B. Mbambiso. Spin, stochastic factor models, and a GA. Southern African Finance Association Conference, Cape Town, 2010. [15] L. Giada, M. Marsili. Data clustering and noise undressing of correlation matrices. Phys. Rev. E, vol. 63, no. 061101, 2001. [16] L. Giada, M. Marsili. Algorithms of maximum likelihood data clustering with applications. Physica A: Statistical Mechanics and its Applications, vol. 315, no. 34, pp. 650-664, 2002. [17] M. Ismail. Parallel Genetic Algorithms (PGAs): Master-Slave paradigm approach using MPI. IEEE e-Tech, vol. 31, pp. 83-87, 2004. 9 [18] A. Jaimes, C. Coello Coello. MRMOGA: a new parallel multi-objective evolutionary algorithm based on the use of multiple resolutions. Concurrency and Computation: Practice and Experience, vol. 19, no. 4, pp. 397441, 2007. [19] JSE. Dual-listed companies. URL: http://www.jse.co.za/how-tolist/main-board/dual-listed-companies.aspx, retrieved: 08/03/2014. [20] P. Kromer, J. Platos, V. Snasel. Data parallel density-based genetic clustering on the CUDA architecture. Concurrency and Computation: Practice and Experience, vol. 26, no. 5, pp. 1097-1112, 2014. [21] J. Kruskal. On the shortest spanning subtree of a graph and the traveling salesman problem. Proceedings of the American Mathematical Society, vol. 7, pp. 4850, 1956. [22] L. Kullmann,J. Kertész, R.N. Mantegnae. Identification of clusters of companies in stock indices via Potts super-paramagnetic transitions, arXiv:cond-mat/0002238v2. [23] G. Luque, E. Alba. Parallel Genetic Algorithms. Springer-Verlag, 2011. [24] B. Mbambiso. Dissecting the South African equity markets into sectors and states. MSc dissertation, University of Cape Town, 2009. [25] L. Nan, G. Pengdong, L. Yongquan, Y. Wenhua. The implementation and comparison of two kinds of parallel genetic algorithm using Matlab. Ninth International Symposium on Distributed Computing and Applications to Business, Engineering and Science, 2010. [26] J.D. Noh. A model for correlations in Stock Markets. Physical Review E, vol. 61, pp. 5981, 2000. [27] Nvidia. Nvidia CUDA C Programming Guide. Nvidia Corporation, 2011. [28] Nvidia. CUDA Dynamic Parallelism Programming Guide. Nvidia Corporation, 2012. [29] Nvidia. CUDA C Best Practices Guide. Nvidia Corporation, 2012. [30] M. Omran, A. Salaman, A. Engelbrecht. Dynamic clustering using particle swarm optimization with application in image segmentation. Pattern Analysis and Applications, vol. 8, no. 4, pp. 332-344. [31] P. Pospichal, J. Jaros, J. Schwarz. Parallel genetic algorithm on the cuda architecture. Proceedings of the 2010 International Conference on Applications of Evolutionary Computation (EvoApplicatons’10), SpringerVerlag, vol. 1,pp. 442-451, 2010. [32] D. Robilliard, V. Marion, C. Fonlupt. High performance genetic programming on GPU. Proceedings of the 2009 Workshop on Bio-inspired Algorithms for Distributed Systems, BADS 09, ACM: New York, NY, USA, pp. 8594, 2009. [33] S. Sivanandam, S. Deepa. Introduction to Genetic Algorithms. Springer, 2010. [34] D. Sornette. Critical Phenomena in Natural Sciences: Chaos, Fractals, Selforganization and Disorder: Concepts and Tools, Springer, 2000. [35] V. Tirumalai, K. Ricks, K. Woodbury. Using parallelization and hardware concurrency to improve the performance of a genetic algorithm. Concurrency and Computation: Practice and Experience, vol. 19, no. 4, pp. 443462, 2007. [36] D. Whitley, S. Rana, R. Heckendorn. The island model genetic algorithm: On separability, population size and convergence. Journal of Computing and Information Technology, vol. 7, pp. 33-47, 1999. [37] D. Wilcox, T. Gebbie. An analysis of Cross-correlations in South African Market data. Physica A, vol. 375, pp. 584-598, 2007. [38] F.Y. Wu. The Potts model, Rev. Mod. Phys., vol. 54, pp. 235-268, 1982. [39] S. Xiao, W. Feng. Inter-Block GPU Communication via Fast Barrier Synchronization. 2010 IEEE International Symposium on Parallel & Distributed Processing (IPDPS), pp. 1-12, 2010. [40] S. Zhang, Z. He. Implementation of parallel genetic algorithm based on cuda. Proceedings of the 4th International Symposium on Advances in Computation and Intelligence, ISICA ’09, Berlin, Heidelberg, SpringerVerlag, pp. 24-30, 2009. [41] G. Zhang,W. Liu, G. Liu. Parallel genetic algorithm based on the MPI environment. Telkomnika, vol. 10, pp. 1708-1715, 2012. 10
9cs.NE
arXiv:1605.00384v3 [math.AG] 30 Jan 2017 WARING LOCI AND THE STRASSEN CONJECTURE ENRICO CARLINI, MARIA VIRGINIA CATALISANO, AND ALESSANDRO ONETO Abstract. The Waring locus of a form F is the collection of the degree one forms appearing in some minimal sum of powers decomposition of F . In this paper, we give a complete description of Waring loci for several family of forms, such as quadrics, monomials, binary forms and plane cubics. We also introduce a Waring loci version of Strassen’s Conjecture, which implies the original conjecture, and we prove it in many cases. 1. Introduction L Let S = C[x0 , . . . , xn ] = i≥0 Si be the standard graded polynomial ring. An element in Si , that is a degree i homogeneous polynomial, is called a form. A Waring decomposition, also called a sum of powers decomposition, of F ∈ Sd is an expression of the form F = Ld1 + . . . + Ldr , for linear forms Li ∈ S1 . The Waring rank, or simply rank, of F is rk(F ) = min{r : F = Ld1 + . . . + Ldr , Li ∈ S1 for 1 ≤ i ≤ r}, and we say that a Waring decomposition of F is minimal if it involes rk(F ) summands. In the last decades, an intense research activity focused on computing Waring ranks and (minimal) Waring decompositions of homogeneous polynomials. A celebrated result in this field is due to J.Alexander and A.Hirschowitz who determined the rank of a generic form [AH95], but still very little is known for given specific forms. The main abstract tools to deal with Waring ranks are in [LT10, CCCGW15b]. One of the main reason for the great interest in Waring ranks and Waring decompositions is due to the relations with the theory of symmetric tensors and their decompositions as sums of rank one tensors which have applications in Algebraic Statistics, Biology, Quantum Information Theory and more, see [Lan12]. In this paper we investigate minimal Waring decompositions. Of particular interest are the cases when the minimal Waring decomposition is unique, called in the literature the identifiable cases, see [CC06, Mel06, Mel09, BCO14, COV15, GM16]. Since finding a minimal Waring decomposition is usually beyond our computational capabilities, we decide to investigate properties of all minimal Waring decompositions of a given form at once. Definition 1.1. Given a form F , we define the Waring locus of F as the set of linear forms that appear, up to scalar, in a minimal Waring decomposition of F , namely WF = {[L] ∈ P(S1 ) : ∃L2 , . . . , Lr ∈ S1 , F ∈ hLd , Ld2 , . . . , Ldr i, r = rk(F )}. We define the locus of forbidden points as its complement, FF = P(S1 ) \ WF . 1 2 E. CARLINI, M. V. CATALISANO, AND A. ONETO In [BC13], the authors suggested the importance of the study of the Waring loci of homogeneous polynomials. In particular, they proved that WF has no isolated points if F ∈ Sd is not identifiable and if rk(F ) < 3d 2 . One of our main result is a description of WF , or equivalently of FF , in the following cases: (1) quadrics, that is degree two forms, see Corollary 3.2; (2) monomials, see Theorem 3.3; (3) binary forms, that is forms in two variable, see Theorem 3.5; (4) plane cubics, that is degree three forms in three variables, see Section 3.4; (5) sums of particular families of homogeneous polynomials in different set of variables, see Theorem 4.6 and Section 5. In Section 2, we introduce the basics facts and our main tool: the Apolarity Lemma, Lemma 2.1. The Apolarity Lemma provides a very explicit recipe to find Waring decompositions of an homogeneous polynomials F . In particular, it states that Waring decompositions of F corresponds to ideals of reduced points contained in the ideal F ⊥ , namely the ideal of polynomials annihilating F by acting as differentials. The reason why we succeeded in finding Waring loci in the cases listed above is that those are the cases when we can give a very precise description of all the possible minimal set of reduced points contained in the annihilating ideals. In Section 3, we present our main results about Waring loci. In Section 4, we discuss relations with Strassen’s conjecture. In Section 5, we present some more technical results and open problems. Acknowledgment. The authors want to thank Jaroslaw Buczyński and Brian Harbourne for comments on an earlier version of the paper. They are also very grateful to the anonymous referee for her/his constructive criticism. The third author wants to thank the first author and the School of Mathematical Sciences at Monash University (Australia) for the hospitality during a visit of three months while the work has been mostly done. The visit has been partially supported by G S Magnuson Foundation from Kungliga Vetenskapsakademien (Sweden). The first and second author were partially supported by GNSAGA of INdAM and by MIUR funds (Italy). 2. Basics We introduce some basic notions on Apolarity theory, see L L also [IK99, Ger96]. We consider two polynomial rings S = C[x0 , . . . , xn ] = i≥0 Si and T = C[X0 , . . . , Xn ] = i≥0 Ti with standard gradation, where S has the structure of a T -module via differentiation; namely, we consider the apolarity action given by g ◦ F = g(∂x0 , . . . , ∂xn )F, for g ∈ T, F ∈ S. Given F ∈ Sd we define the apolar ideal of F as F ⊥ = {∂ ∈ T : ∂ ◦ F = 0}. We say that F ∈ C[x0 , . . . , xn ] essentially involves t + 1 variables if dim(F ⊥ )1 = n − t. In other words, if F essentially involves t + 1 variables, there exist linear forms l0 , . . . , lt ∈ C[x0 , . . . , xn ] such that F ∈ C[l0 , . . . , lt ], see [Car06]. We are interested in describing the minimal Waring decompositions of a form F ∈ Sd and our main tool is the following. WARING LOCI AND THE STRASSEN CONJECTURE 3 Lemma 2.1 (Apolarity Lemma). Let X = {P1 , . . . , Ps } ⊂ Pn be a set of reduced points where (i) (i) (i) (i) Pi = [p0 : . . . : pn ], for all i = 1, . . . , s, and let Li = p0 x0 + . . . + pn xn , for all i = 1, . . . , s. Then, if F is a degree d homogeneous polynomial, the following are equivalent: (1) IX ⊂ F ⊥ ; (2) F = c1 Ld1 + . . . + cs Ls , for c1 , . . . , cs ∈ C. A set of points X such that the conditions of Apolarity Lemma hold is said to be apolar to F . Example 2.2. Consider the monomial M = xyz ∈ C[x, y, z]. It is easy to check that M ⊥ = (X 2 , Y 2 , Z 2 ). Hence the ideal I = (X 2 − Y 2 , X 2 − Z 2 ) ⊂ F ⊥ corresponds to the four reduced points [1 : ±1 : ±1] and we have the Waring decomposition  1  (x + y + z)3 − (x − y + z)3 − (x + y − z)3 + (x − y − z)3 . M= 24 We can describe the Waring locus of a form F in terms of the apolar points to F , namely WF = {P ∈ Pn : P ∈ X, IX ⊂ F ⊥ and |X| = rk(F )}. The following result, also given in [BL13] in the case of tensors, allows us to study a form F in the ring of polynomials with the smallest number of variables. In particular, we want to show that, if F ∈ C[y0 , . . . , ym ] essentially involves n + 1 variables and X is a minimal set of points apolar to F , then X ⊂ Pm is contained in a n-dimensional linear subspace of Pm . Hence, WF ⊂ Pn contains all points belonging to any minimal set of points apolar to F . Proposition 2.3. Let F ∈ C[x0 , . . . , xn , xn+1 , . . . , xm ] be a degree d form such that (F ⊥ )1 = (Xn+1 , . . . , Xm ). If r X Ldi F = 1 where r = rk(F ) and the Li are linear forms in C[x0 , . . . , xn , xn+1 , . . . , xm ], then Li ∈ C[x0 , . . . , xn ] ⊂ C[x0 , . . . , xn , xn+1 , . . . , xm ] for all i, 1 ≤ i ≤ r. P Proof. We proceed by contradiction. Assume that L1 = xn+1 + i6=n+1 ai xi , that is to assume that L1 actually involves the variable xn+1 . By assumption rk(F − Ld1 ) < r = rk(F ). However, since L1 is linearly independent with x1 , . . . , xn we can apply the following fact (see [CCC15a, Proposition 3.1]): if y is a new variable, then rk(F + y d ) = rk(F ) + 1. Hence, rk(F − Ld1 ) = rk(F ) + 1 and this is a contradiction.  Remark 2.4. Using the previous result, performing a linear change of variables, and restricting the ring, we may always assume that F ∈ Sd essentially involves n + 1 variables; hence, we always see WF and FF as subsets of Pn . 3. Waring loci In this section, we give our results about WF and FF . 4 E. CARLINI, M. V. CATALISANO, AND A. ONETO 3.1. Quadrics. We begin with the study of elements of S2 , i.e. quadrics in Pn . We recall that to each quadric Q we can associate a symmetric (n + 1) × (n + 1) matrix AQ and that rk(Q) equals the rank of AQ . Proposition 3.1. If Q = x20 + . . . + x2n , then FQ = V (Q̌) ⊂ Pn , where Q̌ = X02 + . . . + Xn2 ∈ T2 . Proof. A point P = [a0 : . . . : an ] is a forbidden point for Q if and only if rk(Q − λL2P ) = n + 1, for all λ ∈ C P where LP = n0 ai xi . Thus, P is a forbidden point for Q if and only if the symmetric matrix corresponding to the quadratic form Q − λL2P has non-zero determinant for all λ ∈ C. Thus, P is a forbidden point if and only if the symmetric matrix AL2 corresponding to L2 only have zero matrix). eigenvalues (note that, over C, AL2 is not necessarily similar to a diagonal P We now prove that AL2 only have zero eigenvalues if and only if n0 a2i = 0. Assume that zero is the only eigenvalue of AL2 . Let a = ( a0 . . . an ) and note that aAL2 = (a20 + . . . + a2n )a, P thus n0 a2i = 0 since an eigenvalue. Pnit is 2 Now assume that 0 ai = 0. Note that A2L2 = n X 0 a2i ! AL2 . thus A2L2 = 0 and hence zero is the only eigenvalue. P Hence, P is a forbidden point if and only if n0 a2i = 0 and the proof is now completed.  Corollary 3.2. Let Q(x0 , . . . , xn ) ∈ S2 be a rank n + 1 quadric and let B be an (n + 1) × (n + 1) matrix such that the change of variables (x0 , . . . , xn ) = (y0 , . . . , yn )B gives Q = y02 + . . . + yn2 . Then, FQ = V (Q̌) ⊂ Pn , where Q̌(X0 , . . . , Xn ) is the quadratic form (X0 . . . Xn )B t B(X0 . . . Xn )t . P Proof. Let P = [a0 : . . . : an ] and LP = n0 ai xi = (a0 , . . . , an )(x0 , . . . , xn )t . By the the linear change of variables (x0 , . . . , xn ) = (y0 , . . . , yn )B, we get LP = (a0 , . . . , an )B t (y0 , . . . , yn )t . Let (a0 , . . . , an )B t = (b0 , . . . , bn ), so that LP = b0 y0 P + · · · + bn yn . Using Proposition 3.1 we know that a point [b0 : . . . : bn ] ∈ FQ(y0 ,...,yn ) if and only if b2i = 0. That is, (a0 , . . . , an )B t B(a0 , . . . , an )t = 0. and the result follows.  WARING LOCI AND THE STRASSEN CONJECTURE 5 3.2. Monomials. In this section, we consider monomials xd00 . . . xdnn ∈ C[x0 , . . . , xn ]. We always assume that the exponents are increasingly ordered, that is d0 ≤ . . . ≤ dn . In [CCG12], the authors proved an explicit formula for the Waring rank of monomials, i.e. n rk(xd00 . . . xdnn ) 1 Y = (di + 1). d0 + 1 i=0 We also know from [BBT13] that minimal sets of apolar points to monomials are complete intersections, namely they are given by the intersection of n hypersurfaces in Pn of degrees d1 +1, . . . , dn +1 intersecting properly. Moreover, it is known that, using our new terminology, the points lying on the hyperplane {Xi = 0}, for i = 0, . . . , m, where m = max{i | di = d0 } are forbidden. This is implicitly proved during the proof of [CCG12, Proposition 3.1] and can also be found in [BBT13, Corollary 19]. Here, we prove that these are actually the only forbidden points of monomials. Theorem 3.3. If M = xd00 · · · xdnn ∈ S , then FM = V (X0 · · · Xm ) ⊂ Pn , where m = max{i | di = d0 }. Proof. The perp ideal of M is M ⊥ = (X0d0 +1 , . . . , Xndn +1 ). Consider any point P = [p0 : . . . : pn ] ∈ / V (X0 · · · Xm ), we may assume p0 = 1 and we will prove that P ∈ WM , that is P 6∈ FM . We construct the following hypersurfaces in Pn  di +1  − pdi i +1 X0di +1 if pi 6= 0; Xi Hi =   di +1 Xi − Xi X0di if pi = 0. Note that, for any i = 1, . . . , n, the hypersurface Hi = 0 is the union of di + 1 hyperplanes. The ideal I = (H1 , . . . , Hn ) is contained in M ⊥ and V (I) is the set of reduced points [1 : q1 : . . . : qn ] where  j  if pi 6= 0, where ξidi +1 = 1; {ξi pi | j = 0, . . . , di }, qi ∈   j {ξi | j = 0, . . . , di − 1} ∪ {0}, if pi = 0, where ξidi = 1. Thus, we have a set of rk(M ) distinct points apolar to M and containing the point P ; hence, P ∈ WM and V (X0 · · · Xm ) ⊃ FM . To conclude the proof we need to prove that V (X0 · · · Xm ) ⊂ FM and this readily follows by [CCG12, Remark 3.3] or by [BBT13, Corollary 19].  Remark 3.4. In the case d0 ≥ 2, the second part of the proof can be explained as a direct consequence of the formula for the rank of monomials. Indeed, in the same notations as Theorem 3.3, for any i = 1, . . . , m,Pwe have that rk(M ) = rk(∂xi ◦ M ). Therefore, given any minimal Waring decomposition of M = rj=1 Ldj , by differentiating both sides, we must have ∂xi ◦ Lj 6= 0 for all i = 1, . . . , m. Hence [Lj ] ∈ / V (X0 · · · Xm ). 6 E. CARLINI, M. V. CATALISANO, AND A. ONETO 3.3. Binary forms. In this section we deal with the case n = 1, that is the case of forms in two variables. The knowledge on the Waring rank of binary forms goes back to J.J. Sylvester [Syl51]. It is known that, if F ∈ C[x, y]d , then F ⊥ = (g1 , g2 ) and deg(g1 ) + deg(g2 ) = d + 2. Moreover, if we assume d1 = deg(g1 ) ≤ d2 = deg(g2 ), then rk(F ) = d1 if g1 is square free and rk(F ) = d2 otherwise. See [CS11] for more about the rank of binary forms. Theorem 3.5. Let F be a degree d binary form and let g ∈ F ⊥ be an element of minimal degree. Then, (1) if rk(F ) < ⌈ d+1 2 ⌉, then WF = V (g); (2) if rk(F ) > ⌈ d+1 2 ⌉, then FF = V (g); d+1 (3) if rk(F ) = ⌈ 2 ⌉ and d is even, then FF is finite and not empty; if rk(F ) = ⌈ d+1 2 ⌉ and d is odd, then WF = V (g). Proof. (1) It is is enough to note that the decomposition of F is unique and the unique apolar set of points is V (g). (2) As mentioned above, in this case we have that F ⊥ = (g1 , g2 ), where d1 = deg(g1 ) < deg(g2 ) = d2 , d1 + d2 = d + 2, g1 is not square free, and rk(F ) = d2 . In particular, g1 is an element of minimal degree in the apolar ideal. We first show that FF ⊇ V (g1 ). Let P = V (l) ∈ V (g1 ) for some linear form l, that is l divides g1 . We want to show that there is no apolar set of points to F containing P . Thus, it is enough to show that there is no square free element of degree d2 in F ⊥ divisible by l. Since g1 and g2 have no common factors, and l divides g1 , it follows that the only elements of degree d2 in F ⊥ divisible by l are multiples of g1 , thus they are not square free. Hence, P ∈ FF . We now prove that FF ⊆ V (g1 ) by showing that, if P = V (l) 6∈ V (g1 ), then P ∈ WF . Note that l does not divide g1 and consider F ⊥ : (l) = (l ◦ F )⊥ = (h1 , h2 ) where c1 = deg(h1 ), c2 = deg(h2 ) and c1 + c2 = d + 1. Since h1 is a minimal degree element in F ⊥ and l does not divide g1 , we have h1 = g1 and c2 = d2 − 1. Thus rk(F ) = rk(l ◦ F ) + 1. Since (F ⊥ : (l))d2 −1 is base point free, we can choose h ∈ F ⊥ : (l) to be a degree d2 − 1 square free element not divisible by l. Hence, P ∈ V (lh) and V (lh) is a set of d2 points apolar to F . (3) Let F ⊥ = (g1 , g2 ), d1 = deg(g1 ), and d2 = deg(g2 ). If d is odd, then d2 = d1 +1 and rk(F ) = d1 ; thus g1 is a square free element of minimal degree and F has a unique apolar set of d1 distinct points, namely V (g1 ). This proves the d odd case. If d is even, then d1 = d2 = rk(F ) and F has infinitely many apolar sets of rk(F ) distinct points. However, for each P ∈ P1 there is a unique set of rk(F ) points (maybe not distinct) apolar to F and containing P . That is, there is a unique element (up to scalar) g ∈ (F ⊥ )d1 vanishing at P . Thus, P ∈ FF if and only if g is not square free. There are finitely many not square free elements in (F ⊥ )d1 since they correspond to the intersection of the line given by (F ⊥ )d1 in P(Td1 ) with the hypersurface given by the discriminant; note that the line is not contained in the hypersurface since (F ⊥ )d1 contains square free elements.  Remark 3.6. We can provide a geometric interpretation of Theorem 3.5 for F a degree d binary form of rank d, the maximal possible. In this case, after a change of variables, we can assume F = xy d−1 . To see geometrically that [0 : 1] ∈ FF , we consider the point [y d ] on the degree d rational normal curve of Pd . Note that [F ] belongs to the tangent line to the curve in [y d ]. Thus, it is easy to see that there does not exist a hyperplane containing [F ] and [y d ] and cutting the rational WARING LOCI AND THE STRASSEN CONJECTURE 7 normal curve in d distinct points. To prove geometrically that FF = {[0 : 1]} one can argue using Bertini’s theorem. However, for forms of lower rank, we could not find a straightforward geometrical explanation. We can improve part (3) of Theorem 3.5 for d even adding a genericity assumption. Proposition 3.7. Let d = 2h. If F ∈ Sd is a generic form of rank h + 1, then FF is a set of 2h2 distinct points. Proof. Let ∆ ⊂ Ph+1 be the variety of degree h + 1 binary forms having at least a factor of multiplicity two. Note that forms having higher degree factors, or more than one repeated factor, form a variety of codimension at least one in ∆. In particular, a generic line L will meet ∆ in deg ∆ distinct points each point corresponding to a form of the type B12 B2 . . . Bh and Bi is not proportional to Bj if i 6= j. Now, recall the well-known Macaulay’s duality between artinian Gorenstein algebras AF ≃ S/F ⊥ of socle degree d and homogeneous forms of degree d. For a generic F ∈ Sd we have F ⊥ = (g1 , g2 ) where deg(g1 ) = deg(g2 ) = h+1. Therefore, we have that a generic form F determines a generic line in Ph+1 and viceversa. The non square free elements of (F ⊥ )h+1 corresponds to L∩∆ where L is the line given by (F ⊥ )h+1 . By genericity, L ∩ ∆ consists of exactly deg(∆) points each corresponding to a degree h + 1 form fi having exactly one repeated factor of multiplicity two. Since every two elements in (F ⊥ )h+1 have no common factors, it follows that [ V (fi ) FF = i is a set of h deg(∆) distinct points. Since deg(∆) = 2h, the result is now proved.  We can also iterate the use of Theorem  3.5 to construct a Waring decomposition for a given binary  form. Let F ∈ Sd with rank r ≥ d+1 2 , so that the Waring decomposition is not unique, we can think of constructing such a decomposition one addend at the time. From our result, we know that in this case the forbidden locus is a closed subset FF = V (g) where g is an element in F ⊥ of minimal degree; hence, we can pick any point [L1 ] in the open set P1 \ V (g) to start our Waring decomposition of F . This means that there exists λ1 ∈ C suchthat F1 = F − λ1 Ld1 has rank one less than the rank of F . If the rank of F1 is still larger than d+1 2 , we can proceed in the same way as before. We may observe that FF1 = FF ∪ [L1 ]. Indeed, by Theorem 3.5, FF1 = V (g1 ), where g1 is an element of minimal degree of F1⊥ . Since rk(F1 ) = rk(F ) − 1, ∨ we have that deg(g1 ) = deg(g) + 1, in particular it has to be g1 = gL∨ 1 , where L1 is the linear differential operator annihilating L1 . Hence, we can continue to construct our decomposition for F by taking any point [L2 ] ∈ P1 \ V (g1 ) and a suitable λ2 ∈ C such that F2 = F − λ1 Ld1 − λ2 Ld2 has rank  to rk(F ) − 2. We can continue this procedure until we get a form Fi with rank equal  equal to d+1 2 . If d is odd, we can actually do one more step and arrive to a form Fi with rank strictly less than d+1 2 . In other words, we have proven the following result. Proposition 3.8. Let F be a degree d binary form of rank r ≥ ⌈ d+1 2 ⌉. For any choice of [L1 ], . . . , [Ls ] ∈ / FF where s = r − ⌈ d+1 ⌉ there exists a minimal Waring decomposition for F 2 d d involving L1 , . . . , Ls . If d is odd, then it is also unique. 8 E. CARLINI, M. V. CATALISANO, AND A. ONETO 3.4. Plane cubics. In this section we describe WF (and FF ) for n = 2 and F ∈ S3 , that is for plane cubics. For simplicity, we let S = C[x, y, z] and T = C[X, Y, Z]. We use the following characterization of plane cubics adapted from the table given in [LT10]. Description Normal form Waring rank Result Type 3 (1) triple line x 1 Theorem 3.3 three concurrent lines xy(x + y) 2 Theorem 3.5 (2) (3) double line + line x2 y 3 Theorem 3.3 smooth x3 + y 3 + z 3 3 Theorem 4.6 (4) (5) three non-concurrent lines xyz 4 Theorem 3.3 x(yz + x2 ) 4 Theorem 3.12 (6) line + conic (meeting transversally) nodal xyz − (y + z)3 4 Theorem 3.13 (7) (8) cusp x3 − y 2 z 4 Theorem 5.1 3 3 3 3 3 general smooth (a 6= −27, 0, 6 ) x + y + z + axyz 4 Theorem 3.16 (9) line + tangent conic x(xy + z 2 ) 5 Theorem 3.18 (10) Note. In case (9), a3 6= 0, 63 so that the rank is actually 4 and a3 6= −27 for smoothness of the Hessian canonical form [Dol12]. Remark 3.9. We have already analyzed several cases: (1),(3),(5): they are monomials and it follows from Theorem 3.3; (2): these forms can be seen as forms in two variables, hence it follows from Theorem 3.5(3); (4): smooth plane cubics can be seen as sums of pairwise coprime monomials with high exponents which are analyzed separately in the next section, see Theorem 4.6; (8): plane cubic cusps can be seen as the kind of sums of pairwise coprime monomials that we have analyzed in Theorem 5.1. We now study plane cubics of rank four. First, we need the following lemma. Lemma 3.10. Let F be a plane cubic of rank four and let X be a set of four distinct points apolar to F . If X has exactly three collinear points, then F is a cusp, that is F is of type (8). Proof. We can assume that the three collinear points lie on the line defined by X and the the point not on the line is [1 : 0 : 0]. Thus, XY, XZ ∈ F ⊥ and F = x3 + G(y, z). By [CCC15a, Proposition 3.1] we have that rk(F ) = 1 + rk(G) and thus rk(G) = 3. Since all degree three binary cubics of rank three are monomials we get that, after a change of variables, G can be written as LM 2 , where L, M ∈ C[y, z] are linear forms. Hence, F = x3 + LM 2 and this completes the proof.  Among the rank 4 plane cubics, we have already analyzed the cusps. Now, we consider families (6),(7) and (9). Due to Lemma 3.10, we can actually study these families using the approach described in the following remark. Remark 3.11. Let F be a rank four plane cubic which is not a cusp. Since F is not a binary form, L = (F ⊥ )2 is a net of conics and we let L = hC1 , C2 , C3 i. Since F is not a cusp, all set of four points apolar to F are the complete intersection of two conics. Thus, when we look for minimal Waring decompositions of F , we only need to look at pencils of conics contained in L with four distinct base points. In particular, fixing a point P ∈ P2 , we can consider the pencil L(−P ) of plane conics in L passing through P . If L(−P ) has four distinct base points, then P ∈ WF ; otherwise, we have that the base WARING LOCI AND THE STRASSEN CONJECTURE 9 locus of L(−P ) is not reduced and P ∈ FF . In the plane P(L), we consider the degree three curve ∆ of reducible conics in L. We recall that a pencil of conics L′ has four distinct base points, no three of them collinear, if and only if the pencil contains exactly three reducible conics. In conclusion, given a point P ∈ P2 , we consider the line P(L(−P )) ⊂ P(L): if the line is a proper secant line of ∆, that is it cuts ∆ in three distinct points, we have that P ∈ WF ; otherwise, P ∈ FF . Thus we ˇ ⊂ P̌(L) of lines not intersecting ∆ in three distinct points. have to study the dual curve ∆ ˇ An equation for ∆ can be found with a careful use of elimination. To explicitly find FF we the consider the map: φ : P(S1 ) −→ P̌(L) such that φ([a : b : c]) = [C1 (a, b, c) : C2 (a, b, c) : C3 (a, b, c)]. Note that φ is defined everywhere and that it is generically 4 : 1. In particular, ˇ FF = φ−1 (∆). Theorem 3.12. If F = x(yz + x2 ), then FF = V (XY Z(X 2 − 12Y Z)). Proof. Let L = (F ⊥ )2 and let C1 : C1 = X 2 − 6Y Z = 0, C2 : C2 = Y 2 = 0, and C3 : C3 = Z 2 = 0 be the conics generating L. In the plane P(L) with coordinate α, β and γ, let ∆ be the cubic of reducible conics in L. By computing we get the following equation for ∆:   α 0 0 β −3α = 0, det  0 0 −3α γ that is, αβγ − 9α3 = 0. In this case, ∆ is the union of the conic C : 9α2 − βγ = 0 and the secant line r : α = 0. The line r corresponds to L(−[1 : 0 : 0]) and then, by Remark 3.11, we have that [1 : 0 : 0] ∈ FF . By Remark 3.11, in order to completely describe FF , we have to study two family of lines in P(L): the tangents to the conic C and all the lines passing through the intersection points between the line r and the conic C, that is through the points [0 : 0 : 1] and [0 : 1 : 0]. More precisely the point P = [X : Y : Z] is in FF if and only if the line L (of the plane P(L) ) L : C1 (P )α + C2 (P )β + C3 (P )γ = 0, that is, L : α(X 2 − 6Y Z) + βY 2 + γZ 2 = 0, falls in one of the following cases: (i) L is tangent to the conic C : βγ − 9α2 = 0; (ii) L passes through the point [0 : 1 : 0]; (iii) L passes through the point [0 : 0 : 1]. In case (ii) and (iii) we get that Y 2 = 0 and Z 2 = 0, respectively. So V (Y Z) ⊂ FF . Now, by assuming P ∈ / {Y Z = 0}. By an easy computation we get that the line L is tangent to the conic C if X 2 (X 2 − 12Y Z) = 0. It follows that FF = V (XY Z(X 2 − 12Y Z)). See Figure 1.  We now consider family (7), that is nodal cubics. 10 E. CARLINI, M. V. CATALISANO, AND A. ONETO X=0 [0:1:0] • Z=0 • [1:0:0] • [0:0:1] X 2 − 12Y Z = 0 Y =0 Figure 1. The forbidden points of F = x(yz + x2 ). Theorem 3.13. If F = y 2 z − x3 − xz 2 , then FF = V (g1 g2 ) where g1 = X 3 −6Y 2 Z +3XZ 2 and g2 = 9X 4 Y 2 −4Y 6 −24XY 4 Z −30X 2 Y 2 Z 2 +4X 3 Z 3 −3Y 2 Z 4 − 12XZ 5 . Proof. Note that [1 : 0 : 0] ∈ FF . In fact F + x3 = z(y 2 − xz) represents a conic and a line tangent to it, namely it is in the family (10) and hence it has rank equal to five. Let L = (F ⊥ )2 and denote by C1 : C1 = XY = 0, C2 : C2 = X 2 − 3Z 2 = 0 and C3 : C3 = Y 2 + XZ = 0 its generators. In the plane P(L) with coordinates α, β, and γ let ∆ be the cubic of reducible conics in L. By computing we see ∆ that is defined by   β 21 α 21 γ det  12 α γ 0  = 0, 1 0 −3β 2γ that is, 3α2 β − 12β 2 γ − γ 3 = 0. In this case, we have that ∆ is an irreducible smooth cubic. Hence, we have that (1) FF = {P ∈ P2 : P(L(−P )) is a tangent line to ∆ ⊂ P(L)}. Thus, we are looking for points P such that the line C1 (P )α + C2 (P )β + C3 (P )γ = 0 is tangent to ∆. We consider two cases, namely C1 (P ) = 0 and C1 (P ) 6= 0. WARING LOCI AND THE STRASSEN CONJECTURE 11 If C1 (P ) 6= 0, we compute α from the equation of the line and we substitute in the equation of ∆. Then it is enough to compute the discriminant D of the following form in β and γ 3(C2 β + C3 γ)2 β − 12C12 β 2 γ − C12 γ 3 and we get D = 27C14 g12 g2 . The script used in Macaulay2 to do this computation can be found in [O16, Algorithm 2.3.23]. Thus, if C1 (P ) 6= 0, P ∈ FF if and only if P ∈ V (g1 g2 ). If C1 (P ) = 0, by direct computation we check that FF ∩ V (C1 ) = V (g1 g2 ) ∩ V (C1 ). Hence the proof is completed.  Remark 3.14. In this paper we consider FF , and WF , as varieties and not as schemes. However, we found in Theorem 3.13 that the ideal of FF is (g12 g2 ). Remark 3.15. The treatment of the forbidden locus of a plane cubic given in (1) is similar to a remark by De Paolis recently recalled in [Ban14]. Here, the author gives an algorithm to construct a decomposition of a general plane cubic F as sum of four cubes of linear forms. The algorithm starts with a linear form defining a line intersecting the Hessian of F in precisely three points. We now consider the case of cubics in family (9) and we use the map φ defined in Remark 3.11. Theorem 3.16. If F = x3 + y 3 + z 3 + axyz belongs to family (9), then  3 3 −54 ˇ where ∆ ˇ is the dual curve of the smooth plane cubic (1) if a 9a 6= 27, then FF = φ−1 (∆) (a3 − 54) αβγ = 0; 9a (2) otherwise, FF is the union of three lines pairwise intersecting in three distinct points. α3 + β 3 + γ 3 − Proof. Let L = (F ⊥ )2 and denote by C1 : C1 = aX 2 − 6Y Z = 0, C2 : C2 = aY 2 − 6XZ = 0, and C3 : C3 = aZ 2 − 6XY = 0 its generators. In the plane P(L) with coordinates α, β, and γ let ∆ be the cubic curve of reducible conics. By computing we get an equation for ∆   aα −3γ −3β det −3γ aβ −3α = (a3 − 54)αβγ − 9aα3 − 9aβ 3 − 9aγ 3 = 0. −3β −3α aγ  3 3 −54 In the numerical case a 9a 6= 27, we have that ∆ is a smooth cubic curve. Thus, we have that FF = {P ∈ P2 : P(L(−P )) is a tangent line to ∆ ⊂ P(L)}. Hence we get FF as described in Remark 3.11 using the map φ. Otherwise, ∆ is the union of three lines intersecting in three distinct points Q1 , Q2 and Q3 . Hence, FF = {P ∈ P2 : Qi ∈ P(L(−P )) for some i} and the proof is now completed.  Example 3.17. Consider a = −6, thus we are in case (1) of Theorem 3.16. We can find equations for FF using Macaulay2 [GS]. The script used can be found in [O16, Algorithm 2.3.23]. Hence, FF = V (g1 g2 ), 12 E. CARLINI, M. V. CATALISANO, AND A. ONETO where g1 = X 3 + Y 3 − 5XY Z + Z 3 and g2 = 27X 6 − 58X 3 Y 3 + 27Y 6 − 18X 4 Y Z − 18XY 4 Z − 109X 2 Y 2 Z 2 − 58X 3 Z 3 − 58Y 3 Z 3 − 18XY Z 4 + 27Z 6 . We conclude with family (10), that is cubics of rank five. Theorem 3.18. If F = x(xy + z 2 ), then FF = {[1 : 0 : 0]}. Proof. Let L be a linear form. The following are equivalent: (i) [L] ∈ FF ; (ii) rk(F − λL3 ) = 5 for all λ ∈ C; (iii) F − λL3 = 0 is the union of an irreducible conic and a tangent line, for all λ ∈ C; (iv) F and L3 must have the common factor L, that is, the line L = 0 is the line x = 0. . It easy to show that (i) and (ii) are equivalent. For the equivalence between (ii) and (iii) see the table in Subsection 3.4. If (iii) holds, then all the elements in the linear system given by F and L3 are reducible; note that the linear system is not composed with a pencil. Thus, by the second Bertini’s Theorem, the linear system has the fixed component x = 0. To see that (iv) implies (iii), note that for all λ ∈ C, the cubic x(xy + z 2 + λx2 ) = 0 is the union of an irreducible conic and a tangent line.  To finish the treatment of plane cubics we need to deal with the cusp, that is type (4). In three variables an ad hoc argument can be produced, however we prefer to refer to a more general result, namely Theorem 5.1. 3.5. The forms xa0 (xb1 + . . . + xbn ) and xa0 (xb0 + xb1 + . . . + xbn ). We study now the Waring loci for a family of reducible forms. Theorem 3.19. Let F = xa0 (xb1 +. . .+xbn ) and G = xa0 (xb0 +xb1 +. . .+xbn ), where n ≥ 2, a+1 ≥ b ≥ 3. Then WF = WG = V (X1 X2 , X1 X3 , . . . , X1 Xn , X2 X3 , . . . , X2 Xn , . . . , Xn−1 Xn ) \ {P }, that is, the Waring loci are the coordinate lines through the point P = [1 : 0 : . . . : 0] minus the point itself. Proof. By Propositions 4.4 and 4.9 in [CCCGW15b] we know that rk(F ) = rk(G) = (a + 1)n. (a + 1)n for some λ ∈ C. A contradiction, by Propositions rk(F − λxa+b 0 ) < Hence P ∈ FF . If P ∈ WF , we have 4.9 in [CCCGW15b]. Analogously, using Proposition 4.4 in [CCCGW15b], we get that P ∈ FG . Now let ∂ = α1 X1 + . . . + αn Xn , where the αi ∈ C are non-zero, for every i. By Propositions 4.4 and 4.9 in [CCCGW15b], we have rk(∂ ◦ F ) = rk(∂ ◦ G) = (a + 1)n. Let IX ⊂ F ⊥ be the ideal of a set of points giving a Waring decomposition of F , i.e. the cardinality of X is equal to rk(F ). Thus, IX′ = IX : (∂) is the ideal of the points of X not on the hyperplane ∂ = 0. Since IX′ = IX : (∂) ⊂ F ⊥ : (∂) = (∂ ◦ F )⊥ , WARING LOCI AND THE STRASSEN CONJECTURE 13 we have that (a + 1)n = rk(F ) = |X| ≥ |X′ | ≥ rk(∂ ◦ F ) = (a + 1)n. It follows that X does not have points on the hyperplane ∂ = 0. Thus WF ⊆ V (X1 X2 , X1 X3 , . . . , X1 Xn , X2 X3 , . . . , X2 Xn , . . . , Xn−1 Xn ) \ {P }. The opposite inclusion follows from the proof of Proposition 4.4 in [CCCGW15b]. Similarly for G.  4. Strassen’s conjecture Fix the following notation: S = C[x1,0 , . . . , x1,n1 , . . . . . . , xs,0 , . . . , xs,ns ], T = C[X1,0 , . . . , X1,n1 , . . . . . . , Xs,0 , . . . , Xs,ns ]. For i = 1, . . . , s, we let S [i] = C[xi,0 , . . . , xi,ni ], T [i] = C[Xi,0 , . . . , Xi,ni ], [i] Fi ∈ Sd , and F = F1 + · · · + Fs ∈ Sd . We consider Fi ∈ S and thus Fi⊥ = {g ∈ T | g ◦ Fi = 0} . P Conjecture 1 (Strassen’s conjecture). If F = si=1 Fi ∈ S is a form such that Fi ∈ S [i] for all i = 1, . . . , s, then rk(F ) = rk(F1 ) + . . . + rk(Fs ). P Conjecture 2. If F = si=1 Fi ∈ S is a degree d ≥ 3 form such that Fi ∈ S [i] for all i = 1, . . . , s, then any minimal Waring decomposition of F is a sum of minimal Waring decompositions of the forms Fi . Remark 4.1. Conjecture 2 also appears in [Tei16] where, as in Proposition 4.4, sufficient conditions are presented which imply the conjecture. The sufficient conditions in [Tei16] are different from the one we present in this paper. Moreover, as far as we can tell, the families of Lemma 4.5 are not obtained in [Tei16]. In view of Conjecture 2 it is natural to formulate the following conjecture in term of Waring loci. As already explained in Remark 2.4, we look at WFi ⊂ PnXii,0 ,...,Xi,n ⊂ PN . i Ps Conjecture 3. If F = then WF = i=1 Fi [ i=1,...,r ∈ S is a degree d ≥ 3 form such that Fi ∈ S [i] for all i = 1, . . . , s, WFi ⊂ PN , where N = n1 + . . . + ns + s − 1. 14 E. CARLINI, M. V. CATALISANO, AND A. ONETO Remark 4.2. Note that Conjectures 2 and 3 are false in degree two. For example, let F = x2 −2yz. The rank of F is three, but it is easy to find a Waring decomposition of F that is not the sum of x2 plus a Waring decomposition of the monomial yz; for example F = (x + y)2 + (x + z)2 − (x + y + z)2 . Lemma 4.3. Conjecture 2 and Conjecture 3 are equivalent and they imply Strassen’s conjecture for d ≥ 3. Proof. Clearly Conjecture 2 implies both Conjecture 1 and Conjecture 3. To complete the proof, P we assume that Conjecture 3 holds. If F = i Ldi is a minimal decomposition of F , then each Li appears in a minimal decomposition of Fj(i) , thus Li only involves the variables of S [j(i)] . Setting all P the variables not in S [j(i)] equal zero in the expression F = i Ldi , we get a decomposition P of Fj(i) . Note that all the obtained decompositions of the Fj are minimal, otherwise rk(F ) > i rk(Fi ). Hence Conjecture 2 is proved by assuming Conjecture 3.  In order to study our conjectures we prove the following. P Proposition 4.4. Let F = si=1 Fi ∈ S be a form such that Fi ∈ S [i] for all i = 1, . . . , s. If the following conditions hold (1) for each 1 ≤ i ≤ s there exists a linear derivation ∂i ∈ T [i] such that rk(∂i ◦ Fi ) = rk(Fi ), (2) Strassen’s conjecture holds for F1 + . . . + Fs , (3) Strassen’s conjecture holds for ∂1 F1 + . . . + ∂s Fs , then F satisfies Conjecture 3. Proof. Let’s consider the linear form t = α1 ∂1 + . . . + αs ∂s , with αi 6= 0 for all i = 1, . . . , s. Let IX ⊂ F ⊥ be the ideal of a set of points giving a minimal Waring decomposition of F , i.e. the cardinality of X is equal to rk(F ). Thus, IX : (t) is the ideal of the points of X which are outside the linear space t = 0. We can look at IX : (t) ⊂ F ⊥ : (t) = (t ◦ F )⊥ . By the assumptions we get that rk(F ) = rk(t ◦ F ), hence the set of points corresponding to IX : (t) has cardinality equal to rk(F ); it follows that X does not have points on the hyperplane t = 0. For the sake of simplicity, if necessary, we rename and reorder the variables in such a way that ∂i = Xi,0 . Claim. If P = [a1,0 : . . . : a1,n1 : . . . : as,0 : . . . : as,ns ] belongs to WF then in the set {a1,0 , . . . , as,0 } there is exactly one non-zero coefficient. The claim follows from the first part, since if we have either no or at least two non-zero coefficients in the set {a1,0 , . . . , as,0 } it is easy to find a linear space {t = 0} containing the point P and contradicting the assumption that it belongs to the Waring locus of F . Let’s consider Xi = X r {xi,0 = 0}, for all i = 1, . . . , s. Similarly as above, by looking at IXi = IX : (∂i ) ⊂ F ⊥ : (∂i ) = (∂i ◦ Fi )⊥ WARING LOCI AND THE STRASSEN CONJECTURE 15 we can conclude that the cardinality of each Xi is at least rk(Fi ). Moreover, by the claim, we have that the Xi ’s are all pairwise disjoint. By additivity of the rank, we conclude that [ Xi , X= i=1,...,s with Xi ∩ Xj = ∅, for all i 6= j, and |Xi | = rk(Fi ), for all i = 1, . . . , s. Hence, we have that the sets Xi give minimal Waring decompositions of the forms ∂i ◦ Fi ’s and, by Proposition 2.3, they lie in PnXii,0 ,...,Xi,n , respectively. Since X gives a minimal Waring decomi [i] position of F , specializing to zero the variables S not in S we see that Xi gives a minimal Waring decomposition of Fi . Hence, it follows WF ⊂ i=1,...,s WFi . The other inclusion is easily seen to be true.  As we show in the following lemma, there are several families of forms for which we can apply Proposition 4.4. Lemma 4.5. If F is one of the following degree d forms a monomial xd00 · . . . · xdnn with di ≥ 2 for 0 ≤ i ≤ n; a binary form of less than maximal rank, i.e., F 6= LM d−1 , with L, M linear forms; xa0 (xb1 + . . . + xbn ) with n ≥ 2 and a + 1 ≥ b > 2; xa0 (xb0 + xb1 + . . . + xbn ) with n ≥ 2 and a + 1 ≥ b > 2; xa0 G(x1 , . . . , xn ) with a ≥ 2 and such that G⊥ is a complete intersection in C[x1 , . . . , xn ] generated by forms of degree at least a + 1, then there exists a linear derivation ∂ such that (1) (2) (3) (4) (5) rk(∂ ◦ F ) = rk(F ). Proof. (1) Let F = xd00 · · · xdnn with d0 ≤ . . . ≤ dn , then we know by [CCG12] that rk(F ) = (d1 + 1) · · · (dn + 1). If we let ∂ = X0 , then rk(F ) = rk(∂ ◦ F ). (2) We know that F ⊥ = (g1 , g2 ) with deg(gi ) = di , d1 ≤ d2 and d1 + d2 = d + 2. We have to consider different cases. a) If d1 < d2 and g1 is square-free, then rk(F ) = deg(g1 ). Consider any linear form ∂ ∈ T1 which is not a factor of g1 . Then, (∂ ◦ F )⊥ = F ⊥ : (∂) = (h1 , h2 ), with deg(h1 ) + deg(h2 ) = d + 1. Since ∂ is not a factor of g1 , then we have that g1 = h1 and, since it is square-free, we have that rk(∂ ◦ F ) = rk(F ). b) If d1 < d2 and g1 is not square-free, say g1 = l1m1 · · · lsms , with m1 ≥ . . . ≥ ms and m1 ≥ 2, then we have rk(F ) = deg(g2 ). Fix ∂ = l1 ∈ T1 . Then, since F is not of the form LM d−1 , with L, M ∈ S1 , we have that (∂ ◦F )⊥ = F ⊥ : (l1 ) = (h1 , h2 ) with deg(h1 )+deg(h2 ) = d+1. Since l1m1 −1 · · · lsms ∈ (∂ ◦ F )⊥ , but not in F ⊥ it has to be h1 = l1m1 −1 · · · lsms . In particular, rk(∂ ◦ F ) = deg(h2 ) = deg(g2 ) = rk(F ). c) If d1 = d2 , we can always consider a non square-free element g ∈ (F ⊥ )d1 . Indeed, if both g1 and g2 are square-free, then it is enough to consider one element [g] lying on the intersection between the hypersurface in P(Sd1 ) defined by the vanishing of the discriminant 16 E. CARLINI, M. V. CATALISANO, AND A. ONETO of polynomials of degree d1 and the line passing through [g1 ] and [g2 ]. Thus, g = l1m1 · · · lsms , with m1 ≥ . . . ≥ ms and m1 ≥ 2. Fix ∂ = l1 ∈ T1 . Hence, we conclude similarly as part b). (3) If F = xa0 (xb1 + . . . + xbn ) with b, n ≥ 2 and a + 1 ≥ b, then we have that rk(F ) = (a + 1)n, by + . . . + xb−1 [CCCGW15b]. If we set ∂ = X1 + . . . + Xn , then ∂ ◦ F = xa0 (xb−1 n ) and the rank is 1 preserved. (4) If F = xa0 (xb0 + . . . + xbn ) with b, n ≥ 2 and a + 1 ≥ b, then we have that rk(F ) = (a + 1)n, + . . . + xb−1 by [CCCGW15b]. If we set ∂ = X1 + . . . + Xn , then ∂F = xa0 (xb−1 n ) and the rank is 1 preserved. (5) If F = xa0 G(x1 , . . . , xn ) with G⊥ = (g1 , . . . , gn ), a ≥ 2, and deg gi ≥ a+1, we know that rk(F ) = d1 · · · dn , by [CCCGW15b]. If we consider ∂ = X0 , then we have that ∂ ◦ F = xa−1 0 G(x1 , . . . , xn ) and the rank is preserved.  Ps Theorem 4.6. Let F = i=1 Fi ∈ S be a form such that Fi ∈ S [i] for all i = 1, . . . , s. If each Fi is one of the following, (1) a monomial x0d0 · . . . · xdnn with di ≥ 2 for 0 ≤ i ≤ n; (2) a binary form of less than maximal rank, i.e., F 6= LM d−1 , with L, M linear forms; (3) xa0 (xb1 + . . . + xbn ) with b, n ≥ 2 and a + 1 ≥ b; (4) xa0 (xb0 + xb1 + . . . + xbn ) with b, n ≥ 2 and a + 1 ≥ b; (5) xa0 G(x1 , . . . , xn ) with a ≥ 2 and such that G⊥ is a complete intersection in C[x1 , . . . , xn ] generated by forms of degree at least a + 1, then Conjecture 3 holds for F . Proof. We check that conditions (1), (2), and (3) of Proposition 4.4 are verified. Condition (1) holds because of Lemma 4.5 and condition (2) follows from Theorem 6.1 in [CCCGW15b]. To check condition (3) we use the linear derivations ∂i appearing inPthe proof of Lemma 4.5. Namely, we note that Theorem 6.1 in [CCCGW15b] applies to the sum i ∂i Fi , thus condition (3) follows. The result is now proved.  5. More results and open problems We prove that Conjecture 3 holds for the sum of two monomials where one of them has the lowest exponent equal to one. In this case, Lemma 4.5 does not apply and we need different methods. Theorem 5.1. Conjecture 3 is true for a form bm F = M1 + M2 = x0 xa11 · · · xann + y0b0 · · · ym , where deg F = d ≥ 3. We assume that b0 ≤ bi , for any i = 1, . . . , m. Before proving the theorem, we need some preliminary result. bm be a form of degree d. Then, Lemma 5.2. Let F = M1 + M2 = xa00 xa11 · · · xann + y0b0 · · · ym length T /F ⊥ = length T /M1⊥ + length T /M2⊥ − 2. Q Qn a0 b0 an bm Proof. We have that F ⊥ = M1⊥ ∩M2⊥ +(G), with G = m i=0 (bi !)X0 · · · Xn − j=0 (aj !)Y0 · · · Ym , (see also [BBKT15, Lemma 1.12]). Hence, F ⊥ and M1⊥ ∩ M2⊥ differ only in degree d. Since G is not contained in M1⊥ ∩ M2⊥ , we get (2) length T /F ⊥ = length T /(M1⊥ ∩ M2⊥ ) − 1. WARING LOCI AND THE STRASSEN CONJECTURE 17 Considering the exact sequence 0 −→ T /(I ∩ J) −→ T /I ⊕ T /J −→ T /(I + J) −→ 0, (3) it follows from (2) that length T /F ⊥ = length T /M1⊥ + length T /M2⊥ − length T /(M1⊥ + M2⊥ ) − 1. (4) Now, since Yi ∈ M1⊥ and Xj ∈ M2⊥ , for all i = 0, . . . , n, j = 0, . . . , m, we have that M1⊥ + M2⊥ is the maximal ideal. Thus, from (4), we conclude.  Lemma 5.3. Let F = M1 + M2 be as in Theorem 5.1. Then, length T /(F ⊥ : (X0 + Y0 ) + (X0 + Y0 )) = rk(F ) − 2. Proof. We have ⊥ F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) = (X0 + Y0 ) ◦ F + (X0 + Y0 ) ⊥  bm + (X0 + Y0 ) = xa11 · · · xann + y0b0 −1 y1b1 · · · ym ⊥  bm + (Y0 ), = xa11 · · · xann + y0b0 −1 y1b1 · · · ym ⊥  bm . where the last equality holds since X0 ∈ xa11 · · · xann + y0b0 −1 y1b1 · · · ym In the case b0 > 1, by direct computation, we get  ⊥ ⊥   bm + ∩ y0b0 −1 y1b1 · · · ym + (Y0 ) = xa11 · · · xann ! n m Y Y (ai !)Y0b0 −1 Y1b1 · · · Ymbm + (Y0 ) (b0 − 1)! (bi !)X1a1 · · · Xnan − bm xa11 · · · xann + y0b0 −1 y1b1 · · · ym + ⊥ i=1 i=1 = xa11 ⊥ · · · xann = xa11 · · · xann ⊥ ∩ y0b0 −1 y1b1  bm ⊥ · · · ym + m Y (b0 − 1)! (bi !)X1a1 · · · Xnan    bm ⊥ ∩ (y0b0 −1 y1b1 · · · ym ) + (Y0 ) + X1a1 · · · Xnan , where the last equality holds since Y0 ∈ (xa11 · · · xann )⊥ .  bm ⊥ , we get Moreover, since X1a1 · · · Xnan ∈ y0b0 −1 y1b1 · · · ym xa11 · · · xann ⊥ i=1 ! + (Y0 )    bm ⊥ ∩ (y0b0 −1 y1b1 · · · ym ) + (Y0 ) + X1a1 · · · Xnan     bm ⊥ = (xa11 · · · xann )⊥ + (X1a1 · · · Xnan ) ∩ (y0b0 −1 y1b1 · · · ym ) + (Y0 ) . 18 E. CARLINI, M. V. CATALISANO, AND A. ONETO So, by the exact sequence (3), we get length T /(F ⊥ : (X0 + Y0 ) + (X0 + Y0 )) = bm ⊥ = length T /((xa11 · · · xann )⊥ + (X1a1 · · · Xnan )) + length T /((y0b0 −1 y1b1 · · · ym ) + (Y0 )) bm ⊥ ) + (Y0 )) − length T /((xa11 · · · xann )⊥ + (X1a1 · · · Xnan ) + (y0b0 −1 y1b1 · · · ym = length T /(X0 , X1a1 +1 , . . . , Xnan +1 , Y0 , . . . , Ym , X1a1 · · · Xnan ) + length T /(X0 , . . . , Xn , Y0 , Y1b1 +1 , . . . , Ymbm +1 ) − 1 = n Y (ai + 1) − 1 + m Y (bi + 1) − 1 = rkF − 2. i=1 i=1 In case b0 = 1, since 5.2 we get F⊥ bm : (X0 + Y0 ) + (X0 + Y0 ) = xa11 · · · xann + y1b1 · · · ym ⊥ + (X0 , Y0 ), by Lemma bm length T /(F ⊥ : (X0 + Y0 ) + (X0 + Y0 )) = length Te/ xa11 · · · xann + y1b1 · · · ym bm ⊥ = length Te/ (xa11 · · · xann )⊥ + length Te/(y1b1 · · · ym ) − 2 = rkF − 2, where Te = C[X1 , . . . Xn , Y1 , . . . Ym ]. ⊥  Lemma 5.4. Let F = M1 + M2 be as in Theorem 5.1. Then, WF ⊂ {X0 Y0 = 0} ⊂ Pn+m+1 . Proof. Let IX ⊂ F ⊥ be the ideal of a minimal set of apolar points for F , thus |X| = rkF. It is enough to show that there are no points of X lying on the hyperplanes λX0 + µY0 = 0, for λµ 6= 0. After a change of coordinates, we may assume λ = µ = 1. We consider IX′ = IX : (X0 + Y0 ) the ideal of the set of points in X which do not lie on X0 + Y0 = 0. The cardinality of X′ is at least the length of the ring T /(F ⊥ : (X0 + Y0 ) + (X0 + Y0 )), that is, by Lemma 5.3, (5) |X′ | ≥ rkF − 2. It follows that on the hyperplane X0 + Y0 = 0 we have at most two points of X. Claim: In degree 1, the ideal IX : (X0 + Y0 ) + (X0 + Y0 ) differs from F ⊥ : (X0 + Y0 ) + (X0 + Y0 ). Proof of Claim. As already computed in the proof of Lemma 5.3, we have that F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) contains two linear forms, namely X0 and Y0 . Now, assume that L = α0 X0 + . . . + αn Xn + β0 Y0 + . . . + βm Ym ∈ IX : (X0 + Y0 ). Thus, we have that L(X0 + Y0 ) ∈ IX ⊂ F ⊥ . In case b0 > 1, since X02 , X0 Y0 , . . . , X0 Ym , X1 Y0 , . . . , Xn Y0 ∈ F ⊥ we get (α1 X0 X1 + . . . + αn X0 Xn + β0 Y02 + β1 Y0 Y1 + . . . + βm Y0 Ym ) ◦ F = 0, and from this easily follows that α1 = . . . = αn = β0 = β1 = . . . = βm = 0. Hence, L = α0 X0 and so α0 X0 (X0 + Y0 ) ∈ IX . WARING LOCI AND THE STRASSEN CONJECTURE 19 Now, consider the hyperplane Y0 = 0. Again, by direct computation, we get ⊥  bm ⊥ F ⊥ + (Y0 ) = x0 xa11 · · · xann ∩ y0b0 y1b1 . . . ym + ! m Y Y a1 b0 b1 an bm + (Y0 ) (bi !)X0 X1 · · · Xn − (ai !)Y0 Y1 . . . Ym i=1 = x0 xa11 · · · xann ⊥ bm ∩ y0b0 y1b1 . . . ym ⊥ + (X0 X1a1 · · · Xnan ) + (Y0 )   bm ⊥ ⊆ (x0 xa11 · · · xann )⊥ + (X0 X1a1 · · · Xnan , Y0 ) ∩ (y0b0 y1b1 . . . ym ) + (X0 X1a1 · · · Xnan , Y0 )   bm ⊥ ) + (Y0 ) . = (x0 xa11 · · · xann )⊥ + (X0 X1a1 · · · Xnan ) ∩ (y0b0 y1b1 . . . ym Hence, using again the exact sequence (3), we get  length T /(F ⊥ + (Y0 )) ≥ length T / (x0 xa11 · · · xann )⊥ + (X0 X1a1 · · · Xnan )  bm ⊥ + length T / (y0b0 y1b1 . . . ym ) + (Y0 ) − 1 m n Y Y (bi + 1) − 2 = 2 (ai + 1) + i=1 i=1 = rk F + n Y (ai + 1) − 2 > rk F. i=1 So, length T /(F ⊥ + (Y0 )) > rkF. Hence, Y0 is not a zero divisor for IX and there are points of X lying on the hyperplane Y0 = 0. Since, by [CCG12, Remark 3.3], there are no points of X on the linear space defined by the ideal (X0 , Y0 ), and since α0 X0 (X0 + Y0 ) ∈ IX , it follows that α0 = 0. So IX : (X0 + Y0 ) + (X0 + Y0 ) contains only the linear form X0 + Y0 , and thus in case b0 > 1 the Claim is proved. In case b0 = 1, since X02 , X0 Y0 , . . . , X0 Ym , Y02 , X1 Y0 , . . . , Xn Y0 ∈ F ⊥ we get (α1 X0 X1 + . . . + αn X0 Xn + β1 Y0 Y1 + . . . + βm Y0 Ym ) ◦ F = 0, and so α1 = . . . = αn = β1 = . . . = βm = 0. Hence, L = α0 X0 + β0 Y0 and L · (X0 + Y0 ) = (α0 X0 + β0 Y0 )(X0 + Y0 ) ∈ IX . Now, consider the hyperplanes X0 = 0 and Y0 = 0. Again, by direct computation, we get ⊥  bm ⊥ F ⊥ + (X0 ) = x0 xa11 · · · xann ∩ y0 y1b1 . . . ym ! n m Y Y (bi !)X0 X1a1 · · · Xnan − (ai !)Y0 Y1b1 . . . Ymbm + (X0 ) = + i=1   a1 b1 an ⊥ bm ⊥ x0 x1 · · · xn ∩ y0 y1 . . . ym + (Y0 Y1b1 . . . Ymbm ) + (X0 )  bm ⊥ (x0 xa11 · · · xann )⊥ + (Y0 Y1b1 . . . Ymbm , X0 ) ∩ (y0 y1b1 . . . ym ) +   ⊥ bm ⊥ xa11 · · · xann ∩ (y0 y1b1 . . . ym ) + (Y0 Y1b1 . . . Ymbm ) . i=1 = ⊆ =  (Y0 Y1b1 . . . Ymbm , X0 ) 20 E. CARLINI, M. V. CATALISANO, AND A. ONETO Hence, using again the exact sequence (3), we get  ⊥ length T / F ⊥ + (X0 ) ≥ length T / xa11 · · · xann  bm ⊥ + length T / (y0 y1b1 . . . ym ) + (Y0 Y1b1 . . . Ymbm ) − 1 m m n Y Y Y (bi + 1) − 2 > rkF. (ai + 1) + 2 (bi + 1) − 2 = rkF + = i=1 It follows that i=1 i=1 length T /(F ⊥ + (X0 )) > rkF. Analogously we have length T /(F ⊥ + (Y0 )) > rkF. So X0 and Y0 are not zero divisors for IX . Hence there are points of X lying both on the hyperplane X0 = 0 and on Y0 = 0. Since, by [CCG12, Remark 3.3], there are no points of X on the linear space defined by the ideal (X0 , Y0 ), and since (α0 X0 + β0 Y0 )(X0 + Y0 ) ∈ IX , it follows that α0 = β0 = 0. Thus IX : (X0 + Y0 ) + (X0 + Y0 ) contains only the linear form X0 + Y0 , and the Claim is proved also in case b0 = 1.  Now, the idea is to show that IX : (X0 + Y0 ) + (X0 + Y0 ) differs from F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) also in degree d − 1. From this, the Claim above and (5), it would follow that the cardinality of X′ is actually rkF and then we have no points of X over the hyperplane X0 + Y0 = 0. Consider first the case b0 > 1. In this case, since (see the proof of Lemma 5.3) bm ⊥ F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) = ((xa11 · · · xann )⊥ + (X1a1 · · · Xnan )) ∩ ((y0b0 −1 y1b1 · · · ym ) + (Y0 )), we have that F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) contains the whole vector space Td−1 . We will prove that (IX : (X0 + Y0 ) + (X0 + Y0 ))d−1 6= Td−1 . Since, from the Claim, IX : (X0 + Y0 ) + (X0 + Y0 ) differs from F ⊥ : (X0 + Y0 ) + (X0 + Y0 ), then |X′ | ≥ 1 + length T /(F ⊥ : (X0 + Y0 ) + (X0 + Y0 )) = rkF − 1. Hence there is at most one point of X, say P , lying on the hyperplane X0 + Y0 = 0. Since there are no points on the linear space (X0 , Y0 ), we can write P = [1, u1 , . . . , un , −1, v1 , . . . , vm ]. Let H = X1a1 · · · Xnan − ua11 · · · uann X0d−1 . If we assume, by contradiction, that IX : (X0 + Y0 ) + (X0 + Y0 ) contains all the forms of degree d − 1, we have that H ∈ IX : (X0 + Y0 ) + (X0 + Y0 ), that is, H + (X0 + Y0 )G ∈ IX : (X0 + Y0 ) for some G ∈ Td−2 . Since H + (X0 + Y0 )G vanishes at P and at the points of X′ , we actually have H + (X0 + Y0 )G ∈ IX ⊂ F ⊥ , and from this  H + (X0 + Y0 )G ◦ F = 0. WARING LOCI AND THE STRASSEN CONJECTURE 21 Now, recalling that d ≥ 3, and so X0d−1 ◦ F = 0, we get n Y   bm (ai !)x0 +G◦ xa11 · · · xann +y0b0 −1 y1b1 . . . ym = 0, X1a1 · · · Xnan −ua11 · · · uann X0d−1 +(X0 +Y0 )G ◦F = i=1 bm ) cannot be a multiple of x . and this is impossible, since G ◦ (xa11 · · · xann + y0b0 −1 y1b1 . . . ym 0 Now, let b0 = 1. In this case we have  bm ⊥ F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) = xa11 · · · xann + y1b1 · · · ym + (X0 , Y0 ), hence, in degree d − 1,  dim F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) d−1 = dim Td−1 − 1. Since, from the Claim, IX : (X0 + Y0 ) + (X0 + Y0 ) differs from F ⊥ : (X0 + Y0 ) + (X0 + Y0 ), then |X′ | ≥ 1 + length T /(F ⊥ : (X0 + Y0 ) + (X0 + Y0 )) = rkF − 1. Hence there is at most one point of X, say P , lying on the hyperplane X0 + Y0 = 0. Since there are no points on the linear space (X0 , Y0 ), we can assume that P = [1, u1 , . . . , un , −1, v1 , . . . , vm ]. Let H1 = X1a1 · · · Xnan − ua11 · · · uann X0d−1 , bm d−1 H2 = Y1b1 · · · Ymbm − (−1)d−1 v1b1 · · · vm Y0 . We prove that H1 ∈ / IX : (X0 + Y0 ) + (X0 + Y0 ). In fact, if H1 ∈ IX : (X0 + Y0 ) + (X0 + Y0 ) we have H1 + (X0 + Y0 )G1 ∈ IX : (X0 + Y0 ) for some G1 ∈ Td−2 . But H1 + (X0 + Y0 )G1 vanishes at P and at the points of X′ , so we have H1 + (X0 + Y0 )G1 ∈ IX ⊂ F ⊥ , and from this (H1 + (X0 + Y0 )G1 ) ◦ F = 0. But  (H1 + (X0 + Y0 )G1 ) ◦ F = X1a1 · · · Xnan − ua11 · · · uann X0d−1 + (X0 + Y0 )G1 ◦ F = n Y  bm (ai !)x0 + G1 ◦ xa11 · · · xann + y0b0 −1 y1b1 . . . ym = 0, = i=1 bm ) cannot be a multiple of x . and this is impossible, since G1 ◦ (xa11 · · · xann + y0b0 −1 y1b1 . . . ym 0 Now, we can also show that H2 ∈ / IX : (X0 +Y0 )+(X0 +Y0 )+(H1 ). Indeed, assume by contradiction that there exists α ∈ C and G2 ∈ Td−2 such that H2 + αH1 + (X0 + Y0 )G2 ∈ IX : (X0 + Y0 ). Since H2 + αH1 + (X0 + Y0 )G2 vanishes at the point P by construction, we get that H2 + αH1 + (X0 + Y0 )G2 ∈ IX ⊂ F ⊥ , and, therefore,  H2 + αH1 + (X0 + Y0 )G2 ◦ F = 0. 22 E. CARLINI, M. V. CATALISANO, AND A. ONETO Hence, n m Y Y  bm = 0. (bi !)y0 + α (ai !)x0 + G2 ◦ xa11 · · · xann + y0b0 −1 · · · ym i=1 i=1  bm cannot produce multiples of x and y , we get a contradiction. Since G ◦ xa11 · · · xann + y0b0 −1 · · · ym 0 0 From this, it follows that  dim IX : (X0 + Y0 ) + (X0 + Y0 ) d−1 ≤ dim Td−1 − 2. Therefore,   IX : (X0 + Y0 ) + (X0 + Y0 ) d−1 6= F ⊥ : (X0 + Y0 ) + (X0 + Y0 ) d−1 .  Lemma 5.5. Let F = M1 + M2 be as in Theorem 5.1 and let X be a minimal set of points apolar to F . Then, (F ⊥ : (X0 , Y0 ))2 ⊆ (IX + (X0 + Y0 ))2 . Proof. Let X be a minimal set of points apolar to F . Following the proof of [CCG12, Theorem 3.2], and considering the following chain of inclusions IX : (X0 , Y0 ) + (X0 + Y0 ) ⊆ F ⊥ : (X0 , Y0 ) + (X0 + Y0 ) ⊆ J1 ∩ J2 , (6) where J1 = (X0 , X1a1 +1 , . . . , Xnan +1 , Y0 , . . . , Ym ) and J2 = (X0 , X1 , . . . , Xn , Y0 , Y1b1 +1 , . . . , Ymbm +1 ), we get that IX = IX : (X0 , Y0 ) and dimC (IX + (X0 + Y0 ))i = dimC (J1 ∩ J2 )i , for any i 6= 1; Therefore, considering the inclusion (6), it follows that   (IX + (X0 + Y0 ))i = F ⊥ : (X0 , Y0 ) + (X0 + Y0 ) , for any i 6= 1; i this is enough to conclude the proof.  Proof of Theorem 5.1. By Lemma 5.4 and [CCG12, Remark 3.3], WF ⊂ V (X0 Y0 ) r V (X0 , Y0 ). Hence, we can write any minimal Waring decomposition of F as r2 r1 X X (L′′j )d , (L′i )d + (7) F = i=1 where, L′i ∈ V (Y0 ) and L′′j ∈ V (X0 ), namely, L′i = αi,0 x0 + . . . + αi,n xn j=1 + βi,1 y1 + . . . + βi,m ym , where αi,0 6= 0, for i = 1, . . . , r1 , and L′′j = γj,1 x1 + . . . + γj,n xn + δj,0 y0 + . . . + δj,m ym , where δj,0 6= 0, for j = 1, . . . , r2 . Let X be the set of points apolar to F corresponding to the decomposition (7). Now, we prove the following statement. Claim: L′i ∈ V (Y0 , . . . , Ym ), for i = 1, . . . , r1 , and L′′j ∈ V (X0 , . . . , Xn ), for j = 1, . . . , r2 . WARING LOCI AND THE STRASSEN CONJECTURE 23 Proof of Claim. Since L′i ∈ V (Y0 ) and L′′j ∈ V (X0 ) and since coeffx0 (L′i ) = αi,0 6= 0, for any i = 1, . . . , r1 , and coeffy0 (L′′j ) = δj,0 6= 0, for any j = 1, . . . , r2 , in order to prove the Claim, it is enough to show that X0 Y1 , . . . , X0 Ym and X1 Y0 , . . . , Xn Y0 are in IX . We have that X0 Yl ∈ F ⊥ ; hence, by Lemma 5.5, (8) X0 Yl ∈ IX + (X0 + Y0 ) =⇒ X0 Yl + G′l · (X0 + Y0 ) ∈ IX ⊂ F ⊥ , (deg(G′l ) = 1) =⇒ G′l ∈ ((X0 + Y0 ) ◦ F )⊥ . Since Xk Y0 ∈ F ⊥ (k = 1, . . . , n), we get (9) Xk Y0 ∈ IX + (X0 + Y0 ) =⇒ Xk Y0 + G′′k · (X0 + Y0 ) ∈ IX ⊂ F ⊥ , (deg(G′′k ) = 1) =⇒ G′′k ∈ ((X0 + Y0 ) ◦ F )⊥ . Now, we need to distinguish between two cases. ⊥  bm . Therefore, since deg G′l = If b0 ≥ 2, then ((X0 + Y0 ) ◦ F )⊥ = xa11 · · · xann + y0b0 −1 y1b1 · · · ym deg G′′k = 1, we have G′l = a′l X0 and G′′k = a′′k X0 , for some a′l , a′′k ∈ C. So, from (9), we have that Xk Y0 + a′′k X0 (X0 + Y0 ) ∈ IX , and, multiplying by X0 , since X0 Y0 ∈ IX , we get a′′k X03 ∈ IX , for k = 1, . . . , n. Since the coefficients of x0 in the L′i ’s are different from 0, it follows that a′′k = 0, for all k = 1, . . . , n. Therefore, Xk Y0 ∈ IX , for all k = 1, . . . , n. Hence, we get that L′′j ∈ V (X0 , . . . , Xn ), for j = 1, . . . , r2 , and we have L′′j = δj,0 y0 + . . . + δj,m ym . From (8), since X0 Y0 ∈ IX , we obtain that X0 Yl + a′l X0 (X0 + Y0 ) ∈ IX =⇒ X0 (Yl + a′l X0 ) ∈ IX . Consider the points Pi = (αi,0 , . . . , αi,n , 0, βi,1 , . . . , βi,m ) ∈ X (i = 1, . . . , r1 ) associated to the L′ ’s. Since X0 (Yl + a′l X0 ) ∈ IX and αi,0 6= 0, for any i = 1, . . . , r1 , it follows that bi,l = −a′l αi,0 , for all i = 1, . . . , r1 and l = 1, . . . , m. Hence r1 X i=1 L′i d = r1 X i=1 d αi,0 (x0 − a′1 y1 + . . . − a′m ym ) + αi,1 x1 . . . + αi,n xn . Now, observe that, setting y0 = . . . = ym = 0 in (7), we obtain that x0 xa11 so, replacing · · · xann = r1 X (αi,0 x0 + . . . + αi,n xn )d ; i=1 ′ ′ x0 with (x0 − a1 y1 + . . . − am ym ) we get that r1 r1 X X  ′ d αi,0 (x0 − a′1 y1 + . . . − a′m ym ) + αi,1 x1 . . . Li = i=1 i=1 = (x0 − a′1 y1 + . . . − a′m ym )xa11 · · · xann . + αi,n xn d 24 E. CARLINI, M. V. CATALISANO, AND A. ONETO It follows that bm = (x0 − a′1 y1 + . . . − a′m ym )xa11 · · · xann + F = x0 xa11 · · · xann + y0b0 y1b1 · · · ym r2 X (δj,0 y0 + . . . + δj,m ym )d . j=1 xa11 Therefore, looking at the coefficient of the monomial we obtain −a′l = 0, for any l = 1, . . . , m. Hence from (8), we get X0 Yl ∈ IX for any l = 1, . . . , m. ⊥  bm . Therefore, from (8) and (9) we If b0 = 1, then ((X0 + Y0 ) ◦ F )⊥ = xa11 · · · xann + y1b1 · · · ym have G′l = a′l X0 + b′l Y0 and G′′k = a′′k X0 + b′′k Y0 , for some a′l , b′l , a′′k , b′′k ∈ C. Since X0 Y0 ∈ IX , we have, for any l = 1, . . . , m, · · · xann yl , X0 Yl + (a′l X0 + b′l Y0 )(X0 + Y0 ) ∈ IX =⇒ X0 Yl + a′l X02 + b′l Y02 ∈ IX =⇒ X02 Yl + a′l X03 = X02 (Yl + a′l X0 ) ∈ IX . Considering the points Pi = (αi,0 , . . . , αi,n , 0, βi,1 , . . . , βi,m ) ∈ X (i = 1, . . . , r1 ) associated to the L′ ’s, since ai,0 6= 0, it follows that bi,l = −a′l αi,0 , for all i = 1, . . . , r1 and l = 1, . . . , m. Analogously, considering the monomials Xk Y0 , for any k = 1, . . . , n, we get γi,k = −b′′k δi,0 . Hence, recalling that L′i = αi,0 x0 + . . . + αi,n xn + βi,1 y1 + . . . + βi,m ym , we get r1 X (10) (L′i )d = i=1 r1 X i=1 d αi,0 (x0 − a′1 y1 + . . . − a′m ym ) + . . . + αi,n xn . Now, by setting y0 = . . . = ym = 0 in (7), we obtain r2 r1 X X a1 d an (γj,1 x1 + . . . + γj,n xn )d . (αi,0 x0 + . . . + αi,n xn ) + x0 x1 · · · xn = j=1 i=1 By (10) and this equality, replacing x0 with (x0 − r1 X (L′i )d = (x0 − a′1 y1 + ... − a′m ym )xa11 a′1 y1 + . . . − a′m ym ), we obtain · · · xann r2 X (γj,1 x1 + . . . + γj,n xn )d . − j=1 i=1 Analogously, we get r1 r1 X X bm (βi,1 y1 + . . . + βi,m ym )d . − (L′′i )d = (y0 − b′′1 x1 + . . . − b′′n xn )y1b1 · · · ym i=1 i=1 Thus, bm F = (x0 − a′1 y1 + . . . − a′m ym )xa11 · · ·xann + (y0 − b′′1 x1 + . . . − b′′n xn )y1b1 · · · ym r2 r1 X X d (γj,1 x1 + . . . + γj,n xn )d . (βi,1 y1 + . . . + βi,m ym ) − − j=1 i=1 xa11 the monomial · · · xann yl b1 bm the monomial xk y1 · · · ym Looking at the coefficient of considering the coefficient of Now, substituting a′l = 0 in (8), we get that (l = 1, . . . , m), we get a′l = 0. Similarly, (k = 1, . . . , n) we get b′′k = 0. X0 Yl + b′l Y02 ∈ IX ; WARING LOCI AND THE STRASSEN CONJECTURE 25 multiplying by Y0 , since X0 Y0 ∈ IX , we have that b′l Y03 ∈ IX , for any l = 1, . . . , m. Since the points corresponding to the L′′ ’s have the coefficient of y0 different from 0, it follows that b′l = 0 and, therefore, X0 Yj ∈ IX . Analogously, we can prove that a′′k = 0, for all k = 1, . . . , n and, consequently, that Xi Y0 ∈ IX . This concludes the proof of the Claim.  So we have proved that L′i = αi,0 x0 + . . . + αi,n xn , L′′j = δj,0 y0 + . . . + δj,m ym , and so (11) M1 = x0 xa11 · · · xann = r1 X L′i , M2 = i=1 y0b0 y1b1 bm · · · ym = r2 X L′′j ; i=1 therefore, ri ≥ rk(Mi ), for i = 1, 2. Since r1 + r2 = rk(F ) = rk(M1 ) + rk(M2 ), we have that actually ri = rk(Mi ), for i = 1, 2. Thus, the expressions in (11) are minimal decompositions of M1 and M2 , respectively. It follows that WF ⊂ WM1 ∪ WM2 . Since the opposite inclusion is trivial, we conclude the proof.  5.1. Open problems. There are several aspect that we consider to be worth of further investigation. Here we list some example. (1) It is not clear to us whether some of our results hold when weaker assumptions are made. Consider, for example, Theorem 4.6 for any monomial and not only when all exponents are at least two. Similarly, we do not know if Theorem 3.19 holds in the case of b = 2. (2) In all of our results FF is never empty and we conjecture that this is the case for any form F . Roughly speaking, the more Waring decompositions of F we have, the smaller FF should be. Thus, this last conjecture, seems to have a strong relation with forms of high Waring rank which usually have many sum of powers decompositions. Note, for example in the case of plane cubics, that the smallest FF occurs for F of type (10), that is for plane cubics of maximal Waring rank. (3) It would be interesting to consider the sets WFt formed by t-uples of linear forms appearing rk(F ) is the well in the same minimal Waring decomposition of F . Note that WF1 = WF , while WF known variety of sum of powers VSP (F ) defined in [RS00]. (4) When we are able to find an ideal defining FF this ideal is often not radical. Thus, the scheme of forbidden points comes with a non reduced structure, but it is not clear what this is telling us about F . References [AH95] J. Alexander and A. Hirschowitz. Polynomial interpolation in several variables. Journal of Algebraic Geometry, 4(4):201–222, 1995. [Ban14] M. Banchi. Rank and border rank of real ternary cubics. arXiv preprint arXiv:1409.8447, 2014. [BBKT15] W. Buczyńska, J. Buczyński, J. Kleppe and Z. Teitler. Apolarity and direct sum decomposability of polynomials Michigan Math. J., 64(4):675–719, 2015. [BBT13] W. Buczyńska, J. Buczyński, and Z. Teitler. Waring decompositions of monomials. Journal of Algebra, 378:45–57, 2013. 26 E. CARLINI, M. V. CATALISANO, AND A. ONETO [BC13] E. Ballico and L. Chiantini. Sets computing the symmetric tensor rank. Mediterranean journal of mathematics, 10(2):643–654, 2013. [BCO14] C. Bocci, L. Chiantini, and G. Ottaviani. Refined methods for the identifiability of tensors. Annali di Matematica Pura ed Applicata (1923-), 193(6):1691–1702, 2014. [BL13] J. Buczyński and J. M. Landsberg. Ranks of tensors and a generalization of secant varieties. Linear Algebra and its Applications, 438(2):668–689, 2013. [Car06] E. Carlini. Reducing the number of variables of a polynomial. In Algebraic geometry and geometric modeling, Math. Vis., pages 237–247. Springer, Berlin, 2006. [CC06] L. Chiantini and C. Ciliberto. On the concept of k-secant order of a variety. Journal of the London Mathematical Society, 73(02):436–454, 2006. [CCC15a] E. Carlini, M. V. Catalisano, and L. Chiantini. Progress on the symmetric strassen conjecture. Journal of Pure and Applied Algebra, 219(8):3149–3157, 2015. [CCCGW15b] E. Carlini, M.V. Catalisano, L. Chiantini, A.V. Geramita, and Y. Woo. Symmetric tensors: rank, strassen’s conjecture and e-computability. arXiv preprint arXiv:1506.03176, 2015. [CCG12] E. Carlini, M. V. Catalisano, and A. V. Geramita. The solution to the Waring problem for monomials and the sum of coprime monomials. Journal of Algebra, 370:5–14, 2012. [COV15] L. Chiantini, G. Ottaviani, and N. Vannieuwenhoven. On generic identifiability of symmetric tensors of subgeneric rank. arXiv preprint arXiv:1504.00547, 2015. [CS11] G. Comas and M. Seiguer. On the rank of a binary form. Foundations of Computational Mathematics, 11(1):65–78, 2011. [Dol12] I. V. Dolgachev. Classical algebraic geometry: a modern view. Cambridge University Press, 2012. [GM16] F. Galuppi and M. Mella. Identifiability of homogeneous polynomials and Cremona transformations. arXiv preprint arXiv:1606.06895, 2016. [Ger96] A. V. Geramita. Inverse systems of fat points: Waring’s problem, secant varieties of veronese varieties and parameter spaces for gorenstein ideals. In The Curves Seminar at Queen’s, volume 10, pages 2–114, 1996. [GS] D. R. Grayson and M. E. Stillman. Macaulay2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/Macaulay2/. [IK99] A. Iarrobino and V. Kanev. Power sums, Gorenstein algebras, and determinantal loci. Springer, 1999. [Lan12] J. M. Landsberg. Tensors: Geometry and applications, volume 128. American Mathematical Soc., 2012. [LT10] J. M. Landsberg and Z. Teitler. On the ranks and border ranks of symmetric tensors. Foundations of Computational Mathematics, 10(3):339–366, 2010. [Mel06] M. Mella. Singularities of linear systems and the Waring problem. Transactions of the American Mathematical Society 358(12): 5523–5538, 2006. [Mel09] M. Mella. Base loci of linear systems and the Waring problem. Proceedings of the American Mathematical Society 137(1): 91–98, 2009. [O16] A. Oneto. Waring type problems for polynomials. Doctoral Thesis in Mathematics at Stockholm University, Sweden, 2016. [RS00] K. Ranestad and F. Schreyer. Varieties of sums of powers. J. Reine Angew. Math., 525:147–181, 2000. [Syl51] J. J. Sylvester. Lx. on a remarkable discovery in the theory of canonical forms and of hyperdeterminants. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 2(12):391–410, 1851. [Tei16] Z. Teitler. Sufficient conditions for Strassen’s additivity conjecture. arXiv preprint arXiv:1604.07691, 2016. (E. Carlini) DISMA- Department of Mathematical Sciences, Politecnico di Torino, Turin, Italy E-mail address: [email protected] (M. V. Catalisano) Dipartimento di Ingegneria Meccanica, Energetica, Gestionale e dei Trasporti, Universita degli studi di Genova, Genoa, Italy E-mail address: [email protected] (A. Oneto) INRIA Sophia Antipolis Méditerranée (team Aromath), Sophia Antipolis, France E-mail address: [email protected]
0math.AC
Parallel Ordered Sets Using Join arXiv:1602.02120v4 [cs.DS] 12 Nov 2016 Guy Blelloch Carnegie Mellon University [email protected] Daniel Ferizovic Karlsruhe Institute of Technology [email protected] Yihan Sun Carnegie Mellon University [email protected] November 15, 2016 Abstract Ordered sets (and maps when data is associated with each key) are one of the most important and useful data types. The set-set functions union, intersection and difference are particularly useful in certain applications. Brown and  n Tarjan first described an algorithm for these functions, based on 2-3 trees, that meet the optimal Θ m log m +1 time bounds in the comparison model (n and m ≤ n are the input sizes). Later Adams showed very elegant algorithms for the functions, and others, based on weight-balanced trees. They only require a single function that is specific to the balancing scheme—a function that joins two balanced trees—and hence can be applied to other balancing schemes. Furthermore the algorithms are naturally parallel. However, in the twenty-four years since, no one has shown that the algorithms are work efficient (or optimal), sequential or parallel, and even for the original weight-balanced trees. In this paper we show that Adams’ algorithms are both work efficient and highly parallel (polylog depth) across four different balancing schemes—AVL trees, red-black trees, weight balanced trees and treaps. To do this we need careful, but simple, algorithms for J OIN that maintain certain invariants, and our proof is (mostly) generic across the schemes. To understand how the algorithms perform in practice we have also implemented them (all code except J OIN is generic across the balancing schemes). Interestingly the implementations on all four balancing schemes and three set functions perform similarly in time and speedup (more than 45x on 64 cores). We also compare the performance of our implementation to other existing libraries and algorithms including the standard template library (STL) implementation of red-black trees, the multicore standard template library (MCSTL), and a recent parallel implementation based on weight-balanced trees. Our implementations are not as fast as the best of these on fully overlapping keys (but comparable), but better than all on keys with a skewed overlap (two Gaussians with different means). 1 1 Introduction Ordered sets and ordered maps (sets with data associated with each key) are two of the most important data types used in modern programming. Most programming languages either have them built in as basic types (e.g. python) or supply them as standard libraries (C++, C# Java, Scala, Haskell, ML). These implementations are based on some form of balanced tree (or tree-like) data structure and, at minimum, support lookup, insertion, and deletion in logarithmic time. Most also support set-set functions such as union, intersection, and difference. These functions are particularly useful when using parallel machines since they can support parallel bulk updates. In this paper we are interested in simple and efficient parallel algorithms for such set-set functions. The lower bound for comparison-based algorithms for union, intersection and difference for inputs of size n and n + 1 . Brown and Tarjan first described a m ≤ n and output an ordered structure1 is log2 m+n = Θ m log m n sequential algorithm for merging that asymptotically match these bounds [11]. It can be adapted for union, intersection and difference with the same bounds. The bound is interesting since it shows that implementing insertion with union, or deletion with difference, is asymptotically efficient (O(log n) time), as is taking the union of two equal sized sets (O(n) time). However, the Brown and Tarjan algorithm is complicated, and completely sequential. insert(T, k) = (TL , m, TR ) = split(T, k); join(TL , k, TR ) delete(T, k) = (TL , m, TR ) = split(T, k); join2(TL , TR ) union(T1 ,T2 ) = if T1 = Leaf then T2 else if T2 = Leaf then T1 else (L2 ,k2 ,R2 ) = expose(T2 ); (L1 ,b,R1 ) = split(T1 ,k2 ); TL = union(L1 ,L2 ) k TR = union(R1 ,R2 ); join(TL ,k2 ,TR ) split(T, k) = if T = Leaf then (Leaf,false,Leaf) else (L, m, R) = expose(T ); if k = m then (L,true,R) else if k < m then (LL , b, LR ) = split(L, k); (LL ,b,join(LR , m, R)) else (RL , b, RR ) = split(R, k); (join(L, m, RL ), b, RR ) intersect(T1 ,T2 ) = if T1 = Leaf then Leaf else if T2 = Leaf then Leaf else (L2 ,k2 ,R2 ) = expose(T2 ); (L1 ,b,R1 ) = split(T1 ,k2 ); TL = intersect(L1 ,L2 ) k TR = intersect(R1 ,R2 ); if b = true then join(TL ,k2 ,TR ) else join2(TL ,TR ) splitLast(T ) = (L, k, R) = expose(T ); if R = Leaf then (L, k) else (T 0 , k0 ) = splitLast(R); (join(L, k, T 0 ),k0 ) difference(T1 ,T2 ) = if T1 = Leaf then Leaf else if T2 = Leaf then T1 else (L2 ,k2 ,R2 ) = expose(T2 ); (L1 ,b,R1 ) = split(T1 ,k2 ); TL = difference(L1 ,L2 ) k TR = difference(R1 ,R2 ); join2(TL ,TR ) join2(TL ,TR ) = if TL = Leaf then TR else (TL0 , k) = splitLast(TL ); join(TL0 , k, TR ) Figure 1: Implementing U NION, I NTERSECT, D IFFERENCE, I NSERT, D ELETE, S PLIT, and J OIN 2 with just J OIN. E XPOSE returns the left tree, key, and right tree of a node. The || notation indicates the recursive calls can run in parallel. These are slight variants of the algorithms described by Adams [1], although he did not consider parallelism. Adams later described very elegant algorithms for union, intersection, and difference, as well as other functions using weight-balanced trees, based on a single function, J OIN [1, 2] (see Figure 1). The algorithms are naturally parallel. The J OIN(L, k, R) function takes a key k and two ordered sets L and R such that L < k < R and returns the union of the keys [28, 26]. J OIN can be used to implement J OIN 2(L, R), which does not take the key in the middle, and S PLIT(T, k), which splits a tree at a key k returning the two pieces and a flag indicating if k is in T (See Section 4). With these three functions, union, intersection, and difference (as well as insertion, deletion and other functions) 1 By “ordered structure” we mean any data structure that can output elements in sorted order without any comparisons. 2 are almost trivial. Because of this at least three libraries use Adams’ algorithms for their implementation of ordered sets and tables (Haskell [19] and MIT/GNU Scheme, and SML). J OIN can be implemented on a variety of different balanced tree schemes. Sleator and Tarjan describe an algorithm for J OIN based on splay trees which runs in amortized logarithmic time [26]. Tarjan describes a version for red-black tree that runs in worst case logarithmic time [28]. Adams describes version based on weight-balanced trees [1].2 Adams’ algorithms were proposed in an international competition for the Standard ML community, which is about implementations on “set of integers”. Prizes were awarded in two categories: fastest algorithm, and most elegant yet still efficient program. Adams won the elegance award, while his algorithm is as fast as the fastest program for very large sets, and was faster for smaller sets. Adams’ algorithms actually show that in principle all balance criteria for search trees can be captured by a single function J OIN, although he only considered weight-balanced trees. Surprisingly, however, there have been almost no results on bounding the work (time) of Adams’ algorithms, in general nor on specific trees. Adams informally argues that his algorithms take O(n + m) work for weight-balanced tree, but that is a very loose  bound. Blelloch and Miller later show that similar algorithms for treaps [6], are optimal for n + 1 ), and also parallel. Their algorithms, however, are specific for treaps. The problem with work (i.e. Θ m log m bounding the work of Adams’ algorithms, is that just bounding the time of S PLIT, J OIN and J OIN 2 with logarithmic costs is not sufficient.3 One needs additional properties of the trees. The contribution of this paper is to give first work-optimal bounds for Adams’ algorithms. We do this not only for the weight-balanced trees. we bound the work and depth of Adams’ algorithms (union, intersection and difference) for four different balancing shemes: AVL trees, red-black trees, weight-balanced trees and treaps. We analyze exactly the algorithms in Figure 1, and the bounds hold when either input tree is larger. We show that with appropriate (and simple) implementations of J OIN for each of the four balancing schemes, we achieve asymptotically optimal bounds on work. Furthermore the algorithms have O(log n log m) depth, and hence are highly parallel. To prove the bounds on work we show that our implementations of J OIN satisfy certain conditions based on a rank we define for each tree type. In particular the cost of J OIN must be proportional to the difference in ranks of two trees, and the rank of the result of a join must be at most one more than the maximum rank of the two arguments. In addition to the theoretical analysis of the algorithms, we implemented parallel versions of all of the algorithms on all four tree types and describe a set of experiments. Our implementation is generic in the sense that we use common code for the algorithms in Figure 1, and only wrote specialized code for each tree type for the J OIN function. Our implementations of J OIN are as described in this paper. We compare performance across a variety of parameters. We compare across the tree types, and interestingly all four balance criteria have very similar performance. We measure the speedup on up to 64 cores and achieve close to a 46-fold speedup. We compare to other implementations, including the set implementation in the C++ Standard Template library (STL) for sequential performance, and parallel weight-balanced B-trees (WBB-trees) [12] and the multi-core standard template library (MCSTL) [13] for parallel performance. We also compare for different data distributions. The conclusion from the experiments is that although not always as fast as (WBB-trees) [12] on uniform distributions, the generic code is quite competitive, and on keys with a skewed overlap (two Gaussians with different means), our implementation is much better than all the other baselines. Related Work Parallel set operations on two ordered sets have been well-studied, but each previous algorithm only works on one type of balance tree. Paul, Vishkin, and Wagener studied bulk insertion and deletion on 2-3 trees in the PRAM model [24]. Park and Park showed similar results for red-black  trees [23]. These algorithms are not based n on J OIN. Katajainen [16] claimed an algorithm with O m log( m + 1) work and O(log n) depth using 2-3 tree, but was shown to contain some bugs so the bounds do not hold [6]. Akhremtsev and Sanders [4] (unpublished) recently fixed that and proposed an algorithm based on (a, b)-trees with optimal work and O(log n) depth. Their algorithm only works for (a, b)-trees, and they only gave algorithms on U NION. Besides, our algorithm is much simpler and easy to be implemented than theirs. Blelloch and Miller showed a similar algorithm as Adams’ (as well as ours) on treaps with optimal work and O(log n) depth on a EREW PRAM with scan operation using pipelines (implying O(log n log m) depth on a plain EREW PRAM, and O(log∗ m log n) depth on a plain CRCW PRAM). The pipelining 2 Adams’ version had some bugs in maintaining the balance, but these were later fixed [14, 27]. the cost of J OIN, S PLIT, and J OIN 2 by the logarithm of the smaller tree is probably sufficient, but implementing a data structure with such bounds is very much more complicated. 3 Bounding 3 is quite complicated. Our focus in this paper is in showing that very simple algorithm are work efficient and have polylogarithmic depth, and less with optimizing the depth. Many researchers have considered concurrent implementations of balanced search trees (e.g., [17, 18, 10, 21]). None of these is work efficient for U NION since it is necessary to insert one tree into the other taking work at least O(m log n). Furthermore the overhead of concurrency is likely to be very high. 2 Preliminaries A binary tree is either a Leaf, or a node consisting of a left binary tree TL , a value (or key) v, and a right binary tree TR , and denoted Node(TL , v, TR ). The size of a binary tree, or |T |, is 0 for a Leaf and |TL | + |TR | + 1 for a Node(TL , v, TR ). The weight of a binary tree, or w(T ), is one more than its size (i.e., the number of leaves in the tree). The height of a binary tree, or h(T ), is 0 for a Leaf, and max(h(TL ), h(TR )) + 1 for a Node(TL , v, TR ). Parent, child, ancestor and descendant are defined as usual (ancestor and descendant are inclusive of the node itself). The left spine of a binary tree is the path of nodes from the root to a leaf always following the left tree, and the right spine the path to a leaf following the right tree. The in-order values of a binary tree is the sequence of values returned by an in-order traversal of the tree. A balancing scheme for binary trees is an invariant (or set of invariants) that is true for every node of a tree, and is for the purpose of keeping the tree nearly balanced. In this paper we consider four balancing schemes that ensure the height of every tree of size n is bounded by O(log n). For each balancing scheme we define the rank of a tree, or r(T ). AVL trees [3] have the invariant that for every Node(TL , v, TR ), the height of TL and TR √ differ by at most one. This property implies that any AVL tree of size n has height at most logφ (n + 1), where φ = 1+2 5 is the golden ratio. For AVL trees r(T ) = h(T ) − 1. Red-black (RB) trees [5] associate a color with every node and maintain two invariants: (the red rule) no red node has a red child, and (the black rule) the number of black nodes on every path from the root down to a leaf is equal. Unlike some other presentations, we do not require that the root of a tree is black. Our proof of the work bounds requires allowing a red root. We define the black height of a node T , denoted ĥ(T ) to be the number of black nodes on a downward path from the node to a leaf (inclusive of the node). Any RB tree of size n has height at most 2 log2 (n + 1). In RB trees r(T ) = 2(ĥ(T ) − 1) if T is black and r(T ) = 2ĥ(T ) − 1 if T is red. Weight-balanced (WB) trees with parameter α (also called BB[α] trees) [22] maintain for every T = Node(TL , v, TR ) L) the invariant α ≤ w(T w(T ) ≤ 1 − α. We say two weight-balanced trees T1 and T2 have like weights if Node(T1 , v, T2 ) is 2 1 weight balanced. Any α weight-balanced tree of size n has height at most log 1−α n. For 11 < α ≤ 1 − √12 insertion and deletion can be implemented on weight balanced trees using just single and double rotations [22, 7]. We require the same condition for our implementation of J OIN, and in particular use α = 0.29 in experiments. For WB trees r(T ) = dlog2 (w(T ))e − 1. Treaps [25] associate a uniformly random priority with every node and maintain the invariant that the priority at each node is no greater than the priority of its two children. Any treap of size n has height O(log n) with high probability (w.h.p)4 . For treaps r(T ) = dlog2 (w(T ))e − 1. For all the four balancing schemes r(T ) = Θ(log(|T | + 1)). The notation we use for binary trees is summarized in Table 1. A Binary Search Tree (BST) is a binary tree in which each value is a key taken from a total order, and for which the in-order values are sorted. A balanced BST is a BST maintained with a balancing scheme, and is an efficient way to represent ordered sets. Our algorithms are based on nested parallelism with nested fork-join constructs and no other synchronization or communication among parallel tasks.5 All algorithms are deterministic. We use work (W ) and span (S) to analyze asymptotic costs, where the work is the total number of operations and span is the critical path. We use the simple composition rules W (e1 || e2 ) = W (e1 ) + W (e2 ) + 1 and S(e1 || e2 ) = max(S(e1 ), S(e2 )) + 1. For sequential 4 Here 5 This w.h.p. means that height O(c log n) with probability at least 1 − 1/nc (c is a constant) does not preclude using our algorithms in a concurrent setting. 4 Notation |T | h(T ) ĥ(T ) r(T ) w(T ) p(T ) k(T ) L(T ) R(T ) expose(T ) Description The size of tree T The height of tree T The black height of an RB tree T The rank of tree T The weight of tree T (i.e, |T | + 1) The parent of node T The value (or key) of node T The left child of node T The right child of node T (L(T ), k(T ), R(T )) Table 1: Summary of notation. computation both work and span compose with addition. Any computation with W work and S span will run in time T <W P + S assuming a PRAM (random access shared memory) with P processors and a greedy scheduler [9, 8]. 3 The JOIN Function Here we describe algorithms for J OIN for the four balancing schemes we defined in Section 2. The function J OIN(TL , k, TR ) takes two binary trees TL and TR , and a value k, and returns a new binary tree for which the in-order values are a concatenation of the in-order values of TL , then k, and then the in-order values of TR . As mentioned in the introduction and shown in Section 4, J OIN fully captures what is required to rebalance a tree and can be used as the only function that knows about and maintains the balance invariants. For AVL, RB and WB trees we show that J OIN takes work that is proportional to the difference in rank of the two trees. For treaps the work depends on the priority of k. All versions of J OIN are sequential so the span is equal to the work. Due to space limitations, we describe the algorithms, state the theorems for all balancing schemes, but only show a proof outline for AVL trees. 1 joinRight(TL , k, TR ) = 2 (l, k0 , c) = expose(TL ); 3 if h(c) ≤ h(TR ) + 1 then 4 T 0 = Node(c, k, TR ); 5 if h(T 0 ) ≤ h(l) + 1 then Node(l, k0 , T 0 ) 6 else rotateLeft(Node(l, k0 , rotateRight(T 0 ))) 7 else 8 T 0 = joinRight(c, k, TR ); 9 T 00 = Node(l, k0 , T 0 ); 10 if h(T 0 ) ≤ h(l) + 1 then T 00 11 else rotateLeft(T 00 ) 12 join(TL , k, TR ) = 13 if h(TL ) > h(TR ) + 1 then joinRight(TL , k, TR ) 14 else if h(TR ) > h(TL ) + 1 then joinLeft(TL , k, TR ) 15 else Node(TL , k, TR ) Figure 2: AVL J OIN algorithm. AVL trees. Pseudocode for AVL J OIN is given in Figure 2 and illustrated in Figure 6. Every node stores its own height so that h(·) takes constant time. If the two trees TL and TR differ by height at most one, J OIN can simply create a new Node(TL , k, TR ). However if they differ by more than one then rebalancing is required. Suppose that h(TL ) > h(TR ) + 1 (the other case is symmetric). The idea is to follow the right spine of TL until a node c for which h(c) ≤ h(TR ) + 1 is found (line 3). At this point a new Node(c, k, TR ) is created to replace c (line 4). Since either 5 1 joinRightRB(TL , k, TR ) = 2 if (r(TL ) = br(TR )/2c × 2) then 3 Node(TL , hk, redi, TR ); 4 else 5 (L0 , hk0 , c0 i, R0 )=expose(TL ); 6 T 0 = Node(L0 , hk0 , c0 i,joinRightRB(R0 , k, TR )); 7 if (c0 =black) and (c(R(T 0 )) = c(R(R(T 0 )))=red) then 8 c(R(R(T 0 )))=black; 9 T 00 =rotateLeft(T 0 ) 10 else T 00 11 joinRB(TL , k, TR ) = 12 if br(TL )/2c > br(TR )/2c then 13 T 0 =joinRightRB(TL , k, TR ); 14 if (c(T 0 )=red) and (c(R(T 0 ))=red) then 15 Node(L(T 0 ), hk(T 0 ), blacki, R(T 0 )) 16 else T 0 17 else if br(TR )/2c > br(TL )/2c then 18 T 0 =joinLeftRB(TL , k, TR ); 19 if (c(T 0 )=red) and (c(L(T 0 ))=red) then 20 Node(L(T 0 ), hk(T 0 ), blacki, R(T 0 )) 21 else T 0 22 else if (c(TL )=black) and (c(TR )=black) then 23 Node(TL , hk, redi, TR ) 24 else Node(TL , hk, blacki, TR ) Figure 3: RB J OIN algorithm. 1 joinRightWB(TL , k, TR ) = 2 (l, k0 , c)=expose(TL ); 3 if (balance(|TL |, |TR |) then Node(TL , k, TR )); 4 else 5 T 0 = joinRightWB(c, k, TR ); 6 (l1 , k1 , r1 ) = expose(T 0 ); 7 if like(|l|, |T 0 |) then Node(l, k0 , T 0 ) 8 else if (like(|l|, |l1 |)) and (like(|l| + |l1 |, r1 )) then 9 rotateLeft(Node(l, k0 , T 0 )) 10 else rotateLeft(Node(l, k0 ,rotateRight(T 0 ))) 11 joinWB(TL , k, TR ) = 12 if heavy(TL , TR ) then joinRightWB(TL , k, TR ) 13 else if heavy(TR , TL ) then joinLeftWB(TL , k, TR ) 14 else Node(TL , k, TR ) Figure 4: WB J OIN algorithm. 1 joinTreap(TL , k, TR ) = 2 if prior(k, k1 ) and prior(k, k2 ) then Node(TL , k, TR ) 3 else (l1 , k1 , r1 )=expose(TL ); 4 (l2 , k2 , r2 )=expose(TR ); 5 if prior(k1 , k2 ) then 6 Node(l1 , k1 ,joinTreap(r1 , k, TR )) 7 else Node(joinTreap(TL , k, l2 ),k2 , r2 ) Figure 5: Treap J OIN algorithm. h(c) = h(TR ) or h(c) = h(TR ) + 1, the new node satisfies the AVL invariant, and its height is one greater than c. The increase in height can increase the height of its ancestors, possibly invalidating the AVL invariant of those nodes. This 6 can be fixed either with a double rotation if invalid at the parent (line 6) or a single left rotation if invalid higher in the tree (line 11), in both cases restoring the height for any further ancestor nodes. The algorithm will therefore require at most two rotations. …… The right branch in 𝑇𝑇𝐿𝐿 𝑘𝑘 k p a c 𝑇𝑇𝑅𝑅 Step 1: connect …… 𝑇𝑇1 𝑇𝑇2 (h or h+1) d 𝑇𝑇𝑅𝑅 (h) c p a k p c h+2 (h or h+1) Step 2: rebalance …… 𝑇𝑇1 (h or h+1) a d 𝑇𝑇2 𝑇𝑇𝑅𝑅 (h or h+1) (h) Rebalance required if ℎ 𝑇𝑇1 = ℎ ℎ 𝑇𝑇2 = ℎ + 1 𝑇𝑇1 (h) k c1 𝐿𝐿 𝑇𝑇2 (h or h-1) c2 𝑅𝑅 𝑇𝑇2 (h or h-1) d h+2 𝑇𝑇𝑅𝑅 (h) Figure 6: An example for J OIN on AVL trees (h(TL ) > h(TR ) + 1). We first follow the right spine of TL until a subtree of height at most h(Tr ) + 1 is found (i.e., T2 rooted at c). Then a new Node(c, k, TR ) is created, replacing c (Step 1). If h(T1 ) = h and h(T2 ) = h + 1, the node p will no longer satisfy the AVL invariant. A double rotation (Step 2) restores both balance and its original height. Lemma 1. For two AVL trees TL and TR , the AVL J OIN algorithm works correctly, runs with O(|h(TL ) − h(TR )|) work, and returns a tree satisfying the AVL invariant with height at most 1 + max(h(TL ), h(TR )). Proof outline. Since the algorithm only visits nodes on the path from the root to c, and only requires at most two rotations, it does work proportional to the path length. The path length is no more than the difference in height of the two trees since the height of each consecutive node along the right spine of TL differs by at least one. Along with the case when h(TR ) > h(TL ) + 1, which is symmetric, this gives the stated work bounds. The resulting tree satisfies the AVL invariants since rotations are used to restore the invariant (details left out). The height of any node can increase by at most one, so the height of the whole tree can increase by at most one. Red-black Trees. Tarjan describes how to implement the J OIN function for red-black trees [28]. Here we describe a variant that does not assume the roots are black (this is to bound the increase in rank by U NION). The pseudocode is given in Figure 3. We store at every node its black height ĥ(·). The first case is when ĥ(TR ) = ĥ(TL ). Then if both k(TR ) and k(TL ) are black, we create red Node(TL , k, TR ), otherwise we create black Node(TL , k, TR ). The second case is when ĥ(TR ) < ĥ(TL ) = ĥ (the third case is symmetric). Similarly to AVL trees, J OIN follows the right spine of TL until it finds a black node c for which ĥ(c) = ĥ(TR ). It then creates a new red Node(c, k, TR ) to replace c. Since both c and TR have the same height, the only invariant that can be violated is the red rule on the root of TR , the new node, and its parent, which can all be red. In the worst case we may have three red nodes in a row. This is fixed by a single left rotation: if a black node v has R(v) and R(R(v)) both red, we turn R(R(v)) black and perform a single left rotation on v. The update is illustrated in Figure 7. The rotation, however can again violate the red rule between the root of the rotated tree and its parent, requiring another rotation. The double-red issue might proceed up to the root of TL . If the original root of TL is red, the algorithm may end up with a red root with a red child, in which case the root will be turned black, turning TL rank from 2ĥ − 1 to 2ĥ. If the original root of TL is black, the algorithm may end up with a red root with two black children, turning the rank of TL from 2ĥ − 2 to 2ĥ − 1. In both cases the rank of the result tree is at most 1 + r(TL ). Lemma 2. For two RB trees TL and TR , the RB J OIN algorithm works correctly, runs with O(|r(TL ) − r(TR )|) work, and returns a tree satisfying the red-black invariants and with rank at most 1 + max(r(TL ), r(TR )). The proof is similar as Lemma 1. Weight Balanced Trees. We store the weight of each subtree at every node. The algorithm for joining two weightbalanced trees is similar to that of AVL trees and RB trees. The pseudocode is shown in Figure 4. The like function in the code returns true if the two input tree sizes are balanced, and false otherwise. If TL and TR have like weights the algorithm returns a new Node(TL , k, TR ). Suppose |TR | ≤ |TL |, the algorithm follows the right branch of TL until it reaches a node c with like weight to TR . It then creates a new Node(c, k, TR ) replacing c. The new node will have weight greater than c and therefore could imbalance the weight of c’s ancestors. This can be fixed with a single or double rotation (as shown in Figure 8) at each node assuming α is within the bounds given in Section 2. 7 Red node …… Black node The right branch in 𝑇𝑇𝐿𝐿 g a k p b 𝑇𝑇1 𝑇𝑇2 (h) (h) Step 1: connect (when 𝑝𝑝 is red) 𝑇𝑇𝑅𝑅 𝑘𝑘 g a c d 𝑇𝑇3 𝑇𝑇1 𝑇𝑇𝑅𝑅 (h) (h) c d 𝑇𝑇3 𝑇𝑇𝑅𝑅 (h) (h) Step 2: rebalance (when 𝑝𝑝 is red) …… p r k g v v k 𝑇𝑇2 (h) (h) 1) When k(𝑇𝑇𝐿𝐿 ) is red, after rotation on 𝐿𝐿(𝑇𝑇𝐿𝐿 ): Rank increases from 2ℎ� + 1 to 2(ℎ� + 1) 2) When k(𝑇𝑇𝐿𝐿 ) is black, after rotation on 𝑘𝑘(𝑇𝑇𝐿𝐿 ): r p b If the unbalance propagate to the root of 𝑇𝑇𝐿𝐿 : r Rebalance required on: 𝒈𝒈: 𝑝𝑝 and 𝑘𝑘 are red 𝒑𝒑: 𝑘𝑘 and 𝑑𝑑 are red, 𝑝𝑝 is black …… Step 3: adjust on root w Node of either color a b c d 𝑇𝑇1 (h) 𝑇𝑇2 (h) 𝑇𝑇3 𝑇𝑇𝑅𝑅 v v u r Rank increases from 2ℎ� to 2ℎ� + 1 u (h) (h) Figure 7: An example of J OIN on red-black trees (ĥ = ĥ(TL ) > ĥ(TR )). We follow the right spine of TL until we find a black node with the same black height as TR (i.e., c). Then a new red Node(c, k, TR ) is created, replacing c (Step 1). The only invariant that can be violated is when either c’s previous parent p or TR ’s root d is red. If so, a left rotation is performed at some black node. Step 2 shows the rebalance when p is red. The black height of the rotated subtree (now rooted at p) is the same as before (h + 1), but the parent of p might be red, requiring another rotation. If the red-rule violation propagates to the root, the root is either colored red, or rotated left (Step 3). Lemma 3. For two α weight-balanced trees TL and TR and α ≤ 1 − √12 ≈ 0.29, the weight-balanced J OIN algorithm works correctly, runs with O(| log(w(TL )/w(TR ))|) work, and returns a tree satisfying the α weight-balance invariant and with rank at most 1 + max(r(TL ), r(TR )). The proof is shown in the Appendix. Treaps. The treap J OIN algorithm (as in Figure 5) first picks the key with the highest priority among k, k(TL ) and k(TR ) as the root. If k is the root then the we can return Node(TL , k, TR ). Otherwise, WLOG, assume k(TL ) has a higher priority. In this case k(TL ) will be the root of the result, L(TL ) will be the left tree, and R(TL ), k and TR will form the right tree. Thus J OIN recursively calls itself on R(TL ), k and TR and uses result as k(TL )’s right child. When k(TR ) has a higher priority the case is symmetric. The cost of J OIN is therefore the depth of the key k in the resulting tree (each recursive call pushes it down one level). In treaps the shape of the result tree, and hence the depth of k, depend only on the keys and priorities and not the history. Specifically, if a key has the tth highest priority among the keys, then its expected depth in a treap is O(log t) (also w.h.p.). If it is the highest priority, for example, then it remains at the root. Lemma 4. For two treaps TL and TR , if the priority of k is the t-th highest among all keys in TL ∪ {k} ∪ TR , the treap J OIN algorithm works correctly, runs with O(log t + 1) work in expectation and w.h.p., and returns a tree satisfying the treap invariant with rank at most 1 + max(r(TL ), r(TR )). From the above lemmas we can get the following fact for J OIN. Theorem 1. For AVL, RB and WB trees J OIN(TL , k, TR ) does O(|r(TL ) − r(TR )|) work. For treaps J OIN does O(log t) work in expectation if k has the t-th highest priority among all keys. For AVL, RB, WB trees and treaps, J OIN returns a tree T for which the rank satisfies max(r(TL ), r(TR )) ≤ r(T ) ≤ 1 + max(r(TL ), r(TR )). 8 …… (1). Single Rotation u (0) …… v 1 1 The right branch in 𝑇𝑇𝐿𝐿 𝐴𝐴 𝐴𝐴 5 2 4 𝐵𝐵 𝐶𝐶 4 2 u 3 v …… 𝐵𝐵 3 5 𝐶𝐶 𝐷𝐷 (2). Double Rotation 3 𝐷𝐷 u (0): The rebalance process is currently at 𝑣𝑣, which means the tree rooted at 𝑢𝑢 and all of its subtrees are balanced. (1): The result of the single rotation. (2): The result of the double rotation. v 1 2 4 5 𝐴𝐴 𝐵𝐵 𝐶𝐶 𝐷𝐷 Figure 8: An illustration of single and double rotations possibly needed to rebalance weight-balanced trees. In the figure the subtree rooted at u has become heavier due to joining in TL and its parent v now violates the balance invariant. 4 Other Functions Using JOIN In this section, we describe algorithms for various functions that use just J OIN. The algorithms are generic across balancing schemes. The pseudocodes for the algorithms in this section is shown in Figure 1. Split. For a BST T and key k, S PLIT(T, k) returns a triple (TL , b, TR ), where TL (TR ) is a tree containing all keys in T that are less (larger) than k, and b is a flag indicating whether k ∈ T . The algorithm first searches for k in T , splitting the tree along the path into three parts: keys to the left of the path, k itself (if it exists), and keys to the right. Then by applying J OIN, the algorithm merges all the subtrees on the left side (using keys on the path as intermediate nodes) from bottom to top to form TL , and merges the right parts to form TR . Figure 9 gives an example. Split 𝑇𝑇 with key 42: 𝑇𝑇𝐿𝐿 = 𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗( ^ 12 ^ ^ ^ ^ 22 ^ ^ 36 15 ^ 17 5 51 17 5 80 30 ^ , 25 , 𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗( 8 25 13 8 13 ^ 42 ^ ^ 70 ^ ^ 95 ^ ^ ^ ^ 𝑇𝑇𝑅𝑅 = 𝑗𝑗𝑗𝑗𝑗𝑗𝑗𝑗( 12 ^ ^ 15 ^ , ^ 51 , 30 ^ 36 , ^ ) ) ^ 22 ^ ^ ^ 80 , 70 ^ 95 ^ ^ ) ^ 𝑏𝑏 = 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 Figure 9: An example of S PLIT in a BST with key 42. We first search for 42 in the tree and split the tree by the searching path, then use J OIN to combine trees on the left and on the right respectively, bottom-top. Theorem 2. The work of S PLIT(T, k) is O(log |T |) for all balancing schemes described in Section 3 (w.h.p. for treaps). The two resulting trees TL and TR will have rank at most r(T ). 9 Proof. We only consider the work of joining all subtrees on the left side. The other side is symmetric. Suppose we have l subtrees on the left side, denoted from bottom to top as T1 , T2 , . . . Tl . We have that r(T1 ) ≤ r(T2 ) ≤ · · · ≤ r(Tl ). As stated above, we consecutively join T1 and T2 returning T20 , then join T20 with T3 returning T30 and so forth, until all trees are merged. The overall work of S PLIT is the sum of the cost of l − 1 J OIN functions. For AVL trees, red-black trees and weight-balanced trees, recall Theorem 1 that we have r(Ti0 ) ≤ r(Ti ) + 1, so r(Ti0 ) ≤ r(Ti ) + 1 ≤ r(Ti+1 ) + 1. According to Theorem 1, the work of a single operation is O(|r(Ti+1 ) − r(Ti0 )|). Pl Pl The overall complexity is i=1 |r(Ti+1 ) − r(Ti0 )| ≤ i=1 r(Ti+1 ) − r(Ti0 ) + 2 = O(r(T )) = O(log |T |). For treaps, each J OIN uses the key with the highest priority since the key is always on a upper level. Hence by Lemma 4, the complexity of each J OIN is O(1) and the work of split is at most O(log |T |) w.h.p. Also notice that when getting the final result TL and TR , the last step is a J OIN on two trees, the larger one of which is a subtree of the original T . Thus the rank of the two trees to be joined is of rank at most r(T ) − 1, according to Theorem 1 we have r(TL ) and r(TR ) at most r(T ). Join2. J OIN 2(TL , TR ) returns a binary tree for which the in-order values is the concatenation of the in-order values of the binary trees TL and TR (the same as J OIN but without the middle key). For BSTs, all keys in TL have to be less than keys in TR . J OIN 2 first finds the last element k (by following the right spine) in TL and on the way back to root, joins the subtrees along the path, which is similar to S PLIT TL by k. We denote the result of dropping k in TL as TL0 . Then J OIN(TL0 , k, TR ) is the result of J OIN 2. Unlike J OIN, the work of J OIN 2 is proportional to the rank of both trees since both S PLIT and J OIN take at most logarithmic work. Theorem 3. The work of J OIN 2(TL , TR ) is O(r(TL ) + r(TR )) for all balancing schemes described in Section 3 (bounds are w.h.p for treaps). Union, Intersect and Difference. U NION(T1 , T2 ) takes two BSTs and returns a BST that contains the union of all keys. The algorithm uses a classic divide-and-conquer strategy, which is parallel. At each level of recursion, T1 is split by k(T2 ), breaking T1 into three parts: one with all keys smaller than k(T2 ) (denoted as L1 ), one in the middle either of only one key equal to k(T2 ) (when k(T2 ) ∈ T1 ) or empty (when k(T2 ) ∈ / T1 ), the third one with all keys larger than k(T2 ) (denoted as R1 ). Then two recursive calls to U NION are made in parallel. One unions L(T2 ) with L1 , returning TL , and the other one unions R(T2 ) with R1 , returning TR . Finally the algorithm returns J OIN(TL , k(T2 ), TR ), which is valid since k(T2 ) is greater than all keys in TL are less than all keys in TR . The functions I NTERSECT(T1 , T2 ) and D IFFERENCE(T1 , T2 ) take the intersection and difference of the keys in their sets, respectively. The algorithms are similar to U NION in that they use one tree to split the other. However, the method for joining is different. For I NTERSECT, J OIN 2 is used instead of J OIN if the root of the first is not found in the second. For D IFFERENCE, J OIN 2 is used anyway because k(T2 ) should be excluded in the result tree. The base cases are also different in the obvious way. Theorem 4 (Main Theorem). For all the four balance schemes mentioned in Section 3, the work and span of the algorithm (asshownin Figure 1) of U NION, I NTERSECT or D IFFERENCE on two balanced BSTs of sizes m and n n (n ≥ m) is O m log + 1 and O(log n log m) respectively (the bound is in expectation for treaps). m A generic proof of Theorem 4 working for all the four balancing schemes will be shown in the next section. The work bound for these algorithms is optimal in the comparison-based model. In particular considering all possi n ble interleavings, the minimum number of comparisons required to distinguish them is log m+n = Θ m log m +1 n [15]. Other Functions. Many other functions can be implemented with J OIN. Pseudocode for I NSERT and D ELETE was given in Figure 1. For a tree of size n they both take O(log n) work. 5 The Proof of the Main Theorem In this section we prove Theorem 4, for all the four balance schemes (AVL trees, RB trees, WB trees and treaps) and all three set algorithms (U NION, I NTERSECT, D IFFERENCE) from Figure 1. For this purpose we make two observations. The first is that all the work for the algorithms can be accounted for within a constant factor by considering just the 10 Notation Tp Td n m Tp (v), v ∈ Tp Td (v), v ∈ Tp si vkj d(v) Description The pivot tree The decomposed tree max(|Tp |, |Td |) min(|Tp |, |Td |) The subtree rooted at v in Tp The tree from Td that v splits6 The number of nodes in layer i The j-th node on layer k in Tp The number of nodes attached to a layer root v in a treap Table 2: Descriptions of notations used in the proof. work done by the S PLITs and the J OINs (or J OIN 2s), which we refer to as split work and join work, respectively. This is because the work done between each split and join is constant. The second observation is that the split work is identical among the three set algorithms. This is because the control flow of the three algorithms is the same on the way down the recursion when doing S PLITs—the algorithms only differ in what they do at the base case and on the way up the recursion when they join. Given these two observations, we prove the bounds on work by first showing that the join work is asymptotically at most as large as the split work (by showing that this is true at every node of the recursion for all three algorithms), and then showing that the split work for U NION (and hence the others) satisfies our claimed bounds. We start with some notation, which is summarized in Table 2. In the three algorithms the first tree (T1 ) is split by the keys in the second tree (T2 ). We therefore call the first tree the decomposed tree and the second the pivot tree, denoted as Td and Tp respectively. The tree that is returned is denoted as Tr . Since our proof works for either tree being larger, we use m = min(|Tp |, |Td |) and n = max(|Tp |, |Td |). We denote the subtree rooted at v ∈ Tp as Tp (v), and the tree of keys from Td that v splits as Td (v) (i.e., S PLIT(v, Td (v)) is called at some point in the algorithm). For v ∈ Tp , we refer to |Td (v)| as its splitting size. Figure 10 (a) illustrates the pivot tree with the splitting size annotated on each node. Since S PLIT has logarithmic work, we have,   X split work = O (log |Td (v)| + 1), v∈Tp which we analyze in Theorem 6. We first, however, show that the join work is bounded by the split work. We use the following Lemma, which is proven in the appendix. Lemma 5. For Tr =U NION(Tp , Td ) on AVL, RB or WB trees, if r(Tp ) > r(Td ) then r(Tr ) ≤ r(Tp ) + r(Td ). Theorem 5. For each function call to U NION, I NTERSECT or D IFFERENCE on trees Tp (v) and Td (v), the work to do the J OIN (or J OIN 2) is asymptotically no more than the work to do the S PLIT. Proof. For I NTERSECT or D IFFERENCE, the cost of J OIN (or J OIN 2) is O(log(|Tr | + 1)). Notice that D IFFER ENCE returns the keys in Td \Tp . Thus for both I NTERSECT and D IFFERENCE we have Tr ⊆ Td . The join work is O(log(|Tr | + 1)), which is no more than O(log(|Td | + 1)) (the split work). For U NION, if r(Tp ) ≤ r(Td ), the J OIN will cost O(r(Td )), which is no more than the split work. Consider r(Tp ) > r(Td ) for AVL, RB or WB trees. The rank of L(Tp ) and R(Tp ), which are used in the recursive calls, are at least r(Tp ) − 1. Using Lemma 5, the rank of the two trees returned by the two recursive calls will be at least (r(Tp ) − 1) and at most (r(Tp ) + r(Td )), and differ by at most O(r(Td )) = O(log |Td | + 1). Thus the join cost is O(log |Td | + 1), which is no more than the split work. 6 The nodes in Td (v) form a subset of Td , but not necessarily a subtree. See details later. 11 50 20 30 3 1 1 𝑣𝑣01 13 7 6 5 1 12 4 5 1 3 4 (a) layer 3 2 0 2 3 4 17 8 11 7 Total cost: log 50 + log 20 + ⋯ + log 8 + 𝑣𝑣11 𝑣𝑣21 𝑣𝑣02 𝑣𝑣31 𝑣𝑣12 (b) 𝑠𝑠3 = 1 𝑣𝑣22 𝑣𝑣03 𝑣𝑣04 𝑣𝑣13 𝑠𝑠2 = 2 𝑣𝑣05 � 𝑥𝑥𝑖𝑖𝑖𝑖 ≤ 𝑀𝑀 𝑠𝑠1 = 3 𝑗𝑗 𝑠𝑠0 = 5 Figure 10: An illustration of splitting tree and layers. The tree in (a) is Tp , the dashed circle are the exterior nodes. The numbers on the nodes are the sizes of the tree from Td to be split by this node, i.e., the “splitting size” |Td (v)|. In (b) is an illustration of layers on an AVL tree. Consider r(Tp ) > r(Td ) for treaps. If r(Tp ) > r(Td ), then |Tp | ≥ |Td |. The root of Tp has the highest priority |T |+|T | among all |Tp | keys, so on expectation it takes at most the p|Tp | d ≤ 2-th place among all the |Td | + |Tp | keys. From Lemma 4 we know that the cost on expectation is E[log t] + 1 ≤ log E[t] + 1 ≤ log 2 + 1, which is a constant. This implies the total join work is asymptotically bounded by the split work. We now analyze the split work. We do this by layering the pivot tree starting at the leaves and going to the root and such that nodes in a layer are not ancestors of each other. We define layers based on the ranks and denote the size of layer i as si . We show that si shrinks geometrically, which helps us prove our bound on the split work. For AVL and RB trees, we group the nodes with rank i in layer i. For WB trees and treaps, we put a node v in layer i iff v has rank i and v’s parent has rank strictly greater than i. Figure 10 (b) shows an example of the layers of an AVL tree. Definition 1. In a BST, a set of nodes V is called a disjoint set if and only if for any two nodes v1 , v2 in V , v1 is not the ancestor of v2 . P Lemma 6. For any disjoint set V ⊆ Tp , v∈V |Td (v)| ≤ |Td |. The proof of this Lemma is straightforward. Lemma 7. For an AVL, RB, WB tree or a treap of size N , each layer is a disjoint set, and si ≤ constant c > 1. N cbi/2c holds for some Proof. For AVL, RB, WB trees and treaps, a layer is obviously a disjoint set: a node and its ancestor cannot lie in the same layer. For AVL trees, consider a node in layer 2, it must have at least two descendants in layer 0. Thus s0 ≥ 2s2 . Since an AVL tree with its leaves removed is still an AVL tree, we have si ≥ 2si+2 . Since s0 and s1 are no more than N , N we can get that si < 2bi/2c . For RB trees, the number of black nodes in layer 2i is more than twice as many as in layer 2(i + 1) and less than four times as many as in layer 2(i + 1), i.e., s2i ≥ 2s2i+2 . Also, the number of red nodes in layer 2i + 1 is no more N than the black nodes in layer 2i. Since s0 and s1 are no more than N , si < 2bi/2c . 12 For WB trees and treaps, the rank is defined as dlog2 (w(T ))e − 1, which means that a node in layer i has weight at least 2i + 1. Thus si ≤ (N + 1)/(2i + 1) ≤ N/2i . Not all nodes in a WB tree or a treap are assigned to a layer. We call a node a layer root if it is in a layer. We attach each node u in the tree to the layer root that is u’s ancestor and has the same rank as u. We denote d(v) as the number of descendants attached to a layer root v. Lemma 8. For WB trees and treaps, if v is a layer root, d(v) is less than a constant (in expectation for treaps). Furthermore, the random variables d(v) for all layer roots in a treap are i.i.d. (See the proof in the Appendix.) By applying Lemma 7 and 8 we prove the split work. In the following proof, we denote vkj as the j-th node in layer k.  n +1 . Theorem 6. The split work in U NION, I NTERSECT and D IFFERENCE on two trees of size m and n is O m log m P  Proof. The total work of S PLIT is the sum of the log of all the splitting sizes on the pivot tree O log(|T (v)| + 1) . d v∈Tp Denote l as the number of layers in the tree. Also, notice that in the pivot tree, in each layer there are at most |Td | nodes with |Td (vkj )| > 0. Since P those nodes with splitting sizes of 0 will not cost any work, we can assume si ≤ |Td |. We calculate the dominant term v∈Tp log(|Td (v)| + 1) in the complexity by summing the work across layers: sk l X X k=0 j=1 log(|Td (vkj )| + 1) ≤ = l X P l X  sk log l X k=0  sk log |Td | sk |Td (vkj )| + 1  sk k=0 k=0 We split it into two cases. If |Td | ≥ |Tp |, j sk log |Td | +1 sk  always dominates 1. we have: |Td | +1 sk  = l X  sk log k=0 ≤ l X k=0 ≤ 2 m cbk/2c  n +1 sk   n log +1 m/cbk/2c (1) (2) l/2 X n m log k c m/ck k=0 l/2 l/2 X X m n m log + 2 k k ck m c k=0 k=0  n = O m log + O(m)  mn  = O m log +1 m ≤ 2 (3) If |Td | < |Tp |, |Tskd | can be less than 1 when k is smaller, thus the sum should be divided into two parts. Also note that we only sum over the nodes with splitting size larger than 0. Even though there could be more than |Td | nodes in 13 one layer in Tp , only |Td | of them should count. Thus we assume sk ≤ |Td |, and we have: l X k=0  sk log |Td | +1 sk  = l X  sk log k=0 2 logc k=0 (4) |Td | log(1 + 1) l X +  n Xm ≤ m +1 sk k=2 logc n n m cbk/2c  log l m +1 n/cbk/2c −logc  (5) m 2 X n n m k0 ≤ O m log +2 0 log c k m c k0 =0   n + O(m) = O m log m   n = O m log( + 1) m  (6) From (1) to (2) and (4) to (5) we apply Lemma 7 and the fact that f (x) = x log( nx + 1) is monotonically increasing when x ≤ n. For WB trees and treaps, the calculation above only includes the log of splitting size on layer roots. We need to  n further prove the total sum of the log of all splitting size is still O m log m + 1 . Applying Lemma 8, the expectation is less than:   xk l X X d(vkj ) log((Td (vkj ) + 1) E2 k=0 j=1 = E[d(vkj )] × 2 xk l X X log((Td (vkj ) + 1) k=0 j=1   n +1 = O m log m For WB trees d(vkj ) is no more than a constant, so we can also come to the same bound. To conclude, the split work on all four balancing schemes of all three functions is O m log n m  +1 . Theorem 7. The total work of U NION, I NTERSECT or D IFFERENCE of all four balancing schemes on two trees of  n size m and n (m ≥ n) is O m log m +1 . This directly follows Theorem 5 and 6. Theorem 8. The span of U NION and I NTERSECT or D IFFERENCE on all four balancing schemes is O(log n log m). Here n and m are the sizes of the two tree. Proof. For the span of these algorithms, we denote D(h1 , h2 ) as the span on U NION, I NTERSECT or D IFFERENCE on two trees of height h1 and h2 . According to Theorem 5, the work (span) of S PLIT and J OIN are both O(log |Td |) = O(h(Td )). We have: D(h(Tp ), h(Td )) ≤ D(h(Tp ) − 1, h(Td )) + 2h(Td ) Thus D(h(Tp ), h(Td )) ≤ 2h(Tp )h(Td ) = O(log n log m). Combine Theorem 7 and 8 we come to Theorem 4. 14 6 Experiments To evaluate the performance of our algorithms we performed several experiments across the four balancing schemes using different set functions, while varying the core count and tree sizes. We also compare the performance of our implementation to other existing libraries and algorithms. Experiment setups and baseline algorithms For the experiments we use a 64-core machine with 4 x AMD Opteron(tm) Processor 6278 (16 cores, 2.4GHz, 1600MHz bus and 16MB L3 cache). Our code was compiled using the g++ 4.8 compiler with the Cilk Plus extensions for nested parallelism. The only compilation flag we used was the -O2 optimization flag. In all our experiments we use keys of the double data type. The size of each node is about 40 bytes, including the two child pointers, the key, the balance information, the size of the subtree, and a reference count. We generate multiple sets varying in size from 104 to 108 . Depending on the experiment the keys are drawn either from an uniform or a Gaussian distribution. We use µ and σ to denote the mean and the standard deviation in Gaussian distribution. Throughout this section n and m represent the two input sizes for functions with two input sets (n ≥ m). We test our algorithm by comparing it to other available implementations. This includes the sequential version of the set functions defined in the C++ Standard Template Library (STL) [20] and STL’s std::set (implemented by RB tree). The STL supports the set operations set union, set intersection, and set difference on any container class. Using an std::vector these algorithms achieve a runtime of O(m + n). Since the STL does not offer any parallel version of these functions we could only use it for sequential experiments. To see how well our algorithm performs in a parallel setting, we compare it to parallel WBB-trees [12] and the MCSTL library [13]. WBB-trees, as well as the MCSTL, offer support for bulk insertions and deletions. They process the bulk updates differently. The MCSTL first splits the main tree among p processors, based on the bulk sequence, and then inserts the chunks dynamically into each subtree. The WBB-tree recursively inserts the bulk in parallel into the main tree. To deal with heavily skewed sequences they use partial tree reconstruction for fixing imbalances, which takes constant amortized time. The WBB-tree has a more cache aware layout, leading to a better cache utilization compared to both the MCSTL and our implementation. To make a comparison with these implementations we use their bulk insertions, which can also be viewed as an union of two sets. However notice that WBB-trees take the bulk in the form of a sorted sequence, which gives them an advantage due to the faster access to the one array than to a tree, and far better cache performance (8 keys per cache line as opposed to 1). Comparing the balancing schemes and functions To compare the four balancing schemes we choose U NION as the representative operation. Other operations would lead to similar results since all operations except J OIN are generic across the trees. We compare the schemes across different thread counts and different sizes. Figure 11 (a) shows the runtime of U NION for various tree sizes and all four balancing schemes across 64 cores. The times are very similar among the balancing schemes—they differ by no more than 10%. Figure 11 (b) shows the speedup curves for U NION on varying core numbers with two inputs of size 108 . All balancing schemes achieve a speedup of about 45 on 64 cores, and about 30 on 32 cores. The less-than-linear speedup beyond 32 cores is not due to lack of parallelism, since when we ran the same experiments on significantly smaller input (and hence less parallelism) we get very similar curves (not shown). Instead it seems to be due to saturation of the memory bandwidth. We use the AVL tree as the representative tree to compare different functions. Figure 11 (c) compares the U NION, I NTERSECT and D IFFERENCE functions. The size of the larger tree is fixed (108 ), while the size of the smaller tree varies from 104 to 108 . As the plot indicates, the three functions have very similar performance. The experiments are a good indication of the performance of different balancing schemes and different functions, while controlling other factors. The conclusion is that all schemes perform almost equally on all the set functions. It is not surprising that all balancing schemes achieve similar performance because the dominant cost is in cache misses along the paths in the tree, and all schemes keep the trees reasonably balanced. The AVL tree is always slightly faster than the other trees and this is likely due to the fact that they maintain a slightly stricter balance than the other trees, and hence the paths that need to be traversed are slightly shorter. For different set functions the performance is also as expected given the similarity of the code. 15 Union, m = n = 108 Union, m = 108 , Threads = 64 Sequential union, m = 108 m = 108 , Threads = 64 50 100 100 102 105 106 n 107 AVL WB Treap RB 10 0 108 0 20 (a) 0 10 −2 10 10−3 10 105 (e) 106 n, m 107 108 −1 10 −2 10 104 106 n 107 108 Union, m = n = 108 −2 10 10−3 10−4 106 n, m 105 (d) 10−1 −4 105 10−3 108 100 10−3 104 107 Join-AVL std::vector std::set 10−2 101 10 104 106 m 10−1 Union, Threads = 64 Time (s) −1 10−4 105 100 (c) Join-AVL WBB MCSTL 101 Time (s) Time (s) 10 104 60 Union, Threads = 64, σ = 0.25 Join-AVL WBB MCSTL 0 Union Intersect Difference (b) Union, Threads = 64 101 40 Threads 10−2 107 108 Time (s) 104 20 10−1 Time (s) AVL WB Treap RB 10−2 101 30 Time (s) 10 Speedup Time (s) 40 −1 Join-AVL WBB MCSTL 0 0.2 0.4 (g) (f) 0.6 σ 0.8 1 101 Join-AVL WBB MCSTL 100 0 20 40 Threads 60 (h) Figure 11: (a) Times for U NION as a function of size (n = 108 ) for different BBSTs; (b) speed up of U NION for different BBSTs; (c) times for various operations on AVL trees as a function of size (n = 108 ); (d) comparing STLs set union with our U NION; (e, f, g, h) comparing our U NION to other parallel search trees; (e, h) input keys are uniformly distributed doubles in the range of [0, 1]; (f, g) inputs keys follow a normal distribution of doubles - the mean of the main tree is always µ1 = 0, while the mean of the bulk is µ2 = 1. Figure (f) uses a standard deviation of σ = 0.25, while Figure (g) shows the performance across different standard deviations. Given the result that the four balancing schemes do not have a big difference in timing and speedup, nor do the three set functions, in the following experiments we use the AVL tree along with U NION to make comparisons with other implementations. Comparing to sequential implementations The STL supports set union on any sorted container class, including sets based on red-black trees, and sorted vectors (arrays). The STL set union merges the two sorted containers by moving from left to right on the two inputs, comparing the current values, and writing the lesser to the end of the output. For two inputs of size n and m, m ≤ n, it takes O(m+n) time on std::vectors, and O((n+m) log(n+m)) time on std::set (each insertion at the end of the output red-black tree takes O(log(n+m)) time). In the case of ordered sets we can do better by inserting elements from the smaller set into the larger, leading a time of O(m log(n + m). This is also what we do in our experiments. For vectors we stick with the available set union implementation. Figure 11 (d) gives a comparison of times for U NION. For equal lengths our implementation is about a factor of 3 faster than set variant (red-black trees), and about 8 times slower than the vector variant. This is not surprising since we are asymptotically faster than their red-black tree implementation, and their array-based implementation just reads and writes the values, one by one, from flat arrays, and therefore has much less overhead and much fewer cache misses. For taking the union of smaller and larger inputs, our U NION is orders of magnitude faster than either STL version. This is because their theoretical work bound (O(m + n) and O(m log(m + n)) is worse than our O(m log(n/m + 1)), which is optimal in comparison model. Comparing to parallel implementations on various input distributions We compare our implementations to other parallel search trees, such as the WBB-trees, as described in [12], and parallel RB trees from the MCSTL [13]. We test the performance on different input distributions. 16 In Figure 11 (e) we show the result of U NION on uniformly distributed doubles in the range of [0,1] across 64 cores. We set the input size to n = m = 10i , i from 4 to 8. The three implementations have similar performance when n = m = 104 . As the input size increases, MCSTL shows much worse performance than the other two because of the lack of parallelism (Figure 11 (h) is a good indication), and the WBB-tree implementation is slightly better than ours. For the same reason that STL vectors outperform STL sets (implemented with RB trees) and our sequential implementation, the WBB-trees take the bulk as a sorted array, which has much less overhead to access and much better cache locality. Also their tree layout is more cache efficient and the overall height is lower since they store multiple keys per node. Figure 11 (f) shows the result of a Gaussian distribution with doubles, also on all 64 cores with set sizes of n = m = 10i for i = 4 through 8. The distributions of the two sets have means at 0 and 1 respectively, and both having a standard deviation of 0.25, meaning that the data in the two sets have less overlap comparing to a uniform distribution (as in (e)). In this case our code achieves better performance than the other two implementations. For our algorithms less overlap in the data means more parts of the trees will be untouched, and therefore less nodes will be operated on. This in turn leads to less processing time. We also do an in-depth study on how the overlap of the data sets affects the performance of each algorithm. We generate two sets of size n = m = 108 , each from a Gaussian distribution. The distributions of the two sets have means at 0 and 1 respectively, and both have an equal standard deviation varying in {1, 1/2, 1/4, 1/8, 1/16}. The different standard deviations are to control the overlap of the two sets, and ideally less overlap should simplify the problem. Figure 11 (g) shows the result of the three parallel implementations on a Gaussian distribution with different standard deviations. From the figure we can see that MCSTL and WBB-tree are not affected by different standard deviations, while our join-based union takes advantage of less overlapping and achieves a much better performance when σ is small. This is not surprising since when the two sets are less overlapped, e.g., totally disjoint, our U NION will degenerate to a simple J OIN, which costs only O(log n) work. This behavior is consistent with the “adaptive” property (not always the worst-case) in [?]. This indicates that our algorithm is the only one among the three parallel implementations that can detect and take advantage of less overlapping in data, hence have a much better performance when the two operated sets are less overlapped. We also compare the parallelism of these implementations. In Figure 11 (h) we show their performance across 64 cores. The inputs are both of size 108 , and generated from an uniform distribution of doubles. It is easy to see that MCSTL does not achieve good parallelism beyond 16 cores, which explains why the MCSTL always performs the worst on 64 cores in all settings. As we mentioned earlier, the WBB-tree are slightly faster than our code, but when it comes to all 64 cores, both algorithms have similar performance. This indicates that our algorithm achieves better parallelism. To conclude, in terms of parallel performance, our code and WBB-trees are always much better than the MCSTL because of MCSTL’s lack of parallelism. WBB-trees achieve a slightly better performance than ours on uniformly distributed data, but it does not improve when the two sets are less overlapped. Thus our code is much better than the other two implementations on less overlapped data, while still achieving a similar performance with the other algorithms when the two sets are more intermixed with each other. 17 7 Conclusions In this paper, we study ordered sets implemented with balanced binary search trees. We show for the first time that a very simple “classroom-ready” set of algorithms due to Adams’ are indeed work optimal when used with four different balancing schemes–AVL, RB, WB trees and treaps—and also highly parallel. The only tree-specific algorithm that is necessary is the J OIN, and even the J OINs are quite simple, as simple as I NSERT or D ELETE. It seems it is not sufficient to give a time bound to J OIN and base analysis on it. Indeed if this were the case it would have been done years ago. Instead our approach defines the notion of a rank (differently for different trees) and shows invariants on the rank. It is important that the cost of J OIN is proportional to the difference in ranks. It is also important that when joining two trees the resulting rank is only a constant bigger than the larger rank of the inputs. This insures that when joins are used in a recursive tree, as in U NION, the ranks of the results in a pair of recursive calls does not differ much on the two sides. This then ensures that the set functions are efficient. We also test the performance of our algorithm. Our experiments show that our sequential algorithm is about 3x faster for union on two maps of size 108 compared to the STL red-black tree implementation. In parallel settings our code is much better than the two baseline algorithms (MCSTL and WBB-tree) on less overlapped data, while still achieves similar performances with WBB-tree when the two sets are more intermixed. Our code also achieves 45x speedup on 64 cores. References [1] S. Adams. Implementing sets effciently in a functional language. Technical Report CSTR 92-10, University of Southampton, 1992. [2] S. Adams. Efficient sets—a balancing act. Journal of functional programming, 3(04):553–561, 1993. [3] G. Adelson-Velsky and E. M. Landis. An algorithm for the organization of information. Proc. of the USSR Academy of Sciences, 145:263–266, 1962. In Russian, English translation by Myron J. Ricci in Soviet Doklady, 3:1259-1263, 1962. [4] Y. Akhremtsev and P. Sanders. Fast parallel operations on search trees(unpublished), 2016. [5] R. Bayer. Symmetric binary b-trees: Data structure and maintenance algorithms. Acta Informatica, 1:290–306, 1972. [6] G. E. Blelloch and M. Reid-Miller. Fast set operations using treaps. In Proc. ACM Symposium on Parallel Algorithms and Architectures (SPAA), pages 16–26, 1998. [7] N. Blum and K. Mehlhorn. On the average number of rebalancing operations in weight-balanced trees. Theoretical Computer Science, 11(3):303–320, 1980. [8] R. D. Blumofe and C. E. Leiserson. Space-efficient scheduling of multithreaded computations. SIAM J. on Computing, 27(1):202–229, 1998. [9] R. P. Brent. The parallel evaluation of general arithmetic expressions. Journal of the ACM, 21(2):201–206, Apr. 1974. [10] N. G. Bronson, J. Casper, H. Chafi, and K. Olukotun. A practical concurrent binary search tree. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 257–268, 2010. [11] M. R. Brown and R. E. Tarjan. A fast merging algorithm. Journal of the ACM (JACM), 26(2):211–226, 1979. [12] S. Erb, M. Kobitzsch, and P. Sanders. Parallel bi-objective shortest paths using weight-balanced b-trees with bulk updates. In Experimental Algorithms, pages 111–122. Springer, 2014. [13] L. Frias and J. Singler. Parallelization of bulk operations for STL dictionaries. In Euro-Par 2007 Workshops: Parallel Processing, HPPC 2007, UNICORE Summit 2007, and VHPC 2007, pages 49–58, 2007. 18 [14] Y. Hirai and K. Yamamoto. Balancing weight-balanced trees. Journal of Functional Programming, 21(03):287– 307, 2011. [15] F. K. Hwang and S. Lin. A simple algorithm for merging two disjoint linearly ordered sets. SIAM J. on Computing, 1(1):31–39, 1972. [16] J. Katajainen. Efficient parallel algorithms for manipulating sorted sets. In Proceedings of the 17th Annual Computer Science Conference. University of Canterbury, 1994. [17] H. T. Kung and P. L. Lehman. Concurrent manipulation of binary search trees. ACM Trans. Database Syst., 5(3):354–382, 1980. [18] K. S. Larsen. AVL trees with relaxed balance. J. Comput. Syst. Sci., 61(3):508–522, 2000. [19] S. Marlow et al. Haskell 2010 language report. Available online http://www. haskell. org/(May 2011), 2010. [20] D. R. Musser, G. J. Derge, and A. Saini. STL tutorial and reference guide: C++ programming with the standard template library. Addison-Wesley Professional, 2009. [21] A. Natarajan and N. Mittal. Fast concurrent lock-free binary search trees. In Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP), pages 317–328, 2014. [22] J. Nievergelt and E. M. Reingold. Binary search trees of bounded balance. SIAM J. Comput., 2(1):33–43, 1973. [23] H. Park and K. Park. Parallel algorithms for red–black trees. Theoretical Computer Science, 262(1):415–435, 2001. [24] W. J. Paul, U. Vishkin, and H. Wagener. Parallel dictionaries in 2-3 trees. In Proc. Intl. Colloq. on Automata, Languages and Programming (ICALP), pages 597–609, 1983. [25] R. Seidel and C. R. Aragon. Randomized search trees. Algorithmica, 16:464–497, 1996. [26] D. D. Sleator and R. E. Tarjan. Self-adjusting binary search trees. Journal of the ACM (JACM), 32(3):652–686, 1985. [27] M. Straka. Adams’ trees revisited. In Trends in Functional Programming, pages 130–145. Springer, 2012. [28] R. E. Tarjan. Data Structures and Network Algorithms. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 1983. A A.1 Proofs for Some Lemmas Proof for Lemma 8 Proof. One observation in WB trees and treaps is that all nodes attached to a single layer root form a chain. This is true because if two children of one node v are both in layer i, the weight of v is more than 2i+1 , meaning that v should be layer i + 1. For a layer root v in a WB tree on layer k, w(v) is at most 2k+1 . Considering the balance invariant that its child has weight at most (1 − α)w(v), the weight of the t-th generation of its descendants is no more than 2k+1 (1 − α)t . 1 1 2 generations, the weight should decrease to less than 2k . Thus d(v) ≤ log 1−α 2, This means that after t∗ = log 1−α which is a constant. For treaps consider a layer root v on layer k that has weight N ∈ [2k , 2k+1 ). The probability that d(v) ≥ 2 is equal to the probability that one of its grandchildren has weight at least 2k . This probability P is: 19 (1). Single Rotation …… u 1 v 3 (0) The left branch in ܶோ 4 ‫ܤ‬ C …… ‫ܣ‬ v u 1 5 2 5 3 ‫ܦ‬ (2). Double Rotation ‫ܣ‬ 2 4 ‫ܤ‬ C …… 3 ‫ܦ‬ u (0): The rebalance process is currently at ‫ݒ‬, which means the tree rooted at ‫ ݑ‬and all of its subtrees are balanced. (1): The result of the single rotation. (2): The result of the double rotation. v 1 2 4 5 ‫ܣ‬ ‫ܤ‬ ‫ܥ‬ ‫ܦ‬ Figure 12: An illustration of two kinds of outcomes of rotation after joining two weight balanced trees. After we append the smaller tree to the larger one and rebalance from that point upwards, we reach the case in (0), where u has been balanced, and the smaller tree has been part of it. Now we are balancing v, and two options are shown in (1) and (2). At least one of the two rotation will rebalance v. P = ≤ 1 2k 1 2k N X i − 2k i k (7) i=2 +1 k+1 2X i=2k +1 ≈ 1 − ln 2 i − 2k i (8) (9) We denote 1 − ln 2 as pc . Similarly, the probability that d(v) ≥ 4 should be less than p2c , and the probability shrink geometrically as d(v) increase. Thus the expected value of d(v) is a constant. Since treaps come from a random permutation, all s(v) are i.i.d. A.2 Proof for Lemma 5 Proof. We are trying to show that for Tr =U NION(Tp , Td ) on AVL, RB or WB trees, if r(Tp ) > r(Td ) then r(Tr ) ≤ r(Tp ) + r(Td ). For AVL and RB trees we use induction on r(Tp ) + r(Td ). When r(Td ) + r(Tp ) = 1 the conclusion is trivial. If r = r(Tp ) > r(Td ), Tp will be split into two subtrees, with rank at most r(Tp )−1 since we remove the root. Td will be split into two trees with height at most r(Td ) (Theorem 2). Using the inductive hypothesis, the two recursive calls will return two trees of height at most r(Tp ) − 1 + r(Td ). The result of the final J OIN is therefore at most r(Tp ) + r(Td ). For WB trees, |T | ≤ |Tp | + |Td | ≤ 2|Tp |. Thus r(T ) ≤ r(Tp ) + 1 ≤ r(Tp ) + r(Td ). 20 A.3 Proof for Lemma 3 Proof. Recall that in a weight balanced tree, for a certain node, √neither of its children is β times larger than the other one, where β = α1 − 1. When α ≤ 1 − √12 , we have β ≥ 1 + 2. WLOG, we prove the case when |TL | < |TR |, where TL is inserted along the left branch of TR . Then we rebalance the tree from the point of key k and go upwards. As shown in Figure 12 (0), suppose the rebalance has been processed to u (then we can use reduction). Thus the subtree rooted at u is balanced, and TL is part of it. We name the four trees from left to right A, B, C and D, and the number of nodes in them a, b, c and d. From the balance condition we know that A is balanced with B + C, and B is balanced to C, i.e.: 1 (b + c) ≤a ≤ β(b + c) β 1 b ≤c ≤ βc β (10) (11) We claim that at least one of the two operations will rebalanced the tree rooted at v in Figure 12 (0): Op. (1). Single rotation: right rotation at u and v (as shown in Figure 12 (1)); Op. (2). double rotation: Left rotation followed by a right rotation (as shown in Figure 12 (2)). Also, notice that the inbalance is caused by the insertion of a subtree at the leftmost branch. Suppose the size of the smaller tree is x, and the size of the original left child of v is y. Note that in the process of J OIN, TL is not concatenated with v. Instead, it goes down to deeper nodes. Also, note that the original subtree of size y is weight balanced with D. This means we have: x< 1 (d + y) β 1 d ≤ y ≤ βd β x+y =a+b+c From the above three inequalities we get x < 1 βd + d, thus: a + b + c = x + y < (1 + β + 1 )d β (12) Since a unbalance occurs, we have: a + b + c > βd (13) 1 (b + c) ≤ d ≤ β(b + c) β (14) We discuss the following 3 cases: Case 1. B + C is weight balanced with D, i.e., In this case, we apply a right rotate. The new tree rooted at u is now balanced. A is naturally balanced. Then we discuss in two cases: Case 1.1. βa ≥ b + c + d. Notice that b+c ≥ β1 a, meaning that b+c+d > β1 a. Then in this case, A is balanced to B +C +D, B + C is balanced to D. Thus just one right rotation will rebalance the tree rooted at u (Figure 12 (1)). 21 Case 1.2. βa < b + c + d. In this case, we claim that a double rotation as shown in Figure 12 (2) will rebalance the tree. Now we need to prove the balance of all the subtree pairs: A with B, C with D, and A + B with C + D. First notice that when βa < b + c + d, from (13) we can get: βd < a + b + c < 1 (b + c + d) + b + c β 1 1 )d < ( + 1)(b + c) β β ⇒(β − 1)d < b + c ⇒(β − (15) Considering (14), we have (β − 1)d < b + c ≤ βd. Notice b and c satisfy (11), we have: 1 (b + c) > β+1 1 c> (b + c) > β+1 b> Also note that when β > 1 + √ β−1 d β+1 β−1 d β+1 (16) (17) 2 ≈ 2.414, we have β+1 <β β−1 We discuss the following three conditions of subtrees’ balance: I. Prove A is weight balanced to B. i. Prove b ≤ βa. Since βa ≤ b + c (applying (10)) , we have b ≤ βa. ii. Prove a ≤ βb. In the case when βa < b + c + d we have: 1 (b + c + d) (applying(11), (16)) β 1 β+1 < (b + βb + b) β β−1 β+1 = b β−1 < βb a< II. Prove C is weight balanced to D. i. Prove c ≤ βd. Since b + c ≤ βd (applying (14)), we have c ≤ βd. ii. Prove d ≤ βc. From (17), we have d< β+1 c < βc β−1 III. Prove A + B is weight balanced to C + D. i. Prove a + b ≤ β(c + d). 22 (18) From (15), (11) and (18) we have: 1 1 (b + c) ≤ (βc + c) β−1 β−1 β+1 = c < βc β−1 1 ⇒ d<c β 1 ⇒(1 + )d < (1 + β)c β 1 ⇒(1 + + β)d < β(c + d) + c (applying (12)) β 1 ⇒a + b + c < (1 + + β)d < β(c + d) + c β ⇒a + b < β(c + d) d< ii. Prove c + d ≤ β(a + b). β < β. Thus applying (15) and (10) we have: When β > 2, we have β−1 d< 1 β (b + c) ≤ a < βa β−1 β−1 Also we have c ≤ βb (applying (11)). Thus c + d < β(a + b). Case 2. B + C is too light that cannot be balanced with D, i.e., β(b + c) < d (19) In this case, we have a < β(b + c) < d (applying (10) and (19)), which means that a + b + c < d + β1 d < βd √ when β > 1+2 5 ≈ 1.618. This contradicts with the condition that A + B + C is too heavy to D (a + b + c > βd). Thus this case is impossible. Case 3. B + C is too heavy that cannot be balanced with D, i.e., b + c > βd 1 ⇒a > (b + c) > d β (20) (21) In this case, we apply the double rotation. We need to prove the following balance conditions: I. Prove A is weight balanced to B. i. Prove b < βa. Since βa > b + c (applying (10)) , we have b < βa. ii. Prove a < βb. Suppose c = kb, where β1 < k < β. Since b + c > βd, we have: d< 23 1+k b β (22) From the above inequalities, we have: a + b + c = a + b + kb (applying(12)) 1 < (1 + β + )d (applying(22)) β 1 1+k < (1 + β + ) × b β β ! 1 + β + β1 − 1 (1 + k)b ⇒a< β β+1 (1 + k)b β2 (β + 1)2 < b β2 = When β > 7 9 ×( √ 837+47 −1/3 ) +( 54 √ 837+47 1/3 ) + 13 54 II. Prove C is weight balanced to D. i. Prove d ≤ βc. √ When β > 1+2 5 ≈ 1.618, we have β > 1 + b < βc < d. Thus: b + c < (1 + ≈ 2.1479, we have 1 β. (β+1)2 β < β. Hence a < βb. Assume to the contrary c < 1 β d, 1 )d < βd β , which contradicts with (20) that B + C is too heavy to be balanced with D. ii. Prove c < βd. Plug (21) in (12) and get b + c < (β + β1 )d. Recall that β > 1, we have: 1 1 c + c < b + c < (β + )d β β β2 + 1 ⇒c < d < βd β+1 III. Prove A + B is weight balanced with C + D. i. Prove c + d ≤ β(a + b). From (11) we have c < βb, also d < a < βa (applying (21)), thus c + d < β(a + b). ii. Prove a + b ≤ β(c√+ d). Recall when β > 1+2 5 ≈ 1.618, we have β > 1 + β1 . Applying (20) and (11) we have: d≤ 1 1 (b + c) ≤ c + c < βc β β 1 ⇒ d<c β 1 ⇒(1 + )d < (1 + β)c β 1 ⇒(1 + + β)d < β(c + d) + c (applying (12)) β 1 ⇒a + b + c < (1 + + β)d < β(c + d) + c β ⇒a + b < β(c + d) 24 we have Taking all the three conclusions into consideration, after either a single rotation or a double rotation, the new subtree will be rebalanced. Then by induction we can prove Lemma 3. 25
8cs.DS
Computing Nonsimple Polygons of Minimum Perimeter Sándor P. Fekete1 , Andreas Haas1 , Michael Hemmer1 , Michael Hoffmann2 , Irina Kostitsyna3 , Dominik Krupke1 , Florian Maurer1 , Joseph S. B. Mitchell4 , Arne Schmidt1 , Christiane Schmidt5 , and Julian Troegel1 1 TU Braunschweig, Germany. ETH Zurich, Switzerland. 3 TU Eindhoven, the Netherlands. 4 Stony Brook University, USA. 5 Linköping University, Sweden. arXiv:1603.07077v1 [cs.CG] 23 Mar 2016 2 Abstract We provide exact and approximation methods for solving a geometric relaxation of the Traveling Salesman Problem (TSP) that occurs in curve reconstruction: for a given set of vertices in the plane, the problem Minimum Perimeter Polygon (MPP) asks for a (not necessarily simply connected) polygon with shortest possible boundary length. Even though the closely related problem of finding a minimum cycle cover is polynomially solvable by matching techniques, we prove how the topological structure of a polygon leads to NP-hardness of the MPP. On the positive side, we show how to achieve a constant-factor approximation. When trying to solve MPP instances to provable optimality by means of integer programming, an additional difficulty compared to the TSP is the fact that only a subset of subtour constraints is valid, depending not on combinatorics, but on geometry. We overcome this difficulty by establishing and exploiting additional geometric properties. This allows us to reliably solve a wide range of benchmark instances with up to 600 vertices within reasonable time on a standard machine. We also show that using a natural geometry-based sparsification yields results that are on average within 0.5% of the optimum. Keywords: Traveling Salesman Problem (TSP); Minimum Perimeter Polygon (MPP); curve reconstruction; NP-hardness; exact optimization; integer programming; Computational Geometry meets Combinatorial Optimization 1 Introduction For a given set V of points in the plane, the Minimum Perimeter Polygon (MPP) asks for a polygon P with vertex set V that has minimimum possible boundary length. An optimal solution may not be simply connected, so we are faced with a geometric relaxation of the Traveling Salesman Problem (TSP). The TSP is one of the classic problems of Combinatorial Optimization. NPhard even in special cases of geometric instances (such as grid graphs), it has 2 Fekete et al. served as one of the prototypical testgrounds for developing outstanding algorithmic approaches. These include constant-factor approximation methods (such as Christofides’ 3/2 approximation [6] in the presence of triangle inequality, or Arora’s [4] and Mitchell’s [19] polynomial-time approximation schemes for geometric instances), as well as exact methods (such as Grötschel’s optimal solution to a 120-city instance [13] or the award-winning work by Applegate, Bixby, Chvatal and Cook [2] for solving a 13509-city instance within 10 years of CPU time.) The well-established benchmark library TSPLIB [22] of TSP instances has become so widely accepted that it is used as a benchmark for a large variety of other optimization problems. See the books [17,14] for an overview of various aspects of the TSP and the books [3,7] for more details on exact optimization. Figure 1. A Minimum Perimeter Polygon for an instance with 960 vertices. From a geometric point of view, the TSP asks for the shortest polygonal chain through a given set of vertices in the plane; as a consequence of triangle inequality, the result is always a simple polygon of minimum perimeter. Because of the fundamental role of polygons in geometry, this has made the study of TSP solutions interesting for a wide range of geometric applications. One such context is geometric shape reconstruction, where the objective is to re-compute the original curve from a given set of sample points; see Giesen [12], Althaus and Mehlhorn [1] or Dey, Mehlhorn and Ramos [9] for specific examples. However, this only makes sense when the original shape is known to be simply connected, i.e., bounded by a single closed curve. More generally, a shape may be multiply connected, with interior boundaries surrounding holes. In that case, computing a simple polygon does not yield the desired answer. Instead, the solution may be a Minimum Perimeter Polygon (MPP): given a set V of points in the plane, find a not necessarily simple polygon P with vertex set V , such that the boundary of P has smallest possible length6 See Figure 1 for an optimal solution of an instance with 960 points; this also illustrates the possibly intricate structure of an MPP. 6 Note that we exclude degenerate holes that consist of only one or two vertices. Computing Nonsimple Polygons of Minimum Perimeter 3 While the problem MPP7 asks for a cycle cover of the given set of vertices (as opposed to the single cycle required by the TSP), it is important to note that even the more general geometry of a polygon with holes imposes some topological constraints on the structure of boundary cycles; as a consequence, an optimal 2-factor (a minimum-weight cycle cover of the vertices, which can be computed in polynomial time) may not yield a feasible solution. Fekete et al. [11] gave a generic integer program for the MPP (and other related problems) that was able to yield optimal solutions for instances up to 50 vertices. However, the main challenges were left unresolved. What is the complexity of computing an MPP? Is it possible to develop constant-factor approximation algorithms? And how can we compute provably optimal solutions for instances of relevant size? Our Results In this paper, we resolve the main open problems related to the MPP. – We prove that the MPP is NP-hard. This shows that despite of the relationship to the polynomially solvable problem of finding a minimum 2-factor, dealing with the topological structure of the involved cycles is computationally difficult. – We give a 3-approximation algorithm. – We provide a general IP formulation with O(n2 ) variables to ensure a valid polygonal arrangement for the MPP. – We add additional cuts to reduce significantly the number of cuts needed to eliminate outer components and holes in holes, leading to a practically useful formulation. – We present experimental results for the MPP, solving instances with up to 1000 points in the plane to provable optimality within 30 minutes of CPU time. – We also consider a fast heuristic that is based on geometric structure, restricting the edge set to the Delaunay triangulation. Experiments on structured random point sets show that solutions are on average only about 0.5% worse than the optimum, with vastly superior runtimes. 2 Complexity Theorem 1. The MPP problem is NP-hard. Proof. The proof is based on a reduction from the Minimum Vertex Cover problem for planar graphs: for an undirected planar graph G = (V, E) and a constant k, decide whether there exists a subset of vertices V 0 ⊂ V of size k = |V 0 | such that for any edge (u, v) ∈ E, either u ∈ V 0 or v ∈ V 0 . Given an instance IMVC of the Minimum Vertex Cover problem we construct an instance IMB of the the MPP problem such that IMB has a solution if and only if IMVC has a solution. 7 For simplicity, we will also refer to the problem of computing an MPP as “the MPP”. 4 Fekete et al. Given a planar graph G, we replace its vertices with vertex gadgets, connect them with edge gadgets, and add three points at the vertices of a large triangle enclosing the construction. The triangle will delimit the outer boundary of the polygon in the instance of the the MPP problem, and the vertex and edge gadgets will enforce a choice of cycles covering the points that will form the holes of the polygon. Vertex gadget. The vertex gadget consists of four points (refer to Figure 2). The top three points are always connected by a cycle. If the fourth point p is in the same cycle, that represents putting the corresponding vertex in subset V 0 . The cycle’s length is 3ε if the vertex is not in V 0 , and 2b + 2ε if the vertex is in V 0 . ε ε b b ε ε ε p p Figure 2. Vertex gadget. Left: vertex ∈ V 0 , total length is 2b + 2ε; right: vertex ∈ / V 0, total length is 3ε. Edge gadget. The edge gadget consists of a repeating pattern of four points forming a rhombus (refer to Figure 3). Let some edge gadget consist of r rhombi. There are three ways of covering all the points except for, possibly, the two outermost points, with cycles of total length not greater than 2ra + rε (see Figure 3 (a-c)). This will leave either the leftmost point, either the rightmost point, or both, the leftmost and the rightmost points, uncovered by the cycles. If we require both outermost points to be covered by the cycles, their total length will be at least 2(r + 1)a + (r − 1)ε (see Figure 3 (d)). The points of the edge gadget could potentially be covered by a path of length 2ra + rε (see Figure 3 (e)) that closes into a cycle through other gadgets. To prevent this situation we will add triplets of points that will form small holes in the middle of each face of G. A cycle that passes through an edge gadget would enclose at least one face of graph G, thus would enclose another hole. Split gadget. Split gadget (refer to Figure 4) multiplies the connection to a vertex gadget, thus allowing us to connect one vertex gadget to multiple vertex gadgets. If point p is covered by the vertex gadget, all the points, including points p1 and p2 , of the split gadget can be covered by cycles of total length 16a + 11ε. If point p is not covered by the vertex gadget, p and all the points of the split gadget, except for p1 and p2 , can be covered by cycles of total length 16 + 11ε. Notice, that the cycles can only consist of the edges that are shown in the figure (with solid or dashed lines). There is always the same number of edges used in any Computing Nonsimple Polygons of Minimum Perimeter a a (a) 5 ε (b) (c) (d) (e) Figure 3. Edge gadget. (a)–(c) the gadget is covered by cycles of total length ≈ 10a + 5ε; (d) total length 12a+4ε; (e) the gadget is covered by a path of total length 10a+5ε. collection of cycles that cover the same number of points. Therefore, if some cycle contains an edge that is longer than a, the other edges in the cycles will have to be shorter to compensate for the extra length. By a simple case distinction one can show that there is no collection of cycles of length not greater than 16 + 11ε that covers the same points of the split gadget and that uses any edge that is not shown in Figure 4. If we require the split gadget to cover points p1 and p2 when point p is not covered by the vertex gadget, the total length of the cycles will be at least 18a + 10ε (see Figure 5). p p a a a a a ε ε ε ε ε a a 3a+2ε 4 3a+2ε 4 a p1 a a p2 p1 p2 Figure 4. Split gadget. Left: vertex ∈ V 0 , total length is 16a + 11ε; right: vertex ∈ / V 0, total length is 16a + 11ε. To summarize, given an embedding of planar graph G = (V, E) with n vertices and m edges, we construct an instance of the MPP problem by replacing the vertices of the graph with the vertex gadgets, attaching deg(v) − 1 split gad- 6 Fekete et al. p p1 p2 Figure 5. Split gadget: points p, p1 , and p2 are covered by cycles of total length 18a + 10ε. gets (where deg(v) denotes the degree of vertex v) to the corresponding vertex gadget of every vertex v, and connecting the vertex gadgets by edge gadgets (see Figure 6). We enclose the construction in a triangle of a very large size, that will be the outer boundary of the polygon. Let the perimeter of the triangle T  than the diameter of G. The cycles covering the points of the gadgets will be the holes in the polygon. Moreover, to every face of G we add triplets of points forming cycles of a very small length  ε. This will eliminate any possibility of passing through edge gadgets with a single cycle. =⇒ Figure 6. Given a planar graph G, we construct an instance of the MPP problem. Highlighted in violet are the vertex gadgets, in orange are the split gadgets, in green are the edge gadgets, and in gray are the extra holes in the middle of the faces of G. The number of P vertex gadgets used in the construction is n, and the number of split gadgets is v∈V deg(v) − n = 2m − n. Let the number of rhombi used in all the edge gadgets be r, and let the total length of the extra holes in the middle of the faces of G be ε. Then the instance of the the MPP problem will Computing Nonsimple Polygons of Minimum Perimeter 7 ask whether there exists a polygon of perimeter not greater than L = T + k(2b + 2ε) + (n − k)3ε + (2m − n)(16a + 11ε) + 2ra + rε + ε = (2b − ε)k + T + 2(16m − 8n + r)a + (22m − 8n + r + 1)ε . Let d be the length of the shortest edge. Choose a, b, and ε, such that ε  b  a  d. Then, there is a polygon with perimeter at most L if and only if there is a vertex cover of size k in the instance of Minimum Vertex Cover problem. Let V 0 be a vertex cover of size k of G = (V, E). Then, by selecting the corresponding vertex gadgets to cover points p, and propagating the construction of cycles along the split and edge gadgets, we get a polygon of perimeter L. Let there exist a polygon P with perimeter not greater than T + 2(16m − 8n + r)a + 2kb + (22m − 8n + r − k + 1)ε. By construction, the outer boundary of P will be the triangle of perimeter T . Suppose there are more than k vertex gadgets that are covering the corresponding points p. Then the perimeter of P has to be greater than T + 2(16m − 8n + r)a + 2kb + (22m − 8n + r − k + 1)ε, as the third term (of variable b) of the perimeter expression dominates the fourth term (of variable ε). Thus, there has to be not more than k variable gadgets that cover the corresponding points p. Every edge gadget has to have one of the end-points covered by the vertex gadgets (through split gadgets). Otherwise, the second term of the expression of the polygon perimeter would be greater. Therefore, the polygon corresponds to a vertex cover of the Minimum Vertex Cover instance of size not greater than k. t u 3 Approximation In this section we show that the MPP can be approximated within a factor of 3. Theorem 2. There exists a polynomial time 3-approximation for the MPP. Proof. Let OP T be the length of an optimal solution of the MPP and AP X the length of the approximation that our algorithm will compute for the given set, V , of n points in the plane. We compute the convex hull, CH(V ), of the input set; this takes time O(n log h), where h is the number of vertices of the convex hull. Note that the perimeter, |CH(V )|, of the convex hull is a lower bound on the length of an optimal solution (OP T ≥ |CH(V )|), since the outer boundary of any feasible solution polygon must enclose all points of V , and the convex hull is the minimum-perimeter enclosure of V . Let U ⊆ V be the input points interior to CH(V ). If U = ∅, then the optimal solution is given by the convex hull. If |U | ≤ 2, we claim that an optimal solution is a simple (nonconvex) polygon, with no holes, on the set V , given by the TSP tour on V ; since |U | = 2 is a constant, it is easy to compute the optimal solution in polynomial time, by trying all possible ways of inserting the points of U into the cycle of the points of V that lie on the boundary of the convex hull, CH(V ). Thus, assume now that |U | ≥ 3. We compute a minimum-weight 2-factor, denoted by γ(U ), on U , which is done in polynomial-time by standard methods [8]. Now, γ(U ) consists of a set of disjoint simple polygonal curves having 8 Fekete et al. vertex set U ; the curves can be nested, with possibly many levels of nesting. We let F denote the directed nesting forest whose nodes are the cycles (connected components) of γ(U ) and whose directed edges indicate nesting (containment) of one cycle within another; refer to Figure 7. Since an optimal solution consists of a 2-factor (an outer cycle, together with a set of cycles, one per hole of the optimal polygon), we know that OP T ≥ |γ(U )|. (In an optimal solution, the nesting forest corresponding to the set of cycles covering all of V (not just the points U interior to CH(V )) is simply a single tree that is a star: a root node corresponding to the outer cycle, and a set of children adjacent to the root node, corresponding to the boundaries of the holes of the optimal polygon.) If the nesting forest F for our optimal 2-factor is a set of isolated nodes (i.e., there is no nesting among the cycles of the optimal 2-factor on U ), then our algorithm outputs a polygon with holes whose outer boundary is the boundary of the convex hull, CH(V ), and whose holes are the (disjoint) polygons given by the cycles of γ(U ). (In this case, the total weight of our solution is equal to |CH(V )| + |γ(U )| ≤ 2 · OP T .) A E C D C E B F G D B F G A Figure 7. A 2-factor (left) and its corresponding nesting forest (right). Assume now that F has at least one nontrivial tree. We describe a twophase process that transforms the set of cycles corresponding to F into a set of pairwise-disjoint cycles, each defining a simple polygon interior to CH(V ), with no nesting – the resulting simple polygons are disjoint, each having at least 3 vertices (from U ⊂ V ), Phase 1 of the process transforms the cycles γ(U ) to a set of polygonal cycles that define weakly simple polygons whose interiors are pairwise disjoint. (A polygonal cycle β defines a weakly simple polygon Pβ if Pβ is a closed, simply connected set in the plane with a boundary, ∂Pβ consisting of a finite union of line segments, whose traversal (e.g., while keeping the region Pβ to one’s left) is the (counterclockwise) cycle β (which can have line segments that are traversed twice, once in each direction).) The total length of the cycles at the end of phase 1 is at most 2 times the length of the original cycles, γ(U ). Then, phase 2 of the process transforms these weakly simple cycles into (strongly) simple cycles that Computing Nonsimple Polygons of Minimum Perimeter 9 define disjoint simple polygons interior to CH(V ). Phase 2 only does shortening operations on the weakly simple cycles; thus, the length of the resulting simple cycles at the end of phase 2 is at most 2 times the total length of γ(U ). At the end of phase 2, we have a set of disjoint simple polygons within CH(V ), which serve as the holes of the output polygon, whose total perimeter length is at most |CH(V )| + 2|γ(U )| ≤ 3 · OP T . We now describe phase 1. Let T be a nontrivial tree of F . Associated with T are a set of cycles, one per node. A node u of T that has no outgoing edge of T (i.e., U has no children) is a sink node; it corresponds to a cycle that has no cycle contained within it. Let v be a node of T that has at least one child, but no grandchildren. (Such a node must exist in a nontrivial tree T .) Then, v corresponds to a cycle (simple polygon) Pv , within which there is one or more disjoint simple polygonal cycles, Pu1 , Pu2 , . . . , Puk , one for each of the k ≥ 1 children of v. We describe an operation that replaces Pv with a new weakly simple polygon, Qv , whose interior is disjoint from those of Pu1 , Pu2 , . . . , Puk . Let e = pq (p, q ∈ V ) be any edge of Pv ; assume that pq is a counterclockwise edge, so that the interior of Pv lies to the left of the oriented segment pq. Let Γ be a shortest path within Pv , from p to q, that has all of the polygons Pu1 , Pu2 , . . . , Puk to its right; thus, Γ is a “taut string” path within Pv , homotopically equivalent to ∂Pv , from p to q. (Such a geodesic path is related to the “relative convex hull” of the polygons Pu1 , Pu2 , . . . , Puk within Pv , which is the shortest cycle within Pv that encloses all of the polygons; the difference is that Γ is “anchored” at the endpoints p and q.) Note that Γ is a polygonal path whose vertices are either (convex) vertices of the polygons Puj or (reflex) vertices of Pv . Consider the closed polygonal walk that starts at p, follows the path Γ to q, then continues counterclockwise around the boundary, ∂Pv , of Pv until it returns to p. This closed polygonal walk is the counterclockwise traversal of a weakly simple polygon, Qv , whose interior is disjoint from the interiors of the polygons Pu1 , Pu2 , . . . , Puk . Refer to Figure 8. The length of this closed walk (the counterclockwise traversal of the boundary of Qv ) is at most twice the perimeter of Pv , since the path Γ has length at most that of the counterclockwise boundary ∂Pv , from q to p (since Γ is a homotopically equivalent shortening of this boundary). We consider the boundary of Pv to be replaced with the cycle around the boundary of Qv , and this process has reduced the degree of nesting in T : node v that used to have k children (leaves of T ) is now replaced by a node v 0 corresponding to Qv , and v 0 and the k children of v are now all siblings in the modified tree, T 0 . If v had a parent, w, in T , then v 0 and the k children of v are now children of W ; if v had no parent in T (i.e., it was the root of T ), then T has been transformed into a set of k + 1 cycles, none of which are nested within another cycle of γ(U ). (Each is within the convex hull CH(V ), but there is no other surrounding cycle of γ(U ).) We continue this process of transforming a surrounding parent cycle (node v) into a sibling cycle (node v 0 ), until each tree T of F becomes a set of isolated nodes, and finally F has no edges (there is no nesting). Phase 2 is a process of local shortening of the cycles/polygons, Q1 , Q2 , . . . , Qm , that resulted from phase 1, in order to remove repeated vertices in the weakly 10 Fekete et al. p p e Γ q Pv Γ Pv q Figure 8. Left: The geodesic path Γ from p to q within Pv , surrounding all of the (red) polygons Pu1 , Pu2 , . . . , Puk . Right: The new weakly simple polygon (now red) obtained from the traversal of Γ and the boundary of Pv . simple cycles, so that cycles become (strongly) simple. There are two types of repeated vertices to resolve: those that are repeated within the same cycle (i.e., repeated vertices p of a cycle Qi where ∂Qi “pinches” upon itself), and those that are repeated across different cycles (i.e., vertices p where one cycle is in contact with another, both having vertex p). Consider a weakly simple polygon Q, and let p be a vertex of Q that is repeated in the cycle specifying the boundary ∂Q. This implies that there are four edges of the (counterclockwise) cycle, p0 p, pp1 , p2 p, and pp3 , incident on p, all of which lie within a halfplane through p (by local optimality). There are then two subcases: (i) p0 , p, p1 is a left turn (Figure 9, left); and (ii) p0 pp1 is a right turn (Figure 9, right). In subcase (i), p0 p, pp1 define a left turn at p (making p locally convex for Q), and p2 p, pp3 define a right turn at p (making p locally reflex for Q). In this case, we replace the pair of edges p0 p, pp1 with a shorter polygonal chain, namely the “taut” version of this path, from p0 to p1 , along a shortest path, β0,1 , among the polygons Qi , including Q, treating them as obstacles. The taut path β0,1 consists of left turns only, at (locally convex) vertices of polygons Qi (Qi 6= Q) or (locally reflex) vertices of Q, where new pinch points of Q are created. Refer to Figure 9, left. Case (ii) is treated similarly; see Figure 9, right. Thus, resolving one repeated vertex, p, of Q can result in the creation of other repeated vertices of Q, or repeated vertices where two cycles come together (discussed below). The process is finite, though, since the total length of all cycles strictly decreases with each operation; in fact, there can be only a polynomial number of such adjustments, since each triple (p0 , p, p1 ), is resolved at most once. Now consider a vertex p that appears once as a reflex vertex in Q1 (with incident ccw edges p0 p and pp1 ) and once as a convex vertex in Q2 (with incident ccw edges p2 p and pp3 ). (Because cycles resulting after phase 1 are locally shortest, p must be reflex in one cycle and convex in the other.) Our local operation in this case results in a merging of the two cycles Q1 and Q2 into a single cycle, replacing edges p0 p (of Q1 ) and pp3 (of Q2 ) with the taut shortest path, β0,3 . As in the process described above, this replacement can result in new repeated Computing Nonsimple Polygons of Minimum Perimeter 11 p 0 p 3 p 3 p 0 β p 0,1 β 0,1 p p p 2 1 p p 2 1 Figure 9. Left: Case (i) of the phase 2 shortening process for a pinch point of Q. Right: Case (ii) of the phase 2 shortening process. vertices, as the merged cycle may come into contact with other cycles, or with itself. p 1 p 2 p p β 0,3 3 Q 2 Q 1 p 0 Figure 10. The phase 2 shortening process for a point p shared by cycles Q1 and Q2 . Finally, the result of phase 2, is a set of disjoint cycles, with no repeated vertices, defining disjoint simple polygons within CH(V ); these cycles define the holes of the output polygon, whose total perimeter length is at most that of CH(V ), plus twice the lengths of the cycles γ(U ) in an optimal 2-factor of the interior points U . Thus, we obtain a valid solution with objective function at most 3 times optimal. 4 4.1 IP Formulation Cutting-Plane Approach In the following we develop suitable Integer Program (IPs) for solving the MPP to provable optimality. The basic idea is to use a binary variable xe ∈ {0, 1} for any possible edge e ∈ E, with xe = 1 corresponding to making e part of a 12 Fekete et al. solutionPP if an only if xe = 1. This allows it to describe the objective function by min e∈E xe ce , where ce is the length of e. In addition, we impose a suitable set of linear constraints on these binary variables, such that they characterize precisely the set of polygons with vertex set V . The challenge is to pick a set of constraints that achieve this in a (relatively) efficient manner. As it turns out (and is discussed in more detail in Section 5), there is a significant set of constraints that correspond to eliminating cycles within proper subsets S ⊂ V . Moreover, there is an exponential number of relevant subsets S, making it prohibitive to impose all of these constraints at once. The fundamental idea of a cutting-plane approach is that much fewer constraints are necessary for characterizing an optimal solution. To this end, only a relatively small subfamily of constraints is initially considered, leading to a relaxation. As long as solving the current relaxation yields a solution that is infeasible for the original problem, violated constraints are added in a piecemeal fashion. In the following, these constraints (which are initially omitted, violated by an optimal solution of the relaxation, then added to eliminate such infeasible solutions) are called cuts, as they remove solutions of a relaxation that are infeasible for the MPP. 4.2 Basic IP We start with a basic IP that is enhanced with specific cuts, described in Sections 5.2–5.4. We denote by E the set of all edges between two points of V , C the set of invalid cycles and δ(v) the set of all edges in E that are incident to v ∈ V . Then we optimize over the following objective function: X min x e ce . (1) e∈E This is subject to the following constraints: X ∀v ∈ P : xe = 2 , (2) e∈δ(v) ∀C ∈ C : X e∈C xe ≤ |C| − 1 , (3) xe ∈ {0, 1} . (4) For the TSP, C is simply the set of all subtours, making identification and separation straightforward. This is much harder for the MPP, where a subtour may end up being feasible by forming the boundary of a hole, but may also be required to connect with other cycles. Therefore, identifying valid inequalities requires more geometric analysis, such as the following. If we denote by CH the set of all convex hull points, then a cycle C is invalid if C contains: 1. at least one and at most |CH| − 1 convex hull points. (See Figure 11(a)) 2. all convex hull points but does not enclose all other points. (See Figure 11(b)) Computing Nonsimple Polygons of Minimum Perimeter (a) Invalid cycle of type 1 (b) Invalid cycle of type 2 13 (c) Invalid cycle of type 3 Figure 11. Examples of invalid cycles (red). Black cycles may be valid. 3. no convex hull point but encloses other points. (See Figure 11(c)) By Ci we denote the set of all invalid cycles with property i. Because there can be exponentially many invalid cycles, we add constraint (3) in separation steps. For an invalid cycle with property 1 we use the equivalent cut constraint ∀C ∈ C1 : X e∈δ(C) xe ≥ 2 . (5) By using constraint (3) if |C| ≤ 2n+1 and constraint (5) otherwise, where δ(C) 3 denotes the “cut” edges connecting a vertex v ∈ C with a vertex v 0 6∈ C. As argued by Pferschy and Stanek [21], this technique of dynamic subtour constraints (DSC) is useful, as it reduces the number of non-zero coefficients in the constraint matrix. 4.3 Initial Edge Set In order to quickly achieve an initial solution, we sparsify the Θ(n2 ) input edges to the O(n) edges of the Delaunay Triangulation, which naturally captures geometric nearest-neighbor properties. If a solution exists, this yields an upper bound. This technique has already been applied for the TSP by Jünger et al. [15]. In theory, this may not yield a feasible solution: a specifically designed example by Dillencourts shows that the Delaunay triangulation may be nonHamiltonian [10]; this same example has no feasible solution for the MPP. We did not observe this behavior in practice. CPLEX uses this initial solution as an upper bound, quickly allowing it to quickly discard large solutions in a branch-and-bound manner. As described in Section 6, the resulting bounds are quite good for the MPP. 14 5 5.1 Fekete et al. Separation Techniques Pitfalls When separating infeasible cycles, the Basic IP may get stuck in an exponential number of iterations, due to the following issues. (See Figures 12-14 for illustrating examples.) Problem 1: Multiple outer components containing convex hull points occur that despite the powerful subtour constraints do not get connected because it is cheaper to, e.g., integrate subsets of the interior points. Such an instance can be seen in Figure 12, where we have two equal components with holes. Since the two components are separated by a distance greater than the distance between their outer components and their interior points, the outer components start to include point subsets of the holes. This results in a potentially exponential number of iterations. Problem 2: Outer components that do not contain convex hull points do not get integrated because we are only allowed to apply a cycle cut on the outer component containing the convex hull points. An outer component that does not contain a convex hull point cannot be prohibited as it may become a hole in later iterations. See Figure 13 for an example where an exponential number of iterations is needed until the outer components get connected. Problem 3: If holes contain further holes, we are only allowed to apply a cycle cut on the outer hole. This outer hole can often cheaply be modified to fulfill the cycle cut but not resolve the holes in the hole. An example instance can be seen in Figure 14, where an exponential number of iterations is needed. (a) (b) (c) (d) (e) (f) Figure 12. (a) - (f) show consecutive iterations trying to solve an instance using only constraint (5). The second problem is the most important, as this problem frequently becomes critical on instances of size 100 and above. Holes in holes rarely occur on small instances but are problematic on instances of size > 200. The first problem occurs only in a few instances. In the following we describe three cuts that each solve one of the problems: The glue cut for the first problem in Section 5.2, the tail cut for the second problem in Section 5.3, and the HiH-Cut for the third problem in Section 5.4. Computing Nonsimple Polygons of Minimum Perimeter (a) (b) (c) (e) (f) 15 (d) (g) Figure 13. (a) - (g) show consecutive iterations trying to solve an instance using only constraint (3). (a) (b) (c) (e) (f) (d) (g) Figure 14. (a) - (g) show consecutive iterations trying to solve an instance using only constraint (3). 5.2 Glue Cuts To separate invalid cycles of property 1 we use glue cuts (GC), based on a curve RD from one unused convex hull edge to another (see Figure 15). With X (RD ) denoting the set of edges crossing RD , we can add the following constraint: X e∈X (RD ) xe ≥ 2 . Such curves can be found by considering a constrained Delaunay triangulation [5] of the current solution, performing a breadth-first-search starting from all unused convex hull edges of the triangulation. Two edges are adjacent if they share a triangle. Used edges are excluded, so our curve will not cross any used edge. As soon as two different search trees meet, we obtain a valid curve by using the middle points of the edges (see red curve in Figure 15). For an example, see Figure 15; as illustrated in Figure 12, this instance is problematic in the Basic IP. This can we now be solved in one iteration. 16 Fekete et al. (a) (b) Figure 15. Solving instance from Figure 12 with a glue cut (red). (a) The red curve needs to be crossed at least twice; it is found using the Delaunay Triangulation (grey). (b) The first iteration after using the glue cut. (a) (b) Figure 16. Solving the instance from Figure 13 with tail cut (red line). (a) The red curve needs to be crossed at least twice or two edges must leave the component. The red curve is found via the Delaunay Triangulation (grey). (b) The first Iteration after using the tail cut. 5.3 Tail Cuts An outer cycle C that does not contain any convex hull points cannot be simply excluded, as it may become a legal hole later. Such a cycle either has to be merged with others, or become a hole. For a hole, each curve from the hole to a point outside of the convex hull must be crossed at least once. With this knowledge we can provide the following constraint, making use of a special curve, which we call a tail (see the red path in Figure 16). Let RT be a valid tail and X (RT ) the edges crossing it. We can express the constraint in the following form: X xe + e∈X (RT )\δ(C) | {z X e∈δ(C) } C gets surrounded xe ≥ 1 . | {z } C dissolves The tail is obtained in a similar fashion as the curves of the Glue Cuts by building a constrained Delaunay triangulation and doing a breadth-first search starting at the edges of the cycle. The starting points are not considered as part of the curve and thus the curve does not cross any edges of the current solution. For an example, see Figure 16; as illustrated in Figure 13, this instance is problematic in the Basic IP. This can we now be solved in one iteration. Note that even though it is possible to cross the tail without making the cycle a hole, this is more expensive than simply merging it with other cycles. Computing Nonsimple Polygons of Minimum Perimeter 5.4 17 Hole-in-Hole Cuts The difficulty of eliminating holes in holes (Problem 3) is that they may end up as perfectly legal simple holes, if the outer cycle gets merged with the outer boundary. In that case, every curve from the hole to the convex hull cannot cross the used edges exactly two times (edges of the hole are ignored). One of the crossed edges has to be of the exterior cycle and the other one cannot be as otherwise we would be outside again. It can also be not of an interior cycle, as we would have to leave it again to reach our hole. Therefore the inner cycle of a hole in hole either has to be merged, or all curves from it to the convex hull do not have exactly two used edge crossings. As it is impractical to argue over all curves, we only pick one curve P that currently crosses exactly two used edges (see the red curve in Figure 17 with crossed edges in green). Because we cannot express the inequality that P is not allowed to be crossed exactly two times as an linear programming constraint, we use the following weaker observation. If the cycle of the hole in hole becomes a simple hole, the crossing of P has to change. Let e1 and e2 be the two used edges that currently cross P and X (P ) the set of all edges crossing P (including unused but no edges of H). We can express a change on P by X e∈X (P )\{e1 ,e2 } | {z new crossing xe + −xe1 − xe2 ≥ −1 . | {z } } e1 or e2 vanishes Together we obtain the following LP-constraint for either H being merged or the crossing of P changes: X e∈δ(VH ,V \VH ) | {z H dissolves X xe + e∈X (P )\{e1 ,e2 } } | xe + −xe1 − xe2 ≥ −1 . {z Crossing of P changes } Again we use a breadth-first search on the constrained Delaunay triangulation starting from the edges of the hole in hole. Unlike the other two cuts we need to cross used edges. Thus, we get a shortest path search such that the optimal path primarily has a minimal number of used edges crossed and secondarily has a minimal number of all edges crossed. For an example, see Figure 17; as illustrated in Figure 12, this instance is problematic in the Basic IP. This can we now be solved in one iteration. The corresponding path is displayed in red and the two crossed edges are highlighted in green. Changing the crossing of the path is more expensive than simply connect the hole in hole to the outer hole and thus the hole in hole dissolves. 18 Fekete et al. (a) (b) Figure 17. Solving instance from Figure 14 with hole in hole cut (red line). (a) Red line needs to be crossed at least two times or two edges must leave the component or one of the two existing edges (green) must be removed. Red line is built via Delaunay Triangulation. (b) First Iteration after using the hole in hole cut. 6 6.1 Experiments Implementation Our implementation uses CPLEX to solve the relevant IPs. Important is also the geometric side of computation, for which we used the CGAL Arrangements package [23]. CGAL represents a planar subdivision using a doubly connected edge list (DCEL), which is ideal for detecting invalid boundary cycles. 6.2 Test Instances While the TSPLIB is well-recognized and offers a good mix of instances with different structure (ranging from grid-like instances over relatively uniform random distribution to highly clustered instances), it is relatively sparse. Observing that the larger TSPLIB instances are all geographic in nature, we designed a generic approach that yields arbitrarily large and numerous clustered instances. This is based on illumination maps: A satellite image of a geographic region at night time displays uneven light distribution. The corresponding brightness values can be used as a random density function that can be used for sampling (see Figure 21). To reduce noise, we cut off brightness values below a certain threshold, i.e., we set the probability of choosing the respective pixels to zero. 6.3 Results All experiments were run on an Intel Core i7-4770 CPU clocked at 3.40 GHz with 16 GB of RAM. We set a 30 minute time limit to solve the instances. In Table 1, all results are displayed for every instance that we solved within the time limit. The largest instance solved within 30 minutes is gr666 with 666 points, which took about 6 minutes. The largest instance solved out of the TSPLib so far is dsj1000 with 1000 points, solved in about 37 minutes. In addition, we generated 30 instances for each size, which were run with a time limit of 30 minutes. Computing Nonsimple Polygons of Minimum Perimeter Table 1: The runtime in milliseconds of all variants on the instances of the TSPLib that we solved within 30 minutes. The number in the name of an instance indicates the number of points. BasicIP burma14 ulysses16 ulysses22 att48 eil51 berlin52 st70 eil76 pr76 gr96 rat99 kroA100 kroB100 kroC100 kroD100 kroE100 rd100 eil101 lin105 pr107 pr124 bier127 ch130 pr136 gr137 pr144 ch150 kroA150 kroB150 pr152 u159 rat195 d198 kroA200 kroB200 gr202 ts225 tsp225 20 48 50 180 74 43 714 376 922 4673 550 495 439 1505 6276 13285 13285 106030 18902 91423 +JS+DC +JS+TC +JS+DC +JS+DC +DC+TC +TC+HIHC +HIHC +HIHC +TC +HIHC 22 42 34 58 82 38 329 144 711 388 480 961 1470 470 509 273 894 575 390 401 348 288 1758 964 1262 1028 4938 3427 2993 2161 1424 16188 19329 26360 5492 4975 7746 11600 17 35 55 72 72 37 324 105 711 349 485 689 2623 431 451 273 756 445 359 272 264 270 1802 1029 1361 2926 5167 5615 2396 1619 1262 19780 155550 13093 6239 7512 9750 9741 19 26 19 43 32 42 31 32 61 62 57 129 78 81 99 37 38 51 348 414 530 148 239 731 1238 10982 384 367 464 513 1190 950 1294 1489 2285 465 577 4334 514 835 272 574 890 2861 527 1090 412 931 346 513 923 322 355 940 267 276 476 1594 2853 992 950 3001 1252 1724 985 1030 2012 5867 7997 3327 7474 2943 5265 10978 2151 19479 5339 1410 2513 77216 16117 27580 19398 41118 26389 11844 5525 15238 4304 9670 7595 7603 60167 28756 11531 44297 Continued on next page 19 20 Fekete et al. Table 1 – Continued from previous page BasicIP pr226 gr229 gil262 pr264 24690 a280 22023 pr299 lin318 linhp318 rd400 fl417 gr431 pr439 pcb442 d493 att532 ali535 u574 rat575 p654 d657 gr666 - +JS+DC +JS+TC +JS+DC +JS+DC +DC+TC +TC+HIHC +HIHC +HIHC +TC +HIHC 8498 5462 23000 6537 3601 16251 23863 23107 111128 198013 56716 46685 1356796 359072 217679 93771 371523 417494 864066 455378 366157 2800 26478 22146 3857 355323 1511219 1313680 92995 173609 36592 256394 427800 199114 191198 253374 - 600 30 500 25 7204 10153 6549 3619 16173 24035 23064 215210 78133 48231 218665 91828 580320 646148 670818 18848 25674 72772 23641 12983 85789 75312 79352 302363 825808 265416 273873 837229 817096 323104 1010276 934988 1352747 - 20 Time in min 400 Input Size 6719 3980 - 300 15 10 200 5 100 5 30 55 80 105 130 155 180 205 230 255 280 305 330 355 380 405 430 455 480 505 530 555 580 0 0 BASICIP JS GC TC HIHC JS TC HIHC 95% - 100% solved JS GC HIHC 50% - 94% solved JS GC TC Point size GC TC HIHC BASICIP JS GC TC HIHC JS TC HIHC JS GC HIHC JS GC TC GC TC HIHC Figure 18. (Left) Success rate for the different variants of using of the cuts, with 30 instances for each input size (y-axis). (Right) The average runtime of the different variants for all 30 instances. A non-solved instance is interpreted as 30 minutes runtime. We observe that even without using glue cut and jumpstart, we are able to solve more than 50% of the instances up to about 550 input points. Without the Computing Nonsimple Polygons of Minimum Perimeter 4,0% 30 21 Average gap 3,5% 25 Time in min 3,0% 20 2,5% 15 2,0% 10 1,5% 1,0% 5 0,5% 580 555 530 505 480 455 430 405 380 355 330 305 280 255 230 205 180 155 130 80 Point size 105 5 55 0,0% 30 580 555 530 505 480 455 430 405 380 355 330 305 280 255 230 205 180 155 80 130 55 105 30 5 0 Figure 19. (Left) The distribution of the runtime within 30 minutes for the case of using the jumpstart, glue cuts, tail cuts and HiH-cuts. (Right) The relative gap of the value on the edges of the Delaunay triangulation to the optimal value. The red area marks the range between the minimal and maximal gap. 4,0% Average gap 3,5% 3,0% 2,5% 2,0% 1,5% 1,0% 0,5% 580 555 530 505 480 455 430 405 380 355 330 305 280 255 230 205 180 155 130 105 80 55 30 5 0,0% Figure 20. The relative gap of the value on the edges of the Delaunay triangulation to the optimal value. The red area marks the range between the minimal and maximal gap. (a) Earth by night (b) A sampled instance Figure 21. Using a brightness map as a density function for generating clustered point sets. 22 Fekete et al. tail cuts, we hit a wall at 100 points, without the HiH-cut instances, at about 370 input points; see Figure 18, which also shows the average runtime of all 30 instances for all variants. Instances exceeding the 30 minutes time limit are marked with a 30-minutes timestamp. The figure shows that using jumpstart shortens the runtime significantly; using the glue cut is almost as fast as the variant without the glue cut. Figure 19 shows that medium-sized instances (up to about 450 points) can be solved in under 5 minutes. We also show that restricting the edge set to the Delaunay triangulation edges yields solutions that are about 0.5% worse on average than the optimal solution. Generally the solution of the jumpstart gets very close to the optimal solution until about 530 points. After that, for some larger instances, we get solutions on the edge set of the Delaunay triangulation that are up to 50% worse than the optimal solution. 7 Conclusions As discussed in the introduction, considering general instead of simple polygons corresponds to searching for a shortest cycle cover with a specific topological constraint: one outside cycle surrounds a set of disjoint and unnested inner cycles. Clearly, this is only one example of considering specific topological constraints. Our techniques and results should be applicable, after suitable adjustments, to other constraints on the topology of cycles. We gave a 3-approximation for the MPP; we expect that the MPP has a polynomial-time approximation scheme, base on PTAS techniques [4,19] for geometric TSP, and we will elaborate on this in the full paper. There are also various practical aspects that can be explored further. It will be interesting to evaluate the practical performance of the theoretical approximation algorithm, not only from a practical perspective, but also to gain some insight on whether the approximation factor of 3 can be tightened. Pushing the limits of solvability can also be attempted, e.g., by using more advanced techniques from the TSP context. We can also consider sparsification techniques other than the Delaunay edges, e.g., the union between the best known tour and the k-nearest-neighbor edge set (k ∈ {2, 5, 10, 20}) has been applied for TSP by Land [16], or (see Padberg and Rinaldi [20]) by taking the union of k tours acquired by Lin’s and Kernighan’s heuristic algorithm [18]. Acknowledgements We thank Stephan Friedrichs and Melanie Papenberg for helpful conversations. Parts of this work were carried out at the 30th Bellairs Winter Workshop on Computational Geometry (Barbados) in 2015. We thank the workshop participants and organizers, particularly Erik Demaine. Joseph Mitchell is partially supported by NSF (CCF-1526406). Irina Kostitsyna is supported by the Netherlands Organisation for Scientific Research (NWO) under project no. 639.023.208. Computing Nonsimple Polygons of Minimum Perimeter 23 References 1. E. Althaus and K. Mehlhorn. Traveling Salesman-based curve reconstruction in polynomial time. SIAM J. Comput., 31(1):27–66, 2001. 2. D. L. Applegate, R. E. Bixby, V. Chvatal, and W. J. Cook. On the solution of Traveling Salesman Problems. Documenta Mathematica – Journal der Deutschen Mathematiker-Vereinigung, ICM, pages 645–656, 1998. 3. D. L. Applegate, R. E. Bixby, V. Chvatal, and W. J. Cook. The Traveling Salesman Problem: A Computational Study (Princeton Series in Applied Mathematics). Princeton University Press, Princeton, NJ, USA, 2007. 4. S. Arora. Polynomial time approximation schemes for Euclidean Traveling Salesman and other geometric problems. J. ACM, 45(5):753–782, 1998. 5. L. P. Chew. Constrained Delaunay triangulations. Algorithmica, 4(1-4):97–108, 1989. 6. N. Christofides. Worst-case analysis of a new heuristic for the Travelling Salesman Problem. Technical Report Report 388, Graduate School of Industrial Administration, CMU, 1976. 7. W. J. Cook. In Pursuit of the Traveling Salesman: Mathematics at the Limits of Computation. Princeton University Press, Princeton, NJ, USA, 2012. 8. W. J. Cook, W. H. Cunningham, W. R. Pulleyblank, and A. Schrijver. Combinatorial Optimization. Wiley, 1998. 9. T. K. Dey, K. Mehlhorn, and E. A. Ramos. Curve reconstruction: Connecting dots with good reason. Comput. Geom., 15(4):229–244, 2000. 10. M. B. Dillencourt. A non-hamiltonian, nondegenerate Delaunay triangulation. Information Processing Letters, 25(3):149–151, 1987. 11. S. P. Fekete, S. Friedrichs, M. Hemmer, M. Papenberg, A. Schmidt, and J. Troegel. Area- and boundary-optimal polygonalization of planar point sets. In EuroCG 2015, pages 133–136, 2015. 12. J. Giesen. Curve reconstruction, the Traveling Salesman Problem and Menger’s theorem on length. In Proc. 15th Annual Symp. Comp. Geom. (SoCG), pages 207–216, 1999. 13. M. Grötschel. On the symmetric Travelling Salesman Problem: solution of a 120city problem. Mathematical Programming Study, 12:61–77, 1980. 14. G. Gutin and A. P. Punnen. The Traveling Salesman Problem and Its Variations. Springer, 2007. 15. M. Jünger, G. Reinelt, and G. Rinaldi. The Traveling Salesman Problem. Handbooks in Operations Research and Management Science, 7:225–330, 1995. 16. A. Land. The solution of some 100-city Travelling Salesman Problems. Technical report, London School of Economics, 1979. 17. E. L. Lawler, E. L. Lawler, and A. H. Rinnooy-Kan. The Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization. Wiley, 1985. 18. S. Lin and B. W. Kernighan. An effective heuristic algorithm for the TravelingSalesman problem. Operations research, 21(2):498–516, 1973. 19. J. S. B. Mitchell. Guillotine subdivisions approximate polygonal subdivisions: A simple polynomial-time approximation scheme for geometric TSP, k-MST, and related problems. SIAM J. Comput., 28(4):1298–1309, 1999. 20. M. Padberg and G. Rinaldi. A branch-and-cut algorithm for the resolution of large-scale symmetric Traveling Salesman Problems. SIAM Rev., 33(1):60–100, 1991. 24 Fekete et al. 21. U. Pferschy and R. Stanek. Generating subtour constraints for the TSP from pure integer solutions. Department of Statistics and Operations Research, University of Graz, Tech. Rep, 2014. 22. G. Reinelt. TSPlib – A Traveling Salesman Problem library. ORSA J. on Computing, 3(4):376–384, 1991. 23. R. Wein, E. Berberich, E. Fogel, D. Halperin, M. Hemmer, O. Salzman, and B. Zukerman. 2D arrangements. In CGAL User and Reference Manual. CGAL Editorial Board, 4.3 edition, 2014.
8cs.DS
A Polymorphic Groundness Analysis of Logic Programs arXiv:cs/9811001v1 [cs.PL] 31 Oct 1998 Lunjin Lu Department of Computer Science University of Waikato Hamilton, New Zealand EMail: [email protected] Abstract. A polymorphic analysis is an analysis whose input and output contain parameters which serve as placeholders for information that is unknown before analysis but provided after analysis. In this paper, we present a polymorphic groundness analysis that infers parameterised groundness descriptions of the variables of interest at a program point. The polymorphic groundness analysis is designed by replacing two primitive operators used in a monomorphic groundness analysis and is shown to be as precise as the monomorphic groundness analysis for any possible values for mode parameters. Experimental results of a prototype implementation of the polymorphic groundness analysis are given. 1 Introduction Groundness analysis is one of the most important dataflow analyses for logic programs. It provides answers to questions such as whether, at a program point, a variable is definitely bound to a term that contains no variables. This is useful not only to an optimising compiler that attempts to speed up unification but also to other program manipulation tools that apply dataflow analyses. Groundness analysis has also been used to improve precisions of other dataflow analyses such as sharing analysis [38, 19, 20, 6, 10, 34, 41, 24] and type analysis [28]. There have been many methods proposed for groundness analysis [32, 15, 6, 41, 11, 30, 11, 1, 2, 5, 25, 17, 7, 9, 39]. This paper present a new groundness analysis, called polymorphic groundness analysis, whose input and output are parameterised by a number of mode parameters. These mode parameters represent groundness information that is not available before analysis but can be provided after analysis. When the groundness information is provided, the result of the polymorphic groundness analysis can then be ”instantiated”. Consider the following program p(X,Y) :- q(X,Y), X<Y, ... q(U,U). and the goal p(X, Y ) with mode parameters α and β being respectively the groundness of X and Y prior to the execution of the goal. The polymorphic groundness analysis infers that at the program point immediately before the built-in call X < Y , the groundness of both X and Y are the greatest lower bound of α and β implying that X and Y are in the intersection of the sets of terms described by α and β. The result can be instantiated when the values of α and β become available. It can also be used to infer sufficient conditions for safely removing run-time checks on the groundness of the operands of the built-in predicate ” < ”. The polymorphic groundness analysis is performed by abstract interpretation [12, 13, 14]. Abstract interpretation is a methodology for static program analysis whereby a program analysis is viewed as the execution of the program over a non-standard data domain. A typical analysis by abstract interpretation is monomorphic whereby input information about the program is not parameterised and the program has to be analysed separately for different input information. The polymorphic groundness analysis is one of a particular class of program analyses whereby input and output of a program analysis contain parameters which express information that is unknown before analysis but may be provided after analysis. Polymorphic program analyses have advantages over monomorphic program analyses since more general result can be obtained from a polymorphic analysis. Firstly, the result of a polymorphic analysis is reusable. A subprogram or a library program that may be used in different places need not to be analysed separately for its different uses. Secondly, polymorphic program analyses are amenable to program modifications since changes to the program does not necessitate re-analyses of the sub-program so long as the sub-program itself is not changed. The polymorphic groundness analysis is a polymorphic abstract interpretation that formalises a polymorphic analysis as a generalisation of a possibly infinitely many monomorphic analyses [29]. It is obtained from a monomorphic groundness analysis by replacing monomorphic description domains with polymorphic description domains and two primitive operators for the monomorphic groundness analysis with their polymorphic counterparts. It is proven that for any possible assignment of values for parameters, the instantiated results of the polymorphic groundness analysis is as precise as that of the monomorphic groundness analysis corresponding to the assignment. An abstract interpretation framework is a generic abstract semantics that has as a parameter a domain, called an abstract domain, and a fixed number of operators, called abstract operators, associated with the abstract domain. A particular analysis corresponds to a particular abstract domain and its associated abstract operators. Usually, specialising a framework for a particular analysis involves devising an abstract domain for descriptions of sets of substitutions, called abstract substitutions, and corresponding abstract operators on abstract substitutions. One important abstract operator commonly required is abstract unification [6, 21] which mainly abstracts the normal unification. Another important abstract operator commonly required is an operator that computes (an approximation of) the least upper bound of abstract substitutions. The polymorphic groundness analysis will be presented as an abstract domain for polymorphic groundness descriptions of sets of substitutions together with its associated abstract unification operator and least upper bound operator as required by the framework in [27]. The adaptation to the frameworks in [6, 20, 31, 36] needs only minor technical adjustments since the functionalities required of the above two abstract operators by these frameworks and that in [27] are almost the same. The adaptation to the frameworks in [4, 22, 33] needs more technical work but should not be difficult because most functionalities of the abstract operators in these frameworks are covered by the functionalities of the abstract unification operator and the least upper bound operator in [6, 20, 27, 36]. The remainder of the paper is organised as follows. Section 2 introduces basic notations, abstract interpretation and an abstract interpretation framework of logic programs based on which we present our polymorphic groundness analysis. Sections 3 recalls the notion of polymorphic abstract interpretations. Section 4 reformulates the monomorphic groundness analysis and section 5 presents the polymorphic groundness analysis. Section 6 contains results of the polymorphic groundness analysis on some example programs and provides performance results of a prototype implementation of the poly- morphic groundness analysis. Section 7 concludes the paper with a comparison with related work on groundness analysis of logic programs. 2 Preliminaries This section recalls the concept of abstract interpretation and an abstract interpretation framework based on which we will present our polymorphic groundness analysis. The reader is assumed to be familiar with terminology of logic programming [26]. 2.1 Notation Let Σ be a set of function symbols, Π be a set of predicate symbols, V be a denumerable set of variables. f /n denotes an arbitrary function symbol, and capital letters denote variables. Term denotes the set of terms that can be constructed from Σ and V. t, ti and f (t1 , · · · , tn ) denote arbitrary terms. Atom denotes the set of atoms constructible from Π, Σ and V. a1 and a2 denote arbitrary atoms. θ and θi denote substitutions. Let θ be a substitution and V ⊆ V. dom(θ) denotes the domain of θ. θ|\V denotes the restriction of θ to V. As a convention, the function composition operator ◦ binds stronger than |\. For instance, θ1 ◦ θ2 |\V is equal to (θ1 ◦ θ2 )|\V. An expression O is a term, an atom, a literal, a clause, a goal etc. vars(O) denotes the set of variables in O. The range range(θ) of a substitution θ is def range(θ) = ∪X∈dom(θ) vars(θ(X)). An equation is a formula of the form l = r where either l, r ∈ Term or l, r ∈ Atom. The set of all equations is denoted as Eqn. Let E ∈ ℘(Eqn). E is in solved form if, for each equation l = r in E, l is a variable that does not occur on the right side of any equation in E. For a set of equations E ∈ ℘(Eqn), mgu : ℘(Eqn) 7→ Sub ∪ {fail } returns either a most general unifier for E if E is unifiable or fail otherwise, where Sub is the set of substitutions. mgu({l = r}) is def def sometimes written as mgu(l, r). Let θ ◦ fail = fail and fail ◦ θ = fail for any θ ∈ Sub ∪ {fail }. There is a natural bijection between substitutions and the sets of equations in solved form. eq(θ) denotes the set of equations in solved form corresponding to a substitution def θ. eq(fail) = fail . We will use a renaming substitution Ψ which renames a variable into a variable that has not been encountered before. Let VP be the set of program variables of interest. VP is usually the set of variables in the program. 2.2 Abstract Interpretation Suppose that we have the append program in figure 1. append([ ], L, L) %C1 append([H|L1 ], L2 , [H|L3 ]) ← append(L1 , L2 , L3 ) %C2 Fig. 1. Logic program append The purpose of groundness analysis is to find answers to such questions as in the following. If L1 and L2 are ground before append(L1 , L2 , L3 ) is executed, will L3 be ground after append(L1 , L2 , L3 ) is successfully executed? Abstract interpretation performs an analysis by mimicking the normal execution of a program. To provide an intuitive insight into abstract interpretation, let us consider how an execution of goal g0 : append(L1 , L2 , L3 ) transforms one program state θ0 : {L1 7→ [s(0)], L2 7→ [0]} which satisfies the condition in the above question into another program state θ3 : {L1 7→ [s(0)], L2 7→ [0], L3 7→ [s(0), 0]}. We deviate slightly from Prolog-like logic programming systems. Firstly, substitutions (program states) have been made explicit because the purpose of a program analysis is to infer properties about substitutions. Secondly, when a clause is selected to satisfy a goal with an input substitution, the goal and the input substitution instead of the selected clause are renamed. This is because we want to keep track of values of variables occurring in the program rather than those of their renaming instances. Let Ψ (Z) = Z ′ for any Z ∈ V. Normal Execution The first step performs a procedure entry. g0 and θ0 are renamed by into Ψ (g0 ) : append(L′1 , L′2 , L′3 ) and Ψ (θ0 ) : {L′1 7→ [s(0)], L′2 7→ [0]}. Then C2 is selected and its head append([H|L1 ], L2 , [H|L3 ]) is unified with Ψ (g0) resulting in E1 : {L′1 7→ [H|L1 ], L′2 7→ L2 , L′3 7→ [H|L3 ]}. Then Ψ (θ0 ) and E1 are used to compute θ1 : {H 7→ s(0), L1 7→ [ ], L2 7→ [0]} the input substitution of the body g1 : append(L1 , L2 , L3 ) of C2. In this way, the initial goal g0 with its input substitution θ0 has been reduced into the goal g1 and its input substitution θ1 . The execution of g1 , details of which have been omitted, transforms θ1 into θ2 : {H 7→ s(0), L1 7→ [ ], L2 7→ [0], L3 7→ [0]} the output substitution of g1 . The last step performs a procedure exit. The head of C2 and θ2 are renamed by Ψ , and then the renamed head append([H ′ |L′1 ], L′2 , [H ′ |L′3 ]) is unified with g0 resulting in E2 : {L1 7→ [H ′|L′1 ], L2 7→ L′2 , L3 7→ [H ′ |L′3 ]}. Then Ψ (θ2 ) : {H ′ 7→ s(0), L′1 7→ [ ], L′2 7→ [0], L′3 7→ [0]} and E2 are used to update the input substitution θ0 of g0 and this results in the output substitution θ3 : {L1 7→ [s(0)], L2 7→ [0], L3 7→ [s(0), 0]} of g0 . The above question is answered by an abstract execution of g0 which mimics the above normal execution of g0 . The abstract execution differs from the normal execution in that in place of a substitution is an abstract substitution that describes groundness of the values that variables may take. An abstract substitution associates a mode with a variable. L 7→ g means that L is a ground term and H 7→ u means that groundness of H is unknown. Thus, the input abstract substitution of g0 is µ0 : {L1 7→ g, L2 7→ g}. The first step of the abstract execution performs an abstract procedure entry. g0 and µ0 are first renamed by Ψ . Then C2 is selected and its head append([H|L1 ], L2 , [H|L3 ]) is unified with Ψ (g0 ) resulting in E1 . Then Ψ (µ0 ) : {L′1 7→ g, L′2 7→ g} and E1 are used to compute the input abstract substitution µ1 = {H 7→ g, L1 7→ g, L2 7→ g} of g1 as follows. L′1 is ground by Ψ (µ0 ) and L′1 equals to [H|L1 ] by E1 . Therefore, [H|L1 ] is ground, which implies that both H and L1 are ground. So, H 7→ g and L1 7→ g are in µ1 . Similarly, L2 7→ g is in µ1 since L′2 7→ L2 is in E1 and L′2 7→ g is in Ψ (µ0 ). In this way, the initial goal g0 with its input abstract substitution µ0 has been reduced into g1 and its input abstract substitution µ1 . The abstract execution of g1 , details of which have been omitAbstract Execution ted, transforms µ1 into µ2 : {H 7→ g, L1 7→ g, L2 7→ g, L3 7→ g} the output abstract substitution of g1 . The last step of the abstract execution performs an abstract procedure exit. The head of C2 and µ2 are renamed by Ψ , and then the renamed head append([H ′ |L′1 ], L′2 , [H ′ |L′3 ]) is unified with g0 resulting in E2 . Ψ (µ2 ) : {H 7→ g, L1 7→ g, L2 7→ g, L3 7→ g} and E2 are then used to update the input abstract substitution µ0 of g0 and this results in the output abstract substitution µ3 : {L1 7→ g, L2 7→ g, L3 7→ g}. The modes assigned to L1 and L2 by µ3 are the same as those by µ0 . By Ψ (µ2 ), H ′ and L′ are ground. Hence, [H ′ |L′ ] is ground. By E2 , L3 equals to [H ′ |L′ ] implying L3 is ground. So, L3 7→ g is in µ3 . C1 may be applied at the first step since µ0 also describes {L1 7→ [ ], L2 7→ [0, s(0)]}. This alternative abstract computation would give the same output abstract substitution {L1 7→ g, L2 7→ g, L3 7→ g} of g0 . Therefore, according to µ3 , if L1 and L2 are ground before append(L1 , L2 , L3 ) is executed, L3 is ground after append(L1 , L2 , L3 ) is successfully executed. The abstract execution closely resembles the normal execution. They differ in that the abstract execution processes abstract substitutions whilst the normal execution processes substitutions and in that the abstract execution performs abstract procedure entries and exits whilst the normal execution performs procedure entries and exits. Performing program analysis by mimicking normal program execution is called abstract interpretation. The resemblance between normal and abstract executions is common among different kinds of analysis. An abstract interpretation framework factors out common features of normal and abstract executions and models normal and abstract executions by a number of operators on a semantic domain, which leads to the following formalisation of abstract interpretation. Let C be a set. An n-ary operator on C is a function from Cn to C. An interpretation C is a tuple h(C, ⊑), (C1 , · · · , Ck )i where (C, ⊑) is a complete lattice and C1 , · · · , Ck are operators of fixed arities. Abstract Interpretation Definition 1. Let C M = h(C, ⊑), (C1 , · · · , Ck )i = h(M, 4), (M1, · · · , Mk )i be two interpretations such that Ci and Mi are of same arity ni for each 1 ≤ i ≤ k, and γ be a monotonic function from M to C. M is called a γ-abstraction of C if, for each 1 ≤ i ≤ k, – for all c1 , · · · , cni ∈ C and m1 , · · · , mni ∈ M, (∧1≤k≤ni ck ⊑ γ(mk )) → Ci (c1 , · · · , cni ) ⊑ γ ◦ Mi (m1 , · · · , mni ) is called an abstract interpretation and C a concrete interpretation. An object in M, say M, is called abstract while an object in C, say C, is called concrete. With respect to a given γ, if c ⊑ γ(m) then c is said to be described by m or m is said to be a description of c. The condition in the above definition is read as that Mi is a γ-abstraction of Ci . Therefore, M is a γ-abstraction of C iff each operator M in M is a γ-abstraction of its corresponding operator C in C. M 2.3 Abstract Interpretation Framework The abstract interpretation framework in [27] is based on a collecting semantics of normal logic programs which associates each textual program point with a set of substitutions. The set is a superset of the set of substitutions that may be obtained when the execution of the program reaches that program point. The collecting semantics is defined in terms of two operators on (℘(Sub), ⊆). One operator is the set union ∪ - the least upper bound operator on (℘(Sub), ⊆) and the other is UNIFY which is defined as follows. Let a1 , a2 ∈ Atom and Θ1 , Θ2 ∈ ℘(Sub). UNIFY (a1 , Θ1 , a2 , Θ2 ) = {unify(a1 , θ1 , a2 , θ2 ) 6= fail | θ1 ∈ Θ1 ∧θ2 ∈ Θ2 } where def unify(a1 , θ1 , a2 , θ2 ) = mgu((Ψ (θ1 ))(Ψ (a1 )), θ2 (a2 )) ◦ θ2 which encompasses both procedure entries and procedure exits. For a procedure entry, a1 is the calling goal, θ1 its input substitution, a2 the head of the selected clause and θ2 the empty substitution. For a procedure exit, a1 is the head of the selected clause, θ1 the output substitution of the last goal of the body of the clause, a2 the calling goal and θ2 its input substitution. The collecting semantics corresponds to the following concrete interpretation. h(℘(Sub), ⊆), (∪, UNIFY )i Specialising the framework for a particular program analysis consists in designing an abstract domain (ASub, ⊑), a concretisation function γ : ASub 7→ ℘(Sub), and two abstract operators ⊔ and AUNIFY such that h(ASub, ⊑), (⊔, AUNIFY )i is a γ-abstraction of h(℘(Sub), ⊆), (∪, UNIFY )i. Once (ASub, ⊑) and γ are designed, it remains to design AUNIFY such that AUNIFY is a γ-abstraction of UNIFY since ⊔ is a γ-abstraction of ∪. AUNIFY is called an abstract unification operator since its main work is to abstract unification. The abstract unification operator implements both abstract procedure entries and abstract procedure exits as unify encompasses both procedure entries and procedure exits. We note that the procedureentry and procedure-exit operators in [4], the type substitution propagation operator in [22, 23] and the corresponding operators in [35] and [36] can be thought of as variants of AUNIFY . 3 Polymorphic abstract interpretation This section recalls the notion of polymorphic abstract interpretation proposed in [29]. An analysis corresponds to an abstract interpretation. For a monomorphic analysis, data descriptions are monomorphic as they do not contain parameters. For a polymorphic analysis, data descriptions contain parameters. Take the logic program in figure 1 as an example. By a monomorphic type analysis [18, 28], one would infer [L1 ∈ list(nat), L2 ∈ list(nat)]append(L1 , L2 , L3 )[L3 ∈ list(nat)] and [L1 ∈ list(int), L2 ∈ list(int)]append(L1 , L2 , L3 )[L3 ∈ list(int)]. It is desirable to design a polymorphic type analysis [3, 8, 29] which would infer [L1 ∈ list(α), L2 ∈ list(α)]append(L1 , L2 , L3 )[L3 ∈ list(α)]. The two statements inferred by the monomorphic type analysis are two instances of the statement inferred by the polymorphic type analysis. A polymorphic analysis is a representation of a possibly infinite number of monomorphic analyses. The result of a polymorphic analysis subsumes the results of many monomorphic analyses in the sense that the results of the monomorphic analyses may be obtained as instances of the result of the polymorphic analysis. Let P =< (P, ⋐), (P1 , · · · , Pk ) > be the abstract interpretation for a polymorphic analysis. The elements in P by necessity contain parameters because the result of the polymorphic analysis contains parameters. Since parameters may take as value any element from an underlying domain, it is necessary to take into account all possible assignments of values to parameters in order to formalise a polymorphic abstraction. In the sequel, an assignment will always mean an assignment of values to the paramenters that serve as placeholders for information to be provided after analysis. Definition 2. Let A be the set of assignments, C =< (C, ⊑), (C1 , · · · , Ck ) > and P =< (P, ⋐), (P1, · · · , Pk ) > be two interpretations such that Ci and Pi are of same arity ni for each 1 ≤ i ≤ k, and Υ : P × A 7→ C be monotonic in its first argument. P is called a polymorphic (Υ, A)abstraction of C if, for each 1 ≤ i ≤ k, – for all κ ∈ A, all c1 , · · · , cni ∈ C and all p1 , · · · , pni ∈ P, (∧1≤j≤ni cj ⊑ Υ (pj , κ)) → Ci (c1 , · · · , cni ) ⊑ Υ (Pi (p1 , · · · , pni ), κ) The above condition is read as that Pi is a polymorphic (Υ, A)abstraction of Ci . Therefore, P is a polymorphic (Υ, A)-abstraction of C iff each operator P in P is a polymorphic (Υ, A)-abstraction of its corresponding operator C in C. With A, Υ and C being understood, P is called a polymorphic abstract interpretation. The notion of polymorphic abstract interpretation provides us better understanding of polymorphic analyses and simplifies the design and the proof of polymorphic analyses. An alternative formulation of a polymorphic abstract interpretation is to define Υ as a function of type P 7→ (A 7→ C). Thus, a polymorphic abstract interpretation is a special class of abstract interpretation. 4 Monomorphic Groundness Analysis This section reformulates the groundness analysis presented in [38] that uses the abstract domain for groundness proposed in [32]. The reformulated groundness analysis will be used section 5 to obtain the polymorphic groundness analysis. 4.1 Abstract Domains In groundness analysis, we are interested in knowing which variables in VP will be definitely instantiated to ground terms and which variables in VP are not necessarily instantiated to ground terms. We use g and u to represent these two instantiation modes of a variable. Let def MO = {g, u} and ≤ be defined as g ≤ g, g ≤ u and u ≤ u. hMO, ≤ i is a complete lattice with infimum g and supremum u. Let ▽ and △ be the least upper bound and the greatest lower bound operators on hMO, ≤ i respectively. The intuition of a mode in MO describing a set of terms is captured by a concretisation function γterm : hMO, ≤ i 7→ h℘(Sub), ⊆i defined in the following. def γterm (m) = ( Term(Σ, ∅), if m = g Term(Σ, V), if m = u A set of substitutions is described naturally by associating each variable in VP with a mode from MO. The abstract domain for groundness analysis is thus hMSub, ⊑i where def MSub = VP 7→ MO and ⊑ is the pointwise extension of ≤ . (MSub, ⊑) is a complete lattice. We use ⊔ and ⊓ to denote the least upper bound and the greatest lower bound operators on hMSub, ⊑i respectively. The set of substitutions described by a function from VP to MO is modelled by a concretisation function γsub from hMSub, ⊑i to h℘(Sub), ⊆i defined as follows. def γsub (θ♭ ) = {θ | ∀X ∈ VP .(θ(X) ∈ γterm (θ♭ (X)))} γsub is a monotonic function from hMSub, ⊑i to h℘(Sub), ⊆i. Monomorphic abstract substitutions in MSub describes modes of variables in VP . The abstract unification operator for the monomorphic groundness analysis will also make use of modes of renamed def def variables. Let VP + = VP ∪ Ψ (VP ). We define MSub+ = VP + 7→ MO + , ⊔+ and ⊓+ are defined as and ⊑+ as pointwise extension of ≤ . γsub counterparts of γsub , ⊔ and ⊓ respectively. + Lemma 3. γterm (MO), γsub (MSub) and γsub (MSub+ ) are Moore families. Proof. Straightforward. ✷ 4.2 Abstract Unification Operator Algorithm 1 defines an abstract unification operator for groundness analysis. Given θ♭ , σ ♭ ∈ MSub and A, B ∈ AT OM(Σ, Π, VP ), it computes MUNIFY (A, θ♭ , B, σ ♭ ) ∈ MSub in five steps. In step (1), Ψ is applied to A and θ♭ to obtain Ψ (A) and Ψ (θ♭ ), and Ψ (θ♭ ) and σ ♭ are combined to obtain ζ ♭ = Ψ (θ♭ ) ∪ σ ♭ so that a substitution satisfying ζ ♭ satisfies both Ψ (θ♭ ) and σ ♭ . Note that ζ ♭ ∈ MSub+ . In step (2), E0 = eq ◦mgu(Ψ (A), B) is computed. If E0 = fail then the algorithm returns {X 7→ g | X ∈ VP } - the infimum of hMSub, ⊑i. Otherwise, the algorithm continues. In step (3), η ♭ = MDOWN (E0 , ζ ♭) is computed so that η ♭ is satisfied by any ζ ◦ mgu(E0ζ) for any ζ satisfying ζ ♭ . In step (4), the algorithm computes β ♭ = MUP (η ♭ , E0 ) from η ♭ such that any substitution satisfies β ♭ if it satisfies η ♭ and unifies E0 . In step (5), the algorithm restricts β ♭ to VP and returns the result. Algorithm 1 Let θ♭ , σ ♭ ∈ MSub, A, B ∈ Atom(Σ, Π, VP ). def MUNIFY (A, θ♭ , B, σ ♭ ) =  let E0 = eq ◦ mgu(Ψ (A), B) in     if E 6= fail 0  then MUP (E0 , MDOWN (E0 , Ψ (θ♭) ∪ σ ♭ ))|\VP    else {X 7→ g | X ∈ VP } def MDOWN (E, ζ ♭ ) = η ♭  ♭  if X 6∈ range(E)  ζ (X), def ♭ ♭ where η (X) = ζ (X) △ △(Y =t)∈E∧X∈vars(t) ζ ♭ (Y ) ,   otherwise. def MUP (E, η ♭ ) = β ♭  ♭   η (X), if X 6∈ dom(E) where β (X) = η (X) △ ▽Y ∈vars(E(X)) ζ ♭(Y ) ,   otherwise. ♭ def ♭ The following theorem states that the abstract unification operator is a safe approximation of UNIFY . Theorem 4. For any θ♭ , σ ♭ ∈ MSub and any A, B ∈ Atom(Σ, Π, VP ). UNIFY (A, γsub (θ♭ ), B, γsub (σ ♭ )) ⊆ γsub (MUNIFY (A, θ♭ , B, σ ♭ )) + Proof. Ψ (θ♭ ) ∪ σ ♭ ∈ MSub+ . Let ζ ∈ γsub (Ψ (θ♭ ) ∪ σ ♭ ) and (Y 7→ g) ∈ MDOWN (E0 , Ψ (θ♭ ) ∪ σ ♭ ). Then either (Y 7→ g) ∈ Ψ (θ♭ ) ∪ σ ♭ or there is X and t such that (X 7→ g) ∈ Ψ (θ♭ ) ∪ σ ♭ , (X = t) ∈ E0 and Y ∈ vars(t). So, Y (ζ ◦ mgu(E0 ζ)) is ground if mgu(E0 ζ) 6= fail. If every variable in a term is ground under a substitution then that term is ground under the same substitution. Therefore, if (Z 7→ g) ∈ MUP (E0 , MDOWN (E0 , Ψ (θ♭ ) ∪ σ ♭ )) then Z is ground under ζ ◦ mgu(E0ζ). This completes the proof of the theorem. ✷ Example 1. Let VP = {X, Y, Z}, A = g(X, f (Y, f (Z, Z)), Y ), B = g(f (X, Y ), Z, X), θ♭ = {X 7→ g, Y 7→ u, Z 7→ u} and σ ♭ = {X 7→ u, Y 7→ u, Z 7→ g}. MUNIFY (A, θ♭ , B, σ ♭ ) is computed as follows. In step (1), Ψ = {X 7→ X0 , Y 7→ Y0 , Z 7→ Z0 } is applied to A and ♭ θ. Ψ (A) = g(X0 , f (Y0, f (Z0 , Z0 )), Y0) Ψ (θ♭ ) = {X0 7→ g, Y0 7→ u, Z0 7→ u} and ζ ♭ = Ψ (θ♭ ) ∪ σ ♭ = {X0 7→ g, Y0 7→ u, Z0 7→ u, X 7→ u, Y u, Z 7→ g} is computed. In step (2), E0 = eq ◦ mgu(Ψ (A), B) = {X0 = f (Y0 , Y ), Z f (Y0 , f (Z0 , Z0)), X = Y0 } is computed. In step (3), η ♭ = MDOWN (E0 , ζ ♭) = {X0 7→ g, Y0 7→ g, Z0 g, X 7→ u, Y 7→ g, Z 7→ g} is computed. In step (4), β ♭ = MUP (E0 , η ♭ ) = {X0 7→ g, Y0 7→ g, Z0 7→ g, X g, Y 7→ g, Z 7→ g} is computed. In step (5), β ♭ |\VP = {X 7→ g, Y 7→ g, Z 7→ g} is returned. So, MUNIFY (A, θ♭ , B, σ ♭ ) = {X 7→ g, Y 7→ g, Z 7→ g}. ✷ 5 7→ = 7→ 7→ Polymorphic Groundness Analysis We now present the polymorphic groundness analysis. We first design polymorphic domains corresponding to the monomorphic domains for the monomorphic groundness analysis and then obtain the polymorphic groundness analysis by replacing two primitive monomorphic operators by their polymorphic counterparts. 5.1 Abstract Domains In a polymorphic groundness analysis, the input contains a number Para of mode parameters which may be filled in with values from MO. The set of assignments is hence A = Para 7→ MO. We first consider how to express mode information in presence of mode parameters. The polymorphic groundness analysis needs to propagate mode parameters in a precise way. The abstract unification operator for the monomorphic groundness analysis computes the least upper bounds and the greatest lower bounds of modes when it propagates mode information. This raises no difficulty in the monomorphic groundness analysis as the two operands of the least upper bound operator or the greatest lower bound operator are modes from MO. In the polymorphic groundness analysis, their operands contains parameters. This makes it clear that mode information can no longer be represented by a single mode value or parameter in order to propagate mode information in a precise manner. We use as a tentative polymorphic mode description a set of subsets of mode parameters. Thus, the set of tentative polymorphic mode descriptions is ℘(℘(Para)). The denotation of a set S of subsets of mode parameters under a given assignment κ is determined as follows. Let S = {S1 , S2 , · · · , Sn } and Si = {αi1 , αi2 , · · · , αiki }. Then, for a particular assignment κ, S is interpreted as ▽1≤i≤n △1≤j≤ki κ(αij )). ∅ represents g under any assignment since ▽∅ = g while {∅} represents u as ▽ △ ∅ = u. Let ≪ be a relation on ℘(℘(Para)) defined as follows. def S1 ≪S2 = ∀S1 ∈ S1 .∃S2 ∈ S2 .(S2 ⊆ S1 ) For instance, {{α1 , α2 }, {α1 , α3 }}}≪{{α1 }} and {{α1 , α2 }, {α1 , α3 }}}≪{{α2 }, {α3 }}. If S1 ≪S2 then, under any assignment, S1 represents a mode that is smaller than or equal to the mode represented by S2 under the same assignment. ≪ is a pre-order. It is reflexive and transitive but not antisymmetric. For instance, {{α1 , α2 }, {α1 }}≪{{α1 }} and {{α1 }}≪{{α1 , α2 }, {α1 }}. Define ∼ = def as S1 ∼ =S2 = (S1 ≪S2 ) ∧ (S2 ≪S1 ). Then ∼ = is an equivalence relation on ℘(℘(Para)). The domain of mode descriptions is constructed as def PM = ℘(℘(Para))/∼ = def  = ≪/∼ = and its hPM, i is a complete lattice with its infimum being [∅]∼ = . The least upper bound operator ⊕ and the supremum being [{∅}]∼ = greatest lower bound operator ⊗ on hPM, i are given as follows. def [S1 ]∼ = = [S1 ∪ S2 ]∼ = ⊕ [S2 ]∼ = def [S1 ]∼ = = [{S1 ∪ S2 | S1 ∈ S1 ∧ S2 ∈ S2 ]}∼ = ⊗ [S2 ]∼ = The meaning of a polymorphic mode description is given by Υterm : PM × A 7→ ℘(Term(Σ, V)) defined as follows. def , κ) = γterm (▽S∈S △s∈S κ(s)) Υterm ([S]∼ = Υterm interprets S as a disjunction of conjunctions of mode parameters. For instance, if a variable X is associated with a mode description {{α1 , α2 }, {α1 , α3 }}, then its mode is (α1 △ α2 ) ▽ (α1 △ α3 ). For simplicity, a polymorphic mode description will be written as a set of subsets of mode parameters, using a member of an equivalence class of ∼ = to represent the equivalence class. Polymorphic abstract substitutions are a function mapping a variable in VP to a mode description in PM. Polymorphic abstract substitutions are ordered pointwise. The domain of polymorphic abdef stract substitutions is hPSub, ⋐i where PSub = VP 7→ PM and ⋐ is the pointwise extension of . hPSub, ⋐i is a complete lattice with its infimum being {X 7→ ∅ | X ∈ VP } and its supremum being {X 7→ {∅} | X ∈ VP }. The least upper bound operator ⋒ and the greatest lower bound operator ⋓ are pointwise extensions of ⊕ and ⊗ respectively. The meaning of a polymorphic abstract substitution is given by Υsub : PSub × A 7→ ℘(Sub) defined as follows. def Υsub (θ♯ , κ) = {θ | ∀X ∈ VP .(θ(X) ∈ Υterm (θ♯ (X), κ))} def We define PSub+ = VP + 7→ PM and ⋐+ as pointwise extension + of . Υsub , ⋒+ and ⋓+ are defined as counterparts of Υsub , ⋒ and ⋓ respectively. + Lemma 5. Υterm (PM), Υsub (PSub) and Υsub (PSub+ ) are Moore families. Proof. For any κ ∈ A, we have Υterm ({∅}) = Sub, implying that Υterm is co-strict. Let S1 , S2 ∈ PM and κ ∈ A. Then either (a) Υterm (S1 ⊗ S2 , κ) = γterm (g) or (b) Υterm (S1 ⊗ S2 , κ) = γterm (u). In the case (a), we have that △α∈S1 κ(α) for any S1 ∈ S1 and △β∈S2 κ(β) for any S2 ∈ S2 . This implies that Υterm (S1 , κ) = γterm (g) and Υterm (S2 , κ) = γterm (g). Therefore, Υterm (S1 ⊗ S2 , κ) = Υterm (S1 , κ) ∩ Υterm (S2 , κ) holds in the case (a). That Υterm (S1 ⊗S2 , κ) = Υterm (S1 , κ)∩Υterm (S2 , κ) holds in the case (b) can be proven similarly. So, Υterm (PM) is a Moore family. + That Υsub (PSub) and Υsub (PSub+ ) are Moore families is an immediate consequence of that Υterm (PM) is a Moore family. 5.2 Abstract Unification Operator Algorithm 2 defines an abstract unification operator for the polymorphic groundness analysis. It is obtained from that for the monomorphic groundness analysis by replacing monomorphic descriptions with polymorphic descriptions, ▽ and △ by ⊕ and ⊗ respectively, and renaming MUNIFY , MDOWN and MUP into PUNIFY , PDOWN and PUP respectively. Algorithm 2 Let θ♯ , σ ♯ ∈ PSub, A, B ∈ Atom(Σ, Π, VP ). def PUNIFY (A, θ♯ , B, σ ♯ ) =    let E0 = eq ◦ mgu(Ψ (A), B) in   if E 6= fail 0  then PUP (E0 , PDOWN (E0 , Ψ (θ♯ ) ∪ σ ♯ ))|\VP    else {X 7→ ∅ | X ∈ VP } def PDOWN (E, ζ ♯ ) = η ♯  ♯  if X 6∈ range(E)  ζ (X), def ♯ ♯ where η (X) = ζ (X) ⊗ ⊗(Y =t)∈E∧X∈vars(t) ζ ♯ (Y ) ,   otherwise. def PUP (E, η ♯ ) = β ♯ def where β ♯ (X) =  ♯   η (X), if X 6∈ dom(E) η ♯ (X) ⊗ ⊕Y ∈vars(E(X)) ζ ♯(Y ) ,   otherwise. Example 2. Let VP = {X, Y, Z} A = g(X, f (Y, f (Z, Z)), Y ) B = g(f (X, Y ), Z, X) θ♯ = {X 7→ {{α1 , α2 }}, Y 7→ {{α1 , α3 }}, Z 7→ {{α2 , α3 }}} σ ♯ = {X 7→ {{α1 }, {α2}}, Y 7→ {{α2 , α3 }}, Z 7→ {∅}} PUNIFY (A, θ♯ , B, σ ♯ ) is computed as follows. In step (1), Ψ = {X 7→ X0 , Y 7→ Y0 , Z 7→ Z0 } is applied to A and ♯ θ. Ψ (A) = g(X0 , f (Y0, f (Z0 , Z0 )), Y0) Ψ (θ♯ ) = {X0 7→ {{α1 , α2 }}, Y0 7→ {{α1 , α3 }}, Z0 7→ {{α2 , α3 }}} and ζ ♯ = Ψ (θ♯ ) ∪ σ ♯ = {X0 7→ {{α1 , α2 }}, Y0 7→ {{α1 , α3 }}, Z0 7→ {{α2 , α3 }}, X 7→ {{α1 }, {α2 }}, Y 7→ {{α2 , α3 }}, Z 7→ {∅}} is computed. In step (2), E0 = eq ◦ mgu(Ψ (A), B) = {X0 = f (Y0, Y ), Z = f (Y0 , f (Z0 , Z0)), X = Y0 } is computed. Step (3) computes η ♯ = PDOWN (E0 , ζ ♯) ) ( X0 7→ {{α1 , α2 }}, Y0 7→ {{α1 , α2 , α3 }}, Z0 7→ {{α2 , α3 }}, = X 7→ {{α1 }, {α2 }}, Y 7→ {{α1 , α2 , α3 }}, Z 7→ {∅} Step (4) computes β ♯ = PUP (E0 , η ♯ ) ( ) X0 7→ {{α1 , α2 , α3 }}, Y0 7→ {{α1 , α2 , α3 }}, Z0 7→ {{α2 , α3 }}, = X 7→ {{α1 , α2 , α3 }}, Y 7→ {{α1 , α2 , α3 }}, Z 7→ {{α2 , α3 } In step (5), β ♯ |\VP = {X 7→ {{α1 , α2 , α3 }}, Y 7→ {{α1 , α2 , α3 }}, Z 7→ {{α2 , α3 }}} is returned. So, PUNIFY (A, θ♯ , B, σ ♯ ) = {X 7→ {{α1 , α2 , α3 }}, Y 7→ {{α1 , α2 , α3 }}, Z 7→ {{α2 , α3 }}}. ✷ We now prove that for any assignment, the instantiated result of the polymorphic groundness analysis is as precise as that of the monomorphic groundness analysis corresponding to the assignment. Theorem 6. Let S1 , S1 ∈ PM, m1 , m2 ∈ MO, θ♯ , σ ♯ ∈ PSub, η ♯ , ζ ♯ ∈ PSub+ , θ♭ , σ ♭ ∈ MSub,η ♭ , ζ ♭ ∈ MSub+ , A, B ∈ Atom(Σ, Π, VP ) and E ∈ ℘(Eqn). For any κ ∈ A, (a) if Υterm (S1 , κ) = γterm (m1 ) and Υterm (S2 , κ) = γterm (m2 ) then both Υterm (S1 ⊗ (S2 , κ) = γterm (m1 △ m2 ) and Υterm (S1 ⊕ (S2 , κ) = γterm (m1 ▽ m2 ); + + (b) if Υsub (ζ ♯ , κ) = γsub (ζ ♭) then + + Υsub (PDOWN (E, ζ ♯), κ) = γsub (MDOWN (E, ζ ♭)) + + (c) if Υsub (η ♯ , κ) = γsub (η ♭ ) then + + Υsub (PUP(E, η ♯ ), κ) = γsub (MUP (E, η ♭ )) and (d) if Υsub (θ♯ , κ) = γsub (θ♭ ) and Υsub (σ ♯ , κ) = γsub (σ ♭ ) then Υsub (PUNIFY (A, θ♯ , B, σ ♯ ), κ) = γsub (MUNIFY (A, θ♭ , B, σ ♭ )) Proof. (b) and (c) follow from (a) and they together imply (d). Thus, it remains to prove (a). Assume Υterm (S1 , κ) = γterm (m1 ) and Υterm (S2 , κ) = γterm (m2 ). The proof of Υterm (S1 ⊗ (S2 , κ) = γterm (m1 △ m2 ) is done by considering four different combinations of values that m1 and m2 can take. We only prove it for the case m1 = g and m2 = u as other cases are similar. m1 = g implies △α∈S1 κ(α) = g for any S1 ∈ S1 . Thus △α∈S1 ∪S2 κ(α) = g for any S1 ∈ S1 and S2 ∈ S2 . So, Υterm (S1 ⊗ (S2 , , κ) = γterm (m1 △ m2 ) as m1 △ m2 = g. Υterm (S1 ⊕ (S2 , κ) = γterm (m1 ▽ m2 ) can be proven similarly. ✷ The following theorem states that the abstract unification operator PUNIFY for the polymorphic groundness analysis is a safe approximation of UNIFY . Theorem 7. For any A, B ∈ Atom(Σ, Π, VP ), κ ∈ A, and θ♯ , σ ♯ ∈ PSub, UNIFY (A, Υsub (θ♯ , κ), B, Υsub (σ ♯ , κ)) ⊆ Υsub (PUNIFY (A, θ♯ , B, σ ♯ ), κ) Proof. Let θ♭ be such that γsub (θ♭ ) = Υsub (θ♯ , κ) and σ ♭ be such that γsub (σ ♭ ) = Υsub (σ ♯ , κ). By theorem 4, we have UNIFY (A, Υsub (θ♯ , κ), B, Υsub (σ ♯ , κ)) ⊆ γsub (MUNIFY (A, θ♭ , B, σ ♭ )) By theorem 6, we have Υsub (PUNIFY (A, θ♯ , B, σ ♯ ), κ) = γsub (MUNIFY (A, θ♭ , B, σ ♭ )) Therefore, UNIFY (A, Υsub (θ♯ , κ), B, Υsub (σ ♯ , κ)) ⊆ Υsub (PUNIFY (A, θ♯ , B, σ ♯ ), κ) This completes the proof of the theorem. ✷ 6 Implementation and Examples We have implemented the abstract interpretation framework and the polymorphic groundness analysis in SWI-Prolog. The abstract interpretation framework is implemented using O’Keefe’s least fixedpoint algorithm [37]. Both the abstract interpretation framework and the polymorphic type analysis are implemented as meta-interpreters using ground representations for program variables and mode parameters. 6.1 Examples The following examples present the results of the polymorphic groundness analysis on some Prolog programs. The sets are represented by lists. V 7→ T is written as V /T in the results, α as alpha, and β as beta. Example 3. The following is the Prolog program from [40] (p. 250) for looking up the value for a given key in a dictionary represented as a binary tree and the result of the polymorphic groundness analysis. :- %[K/[[alpha]],D/[[beta]],V/[[gamma]]] lookup(K,D,V) %[K/[[alpha,beta]],D/[[beta]],V/[[beta,gamma]]]. lookup(K,dict(K,X,L,R),V) :%[K/[[alpha,beta]],X/[[beta]],L/[[beta]],R/[[beta]],V/[[gamma]]], X = V, %[K/[[alpha,beta]],X/[[beta,gamma]],L/[[beta]],R/[[beta]], % V/[[beta,gamma]]]. lookup(K,dict(K1,X,L,R),V) :%[K/[[alpha]],K1/[[beta]],X/[[beta]],L/[[beta]],R/[[beta]], % V/[[gamma]]], K < K1, %[K/[],K1/[],X/[[beta]],L/[[beta]],R/[[beta]],V/[[gamma]]], lookup(K,L,V), %[K/[],K1/[],X/[[beta]],L/[[beta]],R/[[beta]],V/[[beta,gamma]]]. lookup(K,dict(K1,X,L,R),V) :- %[K/[[alpha]],K1/[[beta]],X/[[beta]],L/[[beta]],R/[[beta]], V/[[gamma]]], K > K1, %[K/[],K1/[],X/[[beta]],L/[[beta]],R/[[beta]],V/[[gamma]]], lookup(K,R,V), %[K/[],K1/[],X/[[beta]],L/[[beta]],R/[[beta]],V/[[beta,gamma]]]. The analysis is done for the goal lookup(K, D, V ) and the input abstract substitution {K 7→ {{α}}, D 7→ {{β}}, V 7→ {{γ}}}. The input abstract substitution states that before the goal is executed, the instantiation mode of K is α, that of D is β and that of V is γ. The analysis result indicates that, after the goal is executed, the instantiation mode of K is α △ β, that of D remains β and that of V becomes β △γ. This is captured by the output abstract substitution. The result can be instantiated by one of eight assignments in {α, β, γ} 7→ MO. Under a given assignment, a polymorphic mode description evaluates to a mode in {g, u}. Let κ = {α 7→ g, β 7→ g, γ 7→ u}. Under the assignment κ, the input abstraction substitution evaluates to {K 7→ g, D 7→ g, V 7→ u} and output abstract substitution evaluates to {K 7→ g, D 7→ g, V 7→ g}. This indicates that if the goal lookup(K, D, V ) called with K and D being ground then V is ground after lookup(K, D, V ) is successfully executed. The result also indicates that immediately before the built-in calls K < K1 and K > K1 are executed, the instantiation modes of K and K1 are respectively α and β. The Prolog requires that both operands of the built-in predicates ” < ” and ” > ” are ground before their invocations. It is obvious that if α and β are assigned g then the requirement is satisfied and corresponding run-time checks can be eliminated. Such inference of sufficient conditions on inputs for safely removing run-time checks is enabled by the ability of propagating parameters. Without propagation of parameters, the inference would require a backward analysis. Current frameworks for abstract interpretation of logic programs do not support backward analyses. ✷ Example 4. The following is the result of polymorphic groundness analysis of the permutation sorting program from [40] (p. 55). The analysis is done with the goal sort(Xs, Y s) and the input abstract substitution {Xs 7→ {{α}}, Y s 7→ {{β}}}. The output abstract substitution obtained is {Xs 7→ {{α}}, Y s 7→ {{α, β}}}. This indicates that the instantiation mode of Y s after the successful execution of sort(Xs, Y s) is the greatest lower bound of the instantiation modes of Xs and Y s prior to the execution of the goal. The abstract substitution associated with the program point immediately before the built-in call X =< Y associates both X and Y with the polymorphic mode description {{α, β}}. For this mode description to evaluate to g, it is sufficient to assign g to either α or β. :- %[Xs/[[alpha]],Ys/[[beta]]] sort(Xs,Ys) %[Xs/[[alpha]],Ys/[[alpha,beta]]]. select(X,[X|Xs],Xs) :%[X/[[alpha,beta]],Xs/[[alpha]]]. select(X,[Y|Ys],[Y|Zs]) :%[X/[[beta]],Y/[[alpha]],Ys/[[alpha]],Zs/[[]]], select(X,Ys,Zs), %[X/[[alpha,beta]],Y/[[alpha]],Ys/[[alpha]],Zs/[[alpha]]]. ordered([]) :%[]. ordered([X]) :%[X/[[alpha,beta]]]. ordered([X,Y|Ys]) :%[X/[[alpha,beta]],Y/[[alpha,beta]],Ys/[[alpha,beta]]], X =< Y, %[X/[],Y/[],Ys/[[alpha,beta]]], ordered([Y|Ys]), %[X/[],Y/[],Ys/[]]. permutation(Xs,[Z|Zs]) :%[Xs/[[alpha]],Z/[[beta]],Zs/[[beta]],Ys/[[]]], select(Z,Xs,Ys), %[Xs/[[alpha]],Z/[[alpha,beta]],Zs/[[beta]],Ys/[[alpha]]], permutation(Ys,Zs), %[Xs/[[alpha]],Z/[[alpha,beta]],Zs/[[alpha,beta]],Ys/[[alpha]]]. permutation([],[]) :%[]. sort(Xs,Ys) :%[Xs/[[alpha]],Ys/[[beta]]], permutation(Xs,Ys), %[Xs/[[alpha]],Ys/[[alpha,beta]]], ordered(Ys), %[Xs/[[alpha]],Ys/[[alpha,beta]]]. ✷ Example 5. The following is the pure factorials program from [40] (p. 39) together with the result of the polymorphic groundness analysis. The program is analysed with the goal f actorial(N, F ) with input abstract substitution being {N 7→ {{α}}, F 7→ {{β}}}. The result shows that the goal f actorial(N, F ) always succeeds with N and F being bound to ground terms regardless of the instantiation modes of N and F before the goal f actorial(N, F ) is executed. :- %[N/[[alpha]],F/[[beta]]] factorial(N,F) %[N/[],F/[]]. natural_number(0) :%[]. natural_number(s(X)) :%[X/[]], natural_number(X), %[X/[]]. plus(0,X,X) :%[X/[]], natural_number(X), %[X/[]]. plus(s(X),Y,s(Z)) :%[X/[],Y/[],Z/[[]]], plus(X,Y,Z), %[X/[],Y/[],Z/[]]. times(0,X,0) :%[X/[]]. times(s(X),Y,Z) :%[X/[],Y/[],Z/[[]],XY/[[]]], times(X,Y,XY), %[X/[],Y/[],Z/[[]],XY/[]], plus(XY,Y,Z), %[X/[],Y/[],Z/[],XY/[]]. factorial(0,s(0)) :%[]. factorial(s(N),F) :%[N/[[alpha]],F/[[]],F1/[[]]], factorial(N,F1), %[N/[],F/[[]],F1/[]], times(s(N),F1,F), %[N/[],F/[],F1/[]]. ✷ 6.2 Performance The SWI-Prolog implementation of the polymorphic groundness analysis has been tested with a set of benchmark programs that have been used to evaluate program analyses of logic programs. The experiments are done on a 5x86 IBM compatiable PC running Windows95. The table in figure 2 illustrates the time performance of the polymorphic groundness analysis. Every but the last row corresponds to the result of the polymorphic groundness analysis of a specific input. The input consists of a program, a goal and an input abstract substitution that specifies the modes of the variables in the goal. The program and the goal are listed in the first and the third column. The input abstract substitution is the most general for the goal that associates each variable in the goal with a different mode paramter. For instance, the abstract substitution for the first row is {X 7→ {{α}}, Y 7→ {{β}}}. The second column lists the size of the program. The fourth column is the time in seconds spent on the polymorphic groundness analysis of the input. Last row gives the total size of the programs and the total time. The table indicates that the prototype polymorphic groundness analyzer spends an average of 0.0443 seconds to process one line program. This is an acceptable speed for many logic program programs. Both the abstract interpretation framework and the polymorphic groundness analysis are implemented as meta-interpreters in a public domain Prolog system. Moreover, we use ground representations for program variables and mode parameters. Using ground representations enables us to make the prototype implementation in a short time and to avoid possible difficulties that may arise due to improper use of meta-level and object-level variables. However, it also prevents us from taking advantages of built-in unification and forces us to code unification in Prolog. We believe that both the use of meta-programming and that of ground representations significantly slow the prototype. Therefore, there is much space for improving the time performance of the polymorphic groundness analysis through a better implementation. The same table compares the performance of the polymorphic groundness analysis with that of the monomorphic groundness analysis presented in [38]. The monomorphic groundness analysis in [38] Program Lines Goal graph connectivity 32 connected(X,Y) merge 15 merge(Xs,Ys,Zs) buggy naive reverse 12 nrev(X,Y) buggy quick sort 33 qs(Li,Lo) improved quick sort 20 iqsort(Xs,Ys) tree sort 31 treesort(Xs,Ys) list difference 14 diff(X,Y,Z) list insertion 19 insert(X,Y,Z) quicksort with 20 quicksort(Xs,Ys) difference list dictionary lookup 12 lookup(K,D,V) in binary trees permutation sort 22 sort(Xs,Ys) heapify binary trees 25 heapify(Tree,Heap) exponentiation 23 exp(N,X,Y) by multiplication factorial 22 factorial(N,F) zebra 50 zebra(E,S,J,U,N,Z,W) tsp 148 tsp(N,V,M,S,C) chat 1040 chart parser neural 381 test(X,N) disj r 164 top(K) dnf 84 go rev 12 rev(Xs,Ys) tree order 34 v2t(X,Y,Z) serialize 45 go(S) cs r 314 pgenconfig(C) kalah 272 play(G,R) press 370 test press(X,Y) queens 29 queens(X,Y) read 437 read(X,Y) rotate 15 rotate(X,Y) ronp 101 puzzle(X) small 11 select cities(W,C1,C2,C3) peep 417 comppeepopt(Pi,O,Pr) gabriel 111 main(V1,V2) naughts-and-crosses 123 play(R) semi 184 go(N,T) 4642 Poly Mono Ratio Assignments (sec) (sec) 0.16 0.28 0.11 0.38 0.33 0.44 0.11 0.11 0.28 1.641 2.382 1.629 2.082 2.933 3.591 2.750 1.600 2.545 4 8 4 4 4 4 8 8 4 0.17 0.062 2.720 8 0.05 0.057 0.869 0.55 0.192 2.857 0.16 0.078 2.031 4 4 8 0.06 0.66 2.74 61.08 6.86 1.82 3.68 0.11 0.93 0.88 12.53 4.01 28.94 0.16 35.09 0.22 2.20 0.06 23.94 2.14 1.15 13.68 206.07 Fig. 2. Performance of Polymorphic Groundness Analysis 0.097 0.117 0.067 0.182 0.112 0.122 0.040 0.068 0.110 0.067 0.325 1.458 61.410 5.510 1.505 2.960 0.027 0.225 0.305 9.910 3.212 15.325 0.097 26.710 0.040 1.015 0.016 12.090 1.112 0.880 6.892 0.888 2.026 1.878 0.994 1.243 1.209 1.243 4.000 4.133 2.885 1.264 1.248 1.888 1.641 1.313 5.500 2.167 3.555 1.980 1.923 1.306 1.984 2.168 4 128 32 1 4 2 1 4 8 2 2 4 4 4 4 4 2 16 8 4 2 4 9 uses a subset of VP as an abstract substitution. The subset of VP contains those variables that are definitely ground under all concrete substitutions described by the abstract substitution. This allows operators on abstract substitutions to be optimised. The monomorphic groundness analysis is implemented in the same way as the polymorphic groundness analysis. The number of different assignments to the mode paramenters in the input abstract substitution for the polymorphic groundness analysis is two to the power of the number of the mode parameters. Each assignment corresponds to a monomorphic groundness analysis that is performed and measured. The fifth column lists the average time in seconds spent on these monomorphic groundness analyses. The sixth column list the ratio of the fourth column by the fifth column. It is the ratio of the performance of the polymorphic groundness analysis by that of the monomorphic groundness analysis. The seventh column lists the number of the possible assignments for the mode parameters. The table shows that the time the polymorphic groundness analysis takes is from 0.869 to 5.500 times that the monomorphic groundness analysis takes on the suit of programs. In average, the polymorphic groundness analysis is 2.168 times slower. This is due to the fact that the polymorphic mode descriptions are more complex than the monomorphic mode descriptions. The abstract unification operator and the least upper bound operator for the polymorphic groundness are more costly than those for the monomorphic groundness analysis. The result of the polymorphic groundness analysis is much more general than that of the monomorphic groundness analysis. It can be instantiated as many times as there are different assignments for the mode parameters in the input abstract substitution. The average number of different assignments is 9 which is 4.151 times the average performance ratio. This indicates that if all different monomorphic groundness analyses corresponding to a polymorphic groundness analysis are required, polymorphic groundness analysis is 4.151 times better. Moreover, the seven rows with three mode paramenters have an average performance ratio of 2.513 and 8 assignments. For these seven rows, the polymorphic groundness analysis is 3.182 times better if all different monomorphic groundness analyses corresponding to a polymorphic groundness analysis are required. Furthermore, the three rows with four or more mode parameters have an average performance ratio of 2.486 and an avarage of 58.666 different assignments. Polymorphic groundness analysis is 23.598 times better for these three rows if all different monomorphic groundness analyses are required. 7 Conclusion We have presented a new groundness analysis, called polymorphic groundness analysis, that infers dependency of the groundness of the variables at a program point on mode parameters that are input to the groundness analysis and can be instantiated after analysis. The polymorphic groundness analysis is obtain by simulating a monomorphic groundness analysis. Some experimental results with a prototype implementation of the analysis are promising. The polymorphic groundness analysis is proved to be as precise as the monomorphic groundness analysis. The monomorphic groundness analysis that we consider in this paper is the least powerful one. It uses a simple domain for groundness. As groundness is useful both in compile-time program optimisations itself and in improving precisions of other program analyses such as sharing [38, 10, 34, 41, 20], more powerful domains for groundness have been studied. These domains consists of propositional formulae over program variables that act as propositional variables. Dart uses the domain Def of definite propositional formulae to capture groundness dependency between variables [15]. For instance, the definite propositional formula x ↔ (y ∧z) represents the groundness dependency that x is bound to a ground term if and only if y and z are bound to ground terms. Def consists of propositional formulae whose models are closed under set intersection [11]. Marriott and Søndergaard use the domain Pos of positive propositional formulae [30]. A positive propositional formula is true whenever each propositional variable it contains is true. Pos is strictly more powerful than Def. It has been further studied in [11, 1, 2] and has several implementations [5, 25, 17, 7, 9]. The domain for the monomorphic groundness analysis in this paper is isomorphic to a subdomain Con of Pos. Con consists of propositional formulae that are conjunctions of propositional variables. The polymorphic groundness analysis infers the dependencies of the groundness of variables of interest at a program point on mode parameters while a Pos-based groundness analysis infers groundness dependencies among variables of interest at a program point. Posbased groundness analysis can also be used to infer groundness dependencies between variables at a program point and variables in the goal. But this requires a complex program transformation that introduces a new predicate for each program point of interest and may lead to solving large boolean equations involving many propositional variables. Also, the less powerful domain Def cannot be used to infer groundness dependencies between variables at a program point and variables in the goal because, unlike Pos, Def is not condensing [20, 30]. Though the polymorphic groundness analysis is not intended for inferring groundness dependencies among variables of interest at a program point, it captures this kind of dependency indirectly. In example 4, the output abstract substitution for the goal sort(Xs, Y s) is {Xs 7→ {{α}}, Y s 7→ {{α, β}}}. This implies that whenever Xs is bound to a ground term, Y s is bound to a ground term because assigning g to α will evaluate {{α, β}}} to g regardless of the mode assigned to β. In general, if the abstract substitution at a program point assign Rj to Yj for 1 ≤ j ≤ l and Si to Xi for 1 ≤ i ≤ k and ⊕1≤j≤l Rj  ⊕1≤i≤k Sk then the Pos like proposition ∧1≤i≤k Xi → ∧1≤j≤l Yj holds at the program point. Thus the polymorphic groundness analysis can also infer the groundness dependencies produced by a Pos-based groundness analysis. Moreover, it can be directly plugged into most abstract interpretation frameworks for logic programs. However, this kind of groundness dependency in the result of the polymorphic groundness analysis is not as explicit as in the result of a Pos-based analysis. References [1] T. Armstrong, K. Marriott, P. Schachte, and H. Søndergaard. Boolean functions for dependency analysis: Algebraic properties and efficient representation. In B. Le Charlier, editor, Static Analysis: Proceedings of the First International Symposium, Lecture Notes in Computer Science 864, pages 266–280. Springer-Verlag, 1994. [2] T. Armstrong, K. Marriott, P. Schachte, and H. Søndergaard. Two classes of Boolean functions for dependency analysis. Science of Computer Programming, 31(1):3–45, 1998. [3] R. Barbuti and R. Giacobazzi. A bottom-up polymorphic type inference in logic programming. Science of computer programming, 19(3):133–181, 1992. [4] M. Bruynooghe. A practical framework for the abstract interpretation of logic progams. Journal of Logic Programming, 10(2):91–124, 1991. [5] Baudouin Le Charlier and Pascal Van Hentenryck. Groundness analysis for prolog: Implementation and evaluation of the domain prop. Technical Report CS-92-49, Department of Computer Science, Brown University, October 1992. Sun, 13 Jul 1997 18:30:16 GMT. [6] M. Codish, D. Dams, and Yardeni E. Derivation and safety of an abstract unification algorithm for groundness and aliasing analysis. In Furukawa [16], pages 79–93. [7] M. Codish and B. Demoen. Analysing logic programs using “Prop”-ositional logic programs and a magic wand. In Dale Miller, editor, Logic Programming - Proceedings of the 1993 International Symposium, pages 114–129, Massachusetts Institute of Technology, Cambridge, Massachusetts 021-42, 1993. The MIT Press. [8] M. Codish and B. Demoen. Deriving polymorphic type dependencies for logic programs using multiple incarnations of prop. Lecture Notes in Computer Science, 864:281–297, 1994. [9] M. Codish and B. Demoen. Analysing logic programs using “prop”-ositional logic programs and a magic wand. Journal of Logic Programming, 25(3):249–274, December 1995. [10] A. Cortesi and G. Filé. Abstract interpretation of logic programs: an abstract domain for groundness, sharing, freeness and compoundness analysis. In Proceedings of the Symposium on Partial Evaluation and Semantics-based Program Manipulation, pages 52–61, New Haven, Connecticut, USA, 1991. [11] A. Cortesi, G. Filé, and W. Winsborough. Optimal groundness analysis using propositional logic. Journal of Logic Programming, 27(2):137–168, 1996. [12] P. Cousot and R. Cousot. Abstract interpretation: a unified framework for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the fourth annual ACM symposium on Principles of programming languages, pages 238–252. The ACM Press, 1977. [13] P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In Proceedings of the sixth annual ACM symposium on Principles of programming languages, pages 269–282. The ACM Press, 1979. [14] P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. Journal of Logic Programming, 13(1, 2, 3 and 4):103–179, 1992. [15] Philip W. Dart. On derived dependencies and connected databases. Journal of Logic Programming, 11(2):163–188, August 1991. [16] K. Furukawa, editor. Proceedings of the Eighth International Conference on Logic Programming. The MIT Press, 1991. [17] P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Evaluation of the Domain PROP. Journal of Logic Programming, 23(3):237–278, June 1995. [18] K. Horiuchi and T. Kanamori. Polymorphic type inference in Prolog by abstract interpretation. In K. Furukawa, H. Tanaka, and T. Fujisaki, editors, Proceedings of the Sixth Conference on Logic Programming, pages 195–214, Tokyo, June 1987. [19] D. Jacobs and A. Langen. Accurate and Efficient Approximation of Variable Aliasing in Logic Programs. In Ewing L. Lusk and Ross A. Overbeek, editors, Proceedings of the North American Conference on Logic Programming, pages 154– 165, Cleveland, Ohio, USA, 1989. [20] D. Jacobs and A. Langen. Static analysis of logic programs for independent and parallelism. Journal of Logic Programming, 13(1–4):291–314, 1992. [21] N.D. Jones and H. Søndergarrd. A semantics-based framework for abstract interpretation of Prolog. In S. Abramsky and C. Hankin, editors, Abstract interpretation of declarative languages, pages 123–142. Ellis Horwood Limited, 1987. [22] T. Kanamori. Abstract interpretation based on Alexander templates. Journal of Logic Programming, 15(1 & 2):31–54, January 1993. [23] T. Kanamori and T. Kawamura. Abstract interpretation based on oldt resolution. Journal of Logic Programming, 15(1 & 2):1–30, January 1993. [24] A. King. A synergistic analysis for sharing and groundness which traces linearity. Lecture Notes in Computer Science, 788:363–378, 1994. [25] B. Le Charlier and P. Van Hentenryck. Groundness analysis of Prolog: implementation and evaluation of the domain Prop. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 99–110. The ACM Press, 1993. [26] J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987. [27] L. Lu. Abstract interpretation, bug detection and bug diagnosis in normal logic programs. PhD thesis, University of Birmingham, 1994. [28] L. Lu. Type analysis of logic programs in the presence of type definitions. In Proceedings of the 1995 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based program manipulation, pages 241–252. The ACM Press, 1995. [29] L. Lu. A polymorphic type analysis in logic programs by abstract interpretation. Journal of Logic Programming, 36(1):1–54, 1998. [30] K. Marriott and H. Søndergaard. Precise and efficient groundness analysis for logic programs. ACM Letters on Programming Languages and Systems, 2(1– 4):181–196, 1993. [31] K. Marriott, H. Søndergaard, and N.D. Jones. Denotational abstract interpretation of logic programs. ACM Transactions on Programming Languages and Systems, 16(3):607–648, May 1994. [32] C. Mellish. Some global optimisations for a Prolog compiler. Journal of Logic Programming, 2(1):43–66, 1985. [33] C. Mellish. Abstract interpretation of Prolog programs. In S. Abramsky and C. Hankin, editors, Abstract interpretation of declarative languages, pages 181–198. Ellis Horwood Limited, 1987. [34] K. Muthukumar and M. Hermenegildo. Combined determination of sharing and freeness of program variables through abstract interpretation. In Furukawa [16], pages 49–63. [35] K. Muthukumar and M. Hermenegildo. Compile-time derivation of variable dependency using abstract interpretation. Journal of Logic Programming, 13(1, 2, 3 and 4):315–347, 1992. [36] U. Nilsson. Towards a framework for the abstract interpretation of loic programs. In P. Deransart, B. Lorho, and J. Maluszynski, editors, Proceedings of the International Workshop on Programming Language Implementation and Logic Programming, pages 68–82. Springer-Verlag, 1988. [37] R. A. O’Keefe. Finite fixed-point problems. In J.-L. Lassez, editor, Proceedings of the fourth International Conference on Logic programming, volume 2, pages 729– 743. The MIT Press, 1987. [38] H. Søndergaard. An application of abstract interpretation of logic programs: occur check problem. Lecture Notes in Computer Science, 213:324–338, 1986. [39] H. Søndergaard. Immediate fixpoints and their use in groundness analysis. In V. Chandru and V. Vinay, editors, Foundations of Software Technology and Theoretical Computer Science, Lecture Notes in Computer Science 1180, pages 359–370. Springer, 1996. [40] L. Sterling and E. Shapiro. The Art of Prolog. The MIT Press, 1986. [41] R. Sundararajan and J.S. Conery. An abstract interpretation scheme for groundness, freeness, and sharing analysis of logic programs. In R. Shyamasundar, editor, Proceedings of 12th Conference on Foundations of Software Technology and Theoretical Computer Science, pages 203–216. Springer-Verlag, 1992. This article was processed using the LaTEX macro package with LLNCS style
6cs.PL
Underwater Multi-Robot Convoying using Visual Tracking by Detection arXiv:1709.08292v1 [cs.RO] 25 Sep 2017 Florian Shkurti1 , Wei-Di Chang1 , Peter Henderson1 , Md Jahidul Islam2 , Juan Camilo Gamboa Higuera1 , Jimmy Li1 , Travis Manderson1 , Anqi Xu3 , Gregory Dudek1 , Junaed Sattar2 Abstract— We present a robust multi-robot convoying approach that relies on visual detection of the leading agent, thus enabling target following in unstructured 3-D environments. Our method is based on the idea of tracking-by-detection, which interleaves efficient model-based object detection with temporal filtering of image-based bounding box estimation. This approach has the important advantage of mitigating tracking drift (i.e. drifting away from the target object), which is a common symptom of model-free trackers and is detrimental to sustained convoying in practice. To illustrate our solution, we collected extensive footage of an underwater robot in ocean settings, and hand-annotated its location in each frame. Based on this dataset, we present an empirical comparison of multiple tracker variants, including the use of several convolutional neural networks, both with and without recurrent connections, as well as frequency-based model-free trackers. We also demonstrate the practicality of this tracking-by-detection strategy in real-world scenarios by successfully controlling a legged underwater robot in five degrees of freedom to follow another robot’s independent motion. I. INTRODUCTION Vision-based tracking solutions have been applied to robot convoying in a variety of contexts, including terrestrial driving [1], [2], on-rails maintenance vehicles [3], and unmanned aerial vehicles [4]. Our work demonstrates robust tracking and detection in challenging underwater settings which are employed successfully for underwater convoying in ocean experiments. This is achieved through tracking-by-detection, which combines target detection and temporally filtered image-based position estimation. Our solution is built upon several autonomous systems for enabling underwater tasks for a hexapod robot [5], [6], [7], [8], [9], as well as recent advances in real-time deep learning-based object detection frameworks [10], [11]. In the underwater realm, convoying tasks face great practical difficulties due to highly varied lighting conditions, external forces, and hard-to-model currents on the robot. While previous work in terrestrial and aerial systems used fiducial markers on the targets to aid tracking, we chose a more general tracking-by-detection approach that is trained solely on the natural appearance of the object/robot of interest. While this strategy increases the complexity of 1 Centre for Intelligent Machines and School of Computer Science, McGill University {florian,wchang,petehend,gamboa,jimmyli,travism, dudek}@cim.mcgill.ca 2 Interactive Robotics and Vision Laboratory, Department of Computer Science and Engineering, University of Minnesota- Twin Cities {islam034,junaed}@umn.edu 3 Element AI [email protected] (work conducted as a post-doctoral researcher at McGill University with funding from NSERC) Fig. 1: A sample image from our underwater convoying field trial using Aqua hexapods [5]. Videos of our field trials, datasets, code, as well as more information about the project are available at http://www.cim.mcgill.ca/˜mrl/ robot tracking the tracking task, it also offers the potential for greater robustness to changing pose variations of the target in which any attached markers may not be visible. Other works have demonstrated successful tracking methods using auxiliary devices for underwater localization, including mobile beacons [12], aerial drones [13], or acoustic sampling [14]. While these alternative strategies can potentially be deployed for multi-robot convoy tasks, they require additional costly hardware. Our system learns visual features of the desired target from multiple views, through an annotated dataset of underwater video of the Aqua family of hexapod amphibious robots [5]. This dataset is collected from both on-board cameras of a trailing robot as well as from diver-collected footage. Inspired by recent general-purpose object detection solutions, such as [10], [11], [15], we propose several efficient neural network architectures for this specific robot tracking task, and compare their performance when applied to underwater sceneries. In particular, we compare methods using convolutional neural networks (CNNs), recurrent methods stacked on top of CNN-based methods, and frequency-based methods which track the gait frequency of the swimming robot. Furthermore, we demonstrate in an open-water field trial that one of our proposed architectures, based on YOLO [16] and scaled down to run on-board the Aqua family of robots without GPU acceleration, is both efficient and does not sacrifice performance and robustness in the underwater robot-tracking domain despite motion blur, lighting variations and scale changes. II. RELATED WORK A. Vision-Based Convoying Several vision-based approaches have shown promise for convoying in constrained settings. Some methods employ shared feature tracking to estimate all of the agents’ positions along the relative trajectory of the convoy, with map-sharing between the agents. Avanzini et al. demonstrate this with a SLAM-based approach [17]. However, these shared-feature methods require communication between the agents which is difficult without specialized equipment in underwater robots. Using both visual feedback combined with explicit behavior cues to facilitate terrestrial robot convoys has also been considered [18]. Tracking was enhanced by both suitable engineered surface markings combined with action sequences that cue upcoming behaviors. Unlike the present work, that work was restricted to simple 2D motion and hand-crafted visual markings and tracking systems. Other related works in vision-based convoying often employ template-based methods with fiducial markers placed on the leading agent [1], [2]. Such methods match the template to the image to calculate the estimated pose of the leading robot. While these methods could be used in our setting, we wish to avoid hand-crafted features or any external fiducial markers due to the possibility that these markers turn out of view of the tracking agent. An example of a convoying method using visual features of the leading agent without templates or fiducial markers is [19], which uses color-tracking mixed with SIFT features to detect a leading vehicle in a convoy. While we could attempt to employ such a method in an underwater scenario, colorbased methods may not work as well due to the variations in lighting and color provided by underwater optics. B. Tracking Methods The extensive literature on visual tracking can be separated into model-based and model-free methods, each with their own set of advantages and drawbacks. In model-free tracking the algorithm has no prior information on the instance or class of objects it needs to track. Algorithms in this category, such as [20], are typically initialized with a bounding box of an arbitrary target, and they adapt to viewpoint changes through semi-supervised learning. The TLD tracker [21], for example, trains a detector online using positive and negative feedback obtained from image-based feature tracks. In general, tracking systems in this category suffer from tracking drift, which is the accumulation of error over time either from false positive identification of unseen views of the target, or errors due to articulated motion, resulting in small accumulating errors leading to a drift away from the target object. In model-based tracking, the algorithm is either trained on or has access to prior information on the appearance of the target. This can take the form of a detailed CAD model, such as in [22], which uses a 3D model describing the geometry of a car in order to improve tracking of the vehicle in image space. Typically, line and corner features are used in order to register the CAD model with the image. In our work we opted to avoid these methods because of their susceptibility to errors in terms of occlusion and non-rigid motion. Works such as [23], [24] use convolutional neural networks and rely on supervised learning to learn a generic set of target representations. Our work herein is more closely related to this body of work, however, we are interested in a single target with known appearance. III. DATASET COLLECTION We collected a dataset1 of video recordings of the Aqua family of hexapods during field trials at McGill University’s Bellairs Research Institute in Barbados. This dataset includes approximately 5200 third-person view images extracted from video footage of the robots swimming in various underwater environments recorded from the diver’s point of view and nearly 10000 first-person point of view frames extracted from the tracking robot’s front-facing camera. We use the third-person video footage for training and validation, and the first-person video footage as a test set. This separation also highlights the way we envision our system to become widely applicable: the training data can be recorded with a handheld unit without necessitating footage from the robot’s camera. In the third-person video dataset the robot is usually maintained at the center of the image by the diver, which is not ideal for constructing a representative training set for neural networks, so we have augmented the dataset with synthetic images where the foreground image of the robot is overlaid on robot-free underwater backgrounds at different scales and translations over the image. This synthetic dataset contains about 48000 synthetic images, and is only used in the training of the VGG methods (as YOLO/Darknet performs its own data augmentation during training by default). In other words, we do not generate synthetic movie datasets for any of the recurrent methods that we examine here. IV. DETECTION METHODS A. Non-Recurrent Methods 1) VGG: The VGG architecture [25] classification performance has been shown to generalize well to several visual benchmark datasets in localization and classification tasks, so we use it as a starting point for tracking a single object. In particular we started from the VGG16 architecture, which consists of 16 layers, the first 13 of which are convolutional or max-pooling layers, while the rest are fully connected layers2 , the output of which is the classification or localization prediction of the network. In our case, we want to output the vector z = (x, y, w, h, p), where (x, y) are the coordinates of the top left corner and (w, h) is the width and height of the predicted 1 The dataset, along with its ground truth annotations, can be found at http://www.cim.mcgill.ca/˜mrl/robot tracking 2 Specifically, two fully connected layers of width 4096, followed by one fully connected layer of width 1000, denoted FC-4096 and FC-1000 respectively. bounding box. We normalize these coordinates to lie in [0, 1]. p is interpreted as the probability that the robot is present in the image. The error function that we want to minimize combines both the classification error, expressed as binary cross-entropy, and the regression error for localization, which in our case is the mean absolute error for true positives. More formally, the loss function that we used, shown here for a single data point, is: Ln = 1p̄=1 3 X |zi − z̄i | − (p̄log(p) + (1 − p̄)log(1 − p)) i=0 where symbols with bars denote ground truth annotations. We evaluated the following variants of this architecture on our dataset: • • • • • VGG16a: the first 13 convolutional layers from VGG16, followed by two FC-128 ReLU, and a FC-5 sigmoid layer. We use batch normalization in this variant. The weights of all convolutional layers are kept fixed from pre-training. VGG16b: the first 13 convolutional layers from VGG16, followed by two FC-128 Parametric ReLU, and a FC-5 sigmoid layer. We use Euclidean weight regularization for the fully connected layers. The weights of all convolutional layers are kept fixed, except the top one. VGG16c: the first 13 convolutional layers from VGG16, followed by two FC-228 ReLU, and a FC-5 sigmoid layer. The weights of all convolutional layers are fixed, except the top two. VGG15: the first 12 convolutional layers from VGG16, followed by two FC-128 ReLU, and a FC-5 sigmoid layer. We use batch normalization, as well as Euclidean weight regularization for the fully connected layers. The weights of all convolutional layers are kept fixed. VGG8: the first 8 convolutional layers from VGG16, followed by two FC-128 ReLU, and a FC-5 sigmoid layer. We use batch normalization in this variant, too. The weights of all convolutional layers are kept fixed. In all of our variants, we pre-train the network on the ImageNet dataset as in [25] to drastically reduce training time and scale our dataset images to (224, 224, 3) to match the ImageNet scaling. 2) YOLO: The YOLO detection system [16] frames detection as a regression problem, using a single network optimized end-to-end to predict bounding box coordinates and object classes along with a confidence estimate. It enables faster predictions than most detection systems that are based on sliding window or region proposal approaches, while maintaining a relatively high level of accuracy. We started with the TinyYOLOv2 architecture [10], but we found that inference was on our robot’s embedded platform (without GPU acceleration) was not efficient enough for fast, closed-loop, vision-based, onboard control. Inspired by lightweight architectures such as [15], we condensed the TinyYOLOv2 architecture as shown in Table I. This enabled inference on embedded robot platforms at reasonable frame rates (13 fps). Following Ning 3 and [15] we: • replace some of the 3 × 3 filters with 1 × 1 filters, and • decrease the depth of the input volume to 3 × 3 filters. 3 ’YOLO CPU Running Time Reduction: Basic Knowledge and Strategies’ at https://goo.gl/xaUWjL Our ReducedYOLO architecture is described in Table II. This architecture keeps the same input resolution and approximately the same number of layers in the network, yet drastically decreases the number of filters for each layer. Since we started with a network which was designed for detection tasks of up to 9000 classes in the case of TinyYOLOv2 [10], we hypothesize that the reduced capacity of the network would not significantly hurt the tracking performance for a single object class. This is supported by our experimental results. Additionally, we use structures of two 1 × 1 filters followed by a single 3 × 3 filter, similar to Squeeze layers in SqueezeNet [15], to compress the inputs to 3 × 3 filters. Similarly to VGG [25] and the original YOLO architecture [16], we double the number of filters after every pooling step. As in the original TinyYOLOv2 configuration, both models employ batch normalization and leaky rectified linear unit activation functions on all convolutional layers. Type Input Convolutional Maxpool Convolutional Maxpool Convolutional Maxpool Convolutional Maxpool Convolutional Maxpool Convolutional Maxpool Convolutional Convolutional Convolutional Detection Filters 16 32 64 128 256 512 1024 1024 30 Size/Stride Output 3 × 3/1 2 × 2/2 3 × 3/1 2 × 2/2 3 × 3/1 2 × 2/2 3 × 3/1 2 × 2/2 3 × 3/1 2 × 2/2 3 × 3/1 2 × 2/1 3 × 3/1 3 × 3/1 1 × 1/1 416 × 416 416 × 416 208 × 208 208 × 208 104 × 104 104 × 104 52 × 52 52 × 52 26 × 26 26 × 26 13 × 13 13 × 13 13 × 13 13 × 13 13 × 13 13 × 13 TABLE I: TinyYOLOv2 architecture Type Input Convolutional Maxpool Convolutional Convolutional Convolutional Maxpool Convolutional Convolutional Convolutional Maxpool Convolutional Maxpool Convolutional Convolutional Detection Filters 16 4 4 8 8 8 16 32 64 30 Size/Stride Output 7 × 7/2 4 × 4/4 1 × 1/1 1 × 1/1 3 × 3/1 2 × 2/2 1 × 1/1 1 × 1/1 3 × 3/1 2 × 2/2 3 × 3/1 2 × 2/2 3 × 3/1 1 × 1/1 416 × 416 208 × 208 52 × 52 52 × 52 52 × 52 52 × 52 26 × 26 26 × 26 26 × 26 26 × 26 13 × 13 13 × 13 6×6 6×6 6×6 TABLE II: Our ReducedYOLO architecture B. Recurrent Methods In vision-based convoying, the system may lose sight of the object momentarily due to occlusion or lighting changes, and thus lose track of its leading agent. In an attempt to address this problem, we use recurrent layers stacked on top of our ReducedYOLO architecture, similarly to [26]. In their work, Ning et al. use the last layer of features output by the YOLO network for n frames (concatenated with the YOLO bounding box prediction which has the highest IOU with the ground truth) and feed them to single forward Long-Term Short-Term Memory Network (LSTM). While Ning et al. assume that objects of interest are always in the image (as they test on the OTB-100 tracking dataset), we instead assume that the object may not be in frame. Thus, we make several architectural modifications to improve on their work and make it suitable for our purposes. First, Ning et al. use a simple mean squared error (MSE) loss between the output bounding box coordinates and the ground truth in addition to a penalty which minimizes the MSE between the feature vector output by the recurrent layers and the feature vector output of the YOLO layers. We find that in a scenario where there can be images with no bounding box predicted (as is the case in our system), this makes for an extremely unstable objective function. Therefore we instead use a modified YOLO objective for our single-bounding box single class case. This results in Recurrent ReducedYOLO (RROLO) having the following objective function, shown here for a single data point: √ √ √ √ I(( x̄ − x)2 + ( ȳ − y)2 )αcoord p √ √ √ + I(( w̄ − w)2 + ( h̄ − h)2 )αcoord Fig. 2: Overview of our Recurrent ReducedYOLO (RROLO) architecture. The original ROLO work [26] did not use bidirectional, dense layers, or multiple LSTM cells in their experiments. partially on code provided by [26], is made publicly accessible.4 C. Methods Based on Frequency-Domain Detection + I(IOU − p)2 αobj + (1 − I)(IOU − p)2 αno obj shown to perform better on longer sequences of data [27]. A general diagram of our LSTM architecture can be seen in Figure 2. Our recurrent detection implementation, based (1) where αcoord , αobj , αno obj are tunable hyper-parameters (left at 5, 1, 0.5 respectively based on the original YOLO objective), w̄, h̄, w, h are the width, height, predicted width and predicted height, respectively, I ∈ {0, 1} indicates whether the object exists in the image according to ground truth, p is the confidence value of the prediction and IOU is the Intersection Over Union of the predicted bounding box with the ground truth. Furthermore, to select which bounding box prediction of YOLO to use as input to our LSTM (in addition to features), we use the highest confidence bounding box rather than the one which overlaps the most with the ground truth. We find that the latter case is not a fair comparison or even possible for real-world use and thus eliminate this assumption. In order to drive the final output to a normalized space (ranging from 0 to 1), we add fully connected layers with sigmoidal activation functions on top of the final LSTM output, similarly to YOLOv2 [10]. Redmon and Farhadi posit that this helps stabilize the training due to the normalization of the gradients at this layer. We choose three fully connected layers with |YOLOoutput |, 256, 32 hidden units (respectively) and a final output of size 5. We also apply dropout on the final dense layers at training time with a probability of .6 that the weight is kept. We also include multi-layer LSTMs to our experimental evaluation as well as bidirectional LSTMs which have been Periodic motions have distinct frequency-domain signatures that can be used as reliable and robust features for visual detection and tracking. Such features have been used effectively [28], [29] by underwater robots to track scuba divers. Flippers of a human diver typically oscillate at frequencies between 1 and 2 Hz, which produces periodic intensity variations in the image-space over time. These variations correspond to distinct signatures in the frequencydomain (high-amplitude spectra at 1-2Hz), which can be used for reliable detection. While for convoying purposes, the lead robot’s flippers may not have such smoothly periodic oscillations, the frequency of the flippers is a configurable parameter which would be known beforehand. Image sequence time Spatio-temporal volume Amplitude-spectra on 1-3Hz > threshold Intensity vectors along all-possible motion directions DTFT module HMM-based search-space pruning Intensity vector along P motion directions Detection Fig. 3: Outline of mixed-domain periodic motion (MDPM) tracker [29] We implement the mixed-domain motion (MDPM) tracker described by Islam et al [29]. An improved version of Sattar et al [28], the MDPM works as follows (illustrated in Figure 3) : 4 https://github.com/Breakend/TemporalYolo • • • First, intensity values are captured along arbitrary motion directions; motion directions are modeled as sequences of non-overlapping image sub-windows over time. By exploiting the captured intensity values, a Hidden Markov Model (HMM)-based pruning method discards motion directions that are unlikely to be directions where the robot is swimming. A Discrete Time Fourier Transform (DTFT) converts the intensity values along P most potential motion directions to frequency-domain amplitude values. High amplitude spectra on 1-3Hz is an indicator of robot motion, which is subsequently used to locate the robot in the image space. V. VISUAL SERVOING CONTROLLER The Aqua family of underwater robots allows 5 degreesof-freedom5 control, which enables agile and fast motion in 3D. This characteristic makes vehicles of this family ideal for use in tracking applications that involve following other robots as well as divers [28]. One desired attribute of controllers in this type of setting is that the robot moves smoothly enough to avoid motion blur, which would degrade the quality of visual feedback. To this end we have opted for an image-based visual servoing controller that avoids explicitly estimating the 3D position of the target robot in the follower’s camera coordinates, as this estimate typically suffers from high variance along the optical axis. This is of particular relevance in the underwater domain because performing camera calibration underwater is a time-consuming and error-prone operation. Conversely, our tracking-by-detection method and visual servoing controller do not require camera calibration. Our controller regulates error on the x-axis, δx, is converted to a yaw rate through a PID controller. Similarly, the translation error on the yaxis, δy, is scaled to a desired depth change in 3D space. When the area of the observed bounding box is bigger than desired, the robot’s forward velocity is set to zero. We do not do a backup maneuver in this case, even though the robot supports it, because rotating the legs 180o is not an instantaneous motion. The difference in area of the observed versus the desired bounding box, namely δA, is scaled to a forward speed. Our controller sends commands at a rate of 10Hz and assumes that a bounding box is detected at least every 2 seconds, otherwise it stops the robot. VI. EXPERIMENTAL RESULTS We evaluate each of the implemented methods on the common test dataset described in section III using the metrics described below, with nimages the total number of test images, nT P the number of true positives, nT N the number of true negatives, nF N the number of false negatives and nF P the number of false positives: nT P +nT N • Accuracy : n images nT P TP • Precision : n and recall: nT Pn+n T P +nF P FN • Average Intersection Over Union (IOU) : Computed from the predicted and ground-truth bounding boxes over all true positive detections (between 0 and 1, with 1 being perfect alignment) • Localization failure rate (LFR): Percentage of true positive detections having IOU under 0.5 [31] • Frames per second (FPS) : Number of images processed/second Each of the implemented methods outputs its confidence that the target is visible in the image. We chose this threshold for each method by generating a precision-recall curve and choosing the confidence bound which provides the best recall tradeoff for more than 95% precision. Algorithm Fig. 4: Errors used by the robot’s feedback controller. δx is used for yaw control, δy for depth control, and the error in bounding box area, δA is used for forward speed control. the motion of the vehicle to bring the observed bounding boxes of the target robot on the center of the follower’s image, and also to occupy a desired fraction of the total area of the image. It uses a set of three error sources, as shown in Fig. 4, namely the 2D translation error from the image center, and the difference between the desired and the observed bounding box area. The desired roll rate and vertical speed are set to zero and are handled by the robot’s 3D autopilot [30]. The translation 5 Yaw, pitch, and roll rate, as well as forward and vertical speed ACC IOU P R FPS LFR VGG16a 0.80 0.47 0.78 0.79 1.68 47% VGG16b 0.82 0.39 0.85 0.73 1.68 61% VGG16c 0.80 0.35 0.88 0.64 1.68 70% VGG15 0.71 0.38 0.65 0.75 1.83 62% VGG8 0.61 0.35 0.55 0.69 2.58 65% TinyYOLOv2 ReducedYOLO RROLO (n=3,z=1) RROLO (n=3,z=2) RROLO (n=6,z=1) RROLO (n=6,z=2) RROLO (n=9,z=1) RROLO (n=9,z=2) MDPM Tracker TLD Tracker 0.86 0.85 0.68 0.84 0.81 0.83 0.81 0.80 0.25 0.57 0.54 0.50 0.53 0.54 0.53 0.54 0.53 0.50 0.16 0.12 0.96 0.95 0.95 0.96 0.95 0.96 0.95 0.96 0.94 1.00 0.88 0.86 0.64 0.83 0.80 0.82 0.80 0.79 0.26 0.47 0.91 13.3 12.69 12.1 12.1 12.03 11.53 11.36 142 66.04 34% 40% 15% 9% 11% 11% 9% 14% 19.3% 97% TABLE III: Comparison of all tracking methods. Precision and recall values based on an optimal confidence threshold. We present the evaluation results in Table III for each of the algorithms that we considered. The FPS metric was measured across five runs on a CPU-only machine with a 2.7GHz Intel i7 processor. As we can see in Table III, the original TinyYOLOv2 model is the best performing method in terms of IOU, precision, and failure rate. However our results show that the ReducedYOLO model achieves a 14x speedup over TinyYOLOv2, without significantly sacrificing accuracy. This is a noteworthy observation since ReducedYOLO uses 3.5 times fewer parameters compared to TinyYOLOv2. This speedup is crucial for making the system usable on mobile robotic platforms which often lack Graphical Processing Units, and are equipped with lowpower processing units. Additionally, note that the precision metric has not suffered while reducing the model, which implies that the model rarely commits false positive errors, an important quality in convoying where a single misdetection could deviate the vehicle off course. In addition, we found that none of the VGG variants fared as well as the YOLO variants, neither in terms of accuracy nor in terms of efficiency. The localization failure rate of the VGG variants was reduced with the use of batch normalization. Increasing the width of the fully connected layers and imposing regularization penalties on their weights and biases did not lead to an improvement over VGG16a. Reducing the total number of convolutional layers, resulting in the VGG8 model lead to a drastic decrease in both classification and localization performance, which suggests that even when trying to detect a single object, network depth is necessary for VGG-type architectures. Finally, the TLD tracker [21] performed significantly worse than any of the detection-based methods, mainly due to tracking drift. It is worth noting that we did not reinitialize TLD after the leading robot exited the field of view of the following robot, and TLD could not always recover. This illustrates why model-free trackers are in general less suitable for convoying tasks than model-based trackers. confidence value of our recurrent methods is much greater than any of the other methods, which translates to a more interpretable model with respect to the confidence threshold parameter while also reducing the tracking failure rate. For our best configurations of VGG, YOLO, ReducedYOLO, and RROLO, we take the Pearson correlation r-value and the mean absolute difference between the ground truth IOU and the predicted confidence6 . We find that RROLO overall is the most correlated and has the least absolute difference between the predicted confidence and ground truth IOU. Variations in layers and timesteps do not present a significant difference in performance, while yielding a significant reduction in failure rate even with short frame sequences (n = 3, z = 2). Furthermore, the frame rate impact is negligible with a single layer LSTM and short time frames, so we posit that it is only beneficial to use a recurrent layer on top of ReducedYOLO. While the best length of the frame sequence to examine may vary based on characteristics of the dataset, in our case n = 3, z = 2 provides the best balance of speed, accuracy, IOU, precision and recall, since this model boosts all of the evaluation metrics while retaining IOU with the ground truth and keeping a relatively high FPS value. Increasing the number of LSTM layers can boost accuracy and recall further, without impacting IOU or precision significantly, at the expense of higher runtime and higher risk of overfitting. We attempted re-balancing and re-weighting the objective in our experiments and found that the presented settings worked best. We suspect that no increase in IOU, precision and recall was observed as there may not be enough information in the fixed last layers of the YOLO output to improve prediction. Future work to improve the recurrent system would target end-to-end experiments on both the convolutional and recurrent layers, along with experiments investigating different objective functions to boost the IOU while making the confidence even more correlated to IOU. B. Recurrent Methods C. Method Based on Frequency-Domain Detection All the recurrent methods were trained using features obtained from the ReducedYOLO model, precomputed on our training set. We limit our analysis to the recurrent model using the ReducedYOLO model’s features, which we’ll refer to as Recurrent ReducedYOLO (RROLO), since this model can run closest to real time on our embedded robot system. Our results on the test set are shown in Table III. For these methods, z denotes the number of LSTM layers, n is the number of frames in a given sequence. Note that the runtime presented here for RROLO methods includes the ReducedYOLO inference time. Finally, while bidirectional recurrent architectures were implemented and tested as well, we exclude results from those models in the table as we found that in our case these architectures resulted in worse performance overall across all experiments. As can be seen in Table III, we find that the failure rate and predicted confidence can be tuned and improved significantly without impacting precision, recall, accuracy, or IOU. More importantly, we find that the correlation between bounding box IOU (with the ground truth) and the predicted In our implementation of MDPM tracker, non-overlapping sub-windows of size 30×30 pixels over 10 sequential frames are considered to infer periodic motion of the robot. Peaks in the amplitude spectrum in the range 1-3Hz constitute an indicator of the robot’s direction of motion. We found that the frequency responses generated by the robot’s flippers are not strong and regular. This is due to lack of regularity and periodicity in the robot’s flipping pattern (compared to that of human divers), but also due to the small size of the flippers compared to the image size. Consequently, as Table III suggests, MDPM tracker exhibits poor performance in terms of accuracy, recall, and IOU. The presence of high amplitude spectra at 1-3Hz indicates the robot’s motion direction with high precision. However, these responses are not regular enough and therefore the algorithm fails to detect the robot’s presence in a significant number of detection cycles. We A. Non-Recurrent Methods 6 Pearson correlation r-value: VGG (.70), YOLO (.48), ReducedYOLO (.56), RROLO (.88). Mean absolute difference between confidence predicted and IOU with ground truth: VGG (.37), YOLO (.17), ReducedYOLO (.18), RROLO (.08). D. Field Trial 1) Setup: To demonstrate the practicality of our visionbased tracking system, we conducted a set of in-ocean robot convoying field runs by deploying two Aqua robots at 5 meters depth from the sea surface. The appearance of the leading robot was altered compared to images in our training dataset, due to the presence of an additional sensor pack on its top plate. This modification allowed us to verify the general robustness of our tracking-by-detection solution, and specifically to evaluate the possibility of overfitting to our training environments. 2500 True positives + false negatives False negatives Number 2000 1500 1000 500 0 0.0 0.1 0.2 0.3 0.4 0.5 Normalized area of annotated bounding box Fig. 5: Histogram of true positive and false negative detections as a function of the area of annotated bounding boxes, as obtained from in-ocean robot tracking runs. We programmed the target robot to continuously execute a range of scripted trajectories, including maneuvers such as in-place turning, changing depth, and swimming forward at constant speed. We deployed the ReducedYOLO model on the follower robot, which operated at 7 Hz onboard an Intel NUC i3 processor without GPU acceleration or external data tethering. Moreover, the swimming speeds of both robots were set to be identical in each run (0.5−0.7 m/s), and they were initialized at approximately two meters away from one another, but due to currents and other factors the distance between them (and the scale of observed bounding boxes) changed throughout the experiment runs. 2) Results: We configured the follower robot to try to track the leading robot at a fixed nominal distance. This was achieved by setting the desired bounding box area to be 50% of the total image area, as seen in Fig. 4. The ReducedYOLO detector consistently over-estimated the small size of the target. Nevertheless, Fig. 6 indicates that the bias error in bounding box centers between detected versus ground truth was consistently low in each frame, regardless of the target size, on average within 10% of the image’s width to each other. This is notable due to frequent occurrences where the robot’s size occupied less than 50% of the total area of the image. Normalized biases of bounding box centers can see however that the failure rate for this method is one of the lowest among the studied methods, indicating very precise bounding boxes when detections do occur. Additionally, this method does not need training and is the fastest (and least computationally expensive) method, by a significant margin. Therefore given more consistent periodic gait patterns it would perform quite well, as previously demonstrated in [29]. 0.25 0.20 0.15 0.10 0.05 0.00 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Normalized area of annotated bounding box Fig. 6: Histogram of average biases between detected vs. annotated bounding box centers, as obtained from in-ocean robot tracking runs. Bars indicate 1σ error. We also evaluated the performance of our system in terms of the average “track length”, defined as the length of a sequence of true positive detections with a maximum of 3 seconds of interruption. Across all field trial runs, the follower achieved 27 total tracks, with an average duration of 18.2 sec (σ = 21.9 sec) and a maximum duration of 85 sec. As shown in Fig. 7, the vast majority of tracking interruptions were short, specifically less than a second, which did not affect the tracking performance, as the leading robot was re-detected. The majority of these tracking interruptions were due to the fact that the annotated bounding box area of the leading robot was less than 20% of the total area of the follower’s image. Sustained visual detection of the target, despite significant visual noise and external forces in unconstrained natural environments, and without the use of engineered markers, reflects successful and robust tracking performance in the field. VII. CONCLUSIONS We presented a general tracking-by-detection approach that relies on visual sensing of the appearance of nonengineered targets, and also capitalizes on recent advances in deep learning for deployment onboard robots with limited computing capabilities. We demonstrated the utility of several lightweight neural network architecture for appearancebased visual convoying, and we showed improvements made possible by recurrent extensions. We successfully performed multi-robot convoying in the open sea in practice, using supervised learning based on limited training data annotated beforehand. Furthermore, we carried out an extensive comparison of various tracker variants with respect to a multitude of desirable attributes for visual convoying tasks. In the future, we seek to improve on temporal-based bounding box detection by making the entire architecture True negatives + false negatives False negatives 100 Number 80 60 40 20 0 0 10 20 30 40 50 Duration of tracking interruptions (in sec) Fig. 7: Histogram of true negative and false negative classifications in terms of their duration for our ReducedYOLO model, as obtained from in-ocean robot tracking runs. trainable end-to-end. We also aim to extend this work to visual servoing with multiple bounding boxes per frame. We are working towards robust target tracking, despite interruptions in visual contact by using stronger predictive models. ACKNOWLEDGMENT This work was funded by the NSERC Canadian Field Robotics Network (NCFRN). R EFERENCES [1] H. Schneiderman, M. Nashman, A. J. Wavering, and R. Lumia, “Vision-based robotic convoy driving,” Machine Vision and Applications, vol. 8, no. 6, pp. 359–364, 1995. [2] C. Fries and H.-J. Wuensche, “Monocular template-based vehicle tracking for autonomous convoy driving,” in Intelligent Robots and Systems. IEEE, 2014, pp. 2727–2732. [3] F. Maire, “Vision based anti-collision system for rail track maintenance vehicles,” in IEEE Conference on Advanced Video and Signal Based Surveillance, 2007, pp. 170–175. [4] J. J. Lugo, A. Masselli, and A. Zell, “Following a quadrotor with another quadrotor using onboard vision,” in IEEE European Conference on Mobile Robots (ECMR), 2013, pp. 26–31. [5] J. Sattar, G. Dudek, O. Chiu, I. Rekleitis, P. Giguere, A. Mills, N. Plamondon, C. Prahacs, Y. Girdhar, M. Nahon et al., “Enabling autonomous capabilities in underwater robotics,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, 2008, pp. 3628– 3634. [6] J. Sattar and G. Dudek, “Robust servo-control for underwater robots using banks of visual filters,” in IEEE International Conference on Robotics and Automation, 2009, pp. 3583–3588. [7] ——, A Boosting Approach to Visual Servo-Control of an Underwater Robot. Springer Berlin Heidelberg, 2009, pp. 417–428. [8] Y. Girdhar and G. Dudek, “Exploring underwater environments with curiosity,” in Computer and Robot Vision (CRV), 2014 Canadian Conference on. IEEE, 2014, pp. 104–110. [9] D. Meger, J. C. G. Higuera, A. Xu, P. Giguere, and G. Dudek, “Learning legged swimming gaits from experience,” in Robotics and Automation (ICRA), 2015 IEEE International Conference on. IEEE, 2015, pp. 2332–2338. [10] J. Redmon and A. Farhadi, “YOLO9000: Better, Faster, Stronger,” arXiv preprint arXiv:1612.08242, 2016. [11] S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards realtime object detection with region proposal networks,” in Advances in Neural Information Processing Systems (NIPS), 2015. [12] V. Chandrasekhar, W. K. Seah, Y. S. Choo, and H. V. Ee, “Localization in underwater sensor networks: survey and challenges,” in 1st ACM international workshop on Underwater networks, 2006, pp. 33–40. [13] M. Erol, L. F. M. Vieira, and M. Gerla, “AUV-aided localization for underwater sensor networks,” in IEEE International Conference on Wireless Algorithms, Systems and Applications, 2007, pp. 44–54. [14] P. Corke, C. Detweiler, M. Dunbabin, M. Hamilton, D. Rus, and I. Vasilescu, “Experiments with underwater robot localization and tracking,” in IEEE International Conference on Robotics and Automation, 2007, pp. 4556–4561. [15] F. N. Iandola, M. W. Moskewicz, K. Ashraf, S. Han, W. J. Dally, and K. Keutzer, “SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <1MB model size,” CoRR, vol. abs/1602.07360, 2016. [16] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once: Unified, real-time object detection,” in IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 779–788. [17] P. Avanzini, E. Royer, B. Thuilot, and J. P. Derutin, “Using monocular visual SLAM to manually convoy a fleet of automatic urban vehicles,” in IEEE International Conference on Robotics and Automation, May 2013, pp. 3219–3224. [18] G. Dudek, M. Jenkin, E. Milios, and D. Wilkes, “Experiments in sensing and communication for robot convoy navigation,” in IEEE International Conference on Intelligent Robots and Systems (IROS), vol. 2, August 1995, pp. 268–273. [19] J. L. Giesbrecht, H. K. Goi, T. D. Barfoot, and B. A. Francis, “A vision-based robotic follower vehicle,” in SPIE Defense, Security, and Sensing. International Society for Optics and Photonics, 2009, p. 73321O. [20] Q. Yu, T. B. Dinh, and G. Medioni, “Online tracking and reacquisition using co-trained generative and discriminative trackers,” in 10th European Conference on Computer Vision: Part II, 2008, pp. 678–691. [21] Z. Kalal, K. Mikolajczyk, and J. Matas, “Tracking-learning-detection,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, no. 7, pp. 1409–1422, July 2012. [22] M. Manz, T. Luettel, F. von Hundelshausen, and H. J. Wuensche, “Monocular model-based 3D vehicle tracking for autonomous vehicles in unstructured environment,” in IEEE International Conference on Robotics and Automation, May 2011, pp. 2465–2471. [23] D. S. Bolme, J. R. Beveridge, B. A. Draper, and Y. M. Lui, “Visual object tracking using adaptive correlation filters,” in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2010, pp. 2544–2550. [24] H. Nam and B. Han, “Learning multi-domain convolutional neural networks for visual tracking,” in The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. [25] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” CoRR, vol. abs/1409.1556, 2014. [26] G. Ning, Z. Zhang, C. Huang, Z. He, X. Ren, and H. Wang, “Spatially supervised recurrent convolutional neural networks for visual object tracking,” arXiv:1607.05781, 2016. [27] A. Graves, “Supervised sequence labelling,” in Supervised Sequence Labelling with Recurrent Neural Networks. Springer, 2012, pp. 5–13. [28] J. Sattar and G. Dudek, “Underwater human-robot interaction via biological motion identification.” in Robotics: Science and Systems, 2009. [29] M. J. Islam and J. Sattar, “Mixed-domain biological motion tracking for underwater human-robot interaction,” in IEEE International Conference on Robotics and Automation, 2017. [30] D. Meger, F. Shkurti, D. C. Poza, P. Giguère, and G. Dudek, “3d trajectory synthesis and control for a legged swimming robot,” in IEEE International Conference on Robotics and Intelligent Systems, 2014. [31] L. Cehovin, A. Leonardis, and M. Kristan, “Visual object tracking performance measures revisited,” CoRR, vol. abs/1502.05803, 2015.
2cs.AI
1 Reliability of Multicast under Random Linear Network Coding arXiv:1709.05477v3 [cs.IT] 31 Jan 2018 Evgeny Tsimbalo, Andrea Tassi and Robert J. Piechocki Abstract—We consider a lossy multicast network in which the reliability is provided by means of Random Linear Network Coding. Our goal is to characterise the performance of such network in terms of the probability that a source message is delivered to all destination nodes. Previous studies considered coding over large finite fields, small numbers of destination nodes or specific, often impractical, channel conditions. In contrast, we focus on a general problem, considering arbitrary field size and number of destination nodes, as well as a realistic channel. We propose a lower bound on the probability of successful delivery, which is more accurate than the approximation commonly used in the literature. In addition, we present a novel performance analysis of the systematic version of RLNC. The accuracy of the proposed performance framework is verified via extensive Monte Carlo simulations, where the impact of the network and code parameters are investigated. Specifically, we show that the mean square error of the bound for a ten-user network can be as low as 9 · 10−5 for non-systematic RLNC. Index Terms—Multicast Networks, Broadcast Networks, Reliability, Fountain Coding, Non-systematic RLNC, Systematic RLNC. I. I NTRODUCTION Reliability is a key performance metric in modern wireless multicast networks, in which a single transmitter, or a source node, broadcasts to multiple receivers, or destination nodes, also referred to as users. Traditionally, the reliability in multicast networks is provided by Application Level Forward Error Correction (AL-FEC) [1], where coding is performed over packets rather than bits. AL-FEC is typically based on a digital fountain approach [2] implemented, for instance, in Raptor codes [3]. These codes, however, operate efficiently only when the number of packets per block is large, which makes them prohibitive in applications where the block size is limited - for instance, due to delay constraints [4]. As an alternative to traditional fountain codes, the idea of combining packets using random linear coefficients [5], also known as Random Linear Network Coding (RLNC) [6], has attracted significant research interest. RLNC is based on the original concept of network coding proposed by R. Ahlswede et al. [7] and is proved to be capacity-achieving for lossy multicast networks [8], [9]. In contrast with traditional fountain codes, schemes based on RLNC do not require a large block size [4]. This work is partially supported by the VENTURER Project, which is supported by Innovate UK under Grant Number 102202. E. Tsimbalo is with The Telecommunications Research Laboratory of Toshiba Research Europe Ltd., Bristol, BS1 4ND, UK (email: [email protected]). A. Tassi and R. J. Piechocki are with the Department of Electrical and Electronic Engineering, University of Bristol, Bristol, BS8 1UB, UK (email: {A.Tassi, R.J.Piechocki}@bristol.ac.uk). In a multicast network operated under RLNC, the source node encodes an information message of K packets by combining the packets using random coefficients belonging to a finite field [10]. An encoded packet is therefore associated with a vector of coding coefficients. Each user needs to collect K linearly independent vectors of coding coefficients to be able to decode the source message, typically by means of Gaussian elimination. A key performance indicator of such network can be the probability that all users collect K linearly independent vectors of coding coefficients, which will be referred to as probability of successful delivery. As an alternative to traditional, non-systematic encoding, a systematic version of RLNC, in which the information message is transmitted first, was also proposed [11]–[13]. As shown in [14], systematic RLNC can reduce decoding delay and complexity. The traditional approach to the performance analysis of RLNC and multicast networks is to assume an infinite, or sufficiently large, field size [6], [15], [16], so that any K vectors of coding coefficients are linearly independent with a high probability. Under this assumption, the multicast network can be viewed as a set of independent unicast connections. While the assumption significantly simplifies the analysis, the field size is limited in practice [17], [18]. As a consequence of that, the probability that the vectors of coding coefficients collected by a user are linearly dependent can be non-negligible, even if their number is larger than K. In addition, some vectors of coding coefficients can be received simultaneously by multiple users, giving rise to statistical correlation. As a result, with a finite field size, the multicast network cannot be approximated as a set of independent unicast connections, and the probability of successful delivery needs to be calculated jointly. The analysis of multicast networks and codes with coefficients generated from a small field size has been also studied in the literature. The initial studies [19], [20] were based on Markov chain models, but due to complexity the number of users was limited to two. Another study [12] applied a Markov chain model to a network with an arbitrary number of users, assuming that the users receive disjoint sets of packets. In [21], an exact probability of successful delivery, valid for any field size, was derived for the simple case of a unicast, point-topoint connection. The result was extended to the systematic version of RLNC in [22]. Following that, in [23], [24], a two-user multicast network was considered in the context of security and relay communication, respectively. Assuming a sufficiently high packet erasure rate (PER), so that the users are likely to receive disjoint sets of packets, the probability of successful delivery was approximated as a product of those corresponding to each individual user. In contrast, an exact 2 expression for the probability of successful delivery for the same network, valid for any field size and PER, was obtained in [25] for non-systematic RLNC, based on the rank analysis of structured random matrices [26]. To summarise, the previous studies on the performance of RLNC and multicast networks considered large finite fields, a limited number of users or specific (often impractical) channel conditions. In the cases when the exact formulation formulation was obtained, the analysis was limited to two users. Moreover, the existing studies focus mainly on traditional, non-systematic RLNC. To the best of our knowledge, there is no study in the literature that considers a general case of arbitrary field size, number of users and channel conditions for both non-systematic and systematic RLNC. In this work, we address the limitations of the previous studies and provide the following contributions: • • • • • In contrast with [6], [15], [16], [23], [24], we calculate the probability that all users recovered the source message jointly, taking into account a finite field size and commonly received packets. We generalise the analysis limited to a two-user network [20], [25] to an arbitrary number of users, and derive a tight lower bound for the probability of successful delivery in the case of traditional, non-systematic RLNC. In contrast with [23], [24], the bound takes into account the correlation effect due to commonly received packets. We also present a novel analysis for the systematic version of RLNC. We argue that the correlation effect is less profound than in the non-systematic case, and each user can be considered independently, even if the field size is small. We formulate the result explicitly and prove that it is a tight lower bound. We perform thorough benchmarking of the proposed bounds via extensive Monte Carlo simulation, where the effects of the number of users, the PER, the source message size and the field size are investigated. We demonstrate that the considered bounds are especially accurate under realistic channel conditions. In the nonsystematic case, the derived bound provides a much closer approximation than the traditional bound used in the literature. In particular, this holds true in those scenarios where users are spread across the coverage area of the transmitter and experience heterogeneous PERs. We provide an extensive study into the performance of multicast networks under RLNC and offer an insight into the selection of code parameters for various network configurations. The remainder of the paper is organised as follows. Section II describes the system model and provides the necessary background on multicast networks. The proposed theoretical framework is presented in Section III, where the bounds for the probability of successful delivery are derived for both nonsystematic and systematic versions of RLNC. In Section IV, the proposed bounds are compared with simulated results and existing bounds. Section V draws conclusions and highlights future research avenues. II. S YSTEM M ODEL AND BACKGROUND Consider a multicast network, in which a source node transmits to L destination nodes, or users. Each of the L links is assumed to be lossy and characterised by a PER ǫj for j = 1, . . . , L. Here, we assume that packet erasures occur as statistically independent events. The goal is to deliver a message of K source packets to each user. It will be assumed that the i-th source packet si , i = 1, . . . , K, is a column vector of elements from a finite field Fq of size q. The number of elements in vector si is equal to ⌈t/ log2 q⌉ [27], where t denotes the packet length in bits, which is assumed to be the same for all packets. Given K source packets, the encoder generates N ≥ K coded packets {ck }N k=1 , each being a vector consisting of ⌈t/ log2 q⌉ elements from Fq . Using the matrix notation, the encoding operation can be expressed as follows: [c1 , . . . , cN ] = [s1 , . . . , sK ] · G, (1) where G ∈ FK×N is a K × N matrix of coding coefficients q generated uniformly at random from Fq . In the case of systematic RLNC, the first K columns of G form an K × K identity matrix. In this way, the first K transmissions are the source packets, also referred to as systematic packets, followed by N − K coded, non-systematic packets. It is beyond the scope of the paper to address sparse implementations of RLNC [28]. Due to packet erasures, each user will receive a subset of transmitted packets. Let Uj ⊆ {1, . . . , N } denote a set of indices of transmitted packets received by the j-th user, j = 1, . . . , L. Let also mj = |Uj | denote the number of packets received by the j-th user. It is assumed that all users have a knowledge of the coding coefficients associated with each received packet. This can be achieved by transmitting the coefficients or the seed used to generate them in the packet header [6]. The j-th user can therefore construct an mj × K matrix of coding coefficients, which is obtained from G by deleting the rows corresponding to lost packets. This matrix will be denoted as Cj and will be referred to as the coding matrix of the j-th user. A user can recover the source message if its coding matrix is full rank. We now define the probability of successful delivery PL (ǫ) of an L-user multicast network with PERs ǫ = (ǫ1 , . . . , ǫL ) as the probability that all users have successfully recovered the source message. The simplest case of a multicast network is a point-to-point link with a single user characterised by a PER ǫ. For a nonsystematic code characterised by (N, K, q), the probability of successful delivery for such link is given by [24]: N   X N P (ǫ) = (1 − ǫ)m ǫN −m P(m, K). m (2) m=K Here, P(m, K) is the probability that an m × K matrix of elements generated uniformly at random from Fq is full rank, which is given by [21]: P(m, K) = K−1 Y (1 − q i−m ). i=0 (3) 3 TABLE I N OTATION USED THROUGHOUT THE PAPER . Notation L K N q Uj mj µ θJ θ P(m, K) P(i) (m, K) P (ǫ) P ∗ (ǫ) PL (ǫ) PL∗ (ǫ) Description Number of user forming a multicast network Number of packets forming an information message Number of coded packet transmissions Size of the finite field under consideration Set of indices of transmitted packets received by the j-th user Total number of packets received by the j-th user Random variable denoting the number of packets received simultaneously by all the users Random variable denoting the number of packets received simultaneously by a subset J of L users, 1 < |J| < L Tuple of variables θJ for all possible subsets J, 1 < |J| < L Probability that an m × K matrix of elements generated uniformly at random from Fq is full rank Probability that an m × K matrix of elements generated uniformly at random from Fq has rank i Probability of successful delivery over a point-to-point link with PER ǫ for non-systematic RLNC Probability of successful delivery over a point-to-point link with PER ǫ for systematic RLNC Probability of successful delivery over a multicast network with L ≥ 2 users and PERs ǫ = (ǫ1 , . . . , ǫL ) for non-systematic RLNC Probability of successful delivery over a multicast network with L ≥ 2 users and PERs ǫ = (ǫ1 , . . . , ǫL ) for systematic RLNC It can be observed that (2) can be thought of as a marginalisation of the rank of the user’s coding matrix over the distribution of the number of rows m in this matrix. For a systematic (N, K, q) code and a point-to-point link, the probability of successful delivery can be expressed as follows [22]:    K N X X K N −K m N −m ∗ (1 − ǫ) ǫ P (ǫ) = h m−h m=K ·P(m − h, K − h), Indeed, (3) is close to 1 for large q. In this case, the users will recover the message independently from each other and the probability of successful delivery can be approximated as follows (in the case of a non-systematic (N, K, q) code): PL (ǫ) ∼ = (5) where P (ǫj ) is the probability of successful delivery of a source message over a point-to-point link with a PER ǫj corresponding to the j-th user, as calculated by (2). It should be noted, however, that with a limited field size q, the accuracy of (5) is expected to decrease as the number of users grows. For a specific case of L = 2, it was shown in [24] that (5) is a good approximation even if q is small, provided that the number of transmissions and PER are high enough for the users to receive independent subsets of packets. By contrast, an exact formulation for the probability of successful delivery, valid for any field size, number of transmissions and channel conditions, was obtained for a two-user multicast network in [25] for non-systematic RLNC. The exact formulation is given as follows:   N N 2 X X Y −mj   (1 − ǫj )mj ǫN P2 (ǫ) = j j=1 m1 =K m2 =K X N  N − µ N − m1  P2 (m, µ; K), (6) · m2 − µ µ m1 − µ µ where m = (m1 , m2 ) and the innermost summation is performed over µ = max(0, m1 +m2 −N ), . . . , min(m1 , m2 ). Here, µ denotes the number of common packets received by the two users and P2 (m, µ; K) denotes the probability of two correlated random matrices with dimensions m1 × K and m2 × K and µ common rows being simultaneously full rank, for m1 , m2 ≥ K. This probability is given by P2 (m, µ; K) = X (i) P (µ, K) 2 Y P(mj − µ, K − i), (7) j=1 i where h denotes a possible number of received systematic packets and hmin is defined as max(0, m−N +K). Compared with (2) for the non-systematic case, we observe that an additional marginalisation over the distribution of h is required for the systematic code. In addition, the number of ways to select m received packets out of N is replaced with the number of ways to select h systematic packets out of K and m − h non-systematic packets out of N − K. Given that the user receives h systematic packets out of m, h columns of its coding matrix will be linearly independent. Therefore, for the matrix to be full rank, the remaining K − h columns formed by the non-systematic coding vectors should be linearly independent. The minimum value of h, hmin , is chosen as the difference between the total number of received packets m and a maximum possible number of non-systematic packets, min(m, (N − K)). Consider now the general case of an L-user multicast network. As mentioned in Section I, if the field size q is sufficiently large, each user is able to recover the message with a high probability once it receives at least K packets. P (ǫj ), j=1 h=hmin (4) L Y where the summation is performed over the values of i from max(0, K − m1 + µ, K − m2 + µ) to min(µ, K). Term P(i) (µ, K) denotes the probability that a random µ×K matrix has rank i [25]: P(i) (µ, K) = 1 q (µ−i)(K−i) i−1 Y l=0 (1 − q l−µ )(1 − q l−K ) . 1 − q l−i (8) The notation introduced in this section is summarised in Table II. III. P ROPOSED T HEORETICAL F RAMEWORK We now turn our attention toward the general case of an L-user multicast network described at the beginning of the previous section. Our goal is to derive the probability of successful decoding in such a network for two cases - nonsystematic and systematic RLNC. We start by formulating a general framework, and then consider each case individually. The transmission of N coded packets over L lossy links can be modelled as N independent trials. In each trial, the packet 4 can be received by a single user, by a selection of at least two users or by P none of the users. The total number of outcomes L is equal to i=0 Li = 2L . Consider first the packets received by a group of at least two users. Let µ be a random variable denoting a number of packets received simultaneously by all the users, i.e.,  µT= |U1 ∩ . . . ∩ UL |. Furthermore, let T ∩ θJ = U j j ∈J / Ūj , where J ⊂ {1, . . . , L}, j∈J 1 < |J| < L, be a random variable denoting the number of transmitted packets received simultaneously by at least two, but less than L users and not received by the remaining users. For convenience, let θJ obtained for all possible subsets J be assembled in a tuple of 2L − L − 2 random variables θ. Consider now the packets received by a single user only. However, instead of introducing another set of L random variables, we observe that if the total number of packets received by the j-th user, mj , is known, the number of packets P received only by this user can be calculated as mj − µ − J:j∈J θJ , where the summation is performed over all possible subsets J ⊂ {1, . . . , L}, 1 < |J| < L, that include j. In other words, the number of packets unique to the j-th user is fully determined by mj , µ and θ. Finally, the number of packets received by none of the users, TL j=1 Ūj , can be calculated as follows. If the numbers of packets mj , for j = 1, . . . , L, received by each user are added up, the number of packets µ common to all users will be counted L times. Similarly, the number of packets θJ received by a subset of users J ⊂ {1, . . . , L}, 1 < |J| < L, will be counted |J| times. Since each transmitted packet should be counted only once, the number of packets not received by any user can be computed as follows: L \ j=1 Ūj = N − L X j=1 mj +(L−1)µ+ L−1 X (l−1) l=2 X θJ . (9) J:|J|=l Example 3.1: For a multicast network of L = 3 users, • µ = |U1 ∩ U2 ∩ U3 |, • θ{1,2} = |U1 ∩ U2 ∩ Ū3 |, • θ{1,3} = |U1 ∩ Ū2 ∩ U3 |, • θ{2,3} = |Ū1 ∩ U2 ∩ U3 |. The number of packets received uniquely, for instance, by the first user is m1 − µ − θ{1,2} − θ{1,3} , and the number P of packets received by none of the users is N − j mj + 2µ + θ{1,2} + θ{1,3} + θ{2,3} . To summarise, the combination of m1 , . . . , mL , µ and θ describes all possible outcomes of the transmission of N coded packets. Let f (m, µ, θ; N ; ǫ) be the joint probability mass function (PMF) of these variables, where m = (m1 , . . . , mL ). The PMF can be expressed as follows: f (m, µ, θ; N ; ǫ) = γ(m, µ, θ; N )ϕL (m, N, ǫ). (10) The first term, γ(m, µ, θ; N ), denotes the number of ways to select m, µ and θ out of N . It can be calculated as a product of binomial coefficients, the number of which is equal to 2L − 1, the total number of elements in m, µ and θ. The second term in (10) denotes the probability of a particular combination of values contained in m, µ, θ and can be calculated as follows. Consider probability 1 − ǫj , which is associated with coded packets received by the j-th user, j = 1, . . . , L. The total number of such packets is mj . On the other hand, probability ǫj is associated with packets not received by the j-th user, the total number of which is N −mj . Therefore, ϕL (m, N, ǫ) can be calculated as follows: L Y N −mj . (11) (1 − ǫj )mj ǫj ϕL (m, N, ǫ) = j=1 We observe that the probability of particular combination of m, µ and θ does not depend on µ or θ. In general, the probability of successful decoding for a multicast network of L users can be calculated by marginalising the probability of all L coding matrices being full rank over the joint distribution of m, µ and θ: X PL (ǫ) = f (m, µ, θ; N ; ǫ)PL (m, µ, θ; K), (12) m,µ,θ where  PL (m, µ, θ; K) = Pr  L \ j=1  rank(Cj ) = K  (13) is the probability that coding matrices C1 , . . . , CL are simultaneously full rank. We note that (12) applies to both non-systematic and systematic codes. One can observe two challenges associated with the direct calculation of (12). The first challenge is to express the summation over m, µ and θ and to calculate the PMF f (m, µ, θ; N ; ǫ). Based on the discussion above, the number of nested sums in (12) and the number of binomial coefficients in f (m, µ, θ; N ; ǫ) will grow exponentially with the number of users L, thus making the direct approach impractical. The second challenge associated with computing (12) is to calculate the probability (13) of L correlated matrices being full rank, for a given combination of m, µ and θ. In Section II, (7) shows how this probability can be exactly calculated for L = 2 by marginalising it over the distribution of the rank of the submatrix formed by the common rows. Applying this approach to a larger number of matrices, however, is impractical, since the number of distinct sets of common rows, hence the number of submatrices whose ranks need to be considered, grows exponentially with L. Next, we address the problem of calculating (12) for nonsystematic and systematic RLNC. A. Non-systematic RLNC We start with the second challenge, the calculation of the probability (13) of L correlated coding matrices being full rank. First, we establish the following result: Lemma 3.1: The probability (13) that L correlated random matrices generated over Fq with dimensions mj × K are full rank, j = 1, . . . , L, is lower-bounded as follows:   L L Y \ Pr [rank(Cj ) = K] rank(Cj ) = K  ≥ Pr  j=1 j=1 = L Y j=1 P(mj , K), (14) 5 where P(mj , K) is given by (3). Proof: See Appendix A. The lower bound (14) is often implicitly used in the literature. For instance, by substituting (14) to (12), the approximation (5) can be obtained. In contrast with the literature, however, Lemma 3.1 establishes that this approximation is indeed a lower bound. At the same time, we note that the bound (14) becomes loose if significant correlation between the matrices is present. For instance, consider two matrices with dimensions m1 × K and m2 × K, such that m1 ≥ m2 ≥ K and µ = m2 . Clearly, in this case the probability of both matrices having full rank is equal to P(m2 , K). However, the same probability as predicted by bound (14) is equal to P(m1 , K)P(m2 , K), which is smaller than the exact value by P(m1 , K) times. Based on Lemma 3.1, we now establish a tighter bound for (13): Lemma 3.2 (Improved bound): The probability (13) that L correlated random matrices generated over Fq are full rank is lower-bounded by P̃L (m, µ; K), which is given by P̃L (m, µ; K) = X (i) P (µ, K) L Y P(mj − µ, K − i), (15) all three matrices have µ = 4 common rows. Furthermore, assume that each of the three possible pairs of matrices has an additional common row between them. In this case, none of the matrices has rows generated independently from the other matrices. The probability of all three matrices being full rank estimated by Monte Carlo simulations and obtained by averaging over 104 random realisations is equal to 0.33. The same probability obtained using the bounds (14) and (15) is equal to 0.20 and 0.27, respectively. Clearly, in this example the new bound of Lemma 3.2 provides closer approximation. At this point, we have established a more accurate lower bound for the probability (13) that all L coding matrices are simultaneously full rank for a given distribution of received packets among the users. We now proceed to the derivation of the probability of successful delivery (12) for the nonsystematic case. Theorem 3.1: The probability of successful delivery in an Luser multicast network characterised by PERs ǫ and employing an (N, K, q) non-systematic code is lower-bounded as follows: X X PL (ǫ) ≥ ϕL (m, N, ǫ) αL (m, µ; N )P̃L (m, µ; K), µ m (17) j=1 i where the summation is performed over the values of i from maxj (0, K − mj + µ) to min(µ, K) and P(i) (µ, K) is the probability that an µ × K matrix has rank i, as given by (8). Proof: Using the notation introduced earlier, each of the coding matrices C1 , . . . , CL has µ rows common to all of them. By averaging over the distribution of the rank of the matrix formed by these µ common rows, probability (13) for non-systematic RLNC can be expressed as follows: min(µ,K) X PL (m, µ, θ; K) = P(i) (µ, K) i=maxj (0,K−mj +µ)  · Pr  L \ j=1 where αL (m, µ; N ) =   minjX   (mj −µ) N N −µ (−1)l µ l l=0   L Y N −µ−l · mj − µ − l j=1 and the summation is performed over mj = K, . . . , N and   L X mj − (L − 1)N  , . . . , min mj . (19) µ = max 0, j j=1  rank(C′j ) = K − i , (16) where C′j denotes a matrix formed by the intersection of the mj − µ rows of Cj not common to all matrices and K − i columns. The starting value of i in the summation in (16) is chosen such that for any matrix C′j , there are at least as many rows as columns, i.e., mj − µ ≥ K − i. Such starting value excludes unnecessary summation terms. As regards the maximum value of the summation index i, it is chosen as the minimum dimension of the matrix formed by µ common rows. The application of Lemma 3.1 to the second term in the product under the summation in (16) results in the lower bound (15). Remark 3.1: For a two-user multicast network, the bound (15) is exact and reduces to (7). We note that by marginalizing over the distribution of the rank of the matrix formed by the rows common to all matrices, the bound (15) is expected to be tighter than that of Lemma 3.1, especially if the number of common rows µ is large. We illustrate this statement using the following example. Example 3.2: Consider three 6 × 5 matrices generated uniformly at random over the binary field F2 , such that (18) Proof: Substituting (10) into (12) and using the fact that ϕL (11) does not depend on µ and θ, the probability in question can be expressed as follows: X PL (ǫ) = ϕL (m, N, ǫ) m · X γ(m, µ, θ; N )PL (m, µ, θ; K). (20) µ,θ We now employ Lemma 3.2 and bound (20) from below: X X PL (ǫ) ≥ ϕL (m, N, ǫ) P̃L (m, µ; K) m · X µ γ(m, µ, θ; N ). (21) θ To prove (17), we now show that the innermost sum in (21) is equal to αL (m, µ; N ) given by (18). To this end, we rewrite this sum as follows:   X N γ(m, µ, θ; N ) = β, (22) µ θ where β= X θ γ(m − µ, 0, θ; N − µ). (23) 6 In other words, by selecting µ out of N packets common to PLall users, β is the total number of possible selections of j=1 (mj − µ) packets out of N − µ such that none of the packets is received by all users at the same time. The value of β can be calculated by the inclusion-exclusion principle in its complementary form [29]. To this end, let S denote a set of PL all possible selections of j=1 (mj −µ) packets out of N −µ. The number of elements in this set is  L  Y N −µ . (24) |S| = mj − µ j=1 Consider now subsets Sk of S, k = 1, . . . , N − µ, containing selections corresponding to the k-th transmitted packet received by all the L users. Let S̄k denote the complement of Sk in S. It can be observed that β can be thought of as the cardinality of a set constructed as the intersection of all S̄k , k = 1, . . . , N − µ. Using the inclusion-exclusion principle, β = | N\ −µ S̄k |   N − m1 = m2 − µ k=1 = |S| − N −µ X k=1 z −(−1) (namely, a base station serving a cell). As argued in [30], 3GPP’s LTE-A systems [31] are likely to ensure reduced user PERs across the majority of the cell area. Finally, for large values of PER, µ is likely to be small and the bound converges to the traditional approximation (5). Remark 3.3: The derived bound is exact for L = 2 users and matches (6). Indeed, the product of binomial coefficients in (6) can be shown to be equal to α2 (m, µ; N ) defined by (18) as follows. Without loss of generality, let m1 ≤ m2 . The last binomial coefficient in (6) is equivalent to the number of N − m2 selections out of N − µ packets, such that each selection includes m1 − µ packets. We can again employ the inclusion-exclusion principle and denote S as a set of all possible selections,  with the number of elements in this set −µ . Let Sk denote a subset of S containing equal to NN−m 2 selections in which the k-th packet belonging to the group of m1 − µ packets is not included, k = 1, . . . , m1 − µ. The last binomial coefficient in (6) can be expressed as follows: |Sk | + X |Sk1 ∩ Sk2 | − . . . 1≤k1 <k2 ≤N −µ X |Sk1 ∩ . . . ∩ Sz |, (25) 1≤k1 <...<kz ≤N −µ where z = minj (mj − µ) is the minimum possible number of packets received by all the L users. The first summation in (25) corresponds to N − µ possibleQselections of a single packet L N −µ−1 received by all the users, with j=1 m selections for j −µ−1 other N − µ − 1 available packets. Similarly, the second  summation in (25) corresponds to N −µ selections of two QL 2N −µ−2  selections of commonly received packets and j=1 m j −µ−2 other packets. Expression (25) can therefore be written in a compact form as follows:    L  z X N −µ Y N −µ−l , (26) β= (−1)l mj − µ − l l j=1 l=0 thus making the inner sum in (21) equal to αL (m, µ; N ) (18). The values of (m1 , . . . , mL ) over which the outer-most summation in (17) is performed are chosen so that each user should receive at least K packets. As regards the number of packets µ received by all users, its maximum value cannot exceed the smallest mj , for j = 1, . . . , L. The starting value of µ can be found assuming that all other N − µ transmitted packets have been 1 users. As P simultaneously received by L −P a result, µ ≥ j mj − (L − 1)N. If (L − 1)N > j mj , the starting value of µ should be 0. Remark 3.2: We note that bound (17) is obtained by applying Lemma 3.2, meaning that only packets received simultaneously by all users are considered to take into account the correlation effect. As a result, the bound is expected to be especially tight if the number of such packets µ is likely to be large, which is typical in scenarios where a non-negligible fraction of users experiences PERs that are relatively small. We observe that this is the case of multicast networks where users are spread across the coverage area of the source node = m\ 1 −µ k=1 mX 1 −µ l=0 S̄k (−1)l    m1 − µ N − µ − l . (27) k N − m2 Multiplying the right-hand side of (27) with the first two binomial coefficients of (6) yields:    m1 −µ    N N −µ X N −µ−l l m1 − µ (−1) µ m1 − µ l N − m2 l=0   mX    1 −µ N N −µ−l N −µ−l = (−1)l µ m1 − µ − l m1 − µ − l k=0 = α2 (m, µ; N ). B. Systematic RLNC As pointed out in Remark 3.2, the bound (17) derived for non-systematic RLNC was obtained by considering packets received simultaneously by all users, thus partially taking into account the correlation between their coding matrices. In the case of systematic RLNC, the correlation arises only from commonly received non-systematic packets, since the systematic packets correspond to deterministic vectors of coding coefficients. For small values of PER, each user is likely to receive all K systematic packets regardless of the number of received non-systematic packets. Even for large values of PER, the correlation effect is smaller than in the case of non-systematic RLNC, since the number of transmitted non-systematic packets for systematic RLNC is smaller than the total number of transmissions. Therefore, it is expected that for systematic RLNC, considering a multicast network as a set of independent unicast connections will result in an approximation close enough for any field size and PER. We now state this result formally and prove that such approximation is a lower bound, as in the case of non-systematic RLNC. Theorem 3.2: The probability of successful delivery PL∗ (ǫ) of the L-user multicast network characterised by PERs ǫ and 7 employing an (N, K, q) systematic code is lower-bounded as follows: L Y P ∗ (ǫj ), (28) PL∗ (ǫ) ≥ j=1 where P ∗ (ǫj ) is the probability of successful delivery of a point-to-point link with a PER ǫj given by (4). Proof: Consider the general formulation for the probability of successful delivery of the multicast network (12), but with marginalisation over the distribution of m only: PL∗ (ǫ) = X ϕL (m, N, ǫ)P∗L (m, K) m  L  Y N , mj j=1 (29) where P∗L (m, K) denotes the probability that all L coding matrices are simultaneously full rank. This probability can be marginalised over the probability distribution of the number of systematic packets hj received by the j-th user as follows:   N −K   K L X X Y hj mj −hj ∗   ... PL (m, K) =  N hL h1  · Pr  L \ j=1 j=1 mj  rank(C′j ) = K − hj  , (30) where matrix C′j is composed of the intersection of mj − hj non-systematic rows and K − hj columns of the j-th coding matrix Cj . Equation (30) can be lower-bounded by applying Lemma 3.1 to its probability term and employing the distributive law as follows:  N −K  L X K Y hj mj −hj ∗  P(mj − hj , K − hj ). (31) PL (m, K) ≥ N j=1 hj mj The bound (28) can now be obtained by substituting (31) into (29). Bound (28) will be investigated in Section IV-B, where we will show that it is sufficiently tight even for binary codes and small values of PER. C. Computational Complexity Consideration Comparing bounds (17) and (28) for non-systematic and systematic codes, it can be observed that the former is significantly more complex than the latter, especially if the number of users L is large. In this section, we show how the calculation of bound (17) in the non-systematic case can be optimised. Consider the outermost summation in (17), which is performed over L variables contained in tuple m, with each variable taking values from K to N . As a result, the number of terms in the summation is equal to (N − K + 1)L , which makes (17) computationally prohibitive if the number of users L is large. At the same time, it can be observed that αL (·) and PL (·) in (17), the most computationally intensive terms, do not depend on the order of elements within m. Thus, the number of times these terms are calculated can be significantly reduced as follows. Let us rewrite relation (17) as follows:   X X  ϕL (m, N, ǫ) PL (ǫ) ≥ m′ · X π(m′ ) αL (m′ , µ; N )P̃L (m′ , µ; K), (32) µ where the outer summation is now performed over all possible combinations m′ of L values from K to N with no reference to order, and π(m′ ) denotes a permutation of m′ . The problem of calculating the number of possible combinations of L values from K to N can be recast as that of finding the number of ways to place L balls into N −K +1 urns. Indeed, a particular combination m′ is equivalent to one way of assigning each of the N − K + 1 values (urns) a non-negative number of occurrences (balls) Li , i = 1, . . . , N − K + 1, so that N −K+1 X Li = L. (33) i=1 The number of solutions to (33), and hence the number of terms in the outer summation in (32), can be found using the stars and bars principle [32] and is equal to     N −K +1+L−1 N −K +L = . (34) L L This number is much smaller than (N − K + 1)L , the number of terms in the outer summation in the original expression (17), as illustrated in the following example. Example 3.3: Let L = 4 and N − K = 10. Based on (34), thenumber of terms in the outer summation in (32) is equal to 14 4 4 = 1001, which is 14.6 times smaller than 11 = 14641, the number of terms in the outer summation in the original expression (17). As a result, the number of times αL (·) and PL (·) are calculated is significantly reduced compared with the original expression. Clearly, the reduction factor will increase with L. Further complexity reduction can be achieved in the case of a homogeneous network, in which each user has the same PER ǫ = ǫj for j = 1, . . . , L. In this case, (32) simplifies to X PL (ǫ) ≥ ϕ′L (m′ , N, ǫ)σ(m′ ) m′ · X αL (m′ , µ; N )P̃L (m′ , µ; K), (35) µ where P ′ P ′ ϕ′L (m′ , N, ǫ) = (1 − ǫ) m ǫLN − m (36) P and σ(m′ ) = π(m′ ) is the number of permutations of a particular combination m′ of L values from K to N . This number depends on a particular solution to (33) and can be calculated as follows: L! . (37) σ(m′ ) = QN −K+1 Li ! i=1 To further speed up calculation, probabilities P(·) and P(i) (·), which are used repetitively in the calculation of P̃L (·), can be pre-computed offline for a given (N, K, q) code and stored in a look-up table. Parameter Number of users L PER ǫ Number of source packets K Number of transmissions N Finite field size q Values {2, 6, 10} {0.01, 0.1} {5, 10, 15, 20} {K, + 1, . . . , K + 10}  K 2, 28 IV. N UMERICAL R ESULTS In this section, we investigate the performance of a multicast network under non-systematic and systematic RLNC via simulation and compare the results with the derived theoretical bounds. Simulation results in terms of probability of successful delivery were obtained using the Kodo C++ network coding library [33] and the Monte Carlo method, with each point being the result of an average over 105 iterations. The results are compared for various combinations of network and code parameters, as summarised in Table IV. The accuracy of the bounds is evaluated in terms of Mean Square Error (MSE) for a given combination of L, ǫ, K and q over the range of numbers of transmissions N . Unless otherwise stated, a homogeneous scenario is assumed, in which each user experiences the same PER ǫ. 1 0.8 0.6 L L L L L L L L L 0.4 0.2 We start with a multicast network operating under a binary, non-systematic code corresponding to q = 2. Specifically, we compare the proposed bound (17) against bound (5) used in the literature for large field sizes. In addition, we benchmark both bounds against simulated results. Fig. 1 shows the probability of successful delivery PL (ǫ) to L ∈ {2, 6, 10} users as a function of the number of coded transmissions N . The number of source packets is fixed to K = 5 and two PER values common to all users are considered: ǫ = 0.01 and 0.1. The latter value of ǫ is commonly used in practice as the maximum acceptable PER. For instance, in 3GPP’s LTE-A systems, the link adaptation mechanism typically switches the modulation and coding scheme once the transport block error rate reaches 0.1 [31], [34]. Therefore, this value of PER can be thought of as a worst-case scenario. It can be observed that the proposed bound as per (17) provides better approximation than bound (5). Specifically, bound (17) is particularly accurate for ǫ = 0.01, where it matches the simulated results for L = 2 (MSE = 2 · 10−6 ) and closely follows them when L ∈ {6, 10} (MSE = 8·10−6 and 9·10−5 , respectively). The tightness of the proposed bound in this scenario is explained by a large number of packets likely to be received simultaneously by all users. Indeed, when ǫ is small, the probability that a single transmitted packet is received by all users, which is equal to (1 − ǫ)L , is large. This leads to a high correlation between the users coding matrices. This is in contrast with the traditional bound (5), which does not take into account commonly received packets. As a result, bound (5) is particularly loose when ǫ is small, with the absolute gap from the simulated results being up to 0.58 when L = 10 2, sim. 2, bound (5) 2, bound (17) 6, sim. 6, bound (5) 6, bound (17) 10, sim. 10, bound (5) 10, bound (17) 6 7 8 9 10 11 12 13 14 15 Number of transmissions N (a) ǫ = 0.01 1 0.8 0.6 L L L L L L L L L 0.4 0.2 = = = = = = = = = 2, sim. 2, bound (5) 2, bound (17) 6, sim. 6, bound (5) 6, bound (17) 10, sim. 10, bound (5) 10, bound (17) 0 5 A. Non-systematic RLNC = = = = = = = = = 0 5 Probability of successful delivery PL (ǫ) TABLE II N ETWORK AND CODE PARAMETERS USED TO EVALUATE THE ACCURACY OF THE PROPOSED BOUNDS . Probability of successful delivery PL (ǫ) 8 6 7 8 9 10 11 12 13 14 15 Number of transmissions N (b) ǫ = 0.1 Fig. 1. Probability of successful delivery for a binary non-systematic code as a function of N for K = 5 and L ∈ {2, 6, 10}. and N = 7, in contrast with 0.016 for the new bound. At the same time, as ǫ or L increase, the probability that a packet will be received by all users decreases, so the accuracy of the proposed bound decreases too, as can be observed for ǫ = 0.1 and L = 10 (MSE = 0.01). We reiterate, however, that bound (17) is exact for L = 2 and any ǫ, as per Remark 3.3. Fig. 2 illustrates the results for the same scenario as in Fig. 1, but this time for different numbers of source packets K ∈ {5, 10, 15, 20} and a fixed number of users L = 6. In line with the previous results, the proposed bound (17) closely follows the simulated performance at ǫ = 0.01, exhibiting the MSE of 8 · 10−6 , 6 · 10−5 , 1 · 10−4 and 3 · 10−4 for K ∈ {5, 10, 15, 20}, respectively. The new bound is significantly more accurate than bound (5) at ǫ = 0.01, with the latter having the MSE of up to 7 · 10−2 . It can be observed that for this PER, the accuracy of the proposed bound somewhat decreases as K grows. The reason is that longer source messages require more coded transmissions, which leads to a higher number of packet erasures for a given PER. As a result, the correlation between the users coding matrices reduces for larger K, which means a smaller number of packets received simultaneously by all users. For the same reason, it can be observed from Fig. 2 that the gap between the simulated results and bound (5) becomes smaller as K grows. For example, for ǫ = 0.01, the maximum gap between bound 1 0.8 0.6 K=5 K = 10 K = 15 K = 20 0.4 0.2 Sim. Bound (5) Bound (17) 0 5 10 15 20 25 Probability of successful delivery PL (ǫ) Probability of successful delivery PL (ǫ) 9 1 0.8 0.6 L L L L L L L L L 0.4 0.2 = = = = = = = = = 2, sim. 2, bound (5) 2, bound (17) 6, sim. 6, bound (5) 6, bound (17) 10, sim. 10, bound (5) 10, bound (17) 0 30 5 6 7 Number of transmissions N 8 9 10 11 12 13 14 15 Number of transmissions N Fig. 3. Probability of successful delivery for a binary non-systematic code as a function of the number of transmissions N for the case when each user has a unique PER from 0.01 to 0.1, for L ∈ {2, 6, 10} and K = 5. 1 0.8 K=5 0.6 K = 10 K = 15 K = 20 0.4 0.2 Sim. Bound (5) Bound (17) 0 5 10 15 20 25 30 Number of transmissions N (b) ǫ = 0.1 Probability of successful delivery PL (ǫ) Probability of successful delivery PL (ǫ) (a) ǫ = 0.01 1 ǫ = 0.01 0.8 0.6 0.4 0.2 ǫ = 0.1 (5) and the simulated results reduces from 0.5 for K = 5 (N = 7) to 0.4 for K = 20 (N = 22). Fig. 2b demonstrates that both bounds are close to the simulated results for the worst-case scenario in terms of PER, especially when K = 20 – MSE = 9 · 10−4 and 8 · 10−4 for bounds (5) and (17), respectively. It should be noted, however, that due to the high decoding complexity of non-systematic RLNC [13], K is likely to be small in practice, and in this regime the proposed bound (17) is noticeably more accurate (MSE = 3·10−3 when K = 5) than (5) (MSE = 1.4 · 10−2 for the same value of K) even if ǫ is high. The results so far were collected for a homogeneous network, in which each user has the same PER ǫ. It is also relevant to verify the performance of the bounds for a more general case of a heterogeneous network, in which users have distinct PERs. To this end, we allocate L unique PER values from 0.01 to 0.1 with a constant step equal to 0.99/(L − 1), which is equivalent to a set of users placed on the symmetry axis of a cellular cell sector [35]. Fig. 3 compares the bounds and simulated results for such network, for the same values of L and K as in Fig. 1. It is clear that the proposed bound (17) is significantly more accurate than (5) even for L = 10, with the maximum absolute gap between the two bounds being 0.17, 0.24 and 0.19 for L = 2 (N = 6), L = 6 (N = 7) and L = 10 (N = 8), respectively. = = = = = = = = = 2, sim. 2, bound (5) 2, bound (17) 6, sim. 6, bound (5) 6, bound (17) 10, sim. 10, bound (5) 10, bound (17) 0 5 Fig. 2. Probability of successful delivery for a binary non-systematic code as a function of N for L = 6 and K ∈ {5, 10, 15, 20}. L L L L L L L L L 6 7 8 9 10 Number of transmissions N Fig. 4. Probability of successful delivery for a non-binary (q = 28 ), nonsystematic code as a function of the number of transmissions N for L ∈ {2, 6, 10}, ǫ ∈ {0.01, 0.1} and K = 5. Remark 4.1: Comparing with Fig. 1, it can be observed that the gap between the proposed bound and simulation results is larger than when each user has ǫ = 0.01, but smaller than when each user has ǫ = 0.1. This is an expected result, since the users have varying PERs between those two values. Still, we observe that the correlation effect given by the number µ of packets received simultaneously by all the users is relevant and accounting for this makes our bound (17) tighter than (5). Finally, Fig. 4 compares the bounds and simulated results for a non-binary, non-systematic code. A relatively large field size, q = 28 , is selected, in which the traditional bound (5) is expected to be accurate. It can be observed that while bound (5) closely follows the simulated performance when L = 2 (MSE = 10−6 ), it somewhat diverges from the simulated results at small N for a larger number of users and ǫ = 0.01: for N = 5, the absolute gap is 0.01 and 0.02 for L = 6 and 10, respectively. It is expected that the deviation of bound (5) will grow further when L is increased beyond 10. In other words, bound (5), traditionally used in the literature, has a noticeable approximation error, that grows with L, even for a large field size. By contrast, the proposed bound (17) is clearly more accurate when ǫ = 0.01, with the largest deviation from the simulated results (corresponding to L = 10 and N = 5) being 1 0.8 ǫ = 0.01 0.6 ǫ = 0.1 0.4 L L L L L L 0.2 = = = = = = 2, sim. 2, bound 6, sim. 6, bound 10, sim. 10, bound 0 5 6 7 8 9 10 11 12 13 14 Probability of successful delivery PL∗ (ǫ) Probability of successful delivery PL∗ (ǫ) 10 1 K=5 0.8 K = 10 0.6 K = 15 K = 20 0.4 Sim., ǫ = 0.01 Bound, ǫ = 0.01 Sim., ǫ = 0.1 Bound, ǫ = 0.1 0.2 0 15 5 10 Number of transmissions N 2 · 10−3 , 10 times lower than that of bound (5). As regards ǫ = 0.1, both bounds accurately describe the performance, with the worst-case MSE (corresponding to L = 10) equal to 8 · 10−4 and 7 · 10−4 for bound (5) and (17), respectively. To summarise, the proposed bound (17) for non-systematic RLNC is tighter than the existing bound (5) traditionally used in the literature. The difference between the bounds is especially profound in realistic channel conditions, when users have small values of PER. B. Systematic RLNC We now turn our attention to a multicast network operating under systematic RLNC, the performance bound for which was proposed in Theorem 3.2. In this scenario, the first K transmissions are the original source packets, followed by coded, non-systematic packets. Fig. 5 compares bound (28) with simulated performance for various numbers of users L and PER ǫ. The number of source packets K is fixed to 5. It can be observed that the bound is accurate when ǫ = 0.01, with the MSE of 4 · 10−7 , 7 · 10−7 and 2 · 10−6 for L = 2, 6 and 10, respectively. This is in contrast with the same bound applied to non-systematic RLNC (5), which exhibited significant inaccuracy at small PER. Such behaviour of bound (28) at small ǫ was predicted in Section III-B and explained by the high probability that each user receives all K source packets. Even when ǫ = 0.1 and L = 10, the vertical gap between the bound and simulated results is relatively small: up to 7 · 10−2 for N = 8, compared to 0.58 in the nonsystematic case. This phenomenon was again predicted in Section III-B and is due to the fact that the correlation between the users coding matrices arises from the non-systematic packets only, the number of which is smaller than the total number of transmissions. Due to the tightness of bound (28) for both considered PER values, the results for a heterogeneous scenario, in which every user has a distinct PER, are omitted. By analogy to Fig. 2 for non-systematic RLNC, Fig. 6 illustrates the performance results for the systematic case, for fixed L = 6 and variable K, for two values of PER ǫ. The bound provides close approximation for all K at ǫ = 0.01: the MSE ranges from 7 · 10−7 (for K = 5) to 5 · 10−6 20 25 30 Fig. 6. Probability of successful delivery for a binary systematic code as a function of the number of transmissions N for L = 6, ǫ ∈ {0.01, 0.1} and K ∈ {5, 10, 15, 20}. Probability of successful delivery PL∗ (ǫ) Fig. 5. Probability of successful delivery for a binary systematic code as a function of the number of transmissions N for L ∈ {2, 6, 10}, ǫ ∈ {0.01, 0.1} and K = 5. 15 Number of transmissions N 1 ǫ = 0.01 0.8 0.6 0.4 0.2 L L L L L L ǫ = 0.1 = = = = = = 2, sim. 2, bound 6, sim. 6, bound 10, sim. 10, bound 0 5 6 7 8 9 10 Number of transmissions N Fig. 7. Probability of successful delivery for a non-binary q = 28 , systematic code as a function of the number of transmissions N for L ∈ {2, 6, 10}, ǫ ∈ {0.01, 0.1} and K = 5. (for K = 20). At the same time, a small deviation can be observed when ǫ = 0.1, which decreases as K becomes larger – the MSE drops from 4 · 10−4 (for K = 5) to 9 · 10−5 for (K = 20). The deviation can be explained by a larger influence of the correlation between the users coding matrices when ǫ is high, which is not taken into account by the proposed bound. The deviation reduction as K increases is due to a decreasing amount of correlation, as in the case of non-systematic RLNC. Finally, Fig. 7 demonstrates the performance results for a systematic non-binary code, corresponding to q = 28 . The accuracy of the bound can be observed for all considered values of L and ǫ, with the worst-case MSE (corresponding to L = 10) equal to 4 · 10−7 and 2 · 10−7 , for ǫ = 0.01 and 0.1, respectively. We note that the results in Fig. 7 are similar to those shown in Fig. 4 for a non-systematic code. Indeed, when the field size is large, the probability of successful delivery in both cases can be closely approximated by the probability of each user collecting at least K packets, which does not depend on the nature of the code. All in all, it can be concluded that for systematic RLNC, bound (28) is sufficiently tight for most considered combinations of K, L, ǫ and q, with a small deviation occurring when K = 5, L ≥ 6 and ǫ = 0.1. 11 V. C ONCLUSIONS AND F UTURE W ORK In this paper, we have addressed the issue of calculating the probability of successful delivery in a multicast network operating under RLNC. In contrast with the previous studies focused on specific network or code parameters, we considered the most general scenario of arbitrary number of users and finite field size, as well as realistic channel conditions. In addition to the traditional, non-systematic form of RLNC, we have also considered the systematic version. For non-systematic RLNC, we proposed a novel lower bound for the probability of successful delivery, which takes into account a limited finite field size and potential correlation between the users. This is in contrast with the bound traditionally used in the literature, which assumes an infinite or sufficiently large field size and independence between subsets of packets received by each user. For systematic RLNC, however, we argued that the correlation effect between the users is negligible, and the traditionally used bound is sufficiently tight. The accuracy of the considered bounds was thoroughly investigated via Monte Carlo simulations for various combinations of network and code parameters. In the non-systematic scenario, it was demonstrated that the proposed bound is significantly more accurate than the traditional bound used in the literature. The accuracy of the new bound was shown to be especially high at low PER, exhibiting an MSE of 9 · 10−5 for a ten-user network. In contrast, the absolute deviation of the state-of-the art bound is as large as 0.58 for the same network. Even for a large finite field, it was shown that the traditional bound deviates from the simulated results, while the proposed bound is up to 10 times more accurate. In particular, this holds true in scenarios where the multicast users experience heterogenous PERs. In the systematic case, the considered bound was shown to be sufficiently tight for most configurations, with a small deviation occurring at high PER and small message size. By examining the accuracy of the bounds, we provided a unique insight into the selection of code parameters for various network configurations. The considered bounds for the probability of successful delivery could be used to obtain other performance metrics, such as the average decoding delay or energy efficiency. In addition, the derived results can be utilised in the analysis of other network topologies, such as relay networks. To improve the utility of the bounds, a further reduction in their complexity, especially in the non-systematic case, can be investigated. A PPENDIX A P ROOF OF L EMMA 3.1 Let Aj , j = 1, . . . , L, denote an event corresponding to matrix Cj being full rank. Using this notation, (14) can be rewritten as   L L Y \ Pr [Aj ] . (38) Aj  ≥ Pr  j=1 j=1 We first show that (38) is valid for L = 2. Consider the two matrices in question, C1 and C2 . Using the notation of Section III, let µ denote the number of common rows in these matrices. Let also X denote a matrix formed by those rows. The joint probability of both matrices being full rank can be expressed as follows: X Pr[rank(X) = i, A1 ∩ A2 ], (39) Pr[A1 ∩ A2 ] = i where the maximum value of the summation index i is limited by min(µ, K). Let Z be a random variable representing the rank of X, so that both matrices are full rank. Therefore, (39) can be thought of as the Cumulative Distribution Function (CDF) of µ, F (µ): X Pr[Z = i] = Pr[Z ≤ µ]. (40) Pr[A1 ∩ A2 ] = i Since the CDF is a non-decreasing function, it follows that its minimum value corresponds to µ = 0, for which the matrices are independent from each other. Hence, Pr[A1 ∩ A2 ] ≥ F (0) = Pr[A1 ] Pr[A2 ], (41) which proves (38) for L = 2. For L > 2, the left-hand side of (38) can be expressed based on the chain rule as follows:       L L−1 L−2 \ \ \ Pr  Aj  = Pr AL Aj  · Pr AL−1 Aj  · . . . j=1 j=1 j=1 · Pr [A2 |A1 ] · Pr[A1 ]   L l−1 Y \ Aj  . = Pr Al l=1 (42) j=1 From (41), it follows that Pr[A1 ∩ A2 ] ≥ Pr[A2 ]. (43) Pr[A1 ] Consider now the term in the product (42) corresponding to l = 3, Pr[A3 |A1 ∩ A2 ]. It can be expressed as follows: Pr[A2 |A1 ] = Pr[A3 |A1 ∩ A2 ] = Pr[A3 ∩ A2 |A1 ] . Pr[A2 |A1 ] (44) From (41), it follows that Pr[A3 ∩ A2 |A1 ] ≥ Pr[A3 |A1 ] Pr[A2 |A1 ]. (45) Substituting this into (44) leads to Pr[A3 |A1 ∩ A2 ] ≥ Pr[A3 |A1 ] ≥ Pr[A3 ]. (46) Using the same logic, it is straightforward to show Tl−2 that if Pr[Al−1 | j=1 Aj ] ≥ Pr[Al−1 ] holds, so does Tl−1 Pr[Al | j=1 Aj ] ≥ Pr[Al−1 ]. Indeed, i h   Tl−2 l−1 Pr Al ∩ Al−1 | j=1 Aj \ i h Aj  = Pr Al | Tl−2 Pr Al−1 | j=1 Aj j=1   l−2 \ (47) Aj  ≥ Pr[Al ]. ≥ Pr Al | j=1 As a result, every term in the product (42) is lower-bounded by the corresponding marginal probability, which leads to (38) and proves the lemma.  12 R EFERENCES [1] D. Gomez-Barquero, D. Gozalvez, and N. Cardona, “Application Layer FEC for Mobile TV Delivery in IP Datacast Over DVB-H Systems,” IEEE Transactions on Broadcasting, vol. 55, pp. 396–406, June 2009. [2] J. W. Byers, M. Luby, and M. Mitzenmacher, “A Digital Fountain Approach to Asynchronous Reliable Multicast,” IEEE Journal on Selected Areas in Communications, vol. 20, pp. 1528–1540, Oct. 2002. [3] P. Wang, G. Mao, Z. Lin, M. Ding, W. Liang, X. Ge, and Z. Lin, “Performance Analysis of Raptor Codes Under Maximum Likelihood Decoding,” IEEE Transactions on Communications, vol. 64, pp. 906– 917, Mar. 2016. [4] E. Magli, M. Wang, P. Frossard, and A. Markopoulou, “Network Coding Meets Multimedia: A Review,” IEEE Transactions on Multimedia, vol. 15, pp. 1195–1212, Aug. 2013. [5] T. Ho, R. Koetter, M. Médard, D. Karger, and M. Effros, “The Benefits of Coding over Routing in a Randomized Setting,” in Proc. of IEEE ISIT 2003, p. 7803, June 2003. [6] T. Ho, M. Médard, R. Koetter, D. Karger, M. Effros, J. Shi, and B. Leong, “A Random Linear Network Coding Approach to Multicast,” IEEE Transactions on Information Theory, vol. 52, pp. 4413–4430, Oct. 2006. [7] R. Ahlswede, N. Cai, S.-Y. R. Li, and R. W. Yeung, “Network Information Flow,” IEEE Transactions on Information Theory, vol. 46, pp. 1204–1216, July 2000. [8] D. S. Lun, M. Médard, R. Koetter, and M. Effros, “On Coding for Reliable Communication over Packet Networks,” in Proc. of Proc. 42nd Annu. Allerton Conf. Communication, Control, and Computing, Jan. 2004. [9] D. S. Lun, M. Médard, R. Koetter, and M. Effros, “Further results on coding for reliable communication over packet networks,” in Proc. of ISIT 2005, pp. 1848–1852, Sept 2005. [10] I. Chatzigeorgiou and A. Tassi, “Decoding Delay Performance of Random Linear Network Coding for Broadcast,” IEEE Transactions on Vehicular Technology, vol. 66, pp. 7050 – 7060, Aug. 2017. [11] B. Shrader and N. M. Jones, “Systematic wireless network coding,” in Proc. of IEEE MILCOM 2009, pp. 1–7, Oct. 2009. [12] J. Heide, M. V. Pedersen, F. H. P. Fitzek, and T. Larsen, “Network Coding for Mobile Devices - Systematic Binary Random Rateless Codes,” in Proc. of ICC 2009, pp. 1–6, June 2009. [13] D. E. Lucani, M. Médard, and M. Stojanovic, “Systematic Network Coding for Time-Division Duplexing,” in Proc. of IEEE ISIT 2010, pp. 2403–2407, June 2010. [14] J. Barros, R. A. Costa, D. Munaretto, and J. Widmer, “Effective Delay Control in Online Network Coding,” in Proc. of IEEE INFOCOM 2009, pp. 208–216, Apr. 2009. [15] A. Eryilmaz, A. Ozdaglar, and M. Médard, “On Delay Performance Gains From Network Coding,” in Proc. of 2006 40th Annual Conference on Information Sciences and Systems, pp. 864–870, Mar. 2006. [16] D. Lucani, M. Médard, and M. Stojanovic, “Broadcasting in timedivision duplexing: A random linear network coding approach,” in Proc. of 2009 Workshop on Network Coding, Theory, and Applications, pp. 62– 67, June 2009. [17] M. V. Pedersen, D. E. Lucani, F. H. P. Fitzek, C. W. Sorensen, and A. S. Badr, “Network coding designs suited for the real world: What works, what doesn’t, what’s promising,” in Proc. of IEEE ITW 2013, pp. 1–5, Sept. 2013. [18] D. Ferreira, R. A. Costa, and J. Barros, “Real-Time Network Coding for Live Streaming in Hyper-Dense WiFi Spaces,” IEEE Journal on Selected Areas in Communications, vol. 32, pp. 773–781, Apr. 2014. [19] D. E. Lucani, M. Médard, and M. Stojanovic, “Random Linear Network Coding for Time-Division Duplexing: Field Size Considerations,” in Proc. of IEEE GLOBECOM 2006, pp. 1–6, Nov. 2009. [20] M. Nistor, D. E. Lucani, T. T. V. Vinhoza, R. A. Costa, and J. Barros, “On the Delay Distribution of Random Linear Network Coding,” IEEE Journal on Selected Areas in Communications, vol. 29, pp. 1084–1093, May 2011. [21] O. Trullols-Cruces, J. M. Barcelo-Ordinas, and M. Fiore, “Exact Decoding Probability Under Random Linear Network Coding,” IEEE Communications Letters, vol. 15, pp. 67–69, Jan. 2011. [22] A. L. Jones, I. Chatzigeorgiou, and A. Tassi, “Binary Systematic Network Coding for Progressive Packet Decoding,” in Proc. of IEEE ICC 2015, pp. 6115–6120, June 2015. [23] A. S. Khan, A. Tassi, and I. Chatzigeorgiou, “Rethinking the Intercept Probability of Random Linear Network Coding,” IEEE Communications Letters, vol. 19, pp. 1762–1765, Oct. 2015. [24] A. S. Khan and I. Chatzigeorgiou, “Performance Analysis of Random Linear Network Coding in Two-Source Single-Relay Networks,” in Proc. IEEE ICC 2015, pp. 991–996, June 2015. [25] E. Tsimbalo, A. Tassi, and R. J. Piechocki, “Novel Performance Analysis of Network Coded Communications in Single-Relay Networks,” in Proc. of IEEE GLOBECOM 2016, pp. 1–6, Dec. 2016. [26] P. J. S. G. Ferreira, B. Jesus, J. Vieira, and A. J. Pinho, “The Rank of Random Binary Matrices and Distributed Storage Applications,” IEEE Communications Letters, vol. 17, pp. 151–154, Jan. 2013. [27] T. Ho and D. Lun, Network Coding: An Introduction. Cambridge: Cambridge University Press, Apr. 2008. [28] S. Brown, O. Johnson, and A. Tassi, “Reliability of Broadcast Communications Under Sparse Random Linear Network Coding,” IEEE Transactions on Vehicular Technology, vol. PP, no. 99, pp. 1–1, 2018. [29] J. H. van Lint and R. M. Wilson, A Course in Combinatorics. Cambridge University Press, 2nd ed., 2001. [30] A. Tassi, I. Chatzigeorgiou, D. Vukobratović, and A. L. Jones, “Optimized network-coded scalable video multicasting over eMBMS networks,” in Proc. of IEEE ICC 2015, pp. 3069–3075, June 2015. [31] S. Sesia, I. Toufik, and M. Baker, LTE - The UMTS Long Term Evolution. John Wiley & Sons, 2011. [32] W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1. Wiley, 3rd ed., 1968. [33] M. V. Pedersen, J. Heide, and F. H. P. Fitzek, Kodo: An Open and Research Oriented Network Coding Library., vol. 6827 of Lecture Notes in Computer Science, pp. 145–152. Springer, 2011. [34] L. Carlà, F. Chiti, R. Fantacci, C. Khirallah, and A. Tassi, “Power Efficient Resource Allocation Strategies for Layered Video Delivery over eMBMS Networks,” in Proc. of ICC 2014, pp. 3505–3510, June 2014. [35] A. Tassi, I. Chatzigeorgiou, and D. Vukobratović, “Resource-Allocation Frameworks for Network-Coded Layered Multimedia Multicast Services,” IEEE Journal on Selected Areas in Communications, vol. 33, pp. 141–155, Feb. 2015.
7cs.IT
arXiv:1701.01074v1 [math.AG] 4 Jan 2017 THE ROLE OF DEFECT AND SPLITTING IN FINITE GENERATION OF EXTENSIONS OF ASSOCIATED GRADED RINGS ALONG A VALUATION STEVEN DALE CUTKOSKY Abstract. Suppose that R is a 2 dimensional excellent local domain with quotient field K, K ∗ is a finite separable extension of K and S is a 2 dimensional local domain with quotient field K ∗ such that S dominates R. Suppose that ν ∗ is a valuation of K ∗ such that ν ∗ dominates S. Let ν be the restriction of ν ∗ to K. The associated graded ring grν (R) was introduced by Bernard Teissier. It plays an important role in local uniformization. We show in Theorem 0.1 that the extension (K, ν) → (K ∗ , ν ∗ ) of valued fields is without defect if and only if there exist regular local rings R1 and S1 such that R1 is a local ring of a blow up of R, S1 is a local ring of a blowup of S, ν ∗ dominates S1 , S1 dominates R1 and the associated graded ring grν ∗ (S1 ) is a finitely generated grν (R1 )-algebra. We also investigate the role of splitting of the valuation ν in K ∗ in finite generation of the extensions of associated graded rings along the valuation. We will say that ν does not split in S if ν ∗ is the unique extension of ν to K ∗ which dominates S. We show in Theorem 0.5 that if R and S are regular local rings, ν ∗ has rational rank 1 and is not discrete and grν ∗ (S) is a finitely generated grν (R)-algebra, then ν does not split in S. We give examples showing that such a strong statement is not true when ν does not satisfy these assumptions. As a consequence of Theorem 0.5, we deduce in Corollary 0.6 that if ν has rational rank 1 and is not discrete and if R → R′ is a nontrivial sequence of quadratic transforms along ν, then grν (R′ ) is not a finitely generated grν (R)-algebra. Suppose that K is a field. Associated to a valuation ν of K is a value group Φν and a valuation ring Vν with maximal ideal mν . Let R be a local domain with quotient field K. We say that ν dominates R if R ⊂ Vν and mν ∩ R = mR where mR is the maximal ideal of R. We have an associated semigroup S R (ν) = {ν(f ) | f ∈ R}, as well as the associated graded ring along the valuation M M Pγ (R)/Pγ+ (R) = Pγ (R)/Pγ+ (R) (1) grν (R) = γ∈Φν γ∈S R (ν) which is defined by Teissier in [44]. Here Pγ (R) = {f ∈ R | ν(f ) ≥ γ} and Pγ+ (R) = {f ∈ R | ν(f ) > γ}. This ring plays an important role in local uniformization of singularities ([44] and [45]). The ring grν (R) is a domain, but it is often not Noetherian, even when R is. Suppose that K → K ∗ is a finite extension of fields and ν ∗ is a valuation which is an extension of ν to K ∗ . We have the classical indices e(ν ∗ /ν) = [Φν ∗ : Φν ] and f (ν ∗ /ν) = [Vν ∗ /mν ∗ : Vν /mν ] as well as the defect δ(ν ∗ /ν) of the extension. Ramification of valuations and the defect are discussed in Chapter VI of [49], [21] and Kuhlmann’s papers [33] and [35]. A survey partially supported by NSF. 1 is given in Section 7.1 of [16]. By Ostrowski’s lemma, if ν ∗ is the unique extension of ν to K ∗ , we have that (2) [K ∗ : K] = e(ν ∗ /ν)f (ν ∗ /ν)pδ(ν ∗ /ν) where p is the characteristic of the residue field Vν /mν . From this formula, the defect can be computed using Galois theory in an arbitrary finite extension. If Vν /mν has ∗ characteristic 0, then δ(ν ∗ /ν) = 0 and pδ(ν /ν) = 1, so there is no defect. Further, if Φν = Z and K ∗ is separable over K then there is no defect. If K is an algebraic function field over a field k, then an algebraic local ring R of K is a local domain which is essentially of finite type over k and has K as its field of fractions. In [10], it is shown that if K → K ∗ is a finite extension of algebraic function fields over a field k of characteristic zero, ν ∗ is a valuation of K ∗ (which is trivial on k) with restriction ν to K and if R → S is an inclusion of algebraic regular local rings of K and K ∗ such that ν ∗ dominates S and S dominates R then there exists a commutative diagram (3) R1 → S 1 ↑ ↑ R → S where the vertical arrows are products of blowups of nonsingular subschemes along the valuation ν ∗ (monoidal transforms) and R1 → S1 is dominated by ν ∗ and is a monomial mapping; that is, there exist regular parameters x1 , . . . , xn in R1 , regular parameters y1 , . . . , yn in S1 , units δi ∈ S1 , and a matrix A = (aij ) of natural numbers with Det(A) 6= 0 such that n Y (4) xi = δi y aij for 1 ≤ j ≤ n. j=1 In [16], it is shown that this theorem is true, giving a monomial form of the mapping (4) after appropriate blowing up (3) along the valuation, if K → K ∗ is a separable extension of two dimension algebraic function fields over an algebraically closed field, which has no defect. This result is generalized to the situation of this paper, that is when R is a two dimensional excellent local ring, in [14]. However, it may be that such monomial forms do not exist, even after blowing up, if the extension has defect, as is shown by examples in [12]. In the case when k has characteristic zero and for separable defectless extensions of two dimensional algebraic function fields in positive characteristic, it is further shown in [16] that the expressions (3) and (4) are stable under further simple sequences of blow ups along ν ∗ and the form of the matrix A stably reflects invariants of the valuation. We always have an inclusion of graded domains grν (R) → grν ∗ (S) and the index of their quotient fields is (5) [QF(grν ∗ (S)) : QF(grν (R))] = e(ν ∗ /ν)f (ν ∗ /ν) as shown in Proposition 3.3 [13]. Comparing with Ostrowski’s lemma (2), we see that the defect has disappeared in equation (5). Even though QF(grν ∗ (S)) is finite over QF(grν (R)), it is possible for grν ∗ (S) to not be a finitely generated grν (R)-algebra. Examples showing this for extensions R → S of two dimensional algebraic local rings over arbitrary algebraically closed fields are given in Example 9.4 of [17]. It was shown by Ghezzi, Hà and Kashcheyeva in [23] for extensions of two dimensional algebraic function fields over an algebraically closed field k of characteristic zero and later 2 by Ghezzi and Kashcheyeva in [24] for defectless separable extensions of two dimensional algebraic functions fields over an algebraically closed field k of positive characteristic that there exists a commutative diagram (3) such that grν ∗ (S1 ) is a finitely generated grν (R1 )algebra. Further, this property is stable under further suitable sequences of blow ups. In Theorem 1.6 [13], it is shown that for algebraic regular local rings of arbitrary dimension, if the ground field k is algebraically closed of characteristic zero, and the valuation has rank 1 and is zero dimensional (Vν /mν = k) then we can also construct a commutative diagram (3) such that grν ∗ (S1 ) is a finitely generated grν (R1 )-algebra and this property is stable under further suitable sequences of blow ups. An example is given in [8] of an inclusion R → S in a separable defect extension of two dimensional algebraic function fields such that grν ∗ (S1 ) is stably not a finitely generated grν (R1 )-algebra in diagram (3) under sequences of blow ups. This raises the question of whether the existence of a finitely generated extension of associated graded rings along the valuation implies that K ∗ is a defectless extension of K. We find that we must impose the condition that K ∗ is a separable extension of K to obtain a positive answer to this question, as there are simple examples of inseparable defect extensions such that grν ∗ (S) is a finitely generated grν (R)-algebra, such as in the following example, which is Example 8.6 [33]. Let k be a field of characteristic p > 0 and k((x)) be the field of formal power series over k, with the x-adic valuation νx . Let y ∈ k((x)) be transcendental over k(x) with νx (y) > 0. Let ỹ = y p , and K = k(x, ỹ) ⊂ K ∗ = k(x, y). Let ν ∗ = νx |K ∗ and ν = νx |K. Then we have equality of value groups Φν = Φν ∗ = ν(x)Z and equality of residue fields of valuation rings Vν /mν = Vν ∗ /mν ∗ = k, so e(ν ∗ /ν) = 1 and f (ν ∗ /ν) = 1. We have that ν ∗ is the unique extension of ν to K ∗ since K ∗ is purely inseparable over K. By Ostrowski’s lemma (2), the extension (K, ν) → (K ∗ , ν ∗ ) is a defect extension with defect δ(ν ∗ /ν) = 1. Let R = k[x, ỹ](x,ỹ) → S = k[x, y](x,y) . Then we have equality grν (R) = k[t] = grν ∗ (S) where t is the class of x. In this paper we show that the question does have a positive answer for separable extensions in the following theorem. Theorem 0.1. Suppose that R is a 2 dimensional excellent local domain with quotient field K. Further suppose that K ∗ is a finite separable extension of K and S is a 2 dimensional local domain with quotient field K ∗ such that S dominates R. Suppose that ν ∗ is a valuation of K ∗ such that ν ∗ dominates S. Let ν be the restriction of ν ∗ to K. Then the extension (K, ν) → (K ∗ , ν ∗ ) is without defect if and only if there exist regular local rings R1 and S1 such that R1 is a local ring of a blow up of R, S1 is a local ring of a blowup of S, ν ∗ dominates S1 , S1 dominates R1 and grν ∗ (S1 ) is a finitely generated grν (R1 )-algebra. We immediately obtain the following corollary for two dimensional algebraic function fields. Corollary 0.2. Suppose that K → K ∗ is a finite separable extension of two dimensional algebraic function fields over a field k and ν ∗ is a valuation of K ∗ with restriction ν to K. Then the extension (K, ν) → (K ∗ , ν ∗ ) is without defect if and only if there exist algebraic regular local rings R of K and S of K ∗ such that ν ∗ dominates S, S dominates R and grν ∗ (S) is a finitely generated grν (R)-algebra. We see from Theorem 0.1 that the defect, which is completely lost in the extension of quotient fields of the associated graded rings along the valuation (5), can be recovered 3 from knowledge of all extensions of associated graded rings along the valuation of regular local rings R1 → S1 within the field extension which dominate R → S and are dominated by the valuation. The fact that there exists R1 → S1 as in the conclusions of the theorem if the assumptions of the theorem hold and the extension is without defect is proven within 2dimensional algebraic function fields over an algebraically closed field in [23] and [24], and in the generality of the assumptions of Theorem 0.1 in Theorems 4.3 and 4.4 of [14]. Further, if the assumptions of the theorem hold and the defect δ(ν ∗ /ν) 6= 0, then the value group Φν ∗ is not finitely generated by Theorem 7.3 [16] in the case of algebraic function fields over an algebraically closed field. With the full generality of the hypothesis of Theorem 0.1 , the defect is zero by Corollary 18.7 [21] in the case of discrete, rank 1 valuations and the defect is zero by Theorem 3.7 [14] in the case of rational rank 2 valuations, so by Abhyankar’s inequality, Proposition 2 [1] or Appendix 2 [49], if the defect δ(ν ∗ /ν) 6= 0, then the value group Φν ∗ has rational rank 1 and is not discrete and Vν ∗ /mν ∗ is algebraic over S/mS . Thus to prove Theorem 0.1, we have reduced to proving the following proposition, which we establish in this paper. Proposition 0.3. Suppose that R is a 2 dimensional excellent local domain with quotient field K. Further suppose that K ∗ is a finite separable extension of K and S is a 2 dimensional local domain with quotient field K ∗ such that S dominates R. Suppose that ν ∗ is a valuation of K ∗ such that ν ∗ dominates S. Let ν be the restriction of ν ∗ to K. Suppose that ν ∗ has rational rank 1 and ν ∗ is not discrete. Further suppose that there exist regular local rings R1 and S1 such that R1 is a local ring of a blow up of R, S1 is a local ring of a blowup of S, ν ∗ dominates S1 , S1 dominates R1 and grν ∗ (S1 ) is a finitely generated grν (R1 )-algebra. Then the defect δ(ν ∗ /ν) = 0. Another factor in the question of finite generation of extensions of associated graded rings along a valuation is the splitting of ν in K ∗ . We will say that ν does not split in S if ν ∗ is the unique extension of ν to K ∗ such that ν ∗ dominates S. After a little blowing up, we can always obtain non splitting, as the following lemma shows. Lemma 0.4. Given an extension R → S as in the hypotheses of Theorem 0.1, there exists a normal local ring R′ which is a local ring of a blow up of R such that ν dominates R′ and if R1 → S 1 ↑ ↑ R → S is a commutative diagram of normal local rings, where R1 is a local ring of a blow up of R and S1 is a local ring of a blow up of S, ν ∗ dominate S1 and R1 dominates R′ , then ν does not split in S1 . Lemma 0.4 will be proven in Section 1. We have the following theorem. Theorem 0.5. Suppose that R is a 2 dimensional excellent regular local ring with quotient field K. Further suppose that K ∗ is a finite separable extension of K and S is a 2 dimensional regular local ring with quotient field K ∗ such that S dominates R. Suppose that ν ∗ is a valuation of K ∗ such that ν ∗ dominates S. Let ν be the restriction of ν ∗ to K. Further suppose that ν ∗ has rational rank 1 and ν ∗ is not discrete. Suppose that grν ∗ (S) is a finitely generated grν (R)-algebra. Then S is a localization of the integral closure of R in K ∗ , the defect δ(ν ∗ /ν) = 0 and ν ∗ does not split in S. 4 We give examples showing that the condition rational rank 1 and discrete on ν ∗ in Theorem 0.5 are necessary. As an immediate consequence of Theorem 0.5, we obtain the following corollary. Corollary 0.6. Suppose that R is a 2 dimensional excellent regular local ring with quotient field K. Suppose that ν is a valuation of K such that ν dominates R. Further suppose that ν has rational rank 1 and ν is not discrete. Suppose that R → R′ is a nontrivial sequence of quadratic transforms along ν. Then grν (R′ ) is not a finitely generated grν (R)-algebra. In [47], Michel Vaquié extends MacLane’s theory of key polynomials [37] to show that if (K, ν) → (K ∗ , ν ∗ ) is a finite extension of valued fields with δ(ν ∗ /ν) = 0 and ν ∗ is the unique extension of ν to K ∗ , then ν ∗ can be constructed from ν by a finite sequence of augmented valuations. This suggests that a converse of Theorem 0.5 may be true. We thank Bernard Teissier for discussions on the topics of this paper. 1. Local degree and defect We will use the following criterion to measure defect, which is Proposition 3.4 [14]. This result is implicit in [16] with the assumptions of Proposition 0.3. Proposition 1.1. Suppose that R is a 2 dimensional excellent local domain with quotient field K. Further suppose that K ∗ is a finite separable extension of K and S is a 2 dimensional local domain with quotient field K ∗ such that S dominates R. Suppose that ν ∗ is a valuation of K ∗ such that ν ∗ dominates S, the residue field Vν ∗ /mν ∗ of Vν ∗ is algebraic over S/mS and the value group Φν ∗ of ν ∗ has rational rank 1. Let ν be the restriction of ν ∗ to K. There exists a local ring R′ of K which is essentially of finite type over R, is dominated by ν and dominates R such that if we have a commutative diagram (6) Vν → Vν ∗ ↑ ↑ R1 → S 1 ↑ R′ ↑ ↑ R → S where R1 is a regular local ring of K which is essentially of finite type over R and dominates R, S1 is a regular local ring of K ∗ which is essentially of finite type over S and dominates S, R1 has a regular system of parameters u, v and S1 has a regular system of parameters x, y such that there is an expression u = γxa , v = xb f where a > 0, b ≥ 0, γ is a unit in S, x 6 | f in S1 and f is not a unit in S1 , then (7) ad[S1 /mS1 : R1 /mR1 ] = e(ν ∗ /ν)f (ν ∗ /ν)pδ(ν ∗ /ν) where d = ν(f mod x) with ν being the natural valuation of the DVR S/xS. We now prove Lemma 0.4 from the introduction. Let ν1 = ν ∗ , ν2 , . . . , νr be the extensions of ν to K ∗ . Let T be the integral closure of Vν in K ∗ . Then T = Vν1 ∩ · · · ∩ Vνr is the integral closure of Vν ∗ in K ∗ (by Propositions 2.36 and 2.38 [3]). Let mi = mνi ∩ T 5 be the maximal ideals of T . By the Chinese remainder theorem, there exists u ∈ T such that u ∈ m1 and u 6∈ mi for 2 ≤ i ≤ r. Let un + a1 un−1 + · · · + an = 0 be an equation of integral dependence of u over Vν . Let A be the integral closure of R[a1 , . . . , an ] in K and let R′ = AA∩mν . Let T ′ be the integral closure of R′ in K ∗ . We have that u ∈ T ′ ∩ mi if and only if i = 1. Let S ′ = TT′ ′ ∩m1 . Then ν does not split in S ′ and R′ has the property of the conclusions of the lemma. 2. Generating Sequences Given an additive group G with λ0 , . . . , λr ∈ G, G(λ0 , . . . , λr ) will denote the subgroup generated by λ0 , . . . , λr . The semigroup generated by λ0 , . . . , λr will be denoted by S(λ0 , . . . , λr ). In this section, we will suppose that R is a regular local ring of dimension two, with maximal ideal mR and residue field R/mR . For f ∈ R, let f or [f ] denote the residue of f in R/mR . The following theorem is Theorem 4.2 of [17], as interpreted by Remark 4.3 [17]. Theorem 2.1. Suppose that ν is a valuation of the quotient field of R dominating R. Let L = Vν /mν be the residue field of the valuation ring Vν of ν. For f ∈ Vν , let [f ] denote the class of f in L. Suppose that x, y are regular parameters in R. Then there exist Ω ∈ Z+ ∪ {∞} and Pi (ν, R) ∈ mR for i ∈ Z+ with i < min{Ω + 1, ∞} such that P0 (ν, R) = x, P1 (ν, R) = y and for 1 ≤ i < Ω, there is an expression (8) ni (ν,R) Pi+1 (ν, R) = Pi (ν, R) + λi X ck P0 (ν, R)σi,0 (k) P1 (ν, R)σi,1 (k) · · · Pi (ν, R)σi,i (k) k=1 with ni (ν, R) ≥ 1, λi ≥ 1, (9) 0 6= ck units in R for 1 ≤ k ≤ λi , σi,s (k) ∈ N for all s, k, 0 ≤ σi,s (k) < ns (ν, R) for s ≥ 1. Further, ni (ν, R)ν(Pi (ν, R)) = ν(P0 (ν, R)σi,0 (k) P1 (ν, R)σi,1 (k) · · · Pi (ν, R)σi,i (k) ) for all k. For all i ∈ Z+ with i < Ω, the following are true: 1) ν(Pi+1 (ν, R)) > ni (ν, R)ν(Pi (ν, R)). 2) Suppose that r ∈ N, m ∈ Z+ , jk (l) ∈ N for 1 ≤ l ≤ m and 0 ≤ jk (l) < nk (ν, R) for 1 ≤ k ≤ r are such that (j0 (l), j1 (l), . . . , jr (l)) are distinct for 1 ≤ l ≤ m, and ν(P0 (ν, R)j0 (l) P1 (ν, R)j1 (l) · · · Pr (ν, R)jr (l) ) = ν(P0 (ν, R)j0 (1) · · · Pr (ν, R)jr (1) ) for 1 ≤ l ≤ m. Then " # " # P0 (ν, R)j0 (2) P1 (ν, R)j1 (2) · · · Pr (ν, R)jr (2) P0 (ν, R)j0 (m) P1 (ν, R)j1 (m) · · · Pr (ν, R)jr (m) 1, ,..., P0 (ν, R)j0 (1) P1 (ν, R)j1 (1) · · · Pr (ν, R)jr (1) P0 (ν, R)j0 (1) P1 (ν, R)j1 (1) · · · Pr (ν, R)jr (1) are linearly independent over R/mR . 3) Let ni (ν, R) = [G(ν(P0 (ν, R)), . . . , ν(P( ν, R)i)) : G(ν(P0 (ν, R)), . . . , ν(Pi−1 (ν, R)))]. Then ni (ν, R) divides σi,i (k) for all k in (8). In particular, ni (ν, R) = ni (ν, R)di (ν, R) with di (ν, R) ∈ Z+ 6 4) There exists Ui (ν, R) = P0 (ν, R)w0 (i) P1 (ν, R)w1 (i) · · · Pi−1 (ν, R)wi−1 (i) for i ≥ 1 with w0 (i), . . . , wi−1 (i) ∈ N and 0 ≤ wj (i) < nj (ν, R) for 1 ≤ j ≤ i − 1 such that ν(Pi (ν, R)ni ) = ν(Ui (ν, R)) and setting # " Pi (ν, R)ni (ν,R) αi (ν, R) = Ui (ν, R) then bi,t =  P P0 (ν,R)σi,0 (k) P1 (ν,R)σi,1 (k) ···Pi−1 (ν,R)σi,i−1 (k) σi,i (k)=tni (ν,R) ck Ui (ν,R)(di (ν,R)−t) ∈ R/mR (α1 (ν, R), . . . , αi−1 (ν, R))  for 0 ≤ t ≤ di (ν, R) − 1 and fi (u) = udi (ν,R) + bi,di (ν,R)−1 udi (ν,R)−1 + · · · + bi,0 is the minimal polynomial of αi (ν, R) over R/mR (α1 (ν, R), . . . , αi−1 (ν, R)). The algorithm terminates with Ω < ∞ if and only if either (10) nΩ (ν, R) = [G(ν(P0 (ν, R)), . . . , ν(PΩ (ν, R))) : G(ν(P0 (ν, R)), . . . , ν(PΩ−1 (ν, R)))] = ∞ or (11) nΩ (ν, R) < ∞ (so that αΩ (ν, R) is defined as in 4)) and dΩ (ν, R) = [R/mR (α1 (ν, R), . . . , αΩ (ν, R)) : R/mR (α1 (ν, R), . . . , αΩ−1 (ν, R))] = ∞. If nΩ (ν, R) = ∞, set αΩ (ν, R) = 1. Let notation be as in Theorem 2.1. The following formula is formula B(i) on page 10 of [17]. (12) Suppose that M is a Laurent monomial in P0 (ν, R), P1 (ν, R), . . . , Pi (ν, R) and ν(M ) = 0. Then there sj exist si ∈ Z such that nj Qi P (ν,R) M = j=1 Uj j (ν,R) , so that [M ] ∈ R/mR [α1 (ν, R), . . . , αi (ν, R)]. Define βi (ν, R) = ν(Pi (ν, R)) for 0 ≤ i. Since ν is a valuation of the quotient field of R, we have that (13) Φν = ∪∞ i=1 G(β0 (ν, R), β1 , . . . , βi (ν, R)) and (14) Vν /mν = ∪∞ i=1 R/mR [α1 (ν, R), . . . , αi (ν, R)] The following is Theorem 4.10 [17]. Theorem 2.2. Suppose that ν is a valuation dominating R. Let P0 (ν, R) = x, P1 (ν, R) = y, P2 (ν, R), . . . 7 be the sequence of elements of R constructed by Theorem 2.1. Suppose that f ∈ R and there exists n ∈ Z+ such that ν(f ) < nν(mR ). Then there exists an expansion X X ϕJ P0 (ν, R)j0 · · · Pr (ν, R)jr + h f= aI P0 (ν, R)i0 P1 (ν, R)i1 · · · Pr (ν, R)ir + J I Nr+1 , where r ∈ N, aI are units in R, I, J ∈ ν(P0 (ν, R)i0 P1 (ν, R)i1 · · · Pr (ν, R)ir ) = ν(f ) for all I in the first sum, 0 ≤ ik < nk (ν, R) for 1 ≤ k ≤ r, ν(P0 (ν, R)j0 · · · Pr (ν, R)jr ) > ν(f ) for all terms in the second sum, ϕJ ∈ R and h ∈ mnR . The terms in the first sum are uniquely determined, up to the choice of units ai , whose residues in R/mR are uniquely determined. Let σ0 (ν, R) = 0 and inductively define (15) σi+1 (ν, R) = min{j > σi (ν, R) | nj (ν, R) > 1}. In Theorem 2.2, we see that all of the monomials in the expansion of f are in terms of the Pσi . We have that S(β0 (ν, R), β1 (ν, R), . . . , βσj (ν,R) ) = S(βσ0 (ν, R), βσ1 (ν,R) , . . . , βσj (ν,R) ) for all j ≥ 0 and R/mR [α1 (ν, R), α2 (ν, R), . . . , ασj (ν,R) (ν, R)] = R/mR [ασ1 (ν,R) (ν, R), ασ2 (ν,R) (ν, R), . . . , ασj (ν,R) (ν, R)] for all j ≥ 1. Suppose that R is a regular local ring of dimension two which is dominated by a valuation ν. The quadratic transform T1 of R along ν is defined as follows. Let u, v be a system of regular parameters in R, Then R[ uv ] ⊂ Vν if ν(u) ≤ ν(v) and R[ uv ] ⊂ Vν if ν(u) ≥ ν(v). Let hui hv i or T = R , T1 = R 1 u R[ uv ]∩mν v R[ uv ]∩mν depending on if ν(u) ≤ ν(v) or ν(u) > ν(v). T1 is a two dimensional regular local ring which is dominated by ν. Let (16) R → T1 → T2 → · · · be the infinite sequence of quadratic transforms along ν, so that Vν = ∪i≥1 Ti (Lemma 4.5 [3]) and L = Vν /mν = ∪i≥1 Ti /mTi . For f ∈ R and R → R∗ a sequence of quadratic transforms along ν, we define a strict transform of f in R∗ to be f1 if f1 ∈ R∗ is a local equation of the strict transform in R∗ of the subscheme f = 0 of R. In this way, a strict transform is only defined up to multiplication by a unit in R∗ . This ambiguity will not be a difficulty in our proof. We will denote a strict transform of f in R∗ by stR∗ (f ). We use the notation of Theorem 2.1 and its proof for R and the {Pi (ν, R)}. Recall that U1 = U w0 (1) . Let w = w0 (1). Since n1 (ν, R) and w are relatively prime, there exist a, b ∈ N such that ε := n1 (ν, R)b − wa = ±1. Define elements of the quotient field of R by (17) x1 = (xb y −a )ε , y1 = (x−w y n1 (ν,R) )ε . We have that (18) n (ν,R) a y1 , y 8 x = x1 1 b = xw 1 y1 . Since n1 (ν, R)ν(y) = wν(x), it follows that n1 (ν, R)ν(x1 ) = ν(x) > 0 and ν(y1 ) = 0. We further have that α1 (ν, R) = [y1 ]ε ∈ Vν /mν . (19) Let A = R[x1 , y1 ] ⊂ Vν and mA = mν ∩ A. Let R1 = AmA . We have that R1 is a regular local ring and the divisor of xy in R1 has only one component (x1 = 0). In particular, R → R1 is “free” (Definition 7.5 [16]). R → R1 factors (uniquely) as a product of quadratic transforms and the divisor of xy in R1 has two distinct irreducible factors in all intermediate rings. The following is Theorem 7.1 [17]. Theorem 2.3. Let R be a two dimensional regular local ring with regular parameters x, y. Suppose that R is dominated by a valuation ν. Let P0 (ν, R) = x, P1 (ν, R) = y and {Pi (ν, R)} be the sequence of elements of R constructed in Theorem 2.1. Suppose that Ω ≥ 2. Then there exists some smallest value i in the sequence (16) such that the divisor of xy in Spec(Ti ) has only one component. Let R1 = Ti . Then R1 /mR1 ∼ = R/mR (α1 (ν, R)), and there exists x1 ∈ R1 and w ∈ Z+ such that x1 = 0 is a local equation of the exceptional P2 divisor of Spec(R1 ) → Spec(R), and Q0 = x1 , Q1 = xwn 1 are regular parameters in R1 . 1 We have that Pi+1 (ν, R) Pi (ν, R1 ) = P0 (ν, R1 )wn1 (ν,R)···ni (ν,R) for 1 ≤ i < max{Ω, ∞} satisfy the conclusions of Theorem 2.1 for the ring R1 . We have that G(β0 (ν, R1 ), . . . , βi (ν, R1 )) = G(β0 (ν, R), . . . , βi+1 (ν, R)) for i ≥ 1 so that ni (ν, R1 ) = ni+1 (ν, R) for i ≥ 1 and R1 /mR1 [α1 (ν, R1 ), . . . , αi (ν, R1 )] = R/mR [α1 (ν, R), . . . , αi+1 (ν, R)] for i ≥ 1 so that di (ν, R1 ) = di+1 (ν, R) and ni (ν, R1 ) = ni+1 (ν, R) for i ≥ 1. Let σ0 (ν, R1 ) = 0 and inductively define σi+1 (ν, R1 ) = min{j > σi (1) | nj (ν, R1 ) > 1}. We then have that σ0 (ν, R1 ) = 0 and for i ≥ 1, σi (ν, R1 ) = σi+1 (ν, R) − 1 if n1 (ν, R) > 1 and σi (ν, R1 ) = σi (ν, R) − 1 if n1 (ν, R) = 1, and for all j ≥ 0, S(β0 (ν, R1 ), β1 (ν, R1 ), . . . , βσj+1 (ν,R1 ) (ν, R1 )) = S(βσ0 (1) (ν, R1 ), βσ1 (ν,R1 ) , . . . , βσj (ν,R1 ) (ν, R1 )) Iterating this construction, we produce a sequence of sequences of quadratic transforms along ν, R → R1 → · · · → Rσ1 (ν,R) . Now x, y = Pσ1 (ν,R) are regular parameters in R. By (17) (with y replaced with y) we have that Rσ1 (ν,R) has regular parameters (20) x1 = (xb y−a )ε , y1 = (x−ω ynσ1 (ν,R) (ν,R) )ε where ω, a, b ∈ N satisfy ε = nσ1 (ν,R) (ν, R)b − ωa = ±1. 9 nσ (ν,R) (ν,R1 ) 1 Further, Rσ1 (ν,R1 ) has regular parameters xσ1 (ν,R) , yσ1 (ν,R) where x = δxσ1 (ν,R and 1) yσ1 (ν,R1 ) = stRσ1 (ν,R1 ) Pσ1 (ν,R) (ν, R) with δ ∈ Rσ1 (ν,R) a unit. For the remainder of this section, we will suppose that R is a two dimensional regular local ring and ν is a non discrete rational rank 1 valuation of the quotient field of R with valuation ring Vν , so that Vν /mν is algebraic over R/mR . Suppose that f ∈ R and ν(f ) = γ. We will denote the class of f in Pγ (R)/Pγ+ (R) ⊂ grν (R) by inν (f ). By Theorem 2.2, we have that grν (R) is generated by the initial forms of the Pi (ν, R) as an R/mR -algebra. That is, grν (R) = R/mR [inν (P0 (ν, R)), inν (P1 (ν, R)), . . .] = R/mR [inν (Pσ0 (ν,R) (ν, R)), inν (Pσ1 (ν,R) (ν, R)), . . .]. Thus the semigroup S R (ν) = {ν(f ) | f ∈ R} is equal to S R (ν) = S(β0 (ν, R), β1 (ν, R), . . .) = S(βσ0 (ν,R) (ν, R), βσ1 (ν,R) (ν, R), . . .) and the value group Φν = G(β0 (ν, R), β1 (ν, R) . . .) and the residue field of the valuation ring Vν /mν = R/mR [α1 (ν, R), α2 (ν, R), . . .] = R/mR [ασ1 (ν, R), ασ2 (ν, R), . . .] By 1) of Theorem 2.1, every element β ∈ S R (ν) has a unique expression β= r X ai βi (ν, R) i=0 for some r with ai ∈ N for all i and 0 ≤ ai < ni (ν, R) for 1 ≤ i. In particular, if ai 6= 0 in the expansion then βi (ν, R) = βσj (ν,R) (ν, R) for some j. Lemma 2.4. Let σi = σi (ν, R), βi = βi (ν, R), Pi = Pi (ν, R), ni = ni (ν, R), ni = ni (ν, R), σi (1) = σi (ν, Rσ1 ), βi = βi (ν, Rσ1 ), Pi (1) = Pi (ν, Rσ1 ), ni (1) = ni (ν, Rσ1 ), ni (1) = ni (ν, Rσ1 ). Suppose i ∈ N, r ∈ N and aj ∈ N for j = 0, . . . , r with 0 ≤ aj < nσj for j ≥ 1 are such that ν(Pσa00 · · · Pσarr ) > ν(Pσi ) or r < i and ν(Pσa00 · · · Pσarr ) = ν(Pσi ). By (18) and Theorem 2.3, we have expressions in Rσ1 = R[x1 , y1 ]mν ∩R[x1 ,y1 ] where x1 , y1 are defined by (20) Pσa00 · · · Pσarr = y1aa0 +ba1 Pσ1 (1) (1)a2 · · · Pσr−1 (1) (1)ar Pσ0 (1) (1)t where t = nσ1 a0 + ωa1 + ωnσ1 a2 + · · · + ωnσ1 · · · nσr−1 ar and  a if i = 0  y1 Pσ0 (1) (1)nσ1 if i = 1 y1b Pσ0 (1) (1)ω Pσi =  Pσi−1 (1) (1)Pσ0 (1) (1)ωnσ1 ···nσi−1 if i ≥ 2. 10 Let Then   nσ1 ω λ=  ωnσ1 · · · nσi−1 if i = 0 if i = 1 if i ≥ 2. t > λ, except in the case where i = 1, Pσa00 · · · Pσarr = Pσ0 , and nσ1 = ω = 1. In this case λ = t. Proof. First suppose that i ≥ 2 and r ≥ i. Then t − λ = (nσ1 a0 + ωa1 + ωnσ1 a2 + · · · + ωnσ1 · · · nσr−1 ar ) − ωnσ1 · · · nσi−1 > 0. Now suppose that i ≥ 2 and r < i. We have that (n1 a0 + ωa1 + . . . + ωn1 · · · nr−1 ar − ωn1 (ν, R) · · · ni−1 )βσ0 (1) (1) ≥ βσi−1 (1) (1) − a2 βσ1 (1) (1) − . . . − ar βσr−1 (1) (1) > 0 since nσj (1) (1) = nσj+1 for all j, and so nσj+1 βσj (1) (1) < βσj+1 (1) (1) for all j. Now suppose that i = 1. As in the proof for the case i ≥ 2 we have that t − λ > 0 if r ≥ 1, so suppose that i = 1 and r = 0. Then nσ1 βσ1 = ωβσ0 . From our assumption a0 ν(P0 ) ≥ ν(P1 ) we obtain t − λ = nσ1 a0 − ω ≥ 0 with equality if and only if a0 = ω = nσ1 = 1 since gcd(ω, nσ1 ) = 1. Now suppose i = 0. As in the previous cases, we have t − λ > 0 if r > 1 and t − λ > 0 if r = 1 except possibly if P0a0 · · · Prar = P1a1 . We then have that ν(Pσa11 ) > ν(Pσ0 ), and so a1 βσ1 > 1. βσ0 Since βσ1 ω = , βσ0 nσ1 we have that t − λ = ωa1 − nσ1 > 0.  Lemma 2.5. Let notation be as in Lemma 2.4. Suppose that f ∈ R, with ν(f ) = ν(Pσi ) for some i ≥ 0, and that f has an expression of the form of Theorem 2.2, f = cPσi + s X ci Pσa00 (j) Pσa11 (j) · · · Pσarr (j) + h j=1 where s, r ∈ N, c, cj are units in R, with 0 ≤ ak (j) < nk for 1 ≤ k ≤ r for 1 ≤ j ≤ s, ν(f ) = ν(Pσi ) ≤ ν(Pσa00 (j) Pσa11 (j) · · · Pσarr (j) ) a (j) a (j) for 1 ≤ j ≤ s, ak (j) = 0 for k ≥ i if ν(f ) = ν(Pσ0p · · · Pσrr ) and h ∈ mnR with n > ν(f ). Then stRσ1 (f ) is a unit in Rσ1 if i = 0 or 1 and if i > 1, there exists a unit c in Rσ1 and Ω ∈ Rσ1 such that stRσ1 (f ) = cPσi−1 (1) (1) + x1 Ω with ν(stRσ1 (f )) = ν(Pσi−1 (1) (1)) and ν(Pσi−1 (1) (1)) ≤ ν(x1 Ω). 11 Proof. Let   n1 ω λ=  ωnσ1 · · · nσr−1 Then f = cHi + s X if i = 0 if i = 1 if i ≥ 2 cj (y1 )aa0 (j)+ba1 (j) Pσ0 (1) (1)tj Pσ1 (1)a2 (j) · · · Pσr−1 (1) (1)ar (j) + Pσ0 (1) (1)t h′ j=1 with   (y1 )a Pσ0 (1) (1)n1 (y1 )b Pσ0 (1) (1)ω Hi =  Pσ0 (1) (1)ωn1 ···ni−1 Pσi−1 (1) (1) and if i = 0 if i = 1 if i ≥ 2 tj = n1 a0 (j) + ωa1 (j) + ωnσ1 a2 + · · · + ωnσ1 · · · nσr−1 ar (j) for 1 ≤ j ≤ s, t > λ and h′ ∈ Rσ1 . By Lemma 2.4, if i ≥ 2 or i = 0, we have that tj > λ for all j. Thus f = Pσ0 (1) (1)λ f where f = cGi + s X cj Pσ0 (1) (1)tj −λ Pσ1 (1) (1)a2 (j) · · · Pσr−1 (1) (1)ar (j) + Pσ0 (1) (1)t−λ h′ j=1 with   (y1 )a (y1 )b Gi =  Pσi−1 (1) (1) if i = 0 if i = 1 if i ≥ 2 is a strict transform f = stR1 (f ) of f in R1 . If i = 1, then by Lemma 2.4, tj > λ for all j, except possibly for a single term (that we can assume is t1 ) which is Pσ0 , and we have that ω = nσ1 = 1. In this case t1 = λ. Then   Pσ1 = ασ1 (ν, R) ∈ Vν /mν Pσ0 which has degree dσ1 (ν, R) = nσ1 > 1 over R/mR . By (18), x = x1 , y = x1 y1 and f = x1 [c + c1 y1 + x1 Ω] with Ω ∈ Rσ1 . We have that c + c1 y1 is a unit in Rσ1 since   Pσ0 [y1 ] = 6∈ R/mR . Pσ1  3. Finite generation implies no defect Suppose that R is a two dimensional regular local ring of K and S is a two dimensional regular local ring such that S dominates R Let K be the quotient field of R and K ∗ be the quotient field of S. Suppose that K → K ∗ is a finite separable field extension. Suppose that ν ∗ is a non discrete rational rank 1 valuation of K ∗ such that Vν ∗ /mν ∗ is algebraic over S/mS and that ν ∗ dominates S. Then we have a natural graded inclusion grν (R) → grν ∗ (S), so that for f ∈ R, we have that inν (f ) = inν ∗ (f ). Let ν = ν ∗ |K. Let L = Vν ∗ /mν ∗ . Suppose that grν ∗ (S) is a finitely generated grν (R)-algebra. Let x, y be regular parameters in R, with associated generating sequence to ν, P0 = P0 (ν, R) = x, P1 = P1 (ν, R) = y, P2 = P2 (ν, R), . . . in R as constructed in Theorem 2.1, 12 with Ui = Ui (ν, R), βi = βi (ν, R) = ν(Pi ), γi = αi (ν, R), mi = mi (ν, R), mi = mi (ν, R), di = di (ν, R) and σi = σi (ν, R) defined as in Section 2. Let u, v be regular parameters in S, with associated generating sequence to ν ∗ , Q0 = P0 (ν ∗ , S) = u, Q1 = P1 (ν ∗ , S) = v, Q2 = P2 (ν ∗ , S), . . . in S as constructed in Theorem 2.1, with Vi = Ui (ν ∗ , S), γi = βi (ν ∗ , S) = ν ∗ (Qi ), δi = αi (ν ∗ , S), ni = ni (ν ∗ , S), ni = ni (ν ∗ , S), ei = αi (ν ∗ , S) and τi = σi (ν ∗ , S) defined as in Section 2. With our assumption that grν ∗ (S) is a finitely generated grν (R)-algebra, we have that for all sufficiently large l, grν ∗ (S) = grν (R)[inν ∗ Qτ0 , . . . , inν ∗ Qτl ]. (21) Proposition 3.1. With our assumption that grν ∗ (S) is a finitely generated grν (R)-algebra, there exist integers s > 1 and r > 1 such that for all j ≥ 0, βσr+j = γτs+j , mσr+j = nτs+j , dσr+j = eτs+j , mσr+j = nτs+j , G(βσ0 , . . . , βσr+j ) ⊂ G(γτ0 , . . . , γτs+j ), [G(γτ0 , . . . , γτs+j ) : G(βσ0 , . . . , βσr+j )] = e(ν ∗ /ν), R/mR [δσ1 , . . . , δσr+j ] ⊂ S/mS [ετ1 , . . . , ετs+j ] and [S/mS [ετ1 , . . . , ετs+j ] : R/mR [δσ1 , . . . , δσr+j ]] = f (ν ∗ /ν). Proof. Let l be as in (21). For s ≥ l, define the sub algebra Aτs of grν ∗ (S) by Aτs = S/mS [inν ∗ Qτ0 , . . . , inν ∗ Qτs ]. For s ≥ l, let rs = max{j | inν ∗ Pσj ∈ Aτs }, λs = [G(γτ0 , . . . , γτs ) : G(βσ0 , . . . , βσrs )], and χs = [S/mS [ετ0 , . . . , ετs ] : R/mR [δσ0 , . . . , δσrs ]]. To simplify notation, we will write r = rs . We will now show that βσr+1 = γτs+1 . Suppose that βσr+1 > γτs+1 . We have that inν ∗ Qτs+1 ∈ grν (R)[inν ∗ Qτ0 , . . . , inν ∗ Qτs ]. Since βσr+1 < βσr+2 < · · · we then have that in Qτs+1 ∈ Aτs which is impossible. Thus βσr+1 ≤ γτs+1 . If βσr+1 < γτs+1 , then since γτs+1 < γτs+2 < · · · and inν ∗ Pσr+1 ∈ grν ∗ (S), we have that inν ∗ Pσr+1 ∈ Aτs , which is impossible. Thus βσr+1 = γτs+1 . We will now establish that either we have a reduction λs+1 < λs or ν∗ (22) λs+1 = λs , βσr+1 = γτs+1 and mσr+1 = nτs+1 . Let ω be a generator of the group G(γτ1 , . . . , γτs ), so that G(γτ1 , . . . , γτs ) = Zω. We have that 1 Zω G(γτ0 , . . . , γτs+1 ) = nτs+1 13 and 1 G(βσ0 , . . . , βσr+1 ) = Z(λs ω). mσr+1 There exists a positive integer f with gcd(f, nτs+1 ) = 1 such that γτs+1 = f nτs+1 ω There exists a positive integer g with gcd(g, mσr+1 ) = 1 such that g βσr+1 = λs ω. mσr+1 Since βσr+1 = γτs+1 , we have Thus nτs+1 divides mσr+1 gλs nτs+1 = f mσr+1 . and mσr+1 divides λs nτs+1 , so that mσr+1 a= nτs+1 is a positive integer and defining λ= λs , a we have that λ is a positive integer with λ λs = mσr+1 nτs+1 and λ = [G(γτ0 , . . . , γτs+1 ) : G(βσ0 , . . . , βσr+1 )]. Since λs+1 ≤ λ, either λs+1 < λs or λs+1 = λs and mσr+1 = nτs+1 . We will now suppose that s is sufficiently large that (22) holds. Since inν ∗ Qτs+1 ∈ grν ∗ (S) = grν (R)[inν ∗ Qτ0 , . . . , inν ∗ Qτs ], if nτs+1 > 1 we have an expression (23) inν ∗ Pσr+1 = inν ∗ (α)inν ∗ Qτs+1 in Pγτs+1 (S)/Pγ+τs+1 (S) with α a unit in S and if nτs+1 = 1, since inν ∗ Pσr+1 6∈ Aτs , we have an expression X (24) inν ∗ Pσr+1 = inν ∗ (α)inν ∗ Qτs+1 + inν ∗ (αJ )(inν ∗ Qτ0 )j0 · · · (inν ∗ Qτs )js in Pγτs+1 (S)/Pγ+τs+1 (S) with α a unit in S and the sum is over certain J = (ji , . . . , js ) ∈ Ns such that the αJ are units in S, and the terms inν ∗ Qτs+1 and the (inν ∗ Qτ0 )j0 · · · (inν ∗ Qτs )js are linearly independent over S/mS . The monomial Uσr+1 in Pσ0 , . . . , Pσr and the monomial Vτs+1 in Qτ0 , . . . , Qτs both have the value nτs+1 γτs+1 = mσr+1 βσr+1 , and satisfy " nτ # s+1 Qτs+1 ετs+1 = Vτs+1 and δσr+1 nτs+1 # Pσr+1 = . Uσr+1 " 14 Since Uσr+1 , Vτs+1 ∈ Aτs and by (12) and 2) of Theorem 2.1, we have that   Vτs+1 ∈ S/mS [ετ1 , . . . , ετs ]. Uσr+1 If nτs+1 > 1, then by (23), we have " nτ #! " nτ #   s+1 s+1 Vτs+1 Qτs+1 Pσr+1 [α]nτs+1 = Uσr+1 Uσr+1 Vτs+1 in L = Vν ∗ /mν ∗ , and if nτs+1 = 1, then by (24), we have " #!      X  Qτs+1 Vτs+1 Pσr+1 Qjτ00 · · · Qjτss [α] = + [αJ ] . Uσr+1 Uσr+1 Vτs+1 Vτs+1 Thus by equation (12), (25) S/mS [ετ1 , . . . , ετs ][ετs+1 ] = S/mS [ετ1 , . . . , ετs ][δσr+1 ]. We have a commutative diagram S/mS [ετ1 , . . . , ετs ] → S/mS [ετ1 , . . . , ετs , ετs+1 ] = S/mS [ετ1 , . . . , ετs ][δσr+1 ] ↑ ↑ R/mR [δσ1 , . . . , δσr ] → R/mR [δσ1 , . . . , δσr ][δσr+1 ]. Let χ = [S/mS [ετ1 , . . . , ετs , ετs+1 ] : R/mR [δσ1 , . . . , δσr , δσr+1 ]]. Since S/mS [ετ1 , . . . , ετs , ετs+1 ] = S/mS [ετ1 , . . . , ετs ][δσr+1 ], we have that eτs+1 |dσr+1 . Further, dσr+1 χ = χs , eτs+1 whence χ ≤ χs . Thus χs+1 ≤ χs and if χs+1 = χs , then dσr+1 = eτs+1 and rs+1 = rs + 1 since Pσr+2 ∈ Aτs+1 implies λs+1 < λs or χs+1 < χs . We may thus choose s sufficiently large that there exists an integer r > 1 such that for all j ≥ 0, βσr+j = γτs+j , mσr+j = nτs+j , dσr+j = eτs+j , mσr+j = nτs+j , G(βσ0 , . . . , βσr+j ) ⊂ G(γτ0 , . . . , γτs+j ), there is a constant λ (which does not depend on j) such that [G(γτ0 , . . . , γτs+j ) : G(βσ0 , . . . , βσr+j )] = λ R/mR [δσ1 , . . . , δσr+j ] ⊂ S/mS [ετ1 , . . . , ετs+j ] and there is a constant χ (which does not depend on j) such that [S/mS [ετ1 , . . . , ετs+j ] : R/mR [δσ1 , . . . , δσr+j ]] = χ. Then Φν ∗ = ∪j≥1 1 Zω nτs+1 · · · nτs+j where G(γτ0 , . . . , γτs ) = Zω, and Φν = ∪j≥1 1 1 λZω = ∪j≥1 λZω mσr+1 · · · mσr+j nτs+1 · · · nτs+j 15 so that λ = [Φν ∗ : Φν ] = e(ν ∗ /ν). For i ≥ 0, let Ki = R/mR [δσ1 , . . . , δσr+i ] and Mi = S/mS [ετ1 , . . . , ετs+i ]. We have that Mi+1 = Mi [δσr+i+1 ] for i ≥ 0 and χ = [Mi : Ki ] for all i. Further, ∞ ∪∞ i=0 Mi = Vν ∗ /mν ∗ and ∪i=0 Ki = Vν /mν . Thus if g1 , . . . , gλ ∈ M0 form a basis of M0 as a K0 -vector space, then g1 , . . . , gλ form a basis of Mi as a Ki -vector space for all i ≥ 0. Thus χ = [Vν ∗ /mν ∗ : Vν /mν ] = f (ν ∗ /ν).  Let r and s be as in the conclusions of Proposition 3.1. There exists τt with t ≥ s such that we have a commutative diagram of inclusions of regular local rings (with the notation introduced in Section 2) Rσr → Sτt ↑ ↑ R → S. After possibly increasing s and r, we may assume that R′ ⊂ Rσr , where R′ is the local ring of the conclusions of Proposition 1.1. Recall that R has regular parameters x = P0 , y = P1 and S has regular parameters u = Q0 , v = Q1 , Rσr has regular parameters xσr , yσr such that mσ1 ···mσr x = δxσr , yσr = stRσr Pσr+1 where δ is a unit in Rσr and Sτt has regular parameters uτt , vτt such that nτ ···nτt u = εuτt 1 , vτt = stSτt Qτt+1 where ε is a unit in Sτt . We may choose t ≫ 0 so that we we have an expression xσr = ϕuλτt (26) for some positive integer λ where ϕ is a unit in Sτt , since ∪∞ t=0 Sτt = Vν ∗ . We have expressions Pi = ψi xcσir in Rσr where ψi are units in Rσr for i ≤ σr so that Pi = ψi∗ ucτitλ in Sτt where ψi∗ are units in Sτt for i ≤ σr by (26). Lemma 3.2. For j ≥ 1 we have λ stRσr (Pσr+j ) = uτtj stSτt (Pσr+j ) for some λj ∈ N, where we regard Pσr+j as an element of R on the left hand side of the equation and regard Pσr+j as an element of S on the right hand side. Proof. Using (26), we have f λf Pσr+j = stRσr (Pσr+j )xσjr = stRσr (Pσr+j )uτt j ϕfj where fj ∈ N. Viewing Pσr+j as an element of S, we have that g Pσr+j = stSτt (Pσr+j )uτtj for some gj ∈ N. Since uτt 6 | stSτt (Pσr+j ), we have that fj λ ≤ gj and so λj = gj − fj λ ≥ 0.  16 By induction in the sequence of quadratic transforms above R and S in Lemma 2.5, and since ν ∗ (Pσr+j ) = βσr+j = γτs+j by Proposition 3.1, we have by (23) and (24) an expression (27) stSτt (Pσr+j ) = cstSτt (Qτs+j ) + uτt Ω with c ∈ Sτt a unit, Ω ∈ Sτt and ν ∗ (uτt Ω) ≥ ν ∗ (stSτt (Qτs+j )) if s + j > t and (28) Sτt (Pσr+j ) is a unit in Sτt d if s + j ≤ t. Thus Pσr+j = uτtj ϕj in Sτt where dj is a positive integer and ϕj is a unit in Sτt if s + j ≤ t. Suppose s < t. Then yσr = stRσr (Pσr+1 ) = ϕ̃uhτt where ϕ̃ is a unit in Sτt and h is a positive integer. As shown in equation (20) of Section 2, Rσr+1 = Rσr [x1 , y 1 ]mν ∩Rσr [x1 ,y1 ] where mσr ε x1 = (xbσr yσ−a )ε , y 1 = (x−ω σr yσr ) r with ε = mσr b − ωa = ±1, ν(x1 ) > 0 and ν(y 1 ) = 0. Substituting xσr = ϕuλτt and yσ1 = ϕ̃uhτt we see that Rσr+1 is dominated by Sτt . We thus have a factorization Rσr → Rσr+1 → Sτt ′ with xσr+1 = x1 = ϕ̂uλτt where ϕ̂ is a unit in Sτt and λ′ is a positive integer. We may thus replace s with s + 1, r with r + 1 and Rσr with Rσr+1 . Iterating this argument, we may assume that s = t (with r = rs ) so that by Lemma 3.2, (28) and (27), yσr = stRσr (Pσr+1 ) = uµτs stSτs (Pσr+1 ) where stSτs (Pσr+1 ) = c stSτs (Qτs+1 ) + uτs Ω with c a unit in Sτs and Ω ∈ Sτs . Thus by (26), we have an expression xσr = ϕuλτs , yσr = εuατs (vτs + uτs Ω) where λ is a positive integer, α ∈ N, ϕ and ε are units in Sτs and Ω ∈ Sτs . We have that ν ∗ (xσr ) = λν ∗ (uτs ), ν(xσr )Z = G(ν(xσr )) = G(βσ0 , . . . , βσr ) and ν ∗ (uτs )Z = G(ν ∗ (uτs )) = G(γτ0 , . . . , γτs ). Thus λ = [G(γτ0 , . . . , γτs ) : G(βσ0 , . . . , βσr )] = e(ν ∗ /ν) by Proposition 3.1. By Theorem 2.3, we have that Rσr /mRσr = R/mR [δσ1 , . . . , δσr ] and Sτs /mSτs = S/mS [ετ1 , . . . , ετs ]. Thus [Sτs /mSτs : Rσr /mRσr ] = f (ν ∗ /ν) by Proposition 3.1. 17 Since the ring R′ of Proposition 1.1 is contained in Rσr by our construction, we have by Proposition 1.1 that (K, ν) → (K ∗ , ν ∗ ) is without defect, completing the proofs of Proposition 0.3 and Theorem 0.1. 4. non splitting and finite generation In this section, we will have the following assumptions. Suppose that R is a 2 dimensional excellent local domain with quotient field K. Further suppose that K ∗ is a finite separable extension of K and S is a 2 dimensional local domain with quotient field K ∗ such that S dominates R. Suppose that ν ∗ is a valuation of K ∗ such that ν ∗ dominates S. Let ν be the restriction of ν ∗ to K. Suppose that ν ∗ has rational rank 1 and ν ∗ is not discrete. Then Vν ∗ /mν ∗ is algebraic over S/mS , by Abhyankar’s inequality, Proposition 2 [1]. Lemma 4.1. Let assumptions be as above. Then the associated graded ring grν ∗ (S) is an integral extension of grν (R). Proof. It suffices to show that inν ∗ (f ) is integral over grν (R) whenever f ∈ S. Suppose that f ∈ S. There exists n1 > 0 such that n1 ν ∗ (f ) ∈ Φν . Let x ∈ mR and ω = ν(x). Then there exists a positive integer b and natural number a such that bn1 ν ∗ (f ) = aω, so  bn1  f = 0. ν∗ xa Let  bn1  f ξ= ∈ Vν ∗ /mν ∗ , xa and let g(t) = tr + ar−1 tr−1 + · · · + a0 with ai ∈ R/mR be the minimal polynomial of ξ over R/mR . Let ai be lifts of the ai to R. Then ν ∗ (f b1 n1 r +ar−1 xa f bn1(r−1) +· · ·+a0 xar ) > ν ∗ (f bn1 r ) = ν ∗ (ar−1 xa f bn1(r−1) ) = · · · = ν ∗ (a0 xar ). Thus inν ∗ (f )b1 n1 r + inν (ar−1 xa )inν ∗ (f )bn1 (r−1) + · · · + inν (a0 xar ) = 0 in grν ∗ (S). Thus inν ∗ (f ) is integral over grν ∗ (R).  We now establish Theorem 0.5. Recall (as defined after Proposition 0.3) that ν ∗ does not split in S if ν ∗ is the unique extension of ν to K ∗ which dominates S. Theorem 4.2. Let assumptions be as above and suppose that R and S are regular local rings. Suppose that grν ∗ (S) is a finitely generated grν (R)-algebra. Then S is a localization of the integral closure of R in K ∗ , the defect δ(ν ∗ /ν) = 0 and ν ∗ does not split in S. Proof. Let s and r be as in the conclusions of Proposition 3.1. We will first show that Pσr+j is irreducible in Ŝ for all j > 0. There exists a unique extension of ν ∗ to the quotient field of Ŝ which dominates Ŝ ([43], [17], [22]). The extension is immediate since ν ∗ is not discrete; that is, there is no increase in value group or residue field for the extended valuation. It has the property that if f ∈ Ŝ and {fi } is a a Cauchy sequence in Ŝ which converges to f , then ν ∗ (f ) = ν ∗ (fi ) for all i ≫ 0. Suppose that Pσr+j is not irreducible in Ŝ for some j > 0. We will derive a contradiction. With this assumption, Pσr+j = f g with f, g ∈ mŜ . Let {fi } be a Cauchy sequence in S which converges to f and let {gi } be a Cauchy sequence in S which converges to g. For i sufficiently large, f − fi , g − gi ∈ mnŜ where n is so large that nν ∗ (mŜ ) = 18 nν ∗ (mS ) > ν(Pσr+j ). Thus Pσr+j = fi gi + h with h ∈ mnŜ ∩ S = mnS , and so inν ∗ (Pσr+j ) = inν ∗ (fi )inν ∗ (gi ). Now ν ∗ (fi ), ν ∗ (gi ) < ν(Pσr+j ) = βσr+j = γτs+j = ν ∗ (Qτs+j ) so that inν ∗ (fi ), inν ∗ (gi ) ∈ S/mS [inν ∗ (Qτ0 ), . . . , inν ∗ (Qτs+j−1 )] which implies inν ∗ (Pσr+j ) ∈ S/mS [inν ∗ (Qτ0 ), . . . , inν ∗ (Qτs+j−1 )]. But then (24) implies inν ∗ (Qτs+j ) ∈ S/mS [inν ∗ (Qτ0 ), . . . , inν ∗ (Qτs+j−1 )] which is impossible. Thus Pσr+j is irreducible in Ŝ for all j > 0. If S is not a localization of the integral closure of R in K ∗ , then by Zariski’s Main Theorem (Theorem 1 of Chapter 4 [41]), mR S = f N where f ∈ mS and N is an mS primary ideal. Thus f divides Pi in S for all i, which is impossible since we have shown that Pσr+j is analytically irreducible in S for all j > 0; we cannot have Pσr+j = aj f where aj is a unit in S for j > 0 since ν(Pσr+j ) = ν ∗ (Qτs+j ) by Proposition 3.1. Now suppose that ν ∗ is not the unique extension of ν to K ∗ which dominates S. Recall that Vν is the union of all quadratic transforms above R along ν and Vν ∗ is the union of all quadratic transforms above S along ν ∗ (Lemma 4.5 [3]). Then for all i ≫ 0, we have a commutative diagram Rσi ↑ R → Ti ↑ → T where T is the integral closure of R in K ∗ , Ti is the integral closure of Rσi in K ∗ , S = Tp for some maximal ideal p in T which lies over mR , and there exist r ≥ 2 prime ideals p1 (i), . . . , pr (i) in Ti which lie over mRσi and whose intersection with T is p. We may assume that p1 (i) is the center of ν ∗ . There exists an mR -primary ideal Ii in R such that the blow up of Ii is γ : Xσi → Spec(R) where Xσi is regular and Rσi is a local ring of Xσi . Let Zσi be the integral closure of Xσi in K ∗ . Let Yσi = Zσi ×Spec(T ) Spec(S). We have a commutative diagram of morphisms β Yσi → Xσi δ↓ γ↓ α Spec(S) → Spec(R) The morphism δ is projective (by Proposition II.5.5.5 [25] and Corollary II.6.1.11 [25] and it is birational, so since Yσi and Spec(S) are integral, it is a blow up of an ideal Ji in S (Proposition III.2.3.5 [26]), which we can take to be mS -primary since S is a regular local ring and hence factorial. Define curves C = Spec(R/(Pσi )) and C ′ = α−1 (C) = Spec(S/(Pσi )). Denote the Zariski closure of a set W by W . The strict transform C ∗ of C ′ in Yσi is the Zariski closure (29) C ∗ = δ−1 (C ′ \ mS ) = δ−1 α−1 (C \ mR ) = β −1 γ −1 (C \ mR ) = β −1 (γ −1 (C \ mR )) since β is quasi finite = β −1 (C̃) 19 where C̃ is the strict transform of C in Xσi . We have that Zσi ×Xσi Spec(Rσi ) ∼ = Spec(Ti ), so Yσi ×Xσi Spec(Rσi ) ∼ = Spec(Ti ⊗T S). Let xσi be a local equation in Rσi of the exceptional divisor of Spec(Rσi ) → Spec(R) and let yσi = stRσi (Pσi ). Then xσi , yσi are regular parameters in Rσi . We have that q mRσi (Ti ⊗T S) = ∩rj=1 pj (i)(Ti ⊗T S). The blow up of Ji (S/(Pσi )) in C ′ is δ : C ∗ → C ′ , where δ is the restriction of δ to C ∗ Corollary II.7.15 [28]). Since yσi is a local equation of C̃ in Rσi , we have by (29) that p1 (i), . . . , pr (i) ∈ δ −1 (mS ) ⊂ C ∗ . Since δ is proper and C ′ is a curve, C ∗ = Spec(A) for some excellent one dimensional domain A such that the inclusion S/(Pσi ) → A is finite (Corollary I.1.10 [39]). Let B = A ⊗S/(Pσi ) Ŝ/(Pσi ). Then C ∗ ×Spec(S/(Pσ i )) Spec(Ŝ/(Pσi )) = Spec(B) → Spec(Ŝ/(Pσi )) is the blow up of Ji (Ŝ/(Pσi )) in Ŝ/(Pσi ). The extension Ŝ/(Pσi ) → B is finite since S/(Pσi ) → A is finite. Now assume that S/(Pσi ) is analytically irreducible. Then B has only one minimal prime since the blow up Spec(B) → Spec(Ŝ/(Pσi )) is birational. Since a complete local ring is Henselian, B is a local ring (Theorem I.4.2 on page 32 of [39]), a contradiction to our assumption that r > 1.  As a consequence of the above theorem (Theorem 0.5), we now obtain Corollary 0.6. Corollary 4.3. Let assumptions be as above and suppose that R is a regular local ring. Suppose that R → R′ is a nontrivial sequence of quadratic transforms along ν. Then grν (R′ ) is not a finitely generated grν (R)-algebra. The conclusions of Theorem 0.5 do not hold if we remove the assumption that ν ∗ is not discrete, when Vν /mν is finite over R/mR . We give a simple example. Let k be an algebraically closed field of characteristic not equal to 2 and let p(u) be a transcendental series in the power series ring k[[u]] such that p(0) = 1. Then f = v − up(u) is irreducible in the power series ring k[[u, v]] and k[[u, v]]/(f ) is a discrete valuation ring with regular parameter u. Let ν be the natural valuation of this ring. Let R = k[u, v](u,v) and S = k[x, y](x,y) . Define a k-algebra homomorphism R → S by u 7→ x2 and v 7→ y 2 . The series p p p f (x2 , y 2 ) factorspas f = (y − x p(x2 ))(y + x p(x2 )) in k[[x, y]]. Let f1 = y − x p(x2 ) and f2 = y + x p(x2 ). The rings k[[x, y]]/(fi ) are discrete valuation rings with regular parameter x. Let ν1 and ν2 be the natural valuations of these ring. Let ν be the valuation of the quotient field of R which dominates R defined by the natural inclusion R → k[[u, v]]/(f ) and let νi for i = 1, 2 be the valuations of the quotient field of S which dominate S and are defined by the respective natural inclusions S → k[[x, y]]/(fi ) . Then ν1 and ν2 are distinct extensions of ν to the quotient field of S which dominate S. However, we have that grν (R) = k[inν (u)] and grνi (S) = k[inν ∗ (x)] with inν ∗ (x)2 = inν (u). Thus grνi (S) is a finite grν (R)-algebra. We now give an example where ν ∗ has rational rank 2 and ν splits in S but grν ∗ (S) is a finitely generated grν (R)-algebra. Suppose that k is an algebraically closed field of characteristic not equal to 2. Let R = k[x, y](x,y) and S = k[u, v](u,v) . The substitutions 20 u = x2 and v = y 2 make S into a finite separable extension of R. Define a valuation ν1 of the quotient field K ∗ of S by ν1 (x) = 1 and ν1 (y−x) = π+1 and define a valuation ν2 of the quotient field K ∗ by ν2 (x) = 1 and ν2 (y+x) = π+1. Since u = x2 and v−u = (y−x)(y+x), we have that ν1 (u) = ν2 (u) = 2 and ν1 (v − u) = ν2 (v − u) = π + 2. Let ν be the common restriction of ν1 and ν2 to the quotient field K of R. Then ν splits in S. However, grν1 (S) is a finitely generated grν (R)-algebra since grν1 (S) = k[inν1 (x), inν1 (y − x)] is a finitely generated k-algebra. Note that grν (R) = k[inν (u), inν (v − u)] with inν1 (x)2 = inν (u) and inν (v − u) = 2inν1 (y − x)inν1 (x). References [1] S. Abhyankar, On the valuations centered in a local domain, Amer. J. Math. 78 (1956), 321 - 348. [2] S. Abhyankar, Local uniformization of algebraic surfaces over ground fields of characteristic p 6= 0, Annals of Math. 63 (1956), 491 -526. [3] S. Abhyankar, Ramification theoretic methods in algebraic geometry, Princeton Univ Press, 1959. [4] S. Abhyankar, Resolution of singularities of embedded algebraic surfaces, second edition, Springer Verlag, New York, Berlin, Heidelberg, 1998. [5] A. Benito, O. Villamayor U., Techniques for the study of singularities with application to resolution of 2-dim schemes, Math. Ann. 353 (2012), 1937 - 1068. [6] A. Bravo and O. Villamayor U., Singularities in positive characteristic, Stratification and simplification of the singular locus, Advances in Math. 224, (2010), 1349 - 1418. [7] V. Cossart, U. Jannsen and S. Saito, Canonical embedded and non-embedded resolution of singularities for excellent two-dimensional schemes, arXiv:0905.2191 [8] V. Cossart and O. Piltant, Resolution of singularities of threefolds in positive characteristic I, Reduction to local uniformization on Artin-Schreier and purely inseparable coverings, J. Algebra 320 (2008), 1051 - 1082. [9] V. Cossart, and O. Piltant, Resolution of singularities of threefolds in positive characteristic II, J. Algebra 321 (2009), 1836 - 1976. [10] S.D. Cutkosky, Local factorization and monomialization of morphisms, Astérisque 260, 1999. [11] S.D. Cutkosky, Resolution of Singularities for 3-folds in positive characteristic, Amer. J. Math. 131 (2009), 59 - 127. [12] S.D. Cutkosky, Counterexamples to local monomialization in positive characteristic, Math. Annalen 362 (2015), 321 - 334. [13] S.D. Cutkosky, A generalization of the Abhyankar Jung Theorem to associated graded rings of valuations, to appear in Proc. Cambridge Phil.Soc. [14] S.D. Cutkosky, Ramification of valuations and local rings in positive characteristic, Communications in Algebra 44 (2016), 2828 - 2866. [15] S.D. Cutkosky and L. Ghezzi, Completions of valuation rings, Contemp. math. 386 (2005), 13 - 34. [16] S.D. Cutkosky and O. Piltant, Ramification of Valuations, Advances in Math. 183 (2004), 1-79. [17] S.D. Cutkosky and Pham An Vinh, Valuation semigroups of two dimensional local rings, Proceedings of the London Mathematical Society 108 (2014), 350 - 384. [18] S.D. Cutkosky and Pham An Vinh, Ramification of local rings along valuations, Journal of pure and applied algebra 219 (21015), 2489 - 2505. [19] S.D. Cutkosky and B. Teissier, Semigroups of valuations on local rings, Mich. Math. J. 57 (2008), 173 - 193. [20] A.J. de Jong, Smoothness, semi-stablility and alterations, Inst. Hautes Etudes Sci. Publ. math. 83 (1996) 51 -93. [21] O. Endler, Valuation Theory, Springer Verlag, New York, Heidelberg, Berlin, 1972. [22] F.J. Herrera Govantes, M.A. Olalla Acosta, M. Spivakovsky, B. Teissier, Extending valuations to formal completions, in Valuation Theory in Interaction, 252 - 265 EMS Ser. Congr. Rep, Eur. Math. Soc., Zurich, 2014. 21 [23] L. Ghezzi, Huy Tài Hà and O. Kashcheyeva, Toroidalization of generating sequences in dimension two function fields, J. Algebra 301 (2006) 838-866. [24] L. Ghezzi and O. Kashcheyeva, Toroidalization of generating sequences in dimension two function fields of positive characteristic, J. Pure Appl. Algebra 209 (2007), 631-649. [25] A. Grothendieck, and A. Dieudonné, Eléments de géométrie algébrique II, Publ. Math. IHES 8 (1961). [26] A. Grothendieck, and A. Dieudonné, Eléments de géométrie algébrique III, Publ. Math. IHES 11 (1961). [27] A. Grothendieck, and A. Dieudonné, Eléments de géométrie algébrique IV, vol. 2, Publ. Math. IHES 24 (1965). [28] R. Hartshorne, Algebraic Geometry, Springer, New York, Heidelberg, Berlin, 1977. [29] H. Hauser, On the problem of resolution of singularities in positive characteristic (or: a proof we are waiting for) Bull. Amer. Math. Soc. 47 (2010), 1-30. [30] H. Hironaka, Three key theorems on infinitely near singularities, Singularités FrancoJaponaises, 87 - 126, Sémin. Congr. 10 Soc. Math. France, Paris 2005. [31] H. Knaf and F.-V. Kuhlmann, Every place admits local uniformization in a finite extension of the function field, Adv. Math. 221 (2009), 428 - 453. [32] H. Knaf and F-V. Kuhlmann, Abhyankar places admit local uniformization in any characteristic, Ann. Sci. École Norm. Sup. 38 (2005), 833 - 846. [33] F.-V. Kuhlmann, Valuation theoretic and model theoretic aspects of local uniformization, in Resolution of Singularities - A Research Textbook in Tribute to Oscar Zariski, H. Hauser, J. Lipman, F. Oort, A. Quiros (es.), Progress in Math. 181, Birkhäuser (2000), 4559 - 4600. [34] F.-V. Kuhlmann, Value groups, residue fields, and bad places of algebraic function fields, Trans. Amer. Math. Soc. 356 (2004), 363 - 395. [35] F.-V. Kuhlmann, A classification of Artin Schreier defect extensions and a characterization of defectless fields, Illinois J. Math. 54 (2010), 397 - 448. [36] J. Lipman, Desingularization of 2-dimensional schemes, Annals of Math. 107 (1978), 115 – 207. [37] S. MacLane, A construction for absolute values in polynomial rings, Trans. Amer. Math. Soc. 40 (1936), 363 - 395. [38] S. MacLane and O. Schilling, Zero-dimensional branches of rank 1 on algebraic varieties, Annals of Math. 40 (1939), 507 - 520. [39] J.S. Milne, Étale cohomology, Princeton University Press, 1980. [40] M. Moghaddam, A construction for a class of valuations of the field K(X1 , . . . , Xd , Y ) with large value group, J. Algebra 319, 7 (2008), 2803-2829. [41] M. Raynaud, Anneaux Locaux, Henséliens, Springer Verlag, Berlin, Heidelberg, New York, 1970. [42] J.P. Serre, Corps Locaux, Hermann, 1962. [43] M. Spivakovsky, Valuations in function fields of surfaces, Amer. J. Math. 112 (1990), 107 156. [44] B. Teissier, Valuations, deformations and toric geometry, Valuation theory and its applications II, F.V. Kuhlmann, S. Kuhlmann and M. Marshall, editors, Fields Institute Communications 33 (2003), Amer. Math. Soc., Providence, RI, 361 – 459. [45] B. Teissier, Overweight deformations of affine toric varieties and local uniformization, in Valuation theory in interaction, Proceedings of the second international conference on valuation theory, Segovia-El Escorial, 2011. Edited by A. Campillo, F-V- Kehlmann and B. Teissier. European Math. Soc. Publishing House, Congress Reports Series, Sept. 2014, 474 - 565. [46] M. Temkin, Inseparable local uniformization, J. Algebra 373 (2013), 65 - 119. [47] M. Vaquié, Famille admissible de valuations et défaut d’une extension, J. algebra 311 (2007), 859 - 876. [48] O. Zariski and P. Samuel, Commutative Algebra Volume I, Van Nostrand, 1958. [49] O. Zariski and P. Samuel, Commutative Algebra Volume II, Van Nostrand, 1960. Steven Dale Cutkosky, Department of Mathematics, University of Missouri, Columbia, MO 65211, USA E-mail address: [email protected] 22
0math.AC